Skip site navigation (1)Skip section navigation (2)
Date:      15 Jul 2003 21:08:48 -0000
From:      Sergei Kolobov <sergei@kolobov.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        David Thiel <lx@redundancy.redundancy.org>
Subject:   ports/54513: [NEW PORT] sysutils/runit: A init scheme with service supervision
Message-ID:  <20030715210848.7683.qmail@kolobov.com>
Resent-Message-ID: <200307152110.h6FLAKMl004310@freefall.freebsd.org>

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

>Number:         54513
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/runit: A init scheme with service supervision
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 15 14:10:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergei Kolobov
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD elf.chetwood.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Tue Jul 15 17:02:55 MSD 2003
>Description:
runit is daemontools replacement:
- service supervision
- clean process state
- reliable logging facility
- fast system bootup and shutdown
- packaging friendly
- small code size

It can optionally replace init(8) as process 1.

Author:	Gerrit Pape <pape@smarden.org>
WWW:	http://smarden.org/runit/

Supercedes:	ports/54228
>How-To-Repeat:
>Fix:

--- runit.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	runit
#	runit/pkg-descr
#	runit/distinfo
#	runit/Makefile
#	runit/pkg-plist
#	runit/files
#	runit/files/runsvdir.sh.in
#
echo c - runit
mkdir -p runit > /dev/null 2>&1
echo x - runit/pkg-descr
sed 's/^X//' >runit/pkg-descr << 'END-of-runit/pkg-descr'
Xrunit is daemontools replacement:
X- service supervision
X- clean process state
X- reliable logging facility
X- fast system bootup and shutdown
X- packaging friendly
X- small code size
X
XIt can optionally replace init(8) as process 1.
X
XAuthor:	Gerrit Pape <pape@smarden.org>
XWWW:	http://smarden.org/runit/
END-of-runit/pkg-descr
echo x - runit/distinfo
sed 's/^X//' >runit/distinfo << 'END-of-runit/distinfo'
XMD5 (runit-0.10.0.tar.gz) = de22a4916f31ab81c27f265f81c7ad61
END-of-runit/distinfo
echo x - runit/Makefile
sed 's/^X//' >runit/Makefile << 'END-of-runit/Makefile'
X# New ports collection makefile for:	runit
X# Date created:		2003-06-20
X# Whom:			Sergei Kolobov <sergei@kolobov.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	runit
XPORTVERSION=	0.10.0
XCATEGORIES=	sysutils
XMASTER_SITES=	http://smarden.org/${PORTNAME}/
X
XMAINTAINER=	sergei@kolobov.com
XCOMMENT=	A init scheme with service supervision
X
XWRKSRC=		${WRKDIR}/admin/${DISTNAME}
XALL_TARGET=	default
X
XSERVICE_DIR?=	/var/service
X
XMAN8=		runit-init.8 runit.8 runsv.8 runsvchdir.8 runsvctrl.8 \
X		runsvdir.8 runsvstat.8 svlogd.8 svwaitdown.8 svwaitup.8 \
X		utmpset.8
XDOCS=		package/CHANGES package/COPYING package/README \
X		package/THANKS doc/*.html
XCONFIG=		etc/freebsd/1 etc/2 etc/freebsd/3 etc/freebsd/ctrlaltdel \
X	 	etc/freebsd/getty-ttyv4/run etc/freebsd/getty-ttyv4/finish
X
Xdo-configure:
X	${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/conf-cc
X
Xdo-build:
X	cd ${WRKSRC} && package/compile
X	@${MKDIR} ${WRKDIR}/etc/getty-ttyv4
X	@${SED} -e 's!%%PREFIX%%!${PREFIX}!' \
X		-e 's!%%SERVICE_DIR%%!${SERVICE_DIR}!' \
X		${FILESDIR}/runsvdir.sh.in > ${WRKDIR}/runsvdir.sh.sample
X.for file in ${CONFIG}
X	@${SED} -e 's!/etc/runit!${PREFIX}/etc/runit!g' \
X		-e 's!/service!${SERVICE_DIR}!g' \
X		-e 's!/usr/local!${PREFIX}!g' \
X		${WRKSRC}/${file} > ${WRKDIR}/${file:S!freebsd/!!}.sample
X.endfor
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/command/* ${PREFIX}/sbin
X	cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8
X	${INSTALL_SCRIPT} ${WRKDIR}/runsvdir.sh.sample ${PREFIX}/etc/rc.d
X	@${MKDIR} ${PREFIX}/etc/runit/getty-ttyv4
X	${INSTALL_SCRIPT} ${WRKDIR}/etc/[123c]* ${PREFIX}/etc/runit
X	${INSTALL_SCRIPT} ${WRKDIR}/etc/getty-ttyv4/* \
X		${PREFIX}/etc/runit/getty-ttyv4
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-runit/Makefile
echo x - runit/pkg-plist
sed 's/^X//' >runit/pkg-plist << 'END-of-runit/pkg-plist'
Xetc/rc.d/runsvdir.sh.sample
Xetc/runit/1.sample
Xetc/runit/2.sample
Xetc/runit/3.sample
Xetc/runit/ctrlaltdel.sample
Xetc/runit/getty-ttyv4/run.sample
Xetc/runit/getty-ttyv4/finish.sample
Xsbin/runit
Xsbin/runit-init
Xsbin/runsv
Xsbin/runsvchdir
Xsbin/runsvctrl
Xsbin/runsvdir
Xsbin/runsvstat
Xsbin/svlogd
Xsbin/svwaitdown
Xsbin/svwaitup
Xsbin/utmpset
X%%PORTDOCS%%%%DOCSDIR%%/CHANGES
X%%PORTDOCS%%%%DOCSDIR%%/COPYING
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/THANKS
X%%PORTDOCS%%%%DOCSDIR%%/benefits.html
X%%PORTDOCS%%%%DOCSDIR%%/dependencies.html
X%%PORTDOCS%%%%DOCSDIR%%/index.html
X%%PORTDOCS%%%%DOCSDIR%%/install.html
X%%PORTDOCS%%%%DOCSDIR%%/replaceinit.html
X%%PORTDOCS%%%%DOCSDIR%%/runit-init.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runit.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runlevels.html
X%%PORTDOCS%%%%DOCSDIR%%/runscripts.html
X%%PORTDOCS%%%%DOCSDIR%%/runsv.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runsvchdir.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runsvctrl.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runsvdir.8.html
X%%PORTDOCS%%%%DOCSDIR%%/runsvstat.8.html
X%%PORTDOCS%%%%DOCSDIR%%/svlogd.8.html
X%%PORTDOCS%%%%DOCSDIR%%/svwaitdown.8.html
X%%PORTDOCS%%%%DOCSDIR%%/svwaitup.8.html
X%%PORTDOCS%%%%DOCSDIR%%/upgrade.html
X%%PORTDOCS%%%%DOCSDIR%%/usedietlibc.html
X%%PORTDOCS%%%%DOCSDIR%%/useinit.html
X%%PORTDOCS%%%%DOCSDIR%%/utmpset.8.html
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-runit/pkg-plist
echo c - runit/files
mkdir -p runit/files > /dev/null 2>&1
echo x - runit/files/runsvdir.sh.in
sed 's/^X//' >runit/files/runsvdir.sh.in << 'END-of-runit/files/runsvdir.sh.in'
X#!/bin/sh
XDAEMON=runsvdir
XPREFIX=%%PREFIX%%
XSVDIR=%%SERVICE_DIR%%
XLOG='...........................................................................................................................................................................................................................................................................................................................................................................................................'
X
XPATH=/command:${PREFIX}/sbin:${PREFIX}/bin:/usr/sbin:/usr/bin:/sbin:/bin
X
Xcase "$1" in
X  start)
X	echo -n " ${DAEMON}"
X	exec env - PATH=${PATH} ${PREFIX}/sbin/${DAEMON} $SVDIR $LOG & 
X	;;
X
X  stop)
X	echo -n " ${DAEMON}"
X	/usr/bin/killall -HUP ${DAEMON}
X	;;
X
X  *)
X  	echo "Usage: $0 start | stop"
X	;;
Xesac
END-of-runit/files/runsvdir.sh.in
exit
--- runit.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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