summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/busybox/ChangeLog11
-rw-r--r--sys-apps/busybox/Manifest42
-rw-r--r--sys-apps/busybox/busybox-1.5.1.ebuild253
-rw-r--r--sys-apps/busybox/busybox-1.6.0.ebuild254
-rw-r--r--sys-apps/busybox/files/busybox-1.6.0-bb.patch21
-rw-r--r--sys-apps/busybox/files/busybox-1.6.0-echo.patch11
-rw-r--r--sys-apps/busybox/files/busybox-1.6.0-hushdep.patch32
-rw-r--r--sys-apps/busybox/files/digest-busybox-1.5.13
-rw-r--r--sys-apps/busybox/files/digest-busybox-1.6.03
9 files changed, 622 insertions, 8 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog
index 12a9418aea37..753c890bea66 100644
--- a/sys-apps/busybox/ChangeLog
+++ b/sys-apps/busybox/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-apps/busybox
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.143 2007/05/18 10:16:52 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.144 2007/06/11 04:14:51 vapier Exp $
+
+*busybox-1.6.0 (11 Jun 2007)
+*busybox-1.5.1 (11 Jun 2007)
+
+ 11 Jun 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/busybox-1.6.0-bb.patch, +files/busybox-1.6.0-echo.patch,
+ +files/busybox-1.6.0-hushdep.patch, +busybox-1.5.1.ebuild,
+ +busybox-1.6.0.ebuild:
+ Version bumps #180226.
18 May 2007; Bryan Østergaard <kloeri@gentoo.org> busybox-1.4.2.ebuild:
Stable on Alpha, bug 169830.
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
index 0fbdacb88ee6..b9f0d338efc7 100644
--- a/sys-apps/busybox/Manifest
+++ b/sys-apps/busybox/Manifest
@@ -21,6 +21,18 @@ AUX 1.5.0/bb.patch 840 RMD160 b581f42a5bae2c12e0c2650c60ed20e95edc21a8 SHA1 128e
MD5 480266122cbcbc64ec90a80da7b7525c files/1.5.0/bb.patch 840
RMD160 b581f42a5bae2c12e0c2650c60ed20e95edc21a8 files/1.5.0/bb.patch 840
SHA256 6562015b4b9b1bdee2be221ade6805fdbbf778d5ae830683a29f34387af38e70 files/1.5.0/bb.patch 840
+AUX busybox-1.6.0-bb.patch 884 RMD160 1d54d5164ec5ee1b8f4f5ec293c3d703540087f7 SHA1 ba7d13fa71156bda401d6a380bd104cf9bd1b810 SHA256 ca11368825cec4379f0f4f748f29cc1c341833ddccfbf6bb5ed1e7ed9c8ab130
+MD5 008186e1fd3b1b736f0eb9015d0b4672 files/busybox-1.6.0-bb.patch 884
+RMD160 1d54d5164ec5ee1b8f4f5ec293c3d703540087f7 files/busybox-1.6.0-bb.patch 884
+SHA256 ca11368825cec4379f0f4f748f29cc1c341833ddccfbf6bb5ed1e7ed9c8ab130 files/busybox-1.6.0-bb.patch 884
+AUX busybox-1.6.0-echo.patch 270 RMD160 48b9556175d43a9de922100714f8060c1e9c47cc SHA1 d3dcaf47351b38813c8c4b4eac3621ec69e99292 SHA256 8c1e94aab9346cc568bad843508b2db6c39a805486ce0dc3f1093d0025c5ff52
+MD5 a6988b238fb8f8f6ccde36f77c6ff205 files/busybox-1.6.0-echo.patch 270
+RMD160 48b9556175d43a9de922100714f8060c1e9c47cc files/busybox-1.6.0-echo.patch 270
+SHA256 8c1e94aab9346cc568bad843508b2db6c39a805486ce0dc3f1093d0025c5ff52 files/busybox-1.6.0-echo.patch 270
+AUX busybox-1.6.0-hushdep.patch 738 RMD160 fe71f80fd3260ab85b2c6a3d758d6b996f76a1f5 SHA1 47d86150c0e53e29b2b967c4a6527f44b21ce5ad SHA256 e9a71597c8cc0efa246538678a35cd5af776d5165afb8e50f9f6d518eb174a0b
+MD5 7b32dda1a741772aa255d2cb2bcae2b6 files/busybox-1.6.0-hushdep.patch 738
+RMD160 fe71f80fd3260ab85b2c6a3d758d6b996f76a1f5 files/busybox-1.6.0-hushdep.patch 738
+SHA256 e9a71597c8cc0efa246538678a35cd5af776d5165afb8e50f9f6d518eb174a0b files/busybox-1.6.0-hushdep.patch 738
AUX mdev-start.sh 2411 RMD160 0513dc2423a62d2728cd04ef01172906a79f4d01 SHA1 52efb662fc0726c18da0964adf1d80571766ce01 SHA256 33f45f6f09ee28f623b4cc0dcc1e60743141d9a969c04b9566ac3d0687cb670a
MD5 6d6f6aec47ea4f757d4836a57d2d66d5 files/mdev-start.sh 2411
RMD160 0513dc2423a62d2728cd04ef01172906a79f4d01 files/mdev-start.sh 2411
@@ -28,6 +40,8 @@ SHA256 33f45f6f09ee28f623b4cc0dcc1e60743141d9a969c04b9566ac3d0687cb670a files/md
DIST busybox-1.4.1.tar.bz2 1510432 RMD160 6ea5461718fae52b9ee3b966e49a226a0685fd28 SHA1 e349e3585448ba0f7c28504326301ea130eb2e35 SHA256 2936318008322392716a9d3566bcff071cf5c97cb1df1f5953ec5b5a8a1701bb
DIST busybox-1.4.2.tar.bz2 1509690 RMD160 222c2f2bcabeba45b8233981c8071fe4f4d62bf3 SHA1 d654727c62f324ab13295095c219451b969beb87 SHA256 da1a9b1c9e210e3e129ab8a3b4e6af2fe093673e3f60722931e2c722d4c29b0f
DIST busybox-1.5.0.tar.bz2 1550138 RMD160 e42100fcd35856a907db983b284a37c650425185 SHA1 3968b6816b44d5ffcfd7a2feee2eb84680c801e4 SHA256 e71a5e19d3beb6139012558c8b25966b308e425ae999bd0d2a105d9bcdb37b5c
+DIST busybox-1.5.1.tar.bz2 1549430 RMD160 81ba96b794db313cacc68a29ba19d6a18e5b6707 SHA1 474a45d626735ec8e04ec31fd353a8ceb2984f3c SHA256 b47c8c9f047cec4ee42559509909df8f910597539fdfb4b2de05404c3092337f
+DIST busybox-1.6.0.tar.bz2 1689981 RMD160 56ee3ebefa5f2c6bfad84375b3f7f0752d31fcbe SHA1 bce33a204a943bf7438e1fdb8d8a28e8d99e9c81 SHA256 338cb3b77671f1dcec01079e8aad0084e05bb76e21b095274b5bea5d91b5a57d
EBUILD busybox-1.4.1-r2.ebuild 7983 RMD160 cfc2f334a4556e12ab5c48ea640ab90b244cb1e6 SHA1 a837e7e86623c4b4f0f83cada7c1e0d76b6d83ee SHA256 463f33d9a6dea60534ef49ef5ee160fcf5c229762187a1debfba4713a92dde55
MD5 10c2b8f2efcc91ec67fb1be5082f2641 busybox-1.4.1-r2.ebuild 7983
RMD160 cfc2f334a4556e12ab5c48ea640ab90b244cb1e6 busybox-1.4.1-r2.ebuild 7983
@@ -40,10 +54,18 @@ EBUILD busybox-1.5.0.ebuild 7869 RMD160 ade0109492802ce5ad9d9507cef12b500ce6c43e
MD5 52dc9c06f07542172f2e84b0e3902f72 busybox-1.5.0.ebuild 7869
RMD160 ade0109492802ce5ad9d9507cef12b500ce6c43e busybox-1.5.0.ebuild 7869
SHA256 f838eae3e30122658da03f2f555097e93225d327aebd3b39f7a1adefbf2b7c6e busybox-1.5.0.ebuild 7869
-MISC ChangeLog 22282 RMD160 a9948dbeffb277ec00ee5b5f2c305c75b8c2f12e SHA1 863c5f771b2f5f995f364efab8a1c2832e09978c SHA256 3232912e30a17a550639a56fb80b6bfb414ecfaeb046e916d18944228e80fd0b
-MD5 fc76c005ebccf01d14401836ea11b240 ChangeLog 22282
-RMD160 a9948dbeffb277ec00ee5b5f2c305c75b8c2f12e ChangeLog 22282
-SHA256 3232912e30a17a550639a56fb80b6bfb414ecfaeb046e916d18944228e80fd0b ChangeLog 22282
+EBUILD busybox-1.5.1.ebuild 7868 RMD160 3313fa7722592dab4286f437e13ffa3411e59b2a SHA1 3fbaa914367232f8018d2f88db732fcd49e1543f SHA256 d0efd9c165bef570e533cf64b226352aea445353130898a84505e8ec95cb9dec
+MD5 0c00cddb8c1185a2ea499d02ecaae4c2 busybox-1.5.1.ebuild 7868
+RMD160 3313fa7722592dab4286f437e13ffa3411e59b2a busybox-1.5.1.ebuild 7868
+SHA256 d0efd9c165bef570e533cf64b226352aea445353130898a84505e8ec95cb9dec busybox-1.5.1.ebuild 7868
+EBUILD busybox-1.6.0.ebuild 7932 RMD160 49f4875d7b869298ea3aad64086623d667ceb622 SHA1 e659f2cc330e5b99b196d9107cdb22312322882a SHA256 3b1e230066131a3037d4e9119ff351b8d02d2aac860c6a815d27a8c13865fc99
+MD5 2a63e969dab99ced5a3f350ad6b9a853 busybox-1.6.0.ebuild 7932
+RMD160 49f4875d7b869298ea3aad64086623d667ceb622 busybox-1.6.0.ebuild 7932
+SHA256 3b1e230066131a3037d4e9119ff351b8d02d2aac860c6a815d27a8c13865fc99 busybox-1.6.0.ebuild 7932
+MISC ChangeLog 22569 RMD160 55815eec4e8682abeaa1f5896ec5a46e63008a0c SHA1 def4afba1638f4bcbba7d279a3b8e58d1f312eb0 SHA256 0687dc038123640363d2e767fac5d8459d1fe7742552dc3ff82568e28624a603
+MD5 028c7fa964c5c18b405f58ac685c6094 ChangeLog 22569
+RMD160 55815eec4e8682abeaa1f5896ec5a46e63008a0c ChangeLog 22569
+SHA256 0687dc038123640363d2e767fac5d8459d1fe7742552dc3ff82568e28624a603 ChangeLog 22569
MISC metadata.xml 161 RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 SHA1 aa4b2873e32de89c0b0aeb26b5782f77cb00948e SHA256 a11fdd02015a232398fdf22a20d26a95fc34d44c54513e6b26b6128d0b76122e
MD5 8ef75eba39772bdd1a8facc7815dbebb metadata.xml 161
RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 metadata.xml 161
@@ -57,10 +79,16 @@ SHA256 404ab986c54ba354af6d6f9ca8ff9c4338372ecad4f3e7019857f8b3f2361863 files/di
MD5 5ca64c848ab0c5589b071839147ba040 files/digest-busybox-1.5.0 247
RMD160 3e96eb155b5d982b705c87761a09b378590b87d5 files/digest-busybox-1.5.0 247
SHA256 07a1d99470a24ffb961a0d1bdd253fc04e90a28f3e76e10b18c0c844ce54f8cd files/digest-busybox-1.5.0 247
+MD5 7ec5a7076635c0db30fd2624152c4e86 files/digest-busybox-1.5.1 247
+RMD160 e8f93e000d3f02cc94bd72b5252031b1d17e6102 files/digest-busybox-1.5.1 247
+SHA256 0c4738d4288bcae2dd248d07644cecfb9feee69ba5a74fb887a26cec883d0ea5 files/digest-busybox-1.5.1 247
+MD5 a46a90f2be2e9e479196132f98e1a808 files/digest-busybox-1.6.0 247
+RMD160 cd8161329dddc28cd1af96b0bf1e3f9a8b81d07d files/digest-busybox-1.6.0 247
+SHA256 229c61c237b33f6b56e83a57fe63ef286c72c5a1417dfce1f6868a636c19e12b files/digest-busybox-1.6.0 247
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)
-iD8DBQFGbMhe8bi6rjpTunYRAoIoAKC3zlVNo0Bg1j8flp72y5ukRS0wpgCeIIVX
-inRswgqzFSXHKfJNZzjopiE=
-=16z7
+iD8DBQFGbMxC8bi6rjpTunYRAljEAKCaFFuoB/h0fxZtK/CKpzLvWc1TUgCfR+4M
+a61uRAPOg20kAGhCj9CJ4tY=
+=MKri
-----END PGP SIGNATURE-----
diff --git a/sys-apps/busybox/busybox-1.5.1.ebuild b/sys-apps/busybox/busybox-1.5.1.ebuild
new file mode 100644
index 000000000000..a0491f70bda5
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.5.1.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.5.1.ebuild,v 1.1 2007/06/11 04:14:51 vapier Exp $
+
+inherit eutils flag-o-matic
+
+################################################################################
+# BUSYBOX ALTERNATE CONFIG MINI-HOWTO
+#
+# Busybox can be modified in many different ways. Here's a few ways to do it:
+#
+# (1) Emerge busybox with FEATURES=keepwork so the work directory won't
+# get erased afterwards. Add a definition like ROOT=/my/root/path to the
+# start of the line if you're installing to somewhere else than the root
+# directory. This command will save the default configuration to
+# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
+# defined), and it will tell you that it has done this. Note the location
+# where the config file was saved.
+#
+# FEATURES=keepwork USE=savedconfig emerge busybox
+#
+# (2) Go to the work directory and change the configuration of busybox using its
+# menuconfig feature.
+#
+# cd /var/tmp/portage/busybox*/work
+# make menuconfig
+#
+#
+# (3) Save your configuration to the default location and copy it to the
+# savedconfig location as follows. Replace X.X.X by the version of
+# busybox, and change the path if you're overriding ${ROOT} or
+# ${PORTAGE_CONFIGROOT}. The file should overwrite the default config
+# file that was written by the ebuild during step 1.
+#
+# cp .config /etc/portage/savedconfig/busybox-X.X.X.config
+#
+# (4) Execute the same command as in step 1 to build the new busybox config;
+# the FEATURES=keepwork option is probably no longer necessary unless you
+# want to modify the configuration further.
+#
+################################################################################
+#
+# (1) Alternatively skip the above steps and simply emerge busybox with
+# USE=savedconfig and edit the file it saves by hand. Then remerge bb as
+# needed.
+#
+################################################################################
+
+
+#SNAPSHOT=20040726
+SNAPSHOT=""
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="http://www.busybox.net/"
+if [[ -n ${SNAPSHOT} ]] ; then
+ MY_P=${PN}
+ SRC_URI="http://www.busybox.net/downloads/snapshots/${PN}-${SNAPSHOT}.tar.bz2"
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug static savedconfig make-symlinks selinux"
+RESTRICT="test"
+
+DEPEND="selinux? ( sys-libs/libselinux )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ case $1 in
+ y) sed -i -e "s:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;;
+ n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
+ *) use $1 \
+ && busybox_config_option y $2 \
+ || busybox_config_option n $2
+ return 0
+ ;;
+ esac
+ einfo $(grep "CONFIG_$2[= ]" .config)
+}
+
+src_unpack() {
+ unset KBUILD_OUTPUT #88088
+
+ unpack ${MY_P}.tar.bz2
+ cd "${S}"
+
+ # patches go here!
+ epatch "${FILESDIR}"/1.5.0/bb.patch
+
+ # work around broken ass powerpc compilers
+ use ppc64 && append-flags -mminimal-toc
+ # flag cleanup
+ sed -i \
+ -e 's:,-Werror,:,,:' \
+ -e 's:-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1::' \
+ -e 's:-fomit-frame-pointer::' \
+ Makefile.flags
+ sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i "/^CFLAGS.*:=/s:$: ${CFLAGS}:" Makefile
+ echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.flags
+
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+ # fine grained config control for user defined busybox configs.
+ # [package]-[version]-[revision].config
+ # [package]-[version].config
+ # [package].config
+
+ if use savedconfig ; then
+ local conf root
+ [[ -r .config ]] && rm .config
+ for conf in {${PF},${P},${PN}}{,-${CHOST}} ; do
+ for root in "${PORTAGE_CONFIGROOT}" "${ROOT}" / ; do
+ configfile=${root}etc/portage/savedconfig/${conf}.config
+ if [[ -r ${configfile} ]] ; then
+ einfo "Found your ${configfile} and using it."
+ cp ${configfile} "${S}"/.config
+ yes "" | make oldconfig > /dev/null
+ return 0
+ fi
+ done
+ done
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ make allyesconfig > /dev/null
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y FEATURE_SH_IS_ASH
+ busybox_config_option n FEATURE_SH_IS_NONE
+
+ busybox_config_option static STATIC
+ busybox_config_option debug DEBUG
+ use debug \
+ && busybox_config_option y NO_DEBUG_LIB \
+ && busybox_config_option n DMALLOC \
+ && busybox_config_option n EFENCE
+
+ busybox_config_option selinux SELINUX
+
+ # default a bunch of uncommon options to off
+ for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
+ LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
+ UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \
+ DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET
+ do
+ busybox_config_option n ${opt}
+ done
+
+ make oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+
+ emake busybox || die "build failed"
+ if ! use static ; then
+ mv busybox_unstripped{,.bak}
+ emake CONFIG_STATIC=y busybox || die "static build failed"
+ mv busybox_unstripped bb
+ mv busybox_unstripped{.bak,}
+ fi
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+
+ into /
+ newbin busybox_unstripped busybox || die
+ use static \
+ && dosym busybox /bin/bb \
+ || dobin bb
+ dosym bb /bin/busybox.static
+
+ insinto /$(get_libdir)/rcscripts/addons
+ doins "${FILESDIR}"/mdev-start.sh || die
+
+ # bundle up the symlink files for use later
+ emake install || die
+ rm _install/bin/busybox
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ doins busybox-links.tar || die
+ newins .config ${PF}.config || die
+
+ dodoc AUTHORS README TODO
+
+ cd docs || die
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html *.sgml
+
+ cd ../examples || die
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+
+ cd bootfloppy || die
+ docinto bootfloppy
+ dodoc * etc/* etc/init.d/* 2>/dev/null
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+ if use savedconfig ; then
+ mv "${D}"/usr/share/${PN}/${PF}.config "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use savedconfig ; then
+ local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig"
+ einfo "Saving this build config to ${config_dir}/${PF}.config"
+ einfo "Read this ebuild for more info on how to take advantage of this option"
+ mkdir -p "${config_dir}"
+ cp "${T}"/${PF}.config "${config_dir}"/${PF}.config
+ return 0
+ fi
+ echo
+ einfo "This ebuild has support for user defined configs"
+ einfo "Please read this ebuild for more details and re-emerge as needed"
+ einfo "if you want to add or remove functionality for ${PN}"
+ echo
+}
diff --git a/sys-apps/busybox/busybox-1.6.0.ebuild b/sys-apps/busybox/busybox-1.6.0.ebuild
new file mode 100644
index 000000000000..e5099dd99df4
--- /dev/null
+++ b/sys-apps/busybox/busybox-1.6.0.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.6.0.ebuild,v 1.1 2007/06/11 04:14:51 vapier Exp $
+
+inherit eutils flag-o-matic
+
+################################################################################
+# BUSYBOX ALTERNATE CONFIG MINI-HOWTO
+#
+# Busybox can be modified in many different ways. Here's a few ways to do it:
+#
+# (1) Emerge busybox with FEATURES=keepwork so the work directory won't
+# get erased afterwards. Add a definition like ROOT=/my/root/path to the
+# start of the line if you're installing to somewhere else than the root
+# directory. This command will save the default configuration to
+# ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
+# defined), and it will tell you that it has done this. Note the location
+# where the config file was saved.
+#
+# FEATURES=keepwork USE=savedconfig emerge busybox
+#
+# (2) Go to the work directory and change the configuration of busybox using its
+# menuconfig feature.
+#
+# cd /var/tmp/portage/busybox*/work
+# make menuconfig
+#
+#
+# (3) Save your configuration to the default location and copy it to the
+# savedconfig location as follows. Replace X.X.X by the version of
+# busybox, and change the path if you're overriding ${ROOT} or
+# ${PORTAGE_CONFIGROOT}. The file should overwrite the default config
+# file that was written by the ebuild during step 1.
+#
+# cp .config /etc/portage/savedconfig/busybox-X.X.X.config
+#
+# (4) Execute the same command as in step 1 to build the new busybox config;
+# the FEATURES=keepwork option is probably no longer necessary unless you
+# want to modify the configuration further.
+#
+################################################################################
+#
+# (1) Alternatively skip the above steps and simply emerge busybox with
+# USE=savedconfig and edit the file it saves by hand. Then remerge bb as
+# needed.
+#
+################################################################################
+
+
+#SNAPSHOT=20040726
+SNAPSHOT=""
+
+DESCRIPTION="Utilities for rescue and embedded systems"
+HOMEPAGE="http://www.busybox.net/"
+if [[ -n ${SNAPSHOT} ]] ; then
+ MY_P=${PN}
+ SRC_URI="http://www.busybox.net/downloads/snapshots/${PN}-${SNAPSHOT}.tar.bz2"
+else
+ MY_P=${PN}-${PV/_/-}
+ SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug static savedconfig make-symlinks selinux"
+RESTRICT="test"
+
+DEPEND="selinux? ( sys-libs/libselinux )"
+
+S=${WORKDIR}/${MY_P}
+
+busybox_config_option() {
+ case $1 in
+ y) sed -i -e "s:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;;
+ n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
+ *) use $1 \
+ && busybox_config_option y $2 \
+ || busybox_config_option n $2
+ return 0
+ ;;
+ esac
+ einfo $(grep "CONFIG_$2[= ]" .config)
+}
+
+src_unpack() {
+ unset KBUILD_OUTPUT #88088
+
+ unpack ${MY_P}.tar.bz2
+ cd "${S}"
+
+ # patches go here!
+ epatch "${FILESDIR}"/busybox-1.6.0-*.patch
+
+ # work around broken ass powerpc compilers
+ use ppc64 && append-flags -mminimal-toc
+ # flag cleanup
+ sed -i \
+ -e 's:,-Werror,:,,:' \
+ -e 's:-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1::' \
+ -e 's:-fomit-frame-pointer::' \
+ Makefile.flags
+ sed -i 's:-Wl,--gc-sections::' Makefile
+ sed -i '/^#error Aborting compilation./d' applets/applets.c
+ sed -i "/^CFLAGS.*:=/s:$: ${CFLAGS}:" Makefile
+ echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.flags
+
+ # check for a busybox config before making one of our own.
+ # if one exist lets return and use it.
+ # fine grained config control for user defined busybox configs.
+ # [package]-[version]-[revision].config
+ # [package]-[version].config
+ # [package].config
+
+ if use savedconfig ; then
+ local conf root
+ [[ -r .config ]] && rm .config
+ for conf in {${PF},${P},${PN}}{,-${CHOST}} ; do
+ for root in "${PORTAGE_CONFIGROOT}" "${ROOT}" / ; do
+ configfile=${root}etc/portage/savedconfig/${conf}.config
+ if [[ -r ${configfile} ]] ; then
+ einfo "Found your ${configfile} and using it."
+ cp ${configfile} "${S}"/.config
+ yes "" | make oldconfig > /dev/null
+ return 0
+ fi
+ done
+ done
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ # setup the config file
+ make allyesconfig > /dev/null
+ busybox_config_option n DMALLOC
+ busybox_config_option n FEATURE_SUID_CONFIG
+ busybox_config_option n BUILD_AT_ONCE
+ busybox_config_option n BUILD_LIBBUSYBOX
+
+ # If these are not set and we are using a uclibc/busybox setup
+ # all calls to system() will fail.
+ busybox_config_option y FEATURE_SH_IS_ASH
+ busybox_config_option n FEATURE_SH_IS_NONE
+
+ busybox_config_option static STATIC
+ busybox_config_option debug DEBUG
+ use debug \
+ && busybox_config_option y NO_DEBUG_LIB \
+ && busybox_config_option n DMALLOC \
+ && busybox_config_option n EFENCE
+
+ busybox_config_option selinux SELINUX
+
+ # default a bunch of uncommon options to off
+ for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
+ LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
+ UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \
+ DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET
+ do
+ busybox_config_option n ${opt}
+ done
+
+ make oldconfig > /dev/null
+}
+
+src_compile() {
+ unset KBUILD_OUTPUT #88088
+
+ emake busybox || die "build failed"
+ if ! use static ; then
+ mv busybox_unstripped{,.bak}
+ emake CONFIG_STATIC=y busybox || die "static build failed"
+ mv busybox_unstripped bb
+ mv busybox_unstripped{.bak,}
+ fi
+}
+
+src_install() {
+ unset KBUILD_OUTPUT #88088
+
+ into /
+ newbin busybox_unstripped busybox || die
+ use static \
+ && dosym busybox /bin/bb \
+ || dobin bb
+ dosym bb /bin/busybox.static
+
+ insinto /$(get_libdir)/rcscripts/addons
+ doins "${FILESDIR}"/mdev-start.sh || die
+
+ # bundle up the symlink files for use later
+ emake install || die
+ rm _install/bin/busybox
+ tar cf busybox-links.tar -C _install . || : #;die
+ insinto /usr/share/${PN}
+ doins busybox-links.tar || die
+ newins .config ${PF}.config || die
+
+ dodoc AUTHORS README TODO
+
+ cd docs || die
+ docinto txt
+ dodoc *.txt
+ docinto pod
+ dodoc *.pod
+ dohtml *.html *.sgml
+
+ cd ../examples || die
+ docinto examples
+ dodoc inittab depmod.pl *.conf *.script undeb unrpm
+
+ cd bootfloppy || die
+ docinto bootfloppy
+ dodoc * etc/* etc/init.d/* 2>/dev/null
+}
+
+pkg_preinst() {
+ if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
+ ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
+ ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
+ ewarn "If you are creating a binary only and not merging this is probably ok."
+ ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
+ die "silly options will destroy your system"
+ fi
+
+ if use make-symlinks ; then
+ mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
+ fi
+ if use savedconfig ; then
+ mv "${D}"/usr/share/${PN}/${PF}.config "${T}"/ || die
+ fi
+}
+
+pkg_postinst() {
+ if use make-symlinks ; then
+ cd "${T}" || die
+ mkdir _install
+ tar xf busybox-links.tar -C _install || die
+ cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
+ fi
+
+ if use savedconfig ; then
+ local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig"
+ einfo "Saving this build config to ${config_dir}/${PF}.config"
+ einfo "Read this ebuild for more info on how to take advantage of this option"
+ mkdir -p "${config_dir}"
+ cp "${T}"/${PF}.config "${config_dir}"/${PF}.config
+ return 0
+ fi
+ echo
+ einfo "This ebuild has support for user defined configs"
+ einfo "Please read this ebuild for more details and re-emerge as needed"
+ einfo "if you want to add or remove functionality for ${PN}"
+ echo
+}
diff --git a/sys-apps/busybox/files/busybox-1.6.0-bb.patch b/sys-apps/busybox/files/busybox-1.6.0-bb.patch
new file mode 100644
index 000000000000..e58d19717658
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.6.0-bb.patch
@@ -0,0 +1,21 @@
+--- include/applets.h
++++ include/applets.h
+@@ -77,6 +77,7 @@
+ USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
+ USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
+ USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
++USE_ASH(APPLET_NOUSAGE(bb, ash, _BB_DIR_BIN, _BB_SUID_NEVER))
+ USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
+ //USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
+ USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+--- shell/ash.c
++++ shell/ash.c
+@@ -6472,6 +6472,8 @@
+ }
+ /* re-exec ourselves with the new arguments */
+ execve(CONFIG_BUSYBOX_EXEC_PATH, argv, envp);
++ execve("/bin/busybox.static",argv,envp);
++ execve("/bin/busybox",argv,envp);
+ /* If they called chroot or otherwise made the binary no longer
+ * executable, fall through */
+ }
diff --git a/sys-apps/busybox/files/busybox-1.6.0-echo.patch b/sys-apps/busybox/files/busybox-1.6.0-echo.patch
new file mode 100644
index 000000000000..74d3c2cacbae
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.6.0-echo.patch
@@ -0,0 +1,11 @@
+--- busybox-1.6.0/coreutils/echo.c Fri Jun 1 13:48:34 2007
++++ busybox-1.6.0-echo/coreutils/echo.c Wed Jun 6 09:49:18 2007
+@@ -33,7 +33,7 @@
+ eflag = '\\',
+ nflag = 1, /* 1 -- print '\n' */
+ };
+- ++argv;
++ arg = ++argv;
+ #else
+ const char *p;
+ char nflag = 1;
diff --git a/sys-apps/busybox/files/busybox-1.6.0-hushdep.patch b/sys-apps/busybox/files/busybox-1.6.0-hushdep.patch
new file mode 100644
index 000000000000..252267f44384
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.6.0-hushdep.patch
@@ -0,0 +1,32 @@
+--- busybox-1.6.0/shell/Config.in Fri Jun 1 13:48:33 2007
++++ busybox-1.6.0-hushdep/shell/Config.in Sun Jun 10 01:02:47 2007
+@@ -179,6 +179,7 @@
+ config HUSH_HELP
+ bool "help builtin"
+ default n
++ depends on HUSH
+ help
+ Enable help builtin in hush. Code size + ~1 kbyte.
+
+@@ -206,18 +207,21 @@
+ config HUSH_TICK
+ bool "Process substitution"
+ default n
++ depends on HUSH
+ help
+ Enable process substitution `command` and $(command) in hush.
+
+ config HUSH_IF
+ bool "Support if/then/elif/else/fi"
+ default n
++ depends on HUSH
+ help
+ Enable if/then/elif/else/fi in hush.
+
+ config HUSH_LOOPS
+ bool "Support for, while and until loops"
+ default n
++ depends on HUSH
+ help
+ Enable for, while and until loops in hush.
+
diff --git a/sys-apps/busybox/files/digest-busybox-1.5.1 b/sys-apps/busybox/files/digest-busybox-1.5.1
new file mode 100644
index 000000000000..c33a26647cc3
--- /dev/null
+++ b/sys-apps/busybox/files/digest-busybox-1.5.1
@@ -0,0 +1,3 @@
+MD5 30df6f796b350fd126c07cff7c33b538 busybox-1.5.1.tar.bz2 1549430
+RMD160 81ba96b794db313cacc68a29ba19d6a18e5b6707 busybox-1.5.1.tar.bz2 1549430
+SHA256 b47c8c9f047cec4ee42559509909df8f910597539fdfb4b2de05404c3092337f busybox-1.5.1.tar.bz2 1549430
diff --git a/sys-apps/busybox/files/digest-busybox-1.6.0 b/sys-apps/busybox/files/digest-busybox-1.6.0
new file mode 100644
index 000000000000..7426fec19e8b
--- /dev/null
+++ b/sys-apps/busybox/files/digest-busybox-1.6.0
@@ -0,0 +1,3 @@
+MD5 b587dd978fed23467b42ef959b6aa449 busybox-1.6.0.tar.bz2 1689981
+RMD160 56ee3ebefa5f2c6bfad84375b3f7f0752d31fcbe busybox-1.6.0.tar.bz2 1689981
+SHA256 338cb3b77671f1dcec01079e8aad0084e05bb76e21b095274b5bea5d91b5a57d busybox-1.6.0.tar.bz2 1689981