# HG changeset patch # User Nathan Phillip Brink # Date 2011-03-27 00:58:48 # Node ID bbf043d99950f7d51f5ffe7cbd9a306d7cddda8b # Parent 3756569ffa85f102d27c5f1c15bcfa7f174e914a sys-apps/busybox: Remove busybox because bug 346953 is fixed in gentoo-x86; thanks vapier! diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest deleted file mode 100644 --- a/sys-apps/busybox/Manifest +++ /dev/null @@ -1,40 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -AUX busybox-1.18.0-bb.patch 918 RMD160 e6a7be911deb07510ddf46b8a4b8b24ef5b1b29a SHA1 f4815f4cd948c300d65e553486c949c780f05752 SHA256 9e713de11f26a07e5a17d7e62eed7a10b163de91331d50541dcc2c037acbcb67 -AUX busybox-1.18.1-bzip2.patch 1215 RMD160 48e7f2554f13aee61b9e529100df024bf8fe2aaf SHA1 2eb3bf3803f997ce5929b6dc174dc0c5574346a2 SHA256 b91ec72c68961454f4b2cd19b2b4e13bf01650050c69f3875a48003f0740615f -AUX busybox-1.18.1-cpio.patch 916 RMD160 fddcc3ee74a745634c3341d792c130bbbead0bf6 SHA1 1a2c0145d05b4c01b046fcd3ec29be3127f8eeb5 SHA256 b97aa58fa5925cd2fa59b178e33eaa86d5e6633c8c4522bc11f384ba60d33eb3 -AUX busybox-1.18.1-hush.patch 8447 RMD160 890c9fc9cc4a47389f5a36e52316e6863791fc60 SHA1 119a025215a70f8e41dcca1e81c93d1894f3679d SHA256 d6a066e2f606559f1cd036e7bcbaf555b1d7df8a924804eca6996bc535e44dbf -AUX busybox-1.18.1-mkswap.patch 504 RMD160 9fbecd5d82ae1d3198acd365e411572bae90dbd3 SHA1 7d5560ca68a5f2f53f573c784929f710b87f5c9d SHA256 8cbf49401fafaf35be70ba414cab0d68c7c88b1d0a6bbb5b00d0dc27621accfa -AUX busybox-1.18.1-warning.patch 913 RMD160 6b688c0561d7d059c7693b24575a103bb9bf978a SHA1 742d459957500551f24be81845b861994bb50c48 SHA256 95df2c2e95c6e0a3a2275d8c9b0958894f4b315666f0407e4f4c9c9dc0b47109 -AUX busybox-1.18.3-buildsys.patch 320 RMD160 5591dc086f5c2d060b0c6e8496df8515ec1dccc8 SHA1 12bd93ead0022a8e80a7d3c40f1f6b166cc3942f SHA256 cb438f0a5c46125387187b4a2389d56f7aa8db5a308aed314f5866cf9a09b72b -AUX busybox-1.18.3-modutils24.patch 949 RMD160 5c7aef4dd8195a6432a8c7e6e865eff1bc73bdd4 SHA1 445c5e662c2bea616b327744d4e9b6b2fd7a645a SHA256 134ed86867784348f484810464df5bc97589e7aa41079c90e35b8d12b9284df8 -AUX busybox-1.18.3-wget.patch 3805 RMD160 e3846336786aa825da96ff9b2cf08829c81482a9 SHA1 cb9227a3d9783e4222fbe2f42cb769c7ff1e14e3 SHA256 22538ebee96f66916104b8143cfd16e21568da4c5a89128b9daa60d83a59120b -AUX mdev-start.sh 2758 RMD160 c177aac4940b177bd857bc98ff2ac031e0489bbc SHA1 5a5b95da36c489cd12820513434a7a17ac3bffd1 SHA256 9904263c8dfe2b8c3e968a9b4245fa0c162a2413110c037cdd797ac3773587d7 -AUX mdev.rc 282 RMD160 6a11e23fbed92acd24088a7885bdc52b9c845fac SHA1 46f1a0494e009332e83b62599842f8213b60ba60 SHA256 e52abbc3399fc85ce1f097e8f12b25a5ca7fe2e3d648bee60c061b547ba39dc5 -AUX mdev/dvbdev 356 RMD160 db7f546ae6e47b59cca9712f1e218cdbc3985c78 SHA1 993c0ab79fa41912f84db95e7dd09aa0965aa8c7 SHA256 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de -AUX mdev/ide_links 440 RMD160 5d133f27d1ab4db5f6f1b5063837b033f47b71ae SHA1 725deaf4c35e46dec89fc35f221c4c52b2542129 SHA256 3fccc9ee437e3dcc8ac73bfe3713334a7156a112fe442e052fff4f26ff0f6a88 -AUX mdev/usbdev 1624 RMD160 a448558f058566223072c993cb4ae52f9aa43da3 SHA1 4d1a7a19e58549416dd3bde4fcf2f584adc4feb7 SHA256 113ecaa722fa1f4e1c76489e2a7b24099778615a5bccd443aa9cbab28c6d05d0 -AUX mdev/usbdisk_link 984 RMD160 9b86d85f5f27f03f894a062c9f00d3583c4db3ae SHA1 690290b25fa1b90f6d9d7b8947a55746920991a4 SHA256 4957f6991e0cb988b263b5276b582f1757deecad19cddebe3c615b381df9f858 -DIST busybox-1.18.1.tar.bz2 2129404 RMD160 fb40d19103945eb1cd785a6041e5545f4055b8f6 SHA1 83b86858599870e46236da8d370d335d48cee77e SHA256 33eb25ea7b20c727c3af769256b21408a1ac1f927ff9f89a1f1e3767c18c9967 -DIST busybox-1.18.3.tar.bz2 2119251 RMD160 b38e5bc8ca9d586dd1528080b6a866ad8719a31a SHA1 4debdbdf8abb7ae54e0c0e2650cb03d957400533 SHA256 83f112ee88b7eb85bea1cac0b1af33f61387a1036f1898c5ecd79813191a619b -EBUILD busybox-1.18.1-r1.ebuild 7841 RMD160 db5fd3766fbf57393957b9f01ea2a992b67ed0eb SHA1 128a5620e0e884450d74b9fefa489c9703c04f4a SHA256 19c172db80528aedc28d1d6e2d0b12c9d6e70764f7a6916ca13a238d824543ed -EBUILD busybox-1.18.3.ebuild 7841 RMD160 db5fd3766fbf57393957b9f01ea2a992b67ed0eb SHA1 128a5620e0e884450d74b9fefa489c9703c04f4a SHA256 19c172db80528aedc28d1d6e2d0b12c9d6e70764f7a6916ca13a238d824543ed -MISC metadata.xml 368 RMD160 2facee7f44b7469c85383961c2dd4338ea6fffcb SHA1 eae78f6b5eb3a21aeae692f9a7420ab536be3739 SHA256 033b1cb2abe759f73b184ce43b5c791454716638090767c2bc70cc52b4ef187f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iQIcBAEBCAAGBQJNjooUAAoJEHQ6UuhrqBBQmDcQAJ951vUJeeSakGWvcv7ZfuE/ -Jm+thF05HtTDoY4NyTUyp3s6qo3ebgjCmzRRV20iryecpa1ark6dwX7k6Hj9aNE3 -ouHnswx2/vGHrKzXIYaYdyxZA85XW+eXUmanaGwqki3PAj7mop5Zfe2w7f/VzwWV -9o+YCc1ICqJx9fzf17liF9tukbY5wdnC/3vuawxSLPWxC5Z1WxiWE7D8UvcxOrev -WgGXbOIkgNNccWG9uOTgNNeC61Z8gKApZK50qZEBddNZRZqajaLIS04TUHV8hj1K -4hxHamk6vRwGYi7wmiZ0kRiRBpmx7I78YsJYh9mBAEXu+7vvTiRrlO1s5Qqti/lD -5YSIiYYeQ6Fsi/4pGVNk9UYMsTXpE1Rmb7hFz2MtKQGWv88o4ROGsYXeVwBaYWkX -CIoz0VviMac4L+hUfBBuAWqtcsVdGjugCuF0qfWig5BnecGVTY2UI8Pmg4SgT/YG -lZL1XfV/HhF7d+4QQcYr0hxJtKm+/CtgueJS5je6j0iJgP1qVrQPRmjdMcUfc2x2 -1JRb3UIV0t3ViEl4EQucHmJENPi5ceZhRbuYEqEniL6N2YVHyRyRAdTyR3Fhzaze -IN0lO8t0jDVHTDhozqQgQ2cKUbdELW7Zg4rmH40+JhEmxgeCcybgaiaPHs96Bma+ -GdcxX8qpkqggh9aubOx9 -=eUOV ------END PGP SIGNATURE----- diff --git a/sys-apps/busybox/busybox-1.18.1-r1.ebuild b/sys-apps/busybox/busybox-1.18.1-r1.ebuild deleted file mode 100644 --- a/sys-apps/busybox/busybox-1.18.1-r1.ebuild +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.18.1.ebuild,v 1.2 2011/01/07 17:30:34 vapier Exp $ - -EAPI=2 -inherit eutils flag-o-matic savedconfig toolchain-funcs - -################################################################################ -# 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/busybox-* -# make menuconfig -# -# (3) Save your configuration to the default location and copy it to the -# one of the locations listed in /usr/portage/eclass/savedconfig.eclass -# -# (4) Emerge busybox with USE=savedconfig to use the configuration file you -# just generated. -# -################################################################################ -# -# (1) Alternatively skip the above steps and simply emerge busybox without -# USE=savedconfig. -# -# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} -# -# (3) Remerge busybox as using USE=savedconfig. -# -################################################################################ - -#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 ipv6 make-symlinks +mdev -pam selinux static elibc_glibc" -RESTRICT="test" - -DEPEND="selinux? ( sys-libs/libselinux ) - pam? ( sys-libs/pam )" - -S=${WORKDIR}/${MY_P} - -busybox_config_option() { - case $1 in - y) sed -i -e "s:.*\.*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 || echo Could not find CONFIG_$2 ...) -} - -src_prepare() { - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - - # patches go here! - epatch "${FILESDIR}"/busybox-1.18.0-bb.patch - epatch "${FILESDIR}"/busybox-${PV}-*.patch - - # flag cleanup - sed -i -r \ - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ - Makefile.flags || die - #sed -i '/bbsh/s:^//::' include/applets.h - sed -i '/^#error Aborting compilation./d' applets/applets.c || die - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - Makefile || die -} - -src_configure() { - # check for a busybox config before making one of our own. - # if one exist lets return and use it. - - restore_config .config - if [ -f .config ]; then - yes "" | emake -j1 oldconfig > /dev/null - return 0 - else - ewarn "Could not locate user configfile, so we will save a default one" - fi - - # setup the config file - emake -j1 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 - busybox_config_option n NOMMU - busybox_config_option n MONOTONIC_SYSCALL - - # If these are not set and we are using a uclibc/busybox setup - # all calls to system() will fail. - busybox_config_option y ASH - busybox_config_option n HUSH - - # disable ipv6 applets - if ! use ipv6; then - busybox_config_option n FEATURE_IPV6 - busybox_config_option n TRACEROUTE6 - busybox_config_option n PING6 - fi - - if use static && use pam ; then - ewarn "You cannot have USE='static pam'. Assuming static is more important." - fi - use static \ - && busybox_config_option n PAM \ - || busybox_config_option pam PAM - 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 - local opt - for opt in \ - CRONTAB \ - DC DEVFSD DNSD DPKG \ - FAKEIDENTD FBSPLASH FOLD FTP{GET,PUT} \ - HOSTID HUSH \ - INETD INOTIFYD IPCALC \ - LASH LOCALE_SUPPORT LOGNAME LPD \ - MSH \ - OD \ - RFKILL \ - SLATTACH SULOGIN \ - TASKSET TCPSVD \ - RPM RPM2CPIO \ - UDPSVD UUDECODE UUENCODE - do - busybox_config_option n ${opt} - done - - emake -j1 oldconfig > /dev/null -} - -src_compile() { - unset KBUILD_OUTPUT #88088 - export SKIP_STRIP=y - - emake busybox || die "build failed" - if ! use static ; then - cp .config{,.bak} - mv busybox_unstripped{,.bak} - use pam && busybox_config_option n PAM - emake CONFIG_STATIC=y busybox || die "static build failed" - mv busybox_unstripped bb - mv busybox_unstripped{.bak,} - mv .config{.bak,} - fi -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - newbin busybox_unstripped busybox || die - if use static ; then - dosym busybox /bin/bb || die - dosym bb /bin/busybox.static || die - else - dobin bb || die - fi - if use mdev ; then - dodir /$(get_libdir)/mdev/ - use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${D}"/etc/mdev.conf - - exeinto /$(get_libdir)/mdev/ - doexe "${FILESDIR}"/mdev/* - - insinto /$(get_libdir)/rcscripts/addons - doins "${FILESDIR}"/mdev-start.sh || die - newinitd "${FILESDIR}"/mdev.rc mdev || die - fi - - # 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 - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm - - cd bootfloppy || die - docinto bootfloppy - dodoc $(find . -type f) -} - -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 -} - -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 - - 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.18.3.ebuild b/sys-apps/busybox/busybox-1.18.3.ebuild deleted file mode 100644 --- a/sys-apps/busybox/busybox-1.18.3.ebuild +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.18.1.ebuild,v 1.2 2011/01/07 17:30:34 vapier Exp $ - -EAPI=2 -inherit eutils flag-o-matic savedconfig toolchain-funcs - -################################################################################ -# 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/busybox-* -# make menuconfig -# -# (3) Save your configuration to the default location and copy it to the -# one of the locations listed in /usr/portage/eclass/savedconfig.eclass -# -# (4) Emerge busybox with USE=savedconfig to use the configuration file you -# just generated. -# -################################################################################ -# -# (1) Alternatively skip the above steps and simply emerge busybox without -# USE=savedconfig. -# -# (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} -# -# (3) Remerge busybox as using USE=savedconfig. -# -################################################################################ - -#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 ipv6 make-symlinks +mdev -pam selinux static elibc_glibc" -RESTRICT="test" - -DEPEND="selinux? ( sys-libs/libselinux ) - pam? ( sys-libs/pam )" - -S=${WORKDIR}/${MY_P} - -busybox_config_option() { - case $1 in - y) sed -i -e "s:.*\.*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 || echo Could not find CONFIG_$2 ...) -} - -src_prepare() { - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - - # patches go here! - epatch "${FILESDIR}"/busybox-1.18.0-bb.patch - epatch "${FILESDIR}"/busybox-${PV}-*.patch - - # flag cleanup - sed -i -r \ - -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ - Makefile.flags || die - #sed -i '/bbsh/s:^//::' include/applets.h - sed -i '/^#error Aborting compilation./d' applets/applets.c || die - use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - Makefile || die -} - -src_configure() { - # check for a busybox config before making one of our own. - # if one exist lets return and use it. - - restore_config .config - if [ -f .config ]; then - yes "" | emake -j1 oldconfig > /dev/null - return 0 - else - ewarn "Could not locate user configfile, so we will save a default one" - fi - - # setup the config file - emake -j1 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 - busybox_config_option n NOMMU - busybox_config_option n MONOTONIC_SYSCALL - - # If these are not set and we are using a uclibc/busybox setup - # all calls to system() will fail. - busybox_config_option y ASH - busybox_config_option n HUSH - - # disable ipv6 applets - if ! use ipv6; then - busybox_config_option n FEATURE_IPV6 - busybox_config_option n TRACEROUTE6 - busybox_config_option n PING6 - fi - - if use static && use pam ; then - ewarn "You cannot have USE='static pam'. Assuming static is more important." - fi - use static \ - && busybox_config_option n PAM \ - || busybox_config_option pam PAM - 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 - local opt - for opt in \ - CRONTAB \ - DC DEVFSD DNSD DPKG \ - FAKEIDENTD FBSPLASH FOLD FTP{GET,PUT} \ - HOSTID HUSH \ - INETD INOTIFYD IPCALC \ - LASH LOCALE_SUPPORT LOGNAME LPD \ - MSH \ - OD \ - RFKILL \ - SLATTACH SULOGIN \ - TASKSET TCPSVD \ - RPM RPM2CPIO \ - UDPSVD UUDECODE UUENCODE - do - busybox_config_option n ${opt} - done - - emake -j1 oldconfig > /dev/null -} - -src_compile() { - unset KBUILD_OUTPUT #88088 - export SKIP_STRIP=y - - emake busybox || die "build failed" - if ! use static ; then - cp .config{,.bak} - mv busybox_unstripped{,.bak} - use pam && busybox_config_option n PAM - emake CONFIG_STATIC=y busybox || die "static build failed" - mv busybox_unstripped bb - mv busybox_unstripped{.bak,} - mv .config{.bak,} - fi -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - newbin busybox_unstripped busybox || die - if use static ; then - dosym busybox /bin/bb || die - dosym bb /bin/busybox.static || die - else - dobin bb || die - fi - if use mdev ; then - dodir /$(get_libdir)/mdev/ - use make-symlinks || dosym /bin/bb /sbin/mdev - cp "${S}"/examples/mdev_fat.conf "${D}"/etc/mdev.conf - - exeinto /$(get_libdir)/mdev/ - doexe "${FILESDIR}"/mdev/* - - insinto /$(get_libdir)/rcscripts/addons - doins "${FILESDIR}"/mdev-start.sh || die - newinitd "${FILESDIR}"/mdev.rc mdev || die - fi - - # 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 - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm - - cd bootfloppy || die - docinto bootfloppy - dodoc $(find . -type f) -} - -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 -} - -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 - - 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.18.0-bb.patch b/sys-apps/busybox/files/busybox-1.18.0-bb.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.0-bb.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/shell/ash.c -+++ b/shell/ash.c -@@ -75,6 +75,8 @@ - //applet:IF_ASH(APPLET(ash, _BB_DIR_BIN, _BB_SUID_DROP)) - //applet:IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_DROP, sh)) - //applet:IF_FEATURE_BASH_IS_ASH(APPLET_ODDNAME(bash, ash, _BB_DIR_BIN, _BB_SUID_DROP, bash)) -+//applet:IF_ASH(APPLET_ODDNAME(bb, ash, _BB_DIR_BIN, _BB_SUID_DROP, ash)) -+//applet:IF_ASH(APPLET_ODDNAME(bbsh, ash, _BB_DIR_BIN, _BB_SUID_DROP, ash)) - - //kbuild:lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o - //kbuild:lib-$(CONFIG_ASH_RANDOM_SUPPORT) += random.o ---- a/shell/ash.c -+++ b/shell/ash.c -@@ -7255,6 +7255,8 @@ - } - /* re-exec ourselves with the new arguments */ - execve(bb_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.18.1-bzip2.patch b/sys-apps/busybox/files/busybox-1.18.1-bzip2.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.1-bzip2.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urpN busybox-1.18.1/archival/bzip2.c busybox-1.18.1-bzip2/archival/bzip2.c ---- busybox-1.18.1/archival/bzip2.c 2010-12-20 01:41:26.000000000 +0100 -+++ busybox-1.18.1-bzip2/archival/bzip2.c 2010-12-30 04:43:11.000000000 +0100 -@@ -128,10 +128,12 @@ IF_DESKTOP(long long) int FAST_FUNC comp - break; - } - --#if ENABLE_FEATURE_CLEAN_UP -+ /* Can't be conditional on ENABLE_FEATURE_CLEAN_UP - -+ * we are called repeatedly -+ */ - BZ2_bzCompressEnd(strm); - free(iobuf); --#endif -+ - return total; - } - -diff -urpN busybox-1.18.1/archival/libarchive/bz/bzlib.c busybox-1.18.1-bzip2/archival/libarchive/bz/bzlib.c ---- busybox-1.18.1/archival/libarchive/bz/bzlib.c 2010-12-20 01:41:26.000000000 +0100 -+++ busybox-1.18.1-bzip2/archival/libarchive/bz/bzlib.c 2010-12-30 04:43:11.000000000 +0100 -@@ -361,7 +361,6 @@ int BZ2_bzCompress(bz_stream *strm, int - - - /*---------------------------------------------------*/ --#if ENABLE_FEATURE_CLEAN_UP - static - void BZ2_bzCompressEnd(bz_stream *strm) - { -@@ -372,9 +371,8 @@ void BZ2_bzCompressEnd(bz_stream *strm) - free(s->arr2); - free(s->ftab); - free(s->crc32table); -- free(strm->state); -+ free(s); - } --#endif - - - /*---------------------------------------------------*/ diff --git a/sys-apps/busybox/files/busybox-1.18.1-cpio.patch b/sys-apps/busybox/files/busybox-1.18.1-cpio.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.1-cpio.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -urpN busybox-1.18.1/archival/cpio.c busybox-1.18.1-cpio/archival/cpio.c ---- busybox-1.18.1/archival/cpio.c 2010-12-20 01:41:26.000000000 +0100 -+++ busybox-1.18.1-cpio/archival/cpio.c 2010-12-26 02:26:38.000000000 +0100 -@@ -308,16 +308,12 @@ int cpio_main(int argc UNUSED_PARAM, cha - /* -L makes sense only with -o or -p */ - - #if !ENABLE_FEATURE_CPIO_O -- /* no parameters */ -- opt_complementary = "=0"; - opt = getopt32(argv, OPTION_STR, &cpio_filename); - argv += optind; - if (opt & CPIO_OPT_FILE) { /* -F */ - xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); - } - #else -- /* _exactly_ one parameter for -p, thus <= 1 param if -p is allowed */ -- opt_complementary = ENABLE_FEATURE_CPIO_P ? "?1" : "=0"; - opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); - argv += optind; - if ((opt & (CPIO_OPT_FILE|CPIO_OPT_CREATE)) == CPIO_OPT_FILE) { /* -F without -o */ diff --git a/sys-apps/busybox/files/busybox-1.18.1-hush.patch b/sys-apps/busybox/files/busybox-1.18.1-hush.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.1-hush.patch +++ /dev/null @@ -1,259 +0,0 @@ -diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c ---- busybox-1.18.1/shell/hush.c 2010-12-21 05:31:04.000000000 +0100 -+++ busybox-1.18.1-hush/shell/hush.c 2011-01-07 14:59:19.649956156 +0100 -@@ -913,7 +913,7 @@ static const struct built_in_command blt - */ - #if HUSH_DEBUG - /* prevent disasters with G.debug_indent < 0 */ --# define indent() fprintf(stderr, "%*s", (G.debug_indent * 2) & 0xff, "") -+# define indent() fdprintf(2, "%*s", (G.debug_indent * 2) & 0xff, "") - # define debug_enter() (G.debug_indent++) - # define debug_leave() (G.debug_indent--) - #else -@@ -923,56 +923,56 @@ static const struct built_in_command blt - #endif - - #ifndef debug_printf --# define debug_printf(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_parse --# define debug_printf_parse(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_parse(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_exec --#define debug_printf_exec(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+#define debug_printf_exec(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_env --# define debug_printf_env(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_env(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_jobs --# define debug_printf_jobs(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_jobs(...) (indent(), fdprintf(2, __VA_ARGS__)) - # define DEBUG_JOBS 1 - #else - # define DEBUG_JOBS 0 - #endif - - #ifndef debug_printf_expand --# define debug_printf_expand(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_expand(...) (indent(), fdprintf(2, __VA_ARGS__)) - # define DEBUG_EXPAND 1 - #else - # define DEBUG_EXPAND 0 - #endif - - #ifndef debug_printf_varexp --# define debug_printf_varexp(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_varexp(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_glob --# define debug_printf_glob(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_glob(...) (indent(), fdprintf(2, __VA_ARGS__)) - # define DEBUG_GLOB 1 - #else - # define DEBUG_GLOB 0 - #endif - - #ifndef debug_printf_list --# define debug_printf_list(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_list(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_subst --# define debug_printf_subst(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_subst(...) (indent(), fdprintf(2, __VA_ARGS__)) - #endif - - #ifndef debug_printf_clean --# define debug_printf_clean(...) (indent(), fprintf(stderr, __VA_ARGS__)) -+# define debug_printf_clean(...) (indent(), fdprintf(2, __VA_ARGS__)) - # define DEBUG_CLEAN 1 - #else - # define DEBUG_CLEAN 0 -@@ -982,9 +982,9 @@ static const struct built_in_command blt - static void debug_print_strings(const char *prefix, char **vv) - { - indent(); -- fprintf(stderr, "%s:\n", prefix); -+ fdprintf(2, "%s:\n", prefix); - while (*vv) -- fprintf(stderr, " '%s'\n", *vv++); -+ fdprintf(2, " '%s'\n", *vv++); - } - #else - # define debug_print_strings(prefix, vv) ((void)0) -@@ -1416,6 +1416,22 @@ static void hush_exit(int exitcode) - builtin_eval(argv); - } - -+#if ENABLE_FEATURE_CLEAN_UP -+ { -+ struct variable *cur_var; -+ if (G.cwd != bb_msg_unknown) -+ free((char*)G.cwd); -+ cur_var = G.top_var; -+ while (cur_var) { -+ struct variable *tmp = cur_var; -+ if (!cur_var->max_len) -+ free(cur_var->varstr); -+ cur_var = cur_var->next; -+ free(tmp); -+ } -+ } -+#endif -+ - #if ENABLE_HUSH_JOB - fflush_all(); - sigexit(- (exitcode & 0xff)); -@@ -2158,22 +2174,22 @@ static void debug_print_list(const char - int i = 0; - - indent(); -- fprintf(stderr, "%s: list:%p n:%d string_start:%d length:%d maxlen:%d glob:%d quoted:%d escape:%d\n", -+ fdprintf(2, "%s: list:%p n:%d string_start:%d length:%d maxlen:%d glob:%d quoted:%d escape:%d\n", - prefix, list, n, string_start, o->length, o->maxlen, - !!(o->o_expflags & EXP_FLAG_GLOB), - o->has_quoted_part, - !!(o->o_expflags & EXP_FLAG_ESC_GLOB_CHARS)); - while (i < n) { - indent(); -- fprintf(stderr, " list[%d]=%d '%s' %p\n", i, (int)list[i], -- o->data + (int)list[i] + string_start, -- o->data + (int)list[i] + string_start); -+ fdprintf(2, " list[%d]=%d '%s' %p\n", i, (int)(uintptr_t)list[i], -+ o->data + (int)(uintptr_t)list[i] + string_start, -+ o->data + (int)(uintptr_t)list[i] + string_start); - i++; - } - if (n) { -- const char *p = o->data + (int)list[n - 1] + string_start; -+ const char *p = o->data + (int)(uintptr_t)list[n - 1] + string_start; - indent(); -- fprintf(stderr, " total_sz:%ld\n", (long)((p + strlen(p) + 1) - o->data)); -+ fdprintf(2, " total_sz:%ld\n", (long)((p + strlen(p) + 1) - o->data)); - } - } - #else -@@ -2672,18 +2688,18 @@ static void debug_print_tree(struct pipe - - pin = 0; - while (pi) { -- fprintf(stderr, "%*spipe %d res_word=%s followup=%d %s\n", lvl*2, "", -+ fdprintf(2, "%*spipe %d res_word=%s followup=%d %s\n", lvl*2, "", - pin, RES[pi->res_word], pi->followup, PIPE[pi->followup]); - prn = 0; - while (prn < pi->num_cmds) { - struct command *command = &pi->cmds[prn]; - char **argv = command->argv; - -- fprintf(stderr, "%*s cmd %d assignment_cnt:%d", -+ fdprintf(2, "%*s cmd %d assignment_cnt:%d", - lvl*2, "", prn, - command->assignment_cnt); - if (command->group) { -- fprintf(stderr, " group %s: (argv=%p)%s%s\n", -+ fdprintf(2, " group %s: (argv=%p)%s%s\n", - CMDTYPE[command->cmd_type], - argv - # if !BB_MMU -@@ -2697,10 +2713,10 @@ static void debug_print_tree(struct pipe - continue; - } - if (argv) while (*argv) { -- fprintf(stderr, " '%s'", *argv); -+ fdprintf(2, " '%s'", *argv); - argv++; - } -- fprintf(stderr, "\n"); -+ fdprintf(2, "\n"); - prn++; - } - pi = pi->next; -@@ -4106,7 +4122,16 @@ static struct pipe *parse_stream(char ** - if (IS_NULL_CMD(ctx.command) - && dest.length == 0 && !dest.has_quoted_part - ) { -- continue; -+ /* This newline can be ignored. But... -+ * without the below check, interactive shell -+ * will ignore even lines with bare , -+ * and show the continuation prompt: -+ * ps1_prompt$ -+ * ps2> _ <=== wrong prompt, should be ps1 -+ */ -+ struct pipe *pi = ctx.list_head; -+ if (pi->num_cmds != 0) -+ continue; - } - /* Treat newline as a command separator. */ - done_pipe(&ctx, PIPE_SEQ); -@@ -7445,7 +7470,7 @@ int hush_main(int argc, char **argv) - unsigned builtin_argc; - char **e; - struct variable *cur_var; -- struct variable shell_ver; -+ struct variable *shell_ver; - - INIT_G(); - if (EXIT_SUCCESS) /* if EXIT_SUCCESS == 0, it is already done */ -@@ -7454,17 +7479,17 @@ int hush_main(int argc, char **argv) - G.argv0_for_re_execing = argv[0]; - #endif - /* Deal with HUSH_VERSION */ -- memset(&shell_ver, 0, sizeof(shell_ver)); -- shell_ver.flg_export = 1; -- shell_ver.flg_read_only = 1; -+ shell_ver = xzalloc(sizeof(*shell_ver)); -+ shell_ver->flg_export = 1; -+ shell_ver->flg_read_only = 1; - /* Code which handles ${var...} needs writable values for all variables, - * therefore we xstrdup: */ -- shell_ver.varstr = xstrdup(hush_version_str), -- G.top_var = &shell_ver; -+ shell_ver->varstr = xstrdup(hush_version_str); - /* Create shell local variables from the values - * currently living in the environment */ - debug_printf_env("unsetenv '%s'\n", "HUSH_VERSION"); - unsetenv("HUSH_VERSION"); /* in case it exists in initial env */ -+ G.top_var = shell_ver; - cur_var = G.top_var; - e = environ; - if (e) while (*e) { -@@ -7479,8 +7504,8 @@ int hush_main(int argc, char **argv) - e++; - } - /* (Re)insert HUSH_VERSION into env (AFTER we scanned the env!) */ -- debug_printf_env("putenv '%s'\n", shell_ver.varstr); -- putenv(shell_ver.varstr); -+ debug_printf_env("putenv '%s'\n", shell_ver->varstr); -+ putenv(shell_ver->varstr); - - /* Export PWD */ - set_pwd_var(/*exp:*/ 1); -@@ -7840,18 +7865,6 @@ int hush_main(int argc, char **argv) - parse_and_run_file(stdin); - - final_return: --#if ENABLE_FEATURE_CLEAN_UP -- if (G.cwd != bb_msg_unknown) -- free((char*)G.cwd); -- cur_var = G.top_var->next; -- while (cur_var) { -- struct variable *tmp = cur_var; -- if (!cur_var->max_len) -- free(cur_var->varstr); -- cur_var = cur_var->next; -- free(tmp); -- } --#endif - hush_exit(G.last_exitcode); - } - diff --git a/sys-apps/busybox/files/busybox-1.18.1-mkswap.patch b/sys-apps/busybox/files/busybox-1.18.1-mkswap.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.1-mkswap.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urpN busybox-1.18.1/util-linux/mkswap.c busybox-1.18.1-mkswap/util-linux/mkswap.c ---- busybox-1.18.1/util-linux/mkswap.c 2010-12-20 01:41:27.000000000 +0100 -+++ busybox-1.18.1-mkswap/util-linux/mkswap.c 2011-01-05 11:41:24.455856773 +0100 -@@ -15,7 +15,7 @@ static void mkswap_selinux_setcontext(in - if (!is_selinux_enabled()) - return; - -- xfstat(fd, &stbuf, argv[0]); -+ xfstat(fd, &stbuf, path); - if (S_ISREG(stbuf.st_mode)) { - security_context_t newcon; - security_context_t oldcon = NULL; diff --git a/sys-apps/busybox/files/busybox-1.18.1-warning.patch b/sys-apps/busybox/files/busybox-1.18.1-warning.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.1-warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urpN busybox-1.18.1/libbb/procps.c busybox-1.18.1-warning/libbb/procps.c ---- busybox-1.18.1/libbb/procps.c 2010-12-21 05:29:45.000000000 +0100 -+++ busybox-1.18.1-warning/libbb/procps.c 2011-01-07 13:41:22.000000000 +0100 -@@ -154,6 +154,7 @@ static unsigned long fast_strtoul_10(cha - return n; - } - -+# if ENABLE_FEATURE_FAST_TOP - static long fast_strtol_10(char **endptr) - { - if (**endptr != '-') -@@ -162,6 +163,7 @@ static long fast_strtol_10(char **endptr - (*endptr)++; - return - (long)fast_strtoul_10(endptr); - } -+# endif - - static char *skip_fields(char *str, int count) - { -@@ -448,7 +450,7 @@ procps_status_t* FAST_FUNC procps_scan(p - //FIXME: is it safe to assume this field exists? - sp->last_seen_on_cpu = fast_strtoul_10(&cp); - # endif --#endif /* end of !ENABLE_FEATURE_TOP_SMP_PROCESS */ -+#endif /* FEATURE_FAST_TOP */ - - #if ENABLE_FEATURE_PS_ADDITIONAL_COLUMNS - sp->niceness = tasknice; diff --git a/sys-apps/busybox/files/busybox-1.18.3-buildsys.patch b/sys-apps/busybox/files/busybox-1.18.3-buildsys.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.3-buildsys.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- busybox-1.18.3/Config.in -+++ busybox-1.18.3-buildsys/Config.in -@@ -126,7 +126,6 @@ config FEATURE_INSTALLER - config INSTALL_NO_USR - bool "Don't use /usr" - default n -- depends on FEATURE_INSTALLER - help - Disable use of /usr. busybox --install and "make install" - will install applets only to /bin and /sbin, diff --git a/sys-apps/busybox/files/busybox-1.18.3-modutils24.patch b/sys-apps/busybox/files/busybox-1.18.3-modutils24.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.3-modutils24.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- busybox-1.18.3/modutils/modutils-24.c -+++ busybox-1.18.3-modutils24/modutils/modutils-24.c -@@ -2474,6 +2474,7 @@ new_process_module_arguments(struct obj_ - n = 0; - p = val; - while (*p != 0) { -+ char sv_ch; - char *endp; - - if (++n > max) -@@ -2482,14 +2483,17 @@ new_process_module_arguments(struct obj_ - switch (*pinfo) { - case 's': - len = strcspn(p, ","); -+ sv_ch = p[len]; - p[len] = 0; - obj_string_patch(f, sym->secidx, - loc - contents, p); - loc += tgt_sizeof_char_p; - p += len; -+ *p = sv_ch; - break; - case 'c': - len = strcspn(p, ","); -+ sv_ch = p[len]; - p[len] = 0; - if (len >= charssize) - bb_error_msg_and_die("string too long for %s (max %ld)", param, -@@ -2497,6 +2501,7 @@ new_process_module_arguments(struct obj_ - strcpy((char *) loc, p); - loc += charssize; - p += len; -+ *p = sv_ch; - break; - case 'b': - *loc++ = strtoul(p, &endp, 0); diff --git a/sys-apps/busybox/files/busybox-1.18.3-wget.patch b/sys-apps/busybox/files/busybox-1.18.3-wget.patch deleted file mode 100644 --- a/sys-apps/busybox/files/busybox-1.18.3-wget.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- busybox-1.18.3/networking/wget.c -+++ busybox-1.18.3-wget/networking/wget.c -@@ -446,7 +446,7 @@ static FILE* prepare_ftp_session(FILE ** - - static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd) - { -- char buf[512]; -+ char buf[4*1024]; /* made bigger to speed up local xfers */ - #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT - # if ENABLE_FEATURE_WGET_TIMEOUT - unsigned second_cnt; -@@ -455,7 +455,6 @@ static void NOINLINE retrieve_file_data( - - polldata.fd = fileno(dfp); - polldata.events = POLLIN | POLLPRI; -- ndelay_on(polldata.fd); - #endif - progress_meter(PROGRESS_START); - -@@ -464,6 +463,10 @@ static void NOINLINE retrieve_file_data( - - /* Loops only if chunked */ - while (1) { -+ -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ ndelay_on(polldata.fd); -+#endif - while (1) { - int n; - unsigned rdsz; -@@ -493,22 +496,46 @@ static void NOINLINE retrieve_file_data( - progress_meter(PROGRESS_BUMP); - } - #endif -+ /* fread internally uses read loop, which in our case -+ * is usually exited when we get EAGAIN. -+ * In this case, libc sets error marker on the stream. -+ * Need to clear it before next fread to avoid possible -+ * rare false positive ferror below. Rare because usually -+ * fread gets more than zero bytes, and we don't fall -+ * into if (n <= 0) ... -+ */ -+ clearerr(dfp); -+ errno = 0; - n = safe_fread(buf, rdsz, dfp); -+ /* man fread: -+ * If error occurs, or EOF is reached, the return value -+ * is a short item count (or zero). -+ * fread does not distinguish between EOF and error. -+ */ - if (n <= 0) { -- if (ferror(dfp)) { -- /* perror will not work: ferror doesn't set errno */ -- bb_error_msg_and_die(bb_msg_read_error); -- } -- break; -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ if (errno == EAGAIN) /* poll lied, there is no data? */ -+ continue; /* yes */ -+#endif -+ if (ferror(dfp)) -+ bb_perror_msg_and_die(bb_msg_read_error); -+ break; /* EOF, not error */ - } -+ - xwrite(output_fd, buf, n); - #if ENABLE_FEATURE_WGET_STATUSBAR - G.transferred += n; - progress_meter(PROGRESS_BUMP); - #endif -- if (G.got_clen) -+ if (G.got_clen) { - G.content_len -= n; -+ if (G.content_len == 0) -+ break; -+ } - } -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT -+ ndelay_off(polldata.fd); -+#endif - - if (!G.chunked) - break; -@@ -706,6 +733,11 @@ int wget_main(int argc UNUSED_PARAM, cha - fprintf(sfp, "Host: %s\r\nUser-Agent: %s\r\n", - target.host, user_agent); - -+ /* Ask server to close the connection as soon as we are done -+ * (IOW: we do not intend to send more requests) -+ */ -+ fprintf(sfp, "Connection: close\r\n"); -+ - #if ENABLE_FEATURE_WGET_AUTHENTICATION - if (target.user) { - fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6, -@@ -719,22 +751,25 @@ int wget_main(int argc UNUSED_PARAM, cha - - if (G.beg_range) - fprintf(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); -+ - #if ENABLE_FEATURE_WGET_LONG_OPTIONS - if (extra_headers) - fputs(extra_headers, sfp); - - if (opt & WGET_OPT_POST_DATA) { - char *estr = URL_escape(post_data); -- fprintf(sfp, "Content-Type: application/x-www-form-urlencoded\r\n"); -- fprintf(sfp, "Content-Length: %u\r\n" "\r\n" "%s", -- (int) strlen(estr), estr); -- /*fprintf(sfp, "Connection: Keep-Alive\r\n\r\n");*/ -- /*fprintf(sfp, "%s\r\n", estr);*/ -+ fprintf(sfp, -+ "Content-Type: application/x-www-form-urlencoded\r\n" -+ "Content-Length: %u\r\n" -+ "\r\n" -+ "%s", -+ (int) strlen(estr), estr -+ ); - free(estr); - } else - #endif -- { /* If "Connection:" is needed, document why */ -- fprintf(sfp, /* "Connection: close\r\n" */ "\r\n"); -+ { -+ fprintf(sfp, "\r\n"); - } - - fflush(sfp); diff --git a/sys-apps/busybox/files/mdev-start.sh b/sys-apps/busybox/files/mdev-start.sh deleted file mode 100755 --- a/sys-apps/busybox/files/mdev-start.sh +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -find_mdev() -{ - if [ -x /sbin/mdev ] ; then - echo "/sbin/mdev" - else - echo "/bin/busybox mdev" - fi -} - -populate_mdev() -{ - # populate /dev with devices already found by the kernel - - if get_bootparam "nocoldplug" ; then - RC_COLDPLUG="no" - ewarn "Skipping mdev coldplug as requested in kernel cmdline" - fi - - ebegin "Populating /dev with existing devices with mdev -s" - $(find_mdev) -s - eend $? - - return 0 -} - -seed_dev() -{ - # Seed /dev with some things that we know we need - - # creating /dev/console and /dev/tty1 to be able to write - # to $CONSOLE with/without bootsplash before mdev creates it - [ -c /dev/console ] || mknod /dev/console c 5 1 - [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1 - - # udevd will dup its stdin/stdout/stderr to /dev/null - # and we do not want a file which gets buffered in ram - [ -c /dev/null ] || mknod /dev/null c 1 3 - - # copy over any persistant things - if [ -d /lib/mdev/devices ] ; then - cp -RPp /lib/mdev/devices/* /dev 2>/dev/null - fi - - # Not provided by sysfs but needed - ln -snf /proc/self/fd /dev/fd - ln -snf fd/0 /dev/stdin - ln -snf fd/1 /dev/stdout - ln -snf fd/2 /dev/stderr - [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core - - # Create problematic directories - mkdir -p /dev/pts /dev/shm -} - -mount_it_b1() -{ - if [ "${RC_USE_FSTAB}" = "yes" ] ; then - mntcmd=$(get_mount_fstab /dev) - else - unset mntcmd - fi - if [ -n "${mntcmd}" ] ; then - try mount -n ${mntcmd} - else - if grep -Eq "[[:space:]]+tmpfs$" /proc/filesystems ; then - mntcmd="tmpfs" - else - mntcmd="ramfs" - fi - # many video drivers require exec access in /dev #92921 - try mount -n -t "${mntcmd}" -o exec,nosuid,mode=0755 mdev /dev - fi -} -mount_it_b2() -{ - if fstabinfo --quiet /dev ; then - mount -n /dev - else - # Some devices require exec, Bug #92921 - mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev - fi -} -mount_it() -{ - type fstabinfo && mount_it_b2 || mount_it_b1 -} - -main() -{ - # Setup temporary storage for /dev - ebegin "Mounting /dev for mdev" - mount_it - eend $? - - # Create a file so that our rc system knows it's still in sysinit. - # Existance means init scripts will not directly run. - # rc will remove the file when done with sysinit. - touch /dev/.rcsysinit - - # Selinux lovin; /selinux should be mounted by selinux-patched init - if [ -x /sbin/restorecon ] && [ -c /selinux/null ] ; then - restorecon /dev > /selinux/null - fi - - seed_dev - - # Setup hotplugging (if possible) - if [ -e /proc/sys/kernel/hotplug ] ; then - ebegin "Setting up proper hotplug agent" - eindent - einfo "Setting /sbin/mdev as hotplug agent ..." - echo $(find_mdev) > /proc/sys/kernel/hotplug - eoutdent - eend 0 - fi - - populate_mdev -} - -main - -# vim:ts=4 diff --git a/sys-apps/busybox/files/mdev.rc b/sys-apps/busybox/files/mdev.rc deleted file mode 100755 --- a/sys-apps/busybox/files/mdev.rc +++ /dev/null @@ -1,9 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev.rc,v 1.1 2010/08/15 03:55:29 vapier Exp $ - -start() -{ - . /lib/rcscripts/addons/mdev-start.sh -} diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev deleted file mode 100644 --- a/sys-apps/busybox/files/mdev/dvbdev +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0 -ADAPTER=${MDEV%.*} -N=${ADAPTER#dvb} -# MDEV=dvb0.demux1 -> DEVB_DEV=demux1 -DVB_DEV=${MDEV#*.} - -case "$ACTION" in - add|"") - mkdir -p dvb/adapter${N} - mv ${MDEV} dvb/adapter${N}/${DVB_DEV} - ;; - remove) - rm -f dvb/adapter${N}/${DVB_DEV} - rmdir dvb/adapter${N} 2>/dev/null - rmdir dvb/ 2>/dev/null -esac diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links deleted file mode 100644 --- a/sys-apps/busybox/files/mdev/ide_links +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -[ -f /proc/ide/$MDEV/media ] || exit - -media=`cat /proc/ide/$MDEV/media` -for i in $media $media[0-9]* ; do - if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then - LINK=$i - break - fi -done - -# link exist, remove if necessary and exit -if [ "$LINK" ] ; then - [ "$ACTION" = remove ] && rm $LINK - exit -fi - -# create a link -num=`ls $media[0-9]* 2>/dev/null | wc -l` -ln -sf $MDEV "$media`echo $num`" -[ -e "$media" ] || ln -sf $MDEV "$media" - diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev deleted file mode 100644 --- a/sys-apps/busybox/files/mdev/usbdev +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -# script is buggy; until patched just do exit 0 -#exit 0 - -# add zeros to device or bus -add_zeros () { - case "$(echo $1 | wc -L)" in - 1) echo "00$1" ;; - 2) echo "0$1" ;; - *) echo "$1" - esac - exit 0 -} - - -# bus and device dirs in /sys -USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/') -USB_PATH=$(find /sys/devices -type d -name "$USB_PATH") -USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/') - -# dir names in /dev -BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/')) -USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/')) - - -# try to load the proper driver for usb devices -case "$ACTION" in - add|"") - # load usb bus driver - for i in $USB_PATH/*/modalias ; do - modprobe `cat $i` 2>/dev/null - done - # load usb device driver if existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe `cat $i` 2>/dev/null - done - fi - # move usb device file - mkdir -p bus/usb/$BUS - mv $MDEV bus/usb/$BUS/$USB_DEV - ;; - remove) - # unload device driver, if device dir is existent - if [ -d $USB_PATH/$USB_DEV_DIR ]; then - for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null - done - fi - # unload usb bus driver. Does this make sense? - # what happens, if two usb devices are plugged in - # and one is removed? - for i in $USB_PATH/*/modalias ; do - modprobe -r `cat $i` 2>/dev/null - done - # remove device file and possible empty dirs - rm -f bus/usb/$BUS/$USB_DEV - rmdir bus/usb/$BUS/ 2>/dev/null - rmdir bus/usb/ 2>/dev/null - rmdir bus/ 2>/dev/null -esac diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link deleted file mode 100644 --- a/sys-apps/busybox/files/mdev/usbdisk_link +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars. - -current=$(readlink usbdisk) - -if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then - rm -f usbdisk usba1 -fi -[ -n "$current" ] && exit - -if [ -e /sys/block/$MDEV ]; then - SYSDEV=$(readlink -f /sys/block/$MDEV/device) - # if /sys device path contains '/usb[0-9]' then we assume its usb - # also, if its an usb without partitions we require FAT - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then - # do not create link if there is not FAT - dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0 - - ln -sf $MDEV usbdisk - # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 - fi - -elif [ -e /sys/block/*/$MDEV ] ; then - PARENT=$(dirname /sys/block/*/$MDEV) - SYSDEV=$(readlink -f $PARENT/device) - if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then - ln -sf $MDEV usbdisk - # keep this for compat. people have it in fstab - ln -sf $MDEV usba1 - fi -fi - diff --git a/sys-apps/busybox/metadata.xml b/sys-apps/busybox/metadata.xml deleted file mode 100644 --- a/sys-apps/busybox/metadata.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - -embedded - -Create all the appropriate symlinks in /bin and /sbin. -Create the appropriate symlink in /sbin and install mdev.conf and support files - -