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, 30 May 2017 18:22:19
Message-Id: 1496168523.075c1abb5d1c4b458f9cd6713ffc6848fdaaa758.williamh@gentoo
1 commit: 075c1abb5d1c4b458f9cd6713ffc6848fdaaa758
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 30 18:21:32 2017 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue May 30 18:22:03 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075c1abb
7
8 sys-apps/openrc: 0.26.3 version bump
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.1
11 RepoMan-Options: --force
12
13 sys-apps/openrc/Manifest | 1 +
14 sys-apps/openrc/openrc-0.26.3.ebuild | 329 +++++++++++++++++++++++++++++++++++
15 2 files changed, 330 insertions(+)
16
17 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
18 index 7ded95a30b2..49c7ac59e87 100644
19 --- a/sys-apps/openrc/Manifest
20 +++ b/sys-apps/openrc/Manifest
21 @@ -4,3 +4,4 @@ DIST openrc-0.23.2.tar.gz 209569 SHA256 244a9902a98694a7fd59ad3dec49bd9e61a6b228
22 DIST openrc-0.24.2.tar.gz 212605 SHA256 3d6486beb0a1b5fc696bce71b6a2d07590516699cfa3481f4852d759f7a9f8a4 SHA512 4f8557b16407148e1819986ed81976dbb0ccf24349317e3895665cfd37b9db2b549ce53774766fb5752e347b44cdabd45acdc252f5efbe272acc183be1e5476b WHIRLPOOL 17ba761f77553344fd8de919b52c61970d579b61711b275fc7161adbe31cf5e622e4abf1caf72257e9932e69474bebb02ea0fbca4f415f002cb32a7e3cf08dd6
23 DIST openrc-0.25.tar.gz 216430 SHA256 e8ac607052a5c494b595b9641c66ad3ce5a1e867677066aacc33a5259868a121 SHA512 ab26df45b5856a62959796f4c9903650bb5fc87317a9d598585a6dd7b2087d96d6d2a800b6f1373e20514a6da05f873ebf0a79d325292c2ea61034fd1bbdb378 WHIRLPOOL c6e7f44e68bea8117b7aff45a3f1bcc75589f0df57388ea0cd8fef644102edae73bbee4d2e2248e9ff80aebbdaf86e55f25c506bdca4ac1f9c45da3594e421ce
24 DIST openrc-0.26.2.tar.gz 218990 SHA256 428512ef82002c913d44394adae8a2bb9a1c935d10fb947b76104c9c17847c6a SHA512 ed47a70fa91556a133af9cce5cd37c18048c40a1090ffd98fe0f6b607025bcf47a20b6f3fc5123e0564c470491c7aa84922d3e852af89210f853cbd415a68ed1 WHIRLPOOL a0200857e7db3c9ff46d08a4bd75d4787c0ede88afb6cc1b8594393f99a15659acfb0a9682234583a450cdee93e1b01009d24bbd28dc90d9cf6203710380d3f1
25 +DIST openrc-0.26.3.tar.gz 218708 SHA256 f54b353addd3efe1b3c31098c792b9c0052b893d7e1a353619cf11e189b5f8e7 SHA512 5dead32c2141c959bca637bc1621eb7fe6fe60a4e8aa92b447052b5efb92c25ef33a382b8432cb482e820c921a879f3bf3268459d59baca9fd310a228886415d WHIRLPOOL 4d79bb49f5223594bebef9961e304b535e6f5e32693e0c0394574e353cc81a917619cb37e66bd7f87f8f92523cdfab21461fb640def85fb1cd85129ea2ba07aa
26
27 diff --git a/sys-apps/openrc/openrc-0.26.3.ebuild b/sys-apps/openrc/openrc-0.26.3.ebuild
28 new file mode 100644
29 index 00000000000..cf6f38d149a
30 --- /dev/null
31 +++ b/sys-apps/openrc/openrc-0.26.3.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="git://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
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
86 + sec-policy/selinux-openrc
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 +}