Staging and directory modes/ownerships

Tijl Coosemans tijl at FreeBSD.org
Sun Nov 3 21:23:28 UTC 2013


On Sun, 3 Nov 2013 14:47:00 +0100 (CET) Melvyn Sopacua wrote:
> I'm trying to upgrade www/magento and in the process make it use the
> stage. Aside from having to package a fixed plist again to set modes and
> ownerships, I can no longer find a way to set these properties on
> directory trees.

After converting the Makefile for staging you can create an initial
pkg-plist using "make makeplist".  Later you can also check for missing
items using "make check-orphans".

> The short version:
> How do I convert the following in do-install to work with staging?
> ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/www/magento/media
> ${FIND} ${PREFIX}/www/magento -type d -exec ${CHMOD} a+w {} +
> 
> Note that this *has* to ensure that if the top level directory exists
> and has a different mode/owner they are changed.
> 
> I tried using @mode and @owner on the first occurance of the top-level
> directory in the pkg-plist but this only sets the properties for the
> files in question.
> Since @mkdir is ignored and @exec frowned upon, I don't see a proper way
> to do this.
> For now I'll go with adding @exec commands to ${TMPPLIST}, I suppose.

Would this work:

@owner www
@group www
www/magento/media/foo/bar
@mode 0777
@dirrm www/magento/media/foo
@dirrm www/magento/media
@dirrm www/magento
@owner
@group
@mode
other/files
@dirrm and/directories


More information about the freebsd-ports mailing list