On Fri, Oct 24, 2014 at 05:09:36AM -0400, thev...@openmailbox.org wrote:
> On Fri, 24 Oct 2014 08:35:40 +0200 Landry Breuil <lan...@rhaalovely.net> 
> wrote:
> > On Fri, Oct 24, 2014 at 02:34:54AM -0400, thev...@openmailbox.org wrote:
> > > with SUDO set in /etc/mk.conf:
> > >   if make release is run as root it will not proceed.
> > >   if run as a regular user it gets further, but fails on permissions.
> > > 
> > > without SUDO in /etc/mk.conf (and i presume the environment) it works 
> > > fine.
> > > 
> > > is there any way around this allowing /etc/mk.conf (which is useful for 
> > > ports)?
> > > i can always move it temporarily, add it to my automated scripts, but is 
> > > there
> > > a better way?
> > > 
> > > 
> > > $ cat /etc/mk.conf
> > > SUDO=/usr/bin/sudo
> > 
> > I think (and this is probably somewhere in the docs) you should use sudo -E.
> > without it (and if you're not in wsrc) DESTDIR and RELEASEDIR are
> > removed. check the default sudoers, and sudo manpage for details.
> > 
> > Landry.
> > 
> 
> if you are talking about this:
> 
> $ sudo env DESTDIR=/usr/dst RELEASEDIR=/usr/release make release
> exec /usr/bin/sudo make distribution-etc-root-var
> setenv DESTDIR before doing that!
> *** Error 1 in /usr/src/etc (Makefile:77 'distribution-etc-root-var': @false)
> *** Error 1 in /usr/src/etc (Makefile:228 'distribution')
> 
> that is the reason for this error, since root is not in group wsrc, and sudo
> is getting invoked twice, once by me and then again by make.

You're mixing stuff here. IF the user doing sudo is in wsrc, DESTDIR and
RELEASEDIR should be passed through to the underlying process. and you
shouldnt need two sudo invocations.

export DESTDIR=/usr/dst
export RELEASEDIR=/usr/release
$make release (as user

iirc, if you're in wsrc and use the default sudoers that's supposed to work.

(btw, i never build releases, so i might be wrong)

Landry

Reply via email to