Bug 10166 - busybox-1.27.1 lzma does not work with rpm2cpio
Summary: busybox-1.27.1 lzma does not work with rpm2cpio
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.27.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-05 13:08 UTC by john.frankish
Modified: 2017-08-10 08:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
lzma config (6.91 KB, application/gzip)
2017-08-05 13:08 UTC, john.frankish
Details

Note You need to log in before you can comment on or make changes to this bug.
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.