From owner-freebsd-ports@freebsd.org Sun Sep 11 00:05:23 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D881BD6626 for ; Sun, 11 Sep 2016 00:05:23 +0000 (UTC) (envelope-from amaniatis@apache.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 520EC9D3 for ; Sun, 11 Sep 2016 00:05:22 +0000 (UTC) (envelope-from amaniatis@apache.org) Received: (qmail 7361 invoked by uid 99); 11 Sep 2016 00:05:21 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Sep 2016 00:05:21 +0000 Received: from Aristedess-MacBook-Pro.local (ppp59-167-140-203.static.internode.on.net [59.167.140.203]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 016231A018B; Sun, 11 Sep 2016 00:05:20 +0000 (UTC) Subject: Re: ${INSTALL_DATA} problems To: Mathieu Arnold , Aristedes Maniatis , FreeBSD Mailing List References: <557d8ed5-3e3a-6384-4b63-b4ed145e0071@apache.org> <35e0ace2-ad10-c103-e3d9-c106286ad28a@FreeBSD.org> From: Aristedes Maniatis Message-ID: Date: Sun, 11 Sep 2016 10:05:17 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Thunderbird/49.0 MIME-Version: 1.0 In-Reply-To: <35e0ace2-ad10-c103-e3d9-c106286ad28a@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 00:05:23 -0000 My apologies for not explaining in enough detail. On 10/09/2016 10:18pm, Mathieu Arnold wrote: > The plist can be generated automatically with "make makeplist" there is > no way it is hard to do, or maintain. > >> > I really only want one folder installed with the correct permissions, but do I need to move my chmod code into the rc.d startup script instead and tying it into the pkg install? > If it is an empty folder, or you just want the folder itself to have the > permissions, do: > > @dir(%%owner%%,%%group%%,optional mode) the/dir I can see how to use makeplist and to edit the results. However maintaining large lists of files can be cumbersome if you have to manually edit that list every time you upgrade. So I see you have the PLIST_SUB option in Makefile as a way to automatically simplify the plist when it is generated with makeplist. I had also thought from my reading of the Drupal 'uses' makefile that I could use PLIST_FILE += as a way to inject additional lines into the plist when you run makeplist, but it doesn't work like that when I try it. PLIST_FILES+= "@owner www" \ "@group www" \ I also note that the docs [1] indicate that COPYTREE_SHARE doesn't add files to pkg-plist, but I note that for me makeplist does generate them as I'd expect. Maybe it is my misunderstanding of what "add" means. Anyhow, thanks for all your help. The end result of this conversation is: 1. I now know that INSTALL_DATA and COPYTREE_SHARE are two macros which are fairly particular in how they work. One can only do single files and the other requires CD to work correctly. Error messages and portlint don't help much. 2. INSTALL_DATA has switches for user and group, but they should not be used 3. If only a specific folder needs to be owned by a certain user, then it is less effort to add that to a prestart() command in the rc.d script rather than maintaining a plist which is different in one line out of a thousand from the output from makeplist. Many rc.d scripts already do that for /var/run/portname/ or /var/log/portname/ anyhow, so this is an established technique. Cheers Ari [1] https://www.freebsd.org/doc/en/books/porters-handbook/install.html -> 5.15.3 -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A