From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 9 15:13:58 2005 Return-Path: X-Original-To: freebsd-ports-bugs@FreeBSD.org Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40CF316A41F; Fri, 9 Dec 2005 15:13:58 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from e0-a11.b1.lan.prg.vol.cz (e0-a11.b1.lan.prg.vol.cz [195.122.204.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D04D43D7D; Fri, 9 Dec 2005 15:13:09 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from pav.hide.vol.cz (localhost [127.0.0.1]) by e0-a11.b1.lan.prg.vol.cz (8.13.4/8.13.4) with ESMTP id jB9FD2RY032051; Fri, 9 Dec 2005 16:13:02 +0100 (CET) (envelope-from pav@FreeBSD.org) Received: (from pav@localhost) by pav.hide.vol.cz (8.13.4/8.13.4/Submit) id jB9FD1Ja032050; Fri, 9 Dec 2005 16:13:01 +0100 (CET) (envelope-from pav@FreeBSD.org) X-Authentication-Warning: pav.hide.vol.cz: pav set sender to pav@FreeBSD.org using -f From: Pav Lucistnik To: Ion-Mihai Tetcu In-Reply-To: <20051209165102.7b5bf038@it.buh.tecnik93.com> References: <200512090922.jB99MYbH094744@freefall.freebsd.org> <20051209143235.79632f96@it.buh.tecnik93.com> <1134131789.28991.24.camel@pav.hide.vol.cz> <20051209150907.1725f4c9@it.buh.tecnik93.com> <1134134096.28991.27.camel@pav.hide.vol.cz> <20051209153510.5182ebe2@it.buh.tecnik93.com> <1134135523.28991.30.camel@pav.hide.vol.cz> <20051209165102.7b5bf038@it.buh.tecnik93.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 09 Dec 2005 16:13:00 +0100 Message-Id: <1134141180.31489.3.camel@pav.hide.vol.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Cc: freebsd-ports-bugs@FreeBSD.org, dougb@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: ports/90070: [MAINTAINER] mail/rabl_server: per sougb request, use "new style" RC script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pav@FreeBSD.org List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2005 15:13:58 -0000 > > > In the end we should have only new-style RCng scripts > > > (files/rc_script.in) whit ports setting USE_RC_SUBR= rc_script.in, > > > installed as such on HEAD (and sometime on 6-STABLE) and .sh added > > > for older OSVERSIONs. > > > > Other way around, leave USE_RC_SUBR=skript.sh and files/skript.sh.in, > > to avoid repo churn, and strip .sh when installing on newer > > OSVERSIONs. > > And end up with an other "historical" rule. (Q: Why are rc scripts > named .sh.in and installed w/o .sh ? A: In the past scripts used to be > sourced in a sub-shell if they had .sh .... ). And not all scripts are > apt to be installed w/o .sh (I didn't check and I don't know if they > would run and rcorder and fiends don't choke on them since they have > no keywords, maybe doug can tell us). So we have to choose between what is right and what is easy. Let's go with the hard solution then. > Testing the actual patch for bsd.port.mk is easy, > just define OSVERSION=700xx after including bsd.port.pre.mk in port's > Makefile. Turns out that existing code is aware of .sh/non-.sh scripts and deals with them, so, what about diff -a -u -r1.518 bsd.port.mk --- bsd.port.mk 8 Nov 2005 09:02:51 -0000 1.518 +++ bsd.port.mk 9 Dec 2005 15:12:11 -0000 @@ -4952,11 +4952,18 @@ .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES" @${ECHO_CMD} "===> Installing rcNG startup script(s)" @${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST} +.if ${OSVERSION} > 700006 + @for i in ${USE_RC_SUBR}; do \ + ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}; \ + ${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ + done +.else @for i in ${USE_RC_SUBR}; do \ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}.sh; \ ${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \ done .endif +.endif .else @${DO_NADA} .endif Content of USE_RC_SUBR can be either script.sh or script, both works. -- Pav Lucistnik You can't expect to wield supreme executive power just 'cause some watery tart threw a sword at you.