1 |
vapier 08/03/26 15:20:39 |
2 |
|
3 |
Modified: openrc-9999.ebuild openrc-0.2_pre20080326.ebuild |
4 |
Log: |
5 |
merge ebuild differences |
6 |
(Portage version: 2.2_pre5) |
7 |
|
8 |
Revision Changes Path |
9 |
1.11 sys-apps/openrc/openrc-9999.ebuild |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.11&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.11&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?r1=1.10&r2=1.11 |
14 |
|
15 |
Index: openrc-9999.ebuild |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v |
18 |
retrieving revision 1.10 |
19 |
retrieving revision 1.11 |
20 |
diff -u -r1.10 -r1.11 |
21 |
--- openrc-9999.ebuild 25 Mar 2008 12:57:16 -0000 1.10 |
22 |
+++ openrc-9999.ebuild 26 Mar 2008 15:20:38 -0000 1.11 |
23 |
@@ -1,6 +1,6 @@ |
24 |
# Copyright 1999-2008 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.10 2008/03/25 12:57:16 vapier Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.11 2008/03/26 15:20:38 vapier Exp $ |
28 |
|
29 |
inherit eutils flag-o-matic multilib toolchain-funcs |
30 |
|
31 |
@@ -9,7 +9,10 @@ |
32 |
EGIT_BRANCH="Gentoo" |
33 |
inherit git |
34 |
else |
35 |
- SRC_URI="http://roy.marples.name/${PN}/${P}.tar.bz2" |
36 |
+ SRC_URI="http://roy.marples.name/${PN}/${P}.tar.bz2 |
37 |
+ mirror://gentoo/${P}.tar.bz2 |
38 |
+ http://dev.gentoo.org/~cardoe/files/${P}.tar.bz2 |
39 |
+ http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" |
40 |
fi |
41 |
|
42 |
DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
43 |
@@ -35,6 +38,7 @@ |
44 |
[ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}") |
45 |
|
46 |
MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}" |
47 |
+ |
48 |
local brand="Unknown" |
49 |
if use kernel_linux ; then |
50 |
MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
51 |
@@ -69,11 +73,11 @@ |
52 |
|
53 |
tc-export CC AR RANLIB |
54 |
echo emake ${MAKE_ARGS} |
55 |
- emake ${MAKE_ARGS} || die |
56 |
+ emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed" |
57 |
} |
58 |
|
59 |
src_install() { |
60 |
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die |
61 |
+ emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed" |
62 |
gen_usr_ldscript libeinfo.so |
63 |
gen_usr_ldscript librc.so |
64 |
|
65 |
@@ -96,7 +100,18 @@ |
66 |
# in the ass by accident |
67 |
[[ -e ${ROOT}/etc/conf.d/net ]] && rm -f "${D}"/etc/conf.d/net |
68 |
|
69 |
- # everything below here is migration |
70 |
+ # /etc/conf.d/clock moved to /etc/conf.d/hwclock |
71 |
+ if [[ -e ${ROOT}/etc/conf.d/clock ]] ; then |
72 |
+ mv "${ROOT}"/etc/conf.d/clock "${ROOT}"/etc/conf.d/hwclock |
73 |
+ fi |
74 |
+ |
75 |
+ # /etc/conf.d/rc is no longer used for configuration |
76 |
+ if [[ -e ${ROOT}/etc/conf.d/rc ]] ; then |
77 |
+ elog "/etc/conf.d/rc is no longer used for configuration." |
78 |
+ elog "Please migrate your settings and delete it." |
79 |
+ fi |
80 |
+ |
81 |
+ # skip remaining migration if we already have openrc installed |
82 |
has_version sys-apps/openrc && return 0 |
83 |
|
84 |
# upgrade timezone file |
85 |
@@ -124,6 +139,7 @@ |
86 |
ewarn "No state found, and no state exists" |
87 |
elog "You should reboot this host" |
88 |
else |
89 |
+ mkdir -p "${ROOT}${LIBDIR}/rc/init.d" |
90 |
einfo "Moving state from ${ROOT}${svcdir} to ${ROOT}${LIBDIR}/rc/init.d" |
91 |
mv "${ROOT}${svcdir}"/* "${ROOT}${LIBDIR}"/rc/init.d |
92 |
rm -rf "${ROOT}${LIBDIR}"/rc/init.d/daemons \ |
93 |
|
94 |
|
95 |
|
96 |
1.2 sys-apps/openrc/openrc-0.2_pre20080326.ebuild |
97 |
|
98 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild?rev=1.2&view=markup |
99 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild?rev=1.2&content-type=text/plain |
100 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild?r1=1.1&r2=1.2 |
101 |
|
102 |
Index: openrc-0.2_pre20080326.ebuild |
103 |
=================================================================== |
104 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild,v |
105 |
retrieving revision 1.1 |
106 |
retrieving revision 1.2 |
107 |
diff -u -r1.1 -r1.2 |
108 |
--- openrc-0.2_pre20080326.ebuild 26 Mar 2008 14:17:17 -0000 1.1 |
109 |
+++ openrc-0.2_pre20080326.ebuild 26 Mar 2008 15:20:38 -0000 1.2 |
110 |
@@ -1,29 +1,37 @@ |
111 |
# Copyright 1999-2008 Gentoo Foundation |
112 |
# Distributed under the terms of the GNU General Public License v2 |
113 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild,v 1.1 2008/03/26 14:17:17 cardoe Exp $ |
114 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.2_pre20080326.ebuild,v 1.2 2008/03/26 15:20:38 vapier Exp $ |
115 |
|
116 |
inherit eutils flag-o-matic multilib toolchain-funcs |
117 |
|
118 |
+if [[ ${PV} == "9999" ]] ; then |
119 |
+ EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/openrc.git" |
120 |
+ EGIT_BRANCH="Gentoo" |
121 |
+ inherit git |
122 |
+else |
123 |
+ SRC_URI="http://roy.marples.name/${PN}/${P}.tar.bz2 |
124 |
+ mirror://gentoo/${P}.tar.bz2 |
125 |
+ http://dev.gentoo.org/~cardoe/files/${P}.tar.bz2 |
126 |
+ http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" |
127 |
+fi |
128 |
+ |
129 |
DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
130 |
HOMEPAGE="http://roy.marples.name/openrc" |
131 |
-#SRC_URI="http://roy.marples.name/${PN}/${P}.tar.bz2" |
132 |
-SRC_URI="mirror://gentoo/${P}.tar.bz2 |
133 |
- http://dev.gentoo.org/~cardoe/files/${P}.tar.bz2" |
134 |
+ |
135 |
LICENSE="BSD-2" |
136 |
SLOT="0" |
137 |
-#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
138 |
-KEYWORDS="~amd64" |
139 |
+KEYWORDS="~amd64" #"~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
140 |
IUSE="debug ncurses pam static unicode kernel_linux kernel_FreeBSD" |
141 |
|
142 |
RDEPEND="virtual/init |
143 |
- kernel_linux? ( >=sys-apps/module-init-tools-3.2.2-r2 ) |
144 |
- kernel_FreeBSD? ( sys-process/fuser-bsd ) |
145 |
- ncurses? ( sys-libs/ncurses ) |
146 |
- pam? ( virtual/pam ) |
147 |
- >=sys-apps/baselayout-2.0.0 |
148 |
- !<sys-fs/udev-118-r2" |
149 |
-DEPEND="virtual/os-headers |
150 |
- >=sys-apps/baselayout-2.0.0" |
151 |
+ kernel_linux? ( >=sys-apps/module-init-tools-3.2.2-r2 ) |
152 |
+ kernel_FreeBSD? ( sys-process/fuser-bsd ) |
153 |
+ ncurses? ( sys-libs/ncurses ) |
154 |
+ pam? ( virtual/pam ) |
155 |
+ >=sys-apps/baselayout-2.0.0 |
156 |
+ !<sys-fs/udev-118-r2" |
157 |
+DEPEND="${RDEPEND} |
158 |
+ virtual/os-headers" |
159 |
|
160 |
S="${WORKDIR}/${PN}-0.2" |
161 |
|
162 |
@@ -37,40 +45,44 @@ |
163 |
if use kernel_linux ; then |
164 |
MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
165 |
brand="Linux" |
166 |
- elif use kernel_FreeBSD; then |
167 |
+ elif use kernel_FreeBSD ; then |
168 |
MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD SUBOS=BSD" |
169 |
brand="FreeBSD" |
170 |
fi |
171 |
- |
172 |
export BRANDING="Gentoo ${brand}" |
173 |
+ |
174 |
+ export PROGLDFLAGS=$(use static && echo -static) |
175 |
export DEBUG=$(usev debug) |
176 |
- export MKTERMCAP=$(usev ncurses) |
177 |
export MKPAM=$(use static || usev pam) |
178 |
+ export MKTERMCAP=$(usev ncurses) |
179 |
|
180 |
- if use static; then |
181 |
- if use elibc_glibc; then |
182 |
- export PROGLDFLAGS="-Wl,-Bstatic" |
183 |
- else |
184 |
- export PROGLDFLAGS="-static" |
185 |
- fi |
186 |
+ if use pam && use static ; then |
187 |
+ ewarn "OpenRC cannot be built statically with PAM support," |
188 |
+ ewarn "so PAM support has been disabled." |
189 |
fi |
190 |
+} |
191 |
|
192 |
- if use pam && use static; then |
193 |
- ewarn "OpenRC cannot be built statically with PAM" |
194 |
- elog "not building PAM support" |
195 |
+src_compile() { |
196 |
+ # catch people running `ebuild` w/out setup |
197 |
+ if [[ -z ${MAKE_ARGS} ]] ; then |
198 |
+ die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?" |
199 |
fi |
200 |
|
201 |
- MAKE_ARGS="${MAKE_ARGS} CC=$(tc-getCC)" |
202 |
-} |
203 |
+ if [[ ${PV} == "9999" ]] ; then |
204 |
+ local ver="git-$(git --git-dir=${EGIT_STORE_DIR}/${EGIT_PROJECT} rev-parse --verify ${EGIT_BRANCH} | cut -c1-8)" |
205 |
+ sed -i "/^VERSION[[:space:]]*=/s:=.*:=${ver}:" Makefile |
206 |
+ fi |
207 |
|
208 |
-src_compile() { |
209 |
+ tc-export CC AR RANLIB |
210 |
+ echo emake ${MAKE_ARGS} |
211 |
emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed" |
212 |
} |
213 |
|
214 |
src_install() { |
215 |
emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed" |
216 |
+ gen_usr_ldscript libeinfo.so |
217 |
+ gen_usr_ldscript librc.so |
218 |
|
219 |
- # Portage likes to remove our mount points for the state dir |
220 |
keepdir /"${LIBDIR}"/rc/init.d |
221 |
keepdir /"${LIBDIR}"/rc/tmp |
222 |
|
223 |
@@ -81,46 +93,51 @@ |
224 |
# Setup unicode defaults for silly unicode users |
225 |
use unicode && sed -i -e '/^unicode=/s:NO:YES:' "${D}"/etc/rc.conf |
226 |
|
227 |
- # Fix portage bitching |
228 |
- gen_usr_ldscript libeinfo.so |
229 |
- gen_usr_ldscript librc.so |
230 |
+ # Cater to the norm |
231 |
+ (use x86 || use amd64) && sed -i -e '/^windowkeys=/s:NO:YES:' "${D}"/etc/conf.d/keymaps |
232 |
} |
233 |
|
234 |
pkg_preinst() { |
235 |
- # upgrade timezone file |
236 |
- if [ ! -e "${ROOT}"etc/timezone ] ; then |
237 |
- ( |
238 |
- source "${ROOT}"etc/conf.d/clock |
239 |
- [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${ROOT}"etc/timezone |
240 |
- ) |
241 |
- fi |
242 |
+ # default net script is just comments, so no point in biting people |
243 |
+ # in the ass by accident |
244 |
+ [[ -e ${ROOT}/etc/conf.d/net ]] && rm -f "${D}"/etc/conf.d/net |
245 |
|
246 |
# /etc/conf.d/clock moved to /etc/conf.d/hwclock |
247 |
- mv "${ROOT}etc/conf.d/clock" "${ROOT}etc/conf.d/hwclock" |
248 |
+ if [[ -e ${ROOT}/etc/conf.d/clock ]] ; then |
249 |
+ mv "${ROOT}"/etc/conf.d/clock "${ROOT}"/etc/conf.d/hwclock |
250 |
+ fi |
251 |
|
252 |
# /etc/conf.d/rc is no longer used for configuration |
253 |
- rm "${ROOT}etc/conf.d/rc" |
254 |
+ if [[ -e ${ROOT}/etc/conf.d/rc ]] ; then |
255 |
+ elog "/etc/conf.d/rc is no longer used for configuration." |
256 |
+ elog "Please migrate your settings and delete it." |
257 |
+ fi |
258 |
|
259 |
# skip remaining migration if we already have openrc installed |
260 |
has_version sys-apps/openrc && return 0 |
261 |
|
262 |
- # baselayout bootmisc init script has been split out in OpenRC |
263 |
- # so handle upgraders |
264 |
- local x= xtra= |
265 |
- use kernel_linux && xtra="${xtra} mtab procfs sysctl" |
266 |
- use kernel_FreeBSD && xtra="${xtra} dumpon savecore" |
267 |
- for x in fsck root swap ${xtra}; do |
268 |
- [ -e "${ROOT}"etc/runlevels/boot/"${x}" ] && continue |
269 |
- ln -snf /etc/init.d/"${x}" "${ROOT}"etc/runlevels/boot/"${x}" |
270 |
- elog "Auto-adding ${x} service to boot runlevel" |
271 |
+ # upgrade timezone file |
272 |
+ if [[ ! -e ${ROOT}/etc/timezone ]] ; then |
273 |
+ ( |
274 |
+ source "${ROOT}"/etc/conf.d/clock |
275 |
+ [[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${ROOT}"/etc/timezone |
276 |
+ ) |
277 |
+ fi |
278 |
+ |
279 |
+ # baselayout boot init scripts have been split out |
280 |
+ local x |
281 |
+ for x in $(cd "${D}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do |
282 |
+ [[ -e ${ROOT}/etc/runlevels/boot/${x} ]] && continue |
283 |
+ elog "Auto-adding '${x}' service to your boot runlevel" |
284 |
+ ln -snf /etc/init.d/${x} "${ROOT}"/etc/runlevels/boot/${x} |
285 |
done |
286 |
|
287 |
# Upgrade out state for baselayout-1 users |
288 |
- if [ ! -e "${ROOT}${LIBDIR}"/rc/init.d/started ]; then |
289 |
+ if [[ ! -e ${ROOT}${LIBDIR}/rc/init.d/started ]] ; then |
290 |
( |
291 |
- [ -e "${ROOT}"etc/conf.d/rc ] && . "${ROOT}etc/conf.d/rc" |
292 |
+ [[ -e ${ROOT}/etc/conf.d/rc ]] && source "${ROOT}"/etc/conf.d/rc |
293 |
svcdir=${svcdir:-/var/lib/init.d} |
294 |
- if [ ! -d "${ROOT}${svcdir}/started" ]; then |
295 |
+ if [[ ! -d ${ROOT}${svcdir}/started ]] ; then |
296 |
ewarn "No state found, and no state exists" |
297 |
elog "You should reboot this host" |
298 |
else |
299 |
@@ -173,17 +190,17 @@ |
300 |
|
301 |
pkg_postinst() { |
302 |
# Remove old baselayout links |
303 |
- rm -f "${ROOT}"etc/runlevels/boot/{check{fs,root},rmnologin} |
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 |
+ if [[ ! -e ${ROOT}/etc/runlevels ]] ; then |
309 |
einfo "Copying across default runlevels" |
310 |
- cp -RPp "${ROOT}"usr/share/${PN}/runlevels "${ROOT}"/etc |
311 |
+ cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc |
312 |
fi |
313 |
|
314 |
- if [ -d "${ROOT}"etc/modules.autoload.d ]; then |
315 |
- ewarn "${ROOT}etc/modules.autoload.d exists" |
316 |
- ewarn "This has been deprecated in favour of /etc/conf.d/modules" |
317 |
+ if [[ -d ${ROOT}/etc/modules.autoload.d ]] ; then |
318 |
+ ewarn "/etc/modules.autoload.d is no longer used. Please convert" |
319 |
+ ewarn "your files to /etc/conf.d/modules and delete the directory." |
320 |
fi |
321 |
|
322 |
elog "You should now update all files in /etc, using etc-update" |
323 |
|
324 |
|
325 |
|
326 |
-- |
327 |
gentoo-commits@l.g.o mailing list |