summaryrefslogtreecommitdiff
path: root/packages/busybox
diff options
context:
space:
mode:
Diffstat (limited to 'packages/busybox')
-rw-r--r--packages/busybox/busybox-1.9.1/defconfig40
-rw-r--r--packages/busybox/busybox.inc127
-rw-r--r--packages/busybox/busybox_1.9.1.bb90
3 files changed, 132 insertions, 125 deletions
diff --git a/packages/busybox/busybox-1.9.1/defconfig b/packages/busybox/busybox-1.9.1/defconfig
index 61865cb4c5..770ef6eb12 100644
--- a/packages/busybox/busybox-1.9.1/defconfig
+++ b/packages/busybox/busybox-1.9.1/defconfig
@@ -300,7 +300,7 @@ CONFIG_WHICH=y
#
CONFIG_AWK=y
CONFIG_FEATURE_AWK_MATH=y
-# CONFIG_CMP is not set
+CONFIG_CMP=y
CONFIG_DIFF=y
CONFIG_FEATURE_DIFF_BINARY=y
CONFIG_FEATURE_DIFF_DIR=y
@@ -378,30 +378,30 @@ CONFIG_XARGS=y
# CONFIG_FEATURE_SHADOWPASSWDS is not set
# CONFIG_USE_BB_SHADOW is not set
# CONFIG_USE_BB_PWD_GRP is not set
-CONFIG_ADDGROUP=y
-CONFIG_FEATURE_ADDUSER_TO_GROUP=y
-CONFIG_DELGROUP=y
-CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
-CONFIG_ADDUSER=y
-CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
-CONFIG_DELUSER=y
-CONFIG_GETTY=y
-CONFIG_FEATURE_UTMP=y
-CONFIG_FEATURE_WTMP=y
-CONFIG_LOGIN=y
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+# CONFIG_FEATURE_UTMP is not set
+# CONFIG_FEATURE_WTMP is not set
+# CONFIG_LOGIN is not set
# CONFIG_PAM is not set
# CONFIG_LOGIN_SCRIPTS is not set
-CONFIG_FEATURE_NOLOGIN=y
-CONFIG_FEATURE_SECURETTY=y
-CONFIG_PASSWD=y
-CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
+# CONFIG_FEATURE_NOLOGIN is not set
+# CONFIG_FEATURE_SECURETTY is not set
+# CONFIG_PASSWD is not set
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
# CONFIG_CRYPTPW is not set
# CONFIG_CHPASSWD is not set
-CONFIG_SU=y
-CONFIG_FEATURE_SU_SYSLOG=y
-CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+# CONFIG_SU is not set
+# CONFIG_FEATURE_SU_SYSLOG is not set
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
# CONFIG_SULOGIN is not set
-CONFIG_VLOCK=y
+# CONFIG_VLOCK is not set
#
# Linux Ext2 FS Progs
diff --git a/packages/busybox/busybox.inc b/packages/busybox/busybox.inc
index ab17d96db4..0fb3b5efff 100644
--- a/packages/busybox/busybox.inc
+++ b/packages/busybox/busybox.inc
@@ -11,19 +11,21 @@ LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
- file://busybox-cron \
- file://busybox-httpd \
- file://busybox-udhcpd \
- file://default.script \
- file://dhcp-hostname.patch;patch=1 \
- file://hwclock.sh \
- file://ifupdown-spurious-environ.patch;patch=1 \
- file://mount.busybox \
- file://syslog \
- file://syslog.conf \
- file://udhcpscript.patch;patch=1 \
- file://umount.busybox"
+SRC_URI = "\
+ http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
+ file://busybox-cron \
+ file://busybox-httpd \
+ file://busybox-udhcpd \
+ file://default.script \
+ file://dhcp-hostname.patch;patch=1 \
+ file://hwclock.sh \
+ file://ifupdown-spurious-environ.patch;patch=1 \
+ file://mount.busybox \
+ file://syslog \
+ file://syslog.conf \
+ file://udhcpscript.patch;patch=1 \
+ file://umount.busybox \
+"
SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
@@ -34,7 +36,7 @@ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
-FILES_${PN} += " ${datadir}/udhcpc"
+FILES_${PN} += "${datadir}/udhcpc"
INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
@@ -47,11 +49,73 @@ INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
inherit cml1 update-rc.d
-do_compile () {
- unset CFLAGS
+do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
base_do_compile
}
+do_install () {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ install -d ${D}${sysconfdir}/init.d
+ oe_runmake "PREFIX=${D}" install
+ cp -pPR ${S}/_install/* ${D}/
+
+ # Move everything to /busybox (not supposed to end up in any package)
+ install -d ${D}/busybox
+ ls ${D} -R
+
+ cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
+ # Move the busybox binary back to /bin
+ install -d ${D}${base_bindir}
+ mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
+ # Move back the sh symlink
+ test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
+ # Move crond back to /usr/sbin/crond
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
+ # Move httpd back to /usr/sbin/httpd
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
+ install -d ${D}/srv/www
+ fi
+ if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
+ # Move udhcpd back to /usr/sbin/udhcpd
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
+ # Move hwclock back to /sbin/hwclock
+ install -d ${D}${base_sbindir}
+ mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
+
+ install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
+ # Move dhcpc back to /usr/sbin/udhcpc
+ install -d ${D}${base_sbindir}
+ mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
+
+ install -d ${D}${sysconfdir}/udhcpc.d
+ install -d ${D}${datadir}/udhcpc
+ install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+ install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
+ fi
+
+ install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
+}
+
pkg_postinst_${PN} () {
# If we are not making an image we create links for the utilities that doesn't exist
# so the update-alternatives script will get the utilities it needs
@@ -62,3 +126,34 @@ pkg_postinst_${PN} () {
# This adds the links, remember that this has to work when building an image too, hence the $D
while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
}
+
+pkg_prerm_${PN} () {
+ # This is so you can make busybox commit suicide - removing busybox with no other packages
+ # providing its files, this will make update-alternatives work, but the update-rc.d part
+ # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
+ tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
+ ln -s /bin/busybox $tmpdir/[
+ ln -s /bin/busybox $tmpdir/test
+ ln -s /bin/busybox $tmpdir/head
+ ln -s /bin/busybox $tmpdir/sh
+ ln -s /bin/busybox $tmpdir/basename
+ ln -s /bin/busybox $tmpdir/echo
+ ln -s /bin/busybox $tmpdir/mv
+ ln -s /bin/busybox $tmpdir/ln
+ ln -s /bin/busybox $tmpdir/dirname
+ ln -s /bin/busybox $tmpdir/rm
+ ln -s /bin/busybox $tmpdir/sed
+ ln -s /bin/busybox $tmpdir/sort
+ export PATH=$PATH:$tmpdir
+
+ while read link
+ do
+ case "$link" in
+ /*/*/*) to="../../bin/busybox";;
+ /bin/*) to="busybox";;
+ /*/*) to="../bin/busybox";;
+ esac
+ bn=`basename $link`
+ sh /usr/bin/update-alternatives --remove $bn $to
+ done </etc/busybox.links
+}
diff --git a/packages/busybox/busybox_1.9.1.bb b/packages/busybox/busybox_1.9.1.bb
index 3f8184fcc0..cec4af8d59 100644
--- a/packages/busybox/busybox_1.9.1.bb
+++ b/packages/busybox/busybox_1.9.1.bb
@@ -1,5 +1,5 @@
require busybox.inc
-PR = "r2"
+PR = "r4"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
http://busybox.net/downloads/fixes-1.9.1/busybox-1.9.1-lineedit.patch;patch=1 \
@@ -23,91 +23,3 @@ do_configure () {
install -m 0644 ${WORKDIR}/defconfig ${S}/.config
cml1_do_configure
}
-
-do_compile () {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- base_do_compile
-}
-
-do_install () {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- install -d ${D}${sysconfdir}/init.d
- oe_runmake "PREFIX=${D}" install
- cp -pPR ${S}/_install/* ${D}/
-
- # Move everything to /busybox (not supposed to end up in any package)
- install -d ${D}/busybox
- ls ${D} -R
-
- cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
- # Move the busybox binary back to /bin
- install -d ${D}${base_bindir}
- mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
- # Move back the sh symlink
- test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
-
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
- if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
- # Move crond back to /usr/sbin/crond
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
-
- install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
- fi
- if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
- # Move httpd back to /usr/sbin/httpd
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
-
- install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
- install -d ${D}/srv/www
- fi
- if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
- # Move udhcpd back to /usr/sbin/udhcpd
- install -d ${D}${sbindir}
- mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
-
- install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
- fi
- if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
- # Move hwclock back to /sbin/hwclock
- install -d ${D}${base_sbindir}
- mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
-
- install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
- fi
- if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
- # Move dhcpc back to /usr/sbin/udhcpc
- install -d ${D}${base_sbindir}
- mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
-
- install -d ${D}${sysconfdir}/udhcpc.d
- install -d ${D}${datadir}/udhcpc
- install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
- install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
- fi
-
- install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
-}
-
-pkg_prerm_${PN} () {
- # This is so you can make busybox commit suicide - removing busybox with no other packages
- # providing its files, this will make update-alternatives work, but the update-rc.d part
- # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
- tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
- ln -s /bin/busybox $tmpdir/[
- ln -s /bin/busybox $tmpdir/test
- ln -s /bin/busybox $tmpdir/head
- ln -s /bin/busybox $tmpdir/sh
- ln -s /bin/busybox $tmpdir/basename
- ln -s /bin/busybox $tmpdir/echo
- ln -s /bin/busybox $tmpdir/mv
- ln -s /bin/busybox $tmpdir/ln
- ln -s /bin/busybox $tmpdir/dirname
- ln -s /bin/busybox $tmpdir/rm
- ln -s /bin/busybox $tmpdir/sed
- ln -s /bin/busybox $tmpdir/sort
- export PATH=$PATH:$tmpdir
- while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; sh /usr/bin/update-alternatives --remove $bn $to; done </etc/busybox.links
-}