Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/
Date: Sun, 21 Oct 2018 11:44:38
Message-Id: 1540122265.c622bf9fa73f485638c8d2e53c26cc20799e466f.polynomial-c@gentoo
1 commit: c622bf9fa73f485638c8d2e53c26cc20799e466f
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 21 11:44:08 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 21 11:44:25 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c622bf9f
7
8 sys-apps/sysvinit: Bump to version 2.91
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 sys-apps/sysvinit/Manifest | 1 +
14 sys-apps/sysvinit/sysvinit-2.91.ebuild | 117 +++++++++++++++++++++++++++++++++
15 2 files changed, 118 insertions(+)
16
17 diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
18 index da7a4d84dca..6534e5b81ab 100644
19 --- a/sys-apps/sysvinit/Manifest
20 +++ b/sys-apps/sysvinit/Manifest
21 @@ -1,3 +1,4 @@
22 DIST sysvinit-2.88dsf.tar.bz2 105551 BLAKE2B 2378a7ab96d059fc781b8b7dd130f4c6311a83527e80e6d40b0970140f0f6c0b081eec502b0c9e461fe5ac02cc064437c2bef2237b20209c8c5f8535a45e50d1 SHA512 0bd8eeb124e84fdfa8e621b05f796804ee69a9076b65f5115826bfa814ac1d5d28d31a5c22ebe77c86a93b2288edf4891adc0afaecc4de656c4ecda8a83807bf
23 DIST sysvinit-2.89.tar.bz2 113231 BLAKE2B defb82041edd5d9b95a7c73c950df18107aad292279270b0248b6c803b297c7c2f3edebfeb96ef2d7c3908de689ae265790b2379b9fb63c03d42138af8c418c1 SHA512 3582da52364e3c1f1a488c415f875ab264630cb23f85bc356915f50afc5a42ace18278ed04086cf38c1fe9c7a860f6fc3c2bb1cc50e5560b350a92c24411682c
24 DIST sysvinit-2.90.tar.xz 112840 BLAKE2B 24ecd6cbb0dd5c6695ae60fcfab062cafcbe7867cdba2cb3b05c7cf0e9c129364c968e70579ef904f5c617788bc607bdb9068d633afd53e0bb3cbcf41d562f0f SHA512 0fc05cba767d6285504c1c791e2e136cff7865fc6ef8beb8287bede305668ab09590a9b25ebc75bfc2060ea76707ac3dc529bc661a6a92c7b2cc23f5b0a801e6
25 +DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5
26
27 diff --git a/sys-apps/sysvinit/sysvinit-2.91.ebuild b/sys-apps/sysvinit/sysvinit-2.91.ebuild
28 new file mode 100644
29 index 00000000000..a59013bd45e
30 --- /dev/null
31 +++ b/sys-apps/sysvinit/sysvinit-2.91.ebuild
32 @@ -0,0 +1,117 @@
33 +# Copyright 1999-2018 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit toolchain-funcs flag-o-matic
39 +
40 +DESCRIPTION="/sbin/init - parent of all processes"
41 +HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit"
42 +SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
47 +IUSE="selinux ibm static kernel_FreeBSD"
48 +
49 +CDEPEND="
50 + selinux? (
51 + >=sys-libs/libselinux-1.28
52 + )"
53 +DEPEND="${CDEPEND}
54 + virtual/os-headers"
55 +RDEPEND="${CDEPEND}
56 + selinux? ( sec-policy/selinux-shutdown )
57 + !<sys-apps/openrc-0.13
58 +"
59 +
60 +PATCHES=(
61 + "${FILESDIR}/${PN}-2.86-kexec.patch" #80220
62 + "${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615
63 + "${FILESDIR}/${PN}-2.88-shutdown-h.patch" #449354
64 +)
65 +
66 +src_prepare() {
67 + default
68 + sed -i '/^CPPFLAGS =$/d' src/Makefile || die
69 +
70 + # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
71 + sed -i -r \
72 + -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
73 + -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
74 + src/Makefile || die
75 +
76 + # pidof has moved to >=procps-3.3.9
77 + sed -i -r \
78 + -e '/\/bin\/pidof/d' \
79 + -e '/^MAN8/s:\<pidof.8\>::g' \
80 + src/Makefile || die
81 +
82 + # Mung inittab for specific architectures
83 + cd "${WORKDIR}" || die
84 + cp "${FILESDIR}"/inittab-2.88 inittab || die "cp inittab"
85 + local insert=()
86 + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
87 + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
88 + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
89 + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
90 + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
91 + if use ibm ; then
92 + insert+=(
93 + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
94 + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
95 + )
96 + fi
97 + (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
98 + if use kernel_FreeBSD ; then
99 + sed -i \
100 + -e 's/linux/cons25/g' \
101 + -e 's/ttyS0/cuaa0/g' \
102 + -e 's/ttyS1/cuaa1/g' \
103 + inittab #121786
104 + fi
105 + if use x86 || use amd64 ; then
106 + sed -i \
107 + -e '/ttyS[01]/s:9600:115200:' \
108 + inittab
109 + fi
110 + if [[ ${#insert[@]} -gt 0 ]] ; then
111 + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
112 + fi
113 +}
114 +
115 +src_compile() {
116 + tc-export CC
117 + append-lfs-flags
118 + export DISTRO= #381311
119 + export VERSION="${PV}"
120 + use static && append-ldflags -static
121 + emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
122 +}
123 +
124 +src_install() {
125 + emake -C src install ROOT="${D}"
126 + dodoc README doc/*
127 +
128 + insinto /etc
129 + doins "${WORKDIR}"/inittab
130 +
131 + # dead symlink
132 + rm "${ED%/}"/usr/bin/lastb || die
133 +}
134 +
135 +pkg_postinst() {
136 + # Reload init to fix unmounting problems of / on next reboot.
137 + # This is really needed, as without the new version of init cause init
138 + # not to quit properly on reboot, and causes a fsck of / on next reboot.
139 + if [[ ${ROOT} == / ]] ; then
140 + if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
141 + ln -s /dev/initctl /run/initctl
142 + fi
143 + # Do not return an error if this fails
144 + /sbin/telinit U &>/dev/null
145 + fi
146 +
147 + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
148 + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
149 +}