diff options
| author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-04 19:57:34 +0000 |
|---|---|---|
| committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-04 19:57:34 +0000 |
| commit | 503c1dbd394fd542e809d9fe68ffe3c467c09aaf (patch) | |
| tree | a599b114ff8bcc89ad7ed4a6be76026a135e1bdd | |
| parent | 59ec875f449c9f8aa348d354142a79e84fd873c0 (diff) | |
| download | busybox-w32-503c1dbd394fd542e809d9fe68ffe3c467c09aaf.tar.gz busybox-w32-503c1dbd394fd542e809d9fe68ffe3c467c09aaf.tar.bz2 busybox-w32-503c1dbd394fd542e809d9fe68ffe3c467c09aaf.zip | |
There aren't any bzip2 based RPMs. If people want to experiment with new
packaging formats, there's ipkg and such...
git-svn-id: svn://busybox.net/trunk/busybox@14998 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | patches/rpm2cpio_bzip2.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/patches/rpm2cpio_bzip2.patch b/patches/rpm2cpio_bzip2.patch deleted file mode 100644 index 151dd9fb4..000000000 --- a/patches/rpm2cpio_bzip2.patch +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | diff -ur busybox/archival/Config.in busybox/archival/Config.in | ||
| 2 | --- busybox/archival/Config.in Sun May 23 09:15:37 2004 | ||
| 3 | +++ busybox/archival/Config.in Sun May 23 09:15:58 2004 | ||
| 4 | @@ -127,6 +127,14 @@ | ||
| 5 | help | ||
| 6 | Converts an RPM file into a CPIO archive. | ||
| 7 | |||
| 8 | +config CONFIG_FEATURE_RPM2CPIO_BZIP2 | ||
| 9 | + bool " Support bzip2 decompression" | ||
| 10 | + default n | ||
| 11 | + depends on CONFIG_RPM2CPIO | ||
| 12 | + help | ||
| 13 | + If you enable this option you'll be able to extract | ||
| 14 | + rpms compressed with bzip2. | ||
| 15 | + | ||
| 16 | config CONFIG_RPM | ||
| 17 | bool "rpm" | ||
| 18 | default n | ||
| 19 | diff -ur busybox/archival/libunarchive/Makefile.in busybox/archival/libunarchive/Makefile.in | ||
| 20 | --- busybox/archival/libunarchive/Makefile.in Sun May 23 09:15:04 2004 | ||
| 21 | +++ busybox/archival/libunarchive/Makefile.in Sun May 23 09:16:42 2004 | ||
| 22 | @@ -65,6 +65,7 @@ | ||
| 23 | LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) | ||
| 24 | LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o | ||
| 25 | LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o | ||
| 26 | +LIBUNARCHIVE-$(CONFIG_FEATURE_RPM2CPIO_BZIP2) += decompress_bunzip2.o | ||
| 27 | LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o | ||
| 28 | LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o | ||
| 29 | LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o | ||
| 30 | diff -ur busybox/archival/rpm2cpio.c busybox/archival/rpm2cpio.c | ||
| 31 | --- busybox/archival/rpm2cpio.c Sun May 23 09:15:04 2004 | ||
| 32 | +++ busybox/archival/rpm2cpio.c Sun May 23 09:19:03 2004 | ||
| 33 | @@ -91,14 +91,26 @@ | ||
| 34 | skip_header(rpm_fd); | ||
| 35 | |||
| 36 | bb_xread_all(rpm_fd, &magic, 2); | ||
| 37 | - if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { | ||
| 38 | - bb_error_msg_and_die("Invalid gzip magic"); | ||
| 39 | + if ((magic[0] == 0x1f) || (magic[1] == 0x8b)) { | ||
| 40 | + check_header_gzip(rpm_fd); | ||
| 41 | + if (inflate_gunzip(rpm_fd, fileno(stdout)) != 0) | ||
| 42 | + bb_error_msg("Error inflating (gzip)"); | ||
| 43 | } | ||
| 44 | |||
| 45 | - check_header_gzip(rpm_fd); | ||
| 46 | - if (inflate_gunzip(rpm_fd, STDOUT_FILENO) != 0) { | ||
| 47 | - bb_error_msg("Error inflating"); | ||
| 48 | + if ((magic[0] == 'B') && (magic[1] == 'Z')) { | ||
| 49 | +#ifdef CONFIG_FEATURE_RPM2CPIO_BZIP2 | ||
| 50 | + /* return to position before magic (eek..!) */ | ||
| 51 | + lseek(rpm_fd, -2, SEEK_CUR); | ||
| 52 | + if(uncompressStream(rpm_fd, fileno(stdout)) != 0) | ||
| 53 | + bb_error_msg("Error inflating (bzip2)"); | ||
| 54 | +#else | ||
| 55 | + bb_error_msg_and_die("bzip2 not supported"); | ||
| 56 | +#endif | ||
| 57 | } | ||
| 58 | + | ||
| 59 | + else | ||
| 60 | + bb_error_msg_and_die("not gzip or bzip2 compressed"); | ||
| 61 | + | ||
| 62 | |||
| 63 | close(rpm_fd); | ||
