1 |
commit: 6c53f81b8432bbff31051106c47aa97affebe355 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 23:36:22 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=6c53f81b |
7 |
|
8 |
sys-apps/openrc: 0.35 version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/openrc/Manifest | 1 + |
13 |
sys-apps/openrc/openrc-0.35.ebuild | 329 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 330 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest |
17 |
index 2029c82e6dd..ebb9b89d5dd 100644 |
18 |
--- a/sys-apps/openrc/Manifest |
19 |
+++ b/sys-apps/openrc/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST openrc-0.34.11.tar.gz 228054 BLAKE2B 8d4fdd7de4b3c44df0ccec728b91bd2624582dc2bbdb1fa7892aa61ce0a953a7cf66964f38da888636d895e3c6b776747a4a7fbbdbbbd26029313695f35837fe SHA512 76245d31c6fe9e90e5e2f35ce918b915fc88c231674e0c99dc98b8f3fa120e794900eec9919a0ab029a081b206393246eccb9119a79c90ad6e39325d022928be |
22 |
+DIST openrc-0.35.tar.gz 241364 BLAKE2B b7655f3e7ba21d4af96c7f72e02cc44c557cb6465fcb0d7912a08fdde5af603dcc3551694b89641d58c749453f032ef4224d18fd36bc1b5e27dd97e8cd9bd664 SHA512 a95f11eb8c7b154044fa720f803dc158bcd993a3ce28cd465fab44d9f40555e45a160ea2e923a89161ab43673a95920970ea00cdc34c652efd68ec22a2577cbc |
23 |
|
24 |
diff --git a/sys-apps/openrc/openrc-0.35.ebuild b/sys-apps/openrc/openrc-0.35.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..e261b2d39bd |
27 |
--- /dev/null |
28 |
+++ b/sys-apps/openrc/openrc-0.35.ebuild |
29 |
@@ -0,0 +1,329 @@ |
30 |
+# Copyright 1999-2018 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+inherit flag-o-matic pam toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
38 |
+HOMEPAGE="https://github.com/openrc/openrc/" |
39 |
+ |
40 |
+if [[ ${PV} == "9999" ]]; then |
41 |
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
42 |
+ inherit git-r3 |
43 |
+else |
44 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
46 |
+fi |
47 |
+ |
48 |
+LICENSE="BSD-2" |
49 |
+SLOT="0" |
50 |
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
51 |
+ unicode kernel_linux kernel_FreeBSD" |
52 |
+ |
53 |
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
54 |
+ ncurses? ( sys-libs/ncurses:0= ) |
55 |
+ pam? ( |
56 |
+ sys-auth/pambase |
57 |
+ virtual/pam |
58 |
+ ) |
59 |
+ audit? ( sys-process/audit ) |
60 |
+ kernel_linux? ( |
61 |
+ sys-process/psmisc |
62 |
+ !<sys-process/procps-3.3.9-r2 |
63 |
+ ) |
64 |
+ selinux? ( |
65 |
+ sys-apps/policycoreutils |
66 |
+ >=sys-libs/libselinux-2.6 |
67 |
+ ) |
68 |
+ !<sys-apps/baselayout-2.1-r1 |
69 |
+ !<sys-fs/udev-init-scripts-27" |
70 |
+DEPEND="${COMMON_DEPEND} |
71 |
+ virtual/os-headers |
72 |
+ ncurses? ( virtual/pkgconfig )" |
73 |
+RDEPEND="${COMMON_DEPEND} |
74 |
+ !prefix? ( |
75 |
+ kernel_linux? ( |
76 |
+ >=sys-apps/sysvinit-2.86-r6[selinux?] |
77 |
+ virtual/tmpfiles |
78 |
+ ) |
79 |
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
80 |
+ ) |
81 |
+ selinux? ( |
82 |
+ >=sec-policy/selinux-base-policy-2.20170204-r4 |
83 |
+ >=sec-policy/selinux-openrc-2.20170204-r4 |
84 |
+ ) |
85 |
+" |
86 |
+ |
87 |
+PDEPEND="netifrc? ( net-misc/netifrc )" |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ default |
91 |
+ |
92 |
+ sed -i 's:0444:0644:' mk/sys.mk || die |
93 |
+ |
94 |
+ if [[ ${PV} == "9999" ]] ; then |
95 |
+ local ver="git-${EGIT_VERSION:0:6}" |
96 |
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
97 |
+ fi |
98 |
+} |
99 |
+ |
100 |
+src_compile() { |
101 |
+ unset LIBDIR #266688 |
102 |
+ |
103 |
+ MAKE_ARGS="${MAKE_ARGS} |
104 |
+ LIBNAME=$(get_libdir) |
105 |
+ LIBEXECDIR=${EPREFIX}/lib/rc |
106 |
+ MKBASHCOMP=yes |
107 |
+ MKNET=$(usex newnet) |
108 |
+ MKSELINUX=$(usex selinux) |
109 |
+ MKAUDIT=$(usex audit) |
110 |
+ MKPAM=$(usev pam) |
111 |
+ MKSTATICLIBS=$(usex static-libs) |
112 |
+ MKZSHCOMP=yes" |
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 /lib/rc/init.d |
157 |
+ fi |
158 |
+ keepdir /lib/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 |
+ has_version ">=sys-apps/openrc-0.35" || add_boot_init cgroups sysinit |
284 |
+ |
285 |
+} |
286 |
+ |
287 |
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
288 |
+migrate_udev_mount_script() { |
289 |
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
290 |
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
291 |
+ add_boot_init udev-mount sysinit |
292 |
+ fi |
293 |
+ return 0 |
294 |
+} |
295 |
+ |
296 |
+pkg_postinst() { |
297 |
+ local LIBDIR=$(get_libdir) |
298 |
+ |
299 |
+ # Make our runlevels if they don't exist |
300 |
+ if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
301 |
+ einfo "Copying across default runlevels" |
302 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
303 |
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
304 |
+ else |
305 |
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
306 |
+ mkdir -p "${EROOT}"etc/runlevels/sysinit |
307 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
308 |
+ "${EROOT}"etc/runlevels/sysinit |
309 |
+ fi |
310 |
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
311 |
+ mkdir -p "${EROOT}"etc/runlevels/shutdown |
312 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
313 |
+ "${EROOT}"etc/runlevels/shutdown |
314 |
+ fi |
315 |
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
316 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
317 |
+ "${EROOT}"etc/runlevels |
318 |
+ fi |
319 |
+ fi |
320 |
+ |
321 |
+ if use hppa; then |
322 |
+ elog "Setting the console font does not work on all HPPA consoles." |
323 |
+ elog "You can still enable it by running:" |
324 |
+ elog "# rc-update add consolefont boot" |
325 |
+ fi |
326 |
+ |
327 |
+ # Added for 0.35. |
328 |
+ if use kernel_linux && [[ ! -h "${EROOT}"/lib ]]; then |
329 |
+ if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
330 |
+ cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
331 |
+ fi |
332 |
+ elif ! use kernel_linux; then |
333 |
+ if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
334 |
+ cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
335 |
+ fi |
336 |
+ fi |
337 |
+ |
338 |
+ # update the dependency tree after touching all files #224171 |
339 |
+ [[ "${EROOT}" = "/" ]] && "${EROOT}"/lib/rc/bin/rc-depend -u |
340 |
+ |
341 |
+ if ! use newnet && ! use netifrc; then |
342 |
+ ewarn "You have emerged OpenRc without network support. This" |
343 |
+ ewarn "means you need to SET UP a network manager such as" |
344 |
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
345 |
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
346 |
+ ewarn "Or, you have the option of emerging openrc with the newnet" |
347 |
+ ewarn "use flag and configuring /etc/conf.d/network and" |
348 |
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
349 |
+ ewarn |
350 |
+ fi |
351 |
+ |
352 |
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
353 |
+ ewarn "Please add the network service to your boot runlevel" |
354 |
+ ewarn "as soon as possible. Not doing so could leave you with a system" |
355 |
+ ewarn "without networking." |
356 |
+ ewarn |
357 |
+ fi |
358 |
+} |