Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2002 15:47:43 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Neil Blakey-Milner <nbm@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   sysutils/daemontools FreeBSD port update to 0.76
Message-ID:  <20020104154743.A7779@straylight.oblivion.bg>

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

How about the following patch, which updates the daemontools
port to 0.76, successfully tackles DJB's new build infrastructure
and uses a new startup script for svscan, using readproctitle
to display errors?

G'luck,
Peter

-- 
This would easier understand fewer had omitted.

Index: ports/sysutils/daemontools/Makefile
===================================================================
RCS file: /home/ncvs/ports/sysutils/daemontools/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- ports/sysutils/daemontools/Makefile	10 May 2001 07:10:23 -0000	1.9
+++ ports/sysutils/daemontools/Makefile	4 Jan 2002 13:47:05 -0000
@@ -6,14 +6,14 @@
 #
 
 PORTNAME=	daemontools
-PORTVERSION=	0.70
-PORTREVISION=	1
+PORTVERSION=	0.76
 CATEGORIES=	sysutils
 MASTER_SITES=	http://cr.yp.to/daemontools/ \
 		ftp://cr.yp.to/daemontools/
 
 MAINTAINER=	nbm@FreeBSD.org
 
+WRKSRC=		${WRKDIR}/admin/${DISTNAME}/src
 NO_PACKAGE=	"Unsure of djb\'s license"
 
 ALL_TARGET=	it
@@ -24,12 +24,20 @@
 
 post-patch:
 	@echo "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
-	@echo "${CC} -s" > ${WRKSRC}/conf-ld
-	@echo "${PREFIX}" > ${WRKSRC}/conf-home
+	@echo "${CC} ${STRIP}" > ${WRKSRC}/conf-ld
 
 post-build:
 	@${SED} "s!/usr/local/!${PREFIX}/!;s!/var/service!${SERVICEDIR}!g" \
 		${FILESDIR}/${SAMPLERC} > ${WRKDIR}/${SAMPLERC}
+
+do-install:
+	(while read cmd; do \
+		if file ${WRKSRC}/$$cmd | ${GREP} -q "shell script"; then \
+			${INSTALL_SCRIPT} ${WRKSRC}/$$cmd ${PREFIX}/bin; \
+		else \
+			${INSTALL_PROGRAM} ${WRKSRC}/$$cmd ${PREFIX}/bin; \
+		fi \
+	done) < ${WRKSRC}/../package/commands
 
 post-install:
 	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755 \
Index: ports/sysutils/daemontools/distinfo
===================================================================
RCS file: /home/ncvs/ports/sysutils/daemontools/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- ports/sysutils/daemontools/distinfo	27 Apr 2000 21:43:39 -0000	1.2
+++ ports/sysutils/daemontools/distinfo	4 Jan 2002 13:47:05 -0000
@@ -1 +1 @@
-MD5 (daemontools-0.70.tar.gz) = c88e8c5e4453b4df41571f60eaa0baf3
+MD5 (daemontools-0.76.tar.gz) = 1871af2453d6e464034968a0fbcb2bfc
Index: ports/sysutils/daemontools/pkg-plist
===================================================================
RCS file: /home/ncvs/ports/sysutils/daemontools/pkg-plist,v
retrieving revision 1.3
diff -u -r1.3 pkg-plist
--- ports/sysutils/daemontools/pkg-plist	27 Apr 2000 21:43:43 -0000	1.3
+++ ports/sysutils/daemontools/pkg-plist	4 Jan 2002 13:47:05 -0000
@@ -1,9 +1,11 @@
 bin/svscan
+bin/svscanboot
 bin/supervise
 bin/svc
 bin/svok
 bin/svstat
 bin/fghack
+bin/pgrphack
 bin/multilog
 bin/tai64n
 bin/tai64nlocal
@@ -12,3 +14,4 @@
 bin/envuidgid
 bin/envdir
 bin/setlock
+bin/readproctitle
Index: ports/sysutils/daemontools/files/patch-Makefile
===================================================================
RCS file: ports/sysutils/daemontools/files/patch-Makefile
diff -N ports/sysutils/daemontools/files/patch-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ports/sysutils/daemontools/files/patch-Makefile	4 Jan 2002 13:47:05 -0000
@@ -0,0 +1,26 @@
+--- Makefile.old	Fri Aug 31 15:16:47 2001
++++ Makefile	Fri Aug 31 15:17:04 2001
+@@ -82,10 +82,9 @@
+ chkshsgr.o: chkshsgr.c compile
+ 	./compile chkshsgr.c
+ 
+-choose: choose.sh home warn-auto.sh
++choose: choose.sh warn-auto.sh
+ 	rm -f choose
+ 	cat warn-auto.sh choose.sh \
+-	| sed s}HOME}"`head -1 home`"}g \
+ 	> choose
+ 	chmod 555 choose
+ 
+@@ -387,10 +386,9 @@
+ pathexec.h str.h strerr.h svscan.c wait.h
+ 	./compile svscan.c
+ 
+-svscanboot: home svscanboot.sh warn-auto.sh
++svscanboot: svscanboot.sh warn-auto.sh
+ 	rm -f svscanboot
+ 	cat warn-auto.sh svscanboot.sh \
+-	| sed s}HOME}"`head -1 home`"}g \
+ 	> svscanboot
+ 	chmod 555 svscanboot
+ 
Index: ports/sysutils/daemontools/files/patch-supervise.c
===================================================================
RCS file: ports/sysutils/daemontools/files/patch-supervise.c
diff -N ports/sysutils/daemontools/files/patch-supervise.c
--- ports/sysutils/daemontools/files/patch-supervise.c	10 May 2001 07:10:24 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-diff -urN supervise.c supervise.c
---- supervise.c	Mon Mar  6 07:21:09 2000
-+++ supervise.c	Mon Apr 23 11:15:10 2001
-@@ -90,7 +90,12 @@
- void trystart(void)
- {
-   int f;
-+  static int firstpassed = 0;
- 
-+  if (firstpassed)
-+    sleep(1);
-+  else
-+    firstpassed = 1;
-   switch(f = fork()) {
-     case -1:
-       strerr_warn4(WARNING,"unable to fork for ",dir,", sleeping 60 seconds: ",&strerr_sys);
-@@ -105,7 +110,6 @@
-   pid = f;
-   pidchange();
-   announce();
--  sleep(1);
- }
- 
- void doit(void)
Index: ports/sysutils/daemontools/files/svscan.sh.sample
===================================================================
RCS file: /home/ncvs/ports/sysutils/daemontools/files/svscan.sh.sample,v
retrieving revision 1.1
diff -u -r1.1 svscan.sh.sample
--- ports/sysutils/daemontools/files/svscan.sh.sample	22 Jun 2000 09:22:15 -0000	1.1
+++ ports/sysutils/daemontools/files/svscan.sh.sample	4 Jan 2002 13:47:05 -0000
@@ -31,4 +31,5 @@
 #ulimit -s ${MINSEGMENT}
 #ulimit -u ${MAXCHILD}
 
-exec /bin/csh -cf '/usr/local/bin/svscan /var/service &'
+exec /bin/csh -cf '/usr/local/bin/svscan /var/service |& '\
+'/usr/local/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &'

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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