Gentoo Archives: gentoo-commits

From: "Doug Goldstein (cardoe)" <cardoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/openrc: openrc-0.4.1-r1.ebuild ChangeLog openrc-0.3.0-r1.ebuild openrc-0.4.0.ebuild openrc-0.4.1.ebuild
Date: Mon, 29 Dec 2008 22:57:53
Message-Id: E1LHR3W-0004Lq-Tc@stork.gentoo.org
1 cardoe 08/12/29 22:57:50
2
3 Modified: ChangeLog
4 Added: openrc-0.4.1-r1.ebuild
5 Removed: openrc-0.3.0-r1.ebuild openrc-0.4.0.ebuild
6 openrc-0.4.1.ebuild
7 Log:
8 fix s-s-d signals on retry. bug #252621. remove old versions
9 (Portage version: 2.1.6.4/cvs/Linux 2.6.28-gentoo x86_64)
10
11 Revision Changes Path
12 1.53 sys-apps/openrc/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.53&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.53&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?r1=1.52&r2=1.53
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v
21 retrieving revision 1.52
22 retrieving revision 1.53
23 diff -u -r1.52 -r1.53
24 --- ChangeLog 24 Dec 2008 06:59:46 -0000 1.52
25 +++ ChangeLog 29 Dec 2008 22:57:50 -0000 1.53
26 @@ -1,6 +1,22 @@
27 # ChangeLog for sys-apps/openrc
28 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.52 2008/12/24 06:59:46 zzam Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.53 2008/12/29 22:57:50 cardoe Exp $
31 +
32 +*openrc-0.4.1-r1 (29 Dec 2008)
33 +
34 + 29 Dec 2008; Doug Goldstein <cardoe@g.o>
35 + -files/0.3.0/0001-Fix-a-segfault-when-profile.env-does-not-exist.patch,
36 + -files/0.3.0/0005-add-back-KV_-funcs.patch,
37 + +files/0.4.0/0004-s-s-d-retry.patch,
38 + -files/0.3.0/0003-This-reverts-commit-0e2f160c95b15e95f3885e3f5a3670ec.pat
39 + ch, -files/0.3.0/0006-Fix-tests-Gentoo-240350.patch,
40 + -files/0.3.0/0002-kenv-is-not-always-available.patch,
41 + -files/0.3.0/0007-Fix-utmp-permissions-Gentoo-240437.patch,
42 + -files/0.3.0/0004-add-a-softlevel-function-to-the-API-so-people-dont.patch
43 + , -files/0.3.0/0008-Clean-up-warnings-regarding-printf.patch,
44 + -openrc-0.3.0-r1.ebuild, -openrc-0.4.0.ebuild, -openrc-0.4.1.ebuild,
45 + +openrc-0.4.1-r1.ebuild:
46 + fix s-s-d signals on retry. bug #252621. remove old versions
47
48 24 Dec 2008; Matthias Schwarzott <zzam@g.o> openrc-0.4.1.ebuild:
49 Fix patches directory, bug #252340. Update ebuild to match the old 0.4.0
50
51
52
53 1.1 sys-apps/openrc/openrc-0.4.1-r1.ebuild
54
55 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.4.1-r1.ebuild?rev=1.1&view=markup
56 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.4.1-r1.ebuild?rev=1.1&content-type=text/plain
57
58 Index: openrc-0.4.1-r1.ebuild
59 ===================================================================
60 # Copyright 1999-2008 Gentoo Foundation
61 # Distributed under the terms of the GNU General Public License v2
62 # $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.1-r1.ebuild,v 1.1 2008/12/29 22:57:50 cardoe Exp $
63
64 inherit eutils flag-o-matic multilib toolchain-funcs
65
66 if [[ ${PV} == "9999" ]] ; then
67 EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/openrc.git"
68 EGIT_BRANCH="master"
69 inherit git
70 else
71 SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2
72 mirror://gentoo/${P}.tar.bz2
73 http://dev.gentoo.org/~cardoe/files/${P}.tar.bz2
74 http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
75 fi
76
77 DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
78 HOMEPAGE="http://roy.marples.name/openrc"
79
80 LICENSE="BSD-2"
81 SLOT="0"
82 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
83 IUSE="debug elibc_glibc ncurses pam unicode kernel_linux kernel_FreeBSD"
84
85 RDEPEND="virtual/init
86 kernel_linux? ( >=sys-apps/module-init-tools-3.2.2-r2 )
87 kernel_FreeBSD? ( sys-process/fuser-bsd )
88 elibc_glibc? ( >=sys-libs/glibc-2.5 )
89 ncurses? ( sys-libs/ncurses )
90 pam? ( virtual/pam )
91 >=sys-apps/baselayout-2.0.0
92 !<sys-fs/udev-133
93 !<sys-apps/sysvinit-2.86-r11"
94 DEPEND="${RDEPEND}
95 virtual/os-headers"
96
97 pkg_setup() {
98 LIBDIR="lib"
99 [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
100
101 MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
102
103 local brand="Unknown"
104 if use kernel_linux ; then
105 MAKE_ARGS="${MAKE_ARGS} OS=Linux"
106 brand="Linux"
107 elif use kernel_FreeBSD ; then
108 MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
109 brand="FreeBSD"
110 fi
111 export BRANDING="Gentoo ${brand}"
112
113 export DEBUG=$(usev debug)
114 export MKPAM=$(usev pam)
115 export MKTERMCAP=$(usev ncurses)
116 }
117
118 src_unpack() {
119 if [[ ${PV} == "9999" ]] ; then
120 git_src_unpack
121 else
122 unpack ${A}
123 fi
124 cd "${S}"
125 epatch "${FILESDIR}"/0.4.0/*.patch
126 }
127
128 src_compile() {
129 # catch people running `ebuild` w/out setup
130 if [[ -z ${MAKE_ARGS} ]] ; then
131 die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
132 fi
133
134 if [[ ${PV} == "9999" ]] ; then
135 local ver="git-$(git --git-dir=${EGIT_STORE_DIR}/${EGIT_PROJECT} rev-parse --verify ${EGIT_BRANCH} | cut -c1-8)"
136 sed -i "/^VERSION[[:space:]]*=/s:=.*:=${ver}:" Makefile
137 fi
138
139 tc-export CC AR RANLIB
140 echo emake ${MAKE_ARGS}
141 emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
142 }
143
144 src_install() {
145 emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
146 gen_usr_ldscript libeinfo.so
147 gen_usr_ldscript librc.so
148
149 keepdir /"${LIBDIR}"/rc/init.d
150 keepdir /"${LIBDIR}"/rc/tmp
151
152 # Backup our default runlevels
153 dodir /usr/share/"${PN}"
154 mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
155
156 # Setup unicode defaults for silly unicode users
157 use unicode && sed -i -e '/^unicode=/s:NO:YES:' "${D}"/etc/rc.conf
158
159 # Cater to the norm
160 (use x86 || use amd64) && sed -i -e '/^windowkeys=/s:NO:YES:' "${D}"/etc/conf.d/keymaps
161 }
162
163 add_boot_init() {
164 local initd=$1
165 # if the initscript is not going to be installed and is not
166 # currently installed, return
167 [[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] \
168 || return
169 [[ -e ${ROOT}/etc/runlevels/boot/${initd} ]] && return
170 elog "Auto-adding '${initd}' service to your boot runlevel"
171 ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/boot/${initd}
172 }
173 add_boot_init_mit_config() {
174 local config=$1 initd=$2
175 if [[ -e ${ROOT}${config} ]] ; then
176 if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${ROOT}"/${config}) ]] ; then
177 add_boot_init ${initd}
178 fi
179 fi
180 }
181
182 pkg_preinst() {
183 local f
184
185 # default net script is just comments, so no point in biting people
186 # in the ass by accident
187 mv "${D}"/etc/conf.d/net "${T}"/
188 [[ -e ${ROOT}/etc/conf.d/net ]] && cp "${ROOT}"/etc/conf.d/net "${T}"/
189
190 # upgrade timezone file ... do it before moving clock
191 if [[ -e ${ROOT}/etc/conf.d/clock && ! -e ${ROOT}/etc/timezone ]] ; then
192 (
193 source "${ROOT}"/etc/conf.d/clock
194 [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${ROOT}"/etc/timezone
195 )
196 fi
197
198 # /etc/conf.d/clock moved to /etc/conf.d/hwclock
199 local clock
200 use kernel_FreeBSD && clock="adjkerntz" || clock="hwclock"
201 if [[ -e ${ROOT}/etc/conf.d/clock ]] ; then
202 mv "${ROOT}"/etc/conf.d/clock "${ROOT}"/etc/conf.d/${clock}
203 fi
204 if [[ -L ${ROOT}/etc/runlevels/boot/clock ]] ; then
205 rm -f "${ROOT}"/etc/runlevels/boot/clock
206 ln -snf /etc/init.d/${clock} "${ROOT}"/etc/runlevels/boot/${clock}
207 fi
208 if [[ -L ${ROOT}${LIBDIR}/rc/init.d/started/clock ]] ; then
209 rm -f "${ROOT}${LIBDIR}"/rc/init.d/started/clock
210 ln -snf /etc/init.d/${clock} "${ROOT}${LIBDIR}"/rc/init.d/started/${clock}
211 fi
212
213 # /etc/conf.d/rc is no longer used for configuration
214 if [[ -e ${ROOT}/etc/conf.d/rc ]] ; then
215 elog "/etc/conf.d/rc is no longer used for configuration."
216 elog "Please migrate your settings to /etc/rc.conf as applicable"
217 elog "and delete /etc/conf.d/rc"
218 fi
219
220 # force net init.d scripts into symlinks
221 for f in "${ROOT}"/etc/init.d/net.* ; do
222 [[ -e ${f} ]] || continue # catch net.* not matching anything
223 [[ ${f} == */net.lo ]] && continue # real file now
224 [[ ${f} == *.openrc.bak ]] && continue
225 if [[ ! -L ${f} ]] ; then
226 elog "Moved net service '${f##*/}' to '${f##*/}.openrc.bak' to force a symlink."
227 elog "You should delete '${f##*/}.openrc.bak' if you don't need it."
228 mv "${f}" "${f}.openrc.bak"
229 ln -snf net.lo "${f}"
230 fi
231 done
232
233 # termencoding was added in 0.2.1 and needed in boot
234 has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
235
236 # openrc-0.4.0 no longer loads the udev addon
237 enable_udev=0
238 if [[ ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && \
239 [[ -e "${ROOT}"/etc/init.d/udev ]] && \
240 ! has_version ">=sys-apps/openrc-0.4.0"
241 then
242 # make sure udev is in sysinit if it was enabled before
243 local rc_devices=$(
244 [[ -f /etc/rc.conf ]] && source /etc/rc.conf
245 [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc
246 echo "${rc_devices:-${RC_DEVICES:-auto}}"
247 )
248 case ${rc_devices} in
249 udev|auto)
250 enable_udev=1
251 ;;
252 esac
253 fi
254
255 # skip remaining migration if we already have openrc installed
256 has_version sys-apps/openrc && return 0
257
258 # baselayout boot init scripts have been split out
259 for f in $(cd "${D}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do
260 add_boot_init ${f}
261 done
262
263 # Try to auto-add some addons when possible
264 add_boot_init_mit_config /etc/conf.d/cryptfs dmcrypt
265 add_boot_init_mit_config /etc/conf.d/dmcrypt dmcrypt
266 add_boot_init_mit_config /etc/mdadm.conf mdraid
267 add_boot_init_mit_config /etc/evms.conf evms
268 [[ -e ${ROOT}/sbin/dmsetup ]] && add_boot_init device-mapper
269 [[ -e ${ROOT}/sbin/vgscan ]] && add_boot_init lvm
270 elog "Add on services (such as RAID/dmcrypt/LVM/etc...) are now stand alone"
271 elog "init.d scripts. If you use such a thing, make sure you have the"
272 elog "required init.d scripts added to your boot runlevel."
273
274 # Upgrade out state for baselayout-1 users
275 if [[ ! -e ${ROOT}${LIBDIR}/rc/init.d/started ]] ; then
276 (
277 [[ -e ${ROOT}/etc/conf.d/rc ]] && source "${ROOT}"/etc/conf.d/rc
278 svcdir=${svcdir:-/var/lib/init.d}
279 if [[ ! -d ${ROOT}${svcdir}/started ]] ; then
280 ewarn "No state found, and no state exists"
281 elog "You should reboot this host"
282 else
283 mkdir -p "${ROOT}${LIBDIR}/rc/init.d"
284 einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}${LIBDIR}/rc/init.d"
285 mv "${ROOT}${svcdir}"/* "${ROOT}${LIBDIR}"/rc/init.d
286 rm -rf "${ROOT}${LIBDIR}"/rc/init.d/daemons \
287 "${ROOT}${LIBDIR}"/rc/init.d/console
288 umount "${ROOT}${svcdir}" 2>/dev/null
289 rm -rf "${ROOT}${svcdir}"
290 fi
291 )
292 fi
293
294 # Handle the /etc/modules.autoload.d -> /etc/conf.d/modules transition
295 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
296 elog "Converting your /etc/modules.autoload.d/ files to /etc/conf.d/modules"
297 rm -f "${ROOT}"/etc/modules.autoload.d/.keep*
298 rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null
299 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
300 local f v
301 for f in "${ROOT}"/etc/modules.autoload.d/* ; do
302 v=${f##*/}
303 v=${v#kernel-}
304 v=${v//[^[:alnum:]]/_}
305 gawk -v v="${v}" -v f="${f##*/}" '
306 BEGIN { print "\n### START: Auto-converted from " f "\n" }
307 {
308 if ($0 ~ /^[^#]/) {
309 print "modules_" v "=\"${modules_" v "} " $1 "\""
310 gsub(/[^[:alnum:]]/, "_", $1)
311 printf "module_" $1 "_args_" v "=\""
312 for (i = 2; i <= NF; ++i) {
313 if (i > 2)
314 printf " "
315 printf $i
316 }
317 print "\"\n"
318 } else
319 print
320 }
321 END { print "\n### END: Auto-converted from " f "\n" }
322 ' "${f}" >> "${D}"/etc/conf.d/modules
323 done
324 rm -f "${f}"
325 rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null
326 fi
327 fi
328 }
329
330 pkg_postinst() {
331 # Remove old baselayout links
332 rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
333
334 [[ -e ${T}/net && ! -e ${ROOT}/etc/conf.d/net ]] && mv "${T}"/net "${ROOT}"/etc/conf.d/net
335
336 # Make our runlevels if they don't exist
337 if [[ ! -e ${ROOT}/etc/runlevels ]] ; then
338 einfo "Copying across default runlevels"
339 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc
340 else
341 if [[ ! -e ${ROOT}/etc/runlevels/sysinit/devfs ]] ; then
342 mkdir -p "${ROOT}"/etc/runlevels/sysinit
343 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels/sysinit/* \
344 "${ROOT}"/etc/runlevels/sysinit
345 fi
346 if [[ ! -e ${ROOT}/etc/runlevels/shutdown/mount-ro ]] ; then
347 mkdir -p "${ROOT}"/etc/runlevels/shutdown
348 cp -RPp "${ROOT}"/usr/share/${PN}/runlevels/shutdown/* \
349 "${ROOT}"/etc/runlevels/shutdown
350 fi
351 fi
352
353 if [[ "$enable_udev" = 1 ]]; then
354 elog "Auto adding udev init script to the sysinit runlevel"
355 ln -sf /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
356 fi
357
358 # update the dependency tree bug #224171
359 [[ "${ROOT}" = "/" ]] && "${ROOT}/${LIBDIR}"/rc/bin/rc-depend -u
360
361 if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then
362 ewarn "/etc/modules.autoload.d is no longer used. Please convert"
363 ewarn "your files to /etc/conf.d/modules and delete the directory."
364 fi
365
366 elog "You should now update all files in /etc, using etc-update"
367 elog "or equivalent before restarting any services or this host."
368 elog
369 elog "Please read the migration guide available at:"
370 elog "http://www.gentoo.org/doc/en/openrc-migration.xml"
371 }