summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-16 06:08:02 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-16 06:08:02 +0000
commit2ab1d1c7c89a02d9f5efd2703b00cf2ee94d9ea6 (patch)
tree47eb98f32c0bd453c034ccc77fe7d4076b403419
parent49797c5f1cbe61f87e9cb8dcce7368ce794a0d50 (diff)
downloadaports-2ab1d1c7c89a02d9f5efd2703b00cf2ee94d9ea6.tar.bz2
aports-2ab1d1c7c89a02d9f5efd2703b00cf2ee94d9ea6.tar.xz
core/busybox: fixes from upstream. enable blkid
-rw-r--r--core/busybox/APKBUILD10
-rw-r--r--core/busybox/busybox-1.14.2-df.patch134
-rw-r--r--core/busybox/busybox-1.14.2-ls.patch152
-rw-r--r--core/busybox/busybox-1.14.2-udhcpd.patch12
-rw-r--r--core/busybox/busyboxconfig36
5 files changed, 324 insertions, 20 deletions
diff --git a/core/busybox/APKBUILD b/core/busybox/APKBUILD
index 4eb47a589..2673881e5 100644
--- a/core/busybox/APKBUILD
+++ b/core/busybox/APKBUILD
@@ -1,13 +1,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.14.2
-pkgrel=0
+pkgrel=1
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
license=GPL-2
depends=
install="$pkgname.post-install $pkgname.post-upgrade"
source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
+ busybox-1.14.2-df.patch
+ busybox-1.14.2-ls.patch
+ busybox-1.14.2-udhcpd.patch
$pkgname-1.12.1-vi-path.patch
$pkgname-1.11.1-bb.patch
bb-tar-numeric-owner.patch
@@ -41,9 +44,12 @@ build() {
}
md5sums="c13b09b4125688d5fca5c95a79bf814a busybox-1.14.2.tar.bz2
+a34c5e72c3f5308838ddc3bf70642136 busybox-1.14.2-df.patch
+b261df2f193bb97d8e3e59e02c957780 busybox-1.14.2-ls.patch
+ca9a77bd4f6000d2b031a2cee555fcd6 busybox-1.14.2-udhcpd.patch
f5a8ae3145aa249868c1a1abc319c228 busybox-1.12.1-vi-path.patch
4c0f3b486eaa0674961b7ddcd0c60a9b busybox-1.11.1-bb.patch
0b5b2d7db201f90cd08f4a3164ee29a1 bb-tar-numeric-owner.patch
56b78c358797cd15fb64719a48939267 busybox.post-install
56b78c358797cd15fb64719a48939267 busybox.post-upgrade
-6d9cd13b546d9c6063d36c0d3d963887 busyboxconfig"
+0be49dc673a849b5bf5e670db8c8c7b6 busyboxconfig"
diff --git a/core/busybox/busybox-1.14.2-df.patch b/core/busybox/busybox-1.14.2-df.patch
new file mode 100644
index 000000000..7829f5fb7
--- /dev/null
+++ b/core/busybox/busybox-1.14.2-df.patch
@@ -0,0 +1,134 @@
+--- busybox-1.14.2/coreutils/df.c Sun Jul 5 22:59:28 2009
++++ busybox-1.14.2-df/coreutils/df.c Sun Jul 5 23:00:09 2009
+@@ -44,7 +44,6 @@
+ FILE *mount_table;
+ struct mntent *mount_entry;
+ struct statfs s;
+- static const char ignored_mounts[] ALIGN1 = "rootfs\0";
+
+ enum {
+ OPT_KILO = (1 << 0),
+@@ -120,7 +119,7 @@
+ mount_point = *argv++;
+ if (!mount_point)
+ break;
+- mount_entry = find_mount_point(mount_point, bb_path_mtab_file);
++ mount_entry = find_mount_point(mount_point);
+ if (!mount_entry) {
+ bb_error_msg("%s: can't find mount point", mount_point);
+ set_error:
+@@ -154,8 +153,8 @@
+ ) / (blocks_used + s.f_bavail);
+ }
+
+- /* GNU coreutils 6.10 skip certain mounts, try to be compatible. */
+- if (index_in_strings(device, ignored_mounts) != -1)
++ /* GNU coreutils 6.10 skips certain mounts, try to be compatible. */
++ if (strcmp(device, "rootfs") == 0)
+ continue;
+
+ #ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
+--- busybox-1.14.2/include/libbb.h Sun Jul 5 22:59:31 2009
++++ busybox-1.14.2-df/include/libbb.h Sun Jul 5 23:00:09 2009
+@@ -1025,7 +1025,7 @@
+
+ #ifdef HAVE_MNTENT_H
+ extern int match_fstype(const struct mntent *mt, const char *fstypes) FAST_FUNC;
+-extern struct mntent *find_mount_point(const char *name, const char *table) FAST_FUNC;
++extern struct mntent *find_mount_point(const char *name) FAST_FUNC;
+ #endif
+ extern void erase_mtab(const char * name) FAST_FUNC;
+ extern unsigned int tty_baud_to_value(speed_t speed) FAST_FUNC;
+--- busybox-1.14.2/libbb/find_mount_point.c Sun Jul 5 22:59:24 2009
++++ busybox-1.14.2-df/libbb/find_mount_point.c Sun Jul 5 23:00:09 2009
+@@ -17,7 +17,7 @@
+ * Given any other file (or directory), find the mount table entry for its
+ * filesystem.
+ */
+-struct mntent* FAST_FUNC find_mount_point(const char *name, const char *table)
++struct mntent* FAST_FUNC find_mount_point(const char *name)
+ {
+ struct stat s;
+ dev_t mountDevice;
+@@ -25,27 +25,35 @@
+ struct mntent *mountEntry;
+
+ if (stat(name, &s) != 0)
+- return 0;
++ return NULL;
+
+- if ((s.st_mode & S_IFMT) == S_IFBLK)
++ if (S_ISBLK(s.st_mode))
+ mountDevice = s.st_rdev;
+ else
+ mountDevice = s.st_dev;
+
+
+- mountTable = setmntent(table ? table : bb_path_mtab_file, "r");
++ mountTable = setmntent(bb_path_mtab_file, "r");
+ if (!mountTable)
+ return 0;
+
+- while ((mountEntry = getmntent(mountTable)) != 0) {
++ while ((mountEntry = getmntent(mountTable)) != NULL) {
++ /* rootfs mount in Linux 2.6 exists always,
++ * and it makes sense to always ignore it.
++ * Otherwise people can't reference their "real" root! */
++ if (strcmp(mountEntry->mnt_fsname, "rootfs") == 0)
++ continue;
++
+ if (strcmp(name, mountEntry->mnt_dir) == 0
+ || strcmp(name, mountEntry->mnt_fsname) == 0
+ ) { /* String match. */
+ break;
+ }
+- if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice) /* Match the device. */
++ /* Match the device. */
++ if (stat(mountEntry->mnt_fsname, &s) == 0 && s.st_rdev == mountDevice)
+ break;
+- if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice) /* Match the directory's mount point. */
++ /* Match the directory's mount point. */
++ if (stat(mountEntry->mnt_dir, &s) == 0 && s.st_dev == mountDevice)
+ break;
+ }
+ endmntent(mountTable);
+--- busybox-1.14.2/util-linux/mkfs_minix.c Sun Jul 5 22:59:30 2009
++++ busybox-1.14.2-df/util-linux/mkfs_minix.c Sun Jul 5 23:00:09 2009
+@@ -624,7 +624,6 @@
+ int mkfs_minix_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int mkfs_minix_main(int argc UNUSED_PARAM, char **argv)
+ {
+- struct mntent *mp;
+ unsigned opt;
+ char *tmp;
+ struct stat statbuf;
+@@ -683,11 +682,8 @@
+ G.total_blocks = 65535;
+
+ /* Check if it is mounted */
+- mp = find_mount_point(G.device_name, NULL);
+- if (mp && strcmp(G.device_name, mp->mnt_fsname) == 0)
+- bb_error_msg_and_die("%s is mounted on %s; "
+- "refusing to make a filesystem",
+- G.device_name, mp->mnt_dir);
++ if (find_mount_point(G.device_name))
++ bb_error_msg_and_die("can't format mounted filesystem");
+
+ xmove_fd(xopen(G.device_name, O_RDWR), dev_fd);
+ if (fstat(dev_fd, &statbuf) < 0)
+--- busybox-1.14.2/util-linux/mkfs_vfat.c Sun Jul 5 22:59:30 2009
++++ busybox-1.14.2-df/util-linux/mkfs_vfat.c Sun Jul 5 23:00:35 2009
+@@ -273,10 +273,10 @@
+ device_num == 0x0d00 || // xd
+ device_num == 0x1600 ) // hdc, hdd
+ )
+- bb_error_msg_and_die("Will not try to make filesystem on full-disk device (use -I if wanted)");
++ bb_error_msg_and_die("will not try to make filesystem on full-disk device (use -I if wanted)");
+ // can't work on mounted filesystems
+- if (find_mount_point(device_name, NULL))
+- bb_error_msg_and_die("Can't format mounted filesystem");
++ if (find_mount_point(device_name))
++ bb_error_msg_and_die("can't format mounted filesystem");
+ #endif
+ // get true sector size
+ // (parameter must be int*, not long* or size_t*)
diff --git a/core/busybox/busybox-1.14.2-ls.patch b/core/busybox/busybox-1.14.2-ls.patch
new file mode 100644
index 000000000..64e0a94f3
--- /dev/null
+++ b/core/busybox/busybox-1.14.2-ls.patch
@@ -0,0 +1,152 @@
+diff -urpN busybox-1.14.2/coreutils/ls.c busybox-1.14.2-ls/coreutils/ls.c
+--- busybox-1.14.2/coreutils/ls.c 2009-06-22 00:40:29.000000000 +0200
++++ busybox-1.14.2-ls/coreutils/ls.c 2009-07-03 12:46:16.000000000 +0200
+@@ -144,8 +144,7 @@ static const char ls_options[] ALIGN1 =
+ USE_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
+ USE_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
+ USE_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
+- USE_SELINUX("K") /* 1, 27 */
+- USE_SELINUX("Z") /* 1, 28 */
++ USE_SELINUX("KZ") /* 2, 28 */
+ USE_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
+ ;
+ enum {
+@@ -162,6 +161,16 @@ enum {
+ OPT_Q = (1 << 10),
+ //OPT_A = (1 << 11),
+ //OPT_k = (1 << 12),
++ OPTBIT_color = 13
++ + 4 * ENABLE_FEATURE_LS_TIMESTAMPS
++ + 4 * ENABLE_FEATURE_LS_SORTFILES
++ + 2 * ENABLE_FEATURE_LS_FILETYPES
++ + 1 * ENABLE_FEATURE_LS_FOLLOWLINKS
++ + 1 * ENABLE_FEATURE_LS_RECURSIVE
++ + 1 * ENABLE_FEATURE_HUMAN_READABLE
++ + 2 * ENABLE_SELINUX
++ + 2 * ENABLE_FEATURE_AUTOWIDTH,
++ OPT_color = 1 << OPTBIT_color,
+ };
+
+ enum {
+@@ -889,16 +898,6 @@ static int list_single(const struct dnod
+ }
+
+
+-/* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
+-#if ENABLE_FEATURE_LS_COLOR
+-/* long option entry used only for --color, which has no short option
+- * equivalent */
+-static const char ls_color_opt[] ALIGN1 =
+- "color\0" Optional_argument "\xff" /* no short equivalent */
+- ;
+-#endif
+-
+-
+ int ls_main(int argc UNUSED_PARAM, char **argv)
+ {
+ struct dnode **dnd;
+@@ -911,8 +910,25 @@ int ls_main(int argc UNUSED_PARAM, char
+ int dnfiles;
+ int dndirs;
+ int i;
++#if ENABLE_FEATURE_LS_COLOR
++ /* colored LS support by JaWi, janwillem.janssen@lxtreme.nl */
++ /* coreutils 6.10:
++ * # ls --color=BOGUS
++ * ls: invalid argument 'BOGUS' for '--color'
++ * Valid arguments are:
++ * 'always', 'yes', 'force'
++ * 'never', 'no', 'none'
++ * 'auto', 'tty', 'if-tty'
++ * (and substrings: "--color=alwa" work too)
++ */
++ static const char ls_longopts[] ALIGN1 =
++ "color\0" Optional_argument "\xff"; /* no short equivalent */
++ static const char color_str[] ALIGN1 =
++ "always\0""yes\0""force\0"
++ "auto\0""tty\0""if-tty\0";
+ /* need to initialize since --color has _an optional_ argument */
+- USE_FEATURE_LS_COLOR(const char *color_opt = "always";)
++ const char *color_opt = color_str; /* "always" */
++#endif
+
+ INIT_G();
+
+@@ -927,7 +943,7 @@ int ls_main(int argc UNUSED_PARAM, char
+ #endif
+
+ /* process options */
+- USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
++ USE_FEATURE_LS_COLOR(applet_long_options = ls_longopts;)
+ #if ENABLE_FEATURE_AUTOWIDTH
+ opt_complementary = "T+:w+"; /* -T N, -w N */
+ opt = getopt32(argv, ls_options, &tabstops, &terminal_width
+@@ -966,13 +982,20 @@ int ls_main(int argc UNUSED_PARAM, char
+ if (!p || (p[0] && strcmp(p, "none") != 0))
+ show_color = 1;
+ }
+- if (opt & (1 << i)) { /* next flag after short options */
+- if (strcmp("always", color_opt) == 0)
+- show_color = 1;
+- else if (strcmp("never", color_opt) == 0)
++ if (opt & OPT_color) {
++ if (color_opt[0] == 'n')
+ show_color = 0;
+- else if (strcmp("auto", color_opt) == 0 && isatty(STDOUT_FILENO))
+- show_color = 1;
++ else switch (index_in_substrings(color_str, color_opt)) {
++ case 3:
++ case 4:
++ case 5:
++ if (isatty(STDOUT_FILENO)) {
++ case 0:
++ case 1:
++ case 2:
++ show_color = 1;
++ }
++ }
+ }
+ #endif
+
+diff -urpN busybox-1.14.2/testsuite/ls/ls-1-works busybox-1.14.2-ls/testsuite/ls/ls-1-works
+--- busybox-1.14.2/testsuite/ls/ls-1-works 2009-06-22 00:32:00.000000000 +0200
++++ busybox-1.14.2-ls/testsuite/ls/ls-1-works 2009-07-02 14:28:45.000000000 +0200
+@@ -1,4 +1,4 @@
+ [ -n "$d" ] || d=..
+-ls -1 "$d" > logfile.gnu
+-busybox ls -1 "$d" > logfile.bb
+-cmp logfile.gnu logfile.bb
++LC_ALL=C ls -1 "$d" > logfile.gnu
++LC_ALL=C busybox ls -1 "$d" > logfile.bb
++diff -ubw logfile.gnu logfile.bb
+diff -urpN busybox-1.14.2/testsuite/ls/ls-h-works busybox-1.14.2-ls/testsuite/ls/ls-h-works
+--- busybox-1.14.2/testsuite/ls/ls-h-works 2009-06-22 00:32:00.000000000 +0200
++++ busybox-1.14.2-ls/testsuite/ls/ls-h-works 2009-07-02 14:28:45.000000000 +0200
+@@ -1,4 +1,4 @@
+ [ -n "$d" ] || d=..
+-ls -h "$d" > logfile.gnu
+-busybox ls -h "$d" > logfile.bb
+-cmp logfile.gnu logfile.bb
++LC_ALL=C ls -h "$d" > logfile.gnu
++LC_ALL=C busybox ls -h "$d" > logfile.bb
++diff -ubw logfile.gnu logfile.bb
+diff -urpN busybox-1.14.2/testsuite/ls/ls-l-works busybox-1.14.2-ls/testsuite/ls/ls-l-works
+--- busybox-1.14.2/testsuite/ls/ls-l-works 2009-06-22 00:32:00.000000000 +0200
++++ busybox-1.14.2-ls/testsuite/ls/ls-l-works 2009-07-02 14:28:45.000000000 +0200
+@@ -1,4 +1,4 @@
+ [ -n "$d" ] || d=..
+ LC_ALL=C ls -l "$d" > logfile.gnu
+-busybox ls -l "$d" > logfile.bb
+-diff -w logfile.gnu logfile.bb
++LC_ALL=C busybox ls -l "$d" > logfile.bb
++diff -ubw logfile.gnu logfile.bb
+diff -urpN busybox-1.14.2/testsuite/ls/ls-s-works busybox-1.14.2-ls/testsuite/ls/ls-s-works
+--- busybox-1.14.2/testsuite/ls/ls-s-works 2009-06-22 00:32:00.000000000 +0200
++++ busybox-1.14.2-ls/testsuite/ls/ls-s-works 2009-07-02 14:28:45.000000000 +0200
+@@ -1,4 +1,4 @@
+ [ -n "$d" ] || d=..
+ LC_ALL=C ls -1s "$d" > logfile.gnu
+-busybox ls -1s "$d" > logfile.bb
+-cmp logfile.gnu logfile.bb
++LC_ALL=C busybox ls -1s "$d" > logfile.bb
++diff -ubw logfile.gnu logfile.bb
diff --git a/core/busybox/busybox-1.14.2-udhcpd.patch b/core/busybox/busybox-1.14.2-udhcpd.patch
new file mode 100644
index 000000000..a1502b41f
--- /dev/null
+++ b/core/busybox/busybox-1.14.2-udhcpd.patch
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.14.2/networking/udhcp/files.c busybox-1.14.2-udhcpd/networking/udhcp/files.c
+--- busybox-1.14.2/networking/udhcp/files.c 2009-06-22 00:40:29.000000000 +0200
++++ busybox-1.14.2-udhcpd/networking/udhcp/files.c 2009-07-07 14:58:39.000000000 +0200
+@@ -420,7 +420,7 @@ void FAST_FUNC read_leases(const char *f
+ continue;
+ /* NB: add_lease takes "relative time", IOW,
+ * lease duration, not lease deadline. */
+- if (!(add_lease(lease.chaddr, lease.yiaddr, expires, lease.hostname))) {
++ if (!(add_lease(lease.chaddr, lease.yiaddr, expires, NULL /* was lease.hostname. bug in add_lease, disabled */ ))) {
+ bb_error_msg("too many leases while loading %s", file);
+ break;
+ }
diff --git a/core/busybox/busyboxconfig b/core/busybox/busyboxconfig
index 514886170..38f0a19f4 100644
--- a/core/busybox/busyboxconfig
+++ b/core/busybox/busyboxconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Busybox version: 1.14.1
-# Fri Jun 12 06:14:14 2009
+# Busybox version: 1.14.2
+# Wed Jul 15 18:07:16 2009
#
CONFIG_HAVE_DOT_CONFIG=y
@@ -458,7 +458,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
#
CONFIG_ACPID=y
CONFIG_FEATURE_ACPID_COMPAT=y
-# CONFIG_BLKID is not set
+CONFIG_BLKID=y
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
CONFIG_FBSET=y
@@ -474,7 +474,7 @@ CONFIG_FEATURE_SGI_LABEL=y
CONFIG_FEATURE_SUN_LABEL=y
CONFIG_FEATURE_OSF_LABEL=y
CONFIG_FEATURE_FDISK_ADVANCED=y
-# CONFIG_FINDFS is not set
+CONFIG_FINDFS=y
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
# CONFIG_MKFS_MINIX is not set
@@ -500,28 +500,28 @@ CONFIG_MKSWAP=y
# CONFIG_FEATURE_MKSWAP_V0 is not set
CONFIG_MORE=y
CONFIG_FEATURE_USE_TERMIOS=y
-# CONFIG_VOLUMEID is not set
-# CONFIG_FEATURE_VOLUMEID_EXT is not set
-# CONFIG_FEATURE_VOLUMEID_REISERFS is not set
-# CONFIG_FEATURE_VOLUMEID_FAT is not set
+CONFIG_VOLUMEID=y
+CONFIG_FEATURE_VOLUMEID_EXT=y
+CONFIG_FEATURE_VOLUMEID_REISERFS=y
+CONFIG_FEATURE_VOLUMEID_FAT=y
# CONFIG_FEATURE_VOLUMEID_HFS is not set
# CONFIG_FEATURE_VOLUMEID_JFS is not set
-# CONFIG_FEATURE_VOLUMEID_XFS is not set
-# CONFIG_FEATURE_VOLUMEID_NTFS is not set
-# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set
-# CONFIG_FEATURE_VOLUMEID_UDF is not set
-# CONFIG_FEATURE_VOLUMEID_LUKS is not set
-# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set
-# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set
+CONFIG_FEATURE_VOLUMEID_XFS=y
+CONFIG_FEATURE_VOLUMEID_NTFS=y
+CONFIG_FEATURE_VOLUMEID_ISO9660=y
+CONFIG_FEATURE_VOLUMEID_UDF=y
+CONFIG_FEATURE_VOLUMEID_LUKS=y
+CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
+CONFIG_FEATURE_VOLUMEID_CRAMFS=y
# CONFIG_FEATURE_VOLUMEID_ROMFS is not set
# CONFIG_FEATURE_VOLUMEID_SYSV is not set
-# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
-# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set
+CONFIG_FEATURE_VOLUMEID_OCFS2=y
+CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
CONFIG_MOUNT=y
CONFIG_FEATURE_MOUNT_FAKE=y
CONFIG_FEATURE_MOUNT_VERBOSE=y
CONFIG_FEATURE_MOUNT_HELPERS=y
-# CONFIG_FEATURE_MOUNT_LABEL is not set
+CONFIG_FEATURE_MOUNT_LABEL=y
CONFIG_FEATURE_MOUNT_NFS=y
CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_FEATURE_MOUNT_FLAGS=y