From owner-freebsd-ports@freebsd.org Sun Feb 7 19:05:05 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B89A4534707 for ; Sun, 7 Feb 2021 19:05:05 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DYdrd2rHvz3F4l for ; Sun, 7 Feb 2021 19:05:05 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: by mailman.nyi.freebsd.org (Postfix) id 5FCB7533FF7; Sun, 7 Feb 2021 19:05:05 +0000 (UTC) Delivered-To: ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F8A9534706 for ; Sun, 7 Feb 2021 19:05:05 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DYdrd19Tcz3DgP; Sun, 7 Feb 2021 19:05:04 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 117J5Qj3010345; Sun, 7 Feb 2021 11:05:32 -0800 (PST) (envelope-from portmaster@bsdforge.com) MIME-Version: 1.0 Date: Sun, 07 Feb 2021 11:05:26 -0800 From: Chris To: Chris Rees Cc: ports@freebsd.org Subject: Re: Handling directory ownership in pkg-plist In-Reply-To: <967F2C8E-AD27-4003-A5B7-6B39D1911572@FreeBSD.org> References: <623897a8b8aaf941d59f39f2f32e4326@bsdforge.com> <967F2C8E-AD27-4003-A5B7-6B39D1911572@FreeBSD.org> User-Agent: UDNSMS/17.0 Message-ID: <8932039662e23e447f019a3b98bb9b90@bsdforge.com> X-Sender: portmaster@bsdforge.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DYdrd19Tcz3DgP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2021 19:05:05 -0000 On 2021-02-07 02:18, Chris Rees wrote: > Hi Chris, > > Thamks for the reply. > > On 7 February 2021 03:57:03 GMT, Chris wrote: >> On 2021-02-06 13:34, Chris Rees wrote: >>> Hi all, >>> >>> Resurrecting audio/ampache-resurrect, and I have @owner www/@group >> www above >>> all >>> of the WWWDIR files, and they are correctly owned. However, the >> directories >>> under >>> it are all still owned by root:wheel, and if I explicitly add them >> all with >>> @dir >>> pkg then complains about not being able to find them. >>> >>> Would it be unacceptable to just have @exec chown -R www:www >> %D/%%WWWDIR%% >>> at the bottom? >> Yes. By way of pre-install: >> You'll probably get a complaint unless you use: ${CHOWN} > > Perhaps I was unclear- I'm referring to pkg-plist, so there is no ${CHOWN} > there. > > The exact proposed line is > > @postexec chown -R www:www %D/%%WWWDIR%% > > I was wondering what the 'proper' way to do this was. I'm wondering why it's not enough to create a post-extract that doesn't something like cd ${WRKSRC}/some/dir && ${CHOWN} -R ${WWUSER}:${WWGROUP} . Then the ports framework would create an appropriate pkg-plist based on that. A make -DBATCH makeplist would generate your target pkg-plist. I'm paraphrasing, as I don't have your Makefile. But I've needed to perform tasks like myself. Out of curiosity. What does a make -DBATCH makeplist generate? Does the output provide the necessary clues to create a pkg-plist you're interested in? > > Chris --Chris