wok-6.x rev 3963
busybox/rpm2cpio: add bz2 support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 26 13:51:58 2009 +0200 (2009-08-26) |
parents | 32c4a55011df |
children | 7b77e8c43460 |
files | busybox-pam/receipt busybox/receipt busybox/stuff/busybox-1.12.0-rpm2cpio.u |
line diff
1.1 --- a/busybox-pam/receipt Wed Aug 26 01:38:30 2009 +0200 1.2 +++ b/busybox-pam/receipt Wed Aug 26 13:51:58 2009 +0200 1.3 @@ -43,6 +43,7 @@ 1.4 ionice.u 1.5 syslogd.u 1.6 iptunnel.u 1.7 +rpm2cpio.u 1.8 EOT 1.9 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config 1.10 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
2.1 --- a/busybox/receipt Wed Aug 26 01:38:30 2009 +0200 2.2 +++ b/busybox/receipt Wed Aug 26 13:51:58 2009 +0200 2.3 @@ -41,6 +41,7 @@ 2.4 ionice.u 2.5 syslogd.u 2.6 iptunnel.u 2.7 +rpm2cpio.u 2.8 EOT 2.9 cp ../stuff/$PACKAGE-$VERSION.config .config 2.10 make oldconfig
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/busybox/stuff/busybox-1.12.0-rpm2cpio.u Wed Aug 26 13:51:58 2009 +0200 3.3 @@ -0,0 +1,33 @@ 3.4 +Add bz2 support 3.5 +--- busybox-1.12.0/archival/rpm2cpio.c 3.6 ++++ busybox-1.12.0/archival/rpm2cpio.c 3.7 +@@ -55,6 +55,7 @@ 3.8 + struct rpm_lead lead; 3.9 + int rpm_fd; 3.10 + unsigned char magic[2]; 3.11 ++ USE_DESKTOP(long long) int FAST_FUNC (*unpack)(int src_fd, int dst_fd); 3.12 + 3.13 + if (argc == 1) { 3.14 + rpm_fd = STDIN_FILENO; 3.15 +@@ -75,11 +76,19 @@ 3.16 + skip_header(rpm_fd); 3.17 + 3.18 + xread(rpm_fd, &magic, 2); 3.19 ++ unpack = unpack_gz_stream; 3.20 + if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { 3.21 +- bb_error_msg_and_die("invalid gzip magic"); 3.22 ++ if (!ENABLE_FEATURE_SEAMLESS_BZ2 3.23 ++ || magic[0] != 'B' || magic[1] != 'Z' 3.24 ++ ) { 3.25 ++ bb_error_msg_and_die("invalid gzip" 3.26 ++ USE_FEATURE_SEAMLESS_BZ2("/bzip2") 3.27 ++ " magic"); 3.28 ++ } 3.29 ++ unpack = unpack_bz2_stream; 3.30 + } 3.31 + 3.32 +- if (unpack_gz_stream(rpm_fd, STDOUT_FILENO) < 0) { 3.33 ++ if (unpack(rpm_fd, STDOUT_FILENO) < 0) { 3.34 + bb_error_msg("error inflating"); 3.35 + } 3.36 +