From 6a6f7ee88f8842891dd5b0542cc431162d9ab7a4 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 10 Nov 2016 16:44:33 -0600 Subject: sys-process/runit: 2.1.2-r1 revision bump This fixes the following issues: https://bugs.gentoo.org/show_bug.cgi?id=562702 https://bugs.gentoo.org/show_bug.cgi?id=575478 https://bugs.gentoo.org/show_bug.cgi?id=588950 https://bugs.gentoo.org/show_bug.cgi?id=589532 Package-Manager: portage-2.3.0 --- sys-process/runit/files/1-2.1.2 | 10 ++ sys-process/runit/files/2-2.1.2 | 2 +- sys-process/runit/files/3-2.1.2 | 2 +- sys-process/runit/files/run.getty-2.1.2 | 2 +- sys-process/runit/runit-2.1.2-r1.ebuild | 157 ++++++++++++++++++++++++++++++++ 5 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 sys-process/runit/files/1-2.1.2 create mode 100644 sys-process/runit/runit-2.1.2-r1.ebuild diff --git a/sys-process/runit/files/1-2.1.2 b/sys-process/runit/files/1-2.1.2 new file mode 100644 index 000000000000..9761472ac739 --- /dev/null +++ b/sys-process/runit/files/1-2.1.2 @@ -0,0 +1,10 @@ +#!/bin/sh +# system one time tasks + +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +RUNLEVEL=S /sbin/openrc sysinit +RUNLEVEL=S /sbin/openrc boot + +touch /etc/runit/stopit +chmod 0 /etc/runit/stopit diff --git a/sys-process/runit/files/2-2.1.2 b/sys-process/runit/files/2-2.1.2 index 5d503709e220..a63a1b2d269d 100644 --- a/sys-process/runit/files/2-2.1.2 +++ b/sys-process/runit/files/2-2.1.2 @@ -3,4 +3,4 @@ PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin exec env - PATH=$PATH \ -runsvdir /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' +runsvdir -P /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/sys-process/runit/files/3-2.1.2 b/sys-process/runit/files/3-2.1.2 index 3dd5a486c19d..30e602cdae96 100644 --- a/sys-process/runit/files/3-2.1.2 +++ b/sys-process/runit/files/3-2.1.2 @@ -11,4 +11,4 @@ sv -w 300 force-shutdown /etc/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 +RUNLEVEL=$LAST /sbin/openrc $RC diff --git a/sys-process/runit/files/run.getty-2.1.2 b/sys-process/runit/files/run.getty-2.1.2 index 33b2e7853275..ab6f9543fe97 100644 --- a/sys-process/runit/files/run.getty-2.1.2 +++ b/sys-process/runit/files/run.getty-2.1.2 @@ -1,2 +1,2 @@ #!/bin/sh -exec /usr/bin/chpst -P /sbin/agetty 38400 TTY linux +exec /sbin/agetty 38400 TTY linux diff --git a/sys-process/runit/runit-2.1.2-r1.ebuild b/sys-process/runit/runit-2.1.2-r1.ebuild new file mode 100644 index 000000000000..c874b7700cf3 --- /dev/null +++ b/sys-process/runit/runit-2.1.2-r1.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit toolchain-funcs 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 ~sh ~sparc ~x86" +IUSE="static" + +RDEPEND="sys-apps/openrc" + +S=${WORKDIR}/admin/${P}/src + +src_prepare() { + default + + # we either build everything or nothing static + sed -i -e 's:-static: :' Makefile + + # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726008 + [[ ${COMPILER} == "diet" ]] && + use ppc && + filter-flags "-mpowerpc-gpopt" +} + +src_configure() { + use static && append-ldflags -static + + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + into / + dobin $(<../package/commands) + dodir /sbin + mv "${ED}"/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin" + dosym ../etc/runit/2 /sbin/runsvdir-start + into /usr + + cd .. + dodoc package/{CHANGES,README,THANKS,TODO} + dohtml doc/*.html + doman man/*.[18] + +dodir /etc/runit + exeinto /etc/runit + doexe "${FILESDIR}"/ctrlaltdel + newexe "${FILESDIR}"/1-${PV} 1 + newexe "${FILESDIR}"/2-${PV} 2 + newexe "${FILESDIR}"/3-${PV} 3 + + dodir /etc/sv + for tty in tty1 tty2 tty3 tty4 tty5 tty6; do + exeinto /etc/sv/getty-$tty/ + newexe "${FILESDIR}"/finish.getty finish + newexe "${FILESDIR}"/run.getty-${PV} run + for script in finish run; do + sed -i -e "s:TTY:${tty}:g" "${ED}"/etc/sv/getty-$tty/$script + done + done + + # make sv command work + cat <<-EOF > "${T}"/env.d + #/etc/env.d/20runit + SVDIR="/etc/service/" + EOF + insinto /etc/env.d + newins "${T}"/env.d 20runit +} + +pkg_preinst() { + if has_version 'sys-process/runit' && + has_version '