ports/132274: [patch] Mk/bsd.port.mk: Revert USE_RC_SUBR changes made in revision 1.555

Scot Hetzel swhetzel at gmail.com
Tue Mar 3 04:00:10 UTC 2009


>Number:         132274
>Category:       ports
>Synopsis:       [patch] Mk/bsd.port.mk: Revert USE_RC_SUBR changes made in revision 1.555
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 03 04:00:09 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Scot Hetzel
>Release:        8.0-CURRENT
>Organization:
>Environment:
>Description:
Revision 1.555 had removed an important feature of USE_RC_SUBR.

This feature was the ability to install the sysutils/rc_subr port when an incompatible change was made to /etc/rc.subr.

The sysutils/rc_subr port was designed to allow older systems to use scripts written for the current rc.subr version.

Without this capability rc.d scripts will have to be written to work on older systems.

One change I made was to add WANT_RC_SUBR_PORT.  This variable can be used to force the use of the sysutils/rc_subr port.
>How-To-Repeat:
In the future when an incompatible change/new feature is made or added to /etc/rc.subr, and a ports rc.d script has been update to use theses changes.  The ports rc.d script will fail to work properly on the older system.
>Fix:
Apply the attached patch

Patch attached with submission follows:

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.611
diff -u -r1.611 bsd.port.mk
--- bsd.port.mk	23 Feb 2009 12:53:48 -0000	1.611
+++ bsd.port.mk	3 Mar 2009 03:16:54 -0000
@@ -1747,7 +1747,19 @@
 .endif # USE_FAM
 
 .if defined(USE_RC_SUBR) || defined(USE_RCORDER)
+# Update when an incompatilbe change is made to /etc/rc.subr. Requires an
+# update to sysutils/rc_subr with the new rc.subr script.  This allows older
+# systems to use scripts designed for newer systems.
+.if ${OSVERSION} < 500037
+WANT_RC_SUBR_PORT=	yes
+.endif
+
+.if defined(WANT_RC_SUBR_PORT)
+RUN_DEPENDS+=	${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
+RC_SUBR=	${LOCALBASE}/etc/rc.subr
+.else
 RC_SUBR=	/etc/rc.subr
+.endif
 SUB_LIST+=	RC_SUBR=${RC_SUBR}
 .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
 SUB_FILES+=	${USE_RC_SUBR}


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list