diff options
author | Dirk von Suchodoletz | 2008-05-31 19:07:33 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2008-05-31 19:07:33 +0200 |
commit | 40c51fcb4d5b925a70374f4b150111fa4bdb954b (patch) | |
tree | 8c058f421f6f5b83c2dfd198288b0ff164330866 /tools/busybox-patches/bzip2-payload-1.10.2.diff | |
parent | * minor fix (diff) | |
download | core-40c51fcb4d5b925a70374f4b150111fa4bdb954b.tar.gz core-40c51fcb4d5b925a70374f4b150111fa4bdb954b.tar.xz core-40c51fcb4d5b925a70374f4b150111fa4bdb954b.zip |
Patches for the most recent busybox ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1819 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'tools/busybox-patches/bzip2-payload-1.10.2.diff')
-rw-r--r-- | tools/busybox-patches/bzip2-payload-1.10.2.diff | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tools/busybox-patches/bzip2-payload-1.10.2.diff b/tools/busybox-patches/bzip2-payload-1.10.2.diff new file mode 100644 index 00000000..bd988bf4 --- /dev/null +++ b/tools/busybox-patches/bzip2-payload-1.10.2.diff @@ -0,0 +1,61 @@ +diff -wur busybox-1.10.2/archival/Config.in busybox-1.10.2-openslx/archival/Config.in +--- busybox-1.10.2/archival/Config.in 2008-04-19 05:50:29.000000000 +0200 ++++ busybox-1.10.2-openslx/archival/Config.in 2008-05-31 18:06:20.000000000 +0200 +@@ -137,6 +137,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 -wur busybox-1.10.2/archival/libunarchive/Kbuild busybox-1.10.2-openslx/archival/libunarchive/Kbuild +--- busybox-1.10.2/archival/libunarchive/Kbuild 2008-04-19 05:50:29.000000000 +0200 ++++ busybox-1.10.2-openslx/archival/libunarchive/Kbuild 2008-05-31 18:06:20.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.10.2/archival/rpm2cpio.c busybox-1.10.2-openslx/archival/rpm2cpio.c +--- busybox-1.10.2/archival/rpm2cpio.c 2008-04-19 05:50:29.000000000 +0200 ++++ busybox-1.10.2-openslx/archival/rpm2cpio.c 2008-05-31 18:06:20.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); + |