From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BD19138334 for ; Fri, 23 Nov 2018 13:47:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0139DE09A8; Fri, 23 Nov 2018 13:47:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B86DEE09A8 for ; Fri, 23 Nov 2018 13:47:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1CF75335CEC for ; Fri, 23 Nov 2018 13:47:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D01D442 for ; Fri, 23 Nov 2018 13:47:49 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1542980863.437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/sysvinit/Manifest sys-apps/sysvinit/files/bootlogd sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch sys-apps/sysvinit/sysvinit-2.92_beta.ebuild X-VCS-Directories: sys-apps/sysvinit/ sys-apps/sysvinit/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d X-VCS-Branch: master Date: Fri, 23 Nov 2018 13:47:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6f840363-06cd-4fe3-bcc5-84de33a5f3d0 X-Archives-Hash: a24004bd84bd042929406ceb351e01d3 commit: 437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d Author: Lars Wendler gentoo org> AuthorDate: Fri Nov 23 13:44:48 2018 +0000 Commit: Lars Wendler gentoo org> CommitDate: Fri Nov 23 13:47:43 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=437d6c26 sys-apps/sysvinit: Bump to version 2.92_beta Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Lars Wendler gentoo.org> sys-apps/sysvinit/Manifest | 1 + sys-apps/sysvinit/files/bootlogd | 12 ++ .../files/sysvinit-2.92_beta-shutdown-h.patch | 71 ++++++++++++ sys-apps/sysvinit/sysvinit-2.92_beta.ebuild | 122 +++++++++++++++++++++ 4 files changed, 206 insertions(+) diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest index 6534e5b81ab..4415458d985 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 00000000000..3f3e3634e35 --- /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 00000000000..cf8786ac4a2 --- /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 00000000000..55808c88205 --- /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 ) + !::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:\::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." +}