1 |
commit: c12b77a192f5694579fbb041a8c6e5cba4cd1155 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 27 03:45:49 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 27 03:46:14 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c12b77a1 |
7 |
|
8 |
sys-apps/sysvinit: add 3.04 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-apps/sysvinit/Manifest | 2 + |
13 |
sys-apps/sysvinit/sysvinit-3.04.ebuild | 177 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 179 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest |
17 |
index ac59d422ea37..68d4255cf96a 100644 |
18 |
--- a/sys-apps/sysvinit/Manifest |
19 |
+++ b/sys-apps/sysvinit/Manifest |
20 |
@@ -2,3 +2,5 @@ DIST sysvinit-2.99.tar.xz 126908 BLAKE2B b82c745d5b695f918d4a163e7b9eaceccc07a46 |
21 |
DIST sysvinit-3.01.tar.xz 126616 BLAKE2B b991c6d2a09b02003cc587379b148f8ca3817c27fcaf81f184f679cfd5325e0b551484bba47bb554a34c7eeba60538f4943de49b1d59bd4bef73d7d086fefdb2 SHA512 66da3830aa32b70f0beea994213145a550e5b5d58a5b54afb17109243d5efface6aba8c296b76dbfb22ce6f86c9c58f237ff71ee04ec7d5b316ad412bf7acbcf |
22 |
DIST sysvinit-3.03.tar.xz 219956 BLAKE2B e2f9d838a67341cabac4b82d90c66b29470727383c4a4d86f2767863a9b9f6d60768069fa79636552aa3bef654bd2f0944cb35eb15a4f053d1fa9aaa4e04473d SHA512 920205d70e1384d11926739ab45d4a04c5a7d7263c50bd06288c806ebc3316d641bd05a5c67497c48951fafe32fc364e88bfb1cb2cc1d6787e9eb6c5e692061b |
23 |
DIST sysvinit-3.03.tar.xz.sig 833 BLAKE2B 7d851f4cd12e5745055bb78f531b97b1e9fb9a16260a713fc7ac91000208f04ec8f1109068ebe017838449c73b9e40679f248816050979d9624742dd6023eeef SHA512 a643447ed906b5e3249808eafc85f8b336ebfa6028adf8a8e8df82469b7f08cfe98f44b8e7f6b50168f70925eabf610760a185f10d0529ec1a5ff7337de70dc4 |
24 |
+DIST sysvinit-3.04.tar.xz 220184 BLAKE2B 5caa94fd09e5660fb39982b8c8d68ca5546d83a7f78450f4d7fe8fcd9ac429cd8d9f1ef63e9276221ac878ca2964874c1065d61bfd9ed8b0d1505b44c775b388 SHA512 059092ee857782e88f88e47475846f859589aa1062a6e1294fe8983a11d04a13811e0dd6d277431f45abc2d9d96e5358f6b2d2df1d291402fada66cd009a5fa9 |
25 |
+DIST sysvinit-3.04.tar.xz.sig 833 BLAKE2B 8f04051ea7c03ab447fe309ee61cb4d35a9c02f9a88699423097f9fe4544a26e89536f2625572d0781f792103ce88276db19c2b9ed9489c6ca969d54bc45c117 SHA512 38becfc0d0796570bc75661d4212ad3b1470eea33905694a5264b8b68054d3e47d9250da58f67d52807efcd96334f170a600dff72491f76de94df58077eb4dd0 |
26 |
|
27 |
diff --git a/sys-apps/sysvinit/sysvinit-3.04.ebuild b/sys-apps/sysvinit/sysvinit-3.04.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..2b673d969000 |
30 |
--- /dev/null |
31 |
+++ b/sys-apps/sysvinit/sysvinit-3.04.ebuild |
32 |
@@ -0,0 +1,177 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PLOCALES="de es fr pl" |
39 |
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/sysvinit.asc |
40 |
+inherit toolchain-funcs flag-o-matic plocale verify-sig |
41 |
+ |
42 |
+DESCRIPTION="/sbin/init - parent of all processes" |
43 |
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" |
44 |
+SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz" |
45 |
+SRC_URI+=" verify-sig? ( mirror://nongnu/${PN}/${P/_/-}.tar.xz.sig )" |
46 |
+S="${WORKDIR}/${P/_*}" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+if [[ ${PV} != *beta* ]] ; then |
51 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
52 |
+fi |
53 |
+IUSE="selinux ibm nls static" |
54 |
+ |
55 |
+COMMON_DEPEND=" |
56 |
+ selinux? ( |
57 |
+ >=sys-libs/libselinux-1.28 |
58 |
+ )" |
59 |
+DEPEND="${COMMON_DEPEND} |
60 |
+ virtual/os-headers" |
61 |
+# Old OpenRC blocker is for bug #587424 |
62 |
+# Keep for longer than usual given it's cheap and avoid user inconvenience |
63 |
+RDEPEND="${COMMON_DEPEND} |
64 |
+ !<app-i18n/man-pages-l10n-4.12.1-r2 |
65 |
+ !<sys-apps/openrc-0.13 |
66 |
+ selinux? ( sec-policy/selinux-shutdown )" |
67 |
+# po4a is for man page translations |
68 |
+BDEPEND="nls? ( app-text/po4a ) |
69 |
+ verify-sig? ( >=sec-keys/openpgp-keys-sysvinit-20220413 )" |
70 |
+ |
71 |
+PATCHES=( |
72 |
+ # bug #80220 |
73 |
+ "${FILESDIR}/${PN}-2.86-kexec.patch" |
74 |
+ # bug #158615 |
75 |
+ "${FILESDIR}/${PN}-2.94_beta-shutdown-single.patch" |
76 |
+) |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ default |
80 |
+ |
81 |
+ sed -i \ |
82 |
+ -e '/^CPPFLAGS =$/d' \ |
83 |
+ -e '/^override CFLAGS +=/s/ -fstack-protector-strong//' \ |
84 |
+ src/Makefile || die |
85 |
+ |
86 |
+ # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux |
87 |
+ sed -i -r \ |
88 |
+ -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \ |
89 |
+ -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ |
90 |
+ src/Makefile || die |
91 |
+ |
92 |
+ # pidof has moved to >=procps-3.3.9 |
93 |
+ sed -i -r \ |
94 |
+ -e '/\/bin\/pidof/d' \ |
95 |
+ -e '/^MAN8/s:\<pidof.8\>::g' \ |
96 |
+ src/Makefile || die |
97 |
+ |
98 |
+ # logsave is already in e2fsprogs |
99 |
+ sed -i -r \ |
100 |
+ -e '/^(USR)?S?BIN/s:\<logsave\>::g' \ |
101 |
+ -e '/^MAN8/s:\<logsave.8\>::g' \ |
102 |
+ src/Makefile || die |
103 |
+ |
104 |
+ # Mung inittab for specific architectures |
105 |
+ cd "${WORKDIR}" || die |
106 |
+ cp "${FILESDIR}"/inittab-2.98-r1 inittab || die "cp inittab" |
107 |
+ local insert=() |
108 |
+ use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) |
109 |
+ use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) |
110 |
+ use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) |
111 |
+ use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) |
112 |
+ use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) |
113 |
+ if use ibm ; then |
114 |
+ insert+=( |
115 |
+ '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' |
116 |
+ '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' |
117 |
+ ) |
118 |
+ fi |
119 |
+ (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab |
120 |
+ if use x86 || use amd64 ; then |
121 |
+ sed -i \ |
122 |
+ -e '/ttyS[01]/s:9600:115200:' \ |
123 |
+ inittab |
124 |
+ fi |
125 |
+ |
126 |
+ if [[ ${#insert[@]} -gt 0 ]] ; then |
127 |
+ printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab |
128 |
+ fi |
129 |
+ |
130 |
+ delete_unused_locale() { |
131 |
+ local locale=${1} |
132 |
+ |
133 |
+ einfo "Deleting non-requested man page translations for locale=${locale}" |
134 |
+ rm "${S}"/man/po/${locale}.po || die |
135 |
+ |
136 |
+ sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die |
137 |
+ } |
138 |
+ |
139 |
+ plocale_for_each_disabled_locale delete_unused_locale |
140 |
+} |
141 |
+ |
142 |
+src_compile() { |
143 |
+ tc-export CC |
144 |
+ |
145 |
+ append-lfs-flags |
146 |
+ |
147 |
+ # bug #381311 |
148 |
+ export DISTRO= |
149 |
+ export VERSION="${PV}" |
150 |
+ |
151 |
+ use static && append-ldflags -static |
152 |
+ emake -C src $(usex selinux 'WITH_SELINUX=yes' '') |
153 |
+ |
154 |
+ if use nls && [[ -n "$(plocale_get_locales)" ]] ; then |
155 |
+ cd man/po || die |
156 |
+ po4a po4a.cfg || die |
157 |
+ fi |
158 |
+} |
159 |
+ |
160 |
+src_install() { |
161 |
+ emake -C src install ROOT="${D}" |
162 |
+ dodoc README doc/* |
163 |
+ |
164 |
+ insinto /etc |
165 |
+ doins "${WORKDIR}"/inittab |
166 |
+ |
167 |
+ newinitd "${FILESDIR}"/bootlogd.initd bootlogd |
168 |
+ newconfd "${FILESDIR}"/bootlogd.confd bootlogd |
169 |
+ |
170 |
+ into / |
171 |
+ dosbin "${FILESDIR}"/halt.sh |
172 |
+ |
173 |
+ keepdir /etc/inittab.d |
174 |
+ |
175 |
+ if use nls && [[ -n "$(plocale_get_locales)" ]] ; then |
176 |
+ install_locale_man_pages() { |
177 |
+ doman -i18n=${1} man/po/${1}/* |
178 |
+ } |
179 |
+ |
180 |
+ plocale_for_each_locale install_locale_man_pages |
181 |
+ fi |
182 |
+ |
183 |
+ # Dead symlink |
184 |
+ find "${ED}" -xtype l -delete || die |
185 |
+ |
186 |
+ find "${ED}" -type d -empty -delete || die |
187 |
+} |
188 |
+ |
189 |
+pkg_postinst() { |
190 |
+ # Reload init to fix unmounting problems of / on next reboot. |
191 |
+ # This is really needed, as without the new version of init cause init |
192 |
+ # not to quit properly on reboot, and causes a fsck of / on next reboot. |
193 |
+ if [[ -z ${ROOT} ]] ; then |
194 |
+ if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then |
195 |
+ ln -s /dev/initctl /run/initctl \ |
196 |
+ || ewarn "Failed to set /run/initctl symlink!" |
197 |
+ fi |
198 |
+ # Do not return an error if this fails |
199 |
+ /sbin/telinit U &>/dev/null |
200 |
+ fi |
201 |
+ |
202 |
+ elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" |
203 |
+ elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." |
204 |
+ |
205 |
+ # Required for new bootlogd service |
206 |
+ if [[ ! -e "${EROOT}/var/log/boot" ]] ; then |
207 |
+ touch "${EROOT}/var/log/boot" |
208 |
+ fi |
209 |
+} |