From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jan 2 09:31:29 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5142116A4CE for ; Fri, 2 Jan 2004 09:31:29 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 693A543D60 for ; Fri, 2 Jan 2004 09:30:51 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i02HUJFR068224 for ; Fri, 2 Jan 2004 09:30:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i02HUJQF068223; Fri, 2 Jan 2004 09:30:19 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 2 Jan 2004 09:30:19 -0800 (PST) Resent-Message-Id: <200401021730.i02HUJQF068223@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sunpoet Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13CEE16A4D1 for ; Fri, 2 Jan 2004 09:22:45 -0800 (PST) Received: from IRIS.sunpoet.net (sunpoet.net [203.204.205.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E84143D48 for ; Fri, 2 Jan 2004 09:22:38 -0800 (PST) (envelope-from sunpoet@IRIS.sunpoet.net) Received: by IRIS.sunpoet.net (Postfix, from userid 1000) id 7611F17045; Sat, 3 Jan 2004 01:22:37 +0800 (CST) Message-Id: <20040102172237.7611F17045@IRIS.sunpoet.net> Date: Sat, 3 Jan 2004 01:22:37 +0800 (CST) From: Sunpoet To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/60827: [patch] RC_SUBR/USE_RC_SUBR in bsd.port.mk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Sunpoet List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2004 17:31:29 -0000 >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: