Bug 10166

Summary: busybox-1.27.1 lzma does not work with rpm2cpio
Product: Busybox Reporter: john.frankish
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.27.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: lzma config

Description john.frankish 2017-08-05 13:08:12 UTC
Created attachment 7161 [details]
lzma config

Using busybox-1.27.1, lzma compression does not work with rpm2cpio.

Is it because busybox rpm2cpio doesn't pass the filename onwards and has to guess from the magic bytes, and lzma has no magic bytes?
Comment 1 Denys Vlasenko 2017-08-06 17:34:55 UTC
Can you attach a rpm file which can't be processed?
Comment 2 john.frankish 2017-08-08 08:24:46 UTC
This is too big to attach, but hopefully you can access it:

http://packages.microsoft.com/sles/12/prod/msodbcsql-13.1.9.0-1.x86_64.rpm

$ rpm2cpio msodbcsql-13.1.9.0-1.x86_64.rpm
rpm2cpio: no gzip/bzip2/xz magic

Whereas the full fat rpm2cpio works as would be expected
Comment 3 Denys Vlasenko 2017-08-09 16:21:18 UTC
rpm2cpio is vey simplistic. It needs this:

//TODO: look for rpm tag RPMTAG_PAYLOADCOMPRESSOR (dec 1125, hex 0x465),
// if the value is "lzma", set up decompressor without detection
// (lzma can't be detected).
Comment 4 Denys Vlasenko 2017-08-09 16:21:42 UTC
oops, wrong bz...
Comment 5 Denys Vlasenko 2017-08-10 08:37:14 UTC
Fixed in git.