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