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