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, 13 Oct 2015 15:52:00
Message-Id: 1444751263.efb70fce668d4a1f71bf76221702149ddb7c458a.williamh@gentoo
1 commit: efb70fce668d4a1f71bf76221702149ddb7c458a
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 13 15:47:43 2015 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 13 15:47:43 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efb70fce
7
8 sys-apps/openrc: version bump to 0.18.1
9
10 sys-apps/openrc/Manifest | 1 +
11 sys-apps/openrc/openrc-0.18.1.ebuild | 337 +++++++++++++++++++++++++++++++++++
12 2 files changed, 338 insertions(+)
13
14 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
15 index bbc19ff..d62715b 100644
16 --- a/sys-apps/openrc/Manifest
17 +++ b/sys-apps/openrc/Manifest
18 @@ -8,4 +8,5 @@ DIST openrc-0.16.3.tar.bz2 158844 SHA256 6f2d5293f82591183391362fdbcb6b24b6a07c7
19 DIST openrc-0.16.4.tar.bz2 158599 SHA256 6771257e208da2e4d20b4ac2e3e7f065eb8873566644ff385e9dbd6bc5221d21 SHA512 8ade50cdb8c2e05e00e917f848e96bfee54bb4ac77bf50af8c5ab66e2e01f8a5c2621123087945feaa9b15ad84a5936e23cc489a2bb7127c2b118a5a0695ee6e WHIRLPOOL 706d7b1101927ff89afb01ad766f491db94ff04f574bc7b69349b6ab0334ed5d2cd5ee2d8041cf5a0ba00f5a6a3596502835fa132c668533772a42737f0e2412
20 DIST openrc-0.16.tar.bz2 157924 SHA256 969ce450bb095a406ef14362572633b14c8696b57d67361394c5951704273ce3 SHA512 3ff3958bf480ec6bf97e50c8911c382dc855322a74d57b65da975e98d8b76debda971826d15803be96f2ae9c7fd5ebf4cf0c43013663a042224a9c49377614f8 WHIRLPOOL 5e6bb11b907a2fe3812653354950b0ec4e13571981580d03d2ee9b93dc8a68ce128ee1ec7560557adbc90af44aa881648aae51e15bb0f0990ca338ffb3c6c814
21 DIST openrc-0.17.tar.bz2 160533 SHA256 45818d9ef4659e8dd924a1468a091255c305daee5417f94d9515f0e125298b30 SHA512 6e69b036d113f066b0dd0bfe55e019328e0e77cff6c93f0a3e55751aa0a72411aa3b1efe8b4327e156a9612e4155863b0a81c9eda043c12904bb36e861b71399 WHIRLPOOL de45daf6f4aebe632ea9fcb46408e63f0aed6c9b9129fb5510f348f20cf1c62aa42e7dce47a7f19a441696596fa57494642e7334a42c415fdbc865cb80a18eff
22 +DIST openrc-0.18.1.tar.bz2 158198 SHA256 1af3bc056c164c0cae9b41525a0f6381dd5dfdbef35961142a679a530d31ac9e SHA512 81aa46b2dc0f3babad3c1c0bce5add9d4f04700ac6d217f7851c5f7d064b44934ace1bd80a2d55b8256f09a6df2d564b5f944b3aaf78e08c3ada49cd5b0d9e5b WHIRLPOOL d996b123802ade2a62bfea8a9b583611fa76ca911fc8549950bb89c4fb7d02768ef6cdb5784f7389b6fe0c89a043547e091023b84da33ce35061a7d618dffbda
23 DIST openrc-0.18.tar.bz2 158171 SHA256 1d4831d9941df9248a5622060fb974bc912382cd1f1e07682a34d50e8f5215e7 SHA512 12ff8ffe9476a6f677708724eac537dfec5e49c22e98815c281f2316c88c0d7402f91de99bad8819393de0c0b00dd81a7917808bef47c51d2f593da7ef351b94 WHIRLPOOL b29b599efda3ab0a84895779ebc3cb013d9a7dc16742ea166f1c7bf2b98c38132d479fc43e7904d245a8eacb5c3af685d671be4d770e9f53a68062b76ebf00e7
24
25 diff --git a/sys-apps/openrc/openrc-0.18.1.ebuild b/sys-apps/openrc/openrc-0.18.1.ebuild
26 new file mode 100644
27 index 0000000..f1c78ac
28 --- /dev/null
29 +++ b/sys-apps/openrc/openrc-0.18.1.ebuild
30 @@ -0,0 +1,337 @@
31 +# Copyright 1999-2015 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=5
36 +
37 +inherit eutils flag-o-matic multilib pam toolchain-funcs
38 +
39 +DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
40 +HOMEPAGE="https://www.gentoo.org/proj/en/base/openrc/"
41 +
42 +if [[ ${PV} == "9999" ]]; then
43 + EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
44 + inherit git-r3
45 +else
46 + SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
47 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
48 +fi
49 +
50 +LICENSE="BSD-2"
51 +SLOT="0"
52 +IUSE="audit debug elibc_glibc ncurses pam newnet prefix +netifrc selinux static-libs
53 + tools unicode kernel_linux kernel_FreeBSD"
54 +
55 +COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
56 + elibc_glibc? ( >=sys-libs/glibc-2.5 )
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 + epatch_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 the gentoo pam.d file
182 + newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
183 +
184 + # install documentation
185 + dodoc ChangeLog *.md
186 + if use newnet; then
187 + dodoc README.newnet
188 + fi
189 +}
190 +
191 +add_boot_init() {
192 + local initd=$1
193 + local runlevel=${2:-boot}
194 + # if the initscript is not going to be installed and is not
195 + # currently installed, return
196 + [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
197 + || return
198 + [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
199 +
200 + # if runlevels dont exist just yet, then create it but still flag
201 + # to pkg_postinst that it needs real setup #277323
202 + if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
203 + mkdir -p "${EROOT}"etc/runlevels/${runlevel}
204 + touch "${EROOT}"etc/runlevels/.add_boot_init.created
205 + fi
206 +
207 + elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
208 + ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
209 +}
210 +add_boot_init_mit_config() {
211 + local config=$1 initd=$2
212 + if [[ -e ${EROOT}${config} ]] ; then
213 + if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
214 + add_boot_init ${initd}
215 + fi
216 + fi
217 +}
218 +
219 +pkg_preinst() {
220 + local f LIBDIR=$(get_libdir)
221 +
222 + # avoid default thrashing in conf.d files when possible #295406
223 + if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
224 + (
225 + unset hostname HOSTNAME
226 + source "${EROOT}"etc/conf.d/hostname
227 + : ${hostname:=${HOSTNAME}}
228 + [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
229 + )
230 + fi
231 +
232 + # set default interactive shell to sulogin if it exists
233 + set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
234 +
235 + # termencoding was added in 0.2.1 and needed in boot
236 + has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
237 +
238 + # swapfiles was added in 0.9.9 and needed in boot (february 2012)
239 + has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
240 +
241 + if ! has_version ">=sys-apps/openrc-0.11"; then
242 + add_boot_init sysfs sysinit
243 + fi
244 +
245 + if ! has_version ">=sys-apps/openrc-0.11.3" ; then
246 + migrate_udev_mount_script
247 + add_boot_init tmpfiles.setup boot
248 + fi
249 +
250 + # these were added in 0.12.
251 + if ! has_version ">=sys-apps/openrc-0.12"; then
252 + add_boot_init loopback
253 + add_boot_init tmpfiles.dev sysinit
254 +
255 + # ensure existing /etc/conf.d/net is not removed
256 + # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
257 + # this needs to stay in openrc ebuilds for a long time. :(
258 + # Added in 0.12.
259 + if [[ -f "${EROOT}"etc/conf.d/net ]]; then
260 + einfo "Modifying conf.d/net to keep it from being removed"
261 + cat <<-EOF >>"${EROOT}"etc/conf.d/net
262 +
263 +# The network scripts are now part of net-misc/netifrc
264 +# In order to avoid sys-apps/${P} from removing this file, this comment was
265 +# added; you can safely remove this comment. Please see
266 +# /usr/share/doc/netifrc*/README* for more information.
267 +EOF
268 + fi
269 + fi
270 + has_version ">=sys-apps/openrc-0.14" || add_boot_init binfmt
271 +}
272 +
273 +# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
274 +migrate_udev_mount_script() {
275 + if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
276 + ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
277 + add_boot_init udev-mount sysinit
278 + fi
279 + return 0
280 +}
281 +
282 +pkg_postinst() {
283 + local LIBDIR=$(get_libdir)
284 +
285 + # Make our runlevels if they don't exist
286 + if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
287 + einfo "Copying across default runlevels"
288 + cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
289 + rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
290 + else
291 + if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
292 + mkdir -p "${EROOT}"etc/runlevels/sysinit
293 + cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
294 + "${EROOT}"etc/runlevels/sysinit
295 + fi
296 + if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
297 + mkdir -p "${EROOT}"etc/runlevels/shutdown
298 + cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
299 + "${EROOT}"etc/runlevels/shutdown
300 + fi
301 + fi
302 +
303 + if use hppa; then
304 + elog "Setting the console font does not work on all HPPA consoles."
305 + elog "You can still enable it by running:"
306 + elog "# rc-update add consolefont boot"
307 + fi
308 +
309 + # Handle the conf.d/local.{start,stop} -> local.d transition
310 + if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
311 + elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
312 + elog "files to ${EROOT}etc/local.d"
313 + mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
314 + mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
315 + chmod +x "${EROOT}"etc/local.d/*{start,stop}
316 + fi
317 +
318 + if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
319 + if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
320 + ewarn "The dependency data could not be migrated to /run/openrc."
321 + ewarn "This means you need to reboot your system."
322 + fi
323 + fi
324 +
325 + # update the dependency tree after touching all files #224171
326 + [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
327 +
328 + if ! use newnet && ! use netifrc; then
329 + ewarn "You have emerged OpenRc without network support. This"
330 + ewarn "means you need to SET UP a network manager such as"
331 + ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
332 + ewarn "net-misc/NetworkManager, or net-misc/badvpn."
333 + ewarn "Or, you have the option of emerging openrc with the newnet"
334 + ewarn "use flag and configuring /etc/conf.d/network and"
335 + ewarn "/etc/conf.d/staticroute if you only use static interfaces."
336 + ewarn
337 + fi
338 +
339 + if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
340 + ewarn "Please add the network service to your boot runlevel"
341 + ewarn "as soon as possible. Not doing so could leave you with a system"
342 + ewarn "without networking."
343 + ewarn
344 + fi
345 +
346 + ewarn "In this version of OpenRC, the loopback interface no longer"
347 + ewarn "satisfies the net virtual."
348 + ewarn "If you have services now which do not start because of this,"
349 + ewarn "They can be fixed by adding rc_need=\"!net\""
350 + ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
351 + ewarn "You should also file a bug against the service asking that"
352 + ewarn "need net be dropped from the dependencies."
353 + ewarn "The bug you file should block the following tracker:"
354 + ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
355 + ewarn
356 +
357 + # Updated for 0.13.2.
358 + ewarn "Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not"
359 + ewarn "fixed correctly in earlier versions of OpenRC."
360 + ewarn "The correct fix is implemented in this version, but that"
361 + ewarn "means netmount needs to be added to the default runlevel if"
362 + ewarn "you are using nfs file systems."
363 + ewarn
364 +
365 + elog "You should now update all files in /etc, using etc-update"
366 + elog "or equivalent before restarting any services or this host."
367 +}