Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2012 12:33:15 -0700
From:      Jason Helfman <jgh@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        sumikawa@FreeBSD.org
Subject:   ports/170678: [PATCH] net/zebra: allow for tuning of zebractl, use optionsNG
Message-ID:  <1345145595.452418.21877.nullmailer@experts-exchange.com>
Resent-Message-ID: <201208161940.q7GJeBgT093227@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170678
>Category:       ports
>Synopsis:       [PATCH] net/zebra: allow for tuning of zebractl, use optionsNG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 16 19:40:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jason Helfman
>Release:        FreeBSD 8.3-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD dormouse.experts-exchange.com 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:23:18 UTC
>Description:
This patch introduces the ability to use arguments for different zebra services. Default is "-d"
Also updated to optionsNG.

I've renamed LIBPAM to PAM (shared description), and just defined the description.

May want to consider adding others within this port to shared descriptions, as well, so others
may use the descriptions.

Port maintainer (sumikawa@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:

--- zebra-0.95a_2.patch begins here ---

Index: files/zebractl.in
===================================================================
--- files/zebractl.in	(revision 302652)
+++ files/zebractl.in	(working copy)
@@ -24,17 +24,17 @@
 			exit 1
 		fi
 		[ -f %%ETCDIR%%/zebra.conf ] \
-			&& %%PREFIX%%/sbin/zebra -d && echo -n ' zebra'
+			&& %%PREFIX%%/sbin/zebra %%ZEBRAARGS%% && echo -n ' zebra'
 		[ -f %%ETCDIR%%/ripd.conf ] \
-			&& %%PREFIX%%/sbin/ripd -d && echo -n ' ripd'
+			&& %%PREFIX%%/sbin/ripd %%RIPDARGS%% && echo -n ' ripd'
 		[ -f %%ETCDIR%%/ripngd.conf ] \
-			&& %%PREFIX%%/sbin/ripngd -d && echo -n ' ripngd'
+			&& %%PREFIX%%/sbin/ripngd %%RIPNGDARGS%% && echo -n ' ripngd'
 		[ -f %%ETCDIR%%/ospfd.conf ] \
-			&& %%PREFIX%%/sbin/ospfd -d && echo -n ' ospfd'
+			&& %%PREFIX%%/sbin/ospfd %%OSPFDARGS%% && echo -n ' ospfd'
 		[ -f %%ETCDIR%%/ospf6d.conf ] \
-			&& %%PREFIX%%/sbin/ospf6d -d && echo -n ' ospf6d'
+			&& %%PREFIX%%/sbin/ospf6d %%OSPF6DARGS%% && echo -n ' ospf6d'
 		[ -f %%ETCDIR%%/bgpd.conf ] \
-			&& %%PREFIX%%/sbin/bgpd -d && echo -n ' bgpd'
+			&& %%PREFIX%%/sbin/bgpd %%BGPDARGS%% && echo -n ' bgpd'
 		;;
 
 	stop)
Index: Makefile
===================================================================
--- Makefile	(revision 302652)
+++ Makefile	(working copy)
@@ -21,67 +21,83 @@
 CONFLICTS=	openbgpd-[0-9]* quagga-[0-9]* quagga-re-[0-9]* openospfd-[0-9]*
 
 SUB_FILES=	pkg-message zebractl
+SUB_LIST=	BGPDARGS=${BGPDARGS} \
+		OSPFDARGS=${OSPFDARGS} \
+		OSPF6DARGS=${OSPFDARGS} \
+		RIPDARGS=${RIPDARGS} \
+		RIPNGDARGS=${RIPNGDARGS} \
+		ZEBRAARGS=${ZEBRAARGS}
 USE_SUBMAKE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=	--sysconfdir=${PREFIX}/etc/zebra
 SCRIPTS_ENV=	WRKDIRPREFIX=${WRKDIRPREFIX}
 
-OPTIONS=	IPV6 "enable IPv6 support" on \
-		LIBPAM "enable PAM authentication for vtysh" off \
-		OSPFNSSA "turn on undergoing NSSA feature" off \
-		SNMP "enable SNMP support" off \
-		TCPZEBRA "enable TCP/IP socket connection" off \
-		BGPD "enable BGPD" on \
-		OSPF6D "enable OSPF6D" on \
-		OSPFD "enable OSPFD" on \
-		RIPD "enable RIPD" on \
-		RIPNGD "enable RIPNGD" on \
-		VTYSH "enable VTYSH" on
+OPTIONS_DEFINE=	IPV6 PAM OSPFNSSA SNMP TCPZEBRA BGPD OSPF6D OSPFD RIPD RIPNGD VTYSH 
 
+PAM_DESC=	PAM authentication for vtysh
+OSPFNSSA_DESC=	undergoing NSSA feature
+TCPZEBRA_DESC=	TCP/IP socket connection
+BGPD_DESC=	BGPD support
+OSPF6D_DESC=	OSPF6D support
+OSPFD_DESC=	OSPFD support
+RIPD_DESC=	RIPD support
+RIPNGD_DESC=	RIPNGD support
+VTYSH_DESC=	VTYSH support
+
+OPTIONS_DEFAULT=	IPV6 BGPD OSPF6D OSPFD RIPD RIPNGD VTYSH
+NO_OPTIONS_SORT=	yes
+
 MAN1=		vtysh.1
 MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
 INFO=		zebra
 
+BGPDARGS?=	-d
+OSPFDARGS?=	-d
+OSPF6DARGS?=	-d
+RIPDARGS?=	-d
+RIPNGDARGS?=	-d
+ZEBRAARGS?=	-d
+
 .include <bsd.port.options.mk>
 
-.if defined (WITHOUT_IPV6)
+.if empty(PORT_OPTIONS:MIPV6)
 CONFIGURE_ARGS+=--disable-ipv6
 WITHOUT_OSPF6D=	yes
 WITHOUT_RIPNGD=	yes
 .endif
 
-.if defined (WITH_LIBPAM)
+.if ${PORT_OPTIONS:MPAM}
 CONFIGURE_ARGS+=--with-libpam
 .endif
 
-.if defined (WITH_OSPFNSSA)
+.if ${PORT_OPTIONS:MOSPFNSSA}
 CONFIGURE_ARGS+=--enable-nssa
 .endif
 
-.if defined (WITH_SNMP)
+.if ${PORT_OPTIONS:MSNMP}
 CONFIGURE_ARGS+=--enable-snmp
 LIB_DEPENDS+=snmp.4:${PORTSDIR}/net-mgmt/net-snmp4:install
 .endif
 
-.if defined (WITH_TCPZEBRA)
+.if ${PORT_OPTIONS:MTCPZEBRA}
 CONFIGURE_ARGS+=--enable-tcp-zebra
 .endif
 
-.if !defined(WITHOUT_BGPD)
+.if ${PORT_OPTIONS:MBGPD}
 PLIST_SUB+=	BGPD=""
 .else
 CONFIGURE_ARGS+=--disable-bgpd
 PLIST_SUB+=	BGPD="@comment "
 .endif
 
-.if !defined(WITHOUT_OSPF6D)
+.if ${PORT_OPTIONS:MOSPF6D}
 PLIST_SUB+=	OSPF6D=""
 .else
 CONFIGURE_ARGS+=--disable-ospf6d
 PLIST_SUB+=	OSPF6D="@comment "
 .endif
 
-.if !defined(WITHOUT_OSPFD)
+.if ${PORT_OPTIONS:MOSPFD}
 PLIST_SUB+=	OSPF6D=""
 PLIST_SUB+=	OSPFD=""
 .else
@@ -89,21 +105,21 @@
 PLIST_SUB+=	OSPFD="@comment "
 .endif
 
-.if !defined(WITHOUT_RIPD)
+.if ${PORT_OPTIONS:MRIPD}
 PLIST_SUB+=	RIPD=""
 .else
 CONFIGURE_ARGS+=--disable-ripd
 PLIST_SUB+=	RIPD="@comment "
 .endif
 
-.if !defined(WITHOUT_RIPNGD)
+.if ${PORT_OPTIONS:MRIPNGD}
 PLIST_SUB+=	RIPNGD=""
 .else
 CONFIGURE_ARGS+=--disable-ripngd
 PLIST_SUB+=	RIPNGD="@comment "
 .endif
 
-.if !defined(WITHOUT_VTYSH)
+.if ${PORT_OPTIONS:MVTYSH)
 PLIST_SUB+=	VTYSH=""
 CONFIGURE_ARGS+=--enable-vtysh
 .else
--- zebra-0.95a_2.patch ends here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1345145595.452418.21877.nullmailer>