1 |
commit: 0cb17e0011974d606cde723ce6627b2aab235bb7 |
2 |
Author: William Hubbs <william.hubbs <AT> sony <DOT> com> |
3 |
AuthorDate: Wed Dec 12 22:08:12 2018 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 12 22:18:54 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cb17e00 |
7 |
|
8 |
sys-apps/openrc: 0.38.3-r1 bump |
9 |
|
10 |
This is a quick bump so we fix stages. |
11 |
|
12 |
This will have a better fix in the next stable candidate. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/672924 |
15 |
Copyright: Sony Interactive Entertainment Inc. |
16 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
17 |
RepoMan-Options: --force |
18 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
19 |
|
20 |
sys-apps/openrc/openrc-0.38.3-r1.ebuild | 326 ++++++++++++++++++++++++++++++++ |
21 |
1 file changed, 326 insertions(+) |
22 |
|
23 |
diff --git a/sys-apps/openrc/openrc-0.38.3-r1.ebuild b/sys-apps/openrc/openrc-0.38.3-r1.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..0b72e11f38c |
26 |
--- /dev/null |
27 |
+++ b/sys-apps/openrc/openrc-0.38.3-r1.ebuild |
28 |
@@ -0,0 +1,326 @@ |
29 |
+# Copyright 1999-2018 Gentoo Authors |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=6 |
33 |
+ |
34 |
+inherit flag-o-matic pam toolchain-funcs |
35 |
+ |
36 |
+DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
37 |
+HOMEPAGE="https://github.com/openrc/openrc/" |
38 |
+ |
39 |
+if [[ ${PV} == "9999" ]]; then |
40 |
+ EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" |
41 |
+ inherit git-r3 |
42 |
+else |
43 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
44 |
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd" |
45 |
+fi |
46 |
+ |
47 |
+LICENSE="BSD-2" |
48 |
+SLOT="0" |
49 |
+IUSE="audit debug ncurses pam newnet prefix +netifrc selinux static-libs |
50 |
+ unicode kernel_linux kernel_FreeBSD" |
51 |
+ |
52 |
+COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
53 |
+ ncurses? ( sys-libs/ncurses:0= ) |
54 |
+ pam? ( |
55 |
+ sys-auth/pambase |
56 |
+ virtual/pam |
57 |
+ ) |
58 |
+ audit? ( sys-process/audit ) |
59 |
+ kernel_linux? ( |
60 |
+ sys-process/psmisc |
61 |
+ !<sys-process/procps-3.3.9-r2 |
62 |
+ ) |
63 |
+ selinux? ( |
64 |
+ sys-apps/policycoreutils |
65 |
+ >=sys-libs/libselinux-2.6 |
66 |
+ ) |
67 |
+ !<sys-apps/baselayout-2.1-r1 |
68 |
+ !<sys-fs/udev-init-scripts-27" |
69 |
+DEPEND="${COMMON_DEPEND} |
70 |
+ virtual/os-headers |
71 |
+ ncurses? ( virtual/pkgconfig )" |
72 |
+RDEPEND="${COMMON_DEPEND} |
73 |
+ !prefix? ( |
74 |
+ kernel_linux? ( |
75 |
+ >=sys-apps/sysvinit-2.86-r6[selinux?] |
76 |
+ virtual/tmpfiles |
77 |
+ ) |
78 |
+ kernel_FreeBSD? ( sys-freebsd/freebsd-sbin ) |
79 |
+ ) |
80 |
+ selinux? ( |
81 |
+ >=sec-policy/selinux-base-policy-2.20170204-r4 |
82 |
+ >=sec-policy/selinux-openrc-2.20170204-r4 |
83 |
+ ) |
84 |
+ !<app-shells/gentoo-bashcomp-20180302 |
85 |
+ !<app-shells/gentoo-zsh-completions-20180228 |
86 |
+" |
87 |
+ |
88 |
+PDEPEND="netifrc? ( net-misc/netifrc )" |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ if [[ ${PV} == "9999" ]] ; then |
93 |
+ local ver="git-${EGIT_VERSION:0:6}" |
94 |
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+src_compile() { |
99 |
+ unset LIBDIR #266688 |
100 |
+ |
101 |
+ MAKE_ARGS="${MAKE_ARGS} |
102 |
+ LIBNAME=$(get_libdir) |
103 |
+ LIBEXECDIR=${EPREFIX}/lib/rc |
104 |
+ MKBASHCOMP=yes |
105 |
+ MKNET=$(usex newnet) |
106 |
+ MKSELINUX=$(usex selinux) |
107 |
+ MKAUDIT=$(usex audit) |
108 |
+ MKPAM=$(usev pam) |
109 |
+ MKSTATICLIBS=$(usex static-libs) |
110 |
+ MKZSHCOMP=yes" |
111 |
+ |
112 |
+ local brand="Unknown" |
113 |
+ if use kernel_linux ; then |
114 |
+ MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
115 |
+ brand="Linux" |
116 |
+ elif use kernel_FreeBSD ; then |
117 |
+ MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
118 |
+ brand="FreeBSD" |
119 |
+ fi |
120 |
+ export BRANDING="Gentoo ${brand}" |
121 |
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
122 |
+ export DEBUG=$(usev debug) |
123 |
+ export MKTERMCAP=$(usev ncurses) |
124 |
+ |
125 |
+ tc-export CC AR RANLIB |
126 |
+ emake ${MAKE_ARGS} |
127 |
+} |
128 |
+ |
129 |
+# set_config <file> <option name> <yes value> <no value> test |
130 |
+# a value of "#" will just comment out the option |
131 |
+set_config() { |
132 |
+ local file="${ED}/$1" var=$2 val com |
133 |
+ eval "${@:5}" && val=$3 || val=$4 |
134 |
+ [[ ${val} == "#" ]] && com="#" && val='\2' |
135 |
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
136 |
+} |
137 |
+ |
138 |
+set_config_yes_no() { |
139 |
+ set_config "$1" "$2" YES NO "${@:3}" |
140 |
+} |
141 |
+ |
142 |
+src_install() { |
143 |
+ emake ${MAKE_ARGS} DESTDIR="${D}" install |
144 |
+ |
145 |
+ # move the shared libs back to /usr so ldscript can install |
146 |
+ # more of a minimal set of files |
147 |
+ # disabled for now due to #270646 |
148 |
+ #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
149 |
+ #gen_usr_ldscript -a einfo rc |
150 |
+ gen_usr_ldscript libeinfo.so |
151 |
+ gen_usr_ldscript librc.so |
152 |
+ |
153 |
+ if ! use kernel_linux; then |
154 |
+ keepdir /lib/rc/init.d |
155 |
+ fi |
156 |
+ keepdir /lib/rc/tmp |
157 |
+ |
158 |
+ # Backup our default runlevels |
159 |
+ dodir /usr/share/"${PN}" |
160 |
+ cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
161 |
+ rm -rf "${ED}"/etc/runlevels |
162 |
+ |
163 |
+ # Setup unicode defaults for silly unicode users |
164 |
+ set_config_yes_no /etc/rc.conf unicode use unicode |
165 |
+ |
166 |
+ # Cater to the norm |
167 |
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
168 |
+ |
169 |
+ # On HPPA, do not run consolefont by default (bug #222889) |
170 |
+ if use hppa; then |
171 |
+ rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
172 |
+ fi |
173 |
+ |
174 |
+ # Support for logfile rotation |
175 |
+ insinto /etc/logrotate.d |
176 |
+ newins "${FILESDIR}"/openrc.logrotate openrc |
177 |
+ |
178 |
+ # install gentoo pam.d files |
179 |
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
180 |
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
181 |
+ |
182 |
+ # install documentation |
183 |
+ dodoc ChangeLog *.md |
184 |
+ if use newnet; then |
185 |
+ dodoc README.newnet |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+add_boot_init() { |
190 |
+ local initd=$1 |
191 |
+ local runlevel=${2:-boot} |
192 |
+ # if the initscript is not going to be installed and is not |
193 |
+ # currently installed, return |
194 |
+ [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
195 |
+ || return |
196 |
+ [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
197 |
+ |
198 |
+ # if runlevels dont exist just yet, then create it but still flag |
199 |
+ # to pkg_postinst that it needs real setup #277323 |
200 |
+ if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
201 |
+ mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
202 |
+ touch "${EROOT}"etc/runlevels/.add_boot_init.created |
203 |
+ fi |
204 |
+ |
205 |
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
206 |
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
207 |
+} |
208 |
+add_boot_init_mit_config() { |
209 |
+ local config=$1 initd=$2 |
210 |
+ if [[ -e ${EROOT}${config} ]] ; then |
211 |
+ if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
212 |
+ add_boot_init ${initd} |
213 |
+ fi |
214 |
+ fi |
215 |
+} |
216 |
+ |
217 |
+pkg_preinst() { |
218 |
+ local f LIBDIR=$(get_libdir) |
219 |
+ |
220 |
+ # avoid default thrashing in conf.d files when possible #295406 |
221 |
+ if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
222 |
+ ( |
223 |
+ unset hostname HOSTNAME |
224 |
+ source "${EROOT}"etc/conf.d/hostname |
225 |
+ : ${hostname:=${HOSTNAME}} |
226 |
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
227 |
+ ) |
228 |
+ fi |
229 |
+ |
230 |
+ # set default interactive shell to sulogin if it exists |
231 |
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
232 |
+ |
233 |
+ # termencoding was added in 0.2.1 and needed in boot |
234 |
+ has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
235 |
+ |
236 |
+ # swapfiles was added in 0.9.9 and needed in boot (february 2012) |
237 |
+ has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
238 |
+ |
239 |
+ if ! has_version ">=sys-apps/openrc-0.11"; then |
240 |
+ add_boot_init sysfs sysinit |
241 |
+ fi |
242 |
+ |
243 |
+ if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
244 |
+ migrate_udev_mount_script |
245 |
+ fi |
246 |
+ |
247 |
+ # these were added in 0.12. |
248 |
+ if ! has_version ">=sys-apps/openrc-0.12"; then |
249 |
+ add_boot_init loopback |
250 |
+ |
251 |
+ # ensure existing /etc/conf.d/net is not removed |
252 |
+ # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier |
253 |
+ # this needs to stay in openrc ebuilds for a long time. :( |
254 |
+ # Added in 0.12. |
255 |
+ if [[ -f "${EROOT}"etc/conf.d/net ]]; then |
256 |
+ einfo "Modifying conf.d/net to keep it from being removed" |
257 |
+ cat <<-EOF >>"${EROOT}"etc/conf.d/net |
258 |
+ |
259 |
+# The network scripts are now part of net-misc/netifrc |
260 |
+# In order to avoid sys-apps/${P} from removing this file, this comment was |
261 |
+# added; you can safely remove this comment. Please see |
262 |
+# /usr/share/doc/netifrc*/README* for more information. |
263 |
+EOF |
264 |
+ fi |
265 |
+ fi |
266 |
+ has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt |
267 |
+ |
268 |
+ if ! has_version ">=sys-apps/openrc-0.18.3"; then |
269 |
+ add_boot_init mtab |
270 |
+ if [[ -f "${EROOT}"etc/mtab ]] && [[ ! -L "${EROOT}"etc/mtab ]]; then |
271 |
+ ewarn "${EROOT}etc/mtab will be replaced with a" |
272 |
+ ewarn "symbolic link to /proc/self/mounts on the next" |
273 |
+ ewarn "reboot." |
274 |
+ ewarn "Change the setting in ${EROOT}etc/conf.d/mtab" |
275 |
+ ewarn "if you do not want this to happen." |
276 |
+ fi |
277 |
+ fi |
278 |
+ |
279 |
+ has_version ">=sys-apps/openrc-0.35" || add_boot_init cgroups sysinit |
280 |
+ |
281 |
+} |
282 |
+ |
283 |
+# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
284 |
+migrate_udev_mount_script() { |
285 |
+ if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
286 |
+ ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
287 |
+ add_boot_init udev-mount sysinit |
288 |
+ fi |
289 |
+ return 0 |
290 |
+} |
291 |
+ |
292 |
+pkg_postinst() { |
293 |
+ local LIBDIR=$(get_libdir) |
294 |
+ |
295 |
+ # Make our runlevels if they don't exist |
296 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
297 |
+ einfo "Copying across default runlevels" |
298 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
299 |
+ rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
300 |
+ else |
301 |
+ if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
302 |
+ mkdir -p "${EROOT}"etc/runlevels/sysinit |
303 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
304 |
+ "${EROOT}"etc/runlevels/sysinit |
305 |
+ fi |
306 |
+ if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
307 |
+ mkdir -p "${EROOT}"etc/runlevels/shutdown |
308 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
309 |
+ "${EROOT}"etc/runlevels/shutdown |
310 |
+ fi |
311 |
+ if [[ ! -e "${EROOT}"etc/runlevels/nonetwork/local ]]; then |
312 |
+ cp -RPp "${EROOT}"usr/share/${PN}/runlevels/nonetwork \ |
313 |
+ "${EROOT}"etc/runlevels |
314 |
+ fi |
315 |
+ fi |
316 |
+ |
317 |
+ if use hppa; then |
318 |
+ elog "Setting the console font does not work on all HPPA consoles." |
319 |
+ elog "You can still enable it by running:" |
320 |
+ elog "# rc-update add consolefont boot" |
321 |
+ fi |
322 |
+ |
323 |
+ # Added for 0.35. |
324 |
+ if use kernel_linux && [[ ! -h "${EROOT}"/lib ]]; then |
325 |
+ if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
326 |
+ cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
327 |
+ fi |
328 |
+ elif ! use kernel_linux; then |
329 |
+ if [[ -d "${EROOT}$(get_libdir)"/rc ]]; then |
330 |
+ cp -RPp "${EROOT}$(get_libdir)/rc" "${EROOT}"lib |
331 |
+ fi |
332 |
+ fi |
333 |
+ |
334 |
+ # update the dependency tree after touching all files #224171 |
335 |
+ [[ "${EROOT}" = "/" ]] && "${EROOT}"/lib/rc/bin/rc-depend -u |
336 |
+ |
337 |
+ if ! use newnet && ! use netifrc; then |
338 |
+ ewarn "You have emerged OpenRc without network support. This" |
339 |
+ ewarn "means you need to SET UP a network manager such as" |
340 |
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd," |
341 |
+ ewarn "net-misc/NetworkManager, or net-vpn/badvpn." |
342 |
+ ewarn "Or, you have the option of emerging openrc with the newnet" |
343 |
+ ewarn "use flag and configuring /etc/conf.d/network and" |
344 |
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
345 |
+ ewarn |
346 |
+ fi |
347 |
+ |
348 |
+ if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then |
349 |
+ ewarn "Please add the network service to your boot runlevel" |
350 |
+ ewarn "as soon as possible. Not doing so could leave you with a system" |
351 |
+ ewarn "without networking." |
352 |
+ ewarn |
353 |
+ fi |
354 |
+} |