From owner-freebsd-ports@FreeBSD.ORG Sat Mar 30 07:30:19 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B85FA925 for ; Sat, 30 Mar 2013 07:30:19 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 4F05E603 for ; Sat, 30 Mar 2013 07:30:19 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.6/8.14.6) with ESMTP id r2U7UDTS002318 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 30 Mar 2013 07:30:13 GMT (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.0 smtp.infracaninophile.co.uk r2U7UDTS002318 Authentication-Results: smtp.infracaninophile.co.uk/r2U7UDTS002318; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Message-ID: <5156947D.80202@FreeBSD.org> Date: Sat, 30 Mar 2013 07:30:05 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: www/nginx pkg-plist + pkgng (detectable?) References: <20130330034028.0f8cefc8@bsd64.grem.de> In-Reply-To: <20130330034028.0f8cefc8@bsd64.grem.de> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2TVQJHCCHMFCFBTSOIDOS" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk 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 07:30:19 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TVQJHCCHMFCFBTSOIDOS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 30/03/2013 02:40, Michael Gmelin wrote: > pkg-plist contains: >=20 > %%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 >=20 > cd /usr/ports/www/nginx > make install clean >=20 > # pkg info -R nginx | grep www/nginx-dist >=20 > /usr/local/www/nginx-dist/50x.html: 3c264d74770fd706d59c68d90ca1eb893= ac379a666ff136f9acc66ca01daec02 > /usr/local/www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHIN= G: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b > /usr/local/www/nginx-dist/index.html: 38ffd4972ae513a0c79a8be4573403e= dcd709f0f572105362b08ff50cf6de521 > /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/ngin= x-dist /usr/local/www/nginx; fi > chmod a-w www/nginx-dist >=20 > This means in practice, once you create a binary package (pseudo code):= > pkg create nginx > pkg repo . > ... > pkg install nginx >=20 > 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. There are plans afoot to introduce building packages in chroots and doing things like generating several smaller sub-packages from one port (eg. separate docs packages, separate shlibs pacakges etc.) which will have ramifications on the way plists are handled. That should make it virtually impossible to create a package that install files which aren't registered in /var/db/pkg/local.sqlite. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey ------enig2TVQJHCCHMFCFBTSOIDOS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFWlIUACgkQ8Mjk52CukIyLEgCfXr5H9iuAq0wKaBgY+zuH+BrX Gk4AoIMX1rqZ8VUla5QUT6n8cgLZ3Dg1 =qwnp -----END PGP SIGNATURE----- ------enig2TVQJHCCHMFCFBTSOIDOS--