build ports from not a root user?

Daniel Staal DStaal at usa.net
Thu Jul 21 18:01:05 UTC 2011


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 at usa.net> => To
> freebsd-questions at 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 at usa.net> => To
> DS> > freebsd-questions at 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.
---------------------------------------------------------------



More information about the freebsd-questions mailing list