Hello all, update for sysutils/runit to v2.1.1. Tested on i386, 5.2-RELEASE and -current.
Changelog for the diff: - Update to v2.1.1. - Upstream changed service directory to /service from /var/service. - Add rc.d(8) script. - Remove files/rc.shutdown sample; functionality merged in rc.d script. - Document upstream and port changes in pkg/MESSAGE. - Remove USE_GROFF. - Add license as comment. diff -Naur /usr/ports/sysutils/runit/Makefile /usr/ports/mystuff/sysutils/runit/Makefile --- /usr/ports/sysutils/runit/Makefile Mon Nov 29 23:11:46 2010 +++ /usr/ports/mystuff/sysutils/runit/Makefile Sat Nov 24 18:34:18 2012 @@ -2,16 +2,16 @@ COMMENT= daemontools alike replacement for init -DISTNAME= runit-1.7.2 -REVISION= 0 +DISTNAME= runit-2.1.1 CATEGORIES= sysutils - HOMEPAGE= http://www.smarden.org/runit/ +# BSD3 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes + WANTLIB= c MASTER_SITES= ${HOMEPAGE} @@ -28,7 +28,6 @@ upgrade.html useinit.html index.html utmpset.8.html DOCS2= CHANGES README COPYING THANKS EXAMPLES= etc/2 etc/openbsd/1 etc/openbsd/3 etc/openbsd/ctrlaltdel -USE_GROFF = Yes pre-build: echo "${CC} ${CFLAGS} ${COPTS}" > ${WRKSRC}/conf-cc @@ -44,7 +43,6 @@ .for pgm in ${SBINPROGRAMS} ${INSTALL_PROGRAM} ${WRKDIST}/command/${pgm} ${PREFIX}/sbin/ .endfor - ${INSTALL_SCRIPT} ${WRKDIST}/etc/2 ${PREFIX}/sbin/runsvdir-start .for page in ${MANPAGES} ${INSTALL_MAN} ${WRKDIST}/man/${page} ${PREFIX}/man/man8 .endfor @@ -56,7 +54,6 @@ ${INSTALL_DATA} ${WRKDIST}/package/${doc} ${PREFIX}/share/doc/runit/ .endfor ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/runit - ${INSTALL_DATA} ${FILESDIR}/rc.shutdown ${PREFIX}/share/examples/runit/ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/runit/init .for file in ${EXAMPLES} ${INSTALL_DATA} ${WRKDIST}/${file} ${PREFIX}/share/examples/runit/init/ diff -Naur /usr/ports/sysutils/runit/distinfo /usr/ports/mystuff/sysutils/runit/distinfo --- /usr/ports/sysutils/runit/distinfo Thu Apr 5 20:26:12 2007 +++ /usr/ports/mystuff/sysutils/runit/distinfo Sat Nov 24 18:21:10 2012 @@ -1,5 +1,2 @@ -MD5 (runit-1.7.2.tar.gz) = NUSOlxiFRJFPKYyIhxq5hA== -RMD160 (runit-1.7.2.tar.gz) = szd8Nc3xrfUNMNxGo/Y8c9SDrkg= -SHA1 (runit-1.7.2.tar.gz) = W40TUf6C/1xUcXkjXt4f2xkL6MM= -SHA256 (runit-1.7.2.tar.gz) = zJEEH/jvsyN2Owc9VLpuvvZQKEu9GJPJrxmW/FaAnf4= -SIZE (runit-1.7.2.tar.gz) = 102942 +SHA256 (runit-2.1.1.tar.gz) = /88tJ7MvWawU8tSwdyo+uA2TQmhaIEK3+7xHLAfPKiw= +SIZE (runit-2.1.1.tar.gz) = 109661 diff -Naur /usr/ports/sysutils/runit/files/rc.shutdown /usr/ports/mystuff/sysutils/runit/files/rc.shutdown --- /usr/ports/sysutils/runit/files/rc.shutdown Tue Dec 26 17:04:54 2006 +++ /usr/ports/mystuff/sysutils/runit/files/rc.shutdown Thu Jan 1 02:00:00 1970 @@ -1,6 +0,0 @@ -# Stop runit services - -echo -n 'Waiting for services to stop...' -/usr/local/sbin/sv -w196 force-stop /var/service/* -/usr/local/sbin/sv exit /var/service/* - diff -Naur /usr/ports/sysutils/runit/pkg/MESSAGE /usr/ports/mystuff/sysutils/runit/pkg/MESSAGE --- /usr/ports/sysutils/runit/pkg/MESSAGE Tue Dec 26 17:04:55 2006 +++ /usr/ports/mystuff/sysutils/runit/pkg/MESSAGE Sat Nov 24 18:30:36 2012 @@ -1,10 +1,7 @@ -You will need to add +With this version, this port uses rc.d(8). To start it on boot add +'runsvdir' to pkg_scripts. - csh -cf '${PREFIX}/sbin/runsvdir-start &' - -to /etc/rc.local in order to have runit start at boot. - -The service directory has moved from /service to /var/service. +The service directory has moved back to /service from /var/service. With this version the runsvctrl, runsvstat, svwaitdown, and svwaitup programs no longer are being installed. The functionality of these diff -Naur /usr/ports/sysutils/runit/pkg/PLIST /usr/ports/mystuff/sysutils/runit/pkg/PLIST --- /usr/ports/sysutils/runit/pkg/PLIST Tue Dec 26 17:04:55 2006 +++ /usr/ports/mystuff/sysutils/runit/pkg/PLIST Sat Nov 24 18:21:32 2012 @@ -8,16 +8,15 @@ @man man/man8/sv.8 @man man/man8/svlogd.8 @man man/man8/utmpset.8 -sbin/chpst -sbin/runit -sbin/runit-init -sbin/runsv -sbin/runsvchdir -sbin/runsvdir -sbin/runsvdir-start -sbin/sv -sbin/svlogd -sbin/utmpset +@bin sbin/chpst +@bin sbin/runit +@bin sbin/runit-init +@bin sbin/runsv +@bin sbin/runsvchdir +@bin sbin/runsvdir +@bin sbin/sv +@bin sbin/svlogd +@bin sbin/utmpset share/doc/runit/ share/doc/runit/CHANGES share/doc/runit/COPYING @@ -51,4 +50,5 @@ share/examples/runit/init/getty-ttyC4/ share/examples/runit/init/getty-ttyC4/finish share/examples/runit/init/getty-ttyC4/run -share/examples/runit/rc.shutdown +@rcscript ${RCDIR}/runsvdir +@sample /var/service/ diff -Naur /usr/ports/sysutils/runit/pkg/runsvdir.rc /usr/ports/mystuff/sysutils/runit/pkg/runsvdir.rc --- /usr/ports/sysutils/runit/pkg/runsvdir.rc Thu Jan 1 02:00:00 1970 +++ /usr/ports/mystuff/sysutils/runit/pkg/runsvdir.rc Sat Nov 24 18:21:32 2012 @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $OpenBSD$ + +daemon="${TRUEPREFIX}/sbin/runsvdir" +daemon_flags="-P /service \'log: ......................................\ +.......................................................................\ +.......................................................................\ +.......................................................................\ +.......................................................................\ +.......................................................................\ +..\'" + +. /etc/rc.d/rc.subr + +rc_bg=YES +rc_reload=NO + +rc_pre() { + install -d /service + PATH=/command:$PATH +} + +rc_stop() { + ${TRUEPREFIX}/sbin/sv -w196 force-stop /service/* + ${TRUEPREFIX}/sbin/sv exit /service/* + pkill -f "^${pexp}" +} + +rc_cmd $1 -- Manolis Tzanidakis http://mtzanidakis.com/ mtzanidakis[at]gmail[dot]com