1 |
commit: 437d6c26e5fbecd737d73bd7c1bf0aa5c815bd9d |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 23 13:44:48 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 23 13:47:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=437d6c26 |
7 |
|
8 |
sys-apps/sysvinit: Bump to version 2.92_beta |
9 |
|
10 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-apps/sysvinit/Manifest | 1 + |
14 |
sys-apps/sysvinit/files/bootlogd | 12 ++ |
15 |
.../files/sysvinit-2.92_beta-shutdown-h.patch | 71 ++++++++++++ |
16 |
sys-apps/sysvinit/sysvinit-2.92_beta.ebuild | 122 +++++++++++++++++++++ |
17 |
4 files changed, 206 insertions(+) |
18 |
|
19 |
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest |
20 |
index 6534e5b81ab..4415458d985 100644 |
21 |
--- a/sys-apps/sysvinit/Manifest |
22 |
+++ b/sys-apps/sysvinit/Manifest |
23 |
@@ -2,3 +2,4 @@ DIST sysvinit-2.88dsf.tar.bz2 105551 BLAKE2B 2378a7ab96d059fc781b8b7dd130f4c6311 |
24 |
DIST sysvinit-2.89.tar.bz2 113231 BLAKE2B defb82041edd5d9b95a7c73c950df18107aad292279270b0248b6c803b297c7c2f3edebfeb96ef2d7c3908de689ae265790b2379b9fb63c03d42138af8c418c1 SHA512 3582da52364e3c1f1a488c415f875ab264630cb23f85bc356915f50afc5a42ace18278ed04086cf38c1fe9c7a860f6fc3c2bb1cc50e5560b350a92c24411682c |
25 |
DIST sysvinit-2.90.tar.xz 112840 BLAKE2B 24ecd6cbb0dd5c6695ae60fcfab062cafcbe7867cdba2cb3b05c7cf0e9c129364c968e70579ef904f5c617788bc607bdb9068d633afd53e0bb3cbcf41d562f0f SHA512 0fc05cba767d6285504c1c791e2e136cff7865fc6ef8beb8287bede305668ab09590a9b25ebc75bfc2060ea76707ac3dc529bc661a6a92c7b2cc23f5b0a801e6 |
26 |
DIST sysvinit-2.91.tar.xz 114412 BLAKE2B 5e044f589f5001c2b5a30eda76bf5c24bb2a7e0d308b7027d54031848407e6b7667b59096044eb186a7f6a862521d4a670c05a17dcc929d07da6515058949606 SHA512 8dcf6de79b03567c300ef5f2b7dd211895745e231510d730092085a15f61f06f28cee7c504b0b022bdcb4b4e903f44946537d4fbb2b5069fb5d29bb099fd45f5 |
27 |
+DIST sysvinit-2.92-beta.tar.xz 117508 BLAKE2B 3798afc719bc83f7e70727f7de9862eebed81d3f8c708840c6b32d00e83c2a1f43433c9b7bbcdc5560a4a33207caa000e72b7aba3d18abefc13b12e753ffd5fe SHA512 6e1d09c14d07a5159c73149336a97f6c1edac980dc9d9c330c5deaf9a0ee5235fc7add22f00df75f467442479cd900aa9acf538865eb7c10db75b490ff41eb72 |
28 |
|
29 |
diff --git a/sys-apps/sysvinit/files/bootlogd b/sys-apps/sysvinit/files/bootlogd |
30 |
new file mode 100755 |
31 |
index 00000000000..3f3e3634e35 |
32 |
--- /dev/null |
33 |
+++ b/sys-apps/sysvinit/files/bootlogd |
34 |
@@ -0,0 +1,12 @@ |
35 |
+#!/sbin/openrc-run |
36 |
+# Copyright 1999-2018 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+description="bootlogd - record boot messages (sysvinit)" |
40 |
+pidfile="/run/bootlogd" |
41 |
+command="/sbin/bootlogd" |
42 |
+command_args="-c -p ${pidfile}" |
43 |
+ |
44 |
+depend() { |
45 |
+ need localmount root |
46 |
+} |
47 |
|
48 |
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 |
49 |
new file mode 100644 |
50 |
index 00000000000..cf8786ac4a2 |
51 |
--- /dev/null |
52 |
+++ b/sys-apps/sysvinit/files/sysvinit-2.92_beta-shutdown-h.patch |
53 |
@@ -0,0 +1,71 @@ |
54 |
+other inits have moved to not requiring the -h flag when used with -H/-P. |
55 |
+modify sysvinit to be the same since it really doesn't matter. |
56 |
+ |
57 |
+https://bugs.gentoo.org/449354 |
58 |
+ |
59 |
+patch by Doug Goldstein |
60 |
+ |
61 |
+--- |
62 |
+ man/shutdown.8 | 8 +++----- |
63 |
+ src/shutdown.c | 10 ++++------ |
64 |
+ 2 files changed, 7 insertions(+), 11 deletions(-) |
65 |
+ |
66 |
+--- sysvinit-2.92/man/shutdown.8 |
67 |
++++ sysvinit-2.92/man/shutdown.8 |
68 |
+@@ -66,17 +66,15 @@ |
69 |
+ .\"}}} |
70 |
+ .\"{{{ -h |
71 |
+ .IP \fB\-h\fP |
72 |
+-Halt or power off after shutdown. |
73 |
++Equivalent to -P, unless -H is specified. |
74 |
+ .\"}}} |
75 |
+ .\"{{{ -P |
76 |
+ .IP \fB\-P\fP |
77 |
+-Modifier to the -h flag. Halt action is to turn off the power. |
78 |
+-Must be used with the -h flag. |
79 |
++Action is to turn off the power. |
80 |
+ .\"}}} |
81 |
+ .\"{{{ -H |
82 |
+ .IP \fB\-H\fP |
83 |
+-Modifier to the -h flag. Halt action is to halt or drop into boot |
84 |
+-monitor on systems that support it. Must be used with the -h flag. |
85 |
++Action is to halt or drop into boot monitor on systems that support it. |
86 |
+ .\"}}} |
87 |
+ .\"{{{ -f |
88 |
+ .IP \fB\-f\fP |
89 |
+--- sysvinit-2.92/src/shutdown.c |
90 |
++++ sysvinit-2.92/src/shutdown.c |
91 |
+@@ -546,9 +546,11 @@ |
92 |
+ switch(c) { |
93 |
+ case 'H': |
94 |
+ halttype = "HALT"; |
95 |
++ down_level[0] = '0'; |
96 |
+ break; |
97 |
+ case 'P': |
98 |
+ halttype = "POWEROFF"; |
99 |
++ down_level[0] = '0'; |
100 |
+ break; |
101 |
+ case 'a': /* Access control. */ |
102 |
+ useacl = 1; |
103 |
+@@ -564,6 +566,8 @@ |
104 |
+ break; |
105 |
+ case 'h': /* Halt after shutdown */ |
106 |
+ down_level[0] = '0'; |
107 |
++ if (!halttype) |
108 |
++ halttype = "POWEROFF"; |
109 |
+ break; |
110 |
+ case 'f': /* Don't perform fsck after next boot */ |
111 |
+ fastboot = 1; |
112 |
+@@ -603,12 +607,6 @@ |
113 |
+ } |
114 |
+ } |
115 |
+ |
116 |
+- if (NULL != halttype && down_level[0] != '0') { |
117 |
+- fprintf(stderr, "shutdown: -H and -P flags can only be used along with -h flag.\n"); |
118 |
+- usage(); |
119 |
+- exit(1); |
120 |
+- } |
121 |
+- |
122 |
+ /* Do we need to use the shutdown.allow file ? */ |
123 |
+ if (useacl && (fp = fopen(SDALLOW, "r")) != NULL) { |
124 |
+ |
125 |
|
126 |
diff --git a/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild b/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild |
127 |
new file mode 100644 |
128 |
index 00000000000..55808c88205 |
129 |
--- /dev/null |
130 |
+++ b/sys-apps/sysvinit/sysvinit-2.92_beta.ebuild |
131 |
@@ -0,0 +1,122 @@ |
132 |
+# Copyright 1999-2018 Gentoo Authors |
133 |
+# Distributed under the terms of the GNU General Public License v2 |
134 |
+ |
135 |
+EAPI=6 |
136 |
+ |
137 |
+inherit toolchain-funcs flag-o-matic |
138 |
+ |
139 |
+DESCRIPTION="/sbin/init - parent of all processes" |
140 |
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" |
141 |
+SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz" |
142 |
+ |
143 |
+LICENSE="GPL-2" |
144 |
+SLOT="0" |
145 |
+[[ "${PV}" == *beta* ]] || \ |
146 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
147 |
+IUSE="selinux ibm static kernel_FreeBSD" |
148 |
+ |
149 |
+CDEPEND=" |
150 |
+ selinux? ( |
151 |
+ >=sys-libs/libselinux-1.28 |
152 |
+ )" |
153 |
+DEPEND="${CDEPEND} |
154 |
+ virtual/os-headers" |
155 |
+RDEPEND="${CDEPEND} |
156 |
+ selinux? ( sec-policy/selinux-shutdown ) |
157 |
+ !<sys-apps/openrc-0.13 |
158 |
+" |
159 |
+ |
160 |
+S="${WORKDIR}/${P/_*}" |
161 |
+ |
162 |
+PATCHES=( |
163 |
+ "${FILESDIR}/${PN}-2.86-kexec.patch" #80220 |
164 |
+ "${FILESDIR}/${PN}-2.86-shutdown-single.patch" #158615 |
165 |
+ "${FILESDIR}/${PN}-2.92_beta-shutdown-h.patch" #449354 |
166 |
+) |
167 |
+ |
168 |
+src_prepare() { |
169 |
+ default |
170 |
+ sed -i '/^CPPFLAGS =$/d' src/Makefile || die |
171 |
+ |
172 |
+ # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux |
173 |
+ sed -i -r \ |
174 |
+ -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \ |
175 |
+ -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ |
176 |
+ src/Makefile || die |
177 |
+ |
178 |
+ # pidof has moved to >=procps-3.3.9 |
179 |
+ sed -i -r \ |
180 |
+ -e '/\/bin\/pidof/d' \ |
181 |
+ -e '/^MAN8/s:\<pidof.8\>::g' \ |
182 |
+ src/Makefile || die |
183 |
+ |
184 |
+ # Mung inittab for specific architectures |
185 |
+ cd "${WORKDIR}" || die |
186 |
+ cp "${FILESDIR}"/inittab-2.91 inittab || die "cp inittab" |
187 |
+ local insert=() |
188 |
+ use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) |
189 |
+ use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) |
190 |
+ use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) |
191 |
+ use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) |
192 |
+ use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) |
193 |
+ if use ibm ; then |
194 |
+ insert+=( |
195 |
+ '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' |
196 |
+ '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' |
197 |
+ ) |
198 |
+ fi |
199 |
+ (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab |
200 |
+ if use kernel_FreeBSD ; then |
201 |
+ sed -i \ |
202 |
+ -e 's/linux/cons25/g' \ |
203 |
+ -e 's/ttyS0/cuaa0/g' \ |
204 |
+ -e 's/ttyS1/cuaa1/g' \ |
205 |
+ inittab #121786 |
206 |
+ fi |
207 |
+ if use x86 || use amd64 ; then |
208 |
+ sed -i \ |
209 |
+ -e '/ttyS[01]/s:9600:115200:' \ |
210 |
+ inittab |
211 |
+ fi |
212 |
+ if [[ ${#insert[@]} -gt 0 ]] ; then |
213 |
+ printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab |
214 |
+ fi |
215 |
+} |
216 |
+ |
217 |
+src_compile() { |
218 |
+ tc-export CC |
219 |
+ append-lfs-flags |
220 |
+ export DISTRO= #381311 |
221 |
+ export VERSION="${PV}" |
222 |
+ use static && append-ldflags -static |
223 |
+ emake -C src $(usex selinux 'WITH_SELINUX=yes' '') |
224 |
+} |
225 |
+ |
226 |
+src_install() { |
227 |
+ emake -C src install ROOT="${D}" |
228 |
+ dodoc README doc/* |
229 |
+ |
230 |
+ insinto /etc |
231 |
+ doins "${WORKDIR}"/inittab |
232 |
+ |
233 |
+ # dead symlink |
234 |
+ rm "${ED%/}"/usr/bin/lastb || die |
235 |
+ |
236 |
+ doinitd "${FILESDIR}"/bootlogd |
237 |
+} |
238 |
+ |
239 |
+pkg_postinst() { |
240 |
+ # Reload init to fix unmounting problems of / on next reboot. |
241 |
+ # This is really needed, as without the new version of init cause init |
242 |
+ # not to quit properly on reboot, and causes a fsck of / on next reboot. |
243 |
+ if [[ ${ROOT} == / ]] ; then |
244 |
+ if [[ -e /dev/initctl && ! -e /run/initctl ]]; then |
245 |
+ ln -s /dev/initctl /run/initctl |
246 |
+ fi |
247 |
+ # Do not return an error if this fails |
248 |
+ /sbin/telinit U &>/dev/null |
249 |
+ fi |
250 |
+ |
251 |
+ elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" |
252 |
+ elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." |
253 |
+} |