Date: Sat, 3 Jan 2004 01:22:37 +0800 (CST) From: Sunpoet <sunpoet@sunpoet.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/60827: [patch] RC_SUBR/USE_RC_SUBR in bsd.port.mk Message-ID: <20040102172237.7611F17045@IRIS.sunpoet.net> Resent-Message-ID: <200401021730.i02HUJQF068223@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60827 >Category: ports >Synopsis: [patch] RC_SUBR/USE_RC_SUBR in bsd.port.mk >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 02 09:30:19 PST 2004 >Closed-Date: >Last-Modified: >Originator: Sunpoet Po-Chuan Hsieh >Release: FreeBSD 5.2-CURRENT i386 >Organization: none >Environment: System: FreeBSD IRIS.sunpoet.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Dec 21 18:12:22 CST 2003 root@:/usr/obj/usr/src/sys/sunpoet i386 >Description: Since RC_SUBR (rcNG) support was added in ports/Mk/bsd.port.mk after rev. 1.463, ports which depends on rcNG may use USE_RC_SUBR to enable rcNG support easily. But for FreeBSD 5.x users, they have /etc/rc.subr already. bsd.port.mk adds sysutils/rc_subr to the list of run dependencies (RUN_DEPENDS) without checking the existence of /etc/rc.subr. It defines ${RC_SUBR} as ${LOCALBASE}/etc/rc.subr and user may not set ${RC_SUBR} to any other values, e.g. /etc/rc.subr. In this patch, it checks if /etc/rc.subr exists first. If so, it skips adding RUN_DEPENDS. Users who wish to use other rcNG scripts may set ${RC_SUBR} to the corresponding path. Note if the scripts is absent, bsd.port.mk adds run dependency on sysutils/rc_subr as usual. >How-To-Repeat: Run "make run-depends-list" in any port directories which defines USE_RC_SUBR=yes in the Makefile, e.g. security/cyrus-sasl2-saslauthd. It depends on sysutils/rc_subr while running. After applying the patch, it doesn't need sysutils/rc_subr. % cd /usr/ports/security/cyrus-sasl2-saslauthd % grep USE_RC_SUBR= Makefile USE_RC_SUBR= YES % make run-depends-list /usr/ports/databases/db41 /usr/ports/security/cyrus-sasl2 /usr/ports/sysutils/rc_subr ### patching /usr/ports/Mk/bsd.port.mk ### % make run-depends-list /usr/ports/databases/db41 /usr/ports/security/cyrus-sasl2 >Fix: % diff -u bsd.port.mk.orig bsd.port.mk --- bsd.port.mk.orig Mon Nov 24 09:08:41 2003 +++ bsd.port.mk Sat Jan 3 00:28:10 2004 @@ -1530,8 +1530,13 @@ .endif .if defined(USE_RC_SUBR) +.if !defined(RC_SUBR) +RC_SUBR= /etc/rc.subr +.endif +.if !exists(${RC_SUBR}) RUN_DEPENDS+= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr RC_SUBR= ${LOCALBASE}/etc/rc.subr +.endif .endif .if defined(USE_LINUX) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040102172237.7611F17045>