Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2011 19:30:50 +0400
From:      Peter Vereshagin <peter@vereshagin.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: build ports from not a root user?
Message-ID:  <20110721153050.GA76083@external.screwed.box>
In-Reply-To: <80674226c5ead62b213864dcd36b6a75.squirrel@www.magehandbook.com>
References:  <20110721100259.GA5326@external.screwed.box> <80674226c5ead62b213864dcd36b6a75.squirrel@www.magehandbook.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
You'll never silence the voice of the voiceless, freebsd-questions!
2011/07/21 11:04:57 -0400 Daniel Staal <DStaal@usa.net> => To freebsd-questions@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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110721153050.GA76083>