From owner-freebsd-ports@FreeBSD.ORG Sat Mar 30 12:19:45 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E5B14DC7 for ; Sat, 30 Mar 2013 12:19:45 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 59B54116 for ; Sat, 30 Mar 2013 12:19:44 +0000 (UTC) Received: (qmail 29993 invoked by uid 89); 30 Mar 2013 12:13:02 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@79.251.0.25) by mail.grem.de with ESMTPA; 30 Mar 2013 12:13:02 -0000 Date: Sat, 30 Mar 2013 13:13:01 +0100 From: Michael Gmelin To: freebsd-ports@freebsd.org Subject: Re: www/nginx pkg-plist + pkgng (detectable?) Message-ID: <20130330131301.5d2d49de@bsd64.grem.de> In-Reply-To: <5156947D.80202@FreeBSD.org> References: <20130330034028.0f8cefc8@bsd64.grem.de> <5156947D.80202@FreeBSD.org> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Matthew Seaman X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 12:19:46 -0000 On Sat, 30 Mar 2013 07:30:05 +0000 Matthew Seaman wrote: > On 30/03/2013 02:40, Michael Gmelin wrote: > > pkg-plist contains: > > > > %%WWWDATA%%@exec mkdir -p -m 755 www/nginx-dist > > %%WWWDATA%%@exec if [ ! -d %D/www/nginx/ ] ; then ln -fs > > %D/www/nginx-dist %D/www/nginx; fi > > %%WWWDATA%%www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING > > %%WWWDATA%%www/nginx-dist/index.html > > %%WWWDATA%%www/nginx-dist/50x.html > > %%WWWDATA%%@exec chmod a-w www/nginx-dist > > %%WWWDATA%%@unexec if [ -L %D/www/nginx ]; then rm -f %D/www/nginx; > > fi %%WWWDATA%%@dirrmtry www/nginx-dist > > > > cd /usr/ports/www/nginx > > make install clean > > > > # pkg info -R nginx | grep www/nginx-dist > > > > /usr/local/www/nginx-dist/50x.html: > > 3c264d74770fd706d59c68d90ca1eb893ac379a666ff136f9acc66ca01daec02 /usr/local/www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING: > > 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b /usr/local/www/nginx-dist/index.html: > > 38ffd4972ae513a0c79a8be4573403edcd709f0f572105362b08ff50cf6de521 /usr/local/www/nginx-dist/: > > y mkdir -p -m 755 www/nginx-dist > > if [ ! -d /usr/local/www/nginx/ ] ; then ln > > -fs /usr/local/www/nginx-dist /usr/local/www/nginx; fi chmod a-w > > www/nginx-dist > > > > This means in practice, once you create a binary package (pseudo > > code): pkg create nginx > > pkg repo . > > ... > > pkg install nginx > > > > You'll be left with a www/nginx-dist relative to wherever you've > > been in the file. I assume that pkg-plist should use %D/www/nginx > > instead of www/nginx in mkdir and chmod. So it's probably a bug in > > the port itself. Is this something that pkgng could potentially > > catch in future? > > Leftovers when a package is removed? That's definitely a bug, and at > the moment, such things will be picked up by package building software > like poudriere or tinderbox. Testing on redports would flag up this > problem, and if a commit to a port introduces such behaviour the > maintainer should be getting emails from QAT and maybe pointyhat. Nope, it's leftovers when the package gets installed. I will elaborate that in my answer to Bryan later. -- Michael Gmelin