Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
Date: Mon, 01 Feb 2016 15:21:18
Message-Id: 1454339823.73028e585d848395b750bf611148d8412fe6f317.williamh@gentoo
1 commit: 73028e585d848395b750bf611148d8412fe6f317
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 1 15:13:26 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 15:17:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73028e58
7
8 sys-apps/sysvinit: revision bump to 2.88-r8 for several bug fixes:
9
10 https://bugs.gentoo.org/show_bug.cgi?id=487384
11 https://bugs.gentoo.org/show_bug.cgi?id=506030
12 https://bugs.gentoo.org/show_bug.cgi?id=548826
13 https://bugs.gentoo.org/show_bug.cgi?id=573348
14
15 sys-apps/sysvinit/files/inittab-2.88 | 59 +++++++++++++++
16 sys-apps/sysvinit/sysvinit-2.88-r8.ebuild | 116 ++++++++++++++++++++++++++++++
17 2 files changed, 175 insertions(+)
18
19 diff --git a/sys-apps/sysvinit/files/inittab-2.88 b/sys-apps/sysvinit/files/inittab-2.88
20 new file mode 100644
21 index 0000000..5328d30
22 --- /dev/null
23 +++ b/sys-apps/sysvinit/files/inittab-2.88
24 @@ -0,0 +1,59 @@
25 +#
26 +# /etc/inittab: This file describes how the INIT process should set up
27 +# the system in a certain run-level.
28 +#
29 +# Author: Miquel van Smoorenburg, <miquels@×××××××.nl>
30 +# Modified by: Patrick J. Volkerding, <volkerdi@×××××××××.com>
31 +# Modified by: Daniel Robbins, <drobbins@g.o>
32 +# Modified by: Martin Schlemmer, <azarah@g.o>
33 +# Modified by: Mike Frysinger, <vapier@g.o>
34 +# Modified by: Robin H. Johnson, <robbat2@g.o>
35 +#
36 +# $Id$
37 +
38 +# Default runlevel.
39 +id:3:initdefault:
40 +
41 +# System initialization, mount local filesystems, etc.
42 +si::sysinit:/sbin/openrc sysinit
43 +
44 +# Further system initialization, brings up the boot runlevel.
45 +rc::bootwait:/sbin/openrc boot
46 +
47 +l0:0:wait:/sbin/openrc shutdown
48 +l0s:0:wait:/sbin/halt -dhnp
49 +l1:1:wait:/sbin/openrc single
50 +l2:2:wait:/sbin/openrc nonetwork
51 +l3:3:wait:/sbin/openrc default
52 +l4:4:wait:/sbin/openrc default
53 +l5:5:wait:/sbin/openrc default
54 +l6:6:wait:/sbin/openrc reboot
55 +l6r:6:wait:/sbin/reboot -dkn
56 +#z6:6:respawn:/sbin/sulogin
57 +
58 +# new-style single-user
59 +su0:S:wait:/sbin/openrc single
60 +su1:S:wait:/sbin/sulogin
61 +
62 +# TERMINALS
63 +x1:12345:respawn:/sbin/agetty 38400 console linux
64 +c1:12345:respawn:/sbin/agetty 38400 tty1 linux
65 +c2:2345:respawn:/sbin/agetty 38400 tty2 linux
66 +c3:2345:respawn:/sbin/agetty 38400 tty3 linux
67 +c4:2345:respawn:/sbin/agetty 38400 tty4 linux
68 +c5:2345:respawn:/sbin/agetty 38400 tty5 linux
69 +c6:2345:respawn:/sbin/agetty 38400 tty6 linux
70 +
71 +# SERIAL CONSOLES
72 +#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
73 +#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100
74 +
75 +# What to do at the "Three Finger Salute".
76 +ca:12345:ctrlaltdel:/sbin/shutdown -r now
77 +
78 +# Used by /etc/init.d/xdm to control DM startup.
79 +# Read the comments in /etc/init.d/xdm for more
80 +# info. Do NOT remove, as this will start nothing
81 +# extra at boot if /etc/init.d/xdm is not added
82 +# to the "default" runlevel.
83 +x:a:once:/etc/X11/startDM.sh
84
85 diff --git a/sys-apps/sysvinit/sysvinit-2.88-r8.ebuild b/sys-apps/sysvinit/sysvinit-2.88-r8.ebuild
86 new file mode 100644
87 index 0000000..acc8a8d
88 --- /dev/null
89 +++ b/sys-apps/sysvinit/sysvinit-2.88-r8.ebuild
90 @@ -0,0 +1,116 @@
91 +# Copyright 1999-2014 Gentoo Foundation
92 +# Distributed under the terms of the GNU General Public License v2
93 +# $Id$
94 +
95 +EAPI="4"
96 +
97 +inherit eutils toolchain-funcs flag-o-matic
98 +
99 +DESCRIPTION="/sbin/init - parent of all processes"
100 +HOMEPAGE="http://savannah.nongnu.org/projects/sysvinit"
101 +SRC_URI="mirror://nongnu/${PN}/${P}dsf.tar.bz2"
102 +
103 +LICENSE="GPL-2"
104 +SLOT="0"
105 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
106 +IUSE="selinux ibm static kernel_FreeBSD"
107 +
108 +CDEPEND="
109 + selinux? (
110 + >=sys-libs/libselinux-1.28
111 + )"
112 +DEPEND="${CDEPEND}
113 + virtual/os-headers"
114 +RDEPEND="${CDEPEND}
115 + selinux? ( sec-policy/selinux-shutdown )
116 +"
117 +
118 +S=${WORKDIR}/${P}dsf
119 +
120 +src_prepare() {
121 + epatch "${FILESDIR}"/${PN}-2.86-kexec.patch #80220
122 + epatch "${FILESDIR}"/${PN}-2.86-shutdown-single.patch #158615
123 + epatch "${FILESDIR}"/${P}-makefile.patch #319197
124 + epatch "${FILESDIR}"/${P}-selinux.patch #326697
125 + epatch "${FILESDIR}"/${P}-shutdown-h.patch #449354
126 + sed -i '/^CPPFLAGS =$/d' src/Makefile || die
127 +
128 + # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
129 + sed -i -r \
130 + -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
131 + -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
132 + src/Makefile || die
133 +
134 + # pidof has moved to >=procps-3.3.9
135 + sed -i -r \
136 + -e '/\/bin\/pidof/d' \
137 + -e '/^MAN8/s:\<pidof.8\>::g' \
138 + src/Makefile || die
139 +
140 + # Mung inittab for specific architectures
141 + cd "${WORKDIR}"
142 + cp "${FILESDIR}"/inittab-2.88 inittab || die "cp inittab"
143 + local insert=()
144 + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' )
145 + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' )
146 + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' )
147 + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' )
148 + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' )
149 + if use ibm ; then
150 + insert+=(
151 + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0'
152 + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0'
153 + )
154 + fi
155 + (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab
156 + if use kernel_FreeBSD ; then
157 + sed -i \
158 + -e 's/linux/cons25/g' \
159 + -e 's/ttyS0/cuaa0/g' \
160 + -e 's/ttyS1/cuaa1/g' \
161 + inittab #121786
162 + fi
163 + if use x86 || use amd64 ; then
164 + sed -i \
165 + -e '/ttyS[01]/s:9600:115200:' \
166 + inittab
167 + fi
168 + if [[ ${#insert[@]} -gt 0 ]] ; then
169 + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab
170 + fi
171 +}
172 +
173 +src_compile() {
174 + local myconf
175 +
176 + tc-export CC
177 + append-lfs-flags
178 + export DISTRO= #381311
179 + use static && append-ldflags -static
180 + use selinux && myconf=WITH_SELINUX=yes
181 + emake -C src ${myconf} || die
182 +}
183 +
184 +src_install() {
185 + emake -C src install ROOT="${D}"
186 + dodoc README doc/*
187 +
188 + insinto /etc
189 + doins "${WORKDIR}"/inittab
190 +
191 + # dead symlink
192 + rm -f "${D}"/usr/bin/lastb
193 +}
194 +
195 +pkg_postinst() {
196 + # Reload init to fix unmounting problems of / on next reboot.
197 + # This is really needed, as without the new version of init cause init
198 + # not to quit properly on reboot, and causes a fsck of / on next reboot.
199 + if [[ ${ROOT} == / ]] ; then
200 + # Do not return an error if this fails
201 + /sbin/telinit U &>/dev/null
202 + fi
203 +
204 + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to"
205 + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps."
206 +}