summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-05-27 14:13:40 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-05-27 22:55:52 +0200
commit0ff05a638ba5ae52e96608524810daf85feec26e (patch)
tree6260641f136bb92ebb1aef13dc2c85b51ad1fd8c /sys-apps
parentsys-apps: delete not relevant (diff)
downloadportage-0ff05a638ba5ae52e96608524810daf85feec26e.tar.xz
sys-apps/busybox-1.1.0: Handle savedconfig eclass, also fix some
open()ness, replace utime with utimes, adapt headers
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/busybox/Manifest4
-rw-r--r--sys-apps/busybox/busybox-1.1.0.ebuild51
-rw-r--r--sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-open-mode.diff25
-rw-r--r--sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-utime.h.diff128
4 files changed, 173 insertions, 35 deletions
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
index 484c6d9f..18a57b39 100644
--- a/sys-apps/busybox/Manifest
+++ b/sys-apps/busybox/Manifest
@@ -1,5 +1,7 @@
AUX 1.1.0/bb.patch 156 RMD160 7dea06b8cad20585129845980fe06eb6d27ed159 SHA1 03c21173c68e3de47c3fc4d0d3d71fd971c5c153 SHA256 094d7a95f64198666ea65bdd59f2ea93b7f489b9019bb045aa1c1d25e9f0ee53
AUX 1.1.0/busybox-1.1.0-BJA-asm-page.diff 606 RMD160 a4e4f5f368ba82dc0913e5b106bb83c94bb7d889 SHA1 d65313d967d8d2b9ac9ca026e1ec1bacf6586f4e SHA256 6a41891cef175a9e0f39a2a724501a15e73ef90126b9fbbfd6c9cb3785eea0b7
+AUX 1.1.0/busybox-1.1.0-BJA-open-mode.diff 1056 RMD160 4614160a9454d5b095d07845acaf67d8a90c6cc3 SHA1 7e97928de6e5b20e9eda33be34436382565ca7e8 SHA256 2536738daa833e2c1edfb740ad26338da38cb37c3506118d6e8a588470f9947e
+AUX 1.1.0/busybox-1.1.0-BJA-utime.h.diff 3493 RMD160 445bbc31b03735ebbc950bed4a707db26b80c390 SHA1 80aa8a2467fef4e69d388bdab24132c37eeda513 SHA256 9d68f7ff94cb263f3386e1684947e884ceb928dfb12bf0e31b96ad57211643e6
AUX 1.1.0/flx-01_redirect-dev-null-1.diff 420 RMD160 1335fce8c195f89a20c874178944e5b3993c8692 SHA1 450565cded96aef9d2728cf7693b38aa9500208c SHA256 e3002a8fb2ba9a10c7d06705cb6cdf51b0a732a78b339258597f5c44c33eae0a
AUX 1.1.0/flx-02_klog-block-read-1.diff 2524 RMD160 ed7e51990c83232802dc07dbb60c75686b4608c5 SHA1 c31851996ac96a51bc1fb7d4cb71e7f4862eeacf SHA256 64db8082652960a2ee097e97dcf44274dfbd6bb08285d1c20c0181d267cccf3b
AUX 1.1.0/flx-03_remove-backspaces-from-kmsg-1.diff 1943 RMD160 bcedd5d69a86b7d082f4f21e45903aee6ab17e54 SHA1 bce9ac9f1eb6692c06d7a45c0c72e8cc403f473e SHA256 ffbcd9cb065aa01a3e13691886a198ad542f3ba49815c55a98a36babab347aa8
@@ -14,4 +16,4 @@ AUX 1.1.0/flx-syslogd-reliability.diff 2396 RMD160 09929df0f3bc817d7a15f257e8edd
AUX 1.1.0/glibc.patch 605 RMD160 537c9fd550d61aea7c1f2a05d44ce0a9af8060a0 SHA1 78d5a49ededa54cd003439f958f9a34e9c6558f0 SHA256 0a252b3a7da5265cf439300d9a98e2c39bf418acc29b4f113a53e2552098415f
AUX 1.1.0/ppc64-insmod.patch 359 RMD160 4f423c216dbe5ba36e2589e51091775b21e398c2 SHA1 6c04be280f3cfacd989f0a8c3c7ae2671fa393ae SHA256 822f72925dbff554a1f4e8c34a979bf7fc192b5683b62a40f6d78316b80d8a8c
DIST busybox-1.1.0.tar.bz2 1408642 RMD160 12769c88b1813063044ff29d43171be114cf178d SHA1 433cafb1badc1f752069d18217129651fe93be69 SHA256 3377d271dcfcbf8f49368c63c4819d4f8306bc529766bb0d8f4a12888fb20596
-EBUILD busybox-1.1.0.ebuild 7495 RMD160 cf6eb65eeb45f5ef87075fb4d08b90f511f0aebe SHA1 c8310c4ffd90d95f96676d0f0460969a99230a14 SHA256 ef47fc841439c2435f2e13782c2fc5036bbc818612679561e7a3ee6fd25bfad8
+EBUILD busybox-1.1.0.ebuild 6930 RMD160 c4bb8b785f9a8e0d98e50053e838f8035ffcf011 SHA1 9d229213c2e25df8f05d9c659cb372d9e2a3aec9 SHA256 44c9b06fd90aa9342e667bff8c427c0eb8d0a7669516023fdca0d1a9aade593d
diff --git a/sys-apps/busybox/busybox-1.1.0.ebuild b/sys-apps/busybox/busybox-1.1.0.ebuild
index 5584d0ea..df8b5294 100644
--- a/sys-apps/busybox/busybox-1.1.0.ebuild
+++ b/sys-apps/busybox/busybox-1.1.0.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-apps/busybox/Attic/busybox-1.1.0.ebuild,v 1.18 2006/07/15 02:51:44 vapier dead $
-inherit eutils
+inherit eutils savedconfig
#SNAPSHOT=20040726
SNAPSHOT=""
@@ -20,7 +20,7 @@ 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 floppyboot make-symlinks"
+IUSE="debug static netboot floppyboot make-symlinks"
RESTRICT="test"
DEPEND=""
@@ -72,8 +72,10 @@ src_unpack() {
epatch "${FILESDIR}"/1.1.0/flx-05-syslogd-ipc-set-key.diff
epatch "${FILESDIR}"/1.1.0/flx-06-logread-ipc-set-key.diff
epatch "${FILESDIR}"/1.1.0/flx-07-syslogd-pidfile.diff
-
+
epatch "${FILESDIR}"/1.1.0/${P}-BJA-asm-page.diff
+ epatch "${FILESDIR}"/1.1.0/${P}-BJA-open-mode.diff
+ epatch "${FILESDIR}"/1.1.0/${P}-BJA-utime.h.diff
# we'll let portage do the stripping
# respect env CFLAGS
@@ -89,21 +91,6 @@ src_unpack() {
# [package]-[version].config
# [package].config
- if use savedconfig ; then
- [[ -r .config ]] && rm .config
- for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do
- configfile=${ROOT}/etc/${PN}/${CHOST}/${conf}.config
- [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config
- if [[ -r ${configfile} ]] ; then
- cp ${configfile} ${S}/.config
- break
- fi
- done
- if [[ -r ${S}/.config ]] ; then
- einfo "Found your ${configfile} and using it."
- return 0
- fi
- fi
if use netboot ; then
cp "${FILESDIR}"/config-netboot .config
sed -i \
@@ -143,6 +130,7 @@ src_unpack() {
busybox_config_option n ${opt}
done
+ restore_config .config
make oldconfig > /dev/null
}
@@ -151,7 +139,7 @@ src_compile() {
use ppc64 && CFLAGS="${CFLAGS} -mminimal-toc"
emake -j1 CROSS="${CROSS}" depend || die "depend failed"
emake CROSS="${CROSS}" busybox || die "build failed"
- if ! use static ; then
+ if use static ; then
mv busybox{,.bak}
local failed=0
emake -j1 \
@@ -192,15 +180,15 @@ src_install() {
fi
make CROSS="${CROSS}" install || die
cp -pPR _install/${x}/* "${D}"/ || die "copying links for ${x} failed"
- cd "${D}"
- # XXX: should really move this to pkg_preinst() ...
- local symlink
- for symlink in {,usr/}{bin,sbin}/* linuxrc ; do
- [[ -L ${symlink} ]] || continue
- [[ -e ${ROOT}/${symlink} ]] \
- && eerror "Deleting symlink ${symlink} because it exists in ${ROOT}" \
- && rm ${symlink}
- done
+# cd "${D}"
+# # XXX: should really move this to pkg_preinst() ...
+# local symlink
+# for symlink in {,usr/}{bin,sbin}/* linuxrc ; do
+# [[ -L ${symlink} ]] || continue
+# [[ -e ${ROOT}/${symlink} ]] \
+# && eerror "Deleting symlink ${symlink} because it exists in ${ROOT}" \
+# && rm ${symlink}
+# done
cd "${S}"
fi
@@ -238,12 +226,7 @@ src_install() {
&& cd ..
fi
- if use savedconfig ; then
- einfo "Saving this build config to /etc/${PN}/${CHOST}/${PN}-${PV}-${PR}.config"
- einfo "Read this ebuild for more info on how to take advantage of this option"
- insinto /etc/${PN}/${CHOST}/
- newins "${S}"/.config ${PN}-${PV}-${PR}.config
- fi
+ save_config .config
}
pkg_postinst() {
diff --git a/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-open-mode.diff b/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-open-mode.diff
new file mode 100644
index 00000000..e73ceeb3
--- /dev/null
+++ b/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-open-mode.diff
@@ -0,0 +1,25 @@
+--- archival/gzip.c.ori 2011-08-02 20:00:03.864359196 +0200
++++ archival/gzip.c 2011-08-02 20:03:53.277427909 +0200
+@@ -1268,9 +1268,9 @@
+ /* Open output file */
+ #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW
+ outFileNum =
+- open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW);
++ open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, S_IRUSR | S_IWUSR | S_IRGRP);
+ #else
+- outFileNum = open(path, O_RDWR | O_CREAT | O_EXCL);
++ outFileNum = open(path, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP);
+ #endif
+ if (outFileNum < 0) {
+ bb_perror_msg("%s", path);
+--- e2fsprogs/ext2fs/ismounted.c.ori 2011-08-02 20:06:38.241196299 +0200
++++ e2fsprogs/ext2fs/ismounted.c 2011-08-02 20:07:04.065316581 +0200
+@@ -147,7 +147,7 @@
+ is_root:
+ #define TEST_FILE "/.ismount-test-file"
+ *mount_flags |= EXT2_MF_ISROOT;
+- fd = open(TEST_FILE, O_RDWR|O_CREAT);
++ fd = open(TEST_FILE, O_RDWR|O_CREAT, S_IRUSR | S_IWUSR);
+ if (fd < 0) {
+ if (errno == EROFS)
+ *mount_flags |= EXT2_MF_READONLY;
diff --git a/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-utime.h.diff b/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-utime.h.diff
new file mode 100644
index 00000000..d5267977
--- /dev/null
+++ b/sys-apps/busybox/files/1.1.0/busybox-1.1.0-BJA-utime.h.diff
@@ -0,0 +1,128 @@
+--- ./loginutils/passwd.c.ori 2012-02-12 00:09:25.808644957 +0100
++++ ./loginutils/passwd.c 2012-02-12 00:33:13.831198604 +0100
+@@ -6,7 +6,8 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <utime.h>
++#include <linux/utime.h>
++#include <sys/time.h>
+ #include <syslog.h>
+ #include <time.h>
+ #include <sys/resource.h>
+@@ -282,7 +283,7 @@
+
+ ub.actime = sb.st_atime;
+ ub.modtime = sb.st_mtime;
+- utime(backup, &ub);
++ utimes(backup, &ub);
+ return 0;
+ }
+
+--- ./libbb/copy_file.c.ori 2012-02-12 00:09:36.011699753 +0100
++++ ./libbb/copy_file.c 2012-02-12 00:33:23.575249555 +0100
+@@ -12,7 +12,8 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <utime.h>
++#include <linux/utime.h>
++#include <sys/time.h>
+ #include <errno.h>
+ #include <dirent.h>
+ #include <stdlib.h>
+@@ -244,7 +245,7 @@
+
+ times.actime = source_stat.st_atime;
+ times.modtime = source_stat.st_mtime;
+- if (utime(dest, &times) < 0)
++ if (utimes(dest, &times) < 0)
+ bb_perror_msg(msg, "times", dest);
+ if (chown(dest, source_stat.st_uid, source_stat.st_gid) < 0) {
+ source_stat.st_mode &= ~(S_ISUID | S_ISGID);
+--- ./libbb/remove_file.c.ori 2012-02-12 00:09:30.619670796 +0100
++++ ./libbb/remove_file.c 2012-02-12 00:31:22.261615364 +0100
+@@ -21,7 +21,7 @@
+
+ #include <stdio.h>
+ #include <time.h>
+-#include <utime.h>
++#include <sys/time.h>
+ #include <dirent.h>
+ #include <errno.h>
+ #include <unistd.h>
+--- ./coreutils/cp.c.ori 2012-02-12 00:09:50.667778461 +0100
++++ ./coreutils/cp.c 2012-02-12 00:31:22.262615369 +0100
+@@ -20,7 +20,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <utime.h>
++#include <sys/time.h>
+ #include <errno.h>
+ #include <dirent.h>
+ #include <stdlib.h>
+--- ./coreutils/touch.c.ori 2012-02-12 00:09:43.867741942 +0100
++++ ./coreutils/touch.c 2012-02-12 00:33:32.422295817 +0100
+@@ -33,7 +33,8 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#include <utime.h>
++#include <linux/utime.h>
++#include <sys/time.h>
+ #include <errno.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -54,7 +55,7 @@
+ }
+
+ do {
+- if (utime(*argv, NULL)) {
++ if (utimes(*argv, NULL)) {
+ if (errno == ENOENT) { /* no such file*/
+ if (flags & 1) { /* Creation is disabled, so ignore. */
+ continue;
+--- ./archival/ar.c.ori 2012-02-12 00:10:00.492831226 +0100
++++ ./archival/ar.c 2012-02-12 00:31:22.265615387 +0100
+@@ -31,7 +31,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <time.h>
+-#include <utime.h>
++#include <sys/time.h>
+ #include <unistd.h>
+
+ #include "unarchive.h"
+--- ./archival/gzip.c.ori 2012-02-12 00:09:55.867806389 +0100
++++ ./archival/gzip.c 2012-02-12 00:33:40.823339748 +0100
+@@ -42,7 +42,8 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <signal.h>
+-#include <utime.h>
++#include <linux/utime.h>
++#include <sys/time.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+--- ./archival/libunarchive/data_extract_all.c.ori 2012-02-12 00:10:08.380873590 +0100
++++ ./archival/libunarchive/data_extract_all.c 2012-02-12 00:32:51.895083909 +0100
+@@ -20,7 +20,8 @@
+ #include <fcntl.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <utime.h>
++#include <linux/utime.h>
++#include <sys/time.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+
+@@ -123,6 +124,6 @@
+ if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) {
+ struct utimbuf t;
+ t.actime = t.modtime = file_header->mtime;
+- utime(file_header->name, &t);
++ utimes(file_header->name, &t);
+ }
+ }