1 |
cardoe 08/03/27 14:29:37 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openrc-0.2-r1.ebuild |
5 |
Removed: openrc-0.2.ebuild |
6 |
Log: |
7 |
install rc & rc.shutdown for Gentoo/FreeBSD users |
8 |
(Portage version: 2.1.4.4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.6 sys-apps/openrc/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.6&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.6&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/ChangeLog?r1=1.5&r2=1.6 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v |
20 |
retrieving revision 1.5 |
21 |
retrieving revision 1.6 |
22 |
diff -u -r1.5 -r1.6 |
23 |
--- ChangeLog 27 Mar 2008 12:18:28 -0000 1.5 |
24 |
+++ ChangeLog 27 Mar 2008 14:29:36 -0000 1.6 |
25 |
@@ -1,6 +1,13 @@ |
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.5 2008/03/27 12:18:28 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.6 2008/03/27 14:29:36 cardoe Exp $ |
30 |
+ |
31 |
+*openrc-0.2-r1 (27 Mar 2008) |
32 |
+ |
33 |
+ 27 Mar 2008; Doug Goldstein <cardoe@g.o> |
34 |
+ +files/openrc-0.2-freebsd-install-rc.patch, -openrc-0.2.ebuild, |
35 |
+ +openrc-0.2-r1.ebuild: |
36 |
+ install rc & rc.shutdown for Gentoo/FreeBSD users |
37 |
|
38 |
27 Mar 2008; Mike Frysinger <vapier@g.o> openrc-0.2.ebuild: |
39 |
Add x86/arm love #214957 by Shvetsov Alexey. |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-apps/openrc/openrc-0.2-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: openrc-0.2-r1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2008 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.2-r1.ebuild,v 1.1 2008/03/27 14:29:36 cardoe Exp $ |
53 |
|
54 |
inherit eutils flag-o-matic multilib toolchain-funcs |
55 |
|
56 |
if [[ ${PV} == "9999" ]] ; then |
57 |
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/openrc.git" |
58 |
EGIT_BRANCH="Gentoo" |
59 |
inherit git |
60 |
else |
61 |
SRC_URI="http://roy.marples.name/${PN}/${P}.tar.bz2 |
62 |
mirror://gentoo/${P}.tar.bz2 |
63 |
http://dev.gentoo.org/~cardoe/files/${P}.tar.bz2 |
64 |
http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" |
65 |
fi |
66 |
|
67 |
DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
68 |
HOMEPAGE="http://roy.marples.name/openrc" |
69 |
|
70 |
LICENSE="BSD-2" |
71 |
SLOT="0" |
72 |
KEYWORDS="~amd64 ~arm ~x86" #"~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
73 |
IUSE="debug ncurses pam static unicode kernel_linux kernel_FreeBSD" |
74 |
|
75 |
RDEPEND="virtual/init |
76 |
kernel_linux? ( >=sys-apps/module-init-tools-3.2.2-r2 ) |
77 |
kernel_FreeBSD? ( sys-process/fuser-bsd ) |
78 |
ncurses? ( sys-libs/ncurses ) |
79 |
pam? ( virtual/pam ) |
80 |
>=sys-apps/baselayout-2.0.0 |
81 |
!<sys-fs/udev-118-r2" |
82 |
DEPEND="${RDEPEND} |
83 |
virtual/os-headers" |
84 |
|
85 |
#S="${WORKDIR}/${PN}-0.2" |
86 |
|
87 |
pkg_setup() { |
88 |
LIBDIR="lib" |
89 |
[ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}") |
90 |
|
91 |
MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}" |
92 |
|
93 |
local brand="Unknown" |
94 |
if use kernel_linux ; then |
95 |
MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
96 |
brand="Linux" |
97 |
elif use kernel_FreeBSD ; then |
98 |
MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
99 |
brand="FreeBSD" |
100 |
fi |
101 |
export BRANDING="Gentoo ${brand}" |
102 |
|
103 |
export PROGLDFLAGS=$(use static && echo -static) |
104 |
export DEBUG=$(usev debug) |
105 |
export MKPAM=$(use static || usev pam) |
106 |
export MKTERMCAP=$(usev ncurses) |
107 |
|
108 |
if use pam && use static ; then |
109 |
ewarn "OpenRC cannot be built statically with PAM support," |
110 |
ewarn "so PAM support has been disabled." |
111 |
fi |
112 |
} |
113 |
|
114 |
src_unpack() { |
115 |
unpack ${A} |
116 |
cd "${S}" |
117 |
|
118 |
epatch "${FILESDIR}"/${PN}-0.2-freebsd-install-rc.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 |
pkg_preinst() { |
157 |
# default net script is just comments, so no point in biting people |
158 |
# in the ass by accident |
159 |
[[ -e ${ROOT}/etc/conf.d/net ]] && rm -f "${D}"/etc/conf.d/net |
160 |
|
161 |
# /etc/conf.d/clock moved to /etc/conf.d/hwclock |
162 |
local clock |
163 |
use kernel_FreeBSD && clock="adjkerntz" || clock="hwclock" |
164 |
if [[ -e ${ROOT}/etc/conf.d/clock ]] ; then |
165 |
mv "${ROOT}"/etc/conf.d/clock "${ROOT}"/etc/conf.d/${clock} |
166 |
fi |
167 |
if [[ -L ${ROOT}/etc/runlevels/boot/clock ]] ; then |
168 |
rm -f "${ROOT}"/etc/runlevels/boot/clock |
169 |
ln -snf /etc/init.d/${clock} "${ROOT}"/etc/runlevels/boot/${clock} |
170 |
fi |
171 |
if [[ -L ${ROOT}${LIBDIR}/rc/init.d/started/clock ]] ; then |
172 |
rm -f "${ROOT}${LIBDIR}"/rc/init.d/started/clock |
173 |
ln -snf /etc/init.d/${clock} "${ROOT}${LIBDIR}"/rc/init.d/started/${clock} |
174 |
fi |
175 |
|
176 |
# /etc/conf.d/rc is no longer used for configuration |
177 |
if [[ -e ${ROOT}/etc/conf.d/rc ]] ; then |
178 |
elog "/etc/conf.d/rc is no longer used for configuration." |
179 |
elog "Please migrate your settings and delete it." |
180 |
fi |
181 |
|
182 |
# upgrade timezone file |
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 |
# skip remaining migration if we already have openrc installed |
191 |
has_version sys-apps/openrc && return 0 |
192 |
|
193 |
# baselayout boot init scripts have been split out |
194 |
local x |
195 |
for x in $(cd "${D}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do |
196 |
[[ -e ${ROOT}/etc/runlevels/boot/${x} ]] && continue |
197 |
elog "Auto-adding '${x}' service to your boot runlevel" |
198 |
ln -snf /etc/init.d/${x} "${ROOT}"/etc/runlevels/boot/${x} |
199 |
done |
200 |
|
201 |
# Upgrade out state for baselayout-1 users |
202 |
if [[ ! -e ${ROOT}${LIBDIR}/rc/init.d/started ]] ; then |
203 |
( |
204 |
[[ -e ${ROOT}/etc/conf.d/rc ]] && source "${ROOT}"/etc/conf.d/rc |
205 |
svcdir=${svcdir:-/var/lib/init.d} |
206 |
if [[ ! -d ${ROOT}${svcdir}/started ]] ; then |
207 |
ewarn "No state found, and no state exists" |
208 |
elog "You should reboot this host" |
209 |
else |
210 |
mkdir -p "${ROOT}${LIBDIR}/rc/init.d" |
211 |
einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}${LIBDIR}/rc/init.d" |
212 |
mv "${ROOT}${svcdir}"/* "${ROOT}${LIBDIR}"/rc/init.d |
213 |
rm -rf "${ROOT}${LIBDIR}"/rc/init.d/daemons \ |
214 |
"${ROOT}${LIBDIR}"/rc/init.d/console |
215 |
umount "${ROOT}${svcdir}" 2>/dev/null |
216 |
rm -rf "${ROOT}${svcdir}" |
217 |
fi |
218 |
) |
219 |
fi |
220 |
|
221 |
# Handle the /etc/modules.autoload.d -> /etc/conf.d/modules transition |
222 |
if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then |
223 |
elog "Converting your /etc/modules.autoload.d/ files to /etc/conf.d/modules" |
224 |
rm -f "${ROOT}"/etc/modules.autoload.d/.keep* |
225 |
rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null |
226 |
if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then |
227 |
local f v |
228 |
for f in "${ROOT}"/etc/modules.autoload.d/* ; do |
229 |
v=${f##*/} |
230 |
v=${v#kernel-} |
231 |
v=${v//[^[:alnum:]]/_} |
232 |
gawk -v v="${v}" -v f="${f##*/}" ' |
233 |
BEGIN { print "\n### START: Auto-converted from " f "\n" } |
234 |
{ |
235 |
if ($0 ~ /^[^#]/) { |
236 |
print "modules_" v "=\"${modules_" v "} " $1 "\"" |
237 |
gsub(/[^[:alnum:]]/, "_", $1) |
238 |
printf "module_" $1 "_args_" v "=\"" |
239 |
for (i = 2; i <= NF; ++i) { |
240 |
if (i > 2) |
241 |
printf " " |
242 |
printf $i |
243 |
} |
244 |
print "\"\n" |
245 |
} else |
246 |
print |
247 |
} |
248 |
END { print "\n### END: Auto-converted from " f "\n" } |
249 |
' "${f}" >> "${D}"/etc/conf.d/modules |
250 |
done |
251 |
rm -f "${f}" |
252 |
rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null |
253 |
fi |
254 |
fi |
255 |
} |
256 |
|
257 |
pkg_postinst() { |
258 |
# Remove old baselayout links |
259 |
rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin} |
260 |
|
261 |
# Make our runlevels if they don't exist |
262 |
if [[ ! -e ${ROOT}/etc/runlevels ]] ; then |
263 |
einfo "Copying across default runlevels" |
264 |
cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc |
265 |
fi |
266 |
|
267 |
if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then |
268 |
ewarn "/etc/modules.autoload.d is no longer used. Please convert" |
269 |
ewarn "your files to /etc/conf.d/modules and delete the directory." |
270 |
fi |
271 |
|
272 |
elog "You should now update all files in /etc, using etc-update" |
273 |
elog "or equivalent before restarting any services or this host." |
274 |
} |
275 |
|
276 |
|
277 |
|
278 |
-- |
279 |
gentoo-commits@l.g.o mailing list |