ports/90107: cvsd imprisoned doesn't work with devfs

Simon Barner barner at FreeBSD.org
Tue Dec 27 15:00:22 UTC 2005


The following reply was made to PR ports/90107; it has been noted by GNATS.

From: Simon Barner <barner at FreeBSD.org>
To: Simon Barner <barner at FreeBSD.org>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: ports/90107: cvsd imprisoned doesn't work with devfs
Date: Tue, 27 Dec 2005 15:56:12 +0100

 This probably needs to be converted to the new rc.d world order.
 Here are the patches that Walter sent me. Sorry, I didn't notice that the
 haven't been in the audit trail of the PR.
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/devel/cvsd/Makefile,v
 retrieving revision 1.35
 diff -u -r1.35 Makefile
 --- Makefile	29 Aug 2005 02:39:02 -0000	1.35
 +++ Makefile	27 Dec 2005 14:48:48 -0000
 @@ -34,6 +34,12 @@
  		sbin/cvsd sbin/cvsd-buginfo sbin/cvsd-buildroot sbin/cvsd-passwd
  PLIST_DIRS=	etc/cvsd
  
 +.include <bsd.port.pre.mk>
 +
 +.if ${OSVERSION} >= 600000
 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cvsd.init.in
 +.endif
 +
  do-install:
  	${INSTALL_PROGRAM} ${WRKSRC}/cvsd ${PREFIX}/sbin/cvsd
  .for FILE in cvsd-buginfo cvsd-buildroot cvsd-passwd
 @@ -54,4 +60,4 @@
  .endif
  	@${CAT} ${PKGMESSAGE}
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 Index: files/extra-patch-cvsd.init.in
 ===================================================================
 RCS file: files/extra-patch-cvsd.init.in
 diff -N files/extra-patch-cvsd.init.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/extra-patch-cvsd.init.in	27 Dec 2005 14:50:21 -0000
 @@ -0,0 +1,29 @@
 +--- cvsd.init.in.orig	Sat Jun 25 17:27:00 2005
 ++++ cvsd.init.in	Tue Dec 13 09:26:01 2005
 +@@ -31,6 +31,7 @@
 + [ -f "$CVSD_CFG" ] || exit 6
 + 
 + PIDFILE=`sed -n 's/^ *PidFile *\([^ ]*\) *$/\1/p' < $CVSD_CFG`
 ++JAIL=`sed -n 's/^ *RootJail *\([^ ]*\) *$/\1/p' < $CVSD_CFG`
 + 
 + # find the flavor of the echo command (stolen from configure)
 + case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
 +@@ -42,6 +43,10 @@
 + 
 + case "$1" in
 + start)
 ++  mount -t devfs devfs $JAIL/dev
 ++  devfs -m $JAIL/dev rule apply hide
 ++  devfs -m $JAIL/dev rule apply path null unhide
 ++  devfs -m $JAIL/dev rule apply path zero unhide
 +   echo $ECHO_N "Starting $DESC: cvsd$ECHO_C"
 +   if [ -n "$PIDFILE" ] && [ -f "$PIDFILE" ] && \
 +      kill -s 0 `cat $PIDFILE` > /dev/null 2>&1
 +@@ -72,6 +77,7 @@
 +     echo " unable to stop, no PidFile!"
 +     exit 1
 +   fi
 ++  umount $JAIL/dev
 +   ;;
 + restart|force-reload)
 +   $0 stop



More information about the freebsd-ports-bugs mailing list