Description of problem:
Release notes for recent versions of RPM indicate that lzma/xz can be used for RPM payloads. This doesn't seem to work properly for F10 (rpm 4.6.x) or F11 (rpm 4.7.x).
Version-Release number of selected component (if applicable):
rpm-4.7.0 (F11 beta)
Steps to Reproduce:
1. benchmark gzip/bzip/lzma using /usr/dict/words
2. build SRPM using attached SPEC -- uncomment the proper %define to select payload compression
3. line up predicted and actual compressed RPM sizes
* F9 rpm silently ignores unrecognized %_source_payload keywords it does not understand. The fallback behavior is to store payloads uncompressed.
* F10 rpm claims to support lzma/xz payload compression. This does not appear to work. Specifying lzma results in an uncompressed payload.
* F11 rpm claims to support lzma/xz payload compression. Similar to F10, it ignores the newer settings and stores an uncompressed payload.
* For F10 and F11, the RPM metadata indicates an lzma compressed payload as:
but of course this is wrong -- the payloads are uncompressed.
* F11 has the additional interesting behavior that 'rpmlib(PayloadIsLzma)' is flagged is *not* provided by local the RPM installation. Packages built with %_binary_payload set to LZMA cannot be installed on the same system due to a missing dependency.
Here are some benchmark results:
gzip -9 /usr/dict/words: 1.5M
bzip2 -9 /usr/dict/words: 1.7M
lzma -9 /usr/dict/words: 1.2M
The sample spec file uses this as a source file, so the final SRPM size should line up with the actual payload compression.
| rpm ersion | compression option | size |
| 188.8.131.52 | gzip -9 | 1.5M |
| 184.108.40.206 | bzip2 -9 | 1.7M |
| 220.127.116.11 | lzma -9 | 4.8M | * should have been an error
| 4.6.0 | gzip -9 | 1.5M |
| 4.6.0 | bzip2 -9 | 1.7M |
| 4.6.0 | lzma -9 | 4.8M |
| 4.7.0 | gzip -9 | 1.5M |
| 4.7.0 | bzip2 -9 | 1.7M |
| 4.7.0 | xz -9 | 4.8M |
| 4.7.0 | lzma -9 | 4.8M | * cannot install
Created attachment 339275 [details]
sample spec file
Fedora doesn't have new enough XZ/LZMAlibrary to support rpms needs, so rpm is not built with XZ/LZMA support. From that POV this is NOTABUG - it's not supposed to work. That rpm doesn't complain at build-time about using an unsupported payload compression can be considered a bug though.
Just a couple of missing #if/#endifs... fixed upstream, this is the expected behavior when not built with XZ/LZMA support:
[pmatilai@turre rpm]$ ./rpmbuild -bs ~/rpmbuild/SPECS/foo.spec
error: Unknown payload compression: w9.lzdio
Fixed by rpm-4.7.0 in rawhide now.