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/openrc/
Date: Wed, 31 Aug 2016 16:53:51
Message-Id: 1472662412.5332efe36406d3d953c7bc1e74390e6d453e90ef.williamh@gentoo
1 commit: 5332efe36406d3d953c7bc1e74390e6d453e90ef
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 31 16:53:12 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 31 16:53:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5332efe3
7
8 sys-apps/openrc: remove unstable 0.21 series versions
9
10 Package-Manager: portage-2.2.28
11
12 sys-apps/openrc/Manifest | 6 -
13 sys-apps/openrc/openrc-0.21.1.ebuild | 352 -----------------------------------
14 sys-apps/openrc/openrc-0.21.2.ebuild | 352 -----------------------------------
15 sys-apps/openrc/openrc-0.21.4.ebuild | 330 --------------------------------
16 sys-apps/openrc/openrc-0.21.5.ebuild | 330 --------------------------------
17 sys-apps/openrc/openrc-0.21.6.ebuild | 330 --------------------------------
18 sys-apps/openrc/openrc-0.21.ebuild | 352 -----------------------------------
19 7 files changed, 2052 deletions(-)
20
21 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
22 index 0eee73d..4a3360a 100644
23 --- a/sys-apps/openrc/Manifest
24 +++ b/sys-apps/openrc/Manifest
25 @@ -3,11 +3,5 @@ DIST openrc-0.18.4.tar.bz2 157237 SHA256 2c8bf1c6f52fcf4c1f6945a2836ba2551a7d930
26 DIST openrc-0.19.1.tar.bz2 159598 SHA256 5628c04b12e2f51f25e59c303bdccbf545ba0db25484adcca48e70d0712ce0e6 SHA512 303db4475fd02aa3aa161dbd8794a45c2633b9fe96aaab67b81014fa3915bed1aa51cff57128f4413cf9f2329ce1f2012e460e089c39f01ac6eb061a95844329 WHIRLPOOL a4e8720579b8983cb3c2c9b4dd983c1b7bf45e053aa0c9545f31e36c22e44d06e55198d4143dc0a6bca3b7d00b151b43d1da439b2479044344ca12f3151711f1
27 DIST openrc-0.20.4.tar.bz2 163060 SHA256 0474a08e9e280a3c2450bed014b1f6b485e1a583391575f0d35c3551709e3784 SHA512 6d4ccee5f3c3e64eeeaa05b591d7420e3cdaa82eb42606a8a721030b9323e1e56928da78d302e5cbd20c652f6ecf5db23a695de436216f2c55c0be4cfc98387a WHIRLPOOL b2bf5c1b66595a4b2b3a66a39f15896d6ab0aa4b0c42518146238016ba01adb12b3aaf6ce21570756693e283fe14a979f305afd253db68ba47246135529b1ab9
28 DIST openrc-0.20.5.tar.bz2 163033 SHA256 2af530aff271ffb8ef9428ca5847cde952ab985e2542b57f8d059373f8a77c4b SHA512 0784ac741aee96d0a4eeddc028b92dd5c79dd7fb66c8102e660fd059789559babd52a0618b7ea9216ea0a113708b356b0e1f9cdd32246cc744b2c7d6004f5a81 WHIRLPOOL 9798675508060d07804eee04a2e10d0ce5a84340aff842e4bbb88a530e41385785100e2a6e107e5e6767471e85438a504f8531032807cd733232a40266425360
29 -DIST openrc-0.21.1.tar.bz2 167530 SHA256 0445a2a187572e6dd10860420a5f3e8f04e96103393d7265b5d44b39c11ff836 SHA512 fba77d304a08f2a8de44f430578c24728f8600a64e50326678e8caca150ee5d684f25589ced50b8306d581d8ab941650c738ba0fb4e17bf10b17027618b7877c WHIRLPOOL d0001b68d5574038a7ab3f1ed5ab1a6f29bf1c3ac1e4d63eac1395c45737f4d18b5ea67699d2732eb1946e94fb0d4e6c7941366f9645c05076cf185cf87de746
30 -DIST openrc-0.21.2.tar.bz2 167581 SHA256 ebadaa0c2dd9c4ec6d62b1c7f6bfd6385e355a9e1c2fbde152474a2ddd02c608 SHA512 8d8c0b89444b89c6acdbbf652c017a1d6fc0550180b2ae234e38ed99a697dca1ac2b13a497c35afc023a766f81a00a0d109e95d06cac9f89315d89041133c487 WHIRLPOOL 02052dd35590d0dca2a4bce53ea1453ed6fe38e7136512fdc22ae1514e4e91fe7837873eb7b926704adde67ac997b27bafcf3b74d4d8cb54afd5a2243a4fc7db
31 DIST openrc-0.21.3.tar.bz2 167326 SHA256 ce04bf2e1648fb49212b90d3f72910ee7e3ab6fc41a34416268d9d5a791d6cd6 SHA512 452b09d016e91a235bbb3c0e2f44c915c5f14fb212924bcfcff8a6147a503df8d5fb0b30bb18bc93fb9a4413346e9f1dabd1095f053b4153d76eca2f44044a57 WHIRLPOOL 163c62dcfd70d104d60ab22c721a75ce62db2d3741d460e26bbb51ecf5715b3711c1c01e90c5a1dd08470b2c596ab964acbefdeaefa4646544832d29c82d9823
32 -DIST openrc-0.21.4.tar.bz2 167720 SHA256 b3764e2209e5616cc542481b024f5b18da95af18697c5fa8f35931a62e7ec139 SHA512 a59001a8cc2e4be3bf0c119edeefc7485c6bb1583a1724538cac57fb64e2d63458bd5710193d72c12a4bc6020fa7a511a921cbaea0f58334d788505b43cb230a WHIRLPOOL acff96bd1831a2f98218bed43a84df4efeb69017285de5717e6e8ffc368b0d6ab73aa20740c0d71477faf95cda1a0d79fad1508a2ffabe232c8b963f391eff74
33 -DIST openrc-0.21.5.tar.bz2 167905 SHA256 a76b29d998c634779ddf54b6851287c584f070a3c6b2f3148a96a89d4848b273 SHA512 46c752833706d87710dc0ce8281fe5714b55d2c59e85e37ca883445b215d726f59e5b0d599ca6231d31ee063b1aa486ad68802d02db2f81cfec57224f07ab82e WHIRLPOOL 3fa284560727e975d5cc1325a1d7dabfab4a1fd30f6747cbbe77a7580350b7ef89a4e21dd2258e9a07061ec2115ccd1996256e43547b6e9d2109d2b609d06616
34 -DIST openrc-0.21.6.tar.bz2 168048 SHA256 cebe846b43a5beafa6dc1803418523ead958cb2276f31a742f983fad69c262d6 SHA512 e452ef3509cf07df0e0857a9b63fde67901122694ce3cdaaa9d1602222d0108bf43177a51b7d7533960c79bf3bfc37649f43853fec30b22502699c98eb132e40 WHIRLPOOL 7f5abe2d4b6396cec45511a4efd7adf158b16cc1af7d19499a3b5e1334ee70544874d0ad013cccb13fe2996c6d5ac33670b65a9d84f5e03ea51430e1af310f6c
35 DIST openrc-0.21.7.tar.bz2 168104 SHA256 0d4bb11cfac9950687dfbc1a72a90e337af25bb39edc032cb0b807cfe0d04c3d SHA512 26edf47e0eae0b62b651484bcbe73a5ccda2032ecbcc303f280bbf671fd1a8a1394d206228bd12e5157e8214210eb124898d11acc78cdef0d9145a952754f6bc WHIRLPOOL 5731326b0879759f58b3e251e3b1c4cc6dcc17bee3ebf1d8ef4b689dff5ec39d429cde9c3d4f2901c8a592aaad7253bfca69a0caaa2ae77b6f45f9afe6e66df4
36 -DIST openrc-0.21.tar.bz2 167636 SHA256 ef92da7ff1447bc3a11aff799bf9aaaf226ce13c277318211f96d95bcbd064ac SHA512 14200663740406729462f9c412e63ab1f850ace46db7bb709b74a03c4fbf2159b7b6d7827f9c917cd9338564202538e2e115a4d677885eed055bda530ab4216b WHIRLPOOL 66ce916b25f6c81f2c87962bb6452f48ffab28eaee0c3f702830d62d9504c96d975c65aee2f2e3a03192a77cdc7cc75ca2e89af204ab4e4ac4d183f3c6f18a30
37
38 diff --git a/sys-apps/openrc/openrc-0.21.1.ebuild b/sys-apps/openrc/openrc-0.21.1.ebuild
39 deleted file mode 100644
40 index 60d554a..00000000
41 --- a/sys-apps/openrc/openrc-0.21.1.ebuild
42 +++ /dev/null
43 @@ -1,352 +0,0 @@
44 -# Copyright 1999-2016 Gentoo Foundation
45 -# Distributed under the terms of the GNU General Public License v2
46 -# $Id$
47 -
48 -EAPI=6
49 -
50 -inherit flag-o-matic pam toolchain-funcs
51 -
52 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
53 -HOMEPAGE="https://github.com/openrc/openrc/"
54 -
55 -if [[ ${PV} == "9999" ]]; then
56 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
57 - inherit git-r3
58 -else
59 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
60 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
61 -fi
62 -
63 -LICENSE="BSD-2"
64 -SLOT="0"
65 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
66 - tools unicode kernel_linux kernel_FreeBSD"
67 -
68 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
69 - ncurses? ( sys-libs/ncurses:0= )
70 - pam? (
71 - sys-auth/pambase
72 - virtual/pam
73 - )
74 - tools? ( dev-lang/perl )
75 - audit? ( sys-process/audit )
76 - kernel_linux? (
77 - sys-process/psmisc
78 - !<sys-process/procps-3.3.9-r2
79 - )
80 - selinux? (
81 - sys-apps/policycoreutils
82 - sys-libs/libselinux
83 - )
84 - !<sys-apps/baselayout-2.1-r1
85 - !<sys-fs/udev-init-scripts-27"
86 -DEPEND="${COMMON_DEPEND}
87 - virtual/os-headers
88 - ncurses? ( virtual/pkgconfig )"
89 -RDEPEND="${COMMON_DEPEND}
90 - !prefix? (
91 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
92 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
93 - )
94 - selinux? (
95 - sec-policy/selinux-base-policy
96 - sec-policy/selinux-openrc
97 - )
98 -"
99 -
100 -PDEPEND="netifrc? ( net-misc/netifrc )"
101 -
102 -src_prepare() {
103 - sed -i 's:0444:0644:' mk/sys.mk || die
104 -
105 - if [[ ${PV} == "9999" ]] ; then
106 - local ver="git-${EGIT_VERSION:0:6}"
107 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
108 - fi
109 -
110 - # Allow user patches to be applied without modifying the ebuild
111 - eapply_user
112 -}
113 -
114 -src_compile() {
115 - unset LIBDIR #266688
116 -
117 - MAKE_ARGS="${MAKE_ARGS}
118 - LIBNAME=$(get_libdir)
119 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
120 - MKNET=$(usex newnet)
121 - MKSELINUX=$(usex selinux)
122 - MKAUDIT=$(usex audit)
123 - MKPAM=$(usev pam)
124 - MKSTATICLIBS=$(usex static-libs)
125 - MKTOOLS=$(usex tools)"
126 -
127 - local brand="Unknown"
128 - if use kernel_linux ; then
129 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
130 - brand="Linux"
131 - elif use kernel_FreeBSD ; then
132 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
133 - brand="FreeBSD"
134 - fi
135 - export BRANDING="Gentoo ${brand}"
136 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
137 - export DEBUG=$(usev debug)
138 - export MKTERMCAP=$(usev ncurses)
139 -
140 - tc-export CC AR RANLIB
141 - emake ${MAKE_ARGS}
142 -}
143 -
144 -# set_config <file> <option name> <yes value> <no value> test
145 -# a value of "#" will just comment out the option
146 -set_config() {
147 - local file="${ED}/$1" var=$2 val com
148 - eval "${@:5}" && val=$3 || val=$4
149 - [[ ${val} == "#" ]] && com="#" && val='\2'
150 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
151 -}
152 -
153 -set_config_yes_no() {
154 - set_config "$1" "$2" YES NO "${@:3}"
155 -}
156 -
157 -src_install() {
158 - emake ${MAKE_ARGS} DESTDIR="${D}" install
159 -
160 - # move the shared libs back to /usr so ldscript can install
161 - # more of a minimal set of files
162 - # disabled for now due to #270646
163 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
164 - #gen_usr_ldscript -a einfo rc
165 - gen_usr_ldscript libeinfo.so
166 - gen_usr_ldscript librc.so
167 -
168 - if ! use kernel_linux; then
169 - keepdir /$(get_libdir)/rc/init.d
170 - fi
171 - keepdir /$(get_libdir)/rc/tmp
172 -
173 - # Backup our default runlevels
174 - dodir /usr/share/"${PN}"
175 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
176 - rm -rf "${ED}"/etc/runlevels
177 -
178 - # Setup unicode defaults for silly unicode users
179 - set_config_yes_no /etc/rc.conf unicode use unicode
180 -
181 - # Cater to the norm
182 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
183 -
184 - # On HPPA, do not run consolefont by default (bug #222889)
185 - if use hppa; then
186 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
187 - fi
188 -
189 - # Support for logfile rotation
190 - insinto /etc/logrotate.d
191 - newins "${FILESDIR}"/openrc.logrotate openrc
192 -
193 - # install gentoo pam.d files
194 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
195 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
196 -
197 - # install documentation
198 - dodoc ChangeLog *.md
199 - if use newnet; then
200 - dodoc README.newnet
201 - fi
202 -}
203 -
204 -add_boot_init() {
205 - local initd=$1
206 - local runlevel=${2:-boot}
207 - # if the initscript is not going to be installed and is not
208 - # currently installed, return
209 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
210 - || return
211 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
212 -
213 - # if runlevels dont exist just yet, then create it but still flag
214 - # to pkg_postinst that it needs real setup #277323
215 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
216 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
217 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
218 - fi
219 -
220 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
221 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
222 -}
223 -add_boot_init_mit_config() {
224 - local config=$1 initd=$2
225 - if [[ -e ${EROOT}${config} ]] ; then
226 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
227 - add_boot_init ${initd}
228 - fi
229 - fi
230 -}
231 -
232 -pkg_preinst() {
233 - local f LIBDIR=$(get_libdir)
234 -
235 - # avoid default thrashing in conf.d files when possible #295406
236 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
237 - (
238 - unset hostname HOSTNAME
239 - source "${EROOT}"etc/conf.d/hostname
240 - : ${hostname:=${HOSTNAME}}
241 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
242 - )
243 - fi
244 -
245 - # set default interactive shell to sulogin if it exists
246 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
247 -
248 - # termencoding was added in 0.2.1 and needed in boot
249 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
250 -
251 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
252 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
253 -
254 - if ! has_version ">=sys-apps/openrc-0.11"; then
255 - add_boot_init sysfs sysinit
256 - fi
257 -
258 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
259 - migrate_udev_mount_script
260 - add_boot_init tmpfiles.setup boot
261 - fi
262 -
263 - # these were added in 0.12.
264 - if ! has_version ">=sys-apps/openrc-0.12"; then
265 - add_boot_init loopback
266 - add_boot_init tmpfiles.dev sysinit
267 -
268 - # ensure existing /etc/conf.d/net is not removed
269 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
270 - # this needs to stay in openrc ebuilds for a long time. :(
271 - # Added in 0.12.
272 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
273 - einfo "Modifying conf.d/net to keep it from being removed"
274 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
275 -
276 -# The network scripts are now part of net-misc/netifrc
277 -# In order to avoid sys-apps/${P} from removing this file, this comment was
278 -# added; you can safely remove this comment. Please see
279 -# /usr/share/doc/netifrc*/README* for more information.
280 -EOF
281 - fi
282 - fi
283 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
284 -
285 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
286 - add_boot_init mtab
287 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
288 - ewarn "${EROOT}etc/mtab will be replaced with a"
289 - ewarn "symbolic link to /proc/self/mounts on the next"
290 - ewarn "reboot."
291 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
292 - ewarn "if you do not want this to happen."
293 - fi
294 - fi
295 -}
296 -
297 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
298 -migrate_udev_mount_script() {
299 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
300 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
301 - add_boot_init udev-mount sysinit
302 - fi
303 - return 0
304 -}
305 -
306 -pkg_postinst() {
307 - local LIBDIR=$(get_libdir)
308 -
309 - # Make our runlevels if they don't exist
310 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
311 - einfo "Copying across default runlevels"
312 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
313 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
314 - else
315 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
316 - mkdir -p "${EROOT}"etc/runlevels/sysinit
317 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
318 - "${EROOT}"etc/runlevels/sysinit
319 - fi
320 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
321 - mkdir -p "${EROOT}"etc/runlevels/shutdown
322 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
323 - "${EROOT}"etc/runlevels/shutdown
324 - fi
325 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
326 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
327 - "${EROOT}"etc/runlevels
328 - fi
329 - fi
330 -
331 - if use hppa; then
332 - elog "Setting the console font does not work on all HPPA consoles."
333 - elog "You can still enable it by running:"
334 - elog "# rc-update add consolefont boot"
335 - fi
336 -
337 - # Handle the conf.d/local.{start,stop} -> local.d transition
338 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
339 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
340 - elog "files to ${EROOT}etc/local.d"
341 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
342 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
343 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
344 - fi
345 -
346 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
347 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
348 - ewarn "The dependency data could not be migrated to /run/openrc."
349 - ewarn "This means you need to reboot your system."
350 - fi
351 - fi
352 -
353 - # update the dependency tree after touching all files #224171
354 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
355 -
356 - if ! use newnet && ! use netifrc; then
357 - ewarn "You have emerged OpenRc without network support. This"
358 - ewarn "means you need to SET UP a network manager such as"
359 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
360 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
361 - ewarn "Or, you have the option of emerging openrc with the newnet"
362 - ewarn "use flag and configuring /etc/conf.d/network and"
363 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
364 - ewarn
365 - fi
366 -
367 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
368 - ewarn "Please add the network service to your boot runlevel"
369 - ewarn "as soon as possible. Not doing so could leave you with a system"
370 - ewarn "without networking."
371 - ewarn
372 - fi
373 -
374 - ewarn "In this version of OpenRC, the loopback interface no longer"
375 - ewarn "satisfies the net virtual."
376 - ewarn "If you have services now which do not start because of this,"
377 - ewarn "They can be fixed by adding rc_need=\"!net\""
378 - ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
379 - ewarn "You should also file a bug against the service asking that"
380 - ewarn "need net be dropped from the dependencies."
381 - ewarn "The bug you file should block the following tracker:"
382 - ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
383 - ewarn
384 -
385 - # Updated for 0.13.2.
386 - ewarn "Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not"
387 - ewarn "fixed correctly in earlier versions of OpenRC."
388 - ewarn "The correct fix is implemented in this version, but that"
389 - ewarn "means netmount needs to be added to the default runlevel if"
390 - ewarn "you are using nfs file systems."
391 - ewarn
392 -
393 - elog "You should now update all files in /etc, using etc-update"
394 - elog "or equivalent before restarting any services or this host."
395 -}
396
397 diff --git a/sys-apps/openrc/openrc-0.21.2.ebuild b/sys-apps/openrc/openrc-0.21.2.ebuild
398 deleted file mode 100644
399 index 60d554a..00000000
400 --- a/sys-apps/openrc/openrc-0.21.2.ebuild
401 +++ /dev/null
402 @@ -1,352 +0,0 @@
403 -# Copyright 1999-2016 Gentoo Foundation
404 -# Distributed under the terms of the GNU General Public License v2
405 -# $Id$
406 -
407 -EAPI=6
408 -
409 -inherit flag-o-matic pam toolchain-funcs
410 -
411 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
412 -HOMEPAGE="https://github.com/openrc/openrc/"
413 -
414 -if [[ ${PV} == "9999" ]]; then
415 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
416 - inherit git-r3
417 -else
418 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
419 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
420 -fi
421 -
422 -LICENSE="BSD-2"
423 -SLOT="0"
424 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
425 - tools unicode kernel_linux kernel_FreeBSD"
426 -
427 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
428 - ncurses? ( sys-libs/ncurses:0= )
429 - pam? (
430 - sys-auth/pambase
431 - virtual/pam
432 - )
433 - tools? ( dev-lang/perl )
434 - audit? ( sys-process/audit )
435 - kernel_linux? (
436 - sys-process/psmisc
437 - !<sys-process/procps-3.3.9-r2
438 - )
439 - selinux? (
440 - sys-apps/policycoreutils
441 - sys-libs/libselinux
442 - )
443 - !<sys-apps/baselayout-2.1-r1
444 - !<sys-fs/udev-init-scripts-27"
445 -DEPEND="${COMMON_DEPEND}
446 - virtual/os-headers
447 - ncurses? ( virtual/pkgconfig )"
448 -RDEPEND="${COMMON_DEPEND}
449 - !prefix? (
450 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
451 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
452 - )
453 - selinux? (
454 - sec-policy/selinux-base-policy
455 - sec-policy/selinux-openrc
456 - )
457 -"
458 -
459 -PDEPEND="netifrc? ( net-misc/netifrc )"
460 -
461 -src_prepare() {
462 - sed -i 's:0444:0644:' mk/sys.mk || die
463 -
464 - if [[ ${PV} == "9999" ]] ; then
465 - local ver="git-${EGIT_VERSION:0:6}"
466 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
467 - fi
468 -
469 - # Allow user patches to be applied without modifying the ebuild
470 - eapply_user
471 -}
472 -
473 -src_compile() {
474 - unset LIBDIR #266688
475 -
476 - MAKE_ARGS="${MAKE_ARGS}
477 - LIBNAME=$(get_libdir)
478 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
479 - MKNET=$(usex newnet)
480 - MKSELINUX=$(usex selinux)
481 - MKAUDIT=$(usex audit)
482 - MKPAM=$(usev pam)
483 - MKSTATICLIBS=$(usex static-libs)
484 - MKTOOLS=$(usex tools)"
485 -
486 - local brand="Unknown"
487 - if use kernel_linux ; then
488 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
489 - brand="Linux"
490 - elif use kernel_FreeBSD ; then
491 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
492 - brand="FreeBSD"
493 - fi
494 - export BRANDING="Gentoo ${brand}"
495 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
496 - export DEBUG=$(usev debug)
497 - export MKTERMCAP=$(usev ncurses)
498 -
499 - tc-export CC AR RANLIB
500 - emake ${MAKE_ARGS}
501 -}
502 -
503 -# set_config <file> <option name> <yes value> <no value> test
504 -# a value of "#" will just comment out the option
505 -set_config() {
506 - local file="${ED}/$1" var=$2 val com
507 - eval "${@:5}" && val=$3 || val=$4
508 - [[ ${val} == "#" ]] && com="#" && val='\2'
509 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
510 -}
511 -
512 -set_config_yes_no() {
513 - set_config "$1" "$2" YES NO "${@:3}"
514 -}
515 -
516 -src_install() {
517 - emake ${MAKE_ARGS} DESTDIR="${D}" install
518 -
519 - # move the shared libs back to /usr so ldscript can install
520 - # more of a minimal set of files
521 - # disabled for now due to #270646
522 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
523 - #gen_usr_ldscript -a einfo rc
524 - gen_usr_ldscript libeinfo.so
525 - gen_usr_ldscript librc.so
526 -
527 - if ! use kernel_linux; then
528 - keepdir /$(get_libdir)/rc/init.d
529 - fi
530 - keepdir /$(get_libdir)/rc/tmp
531 -
532 - # Backup our default runlevels
533 - dodir /usr/share/"${PN}"
534 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
535 - rm -rf "${ED}"/etc/runlevels
536 -
537 - # Setup unicode defaults for silly unicode users
538 - set_config_yes_no /etc/rc.conf unicode use unicode
539 -
540 - # Cater to the norm
541 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
542 -
543 - # On HPPA, do not run consolefont by default (bug #222889)
544 - if use hppa; then
545 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
546 - fi
547 -
548 - # Support for logfile rotation
549 - insinto /etc/logrotate.d
550 - newins "${FILESDIR}"/openrc.logrotate openrc
551 -
552 - # install gentoo pam.d files
553 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
554 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
555 -
556 - # install documentation
557 - dodoc ChangeLog *.md
558 - if use newnet; then
559 - dodoc README.newnet
560 - fi
561 -}
562 -
563 -add_boot_init() {
564 - local initd=$1
565 - local runlevel=${2:-boot}
566 - # if the initscript is not going to be installed and is not
567 - # currently installed, return
568 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
569 - || return
570 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
571 -
572 - # if runlevels dont exist just yet, then create it but still flag
573 - # to pkg_postinst that it needs real setup #277323
574 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
575 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
576 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
577 - fi
578 -
579 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
580 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
581 -}
582 -add_boot_init_mit_config() {
583 - local config=$1 initd=$2
584 - if [[ -e ${EROOT}${config} ]] ; then
585 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
586 - add_boot_init ${initd}
587 - fi
588 - fi
589 -}
590 -
591 -pkg_preinst() {
592 - local f LIBDIR=$(get_libdir)
593 -
594 - # avoid default thrashing in conf.d files when possible #295406
595 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
596 - (
597 - unset hostname HOSTNAME
598 - source "${EROOT}"etc/conf.d/hostname
599 - : ${hostname:=${HOSTNAME}}
600 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
601 - )
602 - fi
603 -
604 - # set default interactive shell to sulogin if it exists
605 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
606 -
607 - # termencoding was added in 0.2.1 and needed in boot
608 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
609 -
610 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
611 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
612 -
613 - if ! has_version ">=sys-apps/openrc-0.11"; then
614 - add_boot_init sysfs sysinit
615 - fi
616 -
617 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
618 - migrate_udev_mount_script
619 - add_boot_init tmpfiles.setup boot
620 - fi
621 -
622 - # these were added in 0.12.
623 - if ! has_version ">=sys-apps/openrc-0.12"; then
624 - add_boot_init loopback
625 - add_boot_init tmpfiles.dev sysinit
626 -
627 - # ensure existing /etc/conf.d/net is not removed
628 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
629 - # this needs to stay in openrc ebuilds for a long time. :(
630 - # Added in 0.12.
631 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
632 - einfo "Modifying conf.d/net to keep it from being removed"
633 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
634 -
635 -# The network scripts are now part of net-misc/netifrc
636 -# In order to avoid sys-apps/${P} from removing this file, this comment was
637 -# added; you can safely remove this comment. Please see
638 -# /usr/share/doc/netifrc*/README* for more information.
639 -EOF
640 - fi
641 - fi
642 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
643 -
644 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
645 - add_boot_init mtab
646 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
647 - ewarn "${EROOT}etc/mtab will be replaced with a"
648 - ewarn "symbolic link to /proc/self/mounts on the next"
649 - ewarn "reboot."
650 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
651 - ewarn "if you do not want this to happen."
652 - fi
653 - fi
654 -}
655 -
656 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
657 -migrate_udev_mount_script() {
658 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
659 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
660 - add_boot_init udev-mount sysinit
661 - fi
662 - return 0
663 -}
664 -
665 -pkg_postinst() {
666 - local LIBDIR=$(get_libdir)
667 -
668 - # Make our runlevels if they don't exist
669 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
670 - einfo "Copying across default runlevels"
671 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
672 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
673 - else
674 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
675 - mkdir -p "${EROOT}"etc/runlevels/sysinit
676 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
677 - "${EROOT}"etc/runlevels/sysinit
678 - fi
679 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
680 - mkdir -p "${EROOT}"etc/runlevels/shutdown
681 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
682 - "${EROOT}"etc/runlevels/shutdown
683 - fi
684 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
685 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
686 - "${EROOT}"etc/runlevels
687 - fi
688 - fi
689 -
690 - if use hppa; then
691 - elog "Setting the console font does not work on all HPPA consoles."
692 - elog "You can still enable it by running:"
693 - elog "# rc-update add consolefont boot"
694 - fi
695 -
696 - # Handle the conf.d/local.{start,stop} -> local.d transition
697 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
698 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
699 - elog "files to ${EROOT}etc/local.d"
700 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
701 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
702 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
703 - fi
704 -
705 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
706 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
707 - ewarn "The dependency data could not be migrated to /run/openrc."
708 - ewarn "This means you need to reboot your system."
709 - fi
710 - fi
711 -
712 - # update the dependency tree after touching all files #224171
713 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
714 -
715 - if ! use newnet && ! use netifrc; then
716 - ewarn "You have emerged OpenRc without network support. This"
717 - ewarn "means you need to SET UP a network manager such as"
718 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
719 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
720 - ewarn "Or, you have the option of emerging openrc with the newnet"
721 - ewarn "use flag and configuring /etc/conf.d/network and"
722 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
723 - ewarn
724 - fi
725 -
726 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
727 - ewarn "Please add the network service to your boot runlevel"
728 - ewarn "as soon as possible. Not doing so could leave you with a system"
729 - ewarn "without networking."
730 - ewarn
731 - fi
732 -
733 - ewarn "In this version of OpenRC, the loopback interface no longer"
734 - ewarn "satisfies the net virtual."
735 - ewarn "If you have services now which do not start because of this,"
736 - ewarn "They can be fixed by adding rc_need=\"!net\""
737 - ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
738 - ewarn "You should also file a bug against the service asking that"
739 - ewarn "need net be dropped from the dependencies."
740 - ewarn "The bug you file should block the following tracker:"
741 - ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
742 - ewarn
743 -
744 - # Updated for 0.13.2.
745 - ewarn "Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not"
746 - ewarn "fixed correctly in earlier versions of OpenRC."
747 - ewarn "The correct fix is implemented in this version, but that"
748 - ewarn "means netmount needs to be added to the default runlevel if"
749 - ewarn "you are using nfs file systems."
750 - ewarn
751 -
752 - elog "You should now update all files in /etc, using etc-update"
753 - elog "or equivalent before restarting any services or this host."
754 -}
755
756 diff --git a/sys-apps/openrc/openrc-0.21.4.ebuild b/sys-apps/openrc/openrc-0.21.4.ebuild
757 deleted file mode 100644
758 index 5ae86a0..00000000
759 --- a/sys-apps/openrc/openrc-0.21.4.ebuild
760 +++ /dev/null
761 @@ -1,330 +0,0 @@
762 -# Copyright 1999-2016 Gentoo Foundation
763 -# Distributed under the terms of the GNU General Public License v2
764 -# $Id$
765 -
766 -EAPI=6
767 -
768 -inherit flag-o-matic pam toolchain-funcs
769 -
770 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
771 -HOMEPAGE="https://github.com/openrc/openrc/"
772 -
773 -if [[ ${PV} == "9999" ]]; then
774 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
775 - inherit git-r3
776 -else
777 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
778 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
779 -fi
780 -
781 -LICENSE="BSD-2"
782 -SLOT="0"
783 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
784 - tools unicode kernel_linux kernel_FreeBSD"
785 -
786 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
787 - ncurses? ( sys-libs/ncurses:0= )
788 - pam? (
789 - sys-auth/pambase
790 - virtual/pam
791 - )
792 - tools? ( dev-lang/perl )
793 - audit? ( sys-process/audit )
794 - kernel_linux? (
795 - sys-process/psmisc
796 - !<sys-process/procps-3.3.9-r2
797 - )
798 - selinux? (
799 - sys-apps/policycoreutils
800 - sys-libs/libselinux
801 - )
802 - !<sys-apps/baselayout-2.1-r1
803 - !<sys-fs/udev-init-scripts-27"
804 -DEPEND="${COMMON_DEPEND}
805 - virtual/os-headers
806 - ncurses? ( virtual/pkgconfig )"
807 -RDEPEND="${COMMON_DEPEND}
808 - !prefix? (
809 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
810 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
811 - )
812 - selinux? (
813 - sec-policy/selinux-base-policy
814 - sec-policy/selinux-openrc
815 - )
816 -"
817 -
818 -PDEPEND="netifrc? ( net-misc/netifrc )"
819 -
820 -src_prepare() {
821 - sed -i 's:0444:0644:' mk/sys.mk || die
822 -
823 - if [[ ${PV} == "9999" ]] ; then
824 - local ver="git-${EGIT_VERSION:0:6}"
825 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
826 - fi
827 -
828 - # Allow user patches to be applied without modifying the ebuild
829 - eapply_user
830 -}
831 -
832 -src_compile() {
833 - unset LIBDIR #266688
834 -
835 - MAKE_ARGS="${MAKE_ARGS}
836 - LIBNAME=$(get_libdir)
837 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
838 - MKNET=$(usex newnet)
839 - MKSELINUX=$(usex selinux)
840 - MKAUDIT=$(usex audit)
841 - MKPAM=$(usev pam)
842 - MKSTATICLIBS=$(usex static-libs)
843 - MKTOOLS=$(usex tools)"
844 -
845 - local brand="Unknown"
846 - if use kernel_linux ; then
847 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
848 - brand="Linux"
849 - elif use kernel_FreeBSD ; then
850 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
851 - brand="FreeBSD"
852 - fi
853 - export BRANDING="Gentoo ${brand}"
854 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
855 - export DEBUG=$(usev debug)
856 - export MKTERMCAP=$(usev ncurses)
857 -
858 - tc-export CC AR RANLIB
859 - emake ${MAKE_ARGS}
860 -}
861 -
862 -# set_config <file> <option name> <yes value> <no value> test
863 -# a value of "#" will just comment out the option
864 -set_config() {
865 - local file="${ED}/$1" var=$2 val com
866 - eval "${@:5}" && val=$3 || val=$4
867 - [[ ${val} == "#" ]] && com="#" && val='\2'
868 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
869 -}
870 -
871 -set_config_yes_no() {
872 - set_config "$1" "$2" YES NO "${@:3}"
873 -}
874 -
875 -src_install() {
876 - emake ${MAKE_ARGS} DESTDIR="${D}" install
877 -
878 - # move the shared libs back to /usr so ldscript can install
879 - # more of a minimal set of files
880 - # disabled for now due to #270646
881 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
882 - #gen_usr_ldscript -a einfo rc
883 - gen_usr_ldscript libeinfo.so
884 - gen_usr_ldscript librc.so
885 -
886 - if ! use kernel_linux; then
887 - keepdir /$(get_libdir)/rc/init.d
888 - fi
889 - keepdir /$(get_libdir)/rc/tmp
890 -
891 - # Backup our default runlevels
892 - dodir /usr/share/"${PN}"
893 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
894 - rm -rf "${ED}"/etc/runlevels
895 -
896 - # Setup unicode defaults for silly unicode users
897 - set_config_yes_no /etc/rc.conf unicode use unicode
898 -
899 - # Cater to the norm
900 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
901 -
902 - # On HPPA, do not run consolefont by default (bug #222889)
903 - if use hppa; then
904 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
905 - fi
906 -
907 - # Support for logfile rotation
908 - insinto /etc/logrotate.d
909 - newins "${FILESDIR}"/openrc.logrotate openrc
910 -
911 - # install gentoo pam.d files
912 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
913 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
914 -
915 - # install documentation
916 - dodoc ChangeLog *.md
917 - if use newnet; then
918 - dodoc README.newnet
919 - fi
920 -}
921 -
922 -add_boot_init() {
923 - local initd=$1
924 - local runlevel=${2:-boot}
925 - # if the initscript is not going to be installed and is not
926 - # currently installed, return
927 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
928 - || return
929 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
930 -
931 - # if runlevels dont exist just yet, then create it but still flag
932 - # to pkg_postinst that it needs real setup #277323
933 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
934 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
935 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
936 - fi
937 -
938 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
939 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
940 -}
941 -add_boot_init_mit_config() {
942 - local config=$1 initd=$2
943 - if [[ -e ${EROOT}${config} ]] ; then
944 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
945 - add_boot_init ${initd}
946 - fi
947 - fi
948 -}
949 -
950 -pkg_preinst() {
951 - local f LIBDIR=$(get_libdir)
952 -
953 - # avoid default thrashing in conf.d files when possible #295406
954 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
955 - (
956 - unset hostname HOSTNAME
957 - source "${EROOT}"etc/conf.d/hostname
958 - : ${hostname:=${HOSTNAME}}
959 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
960 - )
961 - fi
962 -
963 - # set default interactive shell to sulogin if it exists
964 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
965 -
966 - # termencoding was added in 0.2.1 and needed in boot
967 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
968 -
969 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
970 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
971 -
972 - if ! has_version ">=sys-apps/openrc-0.11"; then
973 - add_boot_init sysfs sysinit
974 - fi
975 -
976 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
977 - migrate_udev_mount_script
978 - add_boot_init tmpfiles.setup boot
979 - fi
980 -
981 - # these were added in 0.12.
982 - if ! has_version ">=sys-apps/openrc-0.12"; then
983 - add_boot_init loopback
984 - add_boot_init tmpfiles.dev sysinit
985 -
986 - # ensure existing /etc/conf.d/net is not removed
987 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
988 - # this needs to stay in openrc ebuilds for a long time. :(
989 - # Added in 0.12.
990 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
991 - einfo "Modifying conf.d/net to keep it from being removed"
992 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
993 -
994 -# The network scripts are now part of net-misc/netifrc
995 -# In order to avoid sys-apps/${P} from removing this file, this comment was
996 -# added; you can safely remove this comment. Please see
997 -# /usr/share/doc/netifrc*/README* for more information.
998 -EOF
999 - fi
1000 - fi
1001 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
1002 -
1003 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
1004 - add_boot_init mtab
1005 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
1006 - ewarn "${EROOT}etc/mtab will be replaced with a"
1007 - ewarn "symbolic link to /proc/self/mounts on the next"
1008 - ewarn "reboot."
1009 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
1010 - ewarn "if you do not want this to happen."
1011 - fi
1012 - fi
1013 -}
1014 -
1015 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
1016 -migrate_udev_mount_script() {
1017 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
1018 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
1019 - add_boot_init udev-mount sysinit
1020 - fi
1021 - return 0
1022 -}
1023 -
1024 -pkg_postinst() {
1025 - local LIBDIR=$(get_libdir)
1026 -
1027 - # Make our runlevels if they don't exist
1028 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
1029 - einfo "Copying across default runlevels"
1030 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
1031 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
1032 - else
1033 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
1034 - mkdir -p "${EROOT}"etc/runlevels/sysinit
1035 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
1036 - "${EROOT}"etc/runlevels/sysinit
1037 - fi
1038 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
1039 - mkdir -p "${EROOT}"etc/runlevels/shutdown
1040 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
1041 - "${EROOT}"etc/runlevels/shutdown
1042 - fi
1043 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
1044 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
1045 - "${EROOT}"etc/runlevels
1046 - fi
1047 - fi
1048 -
1049 - if use hppa; then
1050 - elog "Setting the console font does not work on all HPPA consoles."
1051 - elog "You can still enable it by running:"
1052 - elog "# rc-update add consolefont boot"
1053 - fi
1054 -
1055 - # Handle the conf.d/local.{start,stop} -> local.d transition
1056 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
1057 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
1058 - elog "files to ${EROOT}etc/local.d"
1059 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
1060 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
1061 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
1062 - fi
1063 -
1064 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
1065 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
1066 - ewarn "The dependency data could not be migrated to /run/openrc."
1067 - ewarn "This means you need to reboot your system."
1068 - fi
1069 - fi
1070 -
1071 - # update the dependency tree after touching all files #224171
1072 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
1073 -
1074 - if ! use newnet && ! use netifrc; then
1075 - ewarn "You have emerged OpenRc without network support. This"
1076 - ewarn "means you need to SET UP a network manager such as"
1077 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
1078 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
1079 - ewarn "Or, you have the option of emerging openrc with the newnet"
1080 - ewarn "use flag and configuring /etc/conf.d/network and"
1081 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
1082 - ewarn
1083 - fi
1084 -
1085 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
1086 - ewarn "Please add the network service to your boot runlevel"
1087 - ewarn "as soon as possible. Not doing so could leave you with a system"
1088 - ewarn "without networking."
1089 - ewarn
1090 - fi
1091 -}
1092
1093 diff --git a/sys-apps/openrc/openrc-0.21.5.ebuild b/sys-apps/openrc/openrc-0.21.5.ebuild
1094 deleted file mode 100644
1095 index 5ae86a0..00000000
1096 --- a/sys-apps/openrc/openrc-0.21.5.ebuild
1097 +++ /dev/null
1098 @@ -1,330 +0,0 @@
1099 -# Copyright 1999-2016 Gentoo Foundation
1100 -# Distributed under the terms of the GNU General Public License v2
1101 -# $Id$
1102 -
1103 -EAPI=6
1104 -
1105 -inherit flag-o-matic pam toolchain-funcs
1106 -
1107 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
1108 -HOMEPAGE="https://github.com/openrc/openrc/"
1109 -
1110 -if [[ ${PV} == "9999" ]]; then
1111 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
1112 - inherit git-r3
1113 -else
1114 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
1115 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
1116 -fi
1117 -
1118 -LICENSE="BSD-2"
1119 -SLOT="0"
1120 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
1121 - tools unicode kernel_linux kernel_FreeBSD"
1122 -
1123 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
1124 - ncurses? ( sys-libs/ncurses:0= )
1125 - pam? (
1126 - sys-auth/pambase
1127 - virtual/pam
1128 - )
1129 - tools? ( dev-lang/perl )
1130 - audit? ( sys-process/audit )
1131 - kernel_linux? (
1132 - sys-process/psmisc
1133 - !<sys-process/procps-3.3.9-r2
1134 - )
1135 - selinux? (
1136 - sys-apps/policycoreutils
1137 - sys-libs/libselinux
1138 - )
1139 - !<sys-apps/baselayout-2.1-r1
1140 - !<sys-fs/udev-init-scripts-27"
1141 -DEPEND="${COMMON_DEPEND}
1142 - virtual/os-headers
1143 - ncurses? ( virtual/pkgconfig )"
1144 -RDEPEND="${COMMON_DEPEND}
1145 - !prefix? (
1146 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
1147 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
1148 - )
1149 - selinux? (
1150 - sec-policy/selinux-base-policy
1151 - sec-policy/selinux-openrc
1152 - )
1153 -"
1154 -
1155 -PDEPEND="netifrc? ( net-misc/netifrc )"
1156 -
1157 -src_prepare() {
1158 - sed -i 's:0444:0644:' mk/sys.mk || die
1159 -
1160 - if [[ ${PV} == "9999" ]] ; then
1161 - local ver="git-${EGIT_VERSION:0:6}"
1162 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
1163 - fi
1164 -
1165 - # Allow user patches to be applied without modifying the ebuild
1166 - eapply_user
1167 -}
1168 -
1169 -src_compile() {
1170 - unset LIBDIR #266688
1171 -
1172 - MAKE_ARGS="${MAKE_ARGS}
1173 - LIBNAME=$(get_libdir)
1174 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
1175 - MKNET=$(usex newnet)
1176 - MKSELINUX=$(usex selinux)
1177 - MKAUDIT=$(usex audit)
1178 - MKPAM=$(usev pam)
1179 - MKSTATICLIBS=$(usex static-libs)
1180 - MKTOOLS=$(usex tools)"
1181 -
1182 - local brand="Unknown"
1183 - if use kernel_linux ; then
1184 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
1185 - brand="Linux"
1186 - elif use kernel_FreeBSD ; then
1187 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
1188 - brand="FreeBSD"
1189 - fi
1190 - export BRANDING="Gentoo ${brand}"
1191 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
1192 - export DEBUG=$(usev debug)
1193 - export MKTERMCAP=$(usev ncurses)
1194 -
1195 - tc-export CC AR RANLIB
1196 - emake ${MAKE_ARGS}
1197 -}
1198 -
1199 -# set_config <file> <option name> <yes value> <no value> test
1200 -# a value of "#" will just comment out the option
1201 -set_config() {
1202 - local file="${ED}/$1" var=$2 val com
1203 - eval "${@:5}" && val=$3 || val=$4
1204 - [[ ${val} == "#" ]] && com="#" && val='\2'
1205 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
1206 -}
1207 -
1208 -set_config_yes_no() {
1209 - set_config "$1" "$2" YES NO "${@:3}"
1210 -}
1211 -
1212 -src_install() {
1213 - emake ${MAKE_ARGS} DESTDIR="${D}" install
1214 -
1215 - # move the shared libs back to /usr so ldscript can install
1216 - # more of a minimal set of files
1217 - # disabled for now due to #270646
1218 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
1219 - #gen_usr_ldscript -a einfo rc
1220 - gen_usr_ldscript libeinfo.so
1221 - gen_usr_ldscript librc.so
1222 -
1223 - if ! use kernel_linux; then
1224 - keepdir /$(get_libdir)/rc/init.d
1225 - fi
1226 - keepdir /$(get_libdir)/rc/tmp
1227 -
1228 - # Backup our default runlevels
1229 - dodir /usr/share/"${PN}"
1230 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
1231 - rm -rf "${ED}"/etc/runlevels
1232 -
1233 - # Setup unicode defaults for silly unicode users
1234 - set_config_yes_no /etc/rc.conf unicode use unicode
1235 -
1236 - # Cater to the norm
1237 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
1238 -
1239 - # On HPPA, do not run consolefont by default (bug #222889)
1240 - if use hppa; then
1241 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
1242 - fi
1243 -
1244 - # Support for logfile rotation
1245 - insinto /etc/logrotate.d
1246 - newins "${FILESDIR}"/openrc.logrotate openrc
1247 -
1248 - # install gentoo pam.d files
1249 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
1250 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
1251 -
1252 - # install documentation
1253 - dodoc ChangeLog *.md
1254 - if use newnet; then
1255 - dodoc README.newnet
1256 - fi
1257 -}
1258 -
1259 -add_boot_init() {
1260 - local initd=$1
1261 - local runlevel=${2:-boot}
1262 - # if the initscript is not going to be installed and is not
1263 - # currently installed, return
1264 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
1265 - || return
1266 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
1267 -
1268 - # if runlevels dont exist just yet, then create it but still flag
1269 - # to pkg_postinst that it needs real setup #277323
1270 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
1271 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
1272 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
1273 - fi
1274 -
1275 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
1276 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
1277 -}
1278 -add_boot_init_mit_config() {
1279 - local config=$1 initd=$2
1280 - if [[ -e ${EROOT}${config} ]] ; then
1281 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
1282 - add_boot_init ${initd}
1283 - fi
1284 - fi
1285 -}
1286 -
1287 -pkg_preinst() {
1288 - local f LIBDIR=$(get_libdir)
1289 -
1290 - # avoid default thrashing in conf.d files when possible #295406
1291 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
1292 - (
1293 - unset hostname HOSTNAME
1294 - source "${EROOT}"etc/conf.d/hostname
1295 - : ${hostname:=${HOSTNAME}}
1296 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
1297 - )
1298 - fi
1299 -
1300 - # set default interactive shell to sulogin if it exists
1301 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
1302 -
1303 - # termencoding was added in 0.2.1 and needed in boot
1304 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
1305 -
1306 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
1307 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
1308 -
1309 - if ! has_version ">=sys-apps/openrc-0.11"; then
1310 - add_boot_init sysfs sysinit
1311 - fi
1312 -
1313 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
1314 - migrate_udev_mount_script
1315 - add_boot_init tmpfiles.setup boot
1316 - fi
1317 -
1318 - # these were added in 0.12.
1319 - if ! has_version ">=sys-apps/openrc-0.12"; then
1320 - add_boot_init loopback
1321 - add_boot_init tmpfiles.dev sysinit
1322 -
1323 - # ensure existing /etc/conf.d/net is not removed
1324 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
1325 - # this needs to stay in openrc ebuilds for a long time. :(
1326 - # Added in 0.12.
1327 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
1328 - einfo "Modifying conf.d/net to keep it from being removed"
1329 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
1330 -
1331 -# The network scripts are now part of net-misc/netifrc
1332 -# In order to avoid sys-apps/${P} from removing this file, this comment was
1333 -# added; you can safely remove this comment. Please see
1334 -# /usr/share/doc/netifrc*/README* for more information.
1335 -EOF
1336 - fi
1337 - fi
1338 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
1339 -
1340 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
1341 - add_boot_init mtab
1342 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
1343 - ewarn "${EROOT}etc/mtab will be replaced with a"
1344 - ewarn "symbolic link to /proc/self/mounts on the next"
1345 - ewarn "reboot."
1346 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
1347 - ewarn "if you do not want this to happen."
1348 - fi
1349 - fi
1350 -}
1351 -
1352 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
1353 -migrate_udev_mount_script() {
1354 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
1355 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
1356 - add_boot_init udev-mount sysinit
1357 - fi
1358 - return 0
1359 -}
1360 -
1361 -pkg_postinst() {
1362 - local LIBDIR=$(get_libdir)
1363 -
1364 - # Make our runlevels if they don't exist
1365 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
1366 - einfo "Copying across default runlevels"
1367 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
1368 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
1369 - else
1370 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
1371 - mkdir -p "${EROOT}"etc/runlevels/sysinit
1372 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
1373 - "${EROOT}"etc/runlevels/sysinit
1374 - fi
1375 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
1376 - mkdir -p "${EROOT}"etc/runlevels/shutdown
1377 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
1378 - "${EROOT}"etc/runlevels/shutdown
1379 - fi
1380 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
1381 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
1382 - "${EROOT}"etc/runlevels
1383 - fi
1384 - fi
1385 -
1386 - if use hppa; then
1387 - elog "Setting the console font does not work on all HPPA consoles."
1388 - elog "You can still enable it by running:"
1389 - elog "# rc-update add consolefont boot"
1390 - fi
1391 -
1392 - # Handle the conf.d/local.{start,stop} -> local.d transition
1393 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
1394 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
1395 - elog "files to ${EROOT}etc/local.d"
1396 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
1397 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
1398 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
1399 - fi
1400 -
1401 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
1402 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
1403 - ewarn "The dependency data could not be migrated to /run/openrc."
1404 - ewarn "This means you need to reboot your system."
1405 - fi
1406 - fi
1407 -
1408 - # update the dependency tree after touching all files #224171
1409 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
1410 -
1411 - if ! use newnet && ! use netifrc; then
1412 - ewarn "You have emerged OpenRc without network support. This"
1413 - ewarn "means you need to SET UP a network manager such as"
1414 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
1415 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
1416 - ewarn "Or, you have the option of emerging openrc with the newnet"
1417 - ewarn "use flag and configuring /etc/conf.d/network and"
1418 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
1419 - ewarn
1420 - fi
1421 -
1422 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
1423 - ewarn "Please add the network service to your boot runlevel"
1424 - ewarn "as soon as possible. Not doing so could leave you with a system"
1425 - ewarn "without networking."
1426 - ewarn
1427 - fi
1428 -}
1429
1430 diff --git a/sys-apps/openrc/openrc-0.21.6.ebuild b/sys-apps/openrc/openrc-0.21.6.ebuild
1431 deleted file mode 100644
1432 index 5ae86a0..00000000
1433 --- a/sys-apps/openrc/openrc-0.21.6.ebuild
1434 +++ /dev/null
1435 @@ -1,330 +0,0 @@
1436 -# Copyright 1999-2016 Gentoo Foundation
1437 -# Distributed under the terms of the GNU General Public License v2
1438 -# $Id$
1439 -
1440 -EAPI=6
1441 -
1442 -inherit flag-o-matic pam toolchain-funcs
1443 -
1444 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
1445 -HOMEPAGE="https://github.com/openrc/openrc/"
1446 -
1447 -if [[ ${PV} == "9999" ]]; then
1448 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
1449 - inherit git-r3
1450 -else
1451 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
1452 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
1453 -fi
1454 -
1455 -LICENSE="BSD-2"
1456 -SLOT="0"
1457 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
1458 - tools unicode kernel_linux kernel_FreeBSD"
1459 -
1460 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
1461 - ncurses? ( sys-libs/ncurses:0= )
1462 - pam? (
1463 - sys-auth/pambase
1464 - virtual/pam
1465 - )
1466 - tools? ( dev-lang/perl )
1467 - audit? ( sys-process/audit )
1468 - kernel_linux? (
1469 - sys-process/psmisc
1470 - !<sys-process/procps-3.3.9-r2
1471 - )
1472 - selinux? (
1473 - sys-apps/policycoreutils
1474 - sys-libs/libselinux
1475 - )
1476 - !<sys-apps/baselayout-2.1-r1
1477 - !<sys-fs/udev-init-scripts-27"
1478 -DEPEND="${COMMON_DEPEND}
1479 - virtual/os-headers
1480 - ncurses? ( virtual/pkgconfig )"
1481 -RDEPEND="${COMMON_DEPEND}
1482 - !prefix? (
1483 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
1484 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
1485 - )
1486 - selinux? (
1487 - sec-policy/selinux-base-policy
1488 - sec-policy/selinux-openrc
1489 - )
1490 -"
1491 -
1492 -PDEPEND="netifrc? ( net-misc/netifrc )"
1493 -
1494 -src_prepare() {
1495 - sed -i 's:0444:0644:' mk/sys.mk || die
1496 -
1497 - if [[ ${PV} == "9999" ]] ; then
1498 - local ver="git-${EGIT_VERSION:0:6}"
1499 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
1500 - fi
1501 -
1502 - # Allow user patches to be applied without modifying the ebuild
1503 - eapply_user
1504 -}
1505 -
1506 -src_compile() {
1507 - unset LIBDIR #266688
1508 -
1509 - MAKE_ARGS="${MAKE_ARGS}
1510 - LIBNAME=$(get_libdir)
1511 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
1512 - MKNET=$(usex newnet)
1513 - MKSELINUX=$(usex selinux)
1514 - MKAUDIT=$(usex audit)
1515 - MKPAM=$(usev pam)
1516 - MKSTATICLIBS=$(usex static-libs)
1517 - MKTOOLS=$(usex tools)"
1518 -
1519 - local brand="Unknown"
1520 - if use kernel_linux ; then
1521 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
1522 - brand="Linux"
1523 - elif use kernel_FreeBSD ; then
1524 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
1525 - brand="FreeBSD"
1526 - fi
1527 - export BRANDING="Gentoo ${brand}"
1528 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
1529 - export DEBUG=$(usev debug)
1530 - export MKTERMCAP=$(usev ncurses)
1531 -
1532 - tc-export CC AR RANLIB
1533 - emake ${MAKE_ARGS}
1534 -}
1535 -
1536 -# set_config <file> <option name> <yes value> <no value> test
1537 -# a value of "#" will just comment out the option
1538 -set_config() {
1539 - local file="${ED}/$1" var=$2 val com
1540 - eval "${@:5}" && val=$3 || val=$4
1541 - [[ ${val} == "#" ]] && com="#" && val='\2'
1542 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
1543 -}
1544 -
1545 -set_config_yes_no() {
1546 - set_config "$1" "$2" YES NO "${@:3}"
1547 -}
1548 -
1549 -src_install() {
1550 - emake ${MAKE_ARGS} DESTDIR="${D}" install
1551 -
1552 - # move the shared libs back to /usr so ldscript can install
1553 - # more of a minimal set of files
1554 - # disabled for now due to #270646
1555 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
1556 - #gen_usr_ldscript -a einfo rc
1557 - gen_usr_ldscript libeinfo.so
1558 - gen_usr_ldscript librc.so
1559 -
1560 - if ! use kernel_linux; then
1561 - keepdir /$(get_libdir)/rc/init.d
1562 - fi
1563 - keepdir /$(get_libdir)/rc/tmp
1564 -
1565 - # Backup our default runlevels
1566 - dodir /usr/share/"${PN}"
1567 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
1568 - rm -rf "${ED}"/etc/runlevels
1569 -
1570 - # Setup unicode defaults for silly unicode users
1571 - set_config_yes_no /etc/rc.conf unicode use unicode
1572 -
1573 - # Cater to the norm
1574 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
1575 -
1576 - # On HPPA, do not run consolefont by default (bug #222889)
1577 - if use hppa; then
1578 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
1579 - fi
1580 -
1581 - # Support for logfile rotation
1582 - insinto /etc/logrotate.d
1583 - newins "${FILESDIR}"/openrc.logrotate openrc
1584 -
1585 - # install gentoo pam.d files
1586 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
1587 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
1588 -
1589 - # install documentation
1590 - dodoc ChangeLog *.md
1591 - if use newnet; then
1592 - dodoc README.newnet
1593 - fi
1594 -}
1595 -
1596 -add_boot_init() {
1597 - local initd=$1
1598 - local runlevel=${2:-boot}
1599 - # if the initscript is not going to be installed and is not
1600 - # currently installed, return
1601 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
1602 - || return
1603 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
1604 -
1605 - # if runlevels dont exist just yet, then create it but still flag
1606 - # to pkg_postinst that it needs real setup #277323
1607 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
1608 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
1609 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
1610 - fi
1611 -
1612 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
1613 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
1614 -}
1615 -add_boot_init_mit_config() {
1616 - local config=$1 initd=$2
1617 - if [[ -e ${EROOT}${config} ]] ; then
1618 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
1619 - add_boot_init ${initd}
1620 - fi
1621 - fi
1622 -}
1623 -
1624 -pkg_preinst() {
1625 - local f LIBDIR=$(get_libdir)
1626 -
1627 - # avoid default thrashing in conf.d files when possible #295406
1628 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
1629 - (
1630 - unset hostname HOSTNAME
1631 - source "${EROOT}"etc/conf.d/hostname
1632 - : ${hostname:=${HOSTNAME}}
1633 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
1634 - )
1635 - fi
1636 -
1637 - # set default interactive shell to sulogin if it exists
1638 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
1639 -
1640 - # termencoding was added in 0.2.1 and needed in boot
1641 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
1642 -
1643 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
1644 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
1645 -
1646 - if ! has_version ">=sys-apps/openrc-0.11"; then
1647 - add_boot_init sysfs sysinit
1648 - fi
1649 -
1650 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
1651 - migrate_udev_mount_script
1652 - add_boot_init tmpfiles.setup boot
1653 - fi
1654 -
1655 - # these were added in 0.12.
1656 - if ! has_version ">=sys-apps/openrc-0.12"; then
1657 - add_boot_init loopback
1658 - add_boot_init tmpfiles.dev sysinit
1659 -
1660 - # ensure existing /etc/conf.d/net is not removed
1661 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
1662 - # this needs to stay in openrc ebuilds for a long time. :(
1663 - # Added in 0.12.
1664 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
1665 - einfo "Modifying conf.d/net to keep it from being removed"
1666 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
1667 -
1668 -# The network scripts are now part of net-misc/netifrc
1669 -# In order to avoid sys-apps/${P} from removing this file, this comment was
1670 -# added; you can safely remove this comment. Please see
1671 -# /usr/share/doc/netifrc*/README* for more information.
1672 -EOF
1673 - fi
1674 - fi
1675 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
1676 -
1677 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
1678 - add_boot_init mtab
1679 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
1680 - ewarn "${EROOT}etc/mtab will be replaced with a"
1681 - ewarn "symbolic link to /proc/self/mounts on the next"
1682 - ewarn "reboot."
1683 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
1684 - ewarn "if you do not want this to happen."
1685 - fi
1686 - fi
1687 -}
1688 -
1689 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
1690 -migrate_udev_mount_script() {
1691 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
1692 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
1693 - add_boot_init udev-mount sysinit
1694 - fi
1695 - return 0
1696 -}
1697 -
1698 -pkg_postinst() {
1699 - local LIBDIR=$(get_libdir)
1700 -
1701 - # Make our runlevels if they don't exist
1702 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
1703 - einfo "Copying across default runlevels"
1704 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
1705 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
1706 - else
1707 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
1708 - mkdir -p "${EROOT}"etc/runlevels/sysinit
1709 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
1710 - "${EROOT}"etc/runlevels/sysinit
1711 - fi
1712 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
1713 - mkdir -p "${EROOT}"etc/runlevels/shutdown
1714 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
1715 - "${EROOT}"etc/runlevels/shutdown
1716 - fi
1717 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
1718 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
1719 - "${EROOT}"etc/runlevels
1720 - fi
1721 - fi
1722 -
1723 - if use hppa; then
1724 - elog "Setting the console font does not work on all HPPA consoles."
1725 - elog "You can still enable it by running:"
1726 - elog "# rc-update add consolefont boot"
1727 - fi
1728 -
1729 - # Handle the conf.d/local.{start,stop} -> local.d transition
1730 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
1731 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
1732 - elog "files to ${EROOT}etc/local.d"
1733 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
1734 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
1735 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
1736 - fi
1737 -
1738 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
1739 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
1740 - ewarn "The dependency data could not be migrated to /run/openrc."
1741 - ewarn "This means you need to reboot your system."
1742 - fi
1743 - fi
1744 -
1745 - # update the dependency tree after touching all files #224171
1746 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
1747 -
1748 - if ! use newnet && ! use netifrc; then
1749 - ewarn "You have emerged OpenRc without network support. This"
1750 - ewarn "means you need to SET UP a network manager such as"
1751 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
1752 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
1753 - ewarn "Or, you have the option of emerging openrc with the newnet"
1754 - ewarn "use flag and configuring /etc/conf.d/network and"
1755 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
1756 - ewarn
1757 - fi
1758 -
1759 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
1760 - ewarn "Please add the network service to your boot runlevel"
1761 - ewarn "as soon as possible. Not doing so could leave you with a system"
1762 - ewarn "without networking."
1763 - ewarn
1764 - fi
1765 -}
1766
1767 diff --git a/sys-apps/openrc/openrc-0.21.ebuild b/sys-apps/openrc/openrc-0.21.ebuild
1768 deleted file mode 100644
1769 index 60d554a..00000000
1770 --- a/sys-apps/openrc/openrc-0.21.ebuild
1771 +++ /dev/null
1772 @@ -1,352 +0,0 @@
1773 -# Copyright 1999-2016 Gentoo Foundation
1774 -# Distributed under the terms of the GNU General Public License v2
1775 -# $Id$
1776 -
1777 -EAPI=6
1778 -
1779 -inherit flag-o-matic pam toolchain-funcs
1780 -
1781 -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
1782 -HOMEPAGE="https://github.com/openrc/openrc/"
1783 -
1784 -if [[ ${PV} == "9999" ]]; then
1785 - EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
1786 - inherit git-r3
1787 -else
1788 - SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
1789 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
1790 -fi
1791 -
1792 -LICENSE="BSD-2"
1793 -SLOT="0"
1794 -IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs
1795 - tools unicode kernel_linux kernel_FreeBSD"
1796 -
1797 -COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
1798 - ncurses? ( sys-libs/ncurses:0= )
1799 - pam? (
1800 - sys-auth/pambase
1801 - virtual/pam
1802 - )
1803 - tools? ( dev-lang/perl )
1804 - audit? ( sys-process/audit )
1805 - kernel_linux? (
1806 - sys-process/psmisc
1807 - !<sys-process/procps-3.3.9-r2
1808 - )
1809 - selinux? (
1810 - sys-apps/policycoreutils
1811 - sys-libs/libselinux
1812 - )
1813 - !<sys-apps/baselayout-2.1-r1
1814 - !<sys-fs/udev-init-scripts-27"
1815 -DEPEND="${COMMON_DEPEND}
1816 - virtual/os-headers
1817 - ncurses? ( virtual/pkgconfig )"
1818 -RDEPEND="${COMMON_DEPEND}
1819 - !prefix? (
1820 - kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
1821 - kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
1822 - )
1823 - selinux? (
1824 - sec-policy/selinux-base-policy
1825 - sec-policy/selinux-openrc
1826 - )
1827 -"
1828 -
1829 -PDEPEND="netifrc? ( net-misc/netifrc )"
1830 -
1831 -src_prepare() {
1832 - sed -i 's:0444:0644:' mk/sys.mk || die
1833 -
1834 - if [[ ${PV} == "9999" ]] ; then
1835 - local ver="git-${EGIT_VERSION:0:6}"
1836 - sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
1837 - fi
1838 -
1839 - # Allow user patches to be applied without modifying the ebuild
1840 - eapply_user
1841 -}
1842 -
1843 -src_compile() {
1844 - unset LIBDIR #266688
1845 -
1846 - MAKE_ARGS="${MAKE_ARGS}
1847 - LIBNAME=$(get_libdir)
1848 - LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
1849 - MKNET=$(usex newnet)
1850 - MKSELINUX=$(usex selinux)
1851 - MKAUDIT=$(usex audit)
1852 - MKPAM=$(usev pam)
1853 - MKSTATICLIBS=$(usex static-libs)
1854 - MKTOOLS=$(usex tools)"
1855 -
1856 - local brand="Unknown"
1857 - if use kernel_linux ; then
1858 - MAKE_ARGS="${MAKE_ARGS} OS=Linux"
1859 - brand="Linux"
1860 - elif use kernel_FreeBSD ; then
1861 - MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
1862 - brand="FreeBSD"
1863 - fi
1864 - export BRANDING="Gentoo ${brand}"
1865 - use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
1866 - export DEBUG=$(usev debug)
1867 - export MKTERMCAP=$(usev ncurses)
1868 -
1869 - tc-export CC AR RANLIB
1870 - emake ${MAKE_ARGS}
1871 -}
1872 -
1873 -# set_config <file> <option name> <yes value> <no value> test
1874 -# a value of "#" will just comment out the option
1875 -set_config() {
1876 - local file="${ED}/$1" var=$2 val com
1877 - eval "${@:5}" && val=$3 || val=$4
1878 - [[ ${val} == "#" ]] && com="#" && val='\2'
1879 - sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
1880 -}
1881 -
1882 -set_config_yes_no() {
1883 - set_config "$1" "$2" YES NO "${@:3}"
1884 -}
1885 -
1886 -src_install() {
1887 - emake ${MAKE_ARGS} DESTDIR="${D}" install
1888 -
1889 - # move the shared libs back to /usr so ldscript can install
1890 - # more of a minimal set of files
1891 - # disabled for now due to #270646
1892 - #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
1893 - #gen_usr_ldscript -a einfo rc
1894 - gen_usr_ldscript libeinfo.so
1895 - gen_usr_ldscript librc.so
1896 -
1897 - if ! use kernel_linux; then
1898 - keepdir /$(get_libdir)/rc/init.d
1899 - fi
1900 - keepdir /$(get_libdir)/rc/tmp
1901 -
1902 - # Backup our default runlevels
1903 - dodir /usr/share/"${PN}"
1904 - cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
1905 - rm -rf "${ED}"/etc/runlevels
1906 -
1907 - # Setup unicode defaults for silly unicode users
1908 - set_config_yes_no /etc/rc.conf unicode use unicode
1909 -
1910 - # Cater to the norm
1911 - set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
1912 -
1913 - # On HPPA, do not run consolefont by default (bug #222889)
1914 - if use hppa; then
1915 - rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
1916 - fi
1917 -
1918 - # Support for logfile rotation
1919 - insinto /etc/logrotate.d
1920 - newins "${FILESDIR}"/openrc.logrotate openrc
1921 -
1922 - # install gentoo pam.d files
1923 - newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
1924 - newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
1925 -
1926 - # install documentation
1927 - dodoc ChangeLog *.md
1928 - if use newnet; then
1929 - dodoc README.newnet
1930 - fi
1931 -}
1932 -
1933 -add_boot_init() {
1934 - local initd=$1
1935 - local runlevel=${2:-boot}
1936 - # if the initscript is not going to be installed and is not
1937 - # currently installed, return
1938 - [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
1939 - || return
1940 - [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
1941 -
1942 - # if runlevels dont exist just yet, then create it but still flag
1943 - # to pkg_postinst that it needs real setup #277323
1944 - if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
1945 - mkdir -p "${EROOT}"etc/runlevels/${runlevel}
1946 - touch "${EROOT}"etc/runlevels/.add_boot_init.created
1947 - fi
1948 -
1949 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
1950 - ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
1951 -}
1952 -add_boot_init_mit_config() {
1953 - local config=$1 initd=$2
1954 - if [[ -e ${EROOT}${config} ]] ; then
1955 - if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
1956 - add_boot_init ${initd}
1957 - fi
1958 - fi
1959 -}
1960 -
1961 -pkg_preinst() {
1962 - local f LIBDIR=$(get_libdir)
1963 -
1964 - # avoid default thrashing in conf.d files when possible #295406
1965 - if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
1966 - (
1967 - unset hostname HOSTNAME
1968 - source "${EROOT}"etc/conf.d/hostname
1969 - : ${hostname:=${HOSTNAME}}
1970 - [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
1971 - )
1972 - fi
1973 -
1974 - # set default interactive shell to sulogin if it exists
1975 - set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
1976 -
1977 - # termencoding was added in 0.2.1 and needed in boot
1978 - has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
1979 -
1980 - # swapfiles was added in 0.9.9 and needed in boot (february 2012)
1981 - has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
1982 -
1983 - if ! has_version ">=sys-apps/openrc-0.11"; then
1984 - add_boot_init sysfs sysinit
1985 - fi
1986 -
1987 - if ! has_version ">=sys-apps/openrc-0.11.3" ; then
1988 - migrate_udev_mount_script
1989 - add_boot_init tmpfiles.setup boot
1990 - fi
1991 -
1992 - # these were added in 0.12.
1993 - if ! has_version ">=sys-apps/openrc-0.12"; then
1994 - add_boot_init loopback
1995 - add_boot_init tmpfiles.dev sysinit
1996 -
1997 - # ensure existing /etc/conf.d/net is not removed
1998 - # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
1999 - # this needs to stay in openrc ebuilds for a long time. :(
2000 - # Added in 0.12.
2001 - if [[ -f "${EROOT}"etc/conf.d/net ]]; then
2002 - einfo "Modifying conf.d/net to keep it from being removed"
2003 - cat <<-EOF >>"${EROOT}"etc/conf.d/net
2004 -
2005 -# The network scripts are now part of net-misc/netifrc
2006 -# In order to avoid sys-apps/${P} from removing this file, this comment was
2007 -# added; you can safely remove this comment. Please see
2008 -# /usr/share/doc/netifrc*/README* for more information.
2009 -EOF
2010 - fi
2011 - fi
2012 - has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
2013 -
2014 - if ! has_version ">=sys-apps/openrc-0.18.3"; then
2015 - add_boot_init mtab
2016 - if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then
2017 - ewarn "${EROOT}etc/mtab will be replaced with a"
2018 - ewarn "symbolic link to /proc/self/mounts on the next"
2019 - ewarn "reboot."
2020 - ewarn "Change the setting in ${EROOT}etc/conf.d/mtab"
2021 - ewarn "if you do not want this to happen."
2022 - fi
2023 - fi
2024 -}
2025 -
2026 -# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
2027 -migrate_udev_mount_script() {
2028 - if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
2029 - ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
2030 - add_boot_init udev-mount sysinit
2031 - fi
2032 - return 0
2033 -}
2034 -
2035 -pkg_postinst() {
2036 - local LIBDIR=$(get_libdir)
2037 -
2038 - # Make our runlevels if they don't exist
2039 - if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
2040 - einfo "Copying across default runlevels"
2041 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
2042 - rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
2043 - else
2044 - if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
2045 - mkdir -p "${EROOT}"etc/runlevels/sysinit
2046 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
2047 - "${EROOT}"etc/runlevels/sysinit
2048 - fi
2049 - if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
2050 - mkdir -p "${EROOT}"etc/runlevels/shutdown
2051 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
2052 - "${EROOT}"etc/runlevels/shutdown
2053 - fi
2054 - if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then
2055 - cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \
2056 - "${EROOT}"etc/runlevels
2057 - fi
2058 - fi
2059 -
2060 - if use hppa; then
2061 - elog "Setting the console font does not work on all HPPA consoles."
2062 - elog "You can still enable it by running:"
2063 - elog "# rc-update add consolefont boot"
2064 - fi
2065 -
2066 - # Handle the conf.d/local.{start,stop} -> local.d transition
2067 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
2068 - elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
2069 - elog "files to ${EROOT}etc/local.d"
2070 - mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
2071 - mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
2072 - chmod +x "${EROOT}"etc/local.d/*{start,stop}
2073 - fi
2074 -
2075 - if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
2076 - if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
2077 - ewarn "The dependency data could not be migrated to /run/openrc."
2078 - ewarn "This means you need to reboot your system."
2079 - fi
2080 - fi
2081 -
2082 - # update the dependency tree after touching all files #224171
2083 - [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
2084 -
2085 - if ! use newnet && ! use netifrc; then
2086 - ewarn "You have emerged OpenRc without network support. This"
2087 - ewarn "means you need to SET UP a network manager such as"
2088 - ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
2089 - ewarn "net-misc/NetworkManager, or net-misc/badvpn."
2090 - ewarn "Or, you have the option of emerging openrc with the newnet"
2091 - ewarn "use flag and configuring /etc/conf.d/network and"
2092 - ewarn "/etc/conf.d/staticroute if you only use static interfaces."
2093 - ewarn
2094 - fi
2095 -
2096 - if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
2097 - ewarn "Please add the network service to your boot runlevel"
2098 - ewarn "as soon as possible. Not doing so could leave you with a system"
2099 - ewarn "without networking."
2100 - ewarn
2101 - fi
2102 -
2103 - ewarn "In this version of OpenRC, the loopback interface no longer"
2104 - ewarn "satisfies the net virtual."
2105 - ewarn "If you have services now which do not start because of this,"
2106 - ewarn "They can be fixed by adding rc_need=\"!net\""
2107 - ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
2108 - ewarn "You should also file a bug against the service asking that"
2109 - ewarn "need net be dropped from the dependencies."
2110 - ewarn "The bug you file should block the following tracker:"
2111 - ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
2112 - ewarn
2113 -
2114 - # Updated for 0.13.2.
2115 - ewarn "Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not"
2116 - ewarn "fixed correctly in earlier versions of OpenRC."
2117 - ewarn "The correct fix is implemented in this version, but that"
2118 - ewarn "means netmount needs to be added to the default runlevel if"
2119 - ewarn "you are using nfs file systems."
2120 - ewarn
2121 -
2122 - elog "You should now update all files in /etc, using etc-update"
2123 - elog "or equivalent before restarting any services or this host."
2124 -}