diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-09-17 03:46:33 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-09-17 03:46:33 +0000 |
commit | ce6f60854e8d01f7b9d95a8a6812a239ff4aafb0 (patch) | |
tree | 65cf7ed3a9264f026960d6a02811d32af4664247 /sys-apps | |
parent | Switch between jobs and cpus, it should be way smarter this way. (diff) | |
download | historical-ce6f60854e8d01f7b9d95a8a6812a239ff4aafb0.tar.gz historical-ce6f60854e8d01f7b9d95a8a6812a239ff4aafb0.tar.bz2 historical-ce6f60854e8d01f7b9d95a8a6812a239ff4aafb0.zip |
Version bump. Also update init.d script for openrc only #383301 by Nathan Phillip Brink.
Package-Manager: portage-2.2.0_alpha58/cvs/Linux x86_64
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/busybox/ChangeLog | 12 | ||||
-rw-r--r-- | sys-apps/busybox/Manifest | 20 | ||||
-rw-r--r-- | sys-apps/busybox/busybox-1.19.2.ebuild | 274 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-android.patch | 11 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-buildsys.patch | 19 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-chpasswd.patch | 55 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-crond.patch | 12 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-inetd.patch | 47 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-syslogd.patch | 20 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.19.2-tail.patch | 43 | ||||
-rwxr-xr-x | sys-apps/busybox/files/mdev.rc.1 | 98 |
11 files changed, 605 insertions, 6 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index 9bab4aa6f50a..59a244617287 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.284 2011/08/27 17:48:06 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.285 2011/09/17 03:46:33 vapier Exp $ + +*busybox-1.19.2 (17 Sep 2011) + + 17 Sep 2011; Mike Frysinger <vapier@gentoo.org> +busybox-1.19.2.ebuild, + +files/busybox-1.19.2-android.patch, +files/busybox-1.19.2-buildsys.patch, + +files/busybox-1.19.2-chpasswd.patch, +files/busybox-1.19.2-crond.patch, + +files/busybox-1.19.2-inetd.patch, +files/busybox-1.19.2-syslogd.patch, + +files/busybox-1.19.2-tail.patch, +files/mdev.rc.1: + Version bump. Also update init.d script for openrc only #383301 by Nathan + Phillip Brink. 27 Aug 2011; Raúl Porcel <armin76@gentoo.org> busybox-1.19.0.ebuild: alpha/ia64/m68k/s390/sh/sparc stable wrt #379857 diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest index 23b5180bd87a..d356a6fa5d14 100644 --- a/sys-apps/busybox/Manifest +++ b/sys-apps/busybox/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 AUX busybox-1.17.0-bb.patch 1039 RMD160 abd095949a1a5797a770dd84fbdd247490a7420f SHA1 4f3399421c00961f066b65f4f1955363dc9ed746 SHA256 be449a26d5e87431e2192f79f945e3bf0c999873306d40bf9c0d6cc61da08d48 AUX busybox-1.18.0-bb.patch 918 RMD160 e6a7be911deb07510ddf46b8a4b8b24ef5b1b29a SHA1 f4815f4cd948c300d65e553486c949c780f05752 SHA256 9e713de11f26a07e5a17d7e62eed7a10b163de91331d50541dcc2c037acbcb67 @@ -19,8 +19,16 @@ AUX busybox-1.19.0-less.patch 278 RMD160 17938258201616878efbef785d982ee373790fc AUX busybox-1.19.0-sed.patch 8081 RMD160 8fa603968141b36106dda560223f82b87583437f SHA1 d8b04777b43805ff4b7ce3a44edaa69adde500f5 SHA256 b21ac5eb86519fbcbe0a74fc531cb707a878e988b6fdb298be6083760e04fb89 AUX busybox-1.19.0-swap.patch 402 RMD160 0cc3e6d7c7b7b3b1fa25904ae9c1c3b79dba1161 SHA1 d04c5741213a81433f17c50208baa89681d24c3d SHA256 d9d70a607d877646b4e2087ddf4c3ad14d5bcb2b5973b33fed30ee8e6d69b40d AUX busybox-1.19.0-uncompress.patch 1505 RMD160 53b3deb6f79bc2fd3cd0ca36709364191f7eb8b9 SHA1 c349cb6b162f8ebfbe02150fceb253a70278f1f1 SHA256 74cd12b54d47a2ce0e418d8d15cd0be1649bbec5951d9000b5275683f9b0623d +AUX busybox-1.19.2-android.patch 296 RMD160 79b8037648eaff455f528f241b7812ebcab6686a SHA1 4015f08611e7c66102d1fb17574586d8a4aed0fa SHA256 1a0568fb34c0a52c764651290b88de4593fb464fce94908a204978466ea5661c +AUX busybox-1.19.2-buildsys.patch 643 RMD160 87875ebca588afcbed557ad9e9d6983a5885775b SHA1 bf4a8f1d8289da60feffe88601cc0238be36b6d3 SHA256 a3f5e0da5264e31c0c1fa6bed5a5cfe19d1217b8b02e7942830ee4cdf7bd56d3 +AUX busybox-1.19.2-chpasswd.patch 1542 RMD160 838821f09564101f024b50a7ea498c7f07e2dbcf SHA1 8fbde7c2b6d2222af44278dbbe398fbb03d1ede0 SHA256 908366dc98aab1936dce48ca4849d3dd6e9d28ec138c1dbf5c787e667b4b4384 +AUX busybox-1.19.2-crond.patch 555 RMD160 bfae271e5592967b1acb247a3bb1f8a22a82a056 SHA1 7eba5bfdfdafffcae94f2b0746181e623509ce3d SHA256 b2b465389ac22fbfd608a055e816cf94bda65eb163e06d07983f167c9e542c7d +AUX busybox-1.19.2-inetd.patch 1616 RMD160 42514c604a43797625699d6cfc7e78fdcdcd08d7 SHA1 001572374cfa736f9bb847c8d6d985e24b749a84 SHA256 e883c6d8723cf7f18d58c116f164c6dc658e0ad45ff12fd5ef98f3f177589d3a +AUX busybox-1.19.2-syslogd.patch 708 RMD160 060e589d58ae66fe55b6b9df600993d361632e2f SHA1 68f38f539823f43a156c87bd2069301d9901ccb3 SHA256 e772510323fb85e59005b80c7fa63072a6fbdb94216f425b14b742f1730b0472 +AUX busybox-1.19.2-tail.patch 1320 RMD160 52a19174f618856983e810fce1446b959b3147c4 SHA1 fd680ba279cd06792fd7215c8f7b39fb23162990 SHA256 d114d432ec828fe6b66155224284cbe5d202c56f6de6d4d358eed1822c06ea9d AUX mdev-start.sh 2758 RMD160 c177aac4940b177bd857bc98ff2ac031e0489bbc SHA1 5a5b95da36c489cd12820513434a7a17ac3bffd1 SHA256 9904263c8dfe2b8c3e968a9b4245fa0c162a2413110c037cdd797ac3773587d7 AUX mdev.rc 282 RMD160 6a11e23fbed92acd24088a7885bdc52b9c845fac SHA1 46f1a0494e009332e83b62599842f8213b60ba60 SHA256 e52abbc3399fc85ce1f097e8f12b25a5ca7fe2e3d648bee60c061b547ba39dc5 +AUX mdev.rc.1 2191 RMD160 e8cf408e576850868581d011614ca79a2be2dc9c SHA1 56c9b728403f06c821f90e2dd5ac76a28f7e7dce SHA256 1a22210a9d59d7c1f023141768b1d22e51f5102ec1d7e0a9ebd17d7618384c88 AUX mdev/dvbdev 356 RMD160 db7f546ae6e47b59cca9712f1e218cdbc3985c78 SHA1 993c0ab79fa41912f84db95e7dd09aa0965aa8c7 SHA256 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de AUX mdev/ide_links 440 RMD160 5d133f27d1ab4db5f6f1b5063837b033f47b71ae SHA1 725deaf4c35e46dec89fc35f221c4c52b2542129 SHA256 3fccc9ee437e3dcc8ac73bfe3713334a7156a112fe442e052fff4f26ff0f6a88 AUX mdev/usbdev 1624 RMD160 a448558f058566223072c993cb4ae52f9aa43da3 SHA1 4d1a7a19e58549416dd3bde4fcf2f584adc4feb7 SHA256 113ecaa722fa1f4e1c76489e2a7b24099778615a5bccd443aa9cbab28c6d05d0 @@ -29,16 +37,18 @@ DIST busybox-1.17.4.tar.bz2 2093389 RMD160 abb7e3ceebac4fdf48b0e717367e644567490 DIST busybox-1.18.4.tar.bz2 2130598 RMD160 db21d00498b155f950a3f2fb63fa339253e536c2 SHA1 d285855e5770b0fb7caf477dd41ce0863657b975 SHA256 4d24d37bd6f1bd153e8cf9a984ec2f32f18464f73ca535e2cc2e8be9694097fa DIST busybox-1.18.5.tar.bz2 2130681 RMD160 22746c6e9ed6b7f8f42a49a5329b8b36da088422 SHA1 0aa287ea0f19a8c0c9224e2aa9c4516a79887139 SHA256 10954fcd5c48d8a262a3497b16227bf983a05658bf2bf661af2fdeca773f2fc0 DIST busybox-1.19.0.tar.bz2 2168657 RMD160 07c8c313d8ed7edcf8f12fe805389c96bda3dae2 SHA1 70569f23751640d9ac7fc2aa49b29e6cd274be6d SHA256 19cf44a096d7796800780d6344c4cc5054dac9f50d1c9b7a5c506c4777f7620c +DIST busybox-1.19.2.tar.bz2 2168055 RMD160 a0be1d619279c379a83e7574a09b5c3c02c5b26a SHA1 6dedaa62af98a8541901a30c3e400ce9e077ee16 SHA256 ea7ec9b6df70b8c528f4a2b6300e9913431c7223308fb08dfafa7508d75a0cb9 EBUILD busybox-1.17.4.ebuild 7921 RMD160 2b3306d4c4b21f4fa246e4963f15ad75707d6fe1 SHA1 7808c464cb6e0d2efd4bd24f3aecaef4ce3c40c4 SHA256 31ee8f50c3123db62879b2209e96e020ae143a5e5f960138924a467eef8f7c8a EBUILD busybox-1.18.4.ebuild 8228 RMD160 e56dfe2383ba8507b37c15332b87c5800cd007f7 SHA1 4897ba0aaaf03177760b66545c326d3a032aba82 SHA256 f5345e2a1c4f325ac2b36c32b850cd394187ca6c644a03ef0463b8dd06e0729b EBUILD busybox-1.18.5.ebuild 8223 RMD160 a4e3e6cf07d7736d47b21499c1ad30d66ba394df SHA1 c2df0c81bc43746575458e1bf087fcc45a4baa53 SHA256 17517a9d9bfa7fb32375e457fadbb5a31f775001be3624fabce887703edff270 EBUILD busybox-1.19.0.ebuild 8262 RMD160 f49821fee9372116dbced29204e5ea556036c7c0 SHA1 be5ae13267b0bc6a77f45a8ae5b0e75b74179443 SHA256 f403639bfe097b44867c239bf60c21ba9db25e9e192748403a191135985fa579 -MISC ChangeLog 42254 RMD160 e22b734fbee8ef9ce61da83ece782eac5611f56d SHA1 6b2b0954bd59ef549059d9e2f96dd4fec971ed4f SHA256 0f015f01c88ff7fb317f3e1f841bd31fe8927a4f1f4b08bc63dd04ed8dc2de19 +EBUILD busybox-1.19.2.ebuild 8196 RMD160 4f128381b9ca35fc0e21fc67b88a71101ab27a83 SHA1 26d35c75a88ef33ed0889d6594323cfc5285766c SHA256 6c54100e7a922e9b548305b44a8d781a1a56a41425dc4bd095ab70f7a9bba514 +MISC ChangeLog 42732 RMD160 818d432f656cc962a4b68333a8fdf12354cd7895 SHA1 d68ddaf238b8bbe0d8c8e1dd02069bb95051aaec SHA256 2d06a3a1fd806d61a9305ec80bc7d855f336885edd4e8142afc3322600c8e70c MISC metadata.xml 420 RMD160 a3d9cd7689418647525460862b05d3adfb9cd4f4 SHA1 c67d73ae61fb0180060ff7d3d13b1b5e9ef2c56c SHA256 1d2b931bd8b4026d665b485a21263438fe5892bf81af7139e409bfd61a68d55c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk5ZLdwACgkQuQc30/atMkDJvACeO8M/WZH6JYj3iH3NNY62fG7o -n5MAmgLxgr4tYtxJ4m0rRQtsUi/DtqkQ -=lpQC +iF4EAREIAAYFAk50GB8ACgkQaC/OocHi7Ja79gD/bFjSoraXZ2KruGI63yQmZkaq +eExPXrgEW7ZGuOM/gMMBAIaoGwAxeKB0KfWucfENaASY60XVto1YR3y63VzpN+p2 +=URjg -----END PGP SIGNATURE----- diff --git a/sys-apps/busybox/busybox-1.19.2.ebuild b/sys-apps/busybox/busybox-1.19.2.ebuild new file mode 100644 index 000000000000..688889419494 --- /dev/null +++ b/sys-apps/busybox/busybox-1.19.2.ebuild @@ -0,0 +1,274 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.19.2.ebuild,v 1.1 2011/09/17 03:46:33 vapier Exp $ + +EAPI="3" +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 ~x86-linux" +IUSE="debug ipv6 make-symlinks +mdev nfs -pam selinux static elibc_glibc" +RESTRICT="test" + +RDEPEND="selinux? ( sys-libs/libselinux ) + pam? ( sys-libs/pam )" +DEPEND="${RDEPEND} + nfs? ( || ( <sys-libs/glibc-2.13 >=net-libs/libtirpc-0.2.2-r1 ) )" + +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_prepare() { + unset KBUILD_OUTPUT #88088 + append-flags -fno-strict-aliasing #310413 + use ppc64 && append-flags -mminimal-toc #130943 + append-cppflags $($(tc-getPKG_CONFIG) libtirpc --cflags) + + # patches go here! + epatch "${FILESDIR}"/busybox-1.19.0-bb.patch + epatch "${FILESDIR}"/busybox-${PV}-*.patch + + # flag cleanup + sed -i -r \ + -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ + Makefile.flags || die + #sed -i '/bbsh/s:^//::' include/applets.h + sed -i '/^#error Aborting compilation./d' applets/applets.c || die + use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile + sed -i \ + -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ + -e "/^AR\>/s:=.*:= $(tc-getAR):" \ + -e "/^CC\>/s:=.*:= $(tc-getCC):" \ + -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ + Makefile || die +} + +src_configure() { + # check for a busybox config before making one of our own. + # if one exist lets return and use it. + + restore_config .config + if [ -f .config ]; then + yes "" | emake -j1 oldconfig > /dev/null + return 0 + else + ewarn "Could not locate user configfile, so we will save a default one" + fi + + # setup the config file + emake -j1 allyesconfig > /dev/null + busybox_config_option n DMALLOC + busybox_config_option n FEATURE_SUID_CONFIG + busybox_config_option n BUILD_AT_ONCE + busybox_config_option n BUILD_LIBBUSYBOX + busybox_config_option n NOMMU + busybox_config_option n MONOTONIC_SYSCALL + + # If these are not set and we are using a uclibc/busybox setup + # all calls to system() will fail. + busybox_config_option y ASH + busybox_config_option n HUSH + + # disable ipv6 applets + if ! use ipv6; then + busybox_config_option n FEATURE_IPV6 + busybox_config_option n TRACEROUTE6 + busybox_config_option n PING6 + fi + + if use static && use pam ; then + ewarn "You cannot have USE='static pam'. Assuming static is more important." + fi + busybox_config_option nfs FEATURE_MOUNT_NFS + 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 \ + 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 \ + LASH 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 busybox || die "build failed" + if ! use static ; then + cp .config{,.bak} + mv busybox_unstripped{,.bak} + use pam && busybox_config_option n PAM + emake CONFIG_STATIC=y busybox || die "static build failed" + mv busybox_unstripped bb + mv busybox_unstripped{.bak,} + mv .config{.bak,} + fi +} + +src_install() { + unset KBUILD_OUTPUT #88088 + save_config .config + + into / + newbin busybox_unstripped busybox || die + if use static ; then + dosym busybox /bin/bb || die + dosym bb /bin/busybox.static || die + else + dobin bb || die + fi + if use mdev ; then + dodir /$(get_libdir)/mdev/ + use make-symlinks || dosym /bin/bb /sbin/mdev + cp "${S}"/examples/mdev_fat.conf "${ED}"/etc/mdev.conf + + exeinto /$(get_libdir)/mdev/ + doexe "${FILESDIR}"/mdev/* || die + + newinitd "${FILESDIR}"/mdev.rc.1 mdev || die + fi + + # bundle up the symlink files for use later + emake DESTDIR="${ED}" install || die + rm _install/bin/busybox + tar cf busybox-links.tar -C _install . || : #;die + insinto /usr/share/${PN} + doins busybox-links.tar || die + newins .config ${PF}.config || die + + dodoc AUTHORS README TODO + + cd docs || die + docinto txt + dodoc *.txt + docinto pod + dodoc *.pod + dohtml *.html + + cd ../examples || die + docinto examples + dodoc inittab depmod.pl *.conf *.script undeb unrpm + + cd bootfloppy || die + docinto bootfloppy + dodoc $(find . -type f) +} + +pkg_preinst() { + if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then + ewarn "setting USE=make-symlinks and emerging to / is very dangerous." + ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." + ewarn "If you are creating a binary only and not merging this is probably ok." + ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is 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() { + 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 + + elog "This ebuild has support for user defined configs" + elog "Please read this ebuild for more details and re-emerge as needed" + elog "if you want to add or remove functionality for ${PN}" +} diff --git a/sys-apps/busybox/files/busybox-1.19.2-android.patch b/sys-apps/busybox/files/busybox-1.19.2-android.patch new file mode 100644 index 000000000000..e2e6528a2fce --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-android.patch @@ -0,0 +1,11 @@ +--- busybox-1.19.2/include/platform.h ++++ busybox-1.19.2-android/include/platform.h +@@ -433,7 +433,7 @@ typedef unsigned smalluint; + # undef HAVE_STPCPY + #endif + +-#if defined(ANDROID) ++#if defined(ANDROID) || defined(__ANDROID__) + # undef HAVE_DPRINTF + # undef HAVE_GETLINE + # undef HAVE_STPCPY diff --git a/sys-apps/busybox/files/busybox-1.19.2-buildsys.patch b/sys-apps/busybox/files/busybox-1.19.2-buildsys.patch new file mode 100644 index 000000000000..8e0c4c33eefa --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-buildsys.patch @@ -0,0 +1,19 @@ +--- busybox-1.19.2/applets/applet_tables.c ++++ busybox-1.19.2-buildsys/applets/applet_tables.c +@@ -80,8 +80,15 @@ int main(int argc, char **argv) + + printf("#define NUM_APPLETS %u\n", NUM_APPLETS); + if (NUM_APPLETS == 1) { ++ char *dash_to_underscore, *p; + printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name); +- printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name); ++ /* Example: "ether-wake" -> "ether_wake" */ ++ p = dash_to_underscore = strdup(applets[0].name); ++ p--; ++ while (*++p) ++ if (*p == '-') ++ *p = '_'; ++ printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore); + } + printf("\n"); + diff --git a/sys-apps/busybox/files/busybox-1.19.2-chpasswd.patch b/sys-apps/busybox/files/busybox-1.19.2-chpasswd.patch new file mode 100644 index 000000000000..0cba0e219a5c --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-chpasswd.patch @@ -0,0 +1,55 @@ +--- busybox-1.19.2/loginutils/chpasswd.c ++++ busybox-1.19.2-chpasswd/loginutils/chpasswd.c +@@ -33,9 +33,8 @@ static const char chpasswd_longopts[] AL + int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int chpasswd_main(int argc UNUSED_PARAM, char **argv) + { +- char *name, *pass; +- char salt[sizeof("$N$XXXXXXXX")]; +- int opt, rc; ++ char *name; ++ int opt; + + if (getuid() != 0) + bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); +@@ -45,6 +44,10 @@ int chpasswd_main(int argc UNUSED_PARAM, + opt = getopt32(argv, "em"); + + while ((name = xmalloc_fgetline(stdin)) != NULL) { ++ char *free_me; ++ char *pass; ++ int rc; ++ + pass = strchr(name, ':'); + if (!pass) + bb_error_msg_and_die("missing new password"); +@@ -52,7 +55,10 @@ int chpasswd_main(int argc UNUSED_PARAM, + + xuname2uid(name); /* dies if there is no such user */ + ++ free_me = NULL; + if (!(opt & OPT_ENC)) { ++ char salt[sizeof("$N$XXXXXXXX")]; ++ + crypt_make_salt(salt, 1); + if (opt & OPT_MD5) { + salt[0] = '$'; +@@ -60,7 +66,7 @@ int chpasswd_main(int argc UNUSED_PARAM, + salt[2] = '$'; + crypt_make_salt(salt + 3, 4); + } +- pass = pw_encrypt(pass, salt, 0); ++ free_me = pass = pw_encrypt(pass, salt, 0); + } + + /* This is rather complex: if user is not found in /etc/shadow, +@@ -81,8 +87,7 @@ int chpasswd_main(int argc UNUSED_PARAM, + bb_info_msg("Password for '%s' changed", name); + logmode = LOGMODE_STDIO; + free(name); +- if (!(opt & OPT_ENC)) +- free(pass); ++ free(free_me); + } + return EXIT_SUCCESS; + } diff --git a/sys-apps/busybox/files/busybox-1.19.2-crond.patch b/sys-apps/busybox/files/busybox-1.19.2-crond.patch new file mode 100644 index 000000000000..043a846ca4a5 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-crond.patch @@ -0,0 +1,12 @@ +--- busybox-1.19.2/miscutils/crond.c ++++ busybox-1.19.2-crond/miscutils/crond.c +@@ -861,7 +861,8 @@ int crond_main(int argc UNUSED_PARAM, ch + + /* "-b after -f is ignored", and so on for every pair a-b */ + opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l") +- ":l+:d+"; /* -l and -d have numeric param */ ++ /* -l and -d have numeric param */ ++ ":l+" IF_FEATURE_CROND_D(":d+"); + opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"), + &G.log_level, &G.log_filename, &G.crontab_dir_name + IF_FEATURE_CROND_D(,&G.log_level)); diff --git a/sys-apps/busybox/files/busybox-1.19.2-inetd.patch b/sys-apps/busybox/files/busybox-1.19.2-inetd.patch new file mode 100644 index 000000000000..e1395a6b3bd0 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-inetd.patch @@ -0,0 +1,47 @@ +--- busybox-1.19.2/networking/inetd.c ++++ busybox-1.19.2-inetd/networking/inetd.c +@@ -1278,6 +1278,7 @@ int inetd_main(int argc UNUSED_PARAM, ch + sep->se_count = 0; + rearm_alarm(); /* will revive it in RETRYTIME sec */ + restore_sigmask(&omask); ++ maybe_close(new_udp_fd); + maybe_close(accepted_fd); + continue; /* -> check next fd in fd set */ + } +@@ -1298,17 +1299,18 @@ int inetd_main(int argc UNUSED_PARAM, ch + bb_perror_msg("vfork"+1); + sleep(1); + restore_sigmask(&omask); ++ maybe_close(new_udp_fd); + maybe_close(accepted_fd); + continue; /* -> check next fd in fd set */ + } + if (pid == 0) + pid--; /* -1: "we did fork and we are child" */ + } +- /* if pid == 0 here, we never forked */ ++ /* if pid == 0 here, we didn't fork */ + + if (pid > 0) { /* parent */ + if (sep->se_wait) { +- /* tcp wait: we passed listening socket to child, ++ /* wait: we passed socket to child, + * will wait for child to terminate */ + sep->se_wait = pid; + remove_fd_from_set(sep->se_fd); +@@ -1345,9 +1347,13 @@ int inetd_main(int argc UNUSED_PARAM, ch + setsid(); + /* "nowait" udp */ + if (new_udp_fd >= 0) { +- len_and_sockaddr *lsa = xzalloc_lsa(sep->se_family); ++ len_and_sockaddr *lsa; ++ int r; ++ ++ close(new_udp_fd); ++ lsa = xzalloc_lsa(sep->se_family); + /* peek at the packet and remember peer addr */ +- int r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT, ++ r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT, + &lsa->u.sa, &lsa->len); + if (r < 0) + goto do_exit1; diff --git a/sys-apps/busybox/files/busybox-1.19.2-syslogd.patch b/sys-apps/busybox/files/busybox-1.19.2-syslogd.patch new file mode 100644 index 000000000000..d54f5d4307b4 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-syslogd.patch @@ -0,0 +1,20 @@ +--- busybox-1.19.2/sysklogd/syslogd.c ++++ busybox-1.19.2-syslogd/sysklogd/syslogd.c +@@ -278,7 +278,7 @@ static void parse_syslogdcfg(const char + parser_t *parser; + + parser = config_open2(file ? file : "/etc/syslog.conf", +- file ? xfopen_for_read : fopen_or_warn_stdin); ++ file ? xfopen_for_read : fopen_for_read); + if (!parser) + /* didn't find default /etc/syslog.conf */ + /* proceed as if we built busybox without config support */ +@@ -678,7 +678,7 @@ static void timestamp_and_log(int pri, c + if (LOG_PRI(pri) < G.logLevel) { + #if ENABLE_FEATURE_IPC_SYSLOG + if ((option_mask32 & OPT_circularlog) && G.shbuf) { +- log_to_shmem(msg); ++ log_to_shmem(G.printbuf); + return; + } + #endif diff --git a/sys-apps/busybox/files/busybox-1.19.2-tail.patch b/sys-apps/busybox/files/busybox-1.19.2-tail.patch new file mode 100644 index 000000000000..f3cc79814e58 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.19.2-tail.patch @@ -0,0 +1,43 @@ +--- busybox-1.19.2/coreutils/tail.c ++++ busybox-1.19.2-tail/coreutils/tail.c +@@ -203,7 +203,7 @@ int tail_main(int argc, char **argv) + int fd = fds[i]; + + if (ENABLE_FEATURE_FANCY_TAIL && fd < 0) +- continue; /* may happen with -E */ ++ continue; /* may happen with -F */ + + if (nfiles > header_threshhold) { + tail_xprint_header(fmt, argv[i]); +@@ -252,14 +252,14 @@ int tail_main(int argc, char **argv) + * Used only by +N code ("start from Nth", 1-based): */ + seen = 1; + newlines_seen = 0; +- while ((nread = tail_read(fd, buf, tailbufsize-taillen)) > 0) { ++ while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) { + if (G.from_top) { + int nwrite = nread; + if (seen < count) { + /* We need to skip a few more bytes/lines */ + if (COUNT_BYTES) { + nwrite -= (count - seen); +- seen = count; ++ seen += nread; + } else { + char *s = buf; + do { +--- busybox-1.19.2/testsuite/tail.tests ++++ busybox-1.19.2-tail/testsuite/tail.tests +@@ -14,4 +14,12 @@ testing "tail: +N with N > file length" + "0\n" \ + "" "qw" + ++testing "tail: -c +N with largish N" \ ++ " ++ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c; ++ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c; ++ " \ ++ "8185\n8177\n" \ ++ "" "" ++ + exit $FAILCOUNT diff --git a/sys-apps/busybox/files/mdev.rc.1 b/sys-apps/busybox/files/mdev.rc.1 new file mode 100755 index 000000000000..4d400a17f575 --- /dev/null +++ b/sys-apps/busybox/files/mdev.rc.1 @@ -0,0 +1,98 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/mdev.rc.1,v 1.1 2011/09/17 03:46:33 vapier Exp $ + +depend() +{ + provide dev + need sysfs +} + +find_mdev() +{ + if [ -x /sbin/mdev ] ; then + echo "/sbin/mdev" + else + echo "/bin/busybox mdev" + fi +} + +populate_mdev() +{ + # populate /dev with devices already found by the kernel + + if get_bootparam "nocoldplug" ; then + RC_COLDPLUG="no" + ewarn "Skipping mdev coldplug as requested in kernel cmdline" + fi + + ebegin "Populating /dev with existing devices with mdev -s" + $(find_mdev) -s + eend $? + + return 0 +} + +seed_dev() +{ + # Seed /dev with some things that we know we need + + # creating /dev/console and /dev/tty1 to be able to write + # to $CONSOLE with/without bootsplash before mdev creates it + [ -c /dev/console ] || mknod /dev/console c 5 1 + [ -c /dev/tty1 ] || mknod /dev/tty1 c 4 1 + + # udevd will dup its stdin/stdout/stderr to /dev/null + # and we do not want a file which gets buffered in ram + [ -c /dev/null ] || mknod /dev/null c 1 3 + + # copy over any persistant things + if [ -d /lib/mdev/devices ] ; then + cp -RPp /lib/mdev/devices/* /dev 2>/dev/null + fi + + # Not provided by sysfs but needed + ln -snf /proc/self/fd /dev/fd + ln -snf fd/0 /dev/stdin + ln -snf fd/1 /dev/stdout + ln -snf fd/2 /dev/stderr + [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core + + # Create problematic directories + mkdir -p /dev/pts /dev/shm +} + +mount_it() +{ + if fstabinfo --quiet /dev ; then + mount -n /dev + else + # Some devices require exec, Bug #92921 + mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" mdev /dev + fi +} + +start() +{ + # Setup temporary storage for /dev + ebegin "Mounting /dev for mdev" + mount_it + eend $? + + # Create a file so that our rc system knows it's still in sysinit. + # Existance means init scripts will not directly run. + # rc will remove the file when done with sysinit. + touch /dev/.rcsysinit + + seed_dev + + # Setup hotplugging (if possible) + if [ -e /proc/sys/kernel/hotplug ] ; then + ebegin "Setting up mdev as hotplug agent" + echo $(find_mdev) > /proc/sys/kernel/hotplug + eend 0 + fi + + populate_mdev +} |