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: Thu, 03 Nov 2016 22:06:07
Message-Id: 1478210741.4bdf8fcb3bc46d44e700e0f968a09f23e1feea0e.williamh@gentoo
1 commit: 4bdf8fcb3bc46d44e700e0f968a09f23e1feea0e
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 3 22:02:33 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 22:05:41 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bdf8fcb
7
8 sys-apps/openrc: 0.22.3 version bump
9
10 Package-Manager: portage-2.3.0
11
12 sys-apps/openrc/Manifest | 1 +
13 sys-apps/openrc/openrc-0.22.3.ebuild | 330 +++++++++++++++++++++++++++++++++++
14 2 files changed, 331 insertions(+)
15
16 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
17 index 8b1ea01..1ca3e9a 100644
18 --- a/sys-apps/openrc/Manifest
19 +++ b/sys-apps/openrc/Manifest
20 @@ -4,3 +4,4 @@ DIST openrc-0.19.1.tar.bz2 159598 SHA256 5628c04b12e2f51f25e59c303bdccbf545ba0db
21 DIST openrc-0.21.7.tar.bz2 168104 SHA256 0d4bb11cfac9950687dfbc1a72a90e337af25bb39edc032cb0b807cfe0d04c3d SHA512 26edf47e0eae0b62b651484bcbe73a5ccda2032ecbcc303f280bbf671fd1a8a1394d206228bd12e5157e8214210eb124898d11acc78cdef0d9145a952754f6bc WHIRLPOOL 5731326b0879759f58b3e251e3b1c4cc6dcc17bee3ebf1d8ef4b689dff5ec39d429cde9c3d4f2901c8a592aaad7253bfca69a0caaa2ae77b6f45f9afe6e66df4
22 DIST openrc-0.22.1.tar.gz 215672 SHA256 1e06c878fc2a6022795524a88fc97c9079158d4947b2fca048d17abbb7ec8920 SHA512 3dd74ab58003b7712ace90094def3dd1fe9239144925fd019df308550da9decf07b66e36cc5bb1ebf41218333525777a17ee36d164a5155ba6d499856c559883 WHIRLPOOL a13322b43d822214c9794c0d6e18c07795d8a839f495074b9b774a6bd0011f33628e83b3567b4c6529a11735a4603d82ce5af09d422b5a08e00f29e84ae52997
23 DIST openrc-0.22.2.tar.gz 215328 SHA256 d6485cab4d01d7204b8878e78889a39a2ad9fd3b13ee77162b0f1738daeae59e SHA512 21962627612408e58cea0345ad445f9b8974e56a98784b51674cebc12e19310a766bfd11a84285f11616b5f25922dcbced4f19048dcf2ab715cffa1407ab403f WHIRLPOOL 14e11b00bdf8a32ce1bba93d32d14ed19ff291eab581ef9ee0a4257622a37a1848eb024d135ea2b22fd6b51a7bc120835850be431700a280cf421b520cb6c8f1
24 +DIST openrc-0.22.3.tar.gz 214760 SHA256 cd0e1c42b863edb36f02f8e5425cdd6126ca3ac13a5c41b66ce1d95dcf36554d SHA512 1eadb02c4c5cb3c6d210cfd1f3a10ba60c08041ba32b199fe9f8aa5edb7363a5b066ddce2a2dec9cd39e070c499d0a9ae0ac9eb1e0ecda854d5095b1b791f94d WHIRLPOOL c892a65693645e0a64b0d32930ac6d18ed5899086802337cb25a4833ad2027113daa8d6950906d78a51b583cc154eafe2249912dfbc6c76d7ad1ab54d7ec9047
25
26 diff --git a/sys-apps/openrc/openrc-0.22.3.ebuild b/sys-apps/openrc/openrc-0.22.3.ebuild
27 new file mode 100644
28 index 00000000..ea6aaf6
29 --- /dev/null
30 +++ b/sys-apps/openrc/openrc-0.22.3.ebuild
31 @@ -0,0 +1,330 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
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 + tools 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 + tools? ( dev-lang/perl )
63 + audit? ( sys-process/audit )
64 + kernel_linux? (
65 + sys-process/psmisc
66 + !<sys-process/procps-3.3.9-r2
67 + )
68 + selinux? (
69 + sys-apps/policycoreutils
70 + sys-libs/libselinux
71 + )
72 + !<sys-apps/baselayout-2.1-r1
73 + !<sys-fs/udev-init-scripts-27"
74 +DEPEND="${COMMON_DEPEND}
75 + virtual/os-headers
76 + ncurses? ( virtual/pkgconfig )"
77 +RDEPEND="${COMMON_DEPEND}
78 + !prefix? (
79 + kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
80 + kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
81 + )
82 + selinux? (
83 + sec-policy/selinux-base-policy
84 + sec-policy/selinux-openrc
85 + )
86 +"
87 +
88 +PDEPEND="netifrc? ( net-misc/netifrc )"
89 +
90 +src_prepare() {
91 + sed -i 's:0444:0644:' mk/sys.mk || die
92 +
93 + if [[ ${PV} == "9999" ]] ; then
94 + local ver="git-${EGIT_VERSION:0:6}"
95 + sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/gitver.mk || die
96 + fi
97 +
98 + # Allow user patches to be applied without modifying the ebuild
99 + eapply_user
100 +}
101 +
102 +src_compile() {
103 + unset LIBDIR #266688
104 +
105 + MAKE_ARGS="${MAKE_ARGS}
106 + LIBNAME=$(get_libdir)
107 + LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
108 + MKNET=$(usex newnet)
109 + MKSELINUX=$(usex selinux)
110 + MKAUDIT=$(usex audit)
111 + MKPAM=$(usev pam)
112 + MKSTATICLIBS=$(usex static-libs)
113 + MKTOOLS=$(usex tools)"
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-misc/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 +}