1 |
vapier 12/04/30 01:59:09 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: busybox-1.20.0.ebuild busybox-9999.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.9 sys-apps/busybox/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/metadata.xml?rev=1.9&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/metadata.xml?rev=1.9&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/metadata.xml?r1=1.8&r2=1.9 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/metadata.xml,v |
20 |
retrieving revision 1.8 |
21 |
retrieving revision 1.9 |
22 |
diff -u -r1.8 -r1.9 |
23 |
--- metadata.xml 11 Jun 2011 19:54:56 -0000 1.8 |
24 |
+++ metadata.xml 30 Apr 2012 01:59:09 -0000 1.9 |
25 |
@@ -6,5 +6,6 @@ |
26 |
<flag name="make-symlinks">Create all the appropriate symlinks in /bin and /sbin.</flag> |
27 |
<flag name="mdev">Create the appropriate symlink in /sbin and install mdev.conf and support files</flag> |
28 |
<flag name="nfs">Support mounting nfs shares</flag> |
29 |
+<flag name="sep-usr">Support a separate /usr without needing an initramfs by booting with init=/bbinit</flag> |
30 |
</use> |
31 |
</pkgmetadata> |
32 |
|
33 |
|
34 |
|
35 |
1.302 sys-apps/busybox/ChangeLog |
36 |
|
37 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.302&view=markup |
38 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.302&content-type=text/plain |
39 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.301&r2=1.302 |
40 |
|
41 |
Index: ChangeLog |
42 |
=================================================================== |
43 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v |
44 |
retrieving revision 1.301 |
45 |
retrieving revision 1.302 |
46 |
diff -u -r1.301 -r1.302 |
47 |
--- ChangeLog 30 Apr 2012 00:13:13 -0000 1.301 |
48 |
+++ ChangeLog 30 Apr 2012 01:59:09 -0000 1.302 |
49 |
@@ -1,6 +1,15 @@ |
50 |
# ChangeLog for sys-apps/busybox |
51 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
52 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.301 2012/04/30 00:13:13 vapier Exp $ |
53 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.302 2012/04/30 01:59:09 vapier Exp $ |
54 |
+ |
55 |
+*busybox-1.20.0 (30 Apr 2012) |
56 |
+*busybox-9999 (30 Apr 2012) |
57 |
+ |
58 |
+ 30 Apr 2012; Mike Frysinger <vapier@g.o> +busybox-1.20.0.ebuild, |
59 |
+ +busybox-9999.ebuild, +files/busybox-1.20.0-buildsys.patch, |
60 |
+ +files/busybox-1.20.0-getty.patch, +files/busybox-1.20.0-lineedit.patch, |
61 |
+ +files/busybox-1.20.0-sed.patch, +files/ginit.c, metadata.xml: |
62 |
+ Version bump. |
63 |
|
64 |
30 Apr 2012; Mike Frysinger <vapier@g.o> -busybox-1.17.4.ebuild, |
65 |
-busybox-1.18.4.ebuild, -busybox-1.18.5.ebuild, -busybox-1.19.0.ebuild, |
66 |
|
67 |
|
68 |
|
69 |
1.1 sys-apps/busybox/busybox-1.20.0.ebuild |
70 |
|
71 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-1.20.0.ebuild?rev=1.1&view=markup |
72 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-1.20.0.ebuild?rev=1.1&content-type=text/plain |
73 |
|
74 |
Index: busybox-1.20.0.ebuild |
75 |
=================================================================== |
76 |
# Copyright 1999-2012 Gentoo Foundation |
77 |
# Distributed under the terms of the GNU General Public License v2 |
78 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.20.0.ebuild,v 1.1 2012/04/30 01:59:09 vapier Exp $ |
79 |
|
80 |
EAPI="4" |
81 |
inherit eutils flag-o-matic savedconfig toolchain-funcs |
82 |
|
83 |
################################################################################ |
84 |
# BUSYBOX ALTERNATE CONFIG MINI-HOWTO |
85 |
# |
86 |
# Busybox can be modified in many different ways. Here's a few ways to do it: |
87 |
# |
88 |
# (1) Emerge busybox with FEATURES=keepwork so the work directory won't |
89 |
# get erased afterwards. Add a definition like ROOT=/my/root/path to the |
90 |
# start of the line if you're installing to somewhere else than the root |
91 |
# directory. This command will save the default configuration to |
92 |
# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not |
93 |
# defined), and it will tell you that it has done this. Note the location |
94 |
# where the config file was saved. |
95 |
# |
96 |
# FEATURES=keepwork USE=savedconfig emerge busybox |
97 |
# |
98 |
# (2) Go to the work directory and change the configuration of busybox using its |
99 |
# menuconfig feature. |
100 |
# |
101 |
# cd /var/tmp/portage/busybox*/work/busybox-* |
102 |
# make menuconfig |
103 |
# |
104 |
# (3) Save your configuration to the default location and copy it to the |
105 |
# one of the locations listed in /usr/portage/eclass/savedconfig.eclass |
106 |
# |
107 |
# (4) Emerge busybox with USE=savedconfig to use the configuration file you |
108 |
# just generated. |
109 |
# |
110 |
################################################################################ |
111 |
# |
112 |
# (1) Alternatively skip the above steps and simply emerge busybox without |
113 |
# USE=savedconfig. |
114 |
# |
115 |
# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} |
116 |
# |
117 |
# (3) Remerge busybox as using USE=savedconfig. |
118 |
# |
119 |
################################################################################ |
120 |
|
121 |
DESCRIPTION="Utilities for rescue and embedded systems" |
122 |
HOMEPAGE="http://www.busybox.net/" |
123 |
if [[ ${PV} == "9999" ]] ; then |
124 |
MY_P=${PN} |
125 |
EGIT_REPO_URI="git://busybox.net/busybox.git" |
126 |
inherit git-2 |
127 |
else |
128 |
MY_P=${PN}-${PV/_/-} |
129 |
SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2" |
130 |
#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
131 |
fi |
132 |
|
133 |
LICENSE="GPL-2" |
134 |
SLOT="0" |
135 |
IUSE="ipv6 make-symlinks mdev -pam selinux sep-usr static" |
136 |
RESTRICT="test" |
137 |
|
138 |
RDEPEND="selinux? ( sys-libs/libselinux ) |
139 |
pam? ( sys-libs/pam )" |
140 |
DEPEND="${RDEPEND} |
141 |
>=sys-kernel/linux-headers-2.6.39" |
142 |
|
143 |
S=${WORKDIR}/${MY_P} |
144 |
|
145 |
busybox_config_option() { |
146 |
case $1 in |
147 |
y) sed -i -e "s:.*\<CONFIG_$2\>.*set:CONFIG_$2=y:g" .config;; |
148 |
n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; |
149 |
*) use $1 \ |
150 |
&& busybox_config_option y $2 \ |
151 |
|| busybox_config_option n $2 |
152 |
return 0 |
153 |
;; |
154 |
esac |
155 |
einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) |
156 |
} |
157 |
|
158 |
src_prepare() { |
159 |
unset KBUILD_OUTPUT #88088 |
160 |
append-flags -fno-strict-aliasing #310413 |
161 |
use ppc64 && append-flags -mminimal-toc #130943 |
162 |
|
163 |
# patches go here! |
164 |
epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch |
165 |
epatch "${FILESDIR}"/${P}-*.patch |
166 |
cp "${FILESDIR}"/ginit.c init/ || die |
167 |
|
168 |
# flag cleanup |
169 |
sed -i -r \ |
170 |
-e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ |
171 |
Makefile.flags || die |
172 |
#sed -i '/bbsh/s:^//::' include/applets.h |
173 |
sed -i '/^#error Aborting compilation./d' applets/applets.c || die |
174 |
use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile |
175 |
sed -i \ |
176 |
-e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ |
177 |
-e "/^AR\>/s:=.*:= $(tc-getAR):" \ |
178 |
-e "/^CC\>/s:=.*:= $(tc-getCC):" \ |
179 |
-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
180 |
Makefile || die |
181 |
sed -i \ |
182 |
-e 's:-static-libgcc::' \ |
183 |
Makefile.flags || die |
184 |
} |
185 |
|
186 |
src_configure() { |
187 |
# check for a busybox config before making one of our own. |
188 |
# if one exist lets return and use it. |
189 |
|
190 |
restore_config .config |
191 |
if [ -f .config ]; then |
192 |
yes "" | emake -j1 oldconfig > /dev/null |
193 |
return 0 |
194 |
else |
195 |
ewarn "Could not locate user configfile, so we will save a default one" |
196 |
fi |
197 |
|
198 |
# setup the config file |
199 |
emake -j1 allyesconfig > /dev/null |
200 |
# nommu forces a bunch of things off which we want on #387555 |
201 |
busybox_config_option n NOMMU |
202 |
sed -i '/^#/d' .config |
203 |
yes "" | emake -j1 oldconfig >/dev/null |
204 |
|
205 |
# now turn off stuff we really don't want |
206 |
busybox_config_option n DMALLOC |
207 |
busybox_config_option n FEATURE_SUID_CONFIG |
208 |
busybox_config_option n BUILD_AT_ONCE |
209 |
busybox_config_option n BUILD_LIBBUSYBOX |
210 |
busybox_config_option n MONOTONIC_SYSCALL |
211 |
busybox_config_option n WERROR |
212 |
|
213 |
# If these are not set and we are using a uclibc/busybox setup |
214 |
# all calls to system() will fail. |
215 |
busybox_config_option y ASH |
216 |
busybox_config_option n HUSH |
217 |
|
218 |
# disable ipv6 applets |
219 |
if ! use ipv6; then |
220 |
busybox_config_option n FEATURE_IPV6 |
221 |
busybox_config_option n TRACEROUTE6 |
222 |
busybox_config_option n PING6 |
223 |
fi |
224 |
|
225 |
if use static && use pam ; then |
226 |
ewarn "You cannot have USE='static pam'. Assuming static is more important." |
227 |
fi |
228 |
use static \ |
229 |
&& busybox_config_option n PAM \ |
230 |
|| busybox_config_option pam PAM |
231 |
busybox_config_option static STATIC |
232 |
|
233 |
# all the debug options are compiler related, so punt them |
234 |
busybox_config_option n DEBUG |
235 |
busybox_config_option y NO_DEBUG_LIB |
236 |
busybox_config_option n DMALLOC |
237 |
busybox_config_option n EFENCE |
238 |
|
239 |
busybox_config_option selinux SELINUX |
240 |
|
241 |
# this opt only controls mounting with <linux-2.6.23 |
242 |
busybox_config_option n FEATURE_MOUNT_NFS |
243 |
|
244 |
# default a bunch of uncommon options to off |
245 |
local opt |
246 |
for opt in \ |
247 |
ADD_SHELL \ |
248 |
BEEP BOOTCHARTD \ |
249 |
CRONTAB \ |
250 |
DC DEVFSD DNSD DPKG{,_DEB} \ |
251 |
FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ |
252 |
FEATURE_DEVFS \ |
253 |
HOSTID HUSH \ |
254 |
INETD INOTIFYD IPCALC \ |
255 |
LOCALE_SUPPORT LOGNAME LPD \ |
256 |
MAKEMIME MKFS_MINIX MSH \ |
257 |
OD \ |
258 |
RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ |
259 |
SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ |
260 |
TASKSET TCPSVD \ |
261 |
RPM RPM2CPIO \ |
262 |
UDPSVD UUDECODE UUENCODE |
263 |
do |
264 |
busybox_config_option n ${opt} |
265 |
done |
266 |
|
267 |
emake -j1 oldconfig > /dev/null |
268 |
} |
269 |
|
270 |
src_compile() { |
271 |
unset KBUILD_OUTPUT #88088 |
272 |
export SKIP_STRIP=y |
273 |
|
274 |
emake V=1 busybox |
275 |
if ! use static ; then |
276 |
cp .config{,.bak} |
277 |
mv busybox_unstripped{,.bak} |
278 |
use pam && busybox_config_option n PAM |
279 |
emake CONFIG_STATIC=y busybox |
280 |
mv busybox_unstripped bb |
281 |
mv busybox_unstripped{.bak,} |
282 |
mv .config{.bak,} |
283 |
else |
284 |
# keeps src_install simpler |
285 |
ln busybox_unstripped bb |
286 |
fi |
287 |
} |
288 |
|
289 |
src_install() { |
290 |
unset KBUILD_OUTPUT #88088 |
291 |
save_config .config |
292 |
|
293 |
into / |
294 |
dodir /bin |
295 |
if use sep-usr ; then |
296 |
# install /ginit to take care of mounting stuff |
297 |
exeinto / |
298 |
newexe bb ginit |
299 |
dosym /ginit /bin/bb |
300 |
if use static ; then |
301 |
dosym bb /bin/busybox |
302 |
else |
303 |
newbin busybox_unstripped busybox |
304 |
fi |
305 |
else |
306 |
newbin busybox_unstripped busybox |
307 |
if use static ; then |
308 |
dosym busybox /bin/bb |
309 |
else |
310 |
dobin bb |
311 |
fi |
312 |
fi |
313 |
if use mdev ; then |
314 |
dodir /$(get_libdir)/mdev/ |
315 |
use make-symlinks || dosym /bin/bb /sbin/mdev |
316 |
cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf |
317 |
|
318 |
exeinto /$(get_libdir)/mdev/ |
319 |
doexe "${FILESDIR}"/mdev/* |
320 |
|
321 |
newinitd "${FILESDIR}"/mdev.rc.1 mdev |
322 |
fi |
323 |
|
324 |
# bundle up the symlink files for use later |
325 |
emake DESTDIR="${ED}" install |
326 |
rm _install/bin/busybox |
327 |
tar cf busybox-links.tar -C _install . || : #;die |
328 |
insinto /usr/share/${PN} |
329 |
use make-symlinks && doins busybox-links.tar |
330 |
|
331 |
dodoc AUTHORS README TODO |
332 |
|
333 |
cd docs |
334 |
docinto txt |
335 |
dodoc *.txt |
336 |
docinto pod |
337 |
dodoc *.pod |
338 |
dohtml *.html |
339 |
|
340 |
cd ../examples |
341 |
docinto examples |
342 |
dodoc inittab depmod.pl *.conf *.script undeb unrpm |
343 |
} |
344 |
|
345 |
pkg_preinst() { |
346 |
if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
347 |
ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
348 |
ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
349 |
ewarn "If you are creating a binary only and not merging this is probably ok." |
350 |
ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." |
351 |
die "silly options will destroy your system" |
352 |
fi |
353 |
|
354 |
if use make-symlinks ; then |
355 |
mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
356 |
fi |
357 |
} |
358 |
|
359 |
pkg_postinst() { |
360 |
savedconfig_pkg_postinst |
361 |
|
362 |
if use make-symlinks ; then |
363 |
cd "${T}" || die |
364 |
mkdir _install |
365 |
tar xf busybox-links.tar -C _install || die |
366 |
cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
367 |
fi |
368 |
|
369 |
if use sep-usr ; then |
370 |
elog "In order to use the sep-usr support, you have to update your" |
371 |
elog "kernel command line. Add the option:" |
372 |
elog " init=/ginit" |
373 |
elog "To launch a different init than /sbin/init, use:" |
374 |
elog " init=/ginit /sbin/yourinit" |
375 |
elog "To get a rescue shell, you may boot with:" |
376 |
elog " init=/ginit bb" |
377 |
fi |
378 |
} |
379 |
|
380 |
|
381 |
|
382 |
1.1 sys-apps/busybox/busybox-9999.ebuild |
383 |
|
384 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-9999.ebuild?rev=1.1&view=markup |
385 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/busybox-9999.ebuild?rev=1.1&content-type=text/plain |
386 |
|
387 |
Index: busybox-9999.ebuild |
388 |
=================================================================== |
389 |
# Copyright 1999-2012 Gentoo Foundation |
390 |
# Distributed under the terms of the GNU General Public License v2 |
391 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-9999.ebuild,v 1.1 2012/04/30 01:59:09 vapier Exp $ |
392 |
|
393 |
EAPI="4" |
394 |
inherit eutils flag-o-matic savedconfig toolchain-funcs |
395 |
|
396 |
################################################################################ |
397 |
# BUSYBOX ALTERNATE CONFIG MINI-HOWTO |
398 |
# |
399 |
# Busybox can be modified in many different ways. Here's a few ways to do it: |
400 |
# |
401 |
# (1) Emerge busybox with FEATURES=keepwork so the work directory won't |
402 |
# get erased afterwards. Add a definition like ROOT=/my/root/path to the |
403 |
# start of the line if you're installing to somewhere else than the root |
404 |
# directory. This command will save the default configuration to |
405 |
# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not |
406 |
# defined), and it will tell you that it has done this. Note the location |
407 |
# where the config file was saved. |
408 |
# |
409 |
# FEATURES=keepwork USE=savedconfig emerge busybox |
410 |
# |
411 |
# (2) Go to the work directory and change the configuration of busybox using its |
412 |
# menuconfig feature. |
413 |
# |
414 |
# cd /var/tmp/portage/busybox*/work/busybox-* |
415 |
# make menuconfig |
416 |
# |
417 |
# (3) Save your configuration to the default location and copy it to the |
418 |
# one of the locations listed in /usr/portage/eclass/savedconfig.eclass |
419 |
# |
420 |
# (4) Emerge busybox with USE=savedconfig to use the configuration file you |
421 |
# just generated. |
422 |
# |
423 |
################################################################################ |
424 |
# |
425 |
# (1) Alternatively skip the above steps and simply emerge busybox without |
426 |
# USE=savedconfig. |
427 |
# |
428 |
# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} |
429 |
# |
430 |
# (3) Remerge busybox as using USE=savedconfig. |
431 |
# |
432 |
################################################################################ |
433 |
|
434 |
DESCRIPTION="Utilities for rescue and embedded systems" |
435 |
HOMEPAGE="http://www.busybox.net/" |
436 |
if [[ ${PV} == "9999" ]] ; then |
437 |
MY_P=${PN} |
438 |
EGIT_REPO_URI="git://busybox.net/busybox.git" |
439 |
inherit git-2 |
440 |
else |
441 |
MY_P=${PN}-${PV/_/-} |
442 |
SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2" |
443 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" |
444 |
fi |
445 |
|
446 |
LICENSE="GPL-2" |
447 |
SLOT="0" |
448 |
IUSE="ipv6 make-symlinks mdev -pam selinux sep-usr static" |
449 |
RESTRICT="test" |
450 |
|
451 |
RDEPEND="selinux? ( sys-libs/libselinux ) |
452 |
pam? ( sys-libs/pam )" |
453 |
DEPEND="${RDEPEND} |
454 |
>=sys-kernel/linux-headers-2.6.39" |
455 |
|
456 |
S=${WORKDIR}/${MY_P} |
457 |
|
458 |
busybox_config_option() { |
459 |
case $1 in |
460 |
y) sed -i -e "s:.*\<CONFIG_$2\>.*set:CONFIG_$2=y:g" .config;; |
461 |
n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; |
462 |
*) use $1 \ |
463 |
&& busybox_config_option y $2 \ |
464 |
|| busybox_config_option n $2 |
465 |
return 0 |
466 |
;; |
467 |
esac |
468 |
einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) |
469 |
} |
470 |
|
471 |
src_prepare() { |
472 |
unset KBUILD_OUTPUT #88088 |
473 |
append-flags -fno-strict-aliasing #310413 |
474 |
use ppc64 && append-flags -mminimal-toc #130943 |
475 |
|
476 |
# patches go here! |
477 |
epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch |
478 |
epatch "${FILESDIR}"/${P}-*.patch |
479 |
cp "${FILESDIR}"/ginit.c init/ || die |
480 |
|
481 |
# flag cleanup |
482 |
sed -i -r \ |
483 |
-e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ |
484 |
Makefile.flags || die |
485 |
#sed -i '/bbsh/s:^//::' include/applets.h |
486 |
sed -i '/^#error Aborting compilation./d' applets/applets.c || die |
487 |
use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile |
488 |
sed -i \ |
489 |
-e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ |
490 |
-e "/^AR\>/s:=.*:= $(tc-getAR):" \ |
491 |
-e "/^CC\>/s:=.*:= $(tc-getCC):" \ |
492 |
-e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
493 |
Makefile || die |
494 |
sed -i \ |
495 |
-e 's:-static-libgcc::' \ |
496 |
Makefile.flags || die |
497 |
} |
498 |
|
499 |
src_configure() { |
500 |
# check for a busybox config before making one of our own. |
501 |
# if one exist lets return and use it. |
502 |
|
503 |
restore_config .config |
504 |
if [ -f .config ]; then |
505 |
yes "" | emake -j1 oldconfig > /dev/null |
506 |
return 0 |
507 |
else |
508 |
ewarn "Could not locate user configfile, so we will save a default one" |
509 |
fi |
510 |
|
511 |
# setup the config file |
512 |
emake -j1 allyesconfig > /dev/null |
513 |
# nommu forces a bunch of things off which we want on #387555 |
514 |
busybox_config_option n NOMMU |
515 |
sed -i '/^#/d' .config |
516 |
yes "" | emake -j1 oldconfig >/dev/null |
517 |
|
518 |
# now turn off stuff we really don't want |
519 |
busybox_config_option n DMALLOC |
520 |
busybox_config_option n FEATURE_SUID_CONFIG |
521 |
busybox_config_option n BUILD_AT_ONCE |
522 |
busybox_config_option n BUILD_LIBBUSYBOX |
523 |
busybox_config_option n MONOTONIC_SYSCALL |
524 |
busybox_config_option n WERROR |
525 |
|
526 |
# If these are not set and we are using a uclibc/busybox setup |
527 |
# all calls to system() will fail. |
528 |
busybox_config_option y ASH |
529 |
busybox_config_option n HUSH |
530 |
|
531 |
# disable ipv6 applets |
532 |
if ! use ipv6; then |
533 |
busybox_config_option n FEATURE_IPV6 |
534 |
busybox_config_option n TRACEROUTE6 |
535 |
busybox_config_option n PING6 |
536 |
fi |
537 |
|
538 |
if use static && use pam ; then |
539 |
ewarn "You cannot have USE='static pam'. Assuming static is more important." |
540 |
fi |
541 |
use static \ |
542 |
&& busybox_config_option n PAM \ |
543 |
|| busybox_config_option pam PAM |
544 |
busybox_config_option static STATIC |
545 |
|
546 |
# all the debug options are compiler related, so punt them |
547 |
busybox_config_option n DEBUG |
548 |
busybox_config_option y NO_DEBUG_LIB |
549 |
busybox_config_option n DMALLOC |
550 |
busybox_config_option n EFENCE |
551 |
|
552 |
busybox_config_option selinux SELINUX |
553 |
|
554 |
# this opt only controls mounting with <linux-2.6.23 |
555 |
busybox_config_option n FEATURE_MOUNT_NFS |
556 |
|
557 |
# default a bunch of uncommon options to off |
558 |
local opt |
559 |
for opt in \ |
560 |
ADD_SHELL \ |
561 |
BEEP BOOTCHARTD \ |
562 |
CRONTAB \ |
563 |
DC DEVFSD DNSD DPKG{,_DEB} \ |
564 |
FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \ |
565 |
FEATURE_DEVFS \ |
566 |
HOSTID HUSH \ |
567 |
INETD INOTIFYD IPCALC \ |
568 |
LOCALE_SUPPORT LOGNAME LPD \ |
569 |
MAKEMIME MKFS_MINIX MSH \ |
570 |
OD \ |
571 |
RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS RUNSV{,DIR} \ |
572 |
SLATTACH SMEMCAP SULOGIN SV{,LOGD} \ |
573 |
TASKSET TCPSVD \ |
574 |
RPM RPM2CPIO \ |
575 |
UDPSVD UUDECODE UUENCODE |
576 |
do |
577 |
busybox_config_option n ${opt} |
578 |
done |
579 |
|
580 |
emake -j1 oldconfig > /dev/null |
581 |
} |
582 |
|
583 |
src_compile() { |
584 |
unset KBUILD_OUTPUT #88088 |
585 |
export SKIP_STRIP=y |
586 |
|
587 |
emake V=1 busybox |
588 |
if ! use static ; then |
589 |
cp .config{,.bak} |
590 |
mv busybox_unstripped{,.bak} |
591 |
use pam && busybox_config_option n PAM |
592 |
emake CONFIG_STATIC=y busybox |
593 |
mv busybox_unstripped bb |
594 |
mv busybox_unstripped{.bak,} |
595 |
mv .config{.bak,} |
596 |
else |
597 |
# keeps src_install simpler |
598 |
ln busybox_unstripped bb |
599 |
fi |
600 |
} |
601 |
|
602 |
src_install() { |
603 |
unset KBUILD_OUTPUT #88088 |
604 |
save_config .config |
605 |
|
606 |
into / |
607 |
dodir /bin |
608 |
if use sep-usr ; then |
609 |
# install /ginit to take care of mounting stuff |
610 |
exeinto / |
611 |
newexe bb ginit |
612 |
dosym /ginit /bin/bb |
613 |
if use static ; then |
614 |
dosym bb /bin/busybox |
615 |
else |
616 |
newbin busybox_unstripped busybox |
617 |
fi |
618 |
else |
619 |
newbin busybox_unstripped busybox |
620 |
if use static ; then |
621 |
dosym busybox /bin/bb |
622 |
else |
623 |
dobin bb |
624 |
fi |
625 |
fi |
626 |
if use mdev ; then |
627 |
dodir /$(get_libdir)/mdev/ |
628 |
use make-symlinks || dosym /bin/bb /sbin/mdev |
629 |
cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf |
630 |
|
631 |
exeinto /$(get_libdir)/mdev/ |
632 |
doexe "${FILESDIR}"/mdev/* |
633 |
|
634 |
newinitd "${FILESDIR}"/mdev.rc.1 mdev |
635 |
fi |
636 |
|
637 |
# bundle up the symlink files for use later |
638 |
emake DESTDIR="${ED}" install |
639 |
rm _install/bin/busybox |
640 |
tar cf busybox-links.tar -C _install . || : #;die |
641 |
insinto /usr/share/${PN} |
642 |
use make-symlinks && doins busybox-links.tar |
643 |
|
644 |
dodoc AUTHORS README TODO |
645 |
|
646 |
cd docs |
647 |
docinto txt |
648 |
dodoc *.txt |
649 |
docinto pod |
650 |
dodoc *.pod |
651 |
dohtml *.html |
652 |
|
653 |
cd ../examples |
654 |
docinto examples |
655 |
dodoc inittab depmod.pl *.conf *.script undeb unrpm |
656 |
} |
657 |
|
658 |
pkg_preinst() { |
659 |
if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
660 |
ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
661 |
ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
662 |
ewarn "If you are creating a binary only and not merging this is probably ok." |
663 |
ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is really what you want." |
664 |
die "silly options will destroy your system" |
665 |
fi |
666 |
|
667 |
if use make-symlinks ; then |
668 |
mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
669 |
fi |
670 |
} |
671 |
|
672 |
pkg_postinst() { |
673 |
savedconfig_pkg_postinst |
674 |
|
675 |
if use make-symlinks ; then |
676 |
cd "${T}" || die |
677 |
mkdir _install |
678 |
tar xf busybox-links.tar -C _install || die |
679 |
cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
680 |
fi |
681 |
|
682 |
if use sep-usr ; then |
683 |
elog "In order to use the sep-usr support, you have to update your" |
684 |
elog "kernel command line. Add the option:" |
685 |
elog " init=/ginit" |
686 |
elog "To launch a different init than /sbin/init, use:" |
687 |
elog " init=/ginit /sbin/yourinit" |
688 |
elog "To get a rescue shell, you may boot with:" |
689 |
elog " init=/ginit bb" |
690 |
fi |
691 |
} |