Gentoo Archives: gentoo-commits

From: "William Hubbs (williamh)" <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/openrc: openrc-0.13.9.ebuild ChangeLog
Date: Thu, 05 Feb 2015 04:26:03
Message-Id: 20150205042559.BF1CF11155@oystercatcher.gentoo.org
1 williamh 15/02/05 04:25:59
2
3 Modified: ChangeLog
4 Added: openrc-0.13.9.ebuild
5 Log:
6 version bump for bug #537996
7
8 (Portage version: 2.2.15/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0x30C46538)
9
10 Revision Changes Path
11 1.326 sys-apps/openrc/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.326&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.326&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?r1=1.325&r2=1.326
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v
20 retrieving revision 1.325
21 retrieving revision 1.326
22 diff -u -r1.325 -r1.326
23 --- ChangeLog 19 Jan 2015 15:02:19 -0000 1.325
24 +++ ChangeLog 5 Feb 2015 04:25:59 -0000 1.326
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-apps/openrc
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.325 2015/01/19 15:02:19 blueness Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.326 2015/02/05 04:25:59 williamh Exp $
30 +
31 +*openrc-0.13.9 (05 Feb 2015)
32 +
33 + 05 Feb 2015; William Hubbs <williamh@g.o> +openrc-0.13.9.ebuild:
34 + version bump for bug #537996
35
36 19 Jan 2015; Anthony G. Basile <blueness@g.o> openrc-0.13.8.ebuild:
37 Stable on arm. Bug #530120.
38
39
40
41 1.1 sys-apps/openrc/openrc-0.13.9.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.13.9.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.13.9.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openrc-0.13.9.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.13.9.ebuild,v 1.1 2015/02/05 04:25:59 williamh Exp $
51
52 EAPI=5
53
54 inherit eutils flag-o-matic multilib pam toolchain-funcs
55
56 DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
57 HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
58
59 if [[ ${PV} == "9999" ]]; then
60 EGIT_REPO_URI="git://github.com/OpenRC/${PN}.git"
61 inherit git-r3
62 else
63 SRC_URI="http://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
64 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
65 fi
66
67 LICENSE="BSD-2"
68 SLOT="0"
69 IUSE="debug elibc_glibc ncurses pam newnet prefix +netifrc selinux static-libs
70 tools unicode kernel_linux kernel_FreeBSD"
71
72 COMMON_DEPEND="kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
73 elibc_glibc? ( >=sys-libs/glibc-2.5 )
74 ncurses? ( sys-libs/ncurses )
75 pam? ( sys-auth/pambase )
76 tools? ( dev-lang/perl )
77 kernel_linux? (
78 sys-process/psmisc
79 !<sys-process/procps-3.3.9-r2
80 )
81 selinux? ( sys-libs/libselinux )
82 !<sys-apps/baselayout-2.1-r1
83 !<sys-fs/udev-init-scripts-27"
84 DEPEND="${COMMON_DEPEND}
85 virtual/os-headers
86 ncurses? ( virtual/pkgconfig )"
87 RDEPEND="${COMMON_DEPEND}
88 !prefix? (
89 kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6 sys-process/runit ) )
90 kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
91 )
92 selinux? (
93 sec-policy/selinux-base-policy
94 sec-policy/selinux-openrc
95 )
96 "
97
98 PDEPEND="netifrc? ( net-misc/netifrc )"
99
100 src_prepare() {
101 sed -i 's:0444:0644:' mk/sys.mk || die
102
103 if [[ ${PV} == "9999" ]] ; then
104 local ver="git-${EGIT_VERSION:0:6}"
105 sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
106 fi
107
108 # Allow user patches to be applied without modifying the ebuild
109 epatch_user
110 }
111
112 src_compile() {
113 unset LIBDIR #266688
114
115 MAKE_ARGS="${MAKE_ARGS}
116 LIBNAME=$(get_libdir)
117 LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc
118 MKNET=$(usex newnet)
119 MKSELINUX=$(usex selinux)
120 MKSTATICLIBS=$(usex static-libs)
121 MKTOOLS=$(usex tools)"
122
123 local brand="Unknown"
124 if use kernel_linux ; then
125 MAKE_ARGS="${MAKE_ARGS} OS=Linux"
126 brand="Linux"
127 elif use kernel_FreeBSD ; then
128 MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
129 brand="FreeBSD"
130 fi
131 export BRANDING="Gentoo ${brand}"
132 use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
133 export DEBUG=$(usev debug)
134 export MKPAM=$(usev pam)
135 export MKTERMCAP=$(usev ncurses)
136
137 tc-export CC AR RANLIB
138 emake ${MAKE_ARGS}
139 }
140
141 # set_config <file> <option name> <yes value> <no value> test
142 # a value of "#" will just comment out the option
143 set_config() {
144 local file="${ED}/$1" var=$2 val com
145 eval "${@:5}" && val=$3 || val=$4
146 [[ ${val} == "#" ]] && com="#" && val='\2'
147 sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
148 }
149
150 set_config_yes_no() {
151 set_config "$1" "$2" YES NO "${@:3}"
152 }
153
154 src_install() {
155 emake ${MAKE_ARGS} DESTDIR="${D}" install
156
157 # move the shared libs back to /usr so ldscript can install
158 # more of a minimal set of files
159 # disabled for now due to #270646
160 #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
161 #gen_usr_ldscript -a einfo rc
162 gen_usr_ldscript libeinfo.so
163 gen_usr_ldscript librc.so
164
165 if ! use kernel_linux; then
166 keepdir /$(get_libdir)/rc/init.d
167 fi
168 keepdir /$(get_libdir)/rc/tmp
169
170 # Backup our default runlevels
171 dodir /usr/share/"${PN}"
172 cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
173 rm -rf "${ED}"/etc/runlevels
174
175 # Setup unicode defaults for silly unicode users
176 set_config_yes_no /etc/rc.conf unicode use unicode
177
178 # Cater to the norm
179 set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
180
181 # On HPPA, do not run consolefont by default (bug #222889)
182 if use hppa; then
183 rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
184 fi
185
186 # Support for logfile rotation
187 insinto /etc/logrotate.d
188 newins "${FILESDIR}"/openrc.logrotate openrc
189
190 # install the gentoo pam.d file
191 newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
192
193 # install documentation
194 dodoc ChangeLog README README.busybox README.history \
195 FEATURE-REMOVAL-SCHEDULE
196 if use newnet; then
197 dodoc README.newnet
198 fi
199 }
200
201 add_boot_init() {
202 local initd=$1
203 local runlevel=${2:-boot}
204 # if the initscript is not going to be installed and is not
205 # currently installed, return
206 [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
207 || return
208 [[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return
209
210 # if runlevels dont exist just yet, then create it but still flag
211 # to pkg_postinst that it needs real setup #277323
212 if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then
213 mkdir -p "${EROOT}"etc/runlevels/${runlevel}
214 touch "${EROOT}"etc/runlevels/.add_boot_init.created
215 fi
216
217 elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
218 ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
219 }
220 add_boot_init_mit_config() {
221 local config=$1 initd=$2
222 if [[ -e ${EROOT}${config} ]] ; then
223 if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then
224 add_boot_init ${initd}
225 fi
226 fi
227 }
228
229 pkg_preinst() {
230 local f LIBDIR=$(get_libdir)
231
232 # avoid default thrashing in conf.d files when possible #295406
233 if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then
234 (
235 unset hostname HOSTNAME
236 source "${EROOT}"etc/conf.d/hostname
237 : ${hostname:=${HOSTNAME}}
238 [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
239 )
240 fi
241
242 # set default interactive shell to sulogin if it exists
243 set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
244
245 # termencoding was added in 0.2.1 and needed in boot
246 has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
247
248 # swapfiles was added in 0.9.9 and needed in boot (february 2012)
249 has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles
250
251 if ! has_version ">=sys-apps/openrc-0.11"; then
252 add_boot_init sysfs sysinit
253 fi
254
255 if ! has_version ">=sys-apps/openrc-0.11.3" ; then
256 migrate_udev_mount_script
257 add_boot_init tmpfiles.setup boot
258 fi
259
260 # these were added in 0.12.
261 if ! has_version ">=sys-apps/openrc-0.12"; then
262 add_boot_init loopback
263 add_boot_init tmpfiles.dev sysinit
264
265 # ensure existing /etc/conf.d/net is not removed
266 # undoes the hack to get around CONFIG_PROTECT in openrc-0.11.8 and earlier
267 # this needs to stay in openrc ebuilds for a long time. :(
268 # Added in 0.12.
269 if [[ -f "${EROOT}"etc/conf.d/net ]]; then
270 einfo "Modifying conf.d/net to keep it from being removed"
271 cat <<-EOF >>"${EROOT}"etc/conf.d/net
272
273 # The network scripts are now part of net-misc/netifrc
274 # In order to avoid sys-apps/${P} from removing this file, this comment was
275 # added; you can safely remove this comment. Please see
276 # /usr/share/doc/netifrc*/README* for more information.
277 EOF
278 fi
279 fi
280 }
281
282 # >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev.
283 migrate_udev_mount_script() {
284 if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \
285 ! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then
286 add_boot_init udev-mount sysinit
287 fi
288 return 0
289 }
290
291 pkg_postinst() {
292 local LIBDIR=$(get_libdir)
293
294 # Make our runlevels if they don't exist
295 if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then
296 einfo "Copying across default runlevels"
297 cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc
298 rm -f "${EROOT}"etc/runlevels/.add_boot_init.created
299 else
300 if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then
301 mkdir -p "${EROOT}"etc/runlevels/sysinit
302 cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \
303 "${EROOT}"etc/runlevels/sysinit
304 fi
305 if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then
306 mkdir -p "${EROOT}"etc/runlevels/shutdown
307 cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \
308 "${EROOT}"etc/runlevels/shutdown
309 fi
310 fi
311
312 if use hppa; then
313 elog "Setting the console font does not work on all HPPA consoles."
314 elog "You can still enable it by running:"
315 elog "# rc-update add consolefont boot"
316 fi
317
318 # Handle the conf.d/local.{start,stop} -> local.d transition
319 if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
320 elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
321 elog "files to ${EROOT}etc/local.d"
322 mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
323 mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop
324 chmod +x "${EROOT}"etc/local.d/*{start,stop}
325 fi
326
327 if use kernel_linux && [[ "${EROOT}" = "/" ]]; then
328 if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then
329 ewarn "The dependency data could not be migrated to /run/openrc."
330 ewarn "This means you need to reboot your system."
331 fi
332 fi
333
334 # update the dependency tree after touching all files #224171
335 [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u
336
337 if ! use newnet && ! use netifrc; then
338 ewarn "You have emerged OpenRc without network support. This"
339 ewarn "means you need to SET UP a network manager such as"
340 ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/wicd,"
341 ewarn "net-misc/NetworkManager, or net-misc/badvpn."
342 ewarn "Or, you have the option of emerging openrc with the newnet"
343 ewarn "use flag and configuring /etc/conf.d/network and"
344 ewarn "/etc/conf.d/staticroute if you only use static interfaces."
345 ewarn
346 fi
347
348 if use newnet && [ ! -e "${EROOT}"etc/runlevels/boot/network ]; then
349 ewarn "Please add the network service to your boot runlevel"
350 ewarn "as soon as possible. Not doing so could leave you with a system"
351 ewarn "without networking."
352 ewarn
353 fi
354
355 ewarn "In this version of OpenRC, the loopback interface no longer"
356 ewarn "satisfies the net virtual."
357 ewarn "If you have services now which do not start because of this,"
358 ewarn "They can be fixed by adding rc_need=\"!net\""
359 ewarn "to the ${EROOT}etc/conf.d/<servicename> file."
360 ewarn "You should also file a bug against the service asking that"
361 ewarn "need net be dropped from the dependencies."
362 ewarn "The bug you file should block the following tracker:"
363 ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092"
364 ewarn
365
366 # Updated for 0.13.2.
367 ewarn "Bug https://bugs.gentoo.org/show_bug.cgi?id=427996 was not"
368 ewarn "fixed correctly in earlier versions of OpenRC."
369 ewarn "The correct fix is implemented in this version, but that"
370 ewarn "means netmount needs to be added to the default runlevel if"
371 ewarn "you are using nfs file systems."
372 ewarn
373
374 elog "You should now update all files in /etc, using etc-update"
375 elog "or equivalent before restarting any services or this host."
376 }