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