1 |
commit: f140910c445680911588a5b029d4af7667e1f260 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 23:28:06 2018 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 28 23:36:48 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f140910c |
7 |
|
8 |
Sys-apps/openrc: remove old versions |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/openrc/Manifest | 2 - |
13 |
sys-apps/openrc/openrc-0.28.ebuild | 329 ----------------------------------- |
14 |
sys-apps/openrc/openrc-0.32.1.ebuild | 329 ----------------------------------- |
15 |
3 files changed, 660 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest |
18 |
index cdaa5f6573f..2029c82e6dd 100644 |
19 |
--- a/sys-apps/openrc/Manifest |
20 |
+++ b/sys-apps/openrc/Manifest |
21 |
@@ -1,3 +1 @@ |
22 |
-DIST openrc-0.28.tar.gz 224228 BLAKE2B 6f4693003aba77148bb5ed3516c1372e3ca67364a25d866fce418ba6a287a8cc0c33534cbe1edcdab32a869f8f8dc72819fb2dffc46375bca1e053fb3acf415b SHA512 a10c293bf4287bcc4ffb9c996cbc1294f979483ea9fb2efb0dd1becee193f49ff114530c078850e8c11cf2c0a812be2e74801352fdbfe313b90cd9af5b8ccf93 |
23 |
-DIST openrc-0.32.1.tar.gz 223808 BLAKE2B 4aadd36e371de56d5c2b59597ab04c1b004be73e370fa00560b77ab0587ba49fb4a49608aba4ad85ed7279eadf54e023961e25784e3078edeed4891956995f38 SHA512 9cd48978fcd69a6d80b474a06b56550cc8c538d6d7a1cb6f88b90087593eebb8185ee5192ec05be2f87f61de53dbe6ded9058aee7ae8f806bb0d7d7da70f62d8 |
24 |
DIST openrc-0.34.11.tar.gz 228054 BLAKE2B 8d4fdd7de4b3c44df0ccec728b91bd2624582dc2bbdb1fa7892aa61ce0a953a7cf66964f38da888636d895e3c6b776747a4a7fbbdbbbd26029313695f35837fe SHA512 76245d31c6fe9e90e5e2f35ce918b915fc88c231674e0c99dc98b8f3fa120e794900eec9919a0ab029a081b206393246eccb9119a79c90ad6e39325d022928be |
25 |
|
26 |
diff --git a/sys-apps/openrc/openrc-0.28.ebuild b/sys-apps/openrc/openrc-0.28.ebuild |
27 |
deleted file mode 100644 |
28 |
index 23e168975f3..00000000000 |
29 |
--- a/sys-apps/openrc/openrc-0.28.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,329 +0,0 @@ |
32 |
-# Copyright 1999-2018 Gentoo Foundation |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
- |
35 |
-EAPI=6 |
36 |
- |
37 |
-inherit flag-o-matic pam toolchain-funcs |
38 |
- |
39 |
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
40 |
-HOMEPAGE="https://github.com/openrc/openrc/" |
41 |
- |
42 |
-if [[ ${PV} == "9999" ]]; then |
43 |
- EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
44 |
- inherit git-r3 |
45 |
-else |
46 |
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
47 |
- KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
48 |
-fi |
49 |
- |
50 |
-LICENSE="BSD-2" |
51 |
-SLOT="0" |
52 |
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
53 |
- unicode kernel_linux kernel_FreeBSD" |
54 |
- |
55 |
-COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
56 |
- ncurses? ( sys-libs/ncurses:0= ) |
57 |
- pam? ( |
58 |
- sys-auth/pambase |
59 |
- virtual/pam |
60 |
- ) |
61 |
- audit? ( sys-process/audit ) |
62 |
- kernel_linux? ( |
63 |
- sys-process/psmisc |
64 |
- !<sys-process/procps-3.3.9-r2 |
65 |
- ) |
66 |
- selinux? ( |
67 |
- sys-apps/policycoreutils |
68 |
- sys-libs/libselinux |
69 |
- ) |
70 |
- !<sys-apps/baselayout-2.1-r1 |
71 |
- !<sys-fs/udev-init-scripts-27" |
72 |
-DEPEND="${COMMON_DEPEND} |
73 |
- virtual/os-headers |
74 |
- ncurses? ( virtual/pkgconfig )" |
75 |
-RDEPEND="${COMMON_DEPEND} |
76 |
- !prefix? ( |
77 |
- kernel_linux? ( |
78 |
- >=sys-apps/sysvinit-2.86-r6[selinux?] |
79 |
- virtual/tmpfiles |
80 |
- ) |
81 |
- kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
82 |
- ) |
83 |
- selinux? ( |
84 |
- sec-policy/selinux-base-policy |
85 |
- sec-policy/selinux-openrc |
86 |
- ) |
87 |
-" |
88 |
- |
89 |
-PDEPEND="netifrc? ( net-misc/netifrc )" |
90 |
- |
91 |
-src_prepare() { |
92 |
- default |
93 |
- |
94 |
- sed -i 's:0444:0644:' mk/sys.mk || die |
95 |
- |
96 |
- if [[ ${PV} == "9999" ]] ; then |
97 |
- local ver="git-${EGIT_VERSION:0:6}" |
98 |
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
99 |
- fi |
100 |
-} |
101 |
- |
102 |
-src_compile() { |
103 |
- unset LIBDIR #266688 |
104 |
- |
105 |
- MAKE_ARGS="${MAKE_ARGS} |
106 |
- LIBNAME=$(get_libdir) |
107 |
- LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc |
108 |
- MKNET=$(usex newnet) |
109 |
- MKSELINUX=$(usex selinux) |
110 |
- MKAUDIT=$(usex audit) |
111 |
- MKPAM=$(usev pam) |
112 |
- MKSTATICLIBS=$(usex static-libs)" |
113 |
- |
114 |
- local brand="Unknown" |
115 |
- if use kernel_linux ; then |
116 |
- MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
117 |
- brand="Linux" |
118 |
- elif use kernel_FreeBSD ; then |
119 |
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
120 |
- brand="FreeBSD" |
121 |
- fi |
122 |
- export BRANDING="Gentoo ${brand}" |
123 |
- use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
124 |
- export DEBUG=$(usev debug) |
125 |
- export MKTERMCAP=$(usev ncurses) |
126 |
- |
127 |
- tc-export CC AR RANLIB |
128 |
- emake ${MAKE_ARGS} |
129 |
-} |
130 |
- |
131 |
-# set_config <file> <option name> <yes value> <no value> test |
132 |
-# a value of "#" will just comment out the option |
133 |
-set_config() { |
134 |
- local file="${ED}/$1" var=$2 val com |
135 |
- eval "${@:5}" && val=$3 || val=$4 |
136 |
- [[ ${val} == "#" ]] && com="#" && val='\2' |
137 |
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
138 |
-} |
139 |
- |
140 |
-set_config_yes_no() { |
141 |
- set_config "$1" "$2" YES NO "${@:3}" |
142 |
-} |
143 |
- |
144 |
-src_install() { |
145 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install |
146 |
- |
147 |
- # move the shared libs back to /usr so ldscript can install |
148 |
- # more of a minimal set of files |
149 |
- # disabled for now due to #270646 |
150 |
- #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
151 |
- #gen_usr_ldscript -a einfo rc |
152 |
- gen_usr_ldscript libeinfo.so |
153 |
- gen_usr_ldscript librc.so |
154 |
- |
155 |
- if ! use kernel_linux; then |
156 |
- keepdir /$(get_libdir)/rc/init.d |
157 |
- fi |
158 |
- keepdir /$(get_libdir)/rc/tmp |
159 |
- |
160 |
- # Backup our default runlevels |
161 |
- dodir /usr/share/"${PN}" |
162 |
- cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
163 |
- rm -rf "${ED}"/etc/runlevels |
164 |
- |
165 |
- # Setup unicode defaults for silly unicode users |
166 |
- set_config_yes_no /etc/rc.conf unicode use unicode |
167 |
- |
168 |
- # Cater to the norm |
169 |
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
170 |
- |
171 |
- # On HPPA, do not run consolefont by default (bug #222889) |
172 |
- if use hppa; then |
173 |
- rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
174 |
- fi |
175 |
- |
176 |
- # Support for logfile rotation |
177 |
- insinto /etc/logrotate.d |
178 |
- newins "${FILESDIR}"/openrc.logrotate openrc |
179 |
- |
180 |
- # install gentoo pam.d files |
181 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
182 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
183 |
- |
184 |
- # install documentation |
185 |
- dodoc ChangeLog *.md |
186 |
- if use newnet; then |
187 |
- dodoc README.newnet |
188 |
- fi |
189 |
-} |
190 |
- |
191 |
-add_boot_init() { |
192 |
- local initd=$1 |
193 |
- local runlevel=${2:-boot} |
194 |
- # if the initscript is not going to be installed and is not |
195 |
- # currently installed, return |
196 |
- [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
197 |
- || return |
198 |
- [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
199 |
- |
200 |
- # if runlevels dont exist just yet, then create it but still flag |
201 |
- # to pkg_postinst that it needs real setup #277323 |
202 |
- if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
203 |
- mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
204 |
- touch "${EROOT}"etc/runlevels/.add_boot_init.created |
205 |
- fi |
206 |
- |
207 |
- elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
208 |
- ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
209 |
-} |
210 |
-add_boot_init_mit_config() { |
211 |
- local config=$1 initd=$2 |
212 |
- if [[ -e ${EROOT}${config} ]] ; then |
213 |
- if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
214 |
- add_boot_init ${initd} |
215 |
- fi |
216 |
- fi |
217 |
-} |
218 |
- |
219 |
-pkg_preinst() { |
220 |
- local f LIBDIR=$(get_libdir) |
221 |
- |
222 |
- # avoid default thrashing in conf.d files when possible #295406 |
223 |
- if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
224 |
- ( |
225 |
- unset hostname HOSTNAME |
226 |
- source "${EROOT}"etc/conf.d/hostname |
227 |
- : ${hostname:=${HOSTNAME}} |
228 |
- [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
229 |
- ) |
230 |
- fi |
231 |
- |
232 |
- # set default interactive shell to sulogin if it exists |
233 |
- set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
234 |
- |
235 |
- # termencoding was added in 0.2.1 and needed in boot |
236 |
- has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
237 |
- |
238 |
- # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
239 |
- has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
240 |
- |
241 |
- if ! has_version ">=sys-apps/openrc-0.11"; then |
242 |
- add_boot_init sysfs sysinit |
243 |
- fi |
244 |
- |
245 |
- if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
246 |
- migrate_udev_mount_script |
247 |
- add_boot_init tmpfiles.setup boot |
248 |
- fi |
249 |
- |
250 |
- # these were added in 0.12. |
251 |
- if ! has_version ">=sys-apps/openrc-0.12"; then |
252 |
- add_boot_init loopback |
253 |
- add_boot_init tmpfiles.dev sysinit |
254 |
- |
255 |
- # ensure existing /etc/conf.d/net is not removed |
256 |
- # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
257 |
- # this needs to stay in openrc ebuilds for a long time. :( |
258 |
- # Added in 0.12. |
259 |
- if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
260 |
- einfo "Modifying conf.d/net to keep it from being removed" |
261 |
- cat <<-EOF >>"${EROOT}"etc/conf.d/net |
262 |
- |
263 |
-# The network scripts are now part of net-misc/netifrc |
264 |
-# In order to avoid sys-apps/${P} from removing this file, this comment was |
265 |
-# added; you can safely remove this comment. Please see |
266 |
-# /usr/share/doc/netifrc*/README* for more information. |
267 |
-EOF |
268 |
- fi |
269 |
- fi |
270 |
- has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
271 |
- |
272 |
- if ! has_version ">=sys-apps/openrc-0.18.3"; then |
273 |
- add_boot_init mtab |
274 |
- if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
275 |
- ewarn "${EROOT}etc/mtab will be replaced with a" |
276 |
- ewarn "symbolic link to /proc/self/mounts on the next" |
277 |
- ewarn "reboot." |
278 |
- ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
279 |
- ewarn "if you do not want this to happen." |
280 |
- fi |
281 |
- fi |
282 |
-} |
283 |
- |
284 |
-# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
285 |
-migrate_udev_mount_script() { |
286 |
- if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
287 |
- ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
288 |
- add_boot_init udev-mount sysinit |
289 |
- fi |
290 |
- return 0 |
291 |
-} |
292 |
- |
293 |
-pkg_postinst() { |
294 |
- local LIBDIR=$(get_libdir) |
295 |
- |
296 |
- # Make our runlevels if they don't exist |
297 |
- if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
298 |
- einfo "Copying across default runlevels" |
299 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
300 |
- rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
301 |
- else |
302 |
- if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
303 |
- mkdir -p "${EROOT}"etc/runlevels/sysinit |
304 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
305 |
- "${EROOT}"etc/runlevels/sysinit |
306 |
- fi |
307 |
- if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
308 |
- mkdir -p "${EROOT}"etc/runlevels/shutdown |
309 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
310 |
- "${EROOT}"etc/runlevels/shutdown |
311 |
- fi |
312 |
- if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
313 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
314 |
- "${EROOT}"etc/runlevels |
315 |
- fi |
316 |
- fi |
317 |
- |
318 |
- if use hppa; then |
319 |
- elog "Setting the console font does not work on all HPPA consoles." |
320 |
- elog "You can still enable it by running:" |
321 |
- elog "# rc-update add consolefont boot" |
322 |
- fi |
323 |
- |
324 |
- # Handle the conf.d/local.{start,stop} -> local.d transition |
325 |
- if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then |
326 |
- elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}" |
327 |
- elog "files to ${EROOT}etc/local.d" |
328 |
- mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start |
329 |
- mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop |
330 |
- chmod +x "${EROOT}"etc/local.d/*{start,stop} |
331 |
- fi |
332 |
- |
333 |
- if use kernel_linux && [[ "${EROOT}" = "/" ]]; then |
334 |
- if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then |
335 |
- ewarn "The dependency data could not be migrated to /run/openrc." |
336 |
- ewarn "This means you need to reboot your system." |
337 |
- fi |
338 |
- fi |
339 |
- |
340 |
- # update the dependency tree after touching all files #224171 |
341 |
- [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u |
342 |
- |
343 |
- if ! use newnet && ! use netifrc; then |
344 |
- ewarn "You have emerged OpenRc without network support. This" |
345 |
- ewarn "means you need to SET UP a network manager such as" |
346 |
- ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
347 |
- ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
348 |
- ewarn "Or, you have the option of emerging openrc with the newnet" |
349 |
- ewarn "use flag and configuring /etc/conf.d/network and" |
350 |
- ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
351 |
- ewarn |
352 |
- fi |
353 |
- |
354 |
- if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
355 |
- ewarn "Please add the network service to your boot runlevel" |
356 |
- ewarn "as soon as possible. Not doing so could leave you with a system" |
357 |
- ewarn "without networking." |
358 |
- ewarn |
359 |
- fi |
360 |
-} |
361 |
|
362 |
diff --git a/sys-apps/openrc/openrc-0.32.1.ebuild b/sys-apps/openrc/openrc-0.32.1.ebuild |
363 |
deleted file mode 100644 |
364 |
index 87ce1832378..00000000000 |
365 |
--- a/sys-apps/openrc/openrc-0.32.1.ebuild |
366 |
+++ /dev/null |
367 |
@@ -1,329 +0,0 @@ |
368 |
-# Copyright 1999-2018 Gentoo Foundation |
369 |
-# Distributed under the terms of the GNU General Public License v2 |
370 |
- |
371 |
-EAPI=6 |
372 |
- |
373 |
-inherit flag-o-matic pam toolchain-funcs |
374 |
- |
375 |
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
376 |
-HOMEPAGE="https://github.com/openrc/openrc/" |
377 |
- |
378 |
-if [[ ${PV} == "9999" ]]; then |
379 |
- EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
380 |
- inherit git-r3 |
381 |
-else |
382 |
- SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
383 |
- KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
384 |
-fi |
385 |
- |
386 |
-LICENSE="BSD-2" |
387 |
-SLOT="0" |
388 |
-IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
389 |
- unicode kernel_linux kernel_FreeBSD" |
390 |
- |
391 |
-COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
392 |
- ncurses? ( sys-libs/ncurses:0= ) |
393 |
- pam? ( |
394 |
- sys-auth/pambase |
395 |
- virtual/pam |
396 |
- ) |
397 |
- audit? ( sys-process/audit ) |
398 |
- kernel_linux? ( |
399 |
- sys-process/psmisc |
400 |
- !<sys-process/procps-3.3.9-r2 |
401 |
- ) |
402 |
- selinux? ( |
403 |
- sys-apps/policycoreutils |
404 |
- >=sys-libs/libselinux-2.6 |
405 |
- ) |
406 |
- !<sys-apps/baselayout-2.1-r1 |
407 |
- !<sys-fs/udev-init-scripts-27" |
408 |
-DEPEND="${COMMON_DEPEND} |
409 |
- virtual/os-headers |
410 |
- ncurses? ( virtual/pkgconfig )" |
411 |
-RDEPEND="${COMMON_DEPEND} |
412 |
- !prefix? ( |
413 |
- kernel_linux? ( |
414 |
- >=sys-apps/sysvinit-2.86-r6[selinux?] |
415 |
- virtual/tmpfiles |
416 |
- ) |
417 |
- kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
418 |
- ) |
419 |
- selinux? ( |
420 |
- >=sec-policy/selinux-base-policy-2.20170204-r4 |
421 |
- >=sec-policy/selinux-openrc-2.20170204-r4 |
422 |
- ) |
423 |
-" |
424 |
- |
425 |
-PDEPEND="netifrc? ( net-misc/netifrc )" |
426 |
- |
427 |
-src_prepare() { |
428 |
- default |
429 |
- |
430 |
- sed -i 's:0444:0644:' mk/sys.mk || die |
431 |
- |
432 |
- if [[ ${PV} == "9999" ]] ; then |
433 |
- local ver="git-${EGIT_VERSION:0:6}" |
434 |
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
435 |
- fi |
436 |
-} |
437 |
- |
438 |
-src_compile() { |
439 |
- unset LIBDIR #266688 |
440 |
- |
441 |
- MAKE_ARGS="${MAKE_ARGS} |
442 |
- LIBNAME=$(get_libdir) |
443 |
- LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc |
444 |
- MKNET=$(usex newnet) |
445 |
- MKSELINUX=$(usex selinux) |
446 |
- MKAUDIT=$(usex audit) |
447 |
- MKPAM=$(usev pam) |
448 |
- MKSTATICLIBS=$(usex static-libs)" |
449 |
- |
450 |
- local brand="Unknown" |
451 |
- if use kernel_linux ; then |
452 |
- MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
453 |
- brand="Linux" |
454 |
- elif use kernel_FreeBSD ; then |
455 |
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
456 |
- brand="FreeBSD" |
457 |
- fi |
458 |
- export BRANDING="Gentoo ${brand}" |
459 |
- use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
460 |
- export DEBUG=$(usev debug) |
461 |
- export MKTERMCAP=$(usev ncurses) |
462 |
- |
463 |
- tc-export CC AR RANLIB |
464 |
- emake ${MAKE_ARGS} |
465 |
-} |
466 |
- |
467 |
-# set_config <file> <option name> <yes value> <no value> test |
468 |
-# a value of "#" will just comment out the option |
469 |
-set_config() { |
470 |
- local file="${ED}/$1" var=$2 val com |
471 |
- eval "${@:5}" && val=$3 || val=$4 |
472 |
- [[ ${val} == "#" ]] && com="#" && val='\2' |
473 |
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
474 |
-} |
475 |
- |
476 |
-set_config_yes_no() { |
477 |
- set_config "$1" "$2" YES NO "${@:3}" |
478 |
-} |
479 |
- |
480 |
-src_install() { |
481 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install |
482 |
- |
483 |
- # move the shared libs back to /usr so ldscript can install |
484 |
- # more of a minimal set of files |
485 |
- # disabled for now due to #270646 |
486 |
- #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
487 |
- #gen_usr_ldscript -a einfo rc |
488 |
- gen_usr_ldscript libeinfo.so |
489 |
- gen_usr_ldscript librc.so |
490 |
- |
491 |
- if ! use kernel_linux; then |
492 |
- keepdir /$(get_libdir)/rc/init.d |
493 |
- fi |
494 |
- keepdir /$(get_libdir)/rc/tmp |
495 |
- |
496 |
- # Backup our default runlevels |
497 |
- dodir /usr/share/"${PN}" |
498 |
- cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
499 |
- rm -rf "${ED}"/etc/runlevels |
500 |
- |
501 |
- # Setup unicode defaults for silly unicode users |
502 |
- set_config_yes_no /etc/rc.conf unicode use unicode |
503 |
- |
504 |
- # Cater to the norm |
505 |
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
506 |
- |
507 |
- # On HPPA, do not run consolefont by default (bug #222889) |
508 |
- if use hppa; then |
509 |
- rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
510 |
- fi |
511 |
- |
512 |
- # Support for logfile rotation |
513 |
- insinto /etc/logrotate.d |
514 |
- newins "${FILESDIR}"/openrc.logrotate openrc |
515 |
- |
516 |
- # install gentoo pam.d files |
517 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
518 |
- newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
519 |
- |
520 |
- # install documentation |
521 |
- dodoc ChangeLog *.md |
522 |
- if use newnet; then |
523 |
- dodoc README.newnet |
524 |
- fi |
525 |
-} |
526 |
- |
527 |
-add_boot_init() { |
528 |
- local initd=$1 |
529 |
- local runlevel=${2:-boot} |
530 |
- # if the initscript is not going to be installed and is not |
531 |
- # currently installed, return |
532 |
- [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
533 |
- || return |
534 |
- [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
535 |
- |
536 |
- # if runlevels dont exist just yet, then create it but still flag |
537 |
- # to pkg_postinst that it needs real setup #277323 |
538 |
- if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
539 |
- mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
540 |
- touch "${EROOT}"etc/runlevels/.add_boot_init.created |
541 |
- fi |
542 |
- |
543 |
- elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
544 |
- ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
545 |
-} |
546 |
-add_boot_init_mit_config() { |
547 |
- local config=$1 initd=$2 |
548 |
- if [[ -e ${EROOT}${config} ]] ; then |
549 |
- if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
550 |
- add_boot_init ${initd} |
551 |
- fi |
552 |
- fi |
553 |
-} |
554 |
- |
555 |
-pkg_preinst() { |
556 |
- local f LIBDIR=$(get_libdir) |
557 |
- |
558 |
- # avoid default thrashing in conf.d files when possible #295406 |
559 |
- if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
560 |
- ( |
561 |
- unset hostname HOSTNAME |
562 |
- source "${EROOT}"etc/conf.d/hostname |
563 |
- : ${hostname:=${HOSTNAME}} |
564 |
- [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
565 |
- ) |
566 |
- fi |
567 |
- |
568 |
- # set default interactive shell to sulogin if it exists |
569 |
- set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
570 |
- |
571 |
- # termencoding was added in 0.2.1 and needed in boot |
572 |
- has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
573 |
- |
574 |
- # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
575 |
- has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
576 |
- |
577 |
- if ! has_version ">=sys-apps/openrc-0.11"; then |
578 |
- add_boot_init sysfs sysinit |
579 |
- fi |
580 |
- |
581 |
- if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
582 |
- migrate_udev_mount_script |
583 |
- add_boot_init tmpfiles.setup boot |
584 |
- fi |
585 |
- |
586 |
- # these were added in 0.12. |
587 |
- if ! has_version ">=sys-apps/openrc-0.12"; then |
588 |
- add_boot_init loopback |
589 |
- add_boot_init tmpfiles.dev sysinit |
590 |
- |
591 |
- # ensure existing /etc/conf.d/net is not removed |
592 |
- # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
593 |
- # this needs to stay in openrc ebuilds for a long time. :( |
594 |
- # Added in 0.12. |
595 |
- if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
596 |
- einfo "Modifying conf.d/net to keep it from being removed" |
597 |
- cat <<-EOF >>"${EROOT}"etc/conf.d/net |
598 |
- |
599 |
-# The network scripts are now part of net-misc/netifrc |
600 |
-# In order to avoid sys-apps/${P} from removing this file, this comment was |
601 |
-# added; you can safely remove this comment. Please see |
602 |
-# /usr/share/doc/netifrc*/README* for more information. |
603 |
-EOF |
604 |
- fi |
605 |
- fi |
606 |
- has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
607 |
- |
608 |
- if ! has_version ">=sys-apps/openrc-0.18.3"; then |
609 |
- add_boot_init mtab |
610 |
- if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
611 |
- ewarn "${EROOT}etc/mtab will be replaced with a" |
612 |
- ewarn "symbolic link to /proc/self/mounts on the next" |
613 |
- ewarn "reboot." |
614 |
- ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
615 |
- ewarn "if you do not want this to happen." |
616 |
- fi |
617 |
- fi |
618 |
-} |
619 |
- |
620 |
-# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
621 |
-migrate_udev_mount_script() { |
622 |
- if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
623 |
- ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
624 |
- add_boot_init udev-mount sysinit |
625 |
- fi |
626 |
- return 0 |
627 |
-} |
628 |
- |
629 |
-pkg_postinst() { |
630 |
- local LIBDIR=$(get_libdir) |
631 |
- |
632 |
- # Make our runlevels if they don't exist |
633 |
- if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
634 |
- einfo "Copying across default runlevels" |
635 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
636 |
- rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
637 |
- else |
638 |
- if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
639 |
- mkdir -p "${EROOT}"etc/runlevels/sysinit |
640 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
641 |
- "${EROOT}"etc/runlevels/sysinit |
642 |
- fi |
643 |
- if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
644 |
- mkdir -p "${EROOT}"etc/runlevels/shutdown |
645 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
646 |
- "${EROOT}"etc/runlevels/shutdown |
647 |
- fi |
648 |
- if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
649 |
- cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
650 |
- "${EROOT}"etc/runlevels |
651 |
- fi |
652 |
- fi |
653 |
- |
654 |
- if use hppa; then |
655 |
- elog "Setting the console font does not work on all HPPA consoles." |
656 |
- elog "You can still enable it by running:" |
657 |
- elog "# rc-update add consolefont boot" |
658 |
- fi |
659 |
- |
660 |
- # Handle the conf.d/local.{start,stop} -> local.d transition |
661 |
- if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then |
662 |
- elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}" |
663 |
- elog "files to ${EROOT}etc/local.d" |
664 |
- mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start |
665 |
- mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop |
666 |
- chmod +x "${EROOT}"etc/local.d/*{start,stop} |
667 |
- fi |
668 |
- |
669 |
- if use kernel_linux && [[ "${EROOT}" = "/" ]]; then |
670 |
- if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then |
671 |
- ewarn "The dependency data could not be migrated to /run/openrc." |
672 |
- ewarn "This means you need to reboot your system." |
673 |
- fi |
674 |
- fi |
675 |
- |
676 |
- # update the dependency tree after touching all files #224171 |
677 |
- [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u |
678 |
- |
679 |
- if ! use newnet && ! use netifrc; then |
680 |
- ewarn "You have emerged OpenRc without network support. This" |
681 |
- ewarn "means you need to SET UP a network manager such as" |
682 |
- ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
683 |
- ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
684 |
- ewarn "Or, you have the option of emerging openrc with the newnet" |
685 |
- ewarn "use flag and configuring /etc/conf.d/network and" |
686 |
- ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
687 |
- ewarn |
688 |
- fi |
689 |
- |
690 |
- if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
691 |
- ewarn "Please add the network service to your boot runlevel" |
692 |
- ewarn "as soon as possible. Not doing so could leave you with a system" |
693 |
- ewarn "without networking." |
694 |
- ewarn |
695 |
- fi |
696 |
-} |