summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/busybox/busybox-1.00-r4.ebuild84
-rw-r--r--sys-apps/busybox/files/1.00/bb.patch6
2 files changed, 45 insertions, 45 deletions
diff --git a/sys-apps/busybox/busybox-1.00-r4.ebuild b/sys-apps/busybox/busybox-1.00-r4.ebuild
index 60b762407b4d..1062207661ad 100644
--- a/sys-apps/busybox/busybox-1.00-r4.ebuild
+++ b/sys-apps/busybox/busybox-1.00-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.00-r4.ebuild,v 1.1 2005/05/17 01:02:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.00-r4.ebuild,v 1.2 2005/05/17 02:13:32 vapier Exp $
inherit eutils
@@ -31,11 +31,14 @@ S=${WORKDIR}/${MY_P}
# adding a dep: selinux? ( sys-libs/libselinux )
busybox_config_option() {
- [[ -z $2 ]] && return 1
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;;
- *) return 1;;
+ *) use $1 \
+ && busybox_config_option y $2 \
+ || busybox_config_option n $2
+ return 0
+ ;;
esac
einfo $(grep "CONFIG_$2[= ]" .config)
}
@@ -43,7 +46,6 @@ busybox_config_option() {
src_unpack() {
unpack ${A}
cd "${S}"
-cp -r "${S}"{,.orig}
# patches for 1.00 go here.
epatch "${FILESDIR}"/1.00/busybox-read-timeout.patch
@@ -55,6 +57,7 @@ cp -r "${S}"{,.orig}
epatch "${FILESDIR}"/1.00/nice.patch
epatch "${FILESDIR}"/1.00/printenv.patch
epatch "${FILESDIR}"/1.00/sum.patch
+ epatch "${FILESDIR}"/1.00/bb.patch
epatch "${WORKDIR}"/${P}-e2fsprogs.patch
# Don't let KBUILD_OUTPUT mess us up #88088
@@ -86,51 +89,42 @@ cp -r "${S}"{,.orig}
fi
fi
if use netboot ; then
- cp ${FILESDIR}/config-netboot .config
+ cp "${FILESDIR}"/config-netboot .config
sed -i \
-e '/DEFAULT_SCRIPT/s:/share/udhcpc/default.script:/lib/udhcpc.script:' \
networking/udhcp/libbb_udhcp.h \
|| die "fixing netboot/udhcpc"
elif use floppyboot ; then
- cp ${FILESDIR}/config-floppyboot .config
+ cp "${FILESDIR}"/config-floppyboot .config
fi
- # busybox has changed quite a bit from 0.[5-6]* to 1.x so this
- # config might not be cd ready.
-
+ # setup the config file
make allyesconfig > /dev/null
busybox_config_option n DMALLOC
- busybox_config_option n FEATURE_SUID
+ busybox_config_option n FEATURE_SUID_CONFIG
# 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
- use static \
- && busybox_config_option y STATIC \
- || busybox_config_option n STATIC
-
- # 1.00-pre2 uses the old selinux api which is no longer
- # maintained. perhaps the next stable release will include
- # support.
- # 1.00-pre5 pebenito says busybox is still using the old se api.
- #use selinux \
- # && busybox_config_option y SELINUX \
- # ||
+ busybox_config_option static STATIC
+ busybox_config_option debug DEBUG
+
+ # 1.00-pre5 uses the old selinux api which is no longer maintained
+ #busybox_config_option selinux SELINUX
busybox_config_option n SELINUX
- use debug \
- && busybox_config_option y DEBUG \
- || busybox_config_option n DEBUG
-
- #busybox_features=`grep CONFIG_ .config | tr '#' '\n' |
- # awk '{print $1}' | cut -d = -f 1 | grep -v ^$ | cut -c 8- |
- # tr [A-Z] [a-z] | awk '{print "busybox_"$1}'`
- #for f in $busybox_features; do
- # has $f ${FEATURES} && busybox_config_option y `echo ${f/busybox_/}|tr [a-z] [A-Z]`
- #done
- ( echo | make clean oldconfig > /dev/null ) || :
+ # default a bunch of uncommon options to off
+ for opt in FEATURE_INSTALLER LOCALE_SUPPORT FEATURE_CLEAN_UP TFTP TELNETD \
+ HTTPD FTPGET FTPPUT IPCALC TFTP UDHCPD HUSH LASH MSH SYSLOGD \
+ LOGGER INETD DPKG RPM2CPIO RPM FOLD INSTALL LOGNAME OD CRONTAB \
+ UUDECODE UUENCODE RUN_PARTS LOGIN SULOGIN CROND DC WATCHDOG
+ do
+ busybox_config_option n ${opt}
+ done
+
+ make oldconfig > /dev/null
}
busybox_set_cross_compiler() {
@@ -141,12 +135,11 @@ src_compile() {
busybox_set_cross_compiler
#emake -j1 CROSS="${CROSS}" include/config.h busybox || die
emake -j1 CROSS="${CROSS}" busybox || die
- if ! use static; then
- cp busybox{,.dyn}
- rm busybox
+ if ! use static ; then
+ mv busybox{,.bak}
emake -j1 LDFLAGS="${LDFLAGS} -static" CROSS="${CROSS}" busybox 2>/dev/null || die
- cp busybox{,.static}
- cp busybox{.dyn,}
+ mv busybox bb
+ mv busybox{.bak,}
fi
}
@@ -155,11 +148,12 @@ src_install() {
into /
dobin busybox
- use static || dobin busybox.static
+ use static \
+ || dobin bb \
+ || dosym busybox /bin/bb
if use make-symlinks ; then
- if [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ;
- then
+ if [[ ! ${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."
@@ -168,10 +162,10 @@ src_install() {
fi
make CROSS="${CROSS}" install || die
dodir /bin
- cp -a _install/bin/* ${D}/bin/
+ cp -a _install/bin/* "${D}"/bin/
dodir /sbin
- cp -a _install/sbin/* ${D}/sbin/
- cd ${D}
+ cp -a _install/sbin/* "${D}"/sbin/
+ cd "${D}"
local symlink
for symlink in {bin,sbin}/* ; do
[[ -L ${symlink} ]] || continue
@@ -204,7 +198,7 @@ src_install() {
cd ../../ || die
if has buildpkg ${FEATURES} && has keepwork ${FEATURES} ; then
- cd ${S}
+ cd "${S}"
# this should install to the ./_install/ dir by default.
# we make a micro pkg of busybox that can be used for
# embedded systems -solar
@@ -220,7 +214,7 @@ src_install() {
einfo "Saving this build config to /etc/${PN}/${CHOST}/${PN}-${PV}-${PR}.config"
einfo "Read this ebuild for more info on how to take advantage of this option"
insinto /etc/${PN}/${CHOST}/
- newins ${S}/.config ${PN}-${PV}-${PR}.config
+ newins "${S}"/.config ${PN}-${PV}-${PR}.config
fi
}
diff --git a/sys-apps/busybox/files/1.00/bb.patch b/sys-apps/busybox/files/1.00/bb.patch
new file mode 100644
index 000000000000..61e5f16f6a1a
--- /dev/null
+++ b/sys-apps/busybox/files/1.00/bb.patch
@@ -0,0 +1,6 @@
+--- include/applets.h
++++ include/applets.h
+@@ -78,2 +78,3 @@
+ #endif
++ APPLET_NOUSAGE("bb", ash_main, _BB_DIR_BIN, _BB_SUID_NEVER)
+ #ifdef CONFIG_BUNZIP2