Changing ownership of a directory when using staging

olli hauer ohauer at gmx.de
Sat Feb 22 19:52:25 UTC 2014


On 2014-02-22 20:05, Adam Weinberger wrote:
> How do I specify the owner/group and mode of a directory when using
> staging? It appears to automatically create every directory as
> root:wheel. Setting @user/@group in pkg-plist doesn't affect things with
> @exec mkdir.
> 
> The only thing I can figure is:
> @exec install -d -m 730 -o user -g group %D/path/to/dir
> 
> But that'll fail when installed by anyone except root, right?
> 
> This problem breaks usability of a number of ports---especially
> web-based ones where specific directories need specific owners. Every
> time www/dokuwiki is upgraded or reinstalled, a half dozen directories
> have to be manually chown'd on the command line, for example.
> 

Hi Adam,

you can still use the pkg-install script for this tasks.

The difference with staging is pkg-install will be will be executed
automatically during 'make install' or pkg_install/pkg install but
not during 'make stage'.

Additional you can remove the the following from the Makefile

post-install:
       @${SH} ${PKGINSTALL} ${DISTNAME} POST-INSTALL


Take a look into net-mgmt/nagvis/files/pkg-install.in to see
a strict WWWDIR permission setter.

-- 
Regards,
olli


More information about the freebsd-ports mailing list