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