Date: Mon, 27 Jan 2014 07:07:39 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-ports@freebsd.org Subject: Re: Questions about staging Message-ID: <52E605BB.1030601@infracaninophile.co.uk> In-Reply-To: <52E5AA90.4060800@missouri.edu> References: <52E5AA90.4060800@missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jocLVP4CKwvt50B6P0KU5Um9BvSQ6hGdx Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 27/01/2014 00:38, Montgomery-Smith, Stephen wrote: > I am looking at this part of https://wiki.freebsd.org/ports/StageDir >=20 > 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. >=20 > 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=3Drevision&revision=3D339461 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. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matthew@infracaninophile.co.uk --jocLVP4CKwvt50B6P0KU5Um9BvSQ6hGdx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJS5gXDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATvGkP/1wwVunIRaW27QknUS8lvyRv FADcVP5mcivCIVEWar/HRs9PvxP4XCOM4M8mh452DBy5hDCtbTChjz+5H1RFkqiD BLrZMQ8o3iiJPcXZl5hGUFOim6drKjAxlPt81VzXxHzDFBSl/o9sXMetYKFKfgCn /DJS0l3Op424VnyNDb0tTtxe4CnPxhb1D++UGdi+QJ7uCuiHSxt8yUAoec/T3TqO EO6480C2uu/A6Ur4gJkKkuUmNjTKVnH/z8hjIuUKDYRZDbiM7tVM26BWwD37JAVo rl45OnZedel84VtrVZMoaZWOj615rSd3+lB5EqbI7yDWIO3hh2CiYaq2AWnPABGJ Xf9g/VpvFgF1PQJUP4k8yWH2m4WZ8txEzk2qkvlbQxPgiws5C7QBZZLNgPw/VgM3 fXYHNOnJAxSGSl9sH3pkfrdAOAUaWDEDue92XcTRoeEUkNQ+s47C9RT9/Yoi/uUe Go3kuL+/Ab+WqU/r1p3TXcSjm3W5M4LsYoFWf2hCfixgeSGjmTwEdRcE1DelFrlO xswq9h3jcIU+L3Y8BVcRWUn9tXBhatTt04M9sd0lDr7YUmmext6PWmvci9e6lJgn xytraI5IOrdxt87orG2Y44z6zG9bzK0ik9dYE7WtK9HUk7MWfdpGP3kjkDysqJX5 NUlqE0XAsyUq933U84V2 =L0mg -----END PGP SIGNATURE----- --jocLVP4CKwvt50B6P0KU5Um9BvSQ6hGdx--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52E605BB.1030601>