Bug 495429 - %_source_payload and %_binary_payload and lzma -- does not work
Summary: %_source_payload and %_binary_payload and lzma -- does not work
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-13 03:54 UTC by Carl Roth
Modified: 2009-04-16 09:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-16 09:54:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample spec file (484 bytes, text/plain)
2009-04-13 03:55 UTC, Carl Roth
no flags Details

Description Carl Roth 2009-04-13 03:54:43 UTC
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.4.2.3 (F9)
rpm-4.6.0 (F10)
rpm-4.7.0 (F11 beta)

How reproducible:

Always

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
  
Actual results:

* 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:

  Requires: rpmlib(PayloadIsLzma)

or

  Requires: rpmlib(PayloadIsXz)

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.

Expected results:


Additional info:

Here are some benchmark results:

  /usr/dict/words: 4.8M
  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 |

| 4.4.2.3    | gzip -9            | 1.5M |
| 4.4.2.3    | bzip2 -9           | 1.7M |
| 4.4.2.3    | 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

Comment 1 Carl Roth 2009-04-13 03:55:48 UTC
Created attachment 339275 [details]
sample spec file

Comment 2 Panu Matilainen 2009-04-13 10:47:20 UTC
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.

Comment 3 Panu Matilainen 2009-04-13 11:28:38 UTC
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
[pmatilai@turre rpm]$

Comment 4 Panu Matilainen 2009-04-16 09:54:55 UTC
Fixed by rpm-4.7.0 in rawhide now.


Note You need to log in before you can comment on or make changes to this bug.