1 |
commit: 197f9a2896d6a0e15eb9668348de139fe478b1e2 |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Tue Aug 20 18:42:36 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 20 18:43:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=197f9a28 |
7 |
|
8 |
sys-apps/openrc: remove several old versions |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
12 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
13 |
|
14 |
sys-apps/openrc/Manifest | 2 - |
15 |
sys-apps/openrc/openrc-0.34.11.ebuild | 327 -------------------------------- |
16 |
sys-apps/openrc/openrc-0.38.3-r1.ebuild | 326 ------------------------------- |
17 |
sys-apps/openrc/openrc-0.38.3.ebuild | 326 ------------------------------- |
18 |
4 files changed, 981 deletions(-) |
19 |
|
20 |
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest |
21 |
index c2452410c3d..ada9e54501b 100644 |
22 |
--- a/sys-apps/openrc/Manifest |
23 |
+++ b/sys-apps/openrc/Manifest |
24 |
@@ -1,4 +1,2 @@ |
25 |
-DIST openrc-0.34.11.tar.gz 228054 BLAKE2B 8d4fdd7de4b3c44df0ccec728b91bd2624582dc2bbdb1fa7892aa61ce0a953a7cf66964f38da888636d895e3c6b776747a4a7fbbdbbbd26029313695f35837fe SHA512 76245d31c6fe9e90e5e2f35ce918b915fc88c231674e0c99dc98b8f3fa120e794900eec9919a0ab029a081b206393246eccb9119a79c90ad6e39325d022928be |
26 |
-DIST openrc-0.38.3.tar.gz 238031 BLAKE2B 87d1546e21d581feda4064cd64bf43f762203becdcc4b002bf868f17403bd42770cb1106a8bc383c8d69e19ad66ad2bedaa7090c95206597e8a9b6e2ba481dcc SHA512 6bb42ccdab5fb24b11f5042bf19850f440d3494b6bd1d7b8db31b592f051fcd26feac1c8d9ef515238c53c6f5bf98a8c367a48471c178ae829e05c56bd24cfde |
27 |
DIST openrc-0.41.2.tar.gz 245302 BLAKE2B ab80dc4f3a7c2c464fe64cdfa7fd31363d5a9d25e90d0239325be05561e5802f22c47013fde82650f5ce08cf99f16f5f479d8617c254647b8c40cec9609d0b6b SHA512 ebfa691cae4704bb3023ea0508a712a45b8c20809828729dfa5292e96f3fd1b309813d80d7c286d0c09680bf5378aba40cfd994f27951f43a3ffb1fd0d69a58b |
28 |
DIST openrc-0.42.tar.gz 242670 BLAKE2B df3c1594cb441228dd9c5f16e0758bd3a62cd51c8797ce57b6c290b0b8d80307eb5e43a4a6107da8d6911777524deac48cea48f6b96a5d4eab4e5c81fa11a835 SHA512 200f3f0054e766accce332bc86941367f99f0c6a0b00bf1faad877ff9ac7cfa36a90a60432361483c0d2a778bed0d811130ad692aea64b2e2d34c5b95940b68a |
29 |
|
30 |
diff --git a/sys-apps/openrc/openrc-0.34.11.ebuild b/sys-apps/openrc/openrc-0.34.11.ebuild |
31 |
deleted file mode 100644 |
32 |
index 9ae507eb58b..00000000000 |
33 |
--- a/sys-apps/openrc/openrc-0.34.11.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,327 +0,0 @@ |
36 |
-# Copyright 1999-2018 Gentoo Foundation |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=6 |
40 |
- |
41 |
-inherit flag-o-matic pam toolchain-funcs usr-ldscript |
42 |
- |
43 |
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
44 |
-HOMEPAGE="https://github.com/openrc/openrc/" |
45 |
- |
46 |
-if [[ ${PV} == "9999" ]]; then |
47 |
- EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
48 |
- inherit git-r3 |
49 |
-else |
50 |
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
51 |
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
52 |
-fi |
53 |
- |
54 |
-LICENSE="BSD-2" |
55 |
-SLOT="0" |
56 |
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
57 |
- unicode kernel_linux kernel_FreeBSD" |
58 |
- |
59 |
-COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
60 |
- ncurses? ( sys-libs/ncurses:0= ) |
61 |
- pam? ( |
62 |
- sys-auth/pambase |
63 |
- virtual/pam |
64 |
- ) |
65 |
- audit? ( sys-process/audit ) |
66 |
- kernel_linux? ( |
67 |
- sys-process/psmisc |
68 |
- !<sys-process/procps-3.3.9-r2 |
69 |
- ) |
70 |
- selinux? ( |
71 |
- sys-apps/policycoreutils |
72 |
- >=sys-libs/libselinux-2.6 |
73 |
- ) |
74 |
- !<sys-apps/baselayout-2.1-r1 |
75 |
- !<sys-fs/udev-init-scripts-27" |
76 |
-DEPEND="${COMMON_DEPEND} |
77 |
- virtual/os-headers |
78 |
- ncurses? ( virtual/pkgconfig )" |
79 |
-RDEPEND="${COMMON_DEPEND} |
80 |
- !prefix? ( |
81 |
- kernel_linux? ( |
82 |
- >=sys-apps/sysvinit-2.86-r6[selinux?] |
83 |
- virtual/tmpfiles |
84 |
- ) |
85 |
- kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
86 |
- ) |
87 |
- selinux? ( |
88 |
- >=sec-policy/selinux-base-policy-2.20170204-r4 |
89 |
- >=sec-policy/selinux-openrc-2.20170204-r4 |
90 |
- ) |
91 |
-" |
92 |
- |
93 |
-PDEPEND="netifrc? ( net-misc/netifrc )" |
94 |
- |
95 |
-src_prepare() { |
96 |
- default |
97 |
- |
98 |
- sed -i 's:0444:0644:' mk/sys.mk || die |
99 |
- |
100 |
- if [[ ${PV} == "9999" ]] ; then |
101 |
- local ver="git-${EGIT_VERSION:0:6}" |
102 |
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
103 |
- fi |
104 |
-} |
105 |
- |
106 |
-src_compile() { |
107 |
- unset LIBDIR #266688 |
108 |
- |
109 |
- MAKE_ARGS="${MAKE_ARGS} |
110 |
- LIBNAME=$(get_libdir) |
111 |
- LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc |
112 |
- MKNET=$(usex newnet) |
113 |
- MKSELINUX=$(usex selinux) |
114 |
- MKAUDIT=$(usex audit) |
115 |
- MKPAM=$(usev pam) |
116 |
- MKSTATICLIBS=$(usex static-libs)" |
117 |
- |
118 |
- local brand="Unknown" |
119 |
- if use kernel_linux ; then |
120 |
- MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
121 |
- brand="Linux" |
122 |
- elif use kernel_FreeBSD ; then |
123 |
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
124 |
- brand="FreeBSD" |
125 |
- fi |
126 |
- export BRANDING="Gentoo ${brand}" |
127 |
- use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
128 |
- export DEBUG=$(usev debug) |
129 |
- export MKTERMCAP=$(usev ncurses) |
130 |
- |
131 |
- tc-export CC AR RANLIB |
132 |
- emake ${MAKE_ARGS} |
133 |
-} |
134 |
- |
135 |
-# set_config <file> <option name> <yes value> <no value> test |
136 |
-# a value of "#" will just comment out the option |
137 |
-set_config() { |
138 |
- local file="${ED}/$1" var=$2 val com |
139 |
- eval "${@:5}" && val=$3 || val=$4 |
140 |
- [[ ${val} == "#" ]] && com="#" && val='\2' |
141 |
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
142 |
-} |
143 |
- |
144 |
-set_config_yes_no() { |
145 |
- set_config "$1" "$2" YES NO "${@:3}" |
146 |
-} |
147 |
- |
148 |
-src_install() { |
149 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install |
150 |
- |
151 |
- # move the shared libs back to /usr so ldscript can install |
152 |
- # more of a minimal set of files |
153 |
- # disabled for now due to #270646 |
154 |
- #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
155 |
- #gen_usr_ldscript -a einfo rc |
156 |
- gen_usr_ldscript libeinfo.so |
157 |
- gen_usr_ldscript librc.so |
158 |
- |
159 |
- if ! use kernel_linux; then |
160 |
- keepdir /$(get_libdir)/rc/init.d |
161 |
- fi |
162 |
- keepdir /$(get_libdir)/rc/tmp |
163 |
- |
164 |
- # Backup our default runlevels |
165 |
- dodir /usr/share/"${PN}" |
166 |
- cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
167 |
- rm -rf "${ED}"/etc/runlevels |
168 |
- |
169 |
- # Setup unicode defaults for silly unicode users |
170 |
- set_config_yes_no /etc/rc.conf unicode use unicode |
171 |
- |
172 |
- # Cater to the norm |
173 |
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
174 |
- |
175 |
- # On HPPA, do not run consolefont by default (bug #222889) |
176 |
- if use hppa; then |
177 |
- rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
178 |
- fi |
179 |
- |
180 |
- # Support for logfile rotation |
181 |
- insinto /etc/logrotate.d |
182 |
- newins "${FILESDIR}"/openrc.logrotate openrc |
183 |
- |
184 |
- # install gentoo pam.d files |
185 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
186 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
187 |
- |
188 |
- # install documentation |
189 |
- dodoc ChangeLog *.md |
190 |
- if use newnet; then |
191 |
- dodoc README.newnet |
192 |
- fi |
193 |
-} |
194 |
- |
195 |
-add_boot_init() { |
196 |
- local initd=$1 |
197 |
- local runlevel=${2:-boot} |
198 |
- # if the initscript is not going to be installed and is not |
199 |
- # currently installed, return |
200 |
- [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
201 |
- || return |
202 |
- [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
203 |
- |
204 |
- # if runlevels dont exist just yet, then create it but still flag |
205 |
- # to pkg_postinst that it needs real setup #277323 |
206 |
- if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
207 |
- mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
208 |
- touch "${EROOT}"etc/runlevels/.add_boot_init.created |
209 |
- fi |
210 |
- |
211 |
- elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
212 |
- ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
213 |
-} |
214 |
-add_boot_init_mit_config() { |
215 |
- local config=$1 initd=$2 |
216 |
- if [[ -e ${EROOT}${config} ]] ; then |
217 |
- if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
218 |
- add_boot_init ${initd} |
219 |
- fi |
220 |
- fi |
221 |
-} |
222 |
- |
223 |
-pkg_preinst() { |
224 |
- local f LIBDIR=$(get_libdir) |
225 |
- |
226 |
- # avoid default thrashing in conf.d files when possible #295406 |
227 |
- if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
228 |
- ( |
229 |
- unset hostname HOSTNAME |
230 |
- source "${EROOT}"etc/conf.d/hostname |
231 |
- : ${hostname:=${HOSTNAME}} |
232 |
- [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
233 |
- ) |
234 |
- fi |
235 |
- |
236 |
- # set default interactive shell to sulogin if it exists |
237 |
- set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
238 |
- |
239 |
- # termencoding was added in 0.2.1 and needed in boot |
240 |
- has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
241 |
- |
242 |
- # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
243 |
- has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
244 |
- |
245 |
- if ! has_version ">=sys-apps/openrc-0.11"; then |
246 |
- add_boot_init sysfs sysinit |
247 |
- fi |
248 |
- |
249 |
- if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
250 |
- migrate_udev_mount_script |
251 |
- fi |
252 |
- |
253 |
- # these were added in 0.12. |
254 |
- if ! has_version ">=sys-apps/openrc-0.12"; then |
255 |
- add_boot_init loopback |
256 |
- |
257 |
- # ensure existing /etc/conf.d/net is not removed |
258 |
- # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
259 |
- # this needs to stay in openrc ebuilds for a long time. :( |
260 |
- # Added in 0.12. |
261 |
- if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
262 |
- einfo "Modifying conf.d/net to keep it from being removed" |
263 |
- cat <<-EOF >>"${EROOT}"etc/conf.d/net |
264 |
- |
265 |
-# The network scripts are now part of net-misc/netifrc |
266 |
-# In order to avoid sys-apps/${P} from removing this file, this comment was |
267 |
-# added; you can safely remove this comment. Please see |
268 |
-# /usr/share/doc/netifrc*/README* for more information. |
269 |
-EOF |
270 |
- fi |
271 |
- fi |
272 |
- has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
273 |
- |
274 |
- if ! has_version ">=sys-apps/openrc-0.18.3"; then |
275 |
- add_boot_init mtab |
276 |
- if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
277 |
- ewarn "${EROOT}etc/mtab will be replaced with a" |
278 |
- ewarn "symbolic link to /proc/self/mounts on the next" |
279 |
- ewarn "reboot." |
280 |
- ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
281 |
- ewarn "if you do not want this to happen." |
282 |
- fi |
283 |
- fi |
284 |
-} |
285 |
- |
286 |
-# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
287 |
-migrate_udev_mount_script() { |
288 |
- if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
289 |
- ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
290 |
- add_boot_init udev-mount sysinit |
291 |
- fi |
292 |
- return 0 |
293 |
-} |
294 |
- |
295 |
-pkg_postinst() { |
296 |
- local LIBDIR=$(get_libdir) |
297 |
- |
298 |
- # Make our runlevels if they don't exist |
299 |
- if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
300 |
- einfo "Copying across default runlevels" |
301 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
302 |
- rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
303 |
- else |
304 |
- if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
305 |
- mkdir -p "${EROOT}"etc/runlevels/sysinit |
306 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
307 |
- "${EROOT}"etc/runlevels/sysinit |
308 |
- fi |
309 |
- if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
310 |
- mkdir -p "${EROOT}"etc/runlevels/shutdown |
311 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
312 |
- "${EROOT}"etc/runlevels/shutdown |
313 |
- fi |
314 |
- if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
315 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
316 |
- "${EROOT}"etc/runlevels |
317 |
- fi |
318 |
- fi |
319 |
- |
320 |
- if use hppa; then |
321 |
- elog "Setting the console font does not work on all HPPA consoles." |
322 |
- elog "You can still enable it by running:" |
323 |
- elog "# rc-update add consolefont boot" |
324 |
- fi |
325 |
- |
326 |
- # Handle the conf.d/local.{start,stop} -> local.d transition |
327 |
- if [[ -f ${EROOT}etc/conf.d/local.start || -f ${EROOT}etc/conf.d/local.stop ]] ; then |
328 |
- elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}" |
329 |
- elog "files to ${EROOT}etc/local.d" |
330 |
- mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start |
331 |
- mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop |
332 |
- chmod +x "${EROOT}"etc/local.d/*{start,stop} |
333 |
- fi |
334 |
- |
335 |
- if use kernel_linux && [[ "${EROOT}" = "/" ]]; then |
336 |
- if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then |
337 |
- ewarn "The dependency data could not be migrated to /run/openrc." |
338 |
- ewarn "This means you need to reboot your system." |
339 |
- fi |
340 |
- fi |
341 |
- |
342 |
- # update the dependency tree after touching all files #224171 |
343 |
- [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u |
344 |
- |
345 |
- if ! use newnet && ! use netifrc; then |
346 |
- ewarn "You have emerged OpenRc without network support. This" |
347 |
- ewarn "means you need to SET UP a network manager such as" |
348 |
- ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
349 |
- ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
350 |
- ewarn "Or, you have the option of emerging openrc with the newnet" |
351 |
- ewarn "use flag and configuring /etc/conf.d/network and" |
352 |
- ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
353 |
- ewarn |
354 |
- fi |
355 |
- |
356 |
- if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
357 |
- ewarn "Please add the network service to your boot runlevel" |
358 |
- ewarn "as soon as possible. Not doing so could leave you with a system" |
359 |
- ewarn "without networking." |
360 |
- ewarn |
361 |
- fi |
362 |
-} |
363 |
|
364 |
diff --git a/sys-apps/openrc/openrc-0.38.3-r1.ebuild b/sys-apps/openrc/openrc-0.38.3-r1.ebuild |
365 |
deleted file mode 100644 |
366 |
index e9d7ad4ad0c..00000000000 |
367 |
--- a/sys-apps/openrc/openrc-0.38.3-r1.ebuild |
368 |
+++ /dev/null |
369 |
@@ -1,326 +0,0 @@ |
370 |
-# Copyright 1999-2019 Gentoo Authors |
371 |
-# Distributed under the terms of the GNU General Public License v2 |
372 |
- |
373 |
-EAPI=6 |
374 |
- |
375 |
-inherit flag-o-matic pam toolchain-funcs usr-ldscript |
376 |
- |
377 |
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
378 |
-HOMEPAGE="https://github.com/openrc/openrc/" |
379 |
- |
380 |
-if [[ ${PV} == "9999" ]]; then |
381 |
- EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
382 |
- inherit git-r3 |
383 |
-else |
384 |
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
385 |
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
386 |
-fi |
387 |
- |
388 |
-LICENSE="BSD-2" |
389 |
-SLOT="0" |
390 |
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
391 |
- unicode kernel_linux kernel_FreeBSD" |
392 |
- |
393 |
-COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
394 |
- ncurses? ( sys-libs/ncurses:0= ) |
395 |
- pam? ( |
396 |
- sys-auth/pambase |
397 |
- virtual/pam |
398 |
- ) |
399 |
- audit? ( sys-process/audit ) |
400 |
- kernel_linux? ( |
401 |
- sys-process/psmisc |
402 |
- !<sys-process/procps-3.3.9-r2 |
403 |
- ) |
404 |
- selinux? ( |
405 |
- sys-apps/policycoreutils |
406 |
- >=sys-libs/libselinux-2.6 |
407 |
- ) |
408 |
- !<sys-apps/baselayout-2.1-r1 |
409 |
- !<sys-fs/udev-init-scripts-27" |
410 |
-DEPEND="${COMMON_DEPEND} |
411 |
- virtual/os-headers |
412 |
- ncurses? ( virtual/pkgconfig )" |
413 |
-RDEPEND="${COMMON_DEPEND} |
414 |
- !prefix? ( |
415 |
- kernel_linux? ( |
416 |
- >=sys-apps/sysvinit-2.86-r6[selinux?] |
417 |
- virtual/tmpfiles |
418 |
- ) |
419 |
- kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
420 |
- ) |
421 |
- selinux? ( |
422 |
- >=sec-policy/selinux-base-policy-2.20170204-r4 |
423 |
- >=sec-policy/selinux-openrc-2.20170204-r4 |
424 |
- ) |
425 |
- !<app-shells/gentoo-bashcomp-20180302 |
426 |
- !<app-shells/gentoo-zsh-completions-20180228 |
427 |
-" |
428 |
- |
429 |
-PDEPEND="netifrc? ( net-misc/netifrc )" |
430 |
- |
431 |
-src_prepare() { |
432 |
- default |
433 |
- if [[ ${PV} == "9999" ]] ; then |
434 |
- local ver="git-${EGIT_VERSION:0:6}" |
435 |
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
436 |
- fi |
437 |
-} |
438 |
- |
439 |
-src_compile() { |
440 |
- unset LIBDIR #266688 |
441 |
- |
442 |
- MAKE_ARGS="${MAKE_ARGS} |
443 |
- LIBNAME=$(get_libdir) |
444 |
- LIBEXECDIR=${EPREFIX}/lib/rc |
445 |
- MKBASHCOMP=yes |
446 |
- MKNET=$(usex newnet) |
447 |
- MKSELINUX=$(usex selinux) |
448 |
- MKAUDIT=$(usex audit) |
449 |
- MKPAM=$(usev pam) |
450 |
- MKSTATICLIBS=$(usex static-libs) |
451 |
- MKZSHCOMP=yes" |
452 |
- |
453 |
- local brand="Unknown" |
454 |
- if use kernel_linux ; then |
455 |
- MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
456 |
- brand="Linux" |
457 |
- elif use kernel_FreeBSD ; then |
458 |
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
459 |
- brand="FreeBSD" |
460 |
- fi |
461 |
- export BRANDING="Gentoo ${brand}" |
462 |
- use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
463 |
- export DEBUG=$(usev debug) |
464 |
- export MKTERMCAP=$(usev ncurses) |
465 |
- |
466 |
- tc-export CC AR RANLIB |
467 |
- emake ${MAKE_ARGS} |
468 |
-} |
469 |
- |
470 |
-# set_config <file> <option name> <yes value> <no value> test |
471 |
-# a value of "#" will just comment out the option |
472 |
-set_config() { |
473 |
- local file="${ED}/$1" var=$2 val com |
474 |
- eval "${@:5}" && val=$3 || val=$4 |
475 |
- [[ ${val} == "#" ]] && com="#" && val='\2' |
476 |
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
477 |
-} |
478 |
- |
479 |
-set_config_yes_no() { |
480 |
- set_config "$1" "$2" YES NO "${@:3}" |
481 |
-} |
482 |
- |
483 |
-src_install() { |
484 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install |
485 |
- |
486 |
- # move the shared libs back to /usr so ldscript can install |
487 |
- # more of a minimal set of files |
488 |
- # disabled for now due to #270646 |
489 |
- #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
490 |
- #gen_usr_ldscript -a einfo rc |
491 |
- gen_usr_ldscript libeinfo.so |
492 |
- gen_usr_ldscript librc.so |
493 |
- |
494 |
- if ! use kernel_linux; then |
495 |
- keepdir /lib/rc/init.d |
496 |
- fi |
497 |
- keepdir /lib/rc/tmp |
498 |
- |
499 |
- # Backup our default runlevels |
500 |
- dodir /usr/share/"${PN}" |
501 |
- cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
502 |
- rm -rf "${ED}"/etc/runlevels |
503 |
- |
504 |
- # Setup unicode defaults for silly unicode users |
505 |
- set_config_yes_no /etc/rc.conf unicode use unicode |
506 |
- |
507 |
- # Cater to the norm |
508 |
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
509 |
- |
510 |
- # On HPPA, do not run consolefont by default (bug #222889) |
511 |
- if use hppa; then |
512 |
- rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
513 |
- fi |
514 |
- |
515 |
- # Support for logfile rotation |
516 |
- insinto /etc/logrotate.d |
517 |
- newins "${FILESDIR}"/openrc.logrotate openrc |
518 |
- |
519 |
- # install gentoo pam.d files |
520 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
521 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
522 |
- |
523 |
- # install documentation |
524 |
- dodoc ChangeLog *.md |
525 |
- if use newnet; then |
526 |
- dodoc README.newnet |
527 |
- fi |
528 |
-} |
529 |
- |
530 |
-add_boot_init() { |
531 |
- local initd=$1 |
532 |
- local runlevel=${2:-boot} |
533 |
- # if the initscript is not going to be installed and is not |
534 |
- # currently installed, return |
535 |
- [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
536 |
- || return |
537 |
- [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
538 |
- |
539 |
- # if runlevels dont exist just yet, then create it but still flag |
540 |
- # to pkg_postinst that it needs real setup #277323 |
541 |
- if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
542 |
- mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
543 |
- touch "${EROOT}"etc/runlevels/.add_boot_init.created |
544 |
- fi |
545 |
- |
546 |
- elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
547 |
- ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
548 |
-} |
549 |
-add_boot_init_mit_config() { |
550 |
- local config=$1 initd=$2 |
551 |
- if [[ -e ${EROOT}${config} ]] ; then |
552 |
- if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
553 |
- add_boot_init ${initd} |
554 |
- fi |
555 |
- fi |
556 |
-} |
557 |
- |
558 |
-pkg_preinst() { |
559 |
- local f LIBDIR=$(get_libdir) |
560 |
- |
561 |
- # avoid default thrashing in conf.d files when possible #295406 |
562 |
- if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
563 |
- ( |
564 |
- unset hostname HOSTNAME |
565 |
- source "${EROOT}"etc/conf.d/hostname |
566 |
- : ${hostname:=${HOSTNAME}} |
567 |
- [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
568 |
- ) |
569 |
- fi |
570 |
- |
571 |
- # set default interactive shell to sulogin if it exists |
572 |
- set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
573 |
- |
574 |
- # termencoding was added in 0.2.1 and needed in boot |
575 |
- has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
576 |
- |
577 |
- # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
578 |
- has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
579 |
- |
580 |
- if ! has_version ">=sys-apps/openrc-0.11"; then |
581 |
- add_boot_init sysfs sysinit |
582 |
- fi |
583 |
- |
584 |
- if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
585 |
- migrate_udev_mount_script |
586 |
- fi |
587 |
- |
588 |
- # these were added in 0.12. |
589 |
- if ! has_version ">=sys-apps/openrc-0.12"; then |
590 |
- add_boot_init loopback |
591 |
- |
592 |
- # ensure existing /etc/conf.d/net is not removed |
593 |
- # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
594 |
- # this needs to stay in openrc ebuilds for a long time. :( |
595 |
- # Added in 0.12. |
596 |
- if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
597 |
- einfo "Modifying conf.d/net to keep it from being removed" |
598 |
- cat <<-EOF >>"${EROOT}"etc/conf.d/net |
599 |
- |
600 |
-# The network scripts are now part of net-misc/netifrc |
601 |
-# In order to avoid sys-apps/${P} from removing this file, this comment was |
602 |
-# added; you can safely remove this comment. Please see |
603 |
-# /usr/share/doc/netifrc*/README* for more information. |
604 |
-EOF |
605 |
- fi |
606 |
- fi |
607 |
- has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
608 |
- |
609 |
- if ! has_version ">=sys-apps/openrc-0.18.3"; then |
610 |
- add_boot_init mtab |
611 |
- if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
612 |
- ewarn "${EROOT}etc/mtab will be replaced with a" |
613 |
- ewarn "symbolic link to /proc/self/mounts on the next" |
614 |
- ewarn "reboot." |
615 |
- ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
616 |
- ewarn "if you do not want this to happen." |
617 |
- fi |
618 |
- fi |
619 |
- |
620 |
- has_version ">=sys-apps/openrc-0.35" || add_boot_init cgroups sysinit |
621 |
- |
622 |
-} |
623 |
- |
624 |
-# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
625 |
-migrate_udev_mount_script() { |
626 |
- if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
627 |
- ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
628 |
- add_boot_init udev-mount sysinit |
629 |
- fi |
630 |
- return 0 |
631 |
-} |
632 |
- |
633 |
-pkg_postinst() { |
634 |
- local LIBDIR=$(get_libdir) |
635 |
- |
636 |
- # Make our runlevels if they don't exist |
637 |
- if [[ -z "${REPLACING_VERSIONS}" ]]; then |
638 |
- einfo "Copying across default runlevels" |
639 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
640 |
- rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
641 |
- else |
642 |
- if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
643 |
- mkdir -p "${EROOT}"etc/runlevels/sysinit |
644 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
645 |
- "${EROOT}"etc/runlevels/sysinit |
646 |
- fi |
647 |
- if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
648 |
- mkdir -p "${EROOT}"etc/runlevels/shutdown |
649 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
650 |
- "${EROOT}"etc/runlevels/shutdown |
651 |
- fi |
652 |
- if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
653 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
654 |
- "${EROOT}"etc/runlevels |
655 |
- fi |
656 |
- fi |
657 |
- |
658 |
- if use hppa; then |
659 |
- elog "Setting the console font does not work on all HPPA consoles." |
660 |
- elog "You can still enable it by running:" |
661 |
- elog "# rc-update add consolefont boot" |
662 |
- fi |
663 |
- |
664 |
- # Added for 0.35. |
665 |
- if use kernel_linux && [[ ! -h "${EROOT}"/lib ]]; then |
666 |
- if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
667 |
- cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
668 |
- fi |
669 |
- elif ! use kernel_linux; then |
670 |
- if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
671 |
- cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
672 |
- fi |
673 |
- fi |
674 |
- |
675 |
- # update the dependency tree after touching all files #224171 |
676 |
- [[ "${EROOT}" = "/" ]] && "${EROOT}"/lib/rc/bin/rc-depend -u |
677 |
- |
678 |
- if ! use newnet && ! use netifrc; then |
679 |
- ewarn "You have emerged OpenRc without network support. This" |
680 |
- ewarn "means you need to SET UP a network manager such as" |
681 |
- ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
682 |
- ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
683 |
- ewarn "Or, you have the option of emerging openrc with the newnet" |
684 |
- ewarn "use flag and configuring /etc/conf.d/network and" |
685 |
- ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
686 |
- ewarn |
687 |
- fi |
688 |
- |
689 |
- if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
690 |
- ewarn "Please add the network service to your boot runlevel" |
691 |
- ewarn "as soon as possible. Not doing so could leave you with a system" |
692 |
- ewarn "without networking." |
693 |
- ewarn |
694 |
- fi |
695 |
-} |
696 |
|
697 |
diff --git a/sys-apps/openrc/openrc-0.38.3.ebuild b/sys-apps/openrc/openrc-0.38.3.ebuild |
698 |
deleted file mode 100644 |
699 |
index f11de7bde25..00000000000 |
700 |
--- a/sys-apps/openrc/openrc-0.38.3.ebuild |
701 |
+++ /dev/null |
702 |
@@ -1,326 +0,0 @@ |
703 |
-# Copyright 1999-2019 Gentoo Authors |
704 |
-# Distributed under the terms of the GNU General Public License v2 |
705 |
- |
706 |
-EAPI=6 |
707 |
- |
708 |
-inherit flag-o-matic pam toolchain-funcs usr-ldscript |
709 |
- |
710 |
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
711 |
-HOMEPAGE="https://github.com/openrc/openrc/" |
712 |
- |
713 |
-if [[ ${PV} == "9999" ]]; then |
714 |
- EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
715 |
- inherit git-r3 |
716 |
-else |
717 |
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
718 |
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
719 |
-fi |
720 |
- |
721 |
-LICENSE="BSD-2" |
722 |
-SLOT="0" |
723 |
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
724 |
- unicode kernel_linux kernel_FreeBSD" |
725 |
- |
726 |
-COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
727 |
- ncurses? ( sys-libs/ncurses:0= ) |
728 |
- pam? ( |
729 |
- sys-auth/pambase |
730 |
- virtual/pam |
731 |
- ) |
732 |
- audit? ( sys-process/audit ) |
733 |
- kernel_linux? ( |
734 |
- sys-process/psmisc |
735 |
- !<sys-process/procps-3.3.9-r2 |
736 |
- ) |
737 |
- selinux? ( |
738 |
- sys-apps/policycoreutils |
739 |
- >=sys-libs/libselinux-2.6 |
740 |
- ) |
741 |
- !<sys-apps/baselayout-2.1-r1 |
742 |
- !<sys-fs/udev-init-scripts-27" |
743 |
-DEPEND="${COMMON_DEPEND} |
744 |
- virtual/os-headers |
745 |
- ncurses? ( virtual/pkgconfig )" |
746 |
-RDEPEND="${COMMON_DEPEND} |
747 |
- !prefix? ( |
748 |
- kernel_linux? ( |
749 |
- >=sys-apps/sysvinit-2.86-r6[selinux?] |
750 |
- virtual/tmpfiles |
751 |
- ) |
752 |
- kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
753 |
- ) |
754 |
- selinux? ( |
755 |
- >=sec-policy/selinux-base-policy-2.20170204-r4 |
756 |
- >=sec-policy/selinux-openrc-2.20170204-r4 |
757 |
- ) |
758 |
- !<app-shells/gentoo-bashcomp-20180302 |
759 |
- !<app-shells/gentoo-zsh-completions-20180228 |
760 |
-" |
761 |
- |
762 |
-PDEPEND="netifrc? ( net-misc/netifrc )" |
763 |
- |
764 |
-src_prepare() { |
765 |
- default |
766 |
- if [[ ${PV} == "9999" ]] ; then |
767 |
- local ver="git-${EGIT_VERSION:0:6}" |
768 |
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
769 |
- fi |
770 |
-} |
771 |
- |
772 |
-src_compile() { |
773 |
- unset LIBDIR #266688 |
774 |
- |
775 |
- MAKE_ARGS="${MAKE_ARGS} |
776 |
- LIBNAME=$(get_libdir) |
777 |
- LIBEXECDIR=${EPREFIX}/lib/rc |
778 |
- MKBASHCOMP=yes |
779 |
- MKNET=$(usex newnet) |
780 |
- MKSELINUX=$(usex selinux) |
781 |
- MKAUDIT=$(usex audit) |
782 |
- MKPAM=$(usev pam) |
783 |
- MKSTATICLIBS=$(usex static-libs) |
784 |
- MKZSHCOMP=yes" |
785 |
- |
786 |
- local brand="Unknown" |
787 |
- if use kernel_linux ; then |
788 |
- MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
789 |
- brand="Linux" |
790 |
- elif use kernel_FreeBSD ; then |
791 |
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
792 |
- brand="FreeBSD" |
793 |
- fi |
794 |
- export BRANDING="Gentoo ${brand}" |
795 |
- use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
796 |
- export DEBUG=$(usev debug) |
797 |
- export MKTERMCAP=$(usev ncurses) |
798 |
- |
799 |
- tc-export CC AR RANLIB |
800 |
- emake ${MAKE_ARGS} |
801 |
-} |
802 |
- |
803 |
-# set_config <file> <option name> <yes value> <no value> test |
804 |
-# a value of "#" will just comment out the option |
805 |
-set_config() { |
806 |
- local file="${ED}/$1" var=$2 val com |
807 |
- eval "${@:5}" && val=$3 || val=$4 |
808 |
- [[ ${val} == "#" ]] && com="#" && val='\2' |
809 |
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
810 |
-} |
811 |
- |
812 |
-set_config_yes_no() { |
813 |
- set_config "$1" "$2" YES NO "${@:3}" |
814 |
-} |
815 |
- |
816 |
-src_install() { |
817 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install |
818 |
- |
819 |
- # move the shared libs back to /usr so ldscript can install |
820 |
- # more of a minimal set of files |
821 |
- # disabled for now due to #270646 |
822 |
- #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
823 |
- #gen_usr_ldscript -a einfo rc |
824 |
- gen_usr_ldscript libeinfo.so |
825 |
- gen_usr_ldscript librc.so |
826 |
- |
827 |
- if ! use kernel_linux; then |
828 |
- keepdir /lib/rc/init.d |
829 |
- fi |
830 |
- keepdir /lib/rc/tmp |
831 |
- |
832 |
- # Backup our default runlevels |
833 |
- dodir /usr/share/"${PN}" |
834 |
- cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
835 |
- rm -rf "${ED}"/etc/runlevels |
836 |
- |
837 |
- # Setup unicode defaults for silly unicode users |
838 |
- set_config_yes_no /etc/rc.conf unicode use unicode |
839 |
- |
840 |
- # Cater to the norm |
841 |
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
842 |
- |
843 |
- # On HPPA, do not run consolefont by default (bug #222889) |
844 |
- if use hppa; then |
845 |
- rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
846 |
- fi |
847 |
- |
848 |
- # Support for logfile rotation |
849 |
- insinto /etc/logrotate.d |
850 |
- newins "${FILESDIR}"/openrc.logrotate openrc |
851 |
- |
852 |
- # install gentoo pam.d files |
853 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
854 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
855 |
- |
856 |
- # install documentation |
857 |
- dodoc ChangeLog *.md |
858 |
- if use newnet; then |
859 |
- dodoc README.newnet |
860 |
- fi |
861 |
-} |
862 |
- |
863 |
-add_boot_init() { |
864 |
- local initd=$1 |
865 |
- local runlevel=${2:-boot} |
866 |
- # if the initscript is not going to be installed and is not |
867 |
- # currently installed, return |
868 |
- [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
869 |
- || return |
870 |
- [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
871 |
- |
872 |
- # if runlevels dont exist just yet, then create it but still flag |
873 |
- # to pkg_postinst that it needs real setup #277323 |
874 |
- if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
875 |
- mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
876 |
- touch "${EROOT}"etc/runlevels/.add_boot_init.created |
877 |
- fi |
878 |
- |
879 |
- elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
880 |
- ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
881 |
-} |
882 |
-add_boot_init_mit_config() { |
883 |
- local config=$1 initd=$2 |
884 |
- if [[ -e ${EROOT}${config} ]] ; then |
885 |
- if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
886 |
- add_boot_init ${initd} |
887 |
- fi |
888 |
- fi |
889 |
-} |
890 |
- |
891 |
-pkg_preinst() { |
892 |
- local f LIBDIR=$(get_libdir) |
893 |
- |
894 |
- # avoid default thrashing in conf.d files when possible #295406 |
895 |
- if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
896 |
- ( |
897 |
- unset hostname HOSTNAME |
898 |
- source "${EROOT}"etc/conf.d/hostname |
899 |
- : ${hostname:=${HOSTNAME}} |
900 |
- [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
901 |
- ) |
902 |
- fi |
903 |
- |
904 |
- # set default interactive shell to sulogin if it exists |
905 |
- set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
906 |
- |
907 |
- # termencoding was added in 0.2.1 and needed in boot |
908 |
- has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
909 |
- |
910 |
- # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
911 |
- has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
912 |
- |
913 |
- if ! has_version ">=sys-apps/openrc-0.11"; then |
914 |
- add_boot_init sysfs sysinit |
915 |
- fi |
916 |
- |
917 |
- if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
918 |
- migrate_udev_mount_script |
919 |
- fi |
920 |
- |
921 |
- # these were added in 0.12. |
922 |
- if ! has_version ">=sys-apps/openrc-0.12"; then |
923 |
- add_boot_init loopback |
924 |
- |
925 |
- # ensure existing /etc/conf.d/net is not removed |
926 |
- # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
927 |
- # this needs to stay in openrc ebuilds for a long time. :( |
928 |
- # Added in 0.12. |
929 |
- if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
930 |
- einfo "Modifying conf.d/net to keep it from being removed" |
931 |
- cat <<-EOF >>"${EROOT}"etc/conf.d/net |
932 |
- |
933 |
-# The network scripts are now part of net-misc/netifrc |
934 |
-# In order to avoid sys-apps/${P} from removing this file, this comment was |
935 |
-# added; you can safely remove this comment. Please see |
936 |
-# /usr/share/doc/netifrc*/README* for more information. |
937 |
-EOF |
938 |
- fi |
939 |
- fi |
940 |
- has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
941 |
- |
942 |
- if ! has_version ">=sys-apps/openrc-0.18.3"; then |
943 |
- add_boot_init mtab |
944 |
- if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
945 |
- ewarn "${EROOT}etc/mtab will be replaced with a" |
946 |
- ewarn "symbolic link to /proc/self/mounts on the next" |
947 |
- ewarn "reboot." |
948 |
- ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
949 |
- ewarn "if you do not want this to happen." |
950 |
- fi |
951 |
- fi |
952 |
- |
953 |
- has_version ">=sys-apps/openrc-0.35" || add_boot_init cgroups sysinit |
954 |
- |
955 |
-} |
956 |
- |
957 |
-# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
958 |
-migrate_udev_mount_script() { |
959 |
- if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
960 |
- ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
961 |
- add_boot_init udev-mount sysinit |
962 |
- fi |
963 |
- return 0 |
964 |
-} |
965 |
- |
966 |
-pkg_postinst() { |
967 |
- local LIBDIR=$(get_libdir) |
968 |
- |
969 |
- # Make our runlevels if they don't exist |
970 |
- if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
971 |
- einfo "Copying across default runlevels" |
972 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
973 |
- rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
974 |
- else |
975 |
- if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
976 |
- mkdir -p "${EROOT}"etc/runlevels/sysinit |
977 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
978 |
- "${EROOT}"etc/runlevels/sysinit |
979 |
- fi |
980 |
- if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
981 |
- mkdir -p "${EROOT}"etc/runlevels/shutdown |
982 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
983 |
- "${EROOT}"etc/runlevels/shutdown |
984 |
- fi |
985 |
- if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
986 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
987 |
- "${EROOT}"etc/runlevels |
988 |
- fi |
989 |
- fi |
990 |
- |
991 |
- if use hppa; then |
992 |
- elog "Setting the console font does not work on all HPPA consoles." |
993 |
- elog "You can still enable it by running:" |
994 |
- elog "# rc-update add consolefont boot" |
995 |
- fi |
996 |
- |
997 |
- # Added for 0.35. |
998 |
- if use kernel_linux && [[ ! -h "${EROOT}"/lib ]]; then |
999 |
- if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
1000 |
- cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
1001 |
- fi |
1002 |
- elif ! use kernel_linux; then |
1003 |
- if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
1004 |
- cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
1005 |
- fi |
1006 |
- fi |
1007 |
- |
1008 |
- # update the dependency tree after touching all files #224171 |
1009 |
- [[ "${EROOT}" = "/" ]] && "${EROOT}"/lib/rc/bin/rc-depend -u |
1010 |
- |
1011 |
- if ! use newnet && ! use netifrc; then |
1012 |
- ewarn "You have emerged OpenRc without network support. This" |
1013 |
- ewarn "means you need to SET UP a network manager such as" |
1014 |
- ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
1015 |
- ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
1016 |
- ewarn "Or, you have the option of emerging openrc with the newnet" |
1017 |
- ewarn "use flag and configuring /etc/conf.d/network and" |
1018 |
- ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
1019 |
- ewarn |
1020 |
- fi |
1021 |
- |
1022 |
- if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
1023 |
- ewarn "Please add the network service to your boot runlevel" |
1024 |
- ewarn "as soon as possible. Not doing so could leave you with a system" |
1025 |
- ewarn "without networking." |
1026 |
- ewarn |
1027 |
- fi |
1028 |
-} |