From owner-freebsd-ports@FreeBSD.ORG Wed Aug 6 10:43:24 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBB24200; Wed, 6 Aug 2014 10:43:24 +0000 (UTC) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id 567332546; Wed, 6 Aug 2014 10:43:24 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmEGAFsF4lNbsV3c/2dsb2JhbABagw3RfIMbAYEPF3eEBAEFOhweBRALGAklDyoeBohZAcMmF49MB4RLAQScEZRmg1Y7 Received: from 220.93-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.93.220]) by relay.skynet.be with ESMTP; 06 Aug 2014 12:42:15 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s76AgEe5002563; Wed, 6 Aug 2014 12:42:14 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Wed, 6 Aug 2014 12:42:14 +0200 From: Tijl Coosemans To: olli hauer Subject: Re: issue pkg-plist @exec lines and pkg-install scripts Message-ID: <20140806124214.5bd4e343@kalimero.tijl.coosemans.org> In-Reply-To: <53E1EB4E.1040906@gmx.de> References: <53E1EB4E.1040906@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ports , portmgr@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2014 10:43:24 -0000 On Wed, 06 Aug 2014 10:46:06 +0200 olli hauer wrote: > Hi, > > haven't found the culprit but it seems during package building the @exec > lines from pkg-plist are running. > > I found this the hard way since many ports where failing on my local pd > system. > > > E.g from viewvc pkg-plist > > @unexec if cmp -s %D/viewvc/cvsgraph.conf %D/viewvc/cvsgraph.conf.dist; then rm -f %D/viewvc/cvsgraph.conf; fi > @unexec if cmp -s %D/viewvc/mimetypes.conf %D/viewvc/mimetypes.conf.dist; then rm -f %D/viewvc/mimetypes.conf; fi > @unexec if cmp -s %D/viewvc/viewvc.conf %D/viewvc/viewvc.conf.dist; then rm -f %D/viewvc/viewvc.conf; fi > viewvc/cvsgraph.conf.dist > @exec [ -f %B/cvsgraph.conf ] || cp %B/%f %B/cvsgraph.conf > viewvc/mimetypes.conf.dist > @exec [ -f %B/mimetypes.conf ] || cp %B/%f %B/mimetypes.conf > viewvc/viewvc.conf.dist > @exec [ -f %B/viewvc.conf ] || cp %B/%f %B/viewvc.conf > > > $ make check-orphans > ====> Checking for pkg-plist issues (check-plist) > ===> Parsing plist > ===> Checking for items in STAGEDIR missing from pkg-plist > Error: Orphaned: %%AP_NAME%%/cvsgraph.conf > Error: Orphaned: %%AP_NAME%%/mimetypes.conf > Error: Orphaned: %%AP_NAME%%/%%AP_NAME%%.conf > ===> Checking for directories owned by MTREEs > ===> Checking for directories handled by dependencies > ===> Checking for items in pkg-plist which are not in STAGEDIR > ===> Error: Plist issues found. > *** Error code 1 > > > The finished package however has only the *.conf.dist files but many > ports are broken now because @exec statements and pkg-install scripts > are running now during package building ... @exec statements aren't executed during package build. The build log shows that the port simply installs both cvsgraph.conf.dist and cvsgraph.conf in the staging area (same for the other two orphans). So check-plist is correct. If you don't want these files you can remove them in post-install.