|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
||||
Build kernel & userland as root?
The FAQ mentions a nifty way to build ports as a user (in group wsrc) - 15.3.3 - Configuration of the ports system
Could something similar be done so the kernel/userland and xenocara could be updated and compiled by users in the wsrc group? I am tempted to just try: # find /usr/src -type d -exec chmod g+w {} \; # find /usr/xenocara -type d -exec chmod g+w {} \; # chmod g+w /usr/obj # chmod g+w /usr/xobj then try an update or build but it would be nice to hear what the more experienced folk have to say about it first. |
|
||||
I've been updating the source as root but here's a test as non-root:
Code:
hanzer[/usr/xenocara]$ userinfo hanzer login hanzer passwd * uid 1000 groups hanzer wheel wsrc change NEVER class staff gecos Adam Jensen dir /home/hanzer shell /bin/ksh expire NEVER hanzer[/usr/xenocara]$ cvs -d$CVSROOT up -rOPENBSD_5_7 -Pd The authenticity of host 'anoncvs3.usa.openbsd.org (192.43.244.161)' can't be established. ECDSA key fingerprint is SHA256:UAjbt7WxQff1I2ZEp5Vgkpr0JGN5MmFX8PYMaZgIP24. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'anoncvs3.usa.openbsd.org,192.43.244.161' (ECDSA) to the list of known hosts. cvs update: cannot open CVS/Tag: Permission denied cvs update: cannot open CVS/Tag: Permission denied cvs server: Updating . cvs update: cannot open CVS/Tag: Permission denied cvs update: cannot open CVS/Tag: Permission denied cvs server: Updating app ^c Trying a kernel build. /etc/mk.conf Code:
SUDO=/usr/bin/sudo USE_SYSTRACE=Yes Code:
hanzer[/usr/src/sys/arch/i386/conf]$ config GENERIC.MP config: config: remove(machine): Permission denied config: config: symlink(machine -> ../../../../arch/i386/include): File exists config: config: remove(i386): Permission denied config: config: symlink(i386 -> machine): File exists *** Stop. The FAQ demonstrates updating and building as root but some steps in the release(8) examples have a $ prompt and other steps have # prompt. I guess since I followed the FAQ approach and did the initial source checkouts and updates as root that accounts for the failures (above). It's curious that, in release(8), the userland build makes use of the SUDO environment variable but the kernel # make install explicitly does not. Hmm, I wonder what is going on there?
|
|
|||
.......& will it soon use the new doas......
__________________
Linux since 1999, & also a BSD user. |
|
||||
Your permission errors require the use of the famous ls(1) command. Your CVS/Tag files, at the very least, are either not owned by group wsrc or do not have write access by the group. Or both.
There are many ways to correct this. The fastest would be to use find(1) with xargs(1) and either chown(1) or chmod(1). Or both. Here's an example command to change ownership. Be careful. I'm just typing this from between my assumptions, and have not tested this. I may have syntax errors, or ... worse. Deploy some test files in /tmp and test something similar there, before doing this to your source tree. # find /usr/src -name Tag | xargs chown root:wsrc You can also delete and then recreate the source tree from CVS as the user hanzer, if you prefer, though that takes much longer. |
|
||||
The release(8) manpage contains most of the key information for building as non-root (thanks for the hint!). I just got this box together so I'll probably tinker with other stuff and wait for 5.8-release, fresh install, and set up the updating & build process by following the release(8) method rather than FAQ method.
For the near term, I need to explore lean backup & clean restore methods so I can start mucking about entirely reckless with absolute impunity. Mwah ha ha haaaa! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
kernel, userland, and ports CFLAGS | hanzer | OpenBSD Packages and Ports | 5 | 15th February 2015 09:52 PM |
Why to build a new userland? | batence | NetBSD Installation and Upgrading | 2 | 5th January 2015 07:44 PM |
how to determine if kernel & userland are synchronized? | daemonfowl | OpenBSD General | 4 | 10th May 2012 03:02 PM |
commands to build a kernel | desreguard | FreeBSD General | 2 | 4th June 2011 05:20 PM |
Problem during kernel-build for a 6.x-to-7 upgrade | clevershark | FreeBSD Installation and Upgrading | 2 | 1st February 2009 10:45 PM |