aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2010-01-06 19:07:54 +0800
committerroam <roam@FreeBSD.org>2010-01-06 19:07:54 +0800
commit67c71975bbcaaafdf6c0dd7d5ea892ebf7b863b0 (patch)
tree654f864161695e34a394b9fe54f6bbb702c040ae
parent5d89d3fa42197f2f8627cb3b3d599949b1a6044f (diff)
downloadfreebsd-ports-gnome-67c71975bbcaaafdf6c0dd7d5ea892ebf7b863b0.tar.gz
freebsd-ports-gnome-67c71975bbcaaafdf6c0dd7d5ea892ebf7b863b0.tar.zst
freebsd-ports-gnome-67c71975bbcaaafdf6c0dd7d5ea892ebf7b863b0.zip
Fix another instance of replacing %%DAEMON%% with /usr/sbin/daemon,
somehow missed by dougb - still, thanks for doing it :) However, drop the -f option to daemon - with both readproctitle and multilog, we definitely do *not* want to lose svscan's output. While I'm here, restore the spirit of the STARTUP_SCRIPT functionality removed in pgollucci's rc.subr change by introducing the S_NORMAL and S_EARLY option knobs and modifying the startup script's REQUIRE and BEFORE settings accordingly. Add short descriptive headers to the patches and bump PORTREVISION for the real changes. Reported by: Valentin Zahariev <curly@e-card.bg> (the daemon part)
-rw-r--r--sysutils/daemontools/Makefile22
-rw-r--r--sysutils/daemontools/files/patch-Makefile9
-rw-r--r--sysutils/daemontools/files/rts-skip.patch9
-rw-r--r--sysutils/daemontools/files/svscan.in7
4 files changed, 39 insertions, 8 deletions
diff --git a/sysutils/daemontools/Makefile b/sysutils/daemontools/Makefile
index fa0761467457..c0012435572c 100644
--- a/sysutils/daemontools/Makefile
+++ b/sysutils/daemontools/Makefile
@@ -7,7 +7,7 @@
PORTNAME= daemontools
PORTVERSION= 0.76
-PORTREVISION= 13
+PORTREVISION= 14
CATEGORIES= sysutils
MASTER_SITES= http://cr.yp.to/daemontools/ \
ftp://cr.yp.to/daemontools/
@@ -17,11 +17,31 @@ MAINTAINER= roam@FreeBSD.org
COMMENT= Service monitoring and logging utilities by djb
OPTIONS= MAN "Install Gerrit Pape's manual pages" on \
+ S_EARLY "Start early, before the normal daemons" off \
+ S_NORMAL "Start normally in the usual boot sequence" on \
SIGQ12 "Add svc support for QUIT, USR1, and USR2 signals" off \
TESTS "Run the test suite, fails on NFS-mounted workdir" on
.include <bsd.port.pre.mk>
+.if defined(WITH_S_EARLY)
+. if defined(WITH_S_NORMAL)
+IGNORE= Exactly one of S_EARLY and S_NORMAL must be specified.
+. else
+SVSCAN_REQUIRE?= SERVERS
+SVSCAN_BEFORE?= DAEMON
+. endif
+.else
+. if defined(WITH_S_NORMAL)
+SVSCAN_REQUIRE?= LOGIN
+SVSCAN_BEFORE?=
+. else
+IGNORE= Either S_EARLY or S_NORMAL must be specified.
+. endif
+.endif
+
+SUB_LIST+= SVSCAN_REQUIRE=${SVSCAN_REQUIRE} SVSCAN_BEFORE=${SVSCAN_BEFORE}
+
.if !defined(WITHOUT_MAN)
MANDATE= -20010714
MASTER_SITES+= http://smarden.org/pape/djb/manpages/:1
diff --git a/sysutils/daemontools/files/patch-Makefile b/sysutils/daemontools/files/patch-Makefile
index 4b4939a1f7b3..a1e61deedeb5 100644
--- a/sysutils/daemontools/files/patch-Makefile
+++ b/sysutils/daemontools/files/patch-Makefile
@@ -1,5 +1,10 @@
---- Makefile.old Fri Aug 31 15:16:47 2001
-+++ Makefile Fri Aug 31 15:17:04 2001
+Description: Do not use the "home" file, FreeBSD has a different mechanism.
+Forwarded: not-needed
+Author: Peter Pentchev <roam@FreeBSD.org>
+Last-Update: 2010-01-06
+
+--- Makefile.orig
++++ Makefile
@@ -82,10 +82,9 @@
chkshsgr.o: chkshsgr.c compile
./compile chkshsgr.c
diff --git a/sysutils/daemontools/files/rts-skip.patch b/sysutils/daemontools/files/rts-skip.patch
index 3dfd0efc6d01..6bb85083ede4 100644
--- a/sysutils/daemontools/files/rts-skip.patch
+++ b/sysutils/daemontools/files/rts-skip.patch
@@ -1,5 +1,10 @@
---- Makefile.old 2007-10-30 12:18:08.000000000 +0200
-+++ Makefile 2007-10-30 12:18:16.000000000 +0200
+Description: Skip the run-time test suite if requested by the port options.
+Forwarded: not-needed
+Author: Peter Pentchev <roam@FreeBSD.org>
+Last-Update: 2010-01-05
+
+--- Makefile.orig
++++ Makefile
@@ -264,7 +264,7 @@
rts: envdir envuidgid fghack matchtest multilog pgrphack \
readproctitle rts.tests setlock setuidgid softlimit supervise svc \
diff --git a/sysutils/daemontools/files/svscan.in b/sysutils/daemontools/files/svscan.in
index f9f91a1a6a20..4b1c194167cb 100644
--- a/sysutils/daemontools/files/svscan.in
+++ b/sysutils/daemontools/files/svscan.in
@@ -4,7 +4,8 @@
#
# PROVIDE: svscan
-# REQUIRE: LOGIN
+# REQUIRE: %%SVSCAN_REQUIRE%%
+# BEFORE: %%SVSCAN_BEFORE%%
# Define these svscan_* variables in one of these files:
# /etc/rc.conf
@@ -84,11 +85,11 @@ svscan_start () {
EP="/usr/bin/env \
PATH=%%PREFIX%%/sbin:%%PREFIX%%/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [ -z "${svscan_logdir}" ]; then
- ${EP} /usr/sbin/daemon -f /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null
+ ${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 | %%PREFIX%%/bin/readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................ &" > /dev/null
else
logmax=${svscan_logmax+s$svscan_logmax}
lognum=${svscan_lognum+n$svscan_lognum}
- ${EP} %%DAEMON%% /bin/sh -c "$command $svscan_servicedir 2>&1 \
+ ${EP} /usr/sbin/daemon /bin/sh -c "$command $svscan_servicedir 2>&1 \
| %%PREFIX%%/bin/multilog t $logmax $lognum '${svscan_logdir}' &" > /dev/null
fi
}