initial ebuild #39160
authorMike Frysinger <vapier@gentoo.org>
Sun, 10 Oct 2004 02:09:40 +0000 (02:09 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 10 Oct 2004 02:09:40 +0000 (02:09 +0000)
sys-apps/runit/ChangeLog [new file with mode: 0644]
sys-apps/runit/Manifest [new file with mode: 0644]
sys-apps/runit/files/1 [new file with mode: 0644]
sys-apps/runit/files/2 [new file with mode: 0644]
sys-apps/runit/files/3 [new file with mode: 0644]
sys-apps/runit/files/ctrlaltdel [new file with mode: 0644]
sys-apps/runit/files/digest-runit-1.0.5 [new file with mode: 0644]
sys-apps/runit/files/finish.getty [new file with mode: 0644]
sys-apps/runit/files/run.getty [new file with mode: 0644]
sys-apps/runit/metadata.xml [new file with mode: 0644]
sys-apps/runit/runit-1.0.5.ebuild [new file with mode: 0644]

diff --git a/sys-apps/runit/ChangeLog b/sys-apps/runit/ChangeLog
new file mode 100644 (file)
index 0000000..7e8b45b
--- /dev/null
@@ -0,0 +1,8 @@
+# ChangeLog for sys-apps/runit
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/runit/ChangeLog,v 1.1 2004/10/10 02:09:40 vapier Exp $
+
+*runit-1.0.5 (09 Oct 2004)
+
+  09 Oct 2004; Mike Frysinger <vapier@gentoo.org> :
+  Initial import.  Ebuild submitted by Torne Wuff #39160.
diff --git a/sys-apps/runit/Manifest b/sys-apps/runit/Manifest
new file mode 100644 (file)
index 0000000..38cb158
--- /dev/null
@@ -0,0 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 6c0cd248ea4b64148f724d8705f056dd ChangeLog 339
+MD5 197323b23555ef7ab64d572ee0d3588e runit-1.0.5.ebuild 1661
+MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
+MD5 c40ea29a84ae96a8d38976a36c963335 files/1 175
+MD5 3b574bfad17bf4d2d22e025289d2bad7 files/2 551
+MD5 14c3375cd167d9c7b1b89febd8de64e6 files/3 377
+MD5 ca1dc1a0ccab2afbac7a8540c74bd612 files/finish.getty 30
+MD5 9f1dcf4c31a2d9df9336b8d1c9b13a83 files/ctrlaltdel 189
+MD5 2d1e9a75a18249dec3a71503c5266d55 files/run.getty 44
+MD5 0c9a4b2732a7c102b84593eae16b34c7 files/digest-runit-1.0.5 62
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.10 (GNU/Linux)
+
+iD8DBQFBaJn2HTu7gpaalycRAlAhAJ4p5H76ewIAlZNqS1ZsezJ3uoTZLACfbRWx
+FIB/MToYAtMEH9pZHL4QnCw=
+=lUAe
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/runit/files/1 b/sys-apps/runit/files/1
new file mode 100644 (file)
index 0000000..d6a5b4f
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# system one time tasks
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+RUNLEVEL=S /sbin/rc sysinit
+RUNLEVEL=S /sbin/rc boot
+
+touch /etc/runit/stopit
+chmod 0 /etc/runit/stopit
diff --git a/sys-apps/runit/files/2 b/sys-apps/runit/files/2
new file mode 100644 (file)
index 0000000..233ad00
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+exec env - PATH=$PATH \
+runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
diff --git a/sys-apps/runit/files/3 b/sys-apps/runit/files/3
new file mode 100644 (file)
index 0000000..182151e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+exec >/dev/console 2>&1
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+echo 'Waiting for getties to stop...'
+svwaitdown -xk -t10 /var/service/getty-*
+
+echo 'Waiting for services to stop...'
+svwaitdown -xk -t300 /var/service/*
+
+echo 'Shutdown...'
+test -x /etc/runit/reboot && LAST=6    || LAST=0
+test -x /etc/runit/reboot && RC=reboot || RC=shutdown
+RUNLEVEL=$LAST /sbin/rc $RC
+
diff --git a/sys-apps/runit/files/ctrlaltdel b/sys-apps/runit/files/ctrlaltdel
new file mode 100644 (file)
index 0000000..6684457
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin
+MSG="System is going down in 14 seconds..."
+
+# echo 'disabled.' ; exit
+touch /etc/runit/stopit
+chmod 100 /etc/runit/stopit && echo "$MSG" | wall
+/bin/sleep 14
diff --git a/sys-apps/runit/files/digest-runit-1.0.5 b/sys-apps/runit/files/digest-runit-1.0.5
new file mode 100644 (file)
index 0000000..3179a3b
--- /dev/null
@@ -0,0 +1 @@
+MD5 e90ed8f2f37fae157b0f422ff6e594cb runit-1.0.5.tar.gz 89541
diff --git a/sys-apps/runit/files/finish.getty b/sys-apps/runit/files/finish.getty
new file mode 100644 (file)
index 0000000..c3d440a
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec utmpset -w TTY
diff --git a/sys-apps/runit/files/run.getty b/sys-apps/runit/files/run.getty
new file mode 100644 (file)
index 0000000..ab6f954
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/agetty 38400 TTY linux
diff --git a/sys-apps/runit/metadata.xml b/sys-apps/runit/metadata.xml
new file mode 100644 (file)
index 0000000..96a2d58
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-apps/runit/runit-1.0.5.ebuild b/sys-apps/runit/runit-1.0.5.ebuild
new file mode 100644 (file)
index 0000000..116c567
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/runit/runit-1.0.5.ebuild,v 1.1 2004/10/10 02:09:40 vapier Exp $
+
+inherit gcc flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="http://smarden.org/runit/"
+SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="static"
+
+DEPEND="virtual/glibc"
+
+S=${WORKDIR}/admin/${P}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       # we either build everything or nothing static
+       sed -i -e 's:-static: :' src/Makefile
+       use static && append-ldflags -static
+
+       echo "$(gcc-getCC) ${CFLAGS}"  > src/conf-cc
+       echo "$(gcc-getCC) ${LDFLAGS}" > src/conf-ld
+}
+
+src_compile() {
+       cd src
+       emake || die "make failed"
+}
+
+src_install() {
+       dodir /var
+       keepdir /etc/runit{,/runsvdir{,/default,/all}}
+       dosym default /etc/runit/runsvdir/current
+       dosym ../etc/runit/runsvdir/current /var/service
+
+       cd src
+       dobin chpst runsv runsvchdir runsvctrl runsvdir \
+               runsvstat svlogd svwaitdown svwaitup || die "dobin"
+       into /
+       dosbin runit-init runit utmpset || die "dosbin"
+
+       cd ${S}
+       dodoc package/{CHANGES,README,THANKS}
+       dohtml doc/*.html
+       doman man/*
+
+       exeinto /etc/runit/
+       doexe ${FILESDIR}/{1,2,3,ctrlaltdel}
+       for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+               exeinto /etc/runit/runsvdir/all/getty-$tty/
+               for script in run finish; do
+                       newexe ${FILESDIR}/$script.getty $script
+                       dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script
+               done
+               dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty
+       done
+}