ports/152718: Add user serviceable knobs to port sysutils/pdsh

Christopher Shumway cshumway at titan-project.org
Tue Nov 30 21:20:11 UTC 2010


>Number:         152718
>Category:       ports
>Synopsis:       Add user serviceable knobs to port sysutils/pdsh
>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:   Tue Nov 30 21:20:11 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Christopher Shumway
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD titan.titan-project.org 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #0: Tue Sep 21 20:12:06 PDT 2010     cshumway at titan.titan-project.org:/usr/obj/usr/src/sys/TITAN  amd64
>Description:
Add some user serviceable knobs on the port sysutils/pdsh.  Namely:

SSH support
DSH groups support
NIS Netgroup support
GNU Readline support
Disable RSH support by default (but adjustable)

Update pkg-plist based on selected options.

Sorry, this undoes some of the work in ports/152681, guess we where both working on it concurrently.

>How-To-Repeat:

>Fix:
cd /usr/ports && patch < /path/to/attached.patch


Patch attached with submission follows:

--- sysutils/pdsh/Makefile.orig	2010-11-30 12:55:01.000000000 -0800
+++ sysutils/pdsh/Makefile	2010-11-30 12:58:18.000000000 -0800
@@ -16,11 +16,57 @@
 
 LICENSE=	GPLv2
 
-CONFIGURE_ARGS=	--with-ssh
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
 USE_PERL5_BUILD=yes
 
+OPTIONS=	SSH		"Enable SSH support" On \
+		DSHGROUPS	"Enable DSH groups" On \
+		NETGROUP	"Enable NIS Netgroup support" Off \
+		READLINE	"Enable GNU readline support" Off \
+		RSH		"Enable RSH support" Off 
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_SSH)
+CONFIGURE_ARGS+=	--with-ssh
+PLIST_SUB+=		SSH=""
+.else
+CONFIGURE_ARGS+=	--without-ssh
+PLIST_SUB+=		SSH="@comment "
+.endif
+
+.if defined(WITH_DSHGROUPS)
+CONFIGURE_ARGS+=	--with-dshgroups
+PLIST_SUB+=		DSH=""
+.else
+CONFIGURE_ARGS+=	--without-dshgroups
+PLIST_SUB+=		DSH="@comment "
+.endif
+
+.if defined(WITH_NETGROUP)
+CONFIGURE_ARGS+=	--with-netgroup
+PLIST_SUB+=		NETGROUP=""
+.else
+CONFIGURE_ARGS+=	--without-netgroup
+PLIST_SUB+=		NETGROUP="@comment "
+.endif
+
+.if defined(WITH_READLINE)
+CONFIGURE_ARGS+=	--with-readline
+LIB_DEPENDS+=		readline:${PORTSDIR}/devel/readline
+.else
+CONFIGURE_ARGS+=	--without-readline
+.endif
+
+.if defined(WITH_RSH)
+CONFIGURE_ARGS+=	--with-rsh
+PLIST_SUB+=		RSH=""
+.else
+CONFIGURE_ARGS+=	--without-rsh
+PLIST_SUB+=		RSH="@comment "
+.endif
+
 MAN1=		dshbak.1 pdcp.1 pdsh.1
 MLINKS=		pdcp.1 rpdcp.1
 
--- sysutils/pdsh/pkg-plist.orig	2010-11-30 12:55:08.000000000 -0800
+++ sysutils/pdsh/pkg-plist	2010-11-30 12:59:26.000000000 -0800
@@ -6,10 +6,16 @@
 lib/pdsh/execcmd.a
 lib/pdsh/execcmd.la
 lib/pdsh/execcmd.so
-lib/pdsh/sshcmd.a
-lib/pdsh/sshcmd.la
-lib/pdsh/sshcmd.so
-lib/pdsh/xrcmd.a
-lib/pdsh/xrcmd.la
-lib/pdsh/xrcmd.so
+%%DSH%%lib/pdsh/dshgroup.a
+%%DSH%%lib/pdsh/dshgroup.la
+%%DSH%%lib/pdsh/dshgroup.so
+%%NETGROUP%%lib/pdsh/netgroup.a
+%%NETGROUP%%lib/pdsh/netgroup.la
+%%NETGROUP%%lib/pdsh/netgroup.so
+%%SSH%%lib/pdsh/sshcmd.a
+%%SSH%%lib/pdsh/sshcmd.la
+%%SSH%%lib/pdsh/sshcmd.so
+%%RSH%%lib/pdsh/xrcmd.a
+%%RSH%%lib/pdsh/xrcmd.la
+%%RSH%%lib/pdsh/xrcmd.so
 @dirrm lib/pdsh


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



More information about the freebsd-ports-bugs mailing list