From 6eaab2c5071d5603ca5fcb3bf344c1dcc0cc6f58 Mon Sep 17 00:00:00 2001 From: Ned Ludd Date: Tue, 13 May 2008 07:27:40 +0000 Subject: - Bug fix CONFIG_FEATURE_MDEV_EXEC Package-Manager: portage-2.1.4.4 --- sys-apps/busybox/ChangeLog | 8 +- sys-apps/busybox/Manifest | 14 +- sys-apps/busybox/busybox-1.10.1-r3.ebuild | 246 +++++++++++++++++++++ .../busybox/files/busybox-1.10.1-mdev-exec.patch | 11 + 4 files changed, 267 insertions(+), 12 deletions(-) create mode 100644 sys-apps/busybox/busybox-1.10.1-r3.ebuild create mode 100644 sys-apps/busybox/files/busybox-1.10.1-mdev-exec.patch (limited to 'sys-apps') diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index e623689472c1..848c2b829c5a 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.188 2008/05/04 09:14:51 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.189 2008/05/13 07:27:40 solar Exp $ + +*busybox-1.10.1-r3 (13 May 2008) + + 13 May 2008; +files/busybox-1.10.1-mdev-exec.patch, + +busybox-1.10.1-r3.ebuild: + - Bug fix. CONFIG_FEATURE_MDEV_EXEC 04 May 2008; Mike Frysinger files/mdev-start.sh: Fix typos in mount #220028 by Dave Bender. diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest index bdffa9478685..db8c69779c65 100644 --- a/sys-apps/busybox/Manifest +++ b/sys-apps/busybox/Manifest @@ -1,11 +1,9 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX 1.4.0/bb.patch 866 RMD160 f1cce542de0814d6dbcf5f23cfad8d3249bf8839 SHA1 257b0dea76eb8656e2d0f03cc877af05415bcd0b SHA256 5e4ca94e7f5914d0e525bec1d661b978fd2e3d356cb1d1014701c6e486f4d7f8 AUX 1.4.0/bin2hex.patch 432 RMD160 5435664813aed4a15c9cf100e04506bbdf60c8b6 SHA1 66561e8c14f25a0b20d743941466bd9b445ee5c3 SHA256 7535703dffb63dd6a0331fce82d542c786758dfe52f7c97491369dde3d35fd1a AUX 1.4.0/data_extract_all.patch 545 RMD160 88773f3504cbf3e66e83e4c7d017591f79c97c9f SHA1 a30e4cda7c4d0c58ca0cccf23bba8e013cbfdf79 SHA256 cb2b59cb27114771b0c8dc04b480434a85a912eae5e6b96639cfcf5917f7b87e AUX 1.4.0/selinux-link.patch 632 RMD160 ea573b6a000dd9e7ec6d7125618163d71b8e6705 SHA1 c050c0a90c8cce44dbc1c869c7648ea9b55da4eb SHA256 41d4fae79e2d238980fd20223adac9efb2b8ce7b686cbfd9e41f369d2d0543db AUX 1.5.0/bb.patch 840 RMD160 b581f42a5bae2c12e0c2650c60ed20e95edc21a8 SHA1 128e75a932e65ccaed8c23fad5cc124f8bfc4e03 SHA256 6562015b4b9b1bdee2be221ade6805fdbbf778d5ae830683a29f34387af38e70 +AUX busybox-1.10.1-mdev-exec.patch 384 RMD160 b42cdf99289bc6c159b1967726d2968dcd3f45b2 SHA1 d0e5799917797cc980a4ba02687d608a5e7c75ff SHA256 fa37a7178b25e59958d38b7ce4ef96540e5769d031f95762ebc59dad35a3e7b5 AUX busybox-1.6.0-bb.patch 884 RMD160 1d54d5164ec5ee1b8f4f5ec293c3d703540087f7 SHA1 ba7d13fa71156bda401d6a380bd104cf9bd1b810 SHA256 ca11368825cec4379f0f4f748f29cc1c341833ddccfbf6bb5ed1e7ed9c8ab130 AUX busybox-1.6.0-echo.patch 270 RMD160 48b9556175d43a9de922100714f8060c1e9c47cc SHA1 d3dcaf47351b38813c8c4b4eac3621ec69e99292 SHA256 8c1e94aab9346cc568bad843508b2db6c39a805486ce0dc3f1093d0025c5ff52 AUX busybox-1.6.0-hushdep.patch 738 RMD160 fe71f80fd3260ab85b2c6a3d758d6b996f76a1f5 SHA1 47d86150c0e53e29b2b967c4a6527f44b21ce5ad SHA256 e9a71597c8cc0efa246538678a35cd5af776d5165afb8e50f9f6d518eb174a0b @@ -29,17 +27,11 @@ DIST busybox-1.8.2.tar.bz2 1765399 RMD160 561d84cc28d2b9cd85f05d9959bc2c585c80a9 DIST busybox-1.9.0.tar.bz2 1798481 RMD160 ec8dbbda99d0ad2f8e139b2dd5340b8d0762a74b SHA1 adb9409ce37b2f9a8a1a5a6f9ba4fde615c3167b SHA256 2da62c3cfbea0108ba1066b7d56207fa01843a2b30314f3329454700301b28c1 DIST busybox-1.9.2.tar.bz2 1796526 RMD160 5561915842754db4b565f3291b628f9afb851973 SHA1 e922aba2c3141ba5b3de5b074f47b2c84afc084a SHA256 a14ca1104242953672807f5b5223de5615c237a27140f36d625b3067daaf11dc EBUILD busybox-1.10.1-r2.ebuild 7441 RMD160 d752c5cb2ec189af8e2eb3798ee8ec63a08e703e SHA1 5f276c6f946fedaf1fb4c7026f4a934bb62333e4 SHA256 98c95ee38176d00e019fcf201e2f54f45f33496b0ceea32b256aa2aafd225154 +EBUILD busybox-1.10.1-r3.ebuild 7496 RMD160 9dd4680dfa64e94acbf3a30f0413d123d257474b SHA1 adb16b89db2cd518db6353b836c8aecff3d5930d SHA256 892ce726b8a2f0cb1f4c75451a9ca98d6f37e0a0a583fc86e1f5fa9eea4f9ee8 EBUILD busybox-1.10.1.ebuild 7095 RMD160 a9bfb8d7e1acedfbc9d9c256cfad98293953cf1e SHA1 6798221aa9e7ef654f1ef006da2e72595ad48845 SHA256 c2b7c238ac6f106ba88fb409d1b73a6b5c1b321e3f04d16f2525f26fb8b84251 EBUILD busybox-1.7.4.ebuild 7065 RMD160 c15b1f193f6e6064b129ab0d3988b5a7661c484e SHA1 bd04231092d736a8d84cecaac30638a80746d5b8 SHA256 295a507bfde7316606b4b8bac650a131fec9e61ef55a2356a4d29d0a0bb873e6 EBUILD busybox-1.8.2.ebuild 7099 RMD160 6706ad0a141250ffb9668d8d5bf1e43c31102573 SHA1 2ba84fedc138067b0a65067ef903bcdd4adce284 SHA256 9df161c10b79f3b446f816af495638354bcc2c6129c8ef880cd8a8d5234cbc0d EBUILD busybox-1.9.0.ebuild 7101 RMD160 228234953d5a8a6bb0580828ac53d724e1a9c784 SHA1 befa00b876bb64fde773e2420dad608de9437344 SHA256 0d954b94a2b01e84b6d71b15e41f9ce239995908b873e57e2ab9a1bd706c5a6d EBUILD busybox-1.9.2.ebuild 7063 RMD160 738b8532ae768be8605b6fb3e1044f680568416e SHA1 add0013f17528f2137bde9258c9654edcc7d6a55 SHA256 c1f0002bda1126037dc3b06873e7e7606cee7b49f17199902f56e90b19862291 -MISC ChangeLog 27877 RMD160 e6754e96be16167aff2f7a54842b82c3064a89c0 SHA1 676de828e0180367077924da30b2adeb8cc7982d SHA256 f603cb45a04b2fa10ddbf1aa2eefc9fae20de0f67eb90e99a4ed4159b5bf0c01 +MISC ChangeLog 28051 RMD160 eced83a1c403100408c4673643d768fe3dbb28ce SHA1 84150b0cde04dd2159e0bdcc374aa36ccf39a8df SHA256 ebe52a376b685ca9f0937244a244b73354c191748e30a924ccfb58fc3629e5ae MISC metadata.xml 161 RMD160 77385273ea1d12ed4093a4167307486b74d1cf82 SHA1 aa4b2873e32de89c0b0aeb26b5782f77cb00948e SHA256 a11fdd02015a232398fdf22a20d26a95fc34d44c54513e6b26b6128d0b76122e ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) - -iD8DBQFIHX6Rj9hvisErhMIRAgtsAJ9B5iBpLZdJBwCozDB2jXRqhkQFtwCdFH6q -NpJ65Dvofkx85yLwM+V96D4= -=BJmU ------END PGP SIGNATURE----- diff --git a/sys-apps/busybox/busybox-1.10.1-r3.ebuild b/sys-apps/busybox/busybox-1.10.1-r3.ebuild new file mode 100644 index 000000000000..45f50b6ab3af --- /dev/null +++ b/sys-apps/busybox/busybox-1.10.1-r3.ebuild @@ -0,0 +1,246 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.10.1-r3.ebuild,v 1.1 2008/05/13 07:27:40 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 +# 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 +SRC_URI="${SRC_URI} mirror://gentoo/busybox-1.10.1-20080430_09_28.tar.bz2" +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) +} + +src_unpack() { + unset KBUILD_OUTPUT #88088 + + unpack ${MY_P}.tar.bz2 + unpack busybox-1.10.1-20080430_09_28.tar.bz2 + cd "${S}" + + # patches go here! + epatch "${FILESDIR}"/busybox-1.7.0-bb.patch + # include this upstream later.. + epatch "${FILESDIR}"/busybox-devmem.patch + + # bug fixes. http://busybox.net/downloads/fixes-1.10.1/ + rm -f "${WORKDIR}"/patches/busybox-1.10.1-proc.patch + epatch "${WORKDIR}"/patches/*.patch + + epatch "${FILESDIR}"/busybox-1.10.1-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 + cat <<-EOF >> Makefile.flags + CROSS_COMPILE := ${CHOST}- + HOSTCC := $(tc-getBUILD_CC) + SKIP_STRIP = y + EOF + + # 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 + + # 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 + 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 TASKSET + do + busybox_config_option n ${opt} + done + + emake -j1 oldconfig > /dev/null +} + +src_compile() { + unset KBUILD_OUTPUT #88088 + + 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 * etc/* etc/init.d/* 2>/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 +} + +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 new file mode 100644 index 000000000000..ca7ee184973a --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.10.1-mdev-exec.patch @@ -0,0 +1,11 @@ +--- 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); -- cgit v1.2.3-65-gdbad