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