Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2011 14:01:04 -0400
From:      "Daniel Staal" <DStaal@usa.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: build ports from not a root user?
Message-ID:  <ae4d7343fa3e423e433ddcbd0cabda2c.squirrel@www.magehandbook.com>
In-Reply-To: <20110721175420.GF7553@external.screwed.box>
References:  <20110721100259.GA5326@external.screwed.box> <80674226c5ead62b213864dcd36b6a75.squirrel@www.magehandbook.com> <20110721153050.GA76083@external.screwed.box> <bd3d6dc9b6b0040d29f741cc94972b02.squirrel@www.magehandbook.com> <20110721175420.GF7553@external.screwed.box>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

On Thu, July 21, 2011 1:54 pm, Peter Vereshagin wrote:
> Oh Daniel want you buy me a mersedes benz?
> 2011/07/21 13:19:40 -0400 Daniel Staal <DStaal@usa.net> => To
> freebsd-questions@freebsd.org :
> DS>
> DS> On Thu, July 21, 2011 11:30 am, Peter Vereshagin wrote:
> DS> > You'll never silence the voice of the voiceless, freebsd-questions!
> DS> > 2011/07/21 11:04:57 -0400 Daniel Staal <DStaal@usa.net> => To
> DS> > freebsd-questions@freebsd.org :
> DS> > DS> > I'd like to build my ports from not a root user.
> DS> > DS> > How can I tell the ports system that it should su ( switch
> user )
> DS> > before
> DS> > DS> > to
> DS> > DS> > build the dependencies?
> DS> > DS> > Can portupgrade handle this?
> DS> > DS> > Dependencies should be installed from a root user.
> DS> > DS>
> DS> > DS> Install sudo, and (as long as your permissions are set
> correctly) the
> DS> > DS> ports system can do everything except the install and configure
> from a
> DS> > DS> user in the 'wheel' group.
> DS> >
> DS> > Heck I know I can use su or sudo and after
> DS> >
> DS> >     chown -Rf user00:group00 /usr/ports/ /usr/src/ /usr/obj
> DS> >
> DS> > I can build world or a single port with 'make'. It's easy.
> DS> >
> DS> > But with ports I know the dependencies will not follow my policy to
> DS> > install the
> DS> > every single port as:
> DS> >
> DS> >     $ cd /usr/ports/category/port00
> DS> >     $ make
> DS> >     $ su -
> DS> >     # cd /usr/ports/category/port00
> DS> >     # make install
> DS> >     # exit
> DS> >     $ cd /usr/ports/category/port01
> DS> >     ... and so on ...
> DS>
> DS> No, it'll _build_ each port as your user, and then try to go to root
> to
> DS> install them.  Which is why I suggested sudo: You can tune it's
> timeouts,
> DS> and only have to enter your password occasionally.  (Why do you trust
> a
> DS> port's dependencies to be built as root if you don't trust the port
> DS> itself, after all?)
>
> That's the question: I don't.
> In that my code example, port00 and port01 can all be (or not be) the
> dependencies for the port I try to install.
> I mean about every single port, including its dependencies, to be
> installed
> that way: build as a user and then install as a root.

Ok, then I've already answered your question several emails ago.  The
ports system will do this automatically with a simple 'make', 'make
install', or 'make depends; make install'.  And you said you knew about
that way of it working.

So, what are we discussing again?

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------




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