aboutsummaryrefslogtreecommitdiff
path: root/sysutils/s6
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2015-02-23 22:14:11 +0000
committerPawel Pekala <pawel@FreeBSD.org>2015-02-23 22:14:11 +0000
commitd544f310ebee458a3c04ef6dfff30d5f7ccbee61 (patch)
tree35bfe5a475380974d7b591998d414430dc0fe3fb /sysutils/s6
parent70e0e535db1c045b2deab023853c1bbceecd3bd1 (diff)
downloadports-d544f310ebee458a3c04ef6dfff30d5f7ccbee61.tar.gz
ports-d544f310ebee458a3c04ef6dfff30d5f7ccbee61.zip
Notes
Diffstat (limited to 'sysutils/s6')
-rw-r--r--sysutils/s6/Makefile55
-rw-r--r--sysutils/s6/distinfo2
-rw-r--r--sysutils/s6/files/s6-svscan-log_run.in6
-rw-r--r--sysutils/s6/files/s6-svscan_env_PATH.in1
-rw-r--r--sysutils/s6/files/s6-svscan_finish.in2
-rw-r--r--sysutils/s6/files/s6-svscanboot.in14
-rw-r--r--sysutils/s6/files/s6.in51
-rw-r--r--sysutils/s6/pkg-descr5
-rw-r--r--sysutils/s6/pkg-plist151
9 files changed, 287 insertions, 0 deletions
diff --git a/sysutils/s6/Makefile b/sysutils/s6/Makefile
new file mode 100644
index 000000000000..e09e523530e8
--- /dev/null
+++ b/sysutils/s6/Makefile
@@ -0,0 +1,55 @@
+# Created by: Colin Booth <colin@heliocat.net>
+# $FreeBSD$
+
+PORTNAME= s6
+PORTVERSION= 2.1.1.1
+CATEGORIES= sysutils
+MASTER_SITES= http://www.skarnet.org/software/${PORTNAME}/
+
+MAINTAINER= colin@heliocat.net
+COMMENT= skarnet.org supervision suite
+
+LICENSE= ISCL
+
+BUILD_DEPENDS= skalibs>=2.3.0.0:${PORTSDIR}/devel/skalibs \
+ execline>=2.0.2.1:${PORTSDIR}/lang/execline
+RUN_DEPENDS= execlineb:${PORTSDIR}/lang/execline
+
+USES= gmake
+USE_RC_SUBR= s6
+SERVICE_DIR?= /var/service
+SUB_FILES= s6-svscan_finish s6-svscan-log_run s6-svscanboot s6-svscan_env_PATH
+SUB_LIST= SERVICE_DIR="${SERVICE_DIR}"
+
+DOCS= AUTHORS COPYING INSTALL README doc/*.html
+
+USE_LDCONFIG= yes
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+=--prefix=${PREFIX} \
+ --with-default-path=${LOCALBASE}/bin:/usr/bin:/bin \
+ --with-include=${LOCALBASE}/include \
+ --with-lib=${LOCALBASE}/lib/skalibs \
+ --with-lib=${LOCALBASE}/lib/execline \
+ --enable-shared
+
+OPTIONS_DEFINE= DOCS
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/*
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libs6.so.${PORTVERSION}
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/s6lockd-helper
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_MAN} ${DOCS} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKDIR} && ${INSTALL_SCRIPT} s6-svscanboot \
+ ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${ETCDIR}/s6-svscan/env
+ cd ${WRKDIR} && ${INSTALL_SCRIPT} s6-svscan_finish \
+ ${STAGEDIR}${ETCDIR}/s6-svscan/finish.sample
+ cd ${WRKDIR} && ${INSTALL_DATA} s6-svscan_env_PATH \
+ ${STAGEDIR}${ETCDIR}/s6-svscan/env/PATH.sample
+ @${MKDIR} ${STAGEDIR}${ETCDIR}/s6-svscan-log
+ cd ${WRKDIR} && ${INSTALL_SCRIPT} s6-svscan-log_run \
+ ${STAGEDIR}${ETCDIR}/s6-svscan-log/run.sample
+
+.include <bsd.port.mk>
diff --git a/sysutils/s6/distinfo b/sysutils/s6/distinfo
new file mode 100644
index 000000000000..0ffb4927079d
--- /dev/null
+++ b/sysutils/s6/distinfo
@@ -0,0 +1,2 @@
+SHA256 (s6-2.1.1.1.tar.gz) = 857c841cb80935a945347c768981b729f11a6a441140744f58f3e3316b9ef336
+SIZE (s6-2.1.1.1.tar.gz) = 180033
diff --git a/sysutils/s6/files/s6-svscan-log_run.in b/sysutils/s6/files/s6-svscan-log_run.in
new file mode 100644
index 000000000000..ed75acfd1d4a
--- /dev/null
+++ b/sysutils/s6/files/s6-svscan-log_run.in
@@ -0,0 +1,6 @@
+#!%%LOCALBASE%%/bin/execlineb -P
+redirfd -w 2 /dev/console
+redirfd -rnb 0 fifo
+s6-setuidgid nobody
+exec -c
+s6-log -bt /tmp/uncaught-logs
diff --git a/sysutils/s6/files/s6-svscan_env_PATH.in b/sysutils/s6/files/s6-svscan_env_PATH.in
new file mode 100644
index 000000000000..3f164d86fe84
--- /dev/null
+++ b/sysutils/s6/files/s6-svscan_env_PATH.in
@@ -0,0 +1 @@
+%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin:/usr/bin:/bin:/usr/sbin:/sbin
diff --git a/sysutils/s6/files/s6-svscan_finish.in b/sysutils/s6/files/s6-svscan_finish.in
new file mode 100644
index 000000000000..92d0db3370a7
--- /dev/null
+++ b/sysutils/s6/files/s6-svscan_finish.in
@@ -0,0 +1,2 @@
+#!%%LOCALBASE%%/bin/execlineb -P
+foreground { echo "\ns6 is clear" }
diff --git a/sysutils/s6/files/s6-svscanboot.in b/sysutils/s6/files/s6-svscanboot.in
new file mode 100644
index 000000000000..68553c7e0ef2
--- /dev/null
+++ b/sysutils/s6/files/s6-svscanboot.in
@@ -0,0 +1,14 @@
+#!%%LOCALBASE%%/bin/execlineb -S0
+define SCANROOT $1
+%%LOCALBASE%%/bin/exec -c
+%%LOCALBASE%%/bin/foreground {
+%%LOCALBASE%%/bin/if -n {
+/bin/test -p ${SCANROOT}/s6-svscan-log/fifo }
+mkfifo -m 0622 ${SCANROOT}/s6-svscan-log/fifo
+}
+%%LOCALBASE%%/bin/foreground { /usr/sbin/chown nobody:nogroup ${SCANROOT}/s6-svscan-log/fifo }
+%%LOCALBASE%%/bin/redirfd -wnb 1 ${SCANROOT}/s6-svscan-log/fifo
+%%LOCALBASE%%/bin/fdmove -c 2 1
+%%PREFIX%%/bin/s6-envdir -I ${SCANROOT}/.s6-svscan/env
+%%LOCALBASE%%/bin/exec -a s6-svscan
+%%PREFIX%%/bin/s6-svscan -t0 ${SCANROOT}
diff --git a/sysutils/s6/files/s6.in b/sysutils/s6/files/s6.in
new file mode 100644
index 000000000000..a62d31d51616
--- /dev/null
+++ b/sysutils/s6/files/s6.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: /service
+# BEFORE: SERVERS
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable `s6':
+#
+#s6_enable="YES" (default: NO)
+#s6_path="/service" (default: %%SERVICE_DIR%%)
+#
+
+. /etc/rc.subr
+
+name=s6
+rcvar=s6_enable
+
+load_rc_config s6
+
+: ${s6_enable:=NO}
+: ${s6_path:=%%SERVICE_DIR%%}
+
+s6_log=${s6_path}/s6-svscan-log
+s6_svc=${s6_path}/.s6-svscan
+
+command="%%PREFIX%%/bin/s6-svscanboot"
+start_cmd=s6_start
+stop_cmd="%%PREFIX%%/bin/s6-svscanctl -t ${s6_path}"
+stop_postcmd="%%PREFIX%%/bin/s6-svc -k ${s6_log}/"
+
+s6_start()
+{
+ /bin/test -d ${s6_path} || /bin/mkdir -p ${s6_path}
+ /bin/test -L ${s6_log} || /bin/ln -sh %%PREFIX%%/etc/s6/s6-svscan-log \
+ ${s6_log}
+ /bin/test -L ${s6_svc} || /bin/ln -sh %%PREFIX%%/etc/s6/s6-svscan \
+ ${s6_svc}
+ /usr/bin/env -i \
+ PATH=/command:%%PREFIX%%/sbin:%%PREFIX%%/bin:/sbin:/bin:/usr/sbin:/usr/bin \
+ /usr/sbin/daemon \
+ ${command} ${s6_path}
+}
+
+s6_stop()
+{
+ ${stop_cmd}
+}
+
+run_rc_command $1
diff --git a/sysutils/s6/pkg-descr b/sysutils/s6/pkg-descr
new file mode 100644
index 000000000000..f523541d7614
--- /dev/null
+++ b/sysutils/s6/pkg-descr
@@ -0,0 +1,5 @@
+s6 is a small suite of programs for UNIX, designed to allow process
+supervision (a.k.a service supervision), in the line of daemontools and
+runit.
+
+WWW: http://www.skarnet.org/software/s6/
diff --git a/sysutils/s6/pkg-plist b/sysutils/s6/pkg-plist
new file mode 100644
index 000000000000..842a5e951493
--- /dev/null
+++ b/sysutils/s6/pkg-plist
@@ -0,0 +1,151 @@
+bin/s6-accessrules-cdb-from-fs
+bin/s6-accessrules-fs-from-cdb
+bin/s6-cleanfifodir
+bin/s6-connlimit
+bin/s6-envdir
+bin/s6-envuidgid
+bin/s6-fdholder-daemon
+bin/s6-fdholder-delete
+bin/s6-fdholder-deletec
+bin/s6-fdholder-getdump
+bin/s6-fdholder-getdumpc
+bin/s6-fdholder-list
+bin/s6-fdholder-listc
+bin/s6-fdholder-retrieve
+bin/s6-fdholder-retrievec
+bin/s6-fdholder-setdump
+bin/s6-fdholder-setdumpc
+bin/s6-fdholder-store
+bin/s6-fdholder-storec
+bin/s6-fdholder-transferdump
+bin/s6-fdholder-transferdumpc
+bin/s6-fdholderd
+bin/s6-fghack
+bin/s6-ftrig-listen
+bin/s6-ftrig-listen1
+bin/s6-ftrig-notify
+bin/s6-ftrig-wait
+bin/s6-ftrigrd
+bin/s6-ioconnect
+bin/s6-ipcclient
+bin/s6-ipcserver
+bin/s6-ipcserver-access
+bin/s6-ipcserver-socketbinder
+bin/s6-ipcserverd
+bin/s6-log
+bin/s6-mkfifodir
+bin/s6-notifywhenup
+bin/s6-setlock
+bin/s6-setsid
+bin/s6-softlimit
+bin/s6-sudo
+bin/s6-sudoc
+bin/s6-sudod
+bin/s6-supervise
+bin/s6-svc
+bin/s6-svlisten
+bin/s6-svlisten1
+bin/s6-svok
+bin/s6-svscan
+bin/s6-svscanboot
+bin/s6-svscanctl
+bin/s6-svstat
+bin/s6-svwait
+bin/s6-tai64n
+bin/s6-tai64nlocal
+bin/s6lockd
+bin/ucspilogd
+@sample %%ETCDIR%%/s6-svscan-log/run.sample
+@sample %%ETCDIR%%/s6-svscan/env/PATH.sample
+@sample %%ETCDIR%%/s6-svscan/finish.sample
+include/s6/accessrules.h
+include/s6/config.h
+include/s6/ftrigr.h
+include/s6/ftrigw.h
+include/s6/s6-fdholder.h
+include/s6/s6-supervise.h
+include/s6/s6.h
+include/s6/s6lock.h
+lib/libs6.so
+lib/libs6.so.2
+lib/libs6.so.2.1
+lib/libs6.so.2.1.1
+lib/libs6.so.2.1.1.1
+lib/s6/libs6.a
+libexec/s6lockd-helper
+sbin/s6-applyuidgid
+sbin/s6-setuidgid
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/fifodir.html
+%%PORTDOCS%%%%DOCSDIR%%/ftrig.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/localservice.html
+%%PORTDOCS%%%%DOCSDIR%%/notifywhenup.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-accessrules-cdb-from-fs.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-accessrules-fs-from-cdb.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-applyuidgid.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-cleanfifodir.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-connlimit.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-envdir.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-envuidgid.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-daemon.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-delete.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-deletec.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-errorcodes.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-getdump.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-getdumpc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-list.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-listc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-retrieve.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-retrievec.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-setdump.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-setdumpc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-store.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-storec.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-transferdump.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholder-transferdumpc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fdholderd.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-fghack.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ftrig-listen.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ftrig-listen1.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ftrig-notify.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ftrig-wait.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ioconnect.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ipcclient.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ipcserver-access.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ipcserver-socketbinder.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ipcserver.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-ipcserverd.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-log.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-mkfifodir.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-notifywhenup.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-setlock.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-setsid.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-setuidgid.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-softlimit.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-sudo.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-sudoc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-sudod.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-supervise.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svc.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svlisten.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svlisten1.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svok.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svscan-1.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svscan-not-1.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svscan.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svscanctl.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svstat.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-svwait.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-tai64n.html
+%%PORTDOCS%%%%DOCSDIR%%/s6-tai64nlocal.html
+%%PORTDOCS%%%%DOCSDIR%%/scandir.html
+%%PORTDOCS%%%%DOCSDIR%%/servicedir.html
+%%PORTDOCS%%%%DOCSDIR%%/socket-activation.html
+%%PORTDOCS%%%%DOCSDIR%%/systemd.html
+%%PORTDOCS%%%%DOCSDIR%%/ucspilogd.html
+%%PORTDOCS%%%%DOCSDIR%%/upgrade.html
+%%PORTDOCS%%%%DOCSDIR%%/why.html