staging without root privileges

Baptiste Daroussin bapt at FreeBSD.org
Wed May 14 15:51:15 UTC 2014


On Wed, May 14, 2014 at 12:48:28PM +0100, Anton Shterenlikht wrote:
> >Am 13.05.2014 19:18, schrieb Anton Shterenlikht:
> >> https://wiki.freebsd.org/ports/StageDir
> >> says 
> >> 
> >> Make sure you tested make package as a normal user (not root).
> >> 
> >> Does this refer specifically to the package target?
> >
> >build targets ("make all", "make stage", "make check-plist") and
> >packaging ("make package").
> >
> >> Or to all targets up to and including package?
> >> 
> >> I'm asked for root passwd on make config,
> >> and then I get an error on build:
> >> 
> >> mkdir: /usr/ports/devel/robodoc/work: Permission denied
> >> 
> >> which makes sense.
> >
> >Setting WRKDIRPREFIX to a directory you can write to can fix that, and
> >PACKAGES specifies where the package should end up. PORT_DBDIR can be
> >diverted to a directory so you can run even "make config" without root
> >privileges.
> >
> >With that, and the distfiles already downloaded ("make checksum"), you
> >should be able to build most ports without privileges.  A few set
> >NEED_ROOT, those won't do without...
> 
> Ok, thanks, so I'm building with:
> 
>  make WRKDIRPREFIX=/tmp PACKAGES=/tmp all check-stage package
> 
> and get to:
> 
> ===>  Staging for slatec-4.1_2
> ===>   slatec-4.1_2 depends on executable: gfortran47 - found
> ===>   Generating temporary packing list
> install -C -o root -g wheel -m 444   libslatec.a /tmp/usr/ports/math/slatec/work/stage/usr/local/lib
> install: /tmp/usr/ports/math/slatec/work/stage/usr/local/lib/libslatec.a: chown/chgrp: Operation not permitted
> *** Error code 71
> 
> I guess I need to refer to this point of the staging wiki:
> 
Add USES=uidfix it should do the magic :)

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140514/ac12b904/attachment.sig>


More information about the freebsd-ports mailing list