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: Fri, 23 Aug 2019 21:21:13
Message-Id: 1566595263.501d1dad9fe5f460c12ec9431cfc0cbe0c701ae2.polynomial-c@gentoo
1 commit: 501d1dad9fe5f460c12ec9431cfc0cbe0c701ae2
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 23 20:49:07 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 23 21:21:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=501d1dad
7
8 sys-apps/sysvinit: Bump to version 2.96_beta
9
10 Package-Manager: Portage-2.3.72, Repoman-2.3.17
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/sysvinit/Manifest | 1 +
14 sys-apps/sysvinit/sysvinit-2.96_beta.ebuild | 139 ++++++++++++++++++++++++++++
15 2 files changed, 140 insertions(+)
16
17 diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest
18 index 01b9e77d501..b1e74a983fc 100644
19 --- a/sys-apps/sysvinit/Manifest
20 +++ b/sys-apps/sysvinit/Manifest
21 @@ -1,3 +1,4 @@
22 DIST sysvinit-2.93.tar.xz 117580 BLAKE2B 2e771b00dbdc73e76df9e78659aaa5e5fcbfda36290a1b5aa20a5a6fe3540c4616f2a235a668de30d33c620e2d2516da303537eda47b83b29b0844ad7aa77df4 SHA512 c80d07a674253d15ec6382cfaf792f47486e2e84ab9c913d3c9e03b590cf211177a3a14e168f4d1c9c2e97737221f7ac70a75633d90502837a6d29bdc4c48d72
23 DIST sysvinit-2.94.tar.xz 120900 BLAKE2B e45a95246325e93ef49f11573924216937e238761cb9f5979ae2b272838fb3280b1d12c9553992271f7926dc7c7bc18e352a8019a70f54c592971fe043453804 SHA512 8d3b7b777f7c37cf5eaf73d4cdfad8ac54c6115577052bd7ddf3588da8fb7d16b812ffaade0ce300c2c6b7d2acd6e7778130544befc171eab174ee8766b3ec50
24 DIST sysvinit-2.95.tar.xz 124576 BLAKE2B 1b0770e3bc7c5a32b8a634ab70d16854446816f9c22f57befb2602a8680d5d4a4adc51747b6199867ba73a3ac5118073a8bfa9ea4317de86b3b42867ae0cf6e7 SHA512 367990d166ec6dcc4de81e748f15035e2a4c2838da7336b064aeadac2db95ca77e8d11fb6aa7e7745874ef3e27118c9a68070062fffb16a886f32d6ab2529d28
25 +DIST sysvinit-2.96-beta.tar.xz 122212 BLAKE2B d819e0444b6d99129552b2ea6e1ab5b80d9b0967d68a53cd879995ca635ad54425a6a473fa2ea37ee43cd2f5bdfddffe1ad44f7115018ae3ec5925938ed1e72c SHA512 89116a473656033b974205f5eb296bc32fb558136511e087252248be8f444d0eebcb7c9473385913a00d15b9e5855068c1a8135d681114171728cd78ef278530
26
27 diff --git a/sys-apps/sysvinit/sysvinit-2.96_beta.ebuild b/sys-apps/sysvinit/sysvinit-2.96_beta.ebuild
28 new file mode 100644
29 index 00000000000..6dd6484ee44
30 --- /dev/null
31 +++ b/sys-apps/sysvinit/sysvinit-2.96_beta.ebuild
32 @@ -0,0 +1,139 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
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 +[[ "${PV}" == *beta* ]] || \
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
48 +IUSE="selinux ibm static kernel_FreeBSD"
49 +
50 +CDEPEND="
51 + selinux? (
52 + >=sys-libs/libselinux-1.28
53 + )"
54 +DEPEND="${CDEPEND}
55 + virtual/os-headers"
56 +RDEPEND="${CDEPEND}
57 + selinux? ( sec-policy/selinux-shutdown )
58 + !<sys-apps/openrc-0.13
59 +"
60 +
61 +S="${WORKDIR}/${P/_*}"
62 +
63 +PATCHES=(
64 + "${FILESDIR}/${PN}-2.86-kexec.patch" #80220
65 + "${FILESDIR}/${PN}-2.94_beta-shutdown-single.patch" #158615
66 + "${FILESDIR}/${PN}-2.95_beta-shutdown-h.patch" #449354
67 +)
68 +
69 +src_prepare() {
70 + default
71 +
72 + sed -i \
73 + -e '/^CPPFLAGS =$/d' \
74 + -e '/^override CFLAGS +=/s/ -fstack-protector-strong//' \
75 + src/Makefile || die
76 +
77 + # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
78 + sed -i -r \
79 + -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
80 + -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
81 + src/Makefile || die
82 +
83 + # pidof has moved to >=procps-3.3.9
84 + sed -i -r \
85 + -e '/\/bin\/pidof/d' \
86 + -e '/^MAN8/s:\<pidof.8\>::g' \
87 + src/Makefile || die
88 +
89 + # logsave is already in e2fsprogs
90 + sed -i -r \
91 + -e '/^(USR)?S?BIN/s:\<logsave\>::g' \
92 + -e '/^MAN8/s:\<logsave.8\>::g' \
93 + src/Makefile || die
94 +
95 + # Mung inittab for specific architectures
96 + cd "${WORKDIR}" || die
97 + cp "${FILESDIR}"/inittab-2.95 inittab || die "cp inittab"
98 + local insert=()
99 + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
100 + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
101 + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
102 + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
103 + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
104 + if use ibm ; then
105 + insert+=(
106 + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
107 + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
108 + )
109 + fi
110 + (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
111 + if use kernel_FreeBSD ; then
112 + sed -i \
113 + -e 's/linux/cons25/g' \
114 + -e 's/ttyS0/cuaa0/g' \
115 + -e 's/ttyS1/cuaa1/g' \
116 + inittab #121786
117 + fi
118 + if use x86 || use amd64 ; then
119 + sed -i \
120 + -e '/ttyS[01]/s:9600:115200:' \
121 + inittab
122 + fi
123 + if [[ ${#insert[@]} -gt 0 ]] ; then
124 + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
125 + fi
126 +}
127 +
128 +src_compile() {
129 + tc-export CC
130 + append-lfs-flags
131 + export DISTRO= #381311
132 + export VERSION="${PV}"
133 + use static && append-ldflags -static
134 + emake -C src $(usex selinux 'WITH_SELINUX=yes' '')
135 +}
136 +
137 +src_install() {
138 + emake -C src install ROOT="${D}"
139 + dodoc README doc/*
140 +
141 + insinto /etc
142 + doins "${WORKDIR}"/inittab
143 +
144 + # dead symlink
145 + rm "${ED}"/usr/bin/lastb || die
146 +
147 + newinitd "${FILESDIR}"/bootlogd.initd bootlogd
148 + into /
149 + dosbin "${FILESDIR}"/halt.sh
150 +}
151 +
152 +pkg_postinst() {
153 + # Reload init to fix unmounting problems of / on next reboot.
154 + # This is really needed, as without the new version of init cause init
155 + # not to quit properly on reboot, and causes a fsck of / on next reboot.
156 + if [[ ${ROOT} == / ]] ; then
157 + if [[ -e /dev/initctl && ! -e /run/initctl ]]; then
158 + ln -s /dev/initctl /run/initctl
159 + fi
160 + # Do not return an error if this fails
161 + /sbin/telinit U &>/dev/null
162 + fi
163 +
164 + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
165 + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
166 +
167 + # Required for new bootlogd service
168 + if [[ ! -e "${EROOT}/var/log/boot" ]] ; then
169 + touch "${EROOT}/var/log/boot"
170 + fi
171 +}