Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2001 10:36:06 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Sean Chittenden <sean@chittenden.org>
Cc:        Neil Blakey-Milner <nbm@FreeBSD.org>, freebsd-ports@FreeBSD.org, freebsd-alpha@FreeBSD.org
Subject:   Re: sysutils/daemontools FreeBSD port update to 0.76
Message-ID:  <20010903103606.D72833@ringworld.oblivion.bg>
In-Reply-To: <20010902113530.B42588@rand.tgd.net>; from sean@chittenden.org on Sun, Sep 02, 2001 at 11:35:30AM -0700
References:  <20010901165256.A2365@ringworld.oblivion.bg> <20010902113530.B42588@rand.tgd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[CC'd to -alpha because of build/run problems on beast, any Alpha users
 running 4.4-RC and willing to help test a last-minute port update
 please have patience and read on..]

On Sun, Sep 02, 2001 at 11:35:30AM -0700, Sean Chittenden wrote:
> > The attached patch updates the daemontools port to 0.76.
> > My machine has been running with it for the past few days,
> > and everything seems to be working fine so far.
> 
> 	Excellent!

Thanks :)

> > The one drawback I see is that this deviates from DJB's instructions
> > by not using the svscanboot script for svscan startup, and consequently,
> > not running readproctitle for the ability to glance quickly at svscan's
> > error output.  svscanboot, however, has a hardcoded path for /service,
> > and is therefore slightly inferior to our own svscan.sh :)
> > 
> > Should I try to modify svscan.sh to run readproctitle, or modify
> > svscanboot to honor a variable /service path, or just leave it
> > the way it is
> 
> 	Modify svscan.sh and svscanboot?  Given that most FreeBSD folks
> will probably use svscan.sh (haven't seen an exception yet), I'd put
> that as the higher priority.  If you patch svscanboot, then that'd be
> icing one the cake, but not as useful as the modified svscan.sh.  
> Leaving things as is would cause a world of problems, IMHO.  Having 
> svscan work out of the box is what people expect and they don't 
> necessarily care how it works (and if they do, then they're probably 
> wise/experienced enough to figure it out).  Maybe a pkg-message is in 
> order?

Okay, that's what the attached patch does.  Feel free to test it,
but please read on before really using it in a production environment.

> > (which would incur DJB's wrath when problems are
> > reported back, lacking readproctitle's output..) ?
> 
> 	Blah, his crankiness is his own fault: don't cater to it.

That was my personal opinion, too; however, this would become a problem
for the users of the FreeBSD port who go to his mailing lists to ask
a question for the first time..  So, see the attached updated patch.

> > Should any of this be committed before 4.4 hits the streets? :)
> 
> 	Most certainly!  ;)  -sc

Unfortunately, there seems to be a bit of a problem when running this
on an Alpha running -current :(  It compiles fine on beast.FreeBSD.org,
however, when the Makefile tries to run the regression test suite,
supervise bombs.  This looks more like a build toolchain error to me
than anything else, but I would not risk committing this so close to
the ports freeze without somebody actually testing the build - AND
correct operation - of daemontools-0.76 on a 4.4-RC Alpha.

Anyone out there?  Do y'all have an Alpha running 4.4-RC?
Could anyone test this, and see if the build hangs when it tries
to run the rts script?  If it does, does it do it the same way
it does on beast - supervise reporting an EOPNOTSUPP when trying to
obtain a lock on the test.sv/supervise/lock file?

./compile tai64nlocal.c
./load tai64nlocal unix.a byte.a
env - /bin/sh rts.tests 2>&1 | cat -v > rts
^C*** rts removed

[roam@beast ~/tmp/daemontools]$ cd work/admin/daemontools-0.76/src/rts-tmp
[roam@beast ~/tmp/daemontools/work/admin/daemontools-0.76/src/rts-tmp]$ ../supervise test.sv
supervise: fatal: unable to acquire test.sv/supervise/lock: operation not supported
[roam@beast ~/tmp/daemontools/work/admin/daemontools-0.76/src/rts-tmp]$ file test.sv/supervise/lock
test.sv/supervise/lock: empty
[roam@beast ~/tmp/daemontools/work/admin/daemontools-0.76/src/rts-tmp]$ ls -l test.sv/supervise/lock
-rw-------  1 roam  roam  0 Sep  3 00:30 test.sv/supervise/lock
[roam@beast ~/tmp/daemontools/work/admin/daemontools-0.76/src/rts-tmp]$

The EOPNOTSUPP certainly looks weird; it seems the flock() call in
lock_exnb.c is returning EOPNOTSUPP, when fd is the fdlock variable
that supervise.c::main() has previously obtained by an open() on
the test.sv/supervise/lock file.

Ideas, anyone?

G'luck,
Peter

-- 
If this sentence didn't exist, somebody would have invented it.

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	2001/05/10 07:10:23	1.9
+++ ports/sysutils/daemontools/Makefile	2001/09/03 07:35:06
@@ -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	2000/04/27 21:43:39	1.2
+++ ports/sysutils/daemontools/distinfo	2001/09/03 07:35:06
@@ -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	2000/04/27 21:43:43	1.3
+++ ports/sysutils/daemontools/pkg-plist	2001/09/03 07:35:06
@@ -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: patch-Makefile
diff -N patch-Makefile
--- ports/sysutils/daemontools/files/patch-Makefile	Mon Sep  3 00:03:03 2001
+++ ports/sysutils/daemontools/files/patch-Makefile	Mon Sep  3 00:35:06 2001
@@ -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: patch-supervise.c
diff -N patch-supervise.c
--- ports/sysutils/daemontools/files/patch-supervise.c	Mon Sep  3 00:35:06 2001
+++ ports/sysutils/daemontools/files/patch-supervise.c	Mon Sep  3 00:03:03 2001
@@ -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	2000/06/22 09:22:15	1.1
+++ ports/sysutils/daemontools/files/svscan.sh.sample	2001/09/03 07:35:06
@@ -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-alpha" in the body of the message




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