Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2013 22:23:18 +0100
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Melvyn Sopacua <melvyn@magemana.nl>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Staging and directory modes/ownerships
Message-ID:  <20131103222318.3f9d2c8a@kalimero.tijl.coosemans.org>
In-Reply-To: <alpine.BSF.2.00.1311031432520.22005@fire.magemana.nl>
References:  <alpine.BSF.2.00.1311031432520.22005@fire.magemana.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131103222318.3f9d2c8a>