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