From owner-freebsd-ports@FreeBSD.ORG Thu May 2 18:29:10 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 1515C84C for ; Thu, 2 May 2013 18:29:10 +0000 (UTC) (envelope-from freebsd@heesakkers.info) Received: from server4.ohos.nl (server4.ohos.nl [IPv6:2a00:d880:0:6::c951:214d]) by mx1.freebsd.org (Postfix) with ESMTP id D236C1F11 for ; Thu, 2 May 2013 18:29:09 +0000 (UTC) Received: from [2001:470:1f15:1555::2] (helo=pcoliver.heesakkers.info) by server4.ohos.nl with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1UXyFd-000Hlm-92; Thu, 02 May 2013 20:29:07 +0200 From: Oliver Heesakkers To: freebsd-ports@freebsd.org Subject: Re: [BRAINSTORM] shebang fixing framework Date: Thu, 02 May 2013 20:29:05 +0200 Message-ID: <3801459.Q9n94ffT6F@pcoliver.heesakkers.info> User-Agent: KMail/4.10.1 (FreeBSD/9.1-RELEASE-p1; KDE/4.10.1; amd64; ; ) In-Reply-To: <518276B1.80000@wasikowski.net> References: <20130430103821.GJ3577@ithaqua.etoilebsd.net> <1786370.b1sXK5t6Pv@pcoliver.heesakkers.info> <518276B1.80000@wasikowski.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: =?utf-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= 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: Thu, 02 May 2013 18:29:10 -0000 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.