summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-11-23 14:44:48 +0100
committerLars Wendler <polynomial-c@gentoo.org>2018-11-23 14:47:43 +0100
commit437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d (patch)
treefcd6c3943e43a0f4e6ca3b81a140d4332e253dd9 /sys-apps/sysvinit
parentdev-perl/Unicode-MapUTF8: amd64 stable wrt bug #667266 (diff)
downloadgentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.tar.gz
gentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.tar.bz2
gentoo-437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.zip
sys-apps/sysvinit: Bump to version 2.92_beta
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps/sysvinit')
-rw-r--r--sys-apps/sysvinit/Manifest1
-rwxr-xr-xsys-apps/sysvinit/files/bootlogd12
-rw-r--r--sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch71
-rw-r--r--sys-apps/sysvinit/sysvinit-2.92_beta.ebuild122
4 files changed, 206 insertions, 0 deletions
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
index 6534e5b81abc..4415458d985f 100644
--- a/sys-apps/sysvinit/Manifest
+++ b/sys-apps/sysvinit/Manifest
@@ -2,3 +2,4 @@ DIST sysvinit-2.88dsf.tar.bz2 105551 BLAKE2B 2378a7ab96d059fc781b8b7dd130f4c6311
DIST sysvinit-2.89.tar.bz2 113231 BLAKE2B defb82041edd5d9b95a7c73c950df18107aad292279270b0248b6c803b297c7c2f3edebfeb96ef2d7c3908de689ae265790b2379b9fb63c03d42138af8c418c1 SHA512 3582da52364e3c1f1a488c415f875ab264630cb23f85bc356915f50afc5a42ace18278ed04086cf38c1fe9c7a860f6fc3c2bb1cc50e5560b350a92c24411682c
DIST sysvinit-2.90.tar.xz 112840 BLAKE2B 24ecd6cbb0dd5c6695ae60fcfab062cafcbe7867cdba2cb3b05c7cf0e9c129364c968e70579ef904f5c617788bc607bdb9068d633afd53e0bb3cbcf41d562f0f SHA512 0fc05cba767d6285504c1c791e2e136cff7865fc6ef8beb8287bede305668ab09590a9b25ebc75bfc2060ea76707ac3dc529bc661a6a92c7b2cc23f5b0a801e6
DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5
+DIST sysvinit-2.92-beta.tar.xz 117508 BLAKE2B 3798afc719bc83f7e70727f7de9862eebed81d3f8c708840c6b32d00e83c2a1f43433c9b7bbcdc5560a4a33207caa000e72b7aba3d18abefc13b12e753ffd5fe SHA512 6e1d09c14d07a5159c73149336a97f6c1edac980dc9d9c330c5deaf9a0ee5235fc7add22f00df75f467442479cd900aa9acf538865eb7c10db75b490ff41eb72
diff --git a/sys-apps/sysvinit/files/bootlogd b/sys-apps/sysvinit/files/bootlogd
new file mode 100755
index 000000000000..3f3e3634e350
--- /dev/null
+++ b/sys-apps/sysvinit/files/bootlogd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="bootlogd - record boot messages (sysvinit)"
+pidfile="/run/bootlogd"
+command="/sbin/bootlogd"
+command_args="-c -p ${pidfile}"
+
+depend() {
+ need localmount root
+}
diff --git a/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
new file mode 100644
index 000000000000..cf8786ac4a23
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch
@@ -0,0 +1,71 @@
+other inits have moved to not requiring the -h flag when used with -H/-P.
+modify sysvinit to be the same since it really doesn't matter.
+
+https://bugs.gentoo.org/449354
+
+patch by Doug Goldstein
+
+---
+ man/shutdown.8 | 8 +++-----
+ src/shutdown.c | 10 ++++------
+ 2 files changed, 7 insertions(+), 11 deletions(-)
+
+--- sysvinit-2.92/man/shutdown.8
++++ sysvinit-2.92/man/shutdown.8
+@@ -66,17 +66,15 @@
+ .\"}}}
+ .\"{{{ -h
+ .IP \fB\-h\fP
+-Halt or power off after shutdown.
++Equivalent to -P, unless -H is specified.
+ .\"}}}
+ .\"{{{ -P
+ .IP \fB\-P\fP
+-Modifier to the -h flag. Halt action is to turn off the power.
+-Must be used with the -h flag.
++Action is to turn off the power.
+ .\"}}}
+ .\"{{{ -H
+ .IP \fB\-H\fP
+-Modifier to the -h flag. Halt action is to halt or drop into boot
+-monitor on systems that support it. Must be used with the -h flag.
++Action is to halt or drop into boot monitor on systems that support it.
+ .\"}}}
+ .\"{{{ -f
+ .IP \fB\-f\fP
+--- sysvinit-2.92/src/shutdown.c
++++ sysvinit-2.92/src/shutdown.c
+@@ -546,9 +546,11 @@
+ switch(c) {
+ case 'H':
+ halttype = "HALT";
++ down_level[0] = '0';
+ break;
+ case 'P':
+ halttype = "POWEROFF";
++ down_level[0] = '0';
+ break;
+ case 'a': /* Access control. */
+ useacl = 1;
+@@ -564,6 +566,8 @@
+ break;
+ case 'h': /* Halt after shutdown */
+ down_level[0] = '0';
++ if (!halttype)
++ halttype = "POWEROFF";
+ break;
+ case 'f': /* Don't perform fsck after next boot */
+ fastboot = 1;
+@@ -603,12 +607,6 @@
+ }
+ }
+
+- if (NULL != halttype && down_level[0] != '0') {
+- fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n");
+- usage();
+- exit(1);
+- }
+-
+ /* Do we need to use the shutdown.allow file ? */
+ if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) {
+
diff --git a/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild b/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild
new file mode 100644
index 000000000000..55808c882050
--- /dev/null
+++ b/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="/sbin/init - parent of all processes"
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
+SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *beta* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="selinux ibm static kernel_FreeBSD"
+
+CDEPEND="
+ selinux? (
+ >=sys-libs/libselinux-1.28
+ )"
+DEPEND="${CDEPEND}
+ virtual/os-headers"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-shutdown )
+ !<sys-apps/openrc-0.13
+"
+
+S="${WORKDIR}/${P/_*}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.86-kexec.patch" #80220
+ "${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
+ "${FILESDIR}/${PN}-2.92_beta-shutdown-h.patch" #449354
+)
+
+src_prepare() {
+ default
+ sed -i '/^CPPFLAGS =$/d' src/Makefile || die
+
+ # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
+ sed -i -r \
+ -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
+ -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
+ src/Makefile || die
+
+ # pidof has moved to >=procps-3.3.9
+ sed -i -r \
+ -e '/\/bin\/pidof/d' \
+ -e '/^MAN8/s:\<pidof.8\>::g' \
+ src/Makefile || die
+
+ # Mung inittab for specific architectures
+ cd "${WORKDIR}" || die
+ cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab"
+ local insert=()
+ use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
+ use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
+ use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
+ use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
+ use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
+ if use ibm ; then
+ insert+=(
+ '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
+ '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
+ )
+ fi
+ (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
+ if use kernel_FreeBSD ; then
+ sed -i \
+ -e 's/linux/cons25/g' \
+ -e 's/ttyS0/cuaa0/g' \
+ -e 's/ttyS1/cuaa1/g' \
+ inittab #121786
+ fi
+ if use x86 || use amd64 ; then
+ sed -i \
+ -e '/ttyS[01]/s:9600:115200:' \
+ inittab
+ fi
+ if [[ ${#insert[@]} -gt 0 ]] ; then
+ printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
+ fi
+}
+
+src_compile() {
+ tc-export CC
+ append-lfs-flags
+ export DISTRO= #381311
+ export VERSION="${PV}"
+ use static && append-ldflags -static
+ emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
+}
+
+src_install() {
+ emake -C src install ROOT="${D}"
+ dodoc README doc/*
+
+ insinto /etc
+ doins "${WORKDIR}"/inittab
+
+ # dead symlink
+ rm "${ED%/}"/usr/bin/lastb || die
+
+ doinitd "${FILESDIR}"/bootlogd
+}
+
+pkg_postinst() {
+ # Reload init to fix unmounting problems of / on next reboot.
+ # This is really needed, as without the new version of init cause init
+ # not to quit properly on reboot, and causes a fsck of / on next reboot.
+ if [[ ${ROOT} == / ]] ; then
+ if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
+ ln -s /dev/initctl /run/initctl
+ fi
+ # Do not return an error if this fails
+ /sbin/telinit U &>/dev/null
+ fi
+
+ elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
+ elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
+}