diff options
author | Dirk von Suchodoletz | 2007-06-15 11:29:37 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-06-15 11:29:37 +0200 |
commit | 63f4452810820e594c8ee9776880ea7c7bb95a4a (patch) | |
tree | d62a1a7db5ebb2470834680a84b9fc6b5d8bf395 /tools/busybox-patches | |
parent | * moved slxsettings from 'config-db' to 'bin', as it has nothing to do with (diff) | |
download | core-63f4452810820e594c8ee9776880ea7c7bb95a4a.tar.gz core-63f4452810820e594c8ee9776880ea7c7bb95a4a.tar.xz core-63f4452810820e594c8ee9776880ea7c7bb95a4a.zip |
Busybox patches for new 1.6.0 version (as separate files for testing)
and new configuration (.config)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1164 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'tools/busybox-patches')
-rw-r--r-- | tools/busybox-patches/bzip2-payload-1.6.0.diff | 63 | ||||
-rw-r--r-- | tools/busybox-patches/unionfs-run-init-1.6.0.diff | 13 |
2 files changed, 76 insertions, 0 deletions
diff --git a/tools/busybox-patches/bzip2-payload-1.6.0.diff b/tools/busybox-patches/bzip2-payload-1.6.0.diff new file mode 100644 index 00000000..0211e20f --- /dev/null +++ b/tools/busybox-patches/bzip2-payload-1.6.0.diff @@ -0,0 +1,63 @@ +diff -ru ./archival/Config.in ../busybox-1.6.0/archival/Config.in +--- ./archival/Config.in 2007-06-01 13:48:31.000000000 +0200 ++++ ../busybox-1.6.0/archival/Config.in 2007-06-15 12:22:16.000000000 +0200 +@@ -127,6 +127,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 +diff -ru ./archival/libunarchive/Kbuild ../busybox-1.6.0/archival/libunarchive/Kbuild +--- ./archival/libunarchive/Kbuild 2007-06-01 13:48:31.000000000 +0200 ++++ ../busybox-1.6.0/archival/libunarchive/Kbuild 2007-06-15 12:22:46.000000000 +0200 +@@ -57,6 +57,7 @@ + lib-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) + lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o + lib-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o ++lib-$(CONFIG_FEATURE_RPM2CPIO_BZIP2) += $(GUNZIP_FILES) decompress_bunzip2.o + lib-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o + lib-$(CONFIG_TAR) += get_header_tar.o + lib-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o +diff -ru ./archival/rpm2cpio.c ../busybox-1.6.0/archival/rpm2cpio.c +--- ./archival/rpm2cpio.c 2007-06-01 13:48:31.000000000 +0200 ++++ ../busybox-1.6.0/archival/rpm2cpio.c 2007-06-15 12:22:24.000000000 +0200 +@@ -75,14 +75,24 @@ + 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)) { ++ check_header_gzip_or_die(rpm_fd); ++ if (inflate_gunzip(rpm_fd, STDOUT_FILENO) < 0) { ++ bb_error_msg("error inflating (gzip)"); ++ } + } +- +- check_header_gzip_or_die(rpm_fd); +- if (inflate_gunzip(rpm_fd, STDOUT_FILENO) < 0) { +- bb_error_msg("error inflating"); ++ 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 (uncompressStream(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/unionfs-run-init-1.6.0.diff b/tools/busybox-patches/unionfs-run-init-1.6.0.diff new file mode 100644 index 00000000..0014e865 --- /dev/null +++ b/tools/busybox-patches/unionfs-run-init-1.6.0.diff @@ -0,0 +1,13 @@ +--- util-linux/switch_root.c.orig 2007-06-15 11:38:00.000000000 +0200 ++++ util-linux/switch_root.c 2007-06-15 11:35:41.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) || chroot(".")) + bb_error_msg_and_die("error moving root"); + xchdir("/"); |