Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/openrc: openrc-0.9.8.3.ebuild ChangeLog
Date: Mon, 30 Jan 2012 20:03:02
Message-Id: 20120130200251.202E22004B@flycatcher.gentoo.org
1 robbat2 12/01/30 20:02:51
2
3 Modified: ChangeLog
4 Added: openrc-0.9.8.3.ebuild
5 Log:
6 Version bump, release tracker bug #401555.
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.203 sys-apps/openrc/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.203&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.203&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?r1=1.202&r2=1.203
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v
20 retrieving revision 1.202
21 retrieving revision 1.203
22 diff -p -w -b -B -u -u -r1.202 -r1.203
23 --- ChangeLog 28 Jan 2012 17:22:48 -0000 1.202
24 +++ ChangeLog 30 Jan 2012 20:02:51 -0000 1.203
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-apps/openrc
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.202 2012/01/28 17:22:48 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.203 2012/01/30 20:02:51 robbat2 Exp $
30 +
31 +*openrc-0.9.8.3 (30 Jan 2012)
32 +
33 + 30 Jan 2012; Robin H. Johnson <robbat2@g.o> +openrc-0.9.8.3.ebuild:
34 + Version bump, release tracker bug #401555.
35
36 28 Jan 2012; Raúl Porcel <armin76@g.o> openrc-0.9.8.2.ebuild:
37 alpha/arm/ia64/m68k/s390/sh/sparc stable wrt #399793
38
39
40
41 1.1 sys-apps/openrc/openrc-0.9.8.3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.9.8.3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.9.8.3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openrc-0.9.8.3.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.9.8.3.ebuild,v 1.1 2012/01/30 20:02:51 robbat2 Exp $
51
52 EAPI=4
53
54 EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git"
55 [[ ${PV} == "9999" ]] && SCM_ECLASS="git-2"
56 inherit eutils flag-o-matic multilib pam toolchain-funcs ${SCM_ECLASS}
57 unset SCM_ECLASS
58
59 DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
60 HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
61 if [[ ${PV} != "9999" ]] ; then
62 SRC_URI="mirror://gentoo/${P}.tar.bz2"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
64 fi
65
66 LICENSE="BSD-2"
67 SLOT="0"
68 IUSE="debug elibc_glibc ncurses pam selinux static-libs unicode kernel_linux kernel_FreeBSD"
69
70 RDEPEND="virtual/init
71 kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) )
72 elibc_glibc? ( >=sys-libs/glibc-2.5 )
73 ncurses? ( sys-libs/ncurses )
74 pam? ( sys-auth/pambase )
75 >=sys-apps/baselayout-2.0.0
76 kernel_linux? (
77 !<sys-apps/module-init-tools-3.2.2-r2
78 sys-process/psmisc
79 )
80 !<sys-fs/udev-133
81 !<sys-apps/sysvinit-2.86-r11"
82 DEPEND="${RDEPEND}
83 virtual/os-headers"
84
85 make_args() {
86 unset LIBDIR #266688
87
88 MAKE_ARGS="${MAKE_ARGS} LIBNAME=$(get_libdir) LIBEXECDIR=/$(get_libdir)/rc"
89
90 local brand="Unknown"
91 if use kernel_linux ; then
92 MAKE_ARGS="${MAKE_ARGS} OS=Linux"
93 brand="Linux"
94 elif use kernel_FreeBSD ; then
95 MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
96 brand="FreeBSD"
97 fi
98 if use selinux; then
99 MAKE_ARGS="${MAKE_ARGS} MKSELINUX=yes"
100 fi
101 export BRANDING="Gentoo ${brand}"
102 if ! use static-libs; then
103 MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no"
104 fi
105 }
106
107 pkg_setup() {
108 export DEBUG=$(usev debug)
109 export MKPAM=$(usev pam)
110 export MKTERMCAP=$(usev ncurses)
111 }
112
113 src_prepare() {
114 sed -i 's:0444:0644:' mk/sys.mk || die
115 sed -i "/^DIR/s:/openrc:/${PF}:" doc/Makefile || die #241342
116
117 if [[ ${PV} == "9999" ]] ; then
118 local ver="git-${EGIT_VERSION:0:6}"
119 sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
120 fi
121
122 # Allow user patches to be applied without modifying the ebuild
123 epatch_user
124 }
125
126 src_compile() {
127 make_args
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="${D}/$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 make_args
148 emake ${MAKE_ARGS} DESTDIR="${D}" install
149
150 # move the shared libs back to /usr so ldscript can install
151 # more of a minimal set of files
152 # disabled for now due to #270646
153 #mv "${D}"/$(get_libdir)/lib{einfo,rc}* "${D}"/usr/$(get_libdir)/ || die
154 #gen_usr_ldscript -a einfo rc
155 gen_usr_ldscript libeinfo.so
156 gen_usr_ldscript librc.so
157
158 keepdir /$(get_libdir)/rc/{init.d,tmp}
159
160 # Backup our default runlevels
161 dodir /usr/share/"${PN}"
162 cp -PR "${D}"/etc/runlevels "${D}"/usr/share/${PN} || die
163 rm -rf "${D}"/etc/runlevels
164
165 # Install the default net configuration
166 doconfd conf.d/net
167
168 # Setup unicode defaults for silly unicode users
169 set_config_yes_no /etc/rc.conf unicode use unicode
170
171 # Cater to the norm
172 set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
173
174 # On HPPA, do not run consolefont by default (bug #222889)
175 if use hppa; then
176 rm -f "${D}"/usr/share/openrc/runlevels/boot/consolefont
177 fi
178
179 # Support for logfile rotation
180 insinto /etc/logrotate.d
181 newins "${FILESDIR}"/openrc.logrotate openrc
182
183 # install the gentoo pam.d file
184 newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
185 }
186
187 add_boot_init() {
188 local initd=$1
189 local runlevel=${2:-boot}
190 # if the initscript is not going to be installed and is not
191 # currently installed, return
192 [[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] \
193 || return
194 [[ -e ${ROOT}/etc/runlevels/${runlevel}/${initd} ]] && return
195
196 # if runlevels dont exist just yet, then create it but still flag
197 # to pkg_postinst that it needs real setup #277323
198 if [[ ! -d ${ROOT}/etc/runlevels/${runlevel} ]] ; then
199 mkdir -p "${ROOT}"/etc/runlevels/${runlevel}
200 touch "${ROOT}"/etc/runlevels/.add_boot_init.created
201 fi
202
203 elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
204 ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runlevel}/${initd}
205 }
206 add_boot_init_mit_config() {
207 local config=$1 initd=$2
208 if [[ -e ${ROOT}${config} ]] ; then
209 if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${ROOT}"/${config}) ]] ; then
210 add_boot_init ${initd}
211 fi
212 fi
213 }
214
215 pkg_preinst() {
216 local f LIBDIR=$(get_libdir)
217
218 # default net script is just comments, so no point in biting people
219 # in the ass by accident. we save in preinst so that the package
220 # manager doesnt go throwing etc-update crap at us -- postinst is
221 # too late to prevent that. this behavior also lets us keep the
222 # file in the CONTENTS for binary packages.
223 [[ -e ${ROOT}/etc/conf.d/net ]] && cp "${ROOT}"/etc/conf.d/net "${D}"/etc/conf.d/
224
225 # avoid default thrashing in conf.d files when possible #295406
226 if [[ -e ${ROOT}/etc/conf.d/hostname ]] ; then
227 (
228 unset hostname HOSTNAME
229 source "${ROOT}"/etc/conf.d/hostname
230 : ${hostname:=${HOSTNAME}}
231 [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
232 )
233 fi
234
235 # upgrade timezone file ... do it before moving clock
236 if [[ -e ${ROOT}/etc/conf.d/clock && ! -e ${ROOT}/etc/timezone ]] ; then
237 (
238 unset TIMEZONE
239 source "${ROOT}"/etc/conf.d/clock
240 [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${ROOT}"/etc/timezone
241 )
242 fi
243
244 # /etc/conf.d/clock moved to /etc/conf.d/hwclock
245 local clock
246 use kernel_FreeBSD && clock="adjkerntz" || clock="hwclock"
247 if [[ -e ${ROOT}/etc/conf.d/clock ]] ; then
248 mv "${ROOT}"/etc/conf.d/clock "${ROOT}"/etc/conf.d/${clock}
249 fi
250 if [[ -e ${ROOT}/etc/init.d/clock ]] ; then
251 rm -f "${ROOT}"/etc/init.d/clock
252 fi
253 if [[ -L ${ROOT}/etc/runlevels/boot/clock ]] ; then
254 rm -f "${ROOT}"/etc/runlevels/boot/clock
255 ln -snf /etc/init.d/${clock} "${ROOT}"/etc/runlevels/boot/${clock}
256 fi
257 if [[ -L ${ROOT}${LIBDIR}/rc/init.d/started/clock ]] ; then
258 rm -f "${ROOT}${LIBDIR}"/rc/init.d/started/clock
259 ln -snf /etc/init.d/${clock} "${ROOT}${LIBDIR}"/rc/init.d/started/${clock}
260 fi
261
262 # /etc/conf.d/rc is no longer used for configuration
263 if [[ -e ${ROOT}/etc/conf.d/rc ]] ; then
264 elog "/etc/conf.d/rc is no longer used for configuration."
265 elog "Please migrate your settings to /etc/rc.conf as applicable"
266 elog "and delete /etc/conf.d/rc"
267 fi
268
269 # force net init.d scripts into symlinks
270 for f in "${ROOT}"/etc/init.d/net.* ; do
271 [[ -e ${f} ]] || continue # catch net.* not matching anything
272 [[ ${f} == */net.lo ]] && continue # real file now
273 [[ ${f} == *.openrc.bak ]] && continue
274 if [[ ! -L ${f} ]] ; then
275 elog "Moved net service '${f##*/}' to '${f##*/}.openrc.bak' to force a symlink."
276 elog "You should delete '${f##*/}.openrc.bak' if you don't need it."
277 mv "${f}" "${f}.openrc.bak"
278 ln -snf net.lo "${f}"
279 fi
280 done
281
282 # termencoding was added in 0.2.1 and needed in boot
283 has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
284
285 # set default interactive shell to sulogin if it exists
286 set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
287
288 has_version sys-apps/openrc || migrate_from_baselayout_1
289 has_version ">=sys-apps/openrc-0.4.0" || migrate_udev_init_script
290 }
291
292 # >=openrc-0.4.0 no longer loads the udev addon
293 migrate_udev_init_script() {
294 # make sure udev is in sysinit if it was enabled before
295 local enable_udev=false
296 local rc_devices=$(
297 [[ -f /etc/rc.conf ]] && source /etc/rc.conf
298 [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc
299 echo "${rc_devices:-${RC_DEVICES:-auto}}"
300 )
301 case ${rc_devices} in
302 udev|auto)
303 enable_udev=true
304 ;;
305 esac
306
307 if $enable_udev; then
308 add_boot_init udev sysinit
309 add_boot_init udev-postmount default
310 fi
311 }
312
313 migrate_from_baselayout_1() {
314 # baselayout boot init scripts have been split out
315 for f in $(cd "${D}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do
316 # baselayout-1 is always "old" net, so ignore "new" net
317 [[ ${f} == "network" ]] && continue
318
319 add_boot_init ${f}
320 done
321
322 # Try to auto-add some addons when possible
323 add_boot_init_mit_config /etc/conf.d/cryptfs dmcrypt
324 add_boot_init_mit_config /etc/conf.d/dmcrypt dmcrypt
325 add_boot_init_mit_config /etc/mdadm.conf mdraid
326 add_boot_init_mit_config /etc/evms.conf evms
327 [[ -e ${ROOT}/sbin/dmsetup ]] && add_boot_init device-mapper
328 [[ -e ${ROOT}/sbin/vgscan ]] && add_boot_init lvm
329 elog "Add on services (such as RAID/dmcrypt/LVM/etc...) are now stand alone"
330 elog "init.d scripts. If you use such a thing, make sure you have the"
331 elog "required init.d scripts added to your boot runlevel."
332
333 # Upgrade our state for baselayout-1 users
334 if [[ ! -e ${ROOT}${LIBDIR}/rc/init.d/started ]] ; then
335 (
336 [[ -e ${ROOT}/etc/conf.d/rc ]] && source "${ROOT}"/etc/conf.d/rc
337 svcdir=${svcdir:-/var/lib/init.d}
338 if [[ ! -d ${ROOT}${svcdir}/started ]] ; then
339 ewarn "No state found, and no state exists"
340 elog "You should reboot this host"
341 else
342 mkdir -p "${ROOT}${LIBDIR}/rc/init.d"
343 einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}${LIBDIR}/rc/init.d"
344 mv "${ROOT}${svcdir}"/* "${ROOT}${LIBDIR}"/rc/init.d
345 rm -rf "${ROOT}${LIBDIR}"/rc/init.d/daemons \
346 "${ROOT}${LIBDIR}"/rc/init.d/console
347 umount "${ROOT}${svcdir}" 2>/dev/null
348 rm -rf "${ROOT}${svcdir}"
349 fi
350 )
351 fi
352
353 # Handle the /etc/modules.autoload.d -> /etc/conf.d/modules transition
354 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
355 elog "Converting your /etc/modules.autoload.d/ files to /etc/conf.d/modules"
356 rm -f "${ROOT}"/etc/modules.autoload.d/.keep*
357 rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null
358 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
359 local f v
360 for f in "${ROOT}"/etc/modules.autoload.d/* ; do
361 v=${f##*/}
362 v=${v#kernel-}
363 v=${v//[^[:alnum:]]/_}
364 gawk -v v="${v}" -v f="${f##*/}" '
365 BEGIN { print "\n### START: Auto-converted from " f "\n" }
366 {
367 if ($0 ~ /^[^#]/) {
368 print "modules_" v "=\"${modules_" v "} " $1 "\""
369 gsub(/[^[:alnum:]]/, "_", $1)
370 printf "module_" $1 "_args_" v "=\""
371 for (i = 2; i <= NF; ++i) {
372 if (i > 2)
373 printf " "
374 printf $i
375 }
376 print "\"\n"
377 } else
378 print
379 }
380 END { print "\n### END: Auto-converted from " f "\n" }
381 ' "${f}" >> "${D}"/etc/conf.d/modules
382 done
383 rm -f "${f}"
384 rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null
385 fi
386 fi
387 }
388
389 pkg_postinst() {
390 local LIBDIR=$(get_libdir)
391
392 # Remove old baselayout links
393 rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
394 rm -f "${ROOT}"/etc/init.d/{depscan,runscript}.sh
395
396 # Make our runlevels if they don't exist
397 if [[ ! -e ${ROOT}/etc/runlevels ]] || [[ -e ${ROOT}/etc/runlevels/.add_boot_init.created ]] ; then
398 einfo "Copying across default runlevels"
399 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc
400 rm -f "${ROOT}"/etc/runlevels/.add_boot_init.created
401 else
402 if [[ ! -e ${ROOT}/etc/runlevels/sysinit/devfs ]] ; then
403 mkdir -p "${ROOT}"/etc/runlevels/sysinit
404 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels/sysinit/* \
405 "${ROOT}"/etc/runlevels/sysinit
406 fi
407 if [[ ! -e ${ROOT}/etc/runlevels/shutdown/mount-ro ]] ; then
408 mkdir -p "${ROOT}"/etc/runlevels/shutdown
409 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels/shutdown/* \
410 "${ROOT}"/etc/runlevels/shutdown
411 fi
412 fi
413
414 # /etc/conf.d/net.example is no longer valid
415 local NET_EXAMPLE="${ROOT}/etc/conf.d/net.example"
416 local NET_MD5='8ebebfa07441d39eb54feae0ee4c8210'
417 if [[ -e "${NET_EXAMPLE}" ]] ; then
418 if [[ $(md5sum "${NET_EXAMPLE}") == ${NET_MD5}* ]]; then
419 rm -f "${NET_EXAMPLE}"
420 elog "${NET_EXAMPLE} has been removed."
421 else
422 sed -i '1i# This file is obsolete.\n' "${NET_EXAMPLE}"
423 elog "${NET_EXAMPLE} should be removed."
424 fi
425 elog "The new file is ${ROOT}/usr/share/doc/${PF}/net.example"
426 fi
427
428 # /etc/conf.d/wireless.example is no longer valid
429 local WIRELESS_EXAMPLE="${ROOT}/etc/conf.d/wireless.example"
430 local WIRELESS_MD5='d1fad7da940bf263c76af4d2082124a3'
431 if [[ -e "${WIRELESS_EXAMPLE}" ]] ; then
432 if [[ $(md5sum "${WIRELESS_EXAMPLE}") == ${WIRELESS_MD5}* ]]; then
433 rm -f "${WIRELESS_EXAMPLE}"
434 elog "${WIRELESS_EXAMPLE} is deprecated and has been removed."
435 else
436 sed -i '1i# This file is obsolete.\n' "${WIRELESS_EXAMPLE}"
437 elog "${WIRELESS_EXAMPLE} is deprecated and should be removed."
438 fi
439 elog "If you are using the old style network scripts,"
440 elog "Configure wireless settings in ${ROOT}/etc/conf.d/net"
441 elog "after reviewing ${ROOT}/usr/share/doc/${PF}/net.example"
442 fi
443
444 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
445 ewarn "/etc/modules.autoload.d is no longer used. Please convert"
446 ewarn "your files to /etc/conf.d/modules and delete the directory."
447 fi
448
449 if use hppa; then
450 elog "Setting the console font does not work on all HPPA consoles."
451 elog "You can still enable it by running:"
452 elog "# rc-update add consolefont boot"
453 fi
454
455 # Handle the conf.d/local.{start,stop} -> local.d transition
456 if path_exists -o "${ROOT}"etc/conf.d/local.{start,stop} ; then
457 elog "Moving your ${ROOT}etc/conf.d/local.{start,stop}"
458 elog "files to ${ROOT}etc/local.d"
459 mv "${ROOT}"etc/conf.d/local.start "${ROOT}"etc/local.d/baselayout1.start
460 mv "${ROOT}"etc/conf.d/local.stop "${ROOT}"etc/local.d/baselayout1.stop
461 chmod +x "${ROOT}"etc/local.d/*{start,stop}
462 fi
463
464 # update the dependency tree after touching all files #224171
465 [[ "${ROOT}" = "/" ]] && "${ROOT}/${LIBDIR}"/rc/bin/rc-depend -u
466
467 elog "You should now update all files in /etc, using etc-update"
468 elog "or equivalent before restarting any services or this host."
469 elog
470 elog "Please read the migration guide available at:"
471 elog "http://www.gentoo.org/doc/en/openrc-migration.xml"
472 }