Writing a port that simply installs a bunch of files

Matthew Seaman matthew at FreeBSD.org
Thu Mar 9 11:23:34 UTC 2017


On 2017/03/09 10:58, Andrea Venturoli wrote:
> Now files have correct permissions, owner and group in ${STAGEDIR};
> however the group is lost in ${PREFIX} after "make install".
> 
> Is specifying "@group" in pkg-plist the only way to keep that?

Yes, you need to specify what user or group ownership and what
permissions you want for files within the pkg-plist.  Unless they should
have the default root:wheel ownership and mode 755 for dirs and
executables or 644 for data and other non-executable files.

That's because the ports will build software, install it to staging and
create a package from it as a non-root user.  So the ownership and modes
of files in staging may well be nothing like what the files should have
when installed in production.  With the exception that the execute
permission bit setting does seem to be derived from what's in staging.
If that seems annoyingly inconsistent to you, consider what it would
take to update all of the pkg-plist files or equivalent port Makefile
entries to explicitly set the file modes for every executable that might
be installed by the ports, and to get there from here without breaking
everything while that work is in progress.

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170309/07703c98/attachment.sig>


More information about the freebsd-ports mailing list