Date: Thu, 02 May 2013 20:29:05 +0200 From: Oliver Heesakkers <freebsd@heesakkers.info> To: freebsd-ports@freebsd.org Cc: =?utf-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= <lukasz@wasikowski.net> Subject: Re: [BRAINSTORM] shebang fixing framework Message-ID: <3801459.Q9n94ffT6F@pcoliver.heesakkers.info> In-Reply-To: <518276B1.80000@wasikowski.net> References: <20130430103821.GJ3577@ithaqua.etoilebsd.net> <1786370.b1sXK5t6Pv@pcoliver.heesakkers.info> <518276B1.80000@wasikowski.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Op do 02 mei 2013 16:22:41 schreef =C5=81ukasz W=C4=85sikowski: > W dniu 2013-05-01 21:18, Oliver Heesakkers pisze: > > Op di 30 apr 2013 12:38:21 schreef Baptiste Daroussin: > >> For a while now: http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dport= s/51152 > >> we > >> are looking for a framework/helpers to help patching scripts sheba= ng so > >> that they fit where the interpreters is on FreeBSD. > >=20 > > (...) > >=20 > > In there you wrote a patch using /usr/bin/env. Why not stick with t= hat? > > I'm > > quite fond of this technique as it's clean and portable. > >=20 > > Portability might not be that important when working on a fix for p= orts > > alone, but still makes sense to me. >=20 > /usr/bin/env is not good in all the situation. Look at > www.freebsd.org/cgi/query-pr.cgi?pr=3D177481 - /usr/bin/env is not wo= rking > when using 'service' to start daemons. We should change PATH used by > 'service' to include /usr/local/bin and /usr/local/sbin or stop using= > /usr/bin/env to start rc.d scripts. A question that arises from reading that pr is why service doesn't incl= ude=20 /usr/local/bin and /usr/local/sbin in its PATH, if it does your problem= would=20 probably dissapear. But your problem shouldn't have existed in the first place. I have no /usr/bin/perl symlink, in the pure-ftpd port directory I do: make extract head -n1 work/pure-ftpd-1.0.36/configuration-file/pure-config.pl.in #! @PERL@ After installation the shebang reads: #! /usr/local/bin/perl and I can use service to start or stop the daemon without any hacking.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3801459.Q9n94ffT6F>