build ports from not a root user?
Peter Vereshagin
peter at vereshagin.org
Thu Jul 21 15:31:27 UTC 2011
You'll never silence the voice of the voiceless, freebsd-questions!
2011/07/21 11:04:57 -0400 Daniel Staal <DStaal at usa.net> => To freebsd-questions at freebsd.org :
DS> > I'd like to build my ports from not a root user.
DS> > How can I tell the ports system that it should su ( switch user ) before
DS> > to
DS> > build the dependencies?
DS> > Can portupgrade handle this?
DS> > Dependencies should be installed from a root user.
DS>
DS> Install sudo, and (as long as your permissions are set correctly) the
DS> ports system can do everything except the install and configure from a
DS> user in the 'wheel' group.
Heck I know I can use su or sudo and after
chown -Rf user00:group00 /usr/ports/ /usr/src/ /usr/obj
I can build world or a single port with 'make'. It's easy.
But with ports I know the dependencies will not follow my policy to install the
every single port as:
$ cd /usr/ports/category/port00
$ make
$ su -
# cd /usr/ports/category/port00
# make install
# exit
$ cd /usr/ports/category/port01
... and so on ...
In different words, I want the 'make install' from the partivular port's directory to automate
/usr/ports/category/ports00 # make install
behind its scenes like this:
# cd /usr/category/category/dependence-port01
# su user00 -c make
# make every_install_target
# cd /usr/ports/category/ports00
# su user00 -c make
# make every_install_target
Think 'dependence-port01' and 'every_install_target' are self-explanatory.
73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB 12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.org
More information about the freebsd-questions
mailing list