From owner-freebsd-ports@FreeBSD.ORG Wed Mar 5 07:50:25 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D1D1902 for ; Wed, 5 Mar 2014 07:50:25 +0000 (UTC) Received: from piggulke.himolde.no (piggulke.himolde.no [158.38.95.34]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D506C379 for ; Wed, 5 Mar 2014 07:50:24 +0000 (UTC) Received: from SIL1 (158.38.83.8) by Piggulke.himolde.no (158.38.95.36) with Microsoft SMTP Server id 14.2.347.0; Wed, 5 Mar 2014 08:49:11 +0100 X-TM-IMSS-Message-ID: <0661dbb3000008cb@SIL1> Received: from harr.himolde.no ([158.38.68.20]) by SIL1 ([158.38.83.8]) with ESMTP (TREND IMSS SMTP Service 7.1) id 0661dbb3000008cb ; Wed, 5 Mar 2014 08:49:08 +0100 Received: from harr.himolde.no (harr.himolde.no [127.0.0.1]) by harr.himolde.no (8.13.1/8.13.1) with ESMTP id s257n8Ao005388 for ; Wed, 5 Mar 2014 08:49:08 +0100 Received: (from nordhaug@localhost) by harr.himolde.no (8.13.1/8.13.1/Submit) id s257n8ta005387 for freebsd-ports@freebsd.org; Wed, 5 Mar 2014 08:49:08 +0100 Date: Wed, 5 Mar 2014 08:49:08 +0100 From: "Hans F. Nordhaug" To: Subject: Re: Staging - set owner/group/mode in pkg-plist for empty directory Message-ID: <20140305074908.GA5115@hiMolde.no> References: <20140304143052.GA22995@hiMolde.no> <5315FB56.3000601@gmx.de> <20140304224706.GA17997@hiMolde.no> <5316BE3C.1000007@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline In-Reply-To: <5316BE3C.1000007@gmx.de> User-Agent: Mutt/1.4.1i X-TM-AS-Product-Ver: IMSS-7.1.0.1524-7.5.0.1017-20546.005 X-TM-AS-User-Approved-Sender: Yes X-TMASE-MatchedRID: vEvJ7Rh1lGg4HKI/yaqRmya1MaKuob8PfjJOgArMOCZ94c+e7fWIcJas fA8Y/RCFlEn/6euqZK2RpDMcV8C7CvN/7zZCdM/jo4427PDKC0Zimi8LvNfmrxxUkJPe1WBqIZn pVU5Vh5awTZ8mUjoyk+XVY6vvRRzfQylVlmxnJkbvVbHa5Rs8t9KVy8w6rKl+SSUXkvSVAdxq28 0SNQiKlVQ3VXKZYbWjJhk/gkPu6zobGMp+f0k4HWw+ImH2wqNjXcpmQXLhhkR6Yg58TBGHHcxot c4f9k7+fOz+yW2Wc34mtlFoVaDD+mNDmna6qpNX2OSj4qJA9QYhotH7bEpEMtQw8qtEs59hyyVo fv+j6w/NAIQVxCmqmK7s3l+i0565mo2ZG/E7i3O628cXbnOhT30tCKdnhB58uME6WhSqqOHUZxE AlFPo846HM5rqDwqtlExlQIQeRG0= X-IMSS-DKIM-White-List: No X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 07:50:25 -0000 * olli hauer [2014-03-05]: > On 2014-03-04 23:47, Hans F. Nordhaug wrote: > > * olli hauer [2014-03-04]: > >> On 2014-03-04 15:30, Hans F. Nordhaug wrote: > >>> Hi, > >>> > >>> I'm trying to add staging to the Piwik port (at the same time as > >>> updating to the new 2.1.0 release). AFAIK it's not possible to > >>> set owner/group/mode for a directory in pkg-plist, only for files. > >>> Is that correct? > >>> > >>> Piwik comes with an empty tmp directory that needs to be writable > >>> by the webserver. Using CHMOD naivly in the post-install target > >>> doesn't work. > >>> > >>> What is the correct work-around? [CUT] > >> This should work. > >> @exec install -m 755 -o %%WWWOWN%% -g %%WWWGRP%% -d %D/%%WWWDIR%%/tmp > >> @exec chown -R %%WWWOWN%%:%%WWWGRP%% %D/%%WWWDIR%%/tmp > > > > Thx, I ended up using "@exec chown ..." at the end pkg-plist. (The empty > > directory is created so I don't need "@exec install".) > > > >> The following patch should work for your update > >> http://people.freebsd.org/~ohauer/diffs/piwik-2.1.0.diff > > > > Thx, but I had already written the patch - I just needed the one > > missing piece ("@exec chown ..."). I did however copy the option > > changes you did - much clearer code. Thx! > > > > Regards, > > Hans > > Hi Hans, > > the creation of the empty tmp directory is required for the old pkg_create > tool, with the new ports-mgmt/pkg tools this is not required since it can > handle empty directories. Since you haven't upgraded to pkgng yet, you can > test this yourself by creating a package cleanup local/www and installing > the package. > > $> cd www/piwik > $> make clean package && make clean > $> make deinstall > $> rm -rf /usr/local/www/piwik > $> pkg_add $path/to/new/piwik-2.1.0.tbz > > Now check if the directory is there. You are right - thx for taking the time to explain. But why do you need both? Doesn't @exec install -m 755 -o %%WWWOWN%% -g %%WWWGRP%% -d %D/%%WWWDIR%%/tmp work for pkgng? Is the problem that it doesn't change owner/group if the directory is already installed/created? And why did you add ${MKDIR} ${STAGEDIR}${WWWDIR}/tmp to "do-install"? I know for sure that it isn't necessary when you use "make install" (since the directory is created by COPYTREE_SHARE. In which case is it needed? Thx, again. Regards, Hans