From dougb@FreeBSD.org  Sat Mar 27 23:55:09 2010
Return-Path: <dougb@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8276106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Mar 2010 23:55:08 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 81E408FC17
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Mar 2010 23:55:08 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2RNt8TA049369
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Mar 2010 23:55:08 GMT
	(envelope-from dougb@freefall.freebsd.org)
Received: (from dougb@localhost)
	by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2RNt8w6049358;
	Sat, 27 Mar 2010 23:55:08 GMT
	(envelope-from dougb)
Message-Id: <201003272355.o2RNt8w6049358@freefall.freebsd.org>
Date: Sat, 27 Mar 2010 23:55:08 GMT
From: Doug Barton <dougb@freebsd.org>
Reply-To: Doug Barton <dougb@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Patch bsd.port.mk remove RC_SUBR and RC_SUBR_SUFFIX
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         145092
>Category:       ports
>Synopsis:       Patch bsd.port.mk remove RC_SUBR and RC_SUBR_SUFFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 28 00:00:22 UTC 2010
>Closed-Date:    Fri Apr 16 07:18:40 UTC 2010
>Last-Modified:  Fri Apr 16 07:20:01 UTC 2010
>Originator:     Doug Barton
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
AAAG
>Environment:
	DNA
>Description:
	The RC_SUBR and RC_SUBR_SUFFIX macros are no longer necessary on
	any supported version of FreeBSD.
>How-To-Repeat:
	DNA
>Fix:
	Apply the following patch:

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.635
diff -u -r1.635 bsd.port.mk
--- bsd.port.mk	5 Feb 2010 21:18:15 -0000	1.635
+++ bsd.port.mk	27 Mar 2010 23:47:12 -0000
@@ -519,8 +519,7 @@
 #				  Implies inclusion of bsd.xorg.mk.
 ##
 # USE_RC_SUBR	- If set, the ports startup/shutdown script uses the common
-#				  routines found in etc/rc.subr and may need to
-#				  depend on the sysutils/rc_subr port.
+#				  routines found in /etc/rc.subr.
 #				  If this is set to a list of files, these files will be
 #				  automatically added to ${SUB_FILES}, some %%VAR%%'s will
 #				  automatically be expanded, they will be installed in
@@ -528,10 +527,8 @@
 # USE_RCORDER	- List of rc.d startup scripts to be called early in the boot
 #				  process. This acts exactly like USE_RC_SUBR except that
 #				  scripts are installed in /etc/rc.d.
-# RC_SUBR		- Set to path of rc.subr.
-#				  Default: ${LOCALBASE}/etc/rc.subr.
-# RC_SUBR_SUFFIX
-#				- Contains the suffix of installed rc.subr scripts.
+#				  Because local rc.d scripts are included in the base rcorder
+#				  this option is not needed unless the port installs in the base.
 ##
 # USE_APACHE	- If set, this port relies on an apache webserver.
 #
@@ -1637,7 +1634,7 @@
 PLIST_REINPLACE+=	dirrmtry stopdaemon rmtry
 PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir %D/\1 2>/dev/null || true!
 PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true!
-PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1${RC_SUBR_SUFFIX} forcestop 2>/dev/null || true!
+PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1 forcestop 2>/dev/null || true!
 
 # kludge to strip trailing whitespace from CFLAGS;
 # sub-configure will not # survive double space
@@ -1867,21 +1864,13 @@
 .endif
 .endif # USE_FAM
 
-.if defined(USE_RC_SUBR) || defined(USE_RCORDER)
-RC_SUBR=	/etc/rc.subr
-SUB_LIST+=	RC_SUBR=${RC_SUBR}
 .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
 SUB_FILES+=	${USE_RC_SUBR}
 .endif
+
 .if defined(USE_RCORDER)
 SUB_FILES+=	${USE_RCORDER}
 .endif
-.if (${OSVERSION} >= 700007 || ${OSVERSION} < 700000)
-RC_SUBR_SUFFIX?=
-.else
-RC_SUBR_SUFFIX?=	.sh
-.endif
-.endif
 
 .if defined(USE_LDCONFIG) && ${USE_LDCONFIG:L} == "yes"
 USE_LDCONFIG=	${PREFIX}/lib
@@ -5944,8 +5933,8 @@
 	@${ECHO_MSG} "===> Installing rc.d startup script(s)"
 	@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
 	@for i in ${USE_RC_SUBR}; do \
-		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}${RC_SUBR_SUFFIX}; \
-		${ECHO_CMD} "etc/rc.d/$${i%.sh}${RC_SUBR_SUFFIX}" >> ${TMPPLIST}; \
+		${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d/$${i%.sh}; \
+		${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
 	done
 .endif
 .else

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Mar 28 00:00:35 UTC 2010 
Responsible-Changed-Why:  
bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145092 
Responsible-Changed-From-To: portmgr->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Mon Apr 12 11:07:13 UTC 2010 
Responsible-Changed-Why:  
Take for exp-run 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145092 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Apr 16 07:15:34 UTC 2010 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145092 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/145092: commit references a PR
Date: Fri, 16 Apr 2010 07:18:37 +0000 (UTC)

 pav         2010-04-16 07:18:28 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.port.mk 
   Log:
   - Desupport RC_SUBR and RC_SUBR_SUFFIX macros, they have been replaced with
     literal "/etc/rc.subr" and "" values.
   
   PR:             ports/145092
   Submitted by:   dougb
   
   Revision  Changes    Path
   1.636     +8 -19     ports/Mk/bsd.port.mk
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
