summaryrefslogtreecommitdiffstats
path: root/tools/busybox-patches
diff options
context:
space:
mode:
authorSebastian Schmelzer2008-08-12 13:17:10 +0200
committerSebastian Schmelzer2008-08-12 13:17:10 +0200
commitce9a39524ea0eec7e2e2d144dc5dc1931c7bab27 (patch)
tree0056e1f5304a0287c64026d99f4e5cd0932d6d2b /tools/busybox-patches
parentDummy for Xorg xrandr stage3 attribute (see #204) (diff)
downloadcore-ce9a39524ea0eec7e2e2d144dc5dc1931c7bab27.tar.gz
core-ce9a39524ea0eec7e2e2d144dc5dc1931c7bab27.tar.xz
core-ce9a39524ea0eec7e2e2d144dc5dc1931c7bab27.zip
* update to busybox 1.11.1
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2031 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'tools/busybox-patches')
-rw-r--r--tools/busybox-patches/bzip2-payload-1.11.1.diff62
-rw-r--r--tools/busybox-patches/cryptpw-blowfish-1.11.1.diff80
-rw-r--r--tools/busybox-patches/unionfs-run-init-1.11.1.diff14
3 files changed, 156 insertions, 0 deletions
diff --git a/tools/busybox-patches/bzip2-payload-1.11.1.diff b/tools/busybox-patches/bzip2-payload-1.11.1.diff
new file mode 100644
index 00000000..4e55b4c9
--- /dev/null
+++ b/tools/busybox-patches/bzip2-payload-1.11.1.diff
@@ -0,0 +1,62 @@
+diff -wur busybox-1.11.0/archival/Config.in busybox-1.11.0-patched/archival/Config.in
+--- busybox-1.11.0/archival/Config.in 2008-06-25 14:51:26.000000000 +0200
++++ busybox-1.11.0-patched/archival/Config.in 2008-07-10 17:53:29.000000000 +0200
+@@ -145,6 +145,14 @@
+ help
+ Converts an RPM file into a CPIO archive.
+
++config FEATURE_RPM2CPIO_BZIP2
++ bool " Support bzip2 decompression"
++ default n
++ depends on RPM2CPIO
++ help
++ If you enable this option you'll be able to extract
++ rpms compressed with bzip2.
++
+ config RPM
+ bool "rpm"
+ default n
+Only in busybox-1.11.0-patched/archival: Config.in.orig
+diff -wur busybox-1.11.0/archival/libunarchive/Kbuild busybox-1.11.0-patched/archival/libunarchive/Kbuild
+--- busybox-1.11.0/archival/libunarchive/Kbuild 2008-06-25 14:51:26.000000000 +0200
++++ busybox-1.11.0-patched/archival/libunarchive/Kbuild 2008-07-10 17:53:29.000000000 +0200
+@@ -55,6 +55,7 @@
+ lib-$(CONFIG_GUNZIP) += decompress_unzip.o
+ lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
+ lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o
++lib-$(CONFIG_FEATURE_RPM2CPIO_BZIP2) += $(GUNZIP_FILES) decompress_bunzip2.o
+ lib-$(CONFIG_RPM) += decompress_unzip.o get_header_cpio.o
+ lib-$(CONFIG_FEATURE_RPM_BZ2) += decompress_bunzip2.o
+ lib-$(CONFIG_TAR) += get_header_tar.o
+diff -wur busybox-1.11.0/archival/rpm2cpio.c busybox-1.11.0-patched/archival/rpm2cpio.c
+--- busybox-1.11.0/archival/rpm2cpio.c 2008-06-25 14:51:26.000000000 +0200
++++ busybox-1.11.0-patched/archival/rpm2cpio.c 2008-07-10 17:53:29.000000000 +0200
+@@ -75,13 +75,23 @@
+ skip_header(rpm_fd);
+
+ xread(rpm_fd, &magic, 2);
+- if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
+- bb_error_msg_and_die("invalid gzip magic");
+- }
+-
++ if ((magic[0] == 0x1f) && (magic[1] == 0x8b)) {
+ if (unpack_gz_stream(rpm_fd, STDOUT_FILENO) < 0) {
+- bb_error_msg("error inflating");
++ bb_error_msg("error inflating (gzip)");
++ }
++ }
++ else if ((magic[0] == 'B') && (magic[1] == 'Z')) {
++#ifdef CONFIG_FEATURE_RPM2CPIO_BZIP2
++ /* return to position before magic (eek..!) */
++ lseek(rpm_fd, -2, SEEK_CUR);
++ if (unpack_bz2_stream(rpm_fd, fileno(stdout)) != 0)
++ bb_error_msg("error inflating (bzip2)");
++#else
++ bb_error_msg_and_die("bzip2 not supported");
++#endif
+ }
++ else
++ bb_error_msg_and_die("not gzip or bzip2 compressed");
+
+ close(rpm_fd);
+
diff --git a/tools/busybox-patches/cryptpw-blowfish-1.11.1.diff b/tools/busybox-patches/cryptpw-blowfish-1.11.1.diff
new file mode 100644
index 00000000..2f14983f
--- /dev/null
+++ b/tools/busybox-patches/cryptpw-blowfish-1.11.1.diff
@@ -0,0 +1,80 @@
+diff -wur busybox-1.11.0/include/usage.h busybox-1.11.0-patched/include/usage.h
+--- busybox-1.11.0/include/usage.h 2008-06-25 14:51:35.000000000 +0200
++++ busybox-1.11.0-patched/include/usage.h 2008-07-10 17:45:38.000000000 +0200
+@@ -563,12 +563,23 @@
+ "\n FILE Replace crontab by FILE ('-': stdin)" \
+
+ #define cryptpw_trivial_usage \
+- "[-a des|md5] [string]"
++ USE_FEATURE_CRYPTPW_BLOWFISH( \
++ "[-a des|md5|blowfish] [string]" \
++ ) \
++ SKIP_FEATURE_CRYPTPW_BLOWFISH( \
++ "[-a des|md5] [string]" \
++ )
+ #define cryptpw_full_usage "\n\n" \
+ "Output crypted string.\n" \
+ "If string isn't supplied on cmdline, read it from stdin.\n" \
+ "\nOptions:" \
+ "\n -a Algorithm to use (default: md5)" \
++ "\n Available algorithms:" \
++ USE_FEATURE_CRYPTPW_BLOWFISH( \
++ "\n blowfish" \
++ ) \
++ "\n des" \
++ "\n md5"
+
+ #define cttyhack_trivial_usage NOUSAGE_STR
+ #define cttyhack_full_usage ""
+diff -wur busybox-1.11.0/loginutils/Config.in busybox-1.11.0-patched/loginutils/Config.in
+--- busybox-1.11.0/loginutils/Config.in 2008-06-25 14:51:35.000000000 +0200
++++ busybox-1.11.0-patched/loginutils/Config.in 2008-07-10 17:46:59.000000000 +0200
+@@ -232,6 +232,13 @@
+ help
+ Applet for crypting a string.
+
++config FEATURE_CRYPTPW_BLOWFISH
++ bool "Support blowfish in cryptpw"
++ default y
++ depends on CRYPTPW
++ help
++ With this option cryptpw will support the blowfish cipher, too.
++
+ config CHPASSWD
+ bool "chpasswd"
+ default n
+diff -wur busybox-1.11.0/loginutils/cryptpw.c busybox-1.11.0-patched/loginutils/cryptpw.c
+--- busybox-1.11.0/loginutils/cryptpw.c 2008-06-25 14:51:35.000000000 +0200
++++ busybox-1.11.0-patched/loginutils/cryptpw.c 2008-07-10 17:49:58.000000000 +0200
+@@ -34,19 +34,28 @@
+ int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv)
+ {
+- char salt[sizeof("$N$XXXXXXXX")];
++ char salt[sizeof("$2a$10$1234567890123456789012X")];
+ char *opt_a;
+
+- if (!getopt32(argv, "a:", &opt_a) || opt_a[0] != 'd') {
++ if (!getopt32(argv, "a:", NULL)
++ || (argv[optind - 1][0] != 'b' && argv[optind - 1][0] != 'd')) {
++ /* md5 */
+ salt[0] = '$';
+ salt[1] = '1';
+ salt[2] = '$';
+ crypt_make_salt(salt + 3, 4, 0); /* md5 */
++#if ENABLE_FEATURE_CRYPTPW_BLOWFISH
++ } else if (argv[optind - 1][0] == 'b') {
++ /* blowfish */
++ strcpy(salt, "$2a$10$");
++ crypt_make_salt(salt + 7, 11, 0);
++#endif
+ #if TESTING
+ strcpy(salt + 3, "ajg./bcf");
+ #endif
+ } else {
+- crypt_make_salt(salt, 1, 0); /* des */
++ /* des */
++ crypt_make_salt(salt, 1, 0);
+ #if TESTING
+ strcpy(salt, "a.");
+ #endif
diff --git a/tools/busybox-patches/unionfs-run-init-1.11.1.diff b/tools/busybox-patches/unionfs-run-init-1.11.1.diff
new file mode 100644
index 00000000..c678c751
--- /dev/null
+++ b/tools/busybox-patches/unionfs-run-init-1.11.1.diff
@@ -0,0 +1,14 @@
+diff -wur busybox-1.11.0/util-linux/switch_root.c busybox-1.11.0-patched/util-linux/switch_root.c
+--- busybox-1.11.0/util-linux/switch_root.c 2008-06-25 14:51:38.000000000 +0200
++++ busybox-1.11.0-patched/util-linux/switch_root.c 2008-07-10 17:54:56.000000000 +0200
+@@ -105,6 +105,10 @@
+ // Overmount / with newdir and chroot into it. The chdir is needed to
+ // recalculate "." and ".." links.
+
++ if ( !lstat("/rorootfs", &st1 ) )
++ if ( mount("/rorootfs", "/", NULL, MS_MOVE, NULL) )
++ bb_error_msg_and_die("moving rorootfs");
++
+ if (mount(".", "/", NULL, MS_MOVE, NULL))
+ bb_error_msg_and_die("error moving root");
+ xchroot(".");