From owner-freebsd-ports@FreeBSD.ORG Wed Apr 10 06:13:36 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 3E68C80E for ; Wed, 10 Apr 2013 06:13:36 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id CE1DF686 for ; Wed, 10 Apr 2013 06:13:35 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id z2so82627wey.1 for ; Tue, 09 Apr 2013 23:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=8dL3IhXhVtXdWov8sBWpxdlyHsyo4spKsySCT+22IME=; b=jPDO4bCRxdISKeukV8wjrVh+tKUs3zd+Xyt9rCDI+OYYzuO2j1qYdEDi7QWI6lQiWw hz2fKKVzhzTRcJfJkhxhGzSmGKElB8yYdeBuMYLIQgB/8Z3zkWH0S2YgvygtyxBwpI0t WQpSi8TVtm8CdMvKMW5XDKoR7C1OJ7V5opBWACtaXRW6djyOCbzFSLnJxF1OXS/GwhkT WtmQNM89ZdemoBSARItroU1w5urypfmaE1Q4X6oqpeV8xPfVWZ5O0iOLYiPM1+PVdCPS fALHO5rlxoUGj8xAAYDn/gSPuw28v8svNMA+dTsd+MTGrRov/Jog46AbnKPhua/LIkVv BD/w== X-Received: by 10.180.181.40 with SMTP id dt8mr925644wic.17.1365574414892; Tue, 09 Apr 2013 23:13:34 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id q13sm36653832wie.0.2013.04.09.23.13.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Apr 2013 23:13:34 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 10 Apr 2013 08:13:31 +0200 From: Baptiste Daroussin To: Michael Gmelin Subject: Re: www/nginx pkg-plist + pkgng (detectable?) Message-ID: <20130410061331.GA74304@ithaqua.etoilebsd.net> References: <20130330034028.0f8cefc8@bsd64.grem.de> <5156C0D9.50909@FreeBSD.org> <20130330142320.38010126@bsd64.grem.de> <20130408103118.67ea695a@bsd64.grem.de> <20130409205950.677a6812@bsd64.grem.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <20130409205950.677a6812@bsd64.grem.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Chris Rees , freebsd-ports@freebsd.org 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: Wed, 10 Apr 2013 06:13:36 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 09, 2013 at 08:59:50PM +0200, Michael Gmelin wrote: > On Tue, 9 Apr 2013 19:43:15 +0100 > Chris Rees wrote: >=20 >=20 > >=20 > > No, it's a bug in pkgng; it should respect @cwd. > >=20 No it is not. While i agree with pkgng that should repect @cwd (it surely does) There is nothing written anywhere that will waranty you that the @exec line= will be parsed in order ro prepend @cwd path to a path you provide. the only thi= ng doing that is %D. A user MUST add %D and have complete path in @exec lines In fact in that case it works by chance becauce of how pkg_install treat pl= ist. >=20 > pkg should respect @cwd for sure, but looking at nginx's plist I think > that it should use the cwd marker consistently, so right now it says: >=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 > IMHO this should be: >=20 > %%WWWDATA%%@exec mkdir -p -m 755 %D/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 %D/www/nginx-dist >=20 Yes Michael you are totally right :) regards, Bapt --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFlAwsACgkQ8kTtMUmk6EykAQCeL8J0z9eX/ONBK3qKddNb8YXO iF4AnifKRH1yM0OspUjcNW889tyizlfu =eYki -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--