From owner-freebsd-ports@FreeBSD.ORG Sat Feb 22 19:52:25 2014 Return-Path: Delivered-To: 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 64F8ABB7 for ; Sat, 22 Feb 2014 19:52:25 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE0D91795 for ; Sat, 22 Feb 2014 19:52:24 +0000 (UTC) Received: from [192.168.0.100] ([87.139.233.65]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MhAAr-1WdUAL0ROL-00MOHV for ; Sat, 22 Feb 2014 20:52:16 +0100 Message-ID: <5308FFF5.60108@gmx.de> Date: Sat, 22 Feb 2014 20:52:21 +0100 From: olli hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Adam Weinberger Subject: Re: Changing ownership of a directory when using staging References: <20140222190540.GA9375@apnoea.adamw.org> In-Reply-To: <20140222190540.GA9375@apnoea.adamw.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:g/RdKjd6C9ubSxKD9E6ADaLpsIX/Af5sfXC1N5NnUqOa7p+zdYN us1Vf0p+67ck/hVPii6BhJG50Jk/Z4EQ0TJNyIbdZN+cp+MKDoV+X6tNVnANWa8C2j88Qyf U00x/MDAekUXC6rJA/2xGDOr16gfGF11IA1tFXDn12U8e5VyhQNf5McwsjyW/zw+CmYOiDX UR2y46Z4v0GObcWxzdKww== Cc: ports@FreeBSD.org 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: Sat, 22 Feb 2014 19:52:25 -0000 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