www/nginx pkg-plist + pkgng (detectable?)
Baptiste Daroussin
bapt at FreeBSD.org
Wed Apr 10 06:13:36 UTC 2013
On Tue, Apr 09, 2013 at 08:59:50PM +0200, Michael Gmelin wrote:
> On Tue, 9 Apr 2013 19:43:15 +0100
> Chris Rees <utisoft at gmail.com> wrote:
>
>
> >
> > No, it's a bug in pkgng; it should respect @cwd.
> >
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 thing
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 plist.
>
> 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:
>
> %%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
>
> IMHO this should be:
>
> %%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
>
Yes Michael you are totally right :)
regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130410/7f2b1a2f/attachment.sig>
More information about the freebsd-ports
mailing list