commit:     7dba2ad13c919fee0db42be39e57e64ac4307c5a
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 06:07:29 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 06:07:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dba2ad1

sys-apps/busybox: drop old <1.25.1 versions

 sys-apps/busybox/Manifest                          |   2 -
 sys-apps/busybox/busybox-1.24.1.ebuild             | 304 --------------------
 sys-apps/busybox/busybox-1.24.2.ebuild             | 305 ---------------------
 .../files/busybox-1.24.1-trylink-ldflags.patch     |  32 ---
 .../files/busybox-1.24.1-unzip-regression.patch    | 135 ---------
 sys-apps/busybox/files/busybox-1.24.1-unzip.patch  | 112 --------
 .../files/busybox-1.24.2-CVE-2016-2147.patch       |  72 -----
 .../files/busybox-1.24.2-CVE-2016-2148.patch       |  55 ----
 .../busybox-1.24.2-ash-recursive-heredocs.patch    |  83 ------
 9 files changed, 1100 deletions(-)

diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
index de3680e..9f98c8d 100644
--- a/sys-apps/busybox/Manifest
+++ b/sys-apps/busybox/Manifest
@@ -1,3 +1 @@
-DIST busybox-1.24.1.tar.bz2 2068803 SHA256 
37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d SHA512 
3afc757ebaae61ae13c2c69097ee734717434f9e658eb77093a8b7b49af3326cbca2d723483ff84a1da99544b822fd2b47d9a97c68f09962e11754e5daf124ca
 WHIRLPOOL 
5e827d08d737caac832e7e5923da624094ff27ee2edbb46dadc339e95edba65378a8fa3db412682724476a2092eee41a804f8f36c2eec0b9f883f5ba855f3ad0
-DIST busybox-1.24.2.tar.bz2 2066822 SHA256 
e71ef53ec656f31c42633918d301405d40dea1d97eca12f272217ae4a971c855 SHA512 
4d20fb68ee440be2855231c7fd5f3cb9dd9bfcc1a688f0b59cd3f7a55c8819e9cc44bd15f91500713571f2a84e5e44adc0fa8ae0ae3ebf63961dfc9e1c9ef8e0
 WHIRLPOOL 
2d89e3fded8d61567873acdb1e1e21888a4447e19c1b893543bbe82de52e8e3cf091adb10f34aa155da573994d89ae42f40ecce65ec0d32a641d103c8d8ce053
 DIST busybox-1.25.1.tar.bz2 2103070 SHA256 
27667e0f2328fdbd79cfd622e4453e5c57e58f781c5da97c9be337d93aa2a02e SHA512 
9648877ed11e5a55213cd14fd64f6fc64dbd17013fbfaa4e67f4fd433f59e9231ed78a88e6e8100a4794d833f1d9863bb86f75faae093418866770804bf873cb
 WHIRLPOOL 
4b7bc6d3a88559812797feb4574975b9fdeb6eac6ac7a0fe51e4750a3b05a614ecb8bd9d58547047cdf1e0b66d9bcd189c8a4193fc2f3b491a6268bc06761ad1

diff --git a/sys-apps/busybox/busybox-1.24.1.ebuild 
b/sys-apps/busybox/busybox-1.24.1.ebuild
deleted file mode 100644
index fdc9571..00000000
--- a/sys-apps/busybox/busybox-1.24.1.ebuild
+++ /dev/null
@@ -1,304 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
-
-EAPI="4"
-inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
-
-DESCRIPTION="Utilities for rescue and embedded systems"
-HOMEPAGE="https://www.busybox.net/";
-if [[ ${PV} == "9999" ]] ; then
-       MY_P=${PN}
-       EGIT_REPO_URI="git://busybox.net/busybox.git"
-       inherit git-2
-else
-       MY_P=${PN}-${PV/_/-}
-       SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2";
-       KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh 
sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
-fi
-
-LICENSE="GPL-2" # GPL-2 only
-SLOT="0"
-IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static 
syslog systemd"
-RESTRICT="test"
-
-COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
-       pam? ( sys-libs/pam )"
-DEPEND="${COMMON_DEPEND}
-       static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
-       >=sys-kernel/linux-headers-2.6.39"
-RDEPEND="${COMMON_DEPEND}
-       mdev? ( !<sys-apps/openrc-0.13 )"
-
-S=${WORKDIR}/${MY_P}
-
-busybox_config_option() {
-       local flag=$1 ; shift
-       if [[ ${flag} != [yn] ]] ; then
-               busybox_config_option $(usex ${flag} y n) "$@"
-               return
-       fi
-       while [[ $# -gt 0 ]] ; do
-               if [[ ${flag} == "y" ]] ; then
-                       sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
-               else
-                       sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" 
.config
-               fi
-               einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find 
CONFIG_$1 ...)
-               shift
-       done
-}
-
-busybox_config_enabled() {
-       local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
-       case ${val} in
-       "") return 1 ;;
-       y)  return 0 ;;
-       *)  echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
-       esac
-}
-
-src_prepare() {
-       unset KBUILD_OUTPUT #88088
-       append-flags -fno-strict-aliasing #310413
-       use ppc64 && append-flags -mminimal-toc #130943
-
-       # patches go here!
-       epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
-       epatch "${FILESDIR}"/busybox-1.24.1-trylink-ldflags.patch
-       epatch "${FILESDIR}"/busybox-1.24.1-unzip.patch
-       epatch "${FILESDIR}"/busybox-1.24.1-unzip-regression.patch
-       cp "${FILESDIR}"/ginit.c init/ || die
-
-       # 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):" \
-               -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
-               Makefile || die
-       sed -i \
-               -e 's:-static-libgcc::' \
-               Makefile.flags || 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 -s 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 -s allyesconfig >/dev/null
-       # nommu forces a bunch of things off which we want on #387555
-       busybox_config_option n NOMMU
-       sed -i '/^#/d' .config
-       yes "" | emake -j1 -s oldconfig >/dev/null
-
-       # now turn off stuff we really don't want
-       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 FEATURE_CLEAN_UP
-       busybox_config_option n MONOTONIC_SYSCALL
-       busybox_config_option n USE_PORTABLE_CODE
-       busybox_config_option n WERROR
-
-       # 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
-               busybox_config_option n UDHCPC6
-       fi
-
-       if use static && use pam ; then
-               ewarn "You cannot have USE='static pam'.  Assuming static is 
more important."
-       fi
-       busybox_config_option $(usex static n pam) PAM
-       busybox_config_option static STATIC
-       busybox_config_option syslog {K,SYS}LOGD LOGGER
-       busybox_config_option systemd FEATURE_SYSTEMD
-       busybox_config_option math FEATURE_AWK_LIBM
-
-       # all the debug options are compiler related, so punt them
-       busybox_config_option n DEBUG
-       busybox_config_option y NO_DEBUG_LIB
-       busybox_config_option n DMALLOC
-       busybox_config_option n EFENCE
-       busybox_config_option $(usex debug y n) TFTP_DEBUG
-
-       busybox_config_option selinux SELINUX
-
-       # this opt only controls mounting with <linux-2.6.23
-       busybox_config_option n FEATURE_MOUNT_NFS
-
-       # default a bunch of uncommon options to off
-       local opt
-       for opt in \
-               ADD_SHELL \
-               BEEP BOOTCHARTD \
-               CRONTAB \
-               DC DEVFSD DNSD DPKG{,_DEB} \
-               FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
-               FEATURE_DEVFS \
-               HOSTID HUSH \
-               INETD INOTIFYD IPCALC \
-               LOCALE_SUPPORT LOGNAME LPD \
-               MAKEMIME MKFS_MINIX MSH \
-               OD \
-               RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS 
RUNSV{,DIR} \
-               SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
-               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 V=1 busybox
-}
-
-src_install() {
-       unset KBUILD_OUTPUT #88088
-       save_config .config
-
-       into /
-       dodir /bin
-       if use sep-usr ; then
-               # install /ginit to take care of mounting stuff
-               exeinto /
-               newexe busybox_unstripped ginit
-               dosym /ginit /bin/bb
-               dosym bb /bin/busybox
-       else
-               newbin busybox_unstripped busybox
-               dosym busybox /bin/bb
-       fi
-       if use mdev ; then
-               dodir /$(get_libdir)/mdev/
-               use make-symlinks || dosym /bin/bb /sbin/mdev
-               cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
-
-               exeinto /$(get_libdir)/mdev/
-               doexe "${FILESDIR}"/mdev/*
-
-               newinitd "${FILESDIR}"/mdev.initd mdev
-       fi
-       if use livecd ; then
-               dosym busybox /bin/vi
-       fi
-
-       # add busybox daemon's, bug #444718
-       if busybox_config_enabled FEATURE_NTPD_SERVER; then
-               newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
-               newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
-       fi
-       if busybox_config_enabled SYSLOGD; then
-               newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
-               newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
-       fi
-       if busybox_config_enabled KLOGD; then
-               newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
-               newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
-       fi
-       if busybox_config_enabled WATCHDOG; then
-               newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
-               newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
-       fi
-       if busybox_config_enabled UDHCPC; then
-               local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
-               exeinto "${path%/*}"
-               newexe examples/udhcp/simple.script "${path##*/}"
-       fi
-       if busybox_config_enabled UDHCPD; then
-               insinto /etc
-               doins examples/udhcp/udhcpd.conf
-       fi
-
-       # bundle up the symlink files for use later
-       emake DESTDIR="${ED}" install
-       rm _install/bin/busybox
-       # for compatibility, provide /usr/bin/env
-       mkdir -p _install/usr/bin
-       ln -s /bin/env _install/usr/bin/env
-       tar cf busybox-links.tar -C _install . || : #;die
-       insinto /usr/share/${PN}
-       use make-symlinks && doins busybox-links.tar
-
-       dodoc AUTHORS README TODO
-
-       cd docs
-       docinto txt
-       dodoc *.txt
-       docinto pod
-       dodoc *.pod
-       dohtml *.html
-
-       cd ../examples
-       docinto examples
-       dodoc inittab depmod.pl *.conf *.script undeb unrpm
-}
-
-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 really 
what you want."
-               die "silly options will destroy your system"
-       fi
-
-       if use make-symlinks ; then
-               mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
-       fi
-}
-
-pkg_postinst() {
-       savedconfig_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 sep-usr ; then
-               elog "In order to use the sep-usr support, you have to update 
your"
-               elog "kernel command line.  Add the option:"
-               elog "     init=/ginit"
-               elog "To launch a different init than /sbin/init, use:"
-               elog "     init=/ginit /sbin/yourinit"
-               elog "To get a rescue shell, you may boot with:"
-               elog "     init=/ginit bb"
-       fi
-}

diff --git a/sys-apps/busybox/busybox-1.24.2.ebuild 
b/sys-apps/busybox/busybox-1.24.2.ebuild
deleted file mode 100644
index 39decea..00000000
--- a/sys-apps/busybox/busybox-1.24.2.ebuild
+++ /dev/null
@@ -1,305 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
-
-EAPI="4"
-inherit eutils flag-o-matic savedconfig toolchain-funcs multilib
-
-DESCRIPTION="Utilities for rescue and embedded systems"
-HOMEPAGE="https://www.busybox.net/";
-if [[ ${PV} == "9999" ]] ; then
-       MY_P=${PN}
-       EGIT_REPO_URI="git://busybox.net/busybox.git"
-       inherit git-2
-else
-       MY_P=${PN}-${PV/_/-}
-       SRC_URI="https://www.busybox.net/downloads/${MY_P}.tar.bz2";
-       KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 
~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
-fi
-
-LICENSE="GPL-2" # GPL-2 only
-SLOT="0"
-IUSE="debug ipv6 livecd make-symlinks math mdev pam selinux sep-usr static 
syslog systemd"
-RESTRICT="test"
-
-COMMON_DEPEND="!static? ( selinux? ( sys-libs/libselinux ) )
-       pam? ( sys-libs/pam )"
-DEPEND="${COMMON_DEPEND}
-       static? ( selinux? ( sys-libs/libselinux[static-libs(+)] ) )
-       >=sys-kernel/linux-headers-2.6.39"
-RDEPEND="${COMMON_DEPEND}
-       mdev? ( !<sys-apps/openrc-0.13 )"
-
-S=${WORKDIR}/${MY_P}
-
-busybox_config_option() {
-       local flag=$1 ; shift
-       if [[ ${flag} != [yn] ]] ; then
-               busybox_config_option $(usex ${flag} y n) "$@"
-               return
-       fi
-       while [[ $# -gt 0 ]] ; do
-               if [[ ${flag} == "y" ]] ; then
-                       sed -i -e "s:.*\<CONFIG_$1\>.*set:CONFIG_$1=y:g" .config
-               else
-                       sed -i -e "s:CONFIG_$1=y:# CONFIG_$1 is not set:g" 
.config
-               fi
-               einfo $(grep "CONFIG_$1[= ]" .config || echo Could not find 
CONFIG_$1 ...)
-               shift
-       done
-}
-
-busybox_config_enabled() {
-       local val=$(sed -n "/^CONFIG_$1=/s:^[^=]*=::p" .config)
-       case ${val} in
-       "") return 1 ;;
-       y)  return 0 ;;
-       *)  echo "${val}" | sed -r 's:^"(.*)"$:\1:' ;;
-       esac
-}
-
-src_prepare() {
-       unset KBUILD_OUTPUT #88088
-       append-flags -fno-strict-aliasing #310413
-       use ppc64 && append-flags -mminimal-toc #130943
-
-       # patches go here!
-       epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
-       epatch "${FILESDIR}"/busybox-1.24.1-trylink-ldflags.patch
-       epatch "${FILESDIR}"/busybox-1.24.2-ash-recursive-heredocs.patch
-       epatch "${FILESDIR}"/busybox-1.24.2-CVE-2016-2147.patch
-       epatch "${FILESDIR}"/busybox-1.24.2-CVE-2016-2148.patch
-       cp "${FILESDIR}"/ginit.c init/ || die
-
-       # 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):" \
-               -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \
-               Makefile || die
-       sed -i \
-               -e 's:-static-libgcc::' \
-               Makefile.flags || 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 -s 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 -s allyesconfig >/dev/null
-       # nommu forces a bunch of things off which we want on #387555
-       busybox_config_option n NOMMU
-       sed -i '/^#/d' .config
-       yes "" | emake -j1 -s oldconfig >/dev/null
-
-       # now turn off stuff we really don't want
-       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 FEATURE_CLEAN_UP
-       busybox_config_option n MONOTONIC_SYSCALL
-       busybox_config_option n USE_PORTABLE_CODE
-       busybox_config_option n WERROR
-
-       # 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
-               busybox_config_option n UDHCPC6
-       fi
-
-       if use static && use pam ; then
-               ewarn "You cannot have USE='static pam'.  Assuming static is 
more important."
-       fi
-       busybox_config_option $(usex static n pam) PAM
-       busybox_config_option static STATIC
-       busybox_config_option syslog {K,SYS}LOGD LOGGER
-       busybox_config_option systemd FEATURE_SYSTEMD
-       busybox_config_option math FEATURE_AWK_LIBM
-
-       # all the debug options are compiler related, so punt them
-       busybox_config_option n DEBUG
-       busybox_config_option y NO_DEBUG_LIB
-       busybox_config_option n DMALLOC
-       busybox_config_option n EFENCE
-       busybox_config_option $(usex debug y n) TFTP_DEBUG
-
-       busybox_config_option selinux SELINUX
-
-       # this opt only controls mounting with <linux-2.6.23
-       busybox_config_option n FEATURE_MOUNT_NFS
-
-       # default a bunch of uncommon options to off
-       local opt
-       for opt in \
-               ADD_SHELL \
-               BEEP BOOTCHARTD \
-               CRONTAB \
-               DC DEVFSD DNSD DPKG{,_DEB} \
-               FAKEIDENTD FBSPLASH FOLD FSCK_MINIX FTP{GET,PUT} \
-               FEATURE_DEVFS \
-               HOSTID HUSH \
-               INETD INOTIFYD IPCALC \
-               LOCALE_SUPPORT LOGNAME LPD \
-               MAKEMIME MKFS_MINIX MSH \
-               OD \
-               RDEV READPROFILE REFORMIME REMOVE_SHELL RFKILL RUN_PARTS 
RUNSV{,DIR} \
-               SLATTACH SMEMCAP SULOGIN SV{,LOGD} \
-               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 V=1 busybox
-}
-
-src_install() {
-       unset KBUILD_OUTPUT #88088
-       save_config .config
-
-       into /
-       dodir /bin
-       if use sep-usr ; then
-               # install /ginit to take care of mounting stuff
-               exeinto /
-               newexe busybox_unstripped ginit
-               dosym /ginit /bin/bb
-               dosym bb /bin/busybox
-       else
-               newbin busybox_unstripped busybox
-               dosym busybox /bin/bb
-       fi
-       if use mdev ; then
-               dodir /$(get_libdir)/mdev/
-               use make-symlinks || dosym /bin/bb /sbin/mdev
-               cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf
-
-               exeinto /$(get_libdir)/mdev/
-               doexe "${FILESDIR}"/mdev/*
-
-               newinitd "${FILESDIR}"/mdev.initd mdev
-       fi
-       if use livecd ; then
-               dosym busybox /bin/vi
-       fi
-
-       # add busybox daemon's, bug #444718
-       if busybox_config_enabled FEATURE_NTPD_SERVER; then
-               newconfd "${FILESDIR}/ntpd.confd" "busybox-ntpd"
-               newinitd "${FILESDIR}/ntpd.initd" "busybox-ntpd"
-       fi
-       if busybox_config_enabled SYSLOGD; then
-               newconfd "${FILESDIR}/syslogd.confd" "busybox-syslogd"
-               newinitd "${FILESDIR}/syslogd.initd" "busybox-syslogd"
-       fi
-       if busybox_config_enabled KLOGD; then
-               newconfd "${FILESDIR}/klogd.confd" "busybox-klogd"
-               newinitd "${FILESDIR}/klogd.initd" "busybox-klogd"
-       fi
-       if busybox_config_enabled WATCHDOG; then
-               newconfd "${FILESDIR}/watchdog.confd" "busybox-watchdog"
-               newinitd "${FILESDIR}/watchdog.initd" "busybox-watchdog"
-       fi
-       if busybox_config_enabled UDHCPC; then
-               local path=$(busybox_config_enabled UDHCPC_DEFAULT_SCRIPT)
-               exeinto "${path%/*}"
-               newexe examples/udhcp/simple.script "${path##*/}"
-       fi
-       if busybox_config_enabled UDHCPD; then
-               insinto /etc
-               doins examples/udhcp/udhcpd.conf
-       fi
-
-       # bundle up the symlink files for use later
-       emake DESTDIR="${ED}" install
-       rm _install/bin/busybox
-       # for compatibility, provide /usr/bin/env
-       mkdir -p _install/usr/bin
-       ln -s /bin/env _install/usr/bin/env
-       tar cf busybox-links.tar -C _install . || : #;die
-       insinto /usr/share/${PN}
-       use make-symlinks && doins busybox-links.tar
-
-       dodoc AUTHORS README TODO
-
-       cd docs
-       docinto txt
-       dodoc *.txt
-       docinto pod
-       dodoc *.pod
-       dohtml *.html
-
-       cd ../examples
-       docinto examples
-       dodoc inittab depmod.pl *.conf *.script undeb unrpm
-}
-
-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 really 
what you want."
-               die "silly options will destroy your system"
-       fi
-
-       if use make-symlinks ; then
-               mv "${ED}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
-       fi
-}
-
-pkg_postinst() {
-       savedconfig_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 sep-usr ; then
-               elog "In order to use the sep-usr support, you have to update 
your"
-               elog "kernel command line.  Add the option:"
-               elog "     init=/ginit"
-               elog "To launch a different init than /sbin/init, use:"
-               elog "     init=/ginit /sbin/yourinit"
-               elog "To get a rescue shell, you may boot with:"
-               elog "     init=/ginit bb"
-       fi
-}

diff --git a/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch 
b/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch
deleted file mode 100644
index 9d61ceb..00000000
--- a/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vap...@gentoo.org>
-Date: Tue, 1 Dec 2015 11:25:10 -0500
-Subject: [PATCH] trylink: include LDFLAGS when checking linkage
-
-The user might be including options in their LDFLAGS (like -fuse-ld=gold)
-that change the behavior of the linker and thus change the results of the
-flag tests.  Make sure we include the user's LDFLAGS when running these
-tests so we filter out flags that will fail when used later on.
-
-URL: https://bugs.gentoo.org/499712
-Signed-off-by: Mike Frysinger <vap...@gentoo.org>
----
- scripts/trylink | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/trylink b/scripts/trylink
-index 6e1187e..3c431ed 100755
---- a/scripts/trylink
-+++ b/scripts/trylink
-@@ -54,7 +54,7 @@ check_cc() {
-     # "eval" may be needed if CFLAGS can contain
-     # '... -D"BB_VER=KBUILD_STR(1.N.M)" ...'
-     # and we need shell to process quotes!
--    $CC $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
-+    $CC $CFLAGS $LDFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
-     r=$?
-     rm -f "$tempname" "$tempname".c "$tempname".o
-     return $r
--- 
-2.6.2
-

diff --git a/sys-apps/busybox/files/busybox-1.24.1-unzip-regression.patch 
b/sys-apps/busybox/files/busybox-1.24.1-unzip-regression.patch
deleted file mode 100644
index 58d7b7c..00000000
--- a/sys-apps/busybox/files/busybox-1.24.1-unzip-regression.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.li...@googlemail.com>
-Date: Fri, 30 Oct 2015 23:41:53 +0100
-Subject: [PATCH] [g]unzip: fix recent breakage.
-
-Also, do emit error message we so painstakingly pass from gzip internals
-
-Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
-(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
-Signed-off-by: Mike Frysinger <vap...@gentoo.org>
----
- archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
- testsuite/unzip.tests                   |  1 +
- 2 files changed, 22 insertions(+), 12 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c 
b/archival/libarchive/decompress_gunzip.c
-index c76fd31..357c9bf 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
-       huft_t *q;              /* points to current table */
-       huft_t r;               /* table entry for structure assignment */
-       huft_t *u[BMAX];        /* table stack */
--      unsigned v[N_MAX];      /* values in order of bit length */
--      unsigned v_end;
-+      unsigned v[N_MAX + 1];  /* values in order of bit length. last v[] is 
never used */
-       int ws[BMAX + 1];       /* bits decoded stack */
-       int w;                  /* bits decoded */
-       unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned 
n,
-               *xp++ = j;
-       }
- 
--      /* Make a table of values in order of bit lengths */
-+      /* Make a table of values in order of bit lengths.
-+       * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
-+       * In particular, last v[i] is never filled and must not be accessed.
-+       */
-+      memset(v, 0xff, sizeof(v));
-       p = b;
-       i = 0;
--      v_end = 0;
-       do {
-               j = *p++;
-               if (j != 0) {
-                       v[x[j]++] = i;
--                      v_end = x[j];
-               }
-       } while (++i < n);
- 
-@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
-                       /* set up table entry in r */
-                       r.b = (unsigned char) (k - w);
--                      if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] 
can be shorter!
-+                      if (/*p >= v + n || -- redundant, caught by the second 
check: */
-+                          *p == UINT_MAX /* do we access uninited v[i]? (see 
memset(v))*/
-+                      ) {
-                               r.e = 99; /* out of values--invalid code */
-                       } else if (*p < s) {
-                               r.e = (unsigned char) (*p < 256 ? 16 : 15);     
/* 256 is EOB code */
-@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
-               e = t->e;
-               if (e > 16)
-                       do {
--                              if (e == 99)
--                                      abort_unzip(PASS_STATE_ONLY);;
-+                              if (e == 99) {
-+                                      abort_unzip(PASS_STATE_ONLY);
-+                              }
-                               bb >>= t->b;
-                               k -= t->b;
-                               e -= 16;
-@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
-                       e = t->e;
-                       if (e > 16)
-                               do {
--                                      if (e == 99)
-+                                      if (e == 99) {
-                                               abort_unzip(PASS_STATE_ONLY);
-+                                      }
-                                       bb >>= t->b;
-                                       k -= t->b;
-                                       e -= 16;
-@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
- 
-               b_dynamic >>= 4;
-               k_dynamic -= 4;
--              if (nl > 286 || nd > 30)
-+              if (nl > 286 || nd > 30) {
-                       abort_unzip(PASS_STATE_ONLY);   /* bad lengths */
-+              }
- 
-               /* read in bit-length-code lengths */
-               for (j = 0; j < nb; j++) {
-@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
-               bl = lbits;
- 
-               i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, 
&bl);
--              if (i != 0)
-+              if (i != 0) {
-                       abort_unzip(PASS_STATE_ONLY);
-+              }
-               bd = dbits;
-               i = huft_build(ll + nl, nd, 0, cpdist, cpdext, 
&inflate_codes_td, &bd);
--              if (i != 0)
-+              if (i != 0) {
-                       abort_unzip(PASS_STATE_ONLY);
-+              }
- 
-               /* set up data for inflate_codes() */
-               inflate_codes_setup(PASS_STATE bl, bd);
-@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t 
*xstate)
-       error_msg = "corrupted data";
-       if (setjmp(error_jmp)) {
-               /* Error from deep inside zip machinery */
-+              bb_error_msg(error_msg);
-               n = -1;
-               goto ret;
-       }
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index ca0a458..d8738a3 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -34,6 +34,7 @@ rm foo.zip
- testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
- "Archive:  bad.zip
-   inflating: ]3j½r«IK-%Ix
-+unzip: corrupted data
- unzip: inflate error
- 1
- " \
--- 
-2.6.2
-

diff --git a/sys-apps/busybox/files/busybox-1.24.1-unzip.patch 
b/sys-apps/busybox/files/busybox-1.24.1-unzip.patch
deleted file mode 100644
index 722b5fb..00000000
--- a/sys-apps/busybox/files/busybox-1.24.1-unzip.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-https://bugs.gentoo.org/564246
-
-From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.li...@googlemail.com>
-Date: Mon, 26 Oct 2015 19:33:05 +0100
-Subject: [PATCH] unzip: test for bad archive SEGVing
-
-function                                             old     new   delta
-huft_build                                          1296    1300      +4
-
-Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
----
- archival/libarchive/decompress_gunzip.c | 11 +++++++----
- testsuite/unzip.tests                   | 23 ++++++++++++++++++++++-
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/archival/libarchive/decompress_gunzip.c 
b/archival/libarchive/decompress_gunzip.c
-index 7b6f459..30bf451 100644
---- a/archival/libarchive/decompress_gunzip.c
-+++ b/archival/libarchive/decompress_gunzip.c
-@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned 
n,
-       unsigned i;             /* counter, current code */
-       unsigned j;             /* counter */
-       int k;                  /* number of bits in current code */
--      unsigned *p;            /* pointer into c[], b[], or v[] */
-+      const unsigned *p;      /* pointer into c[], b[], or v[] */
-       huft_t *q;              /* points to current table */
-       huft_t r;               /* table entry for structure assignment */
-       huft_t *u[BMAX];        /* table stack */
-       unsigned v[N_MAX];      /* values in order of bit length */
-+      unsigned v_end;
-       int ws[BMAX + 1];       /* bits decoded stack */
-       int w;                  /* bits decoded */
-       unsigned x[BMAX + 1];   /* bit offsets, then code stack */
-@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
-       /* Generate counts for each bit length */
-       memset(c, 0, sizeof(c));
--      p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
-+      p = b;
-       i = n;
-       do {
-               c[*p]++; /* assume all entries <= BMAX */
-@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned 
n,
-       }
- 
-       /* Make a table of values in order of bit lengths */
--      p = (unsigned *) b;
-+      p = b;
-       i = 0;
-+      v_end = 0;
-       do {
-               j = *p++;
-               if (j != 0) {
-                       v[x[j]++] = i;
-+                      v_end = x[j];
-               }
-       } while (++i < n);
- 
-@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
- 
-                       /* set up table entry in r */
-                       r.b = (unsigned char) (k - w);
--                      if (p >= v + n) {
-+                      if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] 
can be shorter!
-                               r.e = 99; /* out of values--invalid code */
-                       } else if (*p < s) {
-                               r.e = (unsigned char) (*p < 256 ? 16 : 15);     
/* 256 is EOB code */
-diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
-index 8677a03..ca0a458 100755
---- a/testsuite/unzip.tests
-+++ b/testsuite/unzip.tests
-@@ -7,7 +7,7 @@
- 
- . ./testing.sh
- 
--# testing "test name" "options" "expected result" "file input" "stdin"
-+# testing "test name" "commands" "expected result" "file input" "stdin"
- #   file input will be file called "input"
- #   test can create a file "actual" instead of writing to stdout
- 
-@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && 
test -d foo && test ! -f
- rmdir foo
- rm foo.zip
- 
-+# File containing some damaged encrypted stream
-+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
-+"Archive:  bad.zip
-+  inflating: ]3j½r«IK-%Ix
-+unzip: inflate error
-+1
-+" \
-+"" "\
-+begin-base64 644 bad.zip
-+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
-+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
-+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
-+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
-+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
-+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
-+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
-+====
-+"
-+
-+rm *
-+
- # Clean up scratch directory.
- 
- cd ..
--- 
-2.6.2
-

diff --git a/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2147.patch 
b/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2147.patch
deleted file mode 100644
index 2187c9b..00000000
--- a/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2147.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 3c4de6e36c4d387a648622e7b828a05f2b1b47e6 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.li...@googlemail.com>
-Date: Fri, 26 Feb 2016 15:54:56 +0100
-Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
- buffer)
-
-Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
-Signed-off-by: Mike Frysinger <vap...@gentoo.org>
-(cherry picked from commit 352f79acbd759c14399e39baef21fc4ffe180ac2)
----
- networking/udhcp/common.c | 15 +++++++++++++--
- networking/udhcp/dhcpc.c  |  4 ++--
- 2 files changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
-index bc41c8d..680852c 100644
---- a/networking/udhcp/common.c
-+++ b/networking/udhcp/common.c
-@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 =
-  * udhcp_str2optset: to determine how many bytes to allocate.
-  * xmalloc_optname_optval: to estimate string length
-  * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
-- * is the number of elements, multiply in by one element's string width
-+ * is the number of elements, multiply it by one element's string width
-  * (len_of_option_as_string[opt_type]) and you know how wide string you need.
-  */
- const uint8_t dhcp_option_lengths[] ALIGN1 = {
-@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = {
-       [OPTION_S32] =     4,
-       /* Just like OPTION_STRING, we use minimum length here */
-       [OPTION_STATIC_ROUTES] = 5,
--      [OPTION_6RD] =    22,  /* ignored by udhcp_str2optset */
-+      [OPTION_6RD] =    12,  /* ignored by udhcp_str2optset */
-+      /* The above value was chosen as follows:
-+       * len_of_option_as_string[] for this option is >60: it's a string of 
the form
-+       * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
-+       * Each additional ipv4 address takes 4 bytes in binary option and 
appends
-+       * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 
4
-+       * but this severely overestimates string length: instead of 16 bytes,
-+       * it adds >60 for every 4 bytes in binary option.
-+       * We cheat and declare here that option is in units of 12 bytes.
-+       * This adds more than 60 bytes for every three ipv4 addresses - more 
than enough.
-+       * (Even 16 instead of 12 should work, but let's be paranoid).
-+       */
- };
- 
- 
-diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
-index 915f659..2332b57 100644
---- a/networking/udhcp/dhcpc.c
-+++ b/networking/udhcp/dhcpc.c
-@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = {
-       [OPTION_IP              ] = sizeof("255.255.255.255 "),
-       [OPTION_IP_PAIR         ] = sizeof("255.255.255.255 ") * 2,
-       [OPTION_STATIC_ROUTES   ] = sizeof("255.255.255.255/32 255.255.255.255 
"),
--      [OPTION_6RD             ] = sizeof("32 128 
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-+      [OPTION_6RD             ] = sizeof("132 128 
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
-       [OPTION_STRING          ] = 1,
-       [OPTION_STRING_HOST     ] = 1,
- #if ENABLE_FEATURE_UDHCP_RFC3397
-@@ -220,7 +220,7 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t 
*option, const struct dhcp_
-       type = optflag->flags & OPTION_TYPE_MASK;
-       optlen = dhcp_option_lengths[type];
-       upper_length = len_of_option_as_string[type]
--              * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
-+              * ((unsigned)(len + optlen) / (unsigned)optlen);
- 
-       dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
-       dest += sprintf(ret, "%s=", opt_name);
--- 
-2.7.4
-

diff --git a/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2148.patch 
b/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2148.patch
deleted file mode 100644
index 08e08be..00000000
--- a/sys-apps/busybox/files/busybox-1.24.2-CVE-2016-2148.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 3a76bb5136d05f94ee62e377aa723e63444912c7 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.li...@googlemail.com>
-Date: Thu, 10 Mar 2016 11:47:58 +0100
-Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
-
-Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
-Signed-off-by: Mike Frysinger <vap...@gentoo.org>
-(cherry picked from commit d474ffc68290e0a83651c4432eeabfa62cd51e87)
----
- networking/udhcp/domain_codec.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
-index c1325d8..8429367 100644
---- a/networking/udhcp/domain_codec.c
-+++ b/networking/udhcp/domain_codec.c
-@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t *cstr, int clen, 
const char *pre)
-                               if (crtpos + *c + 1 > clen) /* label too long? 
abort */
-                                       return NULL;
-                               if (dst)
--                                      memcpy(dst + len, c + 1, *c);
-+                                      /* \3com ---> "com." */
-+                                      ((char*)mempcpy(dst + len, c + 1, 
*c))[0] = '.';
-                               len += *c + 1;
-                               crtpos += *c + 1;
--                              if (dst)
--                                      dst[len - 1] = '.';
-                       } else {
-                               /* NUL: end of current domain name */
-                               if (retpos == 0) {
-@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t *cstr, int clen, 
const char *pre)
-                                       crtpos = retpos;
-                                       retpos = depth = 0;
-                               }
--                              if (dst)
-+                              if (dst && len != 0)
-+                                      /* \4host\3com\0\4host and we are at \0:
-+                                       * \3com was converted to "com.", 
change dot to space.
-+                                       */
-                                       dst[len - 1] = ' ';
-                       }
- 
-@@ -228,6 +230,9 @@ int main(int argc, char **argv)
-       int len;
-       uint8_t *encoded;
- 
-+        uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
-+        printf("NUL:'%s'\n",   dname_dec(str, 6, ""));
-+
- #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), 
sizeof(encoded), (pre))
-       printf("'%s'\n",       DNAME_DEC("\4host\3com\0", "test1:"));
-       printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
--- 
-2.7.4
-

diff --git a/sys-apps/busybox/files/busybox-1.24.2-ash-recursive-heredocs.patch 
b/sys-apps/busybox/files/busybox-1.24.2-ash-recursive-heredocs.patch
deleted file mode 100644
index 5405eaf..00000000
--- a/sys-apps/busybox/files/busybox-1.24.2-ash-recursive-heredocs.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 4194c2875310c13ee3ca2bb0e1aea6a2ae67c55a Mon Sep 17 00:00:00 2001
-From: Ron Yorston <r...@pobox.com>
-Date: Thu, 29 Oct 2015 16:44:56 +0000
-Subject: [PATCH] ash: fix error during recursive processing of here document
-
-Save the value of the checkkwd flag to prevent it being clobbered
-during recursion.
-
-Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git
-by Herbert Xu.
-
-function                                             old     new   delta
-readtoken                                            190     203     +13
-------------------------------------------------------------------------------
-(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0)               Total: 13 bytes
-
-Signed-off-by: Ron Yorston <r...@pobox.com>
-Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com>
-Signed-off-by: Mike Frysinger <vap...@gentoo.org>
-(cherry picked from commit 713f07d906d9171953be0c12e2369869855b6ca6)
----
- shell/ash.c                               | 5 +++--
- shell/ash_test/ash-heredoc/heredoc3.right | 1 +
- shell/ash_test/ash-heredoc/heredoc3.tests | 9 +++++++++
- 3 files changed, 13 insertions(+), 2 deletions(-)
- create mode 100644 shell/ash_test/ash-heredoc/heredoc3.right
- create mode 100755 shell/ash_test/ash-heredoc/heredoc3.tests
-
-diff --git a/shell/ash.c b/shell/ash.c
-index 8a1628e..256e933 100644
---- a/shell/ash.c
-+++ b/shell/ash.c
-@@ -11893,6 +11893,7 @@ static int
- readtoken(void)
- {
-       int t;
-+      int kwd = checkkwd;
- #if DEBUG
-       smallint alreadyseen = tokpushback;
- #endif
-@@ -11906,7 +11907,7 @@ readtoken(void)
-       /*
-        * eat newlines
-        */
--      if (checkkwd & CHKNL) {
-+      if (kwd & CHKNL) {
-               while (t == TNL) {
-                       parseheredoc();
-                       t = xxreadtoken();
-@@ -11920,7 +11921,7 @@ readtoken(void)
-       /*
-        * check for keywords
-        */
--      if (checkkwd & CHKKWD) {
-+      if (kwd & CHKKWD) {
-               const char *const *pp;
- 
-               pp = findkwd(wordtext);
-diff --git a/shell/ash_test/ash-heredoc/heredoc3.right 
b/shell/ash_test/ash-heredoc/heredoc3.right
-new file mode 100644
-index 0000000..ce01362
---- /dev/null
-+++ b/shell/ash_test/ash-heredoc/heredoc3.right
-@@ -0,0 +1 @@
-+hello
-diff --git a/shell/ash_test/ash-heredoc/heredoc3.tests 
b/shell/ash_test/ash-heredoc/heredoc3.tests
-new file mode 100755
-index 0000000..96c227c
---- /dev/null
-+++ b/shell/ash_test/ash-heredoc/heredoc3.tests
-@@ -0,0 +1,9 @@
-+echo hello >greeting
-+cat <<EOF &&
-+$(cat greeting)
-+EOF
-+{
-+      echo $?
-+      cat greeting
-+} >/dev/null
-+rm greeting
--- 
-2.7.4
-

Reply via email to