From 9829f57572639a3ed4fa93b7fcc46eda7b1a58f6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 29 Dec 2006 23:29:54 +0000 Subject: [PATCH] Version bump #158636 by Pavel Shirov. Package-Manager: portage-2.1.2_rc4-r1 --- sys-apps/busybox/ChangeLog | 8 +- sys-apps/busybox/Manifest | 30 ++- sys-apps/busybox/busybox-1.3.1.ebuild | 275 ++++++++++++++++++++ sys-apps/busybox/files/1.3.0/bb.patch | 27 ++ sys-apps/busybox/files/1.3.0/ld.patch | 13 + sys-apps/busybox/files/digest-busybox-1.3.1 | 3 + 6 files changed, 348 insertions(+), 8 deletions(-) create mode 100644 sys-apps/busybox/busybox-1.3.1.ebuild create mode 100644 sys-apps/busybox/files/1.3.0/bb.patch create mode 100644 sys-apps/busybox/files/1.3.0/ld.patch create mode 100644 sys-apps/busybox/files/digest-busybox-1.3.1 diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index e7484314cc53..8629fd5514ae 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.117 2006/12/29 22:36:21 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.118 2006/12/29 23:29:54 vapier Exp $ + +*busybox-1.3.1 (29 Dec 2006) + + 29 Dec 2006; Mike Frysinger +files/1.3.0/bb.patch, + +files/1.3.0/ld.patch, +busybox-1.3.1.ebuild: + Version bump #158636 by Pavel Shirov. 29 Dec 2006; Mike Frysinger +files/1.2.0/gcc2.patch, busybox-1.2.2.1.ebuild: diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest index 5210b8823200..475e14de70f8 100644 --- a/sys-apps/busybox/Manifest +++ b/sys-apps/busybox/Manifest @@ -9,19 +9,32 @@ AUX 1.2.0/gcc2.patch 458 RMD160 1517888a4e413f6092dea0806fabad53e7f65a90 SHA1 cd MD5 a63030f3253c0f7d7a231b3e3f7c1c6c files/1.2.0/gcc2.patch 458 RMD160 1517888a4e413f6092dea0806fabad53e7f65a90 files/1.2.0/gcc2.patch 458 SHA256 38a129a4aa4f157ad9d3ccbaa0a8a9f202f6899599332ddc2b6ca3f6568e6b79 files/1.2.0/gcc2.patch 458 +AUX 1.3.0/bb.patch 1215 RMD160 7453cb330851eaad1f1353203c7526dc505d41d7 SHA1 05401894ccaf30e22bd5e2cebd2595e2683ab5bb SHA256 48b67883b52fda4ddce675ed924d271151bfdb4088dd9a163a3867803bd35bfd +MD5 1dc2f6e57752b412fa4b1dc61543a1e8 files/1.3.0/bb.patch 1215 +RMD160 7453cb330851eaad1f1353203c7526dc505d41d7 files/1.3.0/bb.patch 1215 +SHA256 48b67883b52fda4ddce675ed924d271151bfdb4088dd9a163a3867803bd35bfd files/1.3.0/bb.patch 1215 +AUX 1.3.0/ld.patch 371 RMD160 d0f3f90f46e89c722e3ea153953deb8abfba38b0 SHA1 501bb1d9a88f63c77d465ae06c0f9a25fad0eff8 SHA256 c390421ec2d16e07a175c4aaacaa182ae43e4eb832b8bbc5fae14992f2cea732 +MD5 a979b18515d796ca910c433c238740ec files/1.3.0/ld.patch 371 +RMD160 d0f3f90f46e89c722e3ea153953deb8abfba38b0 files/1.3.0/ld.patch 371 +SHA256 c390421ec2d16e07a175c4aaacaa182ae43e4eb832b8bbc5fae14992f2cea732 files/1.3.0/ld.patch 371 AUX config-netboot 9853 RMD160 3d62cf31765adbc88c7a39f0f21223d7e73ef627 SHA1 0dc911793cd298a1e6f61073c2e37ba1c107f5f9 SHA256 75cae861b7bae144ca86998cb90dae9bcb0f54e09ed0c36d1ed81ad79a401e3d MD5 d9841a0171170d16bb121c696591e7ef files/config-netboot 9853 RMD160 3d62cf31765adbc88c7a39f0f21223d7e73ef627 files/config-netboot 9853 SHA256 75cae861b7bae144ca86998cb90dae9bcb0f54e09ed0c36d1ed81ad79a401e3d files/config-netboot 9853 DIST busybox-1.2.2.1.tar.bz2 1413458 RMD160 f61662f1ee12a7c65b9e65864c23242b6176a242 SHA1 41683c6a31f365ac884b84a376533d9ff372c05e SHA256 e31de8f3fc6639660af08446cc8b49f5831d5e5ecab0a56d9482c1d4eb89a701 +DIST busybox-1.3.1.tar.bz2 1485979 RMD160 bdfb93353aa899ef246cea0180c7341c32e6a8ac SHA1 f054e6060c69e4527bab980a972954860191c028 SHA256 5bf9ead9cca99620d2e56ddf79fdf5fb306fd7f30087b5556e0956e3b1948206 EBUILD busybox-1.2.2.1.ebuild 8397 RMD160 6e35665cbb569fb3d0c210d91e440433aa862b4a SHA1 14059b63bb0fa02b56317ef935d0ce0c7d1250a6 SHA256 9718421ca42699dd35d17400731157942d102fb3a3f23123301a0762509a5cca MD5 3bedcbbfebb81d7ed0fe15c8b9a592ff busybox-1.2.2.1.ebuild 8397 RMD160 6e35665cbb569fb3d0c210d91e440433aa862b4a busybox-1.2.2.1.ebuild 8397 SHA256 9718421ca42699dd35d17400731157942d102fb3a3f23123301a0762509a5cca busybox-1.2.2.1.ebuild 8397 -MISC ChangeLog 18758 RMD160 f2c41503cf9626e88af266505932c9092644653c SHA1 75f1ebbee87ddf03c0d032675f86aafd4990af34 SHA256 7a49e401a2dc584e9204dd7aa876684277f7bb510fda405595ed4557a413913b -MD5 d44e51e842d2540460d0affb5face444 ChangeLog 18758 -RMD160 f2c41503cf9626e88af266505932c9092644653c ChangeLog 18758 -SHA256 7a49e401a2dc584e9204dd7aa876684277f7bb510fda405595ed4557a413913b ChangeLog 18758 +EBUILD busybox-1.3.1.ebuild 8446 RMD160 9ec1dbc0bb0b8c1fe3c0bb7bb5b2e6c15c6be903 SHA1 64478f08006072e20965f7f8260e31670f452d6e SHA256 b8a2ab641e8fc9bcbf99d85ff19dbbce1cc1ff14de4132695ec2140219065add +MD5 2e72ce35b86578b5beee4b0eb8e41564 busybox-1.3.1.ebuild 8446 +RMD160 9ec1dbc0bb0b8c1fe3c0bb7bb5b2e6c15c6be903 busybox-1.3.1.ebuild 8446 +SHA256 b8a2ab641e8fc9bcbf99d85ff19dbbce1cc1ff14de4132695ec2140219065add busybox-1.3.1.ebuild 8446 +MISC ChangeLog 18950 RMD160 c4827aab26988e1c1310f4e0a98e9fa8fe7479b4 SHA1 006649047db4af7792031361d1eef2428c02b584 SHA256 5e702dfb096ee9f8eb1c1eb3d0db5b0648ef0f5f48a1dcf23f847fb09c88fe85 +MD5 0710ba26484f45d7e0410ce63189a39a ChangeLog 18950 +RMD160 c4827aab26988e1c1310f4e0a98e9fa8fe7479b4 ChangeLog 18950 +SHA256 5e702dfb096ee9f8eb1c1eb3d0db5b0648ef0f5f48a1dcf23f847fb09c88fe85 ChangeLog 18950 MISC metadata.xml 161 RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 SHA1 aa4b2873e32de89c0b0aeb26b5782f77cb00948e SHA256 a11fdd02015a232398fdf22a20d26a95fc34d44c54513e6b26b6128d0b76122e MD5 8ef75eba39772bdd1a8facc7815dbebb metadata.xml 161 RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 metadata.xml 161 @@ -29,10 +42,13 @@ SHA256 a11fdd02015a232398fdf22a20d26a95fc34d44c54513e6b26b6128d0b76122e metadata MD5 25f839e8bd7a70105b2b44cf151b57fa files/digest-busybox-1.2.2.1 253 RMD160 aa8a187cdaf8ffc550a024deda2f779f31c60ae3 files/digest-busybox-1.2.2.1 253 SHA256 7334648f93857477ce8a8b8d36c2dadbdd6a32b58ad6d15644ed4fdbceafb0dd files/digest-busybox-1.2.2.1 253 +MD5 b676836264c05f0066c645ea8620dca6 files/digest-busybox-1.3.1 247 +RMD160 76e327f1c7760c6159ddc317aa8eb486fd3eb8dc files/digest-busybox-1.3.1 247 +SHA256 b06e896a90e122006f6ab811e6fb2f6c08ffe36693c93271e4e1c7bcb82af939 files/digest-busybox-1.3.1 247 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFFlZij8bi6rjpTunYRAtqnAJ4rEUEe1c9ltmQkJRzZIaAZ000MeACfXWDK -z0MtzqVVmjamYzb858kuYH4= -=NOGj +iD8DBQFFlaUx8bi6rjpTunYRAml5AJ9HVnmY5TCt2mg+iJ6YwhXN8o5qkwCgpdKz ++fV0+Fbf6vue5o0ZjPV45Wk= +=VmOd -----END PGP SIGNATURE----- diff --git a/sys-apps/busybox/busybox-1.3.1.ebuild b/sys-apps/busybox/busybox-1.3.1.ebuild new file mode 100644 index 000000000000..35234154a4e9 --- /dev/null +++ b/sys-apps/busybox/busybox-1.3.1.ebuild @@ -0,0 +1,275 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.3.1.ebuild,v 1.1 2006/12/29 23:29:54 vapier Exp $ + +inherit eutils flag-o-matic + +################################################################################ +# 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 +# make menuconfig +# +# +# (3) Save your configuration to the default location and copy it to the +# savedconfig location as follows. Replace X.X.X by the version of +# busybox, and change the path if you're overriding ${ROOT} or +# ${PORTAGE_CONFIGROOT}. The file should overwrite the default config +# file that was written by the ebuild during step 1. +# +# cp .config /etc/portage/savedconfig/busybox-X.X.X.config +# +# (4) Execute the same command as in step 1 to build the new busybox config; +# the FEATURES=keepwork option is probably no longer necessary unless you +# want to modify the configuration further. +# +################################################################################ +# +# (1) Alternatively skip the above steps and simply emerge busybox with +# USE=savedconfig and edit the file it saves by hand. Then remerge bb as +# needed. +# +################################################################################ + + +#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 static savedconfig netboot make-symlinks" +RESTRICT="test" + +DEPEND="" + +S=${WORKDIR}/${MY_P} + +# then eventually turning on selinux would mean +# adding a dep: selinux? ( sys-libs/libselinux ) + +busybox_set_env() { + type -p ${CHOST}-ar > /dev/null && export CROSS=${CHOST}- + # Don't let KBUILD_OUTPUT mess us up #88088 + unset KBUILD_OUTPUT +} + +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;; + Y) echo "CONFIG_$2=y" >> .config;; + N) echo "CONFIG_$2=n" >> .config;; + *) use $1 \ + && busybox_config_option y $2 \ + || busybox_config_option n $2 + return 0 + ;; + esac + einfo $(grep "CONFIG_$2[= ]" .config) +} + +src_unpack() { + busybox_set_env + unpack ${A} + cd "${S}" + + # patches go here! + epatch "${FILESDIR}"/1.3.0/bb.patch + epatch "${FILESDIR}"/1.3.0/ld.patch + sed -i 's: -Werror : :' Makefile.flags + + # check for a busybox config before making one of our own. + # if one exist lets return and use it. + # fine grained config control for user defined busybox configs. + # [package]-[version]-[revision].config + # [package]-[version].config + # [package].config + + if use savedconfig ; then + local conf root + [[ -r .config ]] && rm .config + for conf in {${PF},${P},${PN}}{,-${CHOST}} ; do + for root in "${PORTAGE_CONFIGROOT}" "${ROOT}" / ; do + configfile=${root}etc/portage/savedconfig/${conf}.config + if [[ -r ${configfile} ]] ; then + einfo "Found your ${configfile} and using it." + cp ${configfile} "${S}"/.config + yes "" | make oldconfig > /dev/null + return 0 + fi + done + done + ewarn "Could not locate user configfile, so we will save a default one" + fi + if use netboot ; then + cp "${FILESDIR}"/config-netboot .config + sed -i \ + -e '/DEFAULT_SCRIPT/s:/share/udhcpc/default.script:/lib/udhcpc.script:' \ + networking/udhcp/libbb_udhcp.h \ + || die "fixing netboot/udhcpc" + fi + + # setup the config file + make 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 + + # 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 + + 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 + for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \ + LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \ + UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \ + DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG + do + busybox_config_option n ${opt} + done + + make oldconfig > /dev/null +} + +src_compile() { + busybox_set_env + + # work around broken ass powerpc compilers + use ppc64 && append-flags -mminimal-toc + + emake CROSS="${CROSS}" EXTRA_CFLAGS="${CFLAGS}" busybox || die "build failed" + if ! use static ; then + mv busybox_unstripped{,.bak} + local failed=0 + LDFLAGS="${LDFLAGS} -static" \ + emake \ + CROSS="${CROSS}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + busybox || failed=1 + if [[ ${failed} == 1 ]] ; then + if has_version '/dev/null +} + +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 + if use savedconfig ; then + mv "${D}"/usr/share/${PN}/${PF}.config "${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 + + if use savedconfig ; then + local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig" + einfo "Saving this build config to ${config_dir}/${PF}.config" + einfo "Read this ebuild for more info on how to take advantage of this option" + mkdir -p "${config_dir}" + cp "${T}"/${PF}.config "${config_dir}"/${PF}.config + return 0 + 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/1.3.0/bb.patch b/sys-apps/busybox/files/1.3.0/bb.patch new file mode 100644 index 000000000000..bbdcdd2cd01e --- /dev/null +++ b/sys-apps/busybox/files/1.3.0/bb.patch @@ -0,0 +1,27 @@ +--- include/applets.h ++++ include/applets.h +@@ -61,11 +61,13 @@ + USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_AWK(APPLET(awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_BASENAME(APPLET(basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) ++USE_ASH(APPLET_NOUSAGE(bb, ash, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER)) + //USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + /* Always enabled. */ + APPLET_NOUSAGE(busybox, busybox, _BB_DIR_BIN, _BB_SUID_MAYBE) ++APPLET_NOUSAGE(busybox.static, busybox, _BB_DIR_BIN, _BB_SUID_MAYBE) + USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat)) + USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_CAT(APPLET(cat, _BB_DIR_BIN, _BB_SUID_NEVER)) +--- shell/ash.c ++++ shell/ash.c +@@ -3740,6 +3740,8 @@ + if(find_applet_by_name(cmd) != NULL) { + /* re-exec ourselves with the new arguments */ + execve(CONFIG_BUSYBOX_EXEC_PATH,argv,envp); ++ execve("/bin/busybox.static",argv,envp); ++ execve("/bin/busybox",argv,envp); + /* If they called chroot or otherwise made the binary no longer + * executable, fall through */ + } diff --git a/sys-apps/busybox/files/1.3.0/ld.patch b/sys-apps/busybox/files/1.3.0/ld.patch new file mode 100644 index 000000000000..eb3c02fc163d --- /dev/null +++ b/sys-apps/busybox/files/1.3.0/ld.patch @@ -0,0 +1,13 @@ +Index: Makefile +=================================================================== +--- Makefile (revision 17102) ++++ Makefile (working copy) +@@ -273,7 +273,7 @@ MAKEFLAGS += -rR + # Make variables (CC, etc...) + + AS = $(CROSS_COMPILE)as +-LD = $(CROSS_COMPILE)ld ++LD = $(CROSS_COMPILE)gcc -nostdlib + CC = $(CROSS_COMPILE)gcc + CPP = $(CC) -E + AR = $(CROSS_COMPILE)ar diff --git a/sys-apps/busybox/files/digest-busybox-1.3.1 b/sys-apps/busybox/files/digest-busybox-1.3.1 new file mode 100644 index 000000000000..9368ef7299d7 --- /dev/null +++ b/sys-apps/busybox/files/digest-busybox-1.3.1 @@ -0,0 +1,3 @@ +MD5 571531cfa83726947ccb566de017ad4f busybox-1.3.1.tar.bz2 1485979 +RMD160 bdfb93353aa899ef246cea0180c7341c32e6a8ac busybox-1.3.1.tar.bz2 1485979 +SHA256 5bf9ead9cca99620d2e56ddf79fdf5fb306fd7f30087b5556e0956e3b1948206 busybox-1.3.1.tar.bz2 1485979 -- 2.26.2