Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2007 04:21:44 GMT
From:      Dave Grochowski <malus.x@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/116966: Update port: security/sfs
Message-ID:  <200710060421.l964LiOE041507@www.freebsd.org>
Resent-Message-ID: <200710060430.l964U1Ms088800@freefall.freebsd.org>

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

>Number:         116966
>Category:       ports
>Synopsis:       Update port: security/sfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 06 04:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Dave Grochowski
>Release:        7.0-CURRENT
>Organization:
Lockheed Martin
>Environment:
FreeBSD wanderer 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sat Sep 22 00:38:37 EDT 2007     root@wanderer:/usr/obj/usr/src/sys/WANDERER  i386
>Description:
- Fix build for sfsrwcd for real this time.
- Convert rc scripts to the new style.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN security/sfs.orig/Makefile security/sfs/Makefile
--- security/sfs.orig/Makefile	2007-10-05 20:26:48.000000000 -0400
+++ security/sfs/Makefile	2007-10-06 00:12:12.000000000 -0400
@@ -8,7 +8,7 @@
 
 PORTNAME=	sfs
 PORTVERSION=	0.7.2
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	security net
 MASTER_SITES=	http://www.fs.net/sfswww/dist/
 
@@ -19,6 +19,8 @@
 
 INFO=		sfs
 
+USE_RC_SUBR=	sfscd sfssd
+
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--with-sfsuser=sfs \
@@ -65,8 +67,6 @@
 		vidb.8
 
 post-extract:
-	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/sfscd.sh > ${WRKSRC}/sfscd.sh
-	@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/sfssd.sh > ${WRKSRC}/sfssd.sh
 	@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(C|h)" -print0 | \
 		${XARGS} -0 ${REINPLACE_CMD} -e 's/template get/get/'
 
@@ -107,7 +107,7 @@
 		${WRKSRC}/sfsrwsd/client.C
 
 post-configure:
-	@${REINPLACE_CMD} -e 's/^LIBTOOL =/#LIBTOOL =/' \
+	@${REINPLACE_CMD} -e 's/^NOPAGING =.*$$/NOPAGING =/' \
 		${WRKSRC}/sfsrwcd/Makefile
 
 pre-install:
@@ -115,8 +115,6 @@
 
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/sfsauthd/upgradedb.pl ${PREFIX}/lib/sfs-${PORTVERSION}/upgradedb.pl
-	${INSTALL_SCRIPT} ${WRKSRC}/sfscd.sh ${PREFIX}/etc/rc.d/sfscd.sh.sample
-	${INSTALL_SCRIPT} ${WRKSRC}/sfssd.sh ${PREFIX}/etc/rc.d/sfssd.sh.sample
 	${MKDIR} ${PREFIX}/etc/sfs
 	${INSTALL_DATA} ${FILESDIR}/etc-sfsrwsd_config.sample ${PREFIX}/etc/sfs/sfsrwsd_config.sample
 	${MKDIR} ${PREFIX}/share/doc/sfs
diff -urN security/sfs.orig/files/sfscd.in security/sfs/files/sfscd.in
--- security/sfs.orig/files/sfscd.in	1969-12-31 19:00:00.000000000 -0500
+++ security/sfs/files/sfscd.in	2007-10-05 23:46:17.000000000 -0400
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $FreeBSD: $
+#
+# PROVIDE: sfscd
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable the sfscd daemon:
+#
+# sfscd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=sfscd
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+stop_cmd=stop_cmd
+
+stop_cmd() {
+	echo "Stopping ${name}"
+
+	users_mounts=`mount | awk '/^@.* on \./ { print $1 }'`
+
+	if [ -n $user_mounts] ; then
+		`echo $users_mounts | xargs umount -f`
+	fi
+	
+	if [ -d /sfs/.mnt ] ; then
+		for dir in /sfs/.mnt/*; do
+			umount -f $dir
+		done
+
+		umount -f /sfs
+	fi
+
+	pkill -9 nfsmounter
+}
+
+# set defaults
+sfscd_enable=${sfscd_enable:-"NO"}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -urN security/sfs.orig/files/sfscd.sh security/sfs/files/sfscd.sh
--- security/sfs.orig/files/sfscd.sh	2007-10-05 20:26:48.000000000 -0400
+++ security/sfs/files/sfscd.sh	1969-12-31 19:00:00.000000000 -0500
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-PIDFILE=/var/run/sfscd.pid
-
-case "$1" in
-start)
-	[ -x %%PREFIX%%/sbin/sfscd ] && %%PREFIX%%/sbin/sfscd && echo -n ' sfscd'
-	;;
-stop)
-	[ -r $PIDFILE ] && kill -TERM `cat $PIDFILE` && echo -n ' sfscd'
-	;;
-*)
-	echo "Usage: `basename $0` {start|stop}" >&2
-	;;
-esac
-
-exit 0
diff -urN security/sfs.orig/files/sfssd.in security/sfs/files/sfssd.in
--- security/sfs.orig/files/sfssd.in	1969-12-31 19:00:00.000000000 -0500
+++ security/sfs/files/sfssd.in	2007-10-05 23:58:19.000000000 -0400
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD: $
+#
+# PROVIDE: sfssd
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable the sfssd daemon:
+#
+# sfssd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=sfssd
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+
+# set defaults
+sfssd_enable=${sfssd_enable:-"NO"}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -urN security/sfs.orig/files/sfssd.sh security/sfs/files/sfssd.sh
--- security/sfs.orig/files/sfssd.sh	2007-10-05 20:26:48.000000000 -0400
+++ security/sfs/files/sfssd.sh	1969-12-31 19:00:00.000000000 -0500
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-PIDFILE=/var/run/sfssd.pid
-
-case "$1" in
-start)
-	[ -x %%PREFIX%%/sbin/sfssd ] && %%PREFIX%%/sbin/sfssd && echo -n ' sfssd'
-	;;
-stop)
-	[ -r $PIDFILE ] && kill -TERM `cat $PIDFILE` && echo -n ' sfssd'
-	;;
-*)
-	echo "Usage: `basename $0` {start|stop}" >&2
-	;;
-esac
-
-exit 0
diff -urN security/sfs.orig/pkg-plist security/sfs/pkg-plist
--- security/sfs.orig/pkg-plist	2007-10-05 20:26:48.000000000 -0400
+++ security/sfs/pkg-plist	2007-10-05 23:58:58.000000000 -0400
@@ -7,10 +7,8 @@
 bin/sfskey
 bin/sfsproac
 bin/ssu
-@unexec if [ -f %D/etc/rc.d/sfscd.sh ]; then cmp -s %D/etc/rc.d/sfscd.sh.sample %D/etc/rc.d/sfscd.sh && rm -f %D/etc/rc.d/sfscd.sh || echo "${PKG_PREFIX}/etc/rc.d/sfscd.sh is different than distribution sample, leaving for manual cleanup." | fmt; fi
-etc/rc.d/sfscd.sh.sample
-@unexec if [ -f %D/etc/rc.d/sfssd.sh ]; then cmp -s %D/etc/rc.d/sfssd.sh.sample %D/etc/rc.d/sfssd.sh && rm -f %D/etc/rc.d/sfssd.sh || echo "${PKG_PREFIX}/etc/rc.d/sfssd.sh is different than distribution sample, leaving for manual cleanup." | fmt; fi
-etc/rc.d/sfssd.sh.sample
+etc/rc.d/sfscd
+etc/rc.d/sfssd
 etc/sfs/sfsrwsd_config.sample
 include/sfs
 include/sfs.h


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



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