diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-11-05 00:52:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-11-05 00:52:11 +0000 |
commit | b662a08294a40e708f8970006fe672458059d61b (patch) | |
tree | 73b0b12ac0c4937967072741321170b27111e7f2 /sys-apps | |
parent | Version bump. Support devicekit-disk locking and improve dmraid support, bug ... (diff) | |
download | historical-b662a08294a40e708f8970006fe672458059d61b.tar.gz historical-b662a08294a40e708f8970006fe672458059d61b.tar.bz2 historical-b662a08294a40e708f8970006fe672458059d61b.zip |
old
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/busybox/busybox-1.12.2-r1.ebuild | 254 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.13.3.ebuild | 251 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.13.4.ebuild | 250 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.10.1-mdev-exec.patch | 11 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.11.1-ppc-ifile.patch | 12 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.12.1-grep.patch | 28 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.12.1-modprobe.patch | 33 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.12.1-standalone.patch | 185 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.12.2-getopt.patch | 22 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.12.2-lineedit.patch | 13 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.13.1-bindtodevice.patch | 86 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.13.1-crond.patch | 20 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.13.1-init.patch | 28 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.13.1-ip.patch | 11 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.13.1-printf.patch | 19 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-devmem.patch | 128 |
16 files changed, 0 insertions, 1351 deletions
diff --git a/sys-apps/busybox/busybox-1.12.2-r1.ebuild b/sys-apps/busybox/busybox-1.12.2-r1.ebuild deleted file mode 100644 index 43e286c855c6..000000000000 --- a/sys-apps/busybox/busybox-1.12.2-r1.ebuild +++ /dev/null @@ -1,254 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.12.2-r1.ebuild,v 1.11 2009/01/12 14:42:19 vapier Exp $ - -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 make-symlinks pam selinux static" -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:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;; - n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; - *) use $1 \ - && busybox_config_option y $2 \ - || busybox_config_option n $2 - return 0 - ;; - esac - einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) -} - -src_unpack() { - unset KBUILD_OUTPUT #88088 - - unpack ${MY_P}.tar.bz2 - cd "${S}" - - # patches go here! - epatch "${FILESDIR}"/busybox-1.11.1-bb.patch - epatch "${FILESDIR}"/busybox-${PV}-*.patch - - # include this upstream later.. - epatch "${FILESDIR}"/busybox-devmem.patch - - epatch "${FILESDIR}"/busybox-1.12.0-mdev-exec.patch - - # work around broken ass powerpc compilers - use ppc64 && append-flags -mminimal-toc - # 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 '/^#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 "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - Makefile || die - - # 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 FEATURE_SH_IS_ASH - busybox_config_option n FEATURE_SH_IS_NONE - - 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 \ - APP_UDHCPD \ - CRONTAB \ - DC DEBUG_CROND_OPTION DEBUG_INIT DPKG \ - FAKEIDENTD FBSPLASH FEATURE_UDHCP_DEBUG FOLD FTP{GET,PUT} \ - HTTPD HUSH \ - INETD INOTIFYD IPCALC \ - LASH LOCALE_SUPPORT LOGNAME \ - MSH \ - OD \ - SULOGIN \ - TASKSET TFTP{,D} \ - 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 && ! use pam ; then - mv busybox_unstripped{,.bak} - emake CONFIG_STATIC=y busybox || die "static build failed" - mv busybox_unstripped bb - mv busybox_unstripped{.bak,} - fi -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - newbin busybox_unstripped busybox || die - if use static || use pam ; then - dosym busybox /bin/bb || die - dosym bb /bin/busybox.static || die - else - dobin bb || die - fi - - insinto /$(get_libdir)/rcscripts/addons - doins "${FILESDIR}"/mdev-start.sh || die - - # bundle up the symlink files for use later - emake install || die - rm _install/bin/busybox - tar cf busybox-links.tar -C _install . || : #;die - insinto /usr/share/${PN} - doins busybox-links.tar || die - newins .config ${PF}.config || die - - dodoc AUTHORS README TODO - - cd docs || die - docinto txt - dodoc *.txt - docinto pod - dodoc *.pod - dohtml *.html *.sgml - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm - - cd bootfloppy || die - docinto bootfloppy - dodoc $(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.13.3.ebuild b/sys-apps/busybox/busybox-1.13.3.ebuild deleted file mode 100644 index fc9220ce2e07..000000000000 --- a/sys-apps/busybox/busybox-1.13.3.ebuild +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.13.3.ebuild,v 1.1 2009/03/09 05:01:57 vapier Exp $ - -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 make-symlinks pam selinux static" -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:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;; - n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; - *) use $1 \ - && busybox_config_option y $2 \ - || busybox_config_option n $2 - return 0 - ;; - esac - einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) -} - -src_unpack() { - unset KBUILD_OUTPUT #88088 - - unpack ${MY_P}.tar.bz2 - cd "${S}" - - # patches go here! - epatch "${FILESDIR}"/busybox-1.11.1-bb.patch - #epatch "${FILESDIR}"/busybox-${PV}-*.patch - - epatch "${FILESDIR}"/busybox-1.12.0-mdev-exec.patch - - # work around broken ass powerpc compilers - use ppc64 && append-flags -mminimal-toc - # 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 '/^#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 "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - Makefile || die - - # 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 FEATURE_SH_IS_ASH - busybox_config_option n FEATURE_SH_IS_NONE - - 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 \ - APP_UDHCPD \ - CRONTAB \ - DC DPKG \ - FAKEIDENTD FBSPLASH FOLD FTP{GET,PUT} \ - HTTPD HUSH \ - INETD INOTIFYD IPCALC \ - LASH LOCALE_SUPPORT LOGNAME \ - MSH \ - OD \ - SULOGIN \ - TASKSET TFTP{,D} \ - 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 && ! use pam ; then - mv busybox_unstripped{,.bak} - emake CONFIG_STATIC=y busybox || die "static build failed" - mv busybox_unstripped bb - mv busybox_unstripped{.bak,} - fi -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - newbin busybox_unstripped busybox || die - if use static || use pam ; then - dosym busybox /bin/bb || die - dosym bb /bin/busybox.static || die - else - dobin bb || die - fi - - insinto /$(get_libdir)/rcscripts/addons - doins "${FILESDIR}"/mdev-start.sh || die - - # bundle up the symlink files for use later - emake install || die - rm _install/bin/busybox - tar cf busybox-links.tar -C _install . || : #;die - insinto /usr/share/${PN} - doins busybox-links.tar || die - newins .config ${PF}.config || die - - dodoc AUTHORS README TODO - - cd docs || die - docinto txt - dodoc *.txt - docinto pod - dodoc *.pod - dohtml *.html *.sgml - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm - - cd bootfloppy || die - docinto bootfloppy - dodoc $(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.13.4.ebuild b/sys-apps/busybox/busybox-1.13.4.ebuild deleted file mode 100644 index 72456c2fa854..000000000000 --- a/sys-apps/busybox/busybox-1.13.4.ebuild +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.13.4.ebuild,v 1.1 2009/04/15 02:44:42 solar Exp $ - -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 make-symlinks pam selinux static" -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:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;; - n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;; - *) use $1 \ - && busybox_config_option y $2 \ - || busybox_config_option n $2 - return 0 - ;; - esac - einfo $(grep "CONFIG_$2[= ]" .config || echo Could not find CONFIG_$2 ...) -} - -src_unpack() { - unset KBUILD_OUTPUT #88088 - - unpack ${MY_P}.tar.bz2 - cd "${S}" - - # patches go here! - epatch "${FILESDIR}"/busybox-1.11.1-bb.patch - #epatch "${FILESDIR}"/busybox-${PV}-*.patch - - epatch "${FILESDIR}"/busybox-1.12.0-mdev-exec.patch - - # work around broken ass powerpc compilers - use ppc64 && append-flags -mminimal-toc - # 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 '/^#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 "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - Makefile || die - - # 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 FEATURE_SH_IS_ASH - busybox_config_option n FEATURE_SH_IS_NONE - - 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 DPKG \ - FAKEIDENTD FBSPLASH FOLD FTP{GET,PUT} \ - HUSH \ - INETD INOTIFYD IPCALC \ - LASH LOCALE_SUPPORT LOGNAME \ - MSH \ - OD \ - SULOGIN \ - TASKSET \ - 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 && ! use pam ; then - mv busybox_unstripped{,.bak} - emake CONFIG_STATIC=y busybox || die "static build failed" - mv busybox_unstripped bb - mv busybox_unstripped{.bak,} - fi -} - -src_install() { - unset KBUILD_OUTPUT #88088 - save_config .config - - into / - newbin busybox_unstripped busybox || die - if use static || use pam ; then - dosym busybox /bin/bb || die - dosym bb /bin/busybox.static || die - else - dobin bb || die - fi - - insinto /$(get_libdir)/rcscripts/addons - doins "${FILESDIR}"/mdev-start.sh || die - - # bundle up the symlink files for use later - emake install || die - rm _install/bin/busybox - tar cf busybox-links.tar -C _install . || : #;die - insinto /usr/share/${PN} - doins busybox-links.tar || die - newins .config ${PF}.config || die - - dodoc AUTHORS README TODO - - cd docs || die - docinto txt - dodoc *.txt - docinto pod - dodoc *.pod - dohtml *.html *.sgml - - cd ../examples || die - docinto examples - dodoc inittab depmod.pl *.conf *.script undeb unrpm - - cd bootfloppy || die - docinto bootfloppy - dodoc $(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.10.1-mdev-exec.patch b/sys-apps/busybox/files/busybox-1.10.1-mdev-exec.patch deleted file mode 100644 index ca7ee184973a..000000000000 --- a/sys-apps/busybox/files/busybox-1.10.1-mdev-exec.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- util-linux/mdev.c 2008-05-12 21:27:08.000000000 -0700 -+++ util-linux/mdev.c 2008-05-12 21:29:18.000000000 -0700 -@@ -202,7 +202,7 @@ - val = next; - if (ENABLE_FEATURE_MDEV_EXEC) { - const char *s = "@$*"; -- const char *s2 = strchr(s, *val); -+ char *s2 = strchr(s, *val); /* s2 must not be a const */ - - if (!s2) - bb_error_msg_and_die("bad line %u", lineno); diff --git a/sys-apps/busybox/files/busybox-1.11.1-ppc-ifile.patch b/sys-apps/busybox/files/busybox-1.11.1-ppc-ifile.patch deleted file mode 100644 index 9a9cffa4e309..000000000000 --- a/sys-apps/busybox/files/busybox-1.11.1-ppc-ifile.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- modutils/insmod.c.orig 2008-08-04 12:35:11.000000000 -0400 -+++ modutils/insmod.c 2008-08-04 11:16:06.000000000 -0400 -@@ -840,7 +840,8 @@ - ElfW(RelM) *rel, ElfW(Addr) v) - { - #if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \ -- || defined(__sh__) || defined(__s390__) || defined(__x86_64__) -+ || defined(__sh__) || defined(__s390__) || defined(__x86_64__) \ -+ || defined(__powerpc__) - struct arch_file *ifile = (struct arch_file *) f; - #endif - enum obj_reloc ret = obj_reloc_ok; diff --git a/sys-apps/busybox/files/busybox-1.12.1-grep.patch b/sys-apps/busybox/files/busybox-1.12.1-grep.patch deleted file mode 100644 index f42732aaac24..000000000000 --- a/sys-apps/busybox/files/busybox-1.12.1-grep.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urpN busybox-1.12.1/findutils/grep.c busybox-1.12.1-grep/findutils/grep.c ---- busybox-1.12.1/findutils/grep.c 2008-09-28 20:04:28.000000000 +0200 -+++ busybox-1.12.1-grep/findutils/grep.c 2008-10-10 14:39:09.000000000 +0200 -@@ -363,12 +363,22 @@ static int grep_file(FILE *file) - * (unless -v: -Fov doesnt print anything at all) */ - if (found) - print_line(gl->pattern, strlen(gl->pattern), linenum, ':'); -- } else { -+ } else while (1) { -+ char old = line[gl->matched_range.rm_eo]; - line[gl->matched_range.rm_eo] = '\0'; - print_line(line + gl->matched_range.rm_so, - gl->matched_range.rm_eo - gl->matched_range.rm_so, - linenum, ':'); -- } -+ line[gl->matched_range.rm_eo] = old; -+#if !ENABLE_EXTRA_COMPAT -+ break; -+#else -+ if (re_search(&gl->compiled_regex, line, line_len, -+ gl->matched_range.rm_eo, line_len - gl->matched_range.rm_eo, -+ &gl->matched_range) < 0) -+ break; -+#endif -+ } - } else { - print_line(line, line_len, linenum, ':'); - } diff --git a/sys-apps/busybox/files/busybox-1.12.1-modprobe.patch b/sys-apps/busybox/files/busybox-1.12.1-modprobe.patch deleted file mode 100644 index a305c008c9eb..000000000000 --- a/sys-apps/busybox/files/busybox-1.12.1-modprobe.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urpN busybox-1.12.1/modutils/modprobe.c busybox-1.12.1-modprobe/modutils/modprobe.c ---- busybox-1.12.1/modutils/modprobe.c 2008-09-28 20:04:15.000000000 +0200 -+++ busybox-1.12.1-modprobe/modutils/modprobe.c 2008-10-10 14:36:58.000000000 +0200 -@@ -263,9 +263,9 @@ static int FAST_FUNC include_conf_dir_ac - return TRUE; - } - --static int include_conf_recursive(struct include_conf_t *conf, const char *filename) -+static int include_conf_recursive(struct include_conf_t *conf, const char *filename, int flags) - { -- return recursive_action(filename, ACTION_RECURSE, -+ return recursive_action(filename, ACTION_RECURSE | flags, - include_conf_file_act, - include_conf_dir_act, - conf, 1); -@@ -362,7 +362,7 @@ static int FAST_FUNC include_conf_file_a - char *includefile; - - includefile = skip_whitespace(line_buffer + 8); -- include_conf_recursive(conf, includefile); -+ include_conf_recursive(conf, includefile, 0); - } else if (ENABLE_FEATURE_MODPROBE_BLACKLIST && - (is_conf_command(line_buffer, "blacklist"))) { - char *mod; -@@ -559,7 +559,7 @@ static struct dep_t *build_dep(void) - if (ENABLE_FEATURE_2_6_MODULES) { - if (include_conf_file(&conf, "/etc/modprobe.conf")) - r = TRUE; -- if (include_conf_recursive(&conf, "/etc/modprobe.d")) -+ if (include_conf_recursive(&conf, "/etc/modprobe.d", ACTION_QUIET)) - r = TRUE; - } - if (ENABLE_FEATURE_2_4_MODULES && !r) diff --git a/sys-apps/busybox/files/busybox-1.12.1-standalone.patch b/sys-apps/busybox/files/busybox-1.12.1-standalone.patch deleted file mode 100644 index f1827c74e184..000000000000 --- a/sys-apps/busybox/files/busybox-1.12.1-standalone.patch +++ /dev/null @@ -1,185 +0,0 @@ -diff -urpN busybox-1.12.1/coreutils/env.c busybox-1.12.1-standalone/coreutils/env.c ---- busybox-1.12.1/coreutils/env.c 2008-09-28 20:04:18.000000000 +0200 -+++ busybox-1.12.1-standalone/coreutils/env.c 2008-10-20 10:21:54.000000000 +0200 -@@ -29,6 +29,8 @@ - * - use xfunc_error_retval - */ - -+/* This is a NOEXEC applet. Be very careful! */ -+ - #include "libbb.h" - - #if ENABLE_FEATURE_ENV_LONG_OPTIONS -@@ -119,5 +121,3 @@ int env_main(int argc UNUSED_PARAM, char - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -- -- -diff -urpN busybox-1.12.1/include/applets.h busybox-1.12.1-standalone/include/applets.h ---- busybox-1.12.1/include/applets.h 2008-09-28 20:04:26.000000000 +0200 -+++ busybox-1.12.1-standalone/include/applets.h 2008-10-20 10:21:54.000000000 +0200 -@@ -136,7 +136,7 @@ USE_ECHO(APPLET_NOFORK(echo, echo, _BB_D - USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_FEATURE_GREP_EGREP_ALIAS(APPLET_ODDNAME(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, egrep)) - USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) --USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -+USE_ENV(APPLET_NOEXEC(env, env, _BB_DIR_USR_BIN, _BB_SUID_NEVER, env)) - USE_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir)) - USE_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid)) - USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake)) -@@ -171,7 +171,7 @@ USE_GREP(APPLET(grep, _BB_DIR_BIN, _BB_S - USE_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER)) --USE_HD(APPLET_ODDNAME(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd)) -+USE_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd)) - USE_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) - USE_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump)) -diff -urpN busybox-1.12.1/libbb/getopt32.c busybox-1.12.1-standalone/libbb/getopt32.c ---- busybox-1.12.1/libbb/getopt32.c 2008-09-28 20:04:20.000000000 +0200 -+++ busybox-1.12.1-standalone/libbb/getopt32.c 2008-10-20 10:21:34.000000000 +0200 -@@ -515,28 +515,6 @@ getopt32(char **argv, const char *applet - } - } - -- /* In case getopt32 was already called: -- * reset the libc getopt() function, which keeps internal state. -- * -- * BSD-derived getopt() functions require that optind be set to 1 in -- * order to reset getopt() state. This used to be generally accepted -- * way of resetting getopt(). However, glibc's getopt() -- * has additional getopt() state beyond optind, and requires that -- * optind be set to zero to reset its state. So the unfortunate state of -- * affairs is that BSD-derived versions of getopt() misbehave if -- * optind is set to 0 in order to reset getopt(), and glibc's getopt() -- * will core dump if optind is set 1 in order to reset getopt(). -- * -- * More modern versions of BSD require that optreset be set to 1 in -- * order to reset getopt(). Sigh. Standards, anyone? -- */ --#ifdef __GLIBC__ -- optind = 0; --#else /* BSD style */ -- optind = 1; -- /* optreset = 1; */ --#endif -- /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */ - pargv = NULL; - - /* Note: just "getopt() <= 0" will not work well for -diff -urpN busybox-1.12.1/libbb/vfork_daemon_rexec.c busybox-1.12.1-standalone/libbb/vfork_daemon_rexec.c ---- busybox-1.12.1/libbb/vfork_daemon_rexec.c 2008-09-28 20:04:20.000000000 +0200 -+++ busybox-1.12.1-standalone/libbb/vfork_daemon_rexec.c 2008-10-20 10:21:34.000000000 +0200 -@@ -125,6 +125,7 @@ int FAST_FUNC run_nofork_applet_prime(st - int rc, argc; - - applet_name = APPLET_NAME(applet_no); -+ - xfunc_error_retval = EXIT_FAILURE; - - /* Special flag for xfunc_die(). If xfunc will "die" -@@ -132,7 +133,30 @@ int FAST_FUNC run_nofork_applet_prime(st - * die_sleep and longjmp here instead. */ - die_sleep = -1; - -- /* option_mask32 = 0; - not needed */ -+ /* In case getopt() or getopt32() was already called: -+ * reset the libc getopt() function, which keeps internal state. -+ * -+ * BSD-derived getopt() functions require that optind be set to 1 in -+ * order to reset getopt() state. This used to be generally accepted -+ * way of resetting getopt(). However, glibc's getopt() -+ * has additional getopt() state beyond optind, and requires that -+ * optind be set to zero to reset its state. So the unfortunate state of -+ * affairs is that BSD-derived versions of getopt() misbehave if -+ * optind is set to 0 in order to reset getopt(), and glibc's getopt() -+ * will core dump if optind is set 1 in order to reset getopt(). -+ * -+ * More modern versions of BSD require that optreset be set to 1 in -+ * order to reset getopt(). Sigh. Standards, anyone? -+ */ -+#ifdef __GLIBC__ -+ optind = 0; -+#else /* BSD style */ -+ optind = 1; -+ /* optreset = 1; */ -+#endif -+ /* optarg = NULL; opterr = 1; optopt = 63; - do we need this too? */ -+ /* (values above are what they initialized to in glibc and uclibc) */ -+ /* option_mask32 = 0; - not needed, no applet depends on it being 0 */ - - argc = 1; - while (argv[argc]) -@@ -161,8 +185,16 @@ int FAST_FUNC run_nofork_applet_prime(st - rc = 0; - } - -- /* Restoring globals */ -+ /* Restoring some globals */ - restore_nofork_data(old); -+ -+ /* Other globals can be simply reset to defaults */ -+#ifdef __GLIBC__ -+ optind = 0; -+#else /* BSD style */ -+ optind = 1; -+#endif -+ - return rc & 0xff; /* don't confuse people with "exitcodes" >255 */ - } - -diff -urpN busybox-1.12.1/shell/ash.c busybox-1.12.1-standalone/shell/ash.c ---- busybox-1.12.1/shell/ash.c 2008-09-28 20:04:18.000000000 +0200 -+++ busybox-1.12.1-standalone/shell/ash.c 2008-10-20 10:21:54.000000000 +0200 -@@ -6964,8 +6964,11 @@ tryexec(USE_FEATURE_SH_STANDALONE(int ap - - #if ENABLE_FEATURE_SH_STANDALONE - if (applet_no >= 0) { -- if (APPLET_IS_NOEXEC(applet_no)) -+ if (APPLET_IS_NOEXEC(applet_no)) { -+ while (*envp) -+ putenv(*envp++); - run_applet_no_and_exit(applet_no, argv); -+ } - /* re-exec ourselves with the new arguments */ - execve(bb_busybox_exec_path, argv, envp); - /* If they called chroot or otherwise made the binary no longer -@@ -12014,7 +12017,7 @@ exportcmd(int argc UNUSED_PARAM, char ** - char *name; - const char *p; - char **aptr; -- int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT; -+ int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT; - - if (nextopt("p") != 'p') { - aptr = argptr; -diff -urpN busybox-1.12.1/util-linux/getopt.c busybox-1.12.1-standalone/util-linux/getopt.c ---- busybox-1.12.1/util-linux/getopt.c 2008-09-28 20:04:30.000000000 +0200 -+++ busybox-1.12.1-standalone/util-linux/getopt.c 2008-10-20 10:21:34.000000000 +0200 -@@ -142,7 +142,8 @@ static const char *normalize(const char - * Other settings are found in global variables. - */ - #if !ENABLE_GETOPT_LONG --#define generate_output(argv,argc,optstr,longopts) generate_output(argv,argc,optstr) -+#define generate_output(argv,argc,optstr,longopts) \ -+ generate_output(argv,argc,optstr) - #endif - static int generate_output(char **argv, int argc, const char *optstr, const struct option *longopts) - { -@@ -156,14 +157,6 @@ static int generate_output(char **argv, - if (quiet_errors) /* No error reporting from getopt(3) */ - opterr = 0; - -- /* Reset getopt(3) (see libbb/getopt32.c for long rant) */ --#ifdef __GLIBC__ -- optind = 0; --#else /* BSD style */ -- optind = 1; -- /* optreset = 1; */ --#endif -- - while (1) { - opt = - #if ENABLE_GETOPT_LONG diff --git a/sys-apps/busybox/files/busybox-1.12.2-getopt.patch b/sys-apps/busybox/files/busybox-1.12.2-getopt.patch deleted file mode 100644 index bdc8b9327e13..000000000000 --- a/sys-apps/busybox/files/busybox-1.12.2-getopt.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- busybox-1.12.2/libbb/getopt32.c Sun Nov 9 18:20:37 2008 -+++ busybox-1.12.2-getopt/libbb/getopt32.c Wed Nov 12 23:03:33 2008 -@@ -515,6 +515,19 @@ - } - } - -+ /* In case getopt32 was already called: -+ * reset the libc getopt() function, which keeps internal state. -+ * run_nofork_applet_prime() does this, but we might end up here -+ * also via gunzip_main() -> gzip_main(). Play safe. -+ */ -+#ifdef __GLIBC__ -+ optind = 0; -+#else /* BSD style */ -+ optind = 1; -+ /* optreset = 1; */ -+#endif -+ /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */ -+ - pargv = NULL; - - /* Note: just "getopt() <= 0" will not work well for diff --git a/sys-apps/busybox/files/busybox-1.12.2-lineedit.patch b/sys-apps/busybox/files/busybox-1.12.2-lineedit.patch deleted file mode 100644 index b7051c0d80a1..000000000000 --- a/sys-apps/busybox/files/busybox-1.12.2-lineedit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- busybox-1.12.2/libbb/lineedit.c Sun Nov 9 18:20:16 2008 -+++ busybox-1.12.2-lineedit/libbb/lineedit.c Tue Nov 11 21:02:04 2008 -@@ -1415,8 +1415,10 @@ - if ((state->flags & SAVE_HISTORY) && state->hist_file) - load_history(state->hist_file); - #endif -+#if MAX_HISTORY > 0 - if (state->flags & DO_HISTORY) - state->cur_history = state->cnt_history; -+#endif - - /* prepare before init handlers */ - cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */ diff --git a/sys-apps/busybox/files/busybox-1.13.1-bindtodevice.patch b/sys-apps/busybox/files/busybox-1.13.1-bindtodevice.patch deleted file mode 100644 index 1894145292c5..000000000000 --- a/sys-apps/busybox/files/busybox-1.13.1-bindtodevice.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- busybox-1.13.1/include/libbb.h Sun Nov 9 18:28:17 2008 -+++ busybox-1.13.1-bindtodevice/include/libbb.h Wed Dec 10 12:10:30 2008 -@@ -437,6 +437,7 @@ - * Turn it on before you call bind(). */ - void setsockopt_reuseaddr(int fd) FAST_FUNC; /* On Linux this never fails. */ - int setsockopt_broadcast(int fd) FAST_FUNC; -+int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC; - /* NB: returns port in host byte order */ - unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC; - typedef struct len_and_sockaddr { ---- busybox-1.13.1/libbb/xconnect.c Sun Nov 9 18:28:09 2008 -+++ busybox-1.13.1-bindtodevice/libbb/xconnect.c Wed Dec 10 23:20:29 2008 -@@ -7,6 +7,7 @@ - */ - - #include <netinet/in.h> -+#include <net/if.h> - #include "libbb.h" - - void FAST_FUNC setsockopt_reuseaddr(int fd) -@@ -17,6 +18,20 @@ - { - return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &const_int_1, sizeof(const_int_1)); - } -+int FAST_FUNC setsockopt_bindtodevice(int fd, const char *iface) -+{ -+ int r; -+ struct ifreq ifr; -+ strncpy(ifr.ifr_name, iface, IFNAMSIZ); -+ /* Actually, ifr_name is at offset 0, and in practice -+ * just giving char[IFNAMSIZ] instead of struct ifreq works too. -+ * But just in case it's not true on some obscure arch... */ -+ r = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)); -+ if (r) -+ bb_perror_msg("can't bind to interface %s", iface); -+ return r; -+} -+ - - void FAST_FUNC xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) - { ---- busybox-1.13.1/networking/arping.c Sun Nov 9 18:27:59 2008 -+++ busybox-1.13.1-bindtodevice/networking/arping.c Wed Dec 10 12:10:30 2008 -@@ -322,8 +322,7 @@ - struct sockaddr_in saddr; - int probe_fd = xsocket(AF_INET, SOCK_DGRAM, 0); - -- if (setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device) + 1) == -1) -- bb_perror_msg("cannot bind to device %s", device); -+ setsockopt_bindtodevice(probe_fd, device); - memset(&saddr, 0, sizeof(saddr)); - saddr.sin_family = AF_INET; - if (src.s_addr) { ---- busybox-1.13.1/networking/ping.c Sun Nov 9 18:27:59 2008 -+++ busybox-1.13.1-bindtodevice/networking/ping.c Wed Dec 10 12:10:30 2008 -@@ -572,7 +572,7 @@ - xbind(pingsock, &source_lsa->u.sa, source_lsa->len); - } - if (str_I) -- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, str_I, strlen(str_I) + 1); -+ setsockopt_bindtodevice(pingsock, str_I); - - /* enable broadcast pings */ - setsockopt_broadcast(pingsock); -@@ -622,7 +622,7 @@ - if (source_lsa) - xbind(pingsock, &source_lsa->u.sa, source_lsa->len); - if (str_I) -- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, str_I, strlen(str_I) + 1); -+ setsockopt_bindtodevice(pingsock, str_I); - - #ifdef ICMP6_FILTER - { ---- busybox-1.13.1/networking/udhcp/socket.c Sun Nov 9 18:27:58 2008 -+++ busybox-1.13.1-bindtodevice/networking/udhcp/socket.c Wed Dec 10 12:10:30 2008 -@@ -98,8 +98,8 @@ - bb_perror_msg_and_die("SO_BROADCAST"); - - /* NB: bug 1032 says this doesn't work on ethernet aliases (ethN:M) */ -- if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &inf, strlen(inf) + 1) == -1) -- bb_perror_msg_and_die("SO_BINDTODEVICE"); -+ if (setsockopt_bindtodevice(fd, inf)) -+ xfunc_die(); /* warning is already printed */ - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; diff --git a/sys-apps/busybox/files/busybox-1.13.1-crond.patch b/sys-apps/busybox/files/busybox-1.13.1-crond.patch deleted file mode 100644 index ca7e79c44b85..000000000000 --- a/sys-apps/busybox/files/busybox-1.13.1-crond.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- busybox-1.13.1/miscutils/crond.c Sun Nov 9 18:28:17 2008 -+++ busybox-1.13.1-crond/miscutils/crond.c Thu Dec 4 14:56:10 2008 -@@ -779,6 +779,8 @@ - xmove_fd(mailFd, mail_filename ? 1 : 0); - dup2(1, 2); - } -+ /* crond 3.0pl1-100 puts tasks in separate process groups */ -+ bb_setpgrp(); - execlp(prog, prog, cmd, arg, NULL); - crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg); - if (mail_filename) { -@@ -914,6 +916,8 @@ - if (DebugOpt) { - crondlog(LVL5 "child running %s", DEFAULT_SHELL); - } -+ /* crond 3.0pl1-100 puts tasks in separate process groups */ -+ bb_setpgrp(); - execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL); - crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, - DEFAULT_SHELL, "-c", line->cl_Shell); diff --git a/sys-apps/busybox/files/busybox-1.13.1-init.patch b/sys-apps/busybox/files/busybox-1.13.1-init.patch deleted file mode 100644 index 23187720fc8e..000000000000 --- a/sys-apps/busybox/files/busybox-1.13.1-init.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- busybox-1.13.1/init/init.c Sat Nov 29 07:48:56 2008 -+++ busybox-1.13.1-init/init/init.c Tue Dec 9 22:17:43 2008 -@@ -118,18 +118,18 @@ - - msg[0] = '\r'; - va_start(arguments, fmt); -- l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments); -- if (l > sizeof(msg) - 2) -- l = sizeof(msg) - 2; -+ l = 1 + vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments); -+ if (l > sizeof(msg) - 1) -+ l = sizeof(msg) - 1; - msg[l] = '\0'; - va_end(arguments); - - if (ENABLE_FEATURE_INIT_SYSLOG) { -- /* Log the message to syslogd */ - if (where & L_LOG) { -- /* don't print out "\r" */ -- openlog(applet_name, 0, LOG_DAEMON); -- syslog(LOG_INFO, "init: %s", msg + 1); -+ /* Log the message to syslogd */ -+ openlog("init", 0, LOG_DAEMON); -+ /* don't print "\r" */ -+ syslog(LOG_INFO, "%s", msg + 1); - closelog(); - } - msg[l++] = '\n'; diff --git a/sys-apps/busybox/files/busybox-1.13.1-ip.patch b/sys-apps/busybox/files/busybox-1.13.1-ip.patch deleted file mode 100644 index 50a9b270170a..000000000000 --- a/sys-apps/busybox/files/busybox-1.13.1-ip.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- busybox-1.13.1/networking/ip.c Sun Nov 9 18:27:59 2008 -+++ busybox-1.13.1-ip/networking/ip.c Thu Dec 4 13:16:29 2008 -@@ -31,7 +31,7 @@ - - static int ip_do(int (*ip_func)(char **argv), char **argv) - { -- argv = ip_parse_common_args(argv); -+ argv = ip_parse_common_args(argv + 1); - return ip_func(argv); - } - diff --git a/sys-apps/busybox/files/busybox-1.13.1-printf.patch b/sys-apps/busybox/files/busybox-1.13.1-printf.patch deleted file mode 100644 index 43f4135b688c..000000000000 --- a/sys-apps/busybox/files/busybox-1.13.1-printf.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- busybox-1.13.1/coreutils/printf.c Sun Nov 9 18:28:07 2008 -+++ busybox-1.13.1-printf/coreutils/printf.c Wed Dec 10 12:50:55 2008 -@@ -359,8 +359,15 @@ - * We will mimic coreutils. */ - if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) - argv++; -- if (!argv[1]) -+ if (!argv[1]) { -+ if (ENABLE_ASH_BUILTIN_PRINTF -+ && applet_name[0] != 'p' -+ ) { -+ bb_error_msg("usage: printf FORMAT [ARGUMENT...]"); -+ return 2; /* bash compat */ -+ } - bb_show_usage(); -+ } - - format = argv[1]; - argv2 = argv + 2; diff --git a/sys-apps/busybox/files/busybox-devmem.patch b/sys-apps/busybox/files/busybox-devmem.patch deleted file mode 100644 index 3932119ab087..000000000000 --- a/sys-apps/busybox/files/busybox-devmem.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff -Nrup include/applets.h include/applets.h ---- include/applets.h 2008-04-26 18:22:37.000000000 +0000 -+++ include/applets.h 2008-04-26 18:19:53.000000000 +0000 -@@ -121,6 +121,7 @@ USE_DEALLOCVT(APPLET(deallocvt, _BB_DIR_ - USE_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup)) - USE_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER)) -+USE_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_NEVER)) - USE_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER)) - USE_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) - USE_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) -diff -Nrup include/usage.h include/usage.h ---- include/usage.h 2007-12-21 22:00:31.000000000 +0000 -+++ include/usage.h 2008-04-26 18:21:59.000000000 +0000 -@@ -630,6 +630,16 @@ - "\n and processing synthetic REGISTER events," \ - "\n do not poll for events") - -+#define devmem_trivial_usage \ -+ "{ address } [ type [ data ] ]" -+ -+#define devmem_full_usage \ -+ "Read/Write from physical addresses" \ -+ "\n\nUsage: devmem { address } [ type [ data ] ]" \ -+ "\n address : memory address to act upon" \ -+ "\n type : access operation type : [b]yte, [h]alfword, [w]ord" \ -+ "\n data : data to be written" -+ - /* -k is accepted but ignored for !HUMAN_READABLE, - * but we won't mention this (unimportant) */ - #if ENABLE_FEATURE_HUMAN_READABLE || ENABLE_FEATURE_DF_INODE -diff -Nrup miscutils/Config.in miscutils/Config.in ---- miscutils/Config.in 2007-12-21 22:00:31.000000000 +0000 -+++ miscutils/Config.in 2008-04-26 17:54:51.000000000 +0000 -@@ -120,6 +120,13 @@ config FEATURE_DEVFS - /dev/loop0. If your /dev directory has normal names instead of - devfs names, you don't want this. - -+config DEVMEM -+ bool "devmem" -+ default y -+ help -+ devmem is a small program that reads and writes from physical -+ memory using /dev/mem. -+ - config EJECT - bool "eject" - default n -diff -Nrup miscutils/Kbuild miscutils/Kbuild ---- miscutils/Kbuild 2007-12-21 22:00:31.000000000 +0000 -+++ miscutils/Kbuild 2008-04-26 17:56:36.000000000 +0000 -@@ -12,6 +12,7 @@ lib-$(CONFIG_CROND) += crond.o - lib-$(CONFIG_CRONTAB) += crontab.o - lib-$(CONFIG_DC) += dc.o - lib-$(CONFIG_DEVFSD) += devfsd.o -+lib-$(CONFIG_DEVMEM) += devmem.o - lib-$(CONFIG_EJECT) += eject.o - lib-$(CONFIG_HDPARM) += hdparm.o - lib-$(CONFIG_LAST) += last.o -diff -Nrup miscutils/devmem.c miscutils/devmem.c ---- miscutils/devmem.c 1970-01-01 00:00:00.000000000 +0000 -+++ miscutils/devmem.c 2008-04-26 18:18:30.000000000 +0000 -@@ -0,0 +1,65 @@ -+/* -+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. -+ * Copyright (C) 2000, Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) -+ * Copyright (C) 2008, BusyBox Team. -solar 4/26/08 -+ */ -+ -+#include "libbb.h" -+ -+#define DEVMEM_MAP_SIZE 4096UL -+#define DEVMEM_MAP_MASK (DEVMEM_MAP_SIZE - 1) -+ -+int devmem_main(int argc, char **argv) { -+ void *map_base, *virt_addr; -+ unsigned long read_result, writeval; -+ off_t target; -+ int fd, access_type = 'w'; -+ -+ if (argc < 2) -+ bb_show_usage(); -+ -+ target = bb_strtoul(argv[1], 0, 0); -+ -+ if (argc > 2) -+ access_type = tolower(argv[2][0]); -+ -+ fd = xopen("/dev/mem", O_RDWR | O_SYNC); -+ -+ if ((map_base = mmap(0, DEVMEM_MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target & ~DEVMEM_MAP_MASK)) == MAP_FAILED) -+ bb_perror_msg_and_die("mmap"); -+ -+ printf("Memory mapped at address %p.\n", map_base); -+ -+ virt_addr = map_base + (target & DEVMEM_MAP_MASK); -+ if (access_type == 'b') -+ read_result = *((unsigned char *) virt_addr); -+ else if (access_type == 'h') -+ read_result = *((unsigned short *) virt_addr); -+ else if (access_type == 'w') -+ read_result = *((unsigned long *) virt_addr); -+ else { -+ fprintf(stderr, "Illegal data type '%c'\n", access_type); -+ exit(EXIT_FAILURE); -+ } -+ printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, read_result); -+ -+ if (argc > 3) { -+ writeval = bb_strtoul(argv[3], 0, 0); -+ if (access_type == 'b') { -+ *((unsigned char *) virt_addr) = writeval; -+ read_result = *((unsigned char *) virt_addr); -+ } else if (access_type == 'h') { -+ *((unsigned short *) virt_addr) = writeval; -+ read_result = *((unsigned short *) virt_addr); -+ } else if (access_type == 'w') { -+ *((unsigned long *) virt_addr) = writeval; -+ read_result = *((unsigned long *) virt_addr); -+ } -+ printf("Written 0x%X; readback 0x%X\n", writeval, read_result); -+ } -+ -+ if (munmap(map_base, DEVMEM_MAP_SIZE) == -1) -+ bb_perror_msg_and_die("munmap"); -+ close(fd); -+ fflush_stdout_and_exit(EXIT_SUCCESS); -+} |