-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/27/2014 01:07 AM, Matthew Seaman wrote:
> On 27/01/2014 00:38, Montgomery-Smith, Stephen wrote:
>> I am looking at this part of
>> https://wiki.freebsd.org/ports/StageDir
>> 
>> Replace commands like ${CHMOD} ... and ${INSTALL_PROGRAM} -m mode
>> -o user -g group with corresponding pkg-plist entries: @mode
>> mode, @owner user, @group group. /!\ These operators work until
>> being overridden, or until the end of pkg-plist, so do not forget
>> to reset them with @mode, @owner, @group keywords afterwards.
>> 
>> I have to admit that I don't understand what this is driving at.
>> Can someone explain it to me?
> 
> This is all about being able to create packages without needing 
> superuser powers.  The idea is to take privileged commands like
> chmod(1) (or the implied chmod from using the -o flag to
> install(1)) out of install: targets in the port Makefile (which
> nowadays install into the staging directory) and replace them with
> equivalent constructs in pkg-plist (which are extracted into the
> generated pkg as pre/post- install script actions) ie. so that
> pkg(8) set the ownership of files at the point the package is
> installed.
> 
> Sometimes it involves a bit more than just editing the port
> Makefile -- here's an example from one of my own ports, where I had
> to fold, spindle and mutilate the software's own Makefiles to
> achieve the desired result:
> 
> http://svnweb.freebsd.org/ports?view=revision&revision=339461
> 
> This includes some other changes to do with using options helpers
> etc. but it should be clear enough what was done to move changing
> file ownership away from the staging step and into package
> installation. Look at the chagnes to pkg-plist and
> patch-Makefile.in in particular.

So it would only be necessary to do this if you want to set ownership
to anything other than root:wheel, since the pkg install program
should automatically set things to root:wheel anyway?  (Because things
installed the usual "make install" way will be set similarly?)

And presumably the same for chmod - it would only be necessary when
setting things like setuid or setgid bits, since otherwise it will
merely copy permissions from whatever the file in the tarball has?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS5nJ9AAoJEC3xK9GaktgHvNgH/jzU+krSXo3zY3nllQyPl3gN
h5jmqW8TqBO78l2+ZQ3fq7OR6IOHAbZBGOLQ/+pl+IPVJH66tPoRlFI985vT/eab
3/3FQDG9D8xu6WmLHKUPamCTm8NS8jEEnIoc2YMVHhu8MCNcgBcy4zmDiokodp9B
nb036XNZJ78r6sZFad3Fpxc+g28zkHYRwDdwDED6+QhfKCTi8g8+bg8+1zN1mUga
0gDg84BBgGcAK52iZTCP+TBHC5sNNENeAWaCkF0JweEOq/i6KerV3L9KjipC3+E1
nt1gpvWRGltK/H7MhcSDVF7ig25FQkixrE6d30MffgbpnKV0lMATGUGWiuMN2/E=
=4QAN
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to