1 |
commit: 70742d346f28949a1fe6d675784a5fcde8bee6ec |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Thu Sep 10 01:31:21 2020 +0000 |
4 |
Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 30 19:17:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70742d34 |
7 |
|
8 |
sys-apps/sysvinit: refactor startDM to display-manager-init |
9 |
|
10 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org> |
13 |
|
14 |
sys-apps/sysvinit/files/inittab-2.98-r1 | 63 +++++++++++++ |
15 |
sys-apps/sysvinit/sysvinit-2.98-r1.ebuild | 144 ++++++++++++++++++++++++++++++ |
16 |
2 files changed, 207 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/sysvinit/files/inittab-2.98-r1 b/sys-apps/sysvinit/files/inittab-2.98-r1 |
19 |
new file mode 100644 |
20 |
index 00000000000..89c8bd9274b |
21 |
--- /dev/null |
22 |
+++ b/sys-apps/sysvinit/files/inittab-2.98-r1 |
23 |
@@ -0,0 +1,63 @@ |
24 |
+# |
25 |
+# /etc/inittab: This file describes how the INIT process should set up |
26 |
+# the system in a certain run-level. |
27 |
+# |
28 |
+# Author: Miquel van Smoorenburg, <miquels@×××××××.nl> |
29 |
+# Modified by: Patrick J. Volkerding, <volkerdi@×××××××××.com> |
30 |
+# Modified by: Daniel Robbins, <drobbins@g.o> |
31 |
+# Modified by: Martin Schlemmer, <azarah@g.o> |
32 |
+# Modified by: Mike Frysinger, <vapier@g.o> |
33 |
+# Modified by: Robin H. Johnson, <robbat2@g.o> |
34 |
+# Modified by: William Hubbs, <williamh@g.o> |
35 |
+# Modified by: Lars Wendler, <polynomial-c@g.o> |
36 |
+# Modified by: Aisha Tammy, <gentoo@×××××.cc> |
37 |
+# |
38 |
+ |
39 |
+# Default runlevel. |
40 |
+id:3:initdefault: |
41 |
+ |
42 |
+# System initialization, mount local filesystems, etc. |
43 |
+si::sysinit:/sbin/openrc sysinit |
44 |
+ |
45 |
+# Further system initialization, brings up the boot runlevel. |
46 |
+rc::bootwait:/sbin/openrc boot |
47 |
+ |
48 |
+l0u:0:wait:/sbin/telinit u |
49 |
+l0:0:wait:/sbin/openrc shutdown |
50 |
+l0s:0:wait:/sbin/halt.sh |
51 |
+l1:1:wait:/sbin/openrc single |
52 |
+l2:2:wait:/sbin/openrc nonetwork |
53 |
+l3:3:wait:/sbin/openrc default |
54 |
+l4:4:wait:/sbin/openrc default |
55 |
+l5:5:wait:/sbin/openrc default |
56 |
+l6u:6:wait:/sbin/telinit u |
57 |
+l6:6:wait:/sbin/openrc reboot |
58 |
+l6r:6:wait:/sbin/reboot -dkn |
59 |
+#z6:6:respawn:/sbin/sulogin |
60 |
+ |
61 |
+# new-style single-user |
62 |
+su0:S:wait:/sbin/openrc single |
63 |
+su1:S:wait:/sbin/sulogin |
64 |
+ |
65 |
+# TERMINALS |
66 |
+#x1:12345:respawn:/sbin/agetty 38400 console linux |
67 |
+c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux |
68 |
+c2:2345:respawn:/sbin/agetty 38400 tty2 linux |
69 |
+c3:2345:respawn:/sbin/agetty 38400 tty3 linux |
70 |
+c4:2345:respawn:/sbin/agetty 38400 tty4 linux |
71 |
+c5:2345:respawn:/sbin/agetty 38400 tty5 linux |
72 |
+c6:2345:respawn:/sbin/agetty 38400 tty6 linux |
73 |
+ |
74 |
+# SERIAL CONSOLES |
75 |
+#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100 |
76 |
+#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100 |
77 |
+ |
78 |
+# What to do at the "Three Finger Salute". |
79 |
+ca:12345:ctrlaltdel:/sbin/shutdown -r now |
80 |
+ |
81 |
+# Used by /etc/init.d/display-manager to control DM startup. |
82 |
+# Read the comments in /etc/init.d/display-manager for more |
83 |
+# info. Do NOT remove, as this will start nothing |
84 |
+# extra at boot if /etc/init.d/display-manager is not added |
85 |
+# to the "default" runlevel. |
86 |
+x:a:once:/usr/bin/startDM |
87 |
|
88 |
diff --git a/sys-apps/sysvinit/sysvinit-2.98-r1.ebuild b/sys-apps/sysvinit/sysvinit-2.98-r1.ebuild |
89 |
new file mode 100644 |
90 |
index 00000000000..3fdd9425576 |
91 |
--- /dev/null |
92 |
+++ b/sys-apps/sysvinit/sysvinit-2.98-r1.ebuild |
93 |
@@ -0,0 +1,144 @@ |
94 |
+# Copyright 1999-2020 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=7 |
98 |
+ |
99 |
+inherit toolchain-funcs flag-o-matic |
100 |
+ |
101 |
+DESCRIPTION="/sbin/init - parent of all processes" |
102 |
+HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" |
103 |
+SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz" |
104 |
+ |
105 |
+LICENSE="GPL-2" |
106 |
+SLOT="0" |
107 |
+[[ "${PV}" == *beta* ]] || \ |
108 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
109 |
+IUSE="selinux ibm static kernel_FreeBSD" |
110 |
+ |
111 |
+CDEPEND=" |
112 |
+ selinux? ( |
113 |
+ >=sys-libs/libselinux-1.28 |
114 |
+ )" |
115 |
+DEPEND="${CDEPEND} |
116 |
+ virtual/os-headers" |
117 |
+RDEPEND="${CDEPEND} |
118 |
+ selinux? ( sec-policy/selinux-shutdown ) |
119 |
+ !<sys-apps/openrc-0.13 |
120 |
+" |
121 |
+ |
122 |
+S="${WORKDIR}/${P/_*}" |
123 |
+ |
124 |
+PATCHES=( |
125 |
+ "${FILESDIR}/${PN}-2.86-kexec.patch" #80220 |
126 |
+ "${FILESDIR}/${PN}-2.94_beta-shutdown-single.patch" #158615 |
127 |
+ "${FILESDIR}/${PN}-2.95_beta-shutdown-h.patch" #449354 |
128 |
+) |
129 |
+ |
130 |
+src_prepare() { |
131 |
+ default |
132 |
+ |
133 |
+ sed -i \ |
134 |
+ -e '/^CPPFLAGS =$/d' \ |
135 |
+ -e '/^override CFLAGS +=/s/ -fstack-protector-strong//' \ |
136 |
+ src/Makefile || die |
137 |
+ |
138 |
+ # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux |
139 |
+ sed -i -r \ |
140 |
+ -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \ |
141 |
+ -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ |
142 |
+ src/Makefile || die |
143 |
+ |
144 |
+ # pidof has moved to >=procps-3.3.9 |
145 |
+ sed -i -r \ |
146 |
+ -e '/\/bin\/pidof/d' \ |
147 |
+ -e '/^MAN8/s:\<pidof.8\>::g' \ |
148 |
+ src/Makefile || die |
149 |
+ |
150 |
+ # logsave is already in e2fsprogs |
151 |
+ sed -i -r \ |
152 |
+ -e '/^(USR)?S?BIN/s:\<logsave\>::g' \ |
153 |
+ -e '/^MAN8/s:\<logsave.8\>::g' \ |
154 |
+ src/Makefile || die |
155 |
+ |
156 |
+ # Mung inittab for specific architectures |
157 |
+ cd "${WORKDIR}" || die |
158 |
+ cp "${FILESDIR}"/inittab-2.98-r1 inittab || die "cp inittab" |
159 |
+ local insert=() |
160 |
+ use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) |
161 |
+ use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) |
162 |
+ use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) |
163 |
+ use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) |
164 |
+ use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) |
165 |
+ if use ibm ; then |
166 |
+ insert+=( |
167 |
+ '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' |
168 |
+ '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' |
169 |
+ ) |
170 |
+ fi |
171 |
+ (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab |
172 |
+ if use kernel_FreeBSD ; then |
173 |
+ sed -i \ |
174 |
+ -e 's/linux/cons25/g' \ |
175 |
+ -e 's/ttyS0/cuaa0/g' \ |
176 |
+ -e 's/ttyS1/cuaa1/g' \ |
177 |
+ inittab #121786 |
178 |
+ fi |
179 |
+ if use x86 || use amd64 ; then |
180 |
+ sed -i \ |
181 |
+ -e '/ttyS[01]/s:9600:115200:' \ |
182 |
+ inittab |
183 |
+ fi |
184 |
+ if [[ ${#insert[@]} -gt 0 ]] ; then |
185 |
+ printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+src_compile() { |
190 |
+ tc-export CC |
191 |
+ append-lfs-flags |
192 |
+ export DISTRO= #381311 |
193 |
+ export VERSION="${PV}" |
194 |
+ use static && append-ldflags -static |
195 |
+ emake -C src $(usex selinux 'WITH_SELINUX=yes' '') |
196 |
+} |
197 |
+ |
198 |
+src_install() { |
199 |
+ emake -C src install ROOT="${D}" |
200 |
+ dodoc README doc/* |
201 |
+ |
202 |
+ insinto /etc |
203 |
+ doins "${WORKDIR}"/inittab |
204 |
+ |
205 |
+ newinitd "${FILESDIR}"/bootlogd.initd bootlogd |
206 |
+ into / |
207 |
+ dosbin "${FILESDIR}"/halt.sh |
208 |
+ |
209 |
+ keepdir /etc/inittab.d |
210 |
+ |
211 |
+ # dead symlink |
212 |
+ find "${ED}" -xtype l -delete || die |
213 |
+ |
214 |
+ find "${ED}" -type d -empty -delete || die |
215 |
+} |
216 |
+ |
217 |
+pkg_postinst() { |
218 |
+ # Reload init to fix unmounting problems of / on next reboot. |
219 |
+ # This is really needed, as without the new version of init cause init |
220 |
+ # not to quit properly on reboot, and causes a fsck of / on next reboot. |
221 |
+ if [[ -z ${ROOT} ]] ; then |
222 |
+ if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then |
223 |
+ ln -s /dev/initctl /run/initctl \ |
224 |
+ || ewarn "Failed to set /run/initctl symlink!" |
225 |
+ fi |
226 |
+ # Do not return an error if this fails |
227 |
+ /sbin/telinit U &>/dev/null |
228 |
+ fi |
229 |
+ |
230 |
+ elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" |
231 |
+ elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." |
232 |
+ |
233 |
+ # Required for new bootlogd service |
234 |
+ if [[ ! -e "${EROOT}/var/log/boot" ]] ; then |
235 |
+ touch "${EROOT}/var/log/boot" |
236 |
+ fi |
237 |
+} |