[OE-core] [master][PATCH] rpm: enable xz/lzma compression

Mark Hatle mark.hatle at windriver.com
Thu Mar 17 16:04:00 UTC 2016


On 3/17/16 8:56 AM, Mark Hatle wrote:
> On 3/14/16 1:18 AM, Chang, Rebecca Swee Fun wrote:
>> We are having issues on decompressing tarball with xz format and rpm installation on target.
>> We have this solution implemented to resolve it internally and would like to enable it in OE-core in order we wouldn't revisit this issue in future.
>> Do I need to resend the patch with revised commit message?
> 
> When the packages are produced by the build environment then no issues should be
> occurring.
> 
> The only time you should be having problems is if you are trying to install
> packages (source or binary) produced from outside the build environment.  In the
> source case, you can use the workaround of rpm2cpio <whatever> | cpio -id to
> extract it.  Then when you build it fresh it will use the standard format.
> (Yes, bz2/zlib is less efficient -- but is also more standard.)
> 
> If you require the xz/lzma compression, you should be doing this in your own
> project's configuration.  I don't think it makes sense to add xz to all RPM
> based filesystems.
> 
> (If you can profile what adding the xz option does to a filesystem, I may change
> my mind.  The profiling needs to include the size change to RPM program itself,
> the produced filesystem (as it now has additional dependencies), and the package
> feeds size.
> 
> My guess, is:  RPM binary will increase in size marginally..  including XZ and
> associated items could be potentially 'large'.. and the size of the package
> feeds will be reduced, but I don't have a good feeling as to how much.

Sorry, I forgot, the feed won't change without a change to the macros file.

In order to switch to using XZ by default, the 'macros' file for the rpmbuild
process will need to be updated as well:

#       Compression type and level for source/binary package payloads.
#               "w9.gzdio"      gzip level 9 (default).
#               "w9.bzdio"      bzip2 level 9.
#               "w6.lzdio"      lzma level 6 (legacy, stable).
#               "w6.xzdio"      xz level 6 (obsoletes lzma, unstable).
#
#%_source_payload       w9.gzdio
#%_binary_payload       w9.gzdio

Ignore the stable or not comments above, I don't believe they are relevant
anymore.  But the key is you want to swap out gzdio with xzdio or lzdio.  (It
should remain as w9.)

This goes to my previous comment about profiling -- if we consider a switch
here, changing that is the only way the produced package feed will shrink in
size.. (I'd forgotten about that originally.)

> --Mark
> 
>> Regards,
>> Rebecca
>>
>> -----Original Message-----
>> From: Richard Purdie [mailto:richard.purdie at linuxfoundation.org] 
>> Sent: Monday, March 14, 2016 4:14 PM
>> To: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>; openembedded-core at lists.openembedded.org
>> Subject: Re: [OE-core] [master][PATCH] rpm: enable xz/lzma compression
>>
>> On Mon, 2016-03-14 at 15:15 +0800, Rebecca Chang wrote:
>>> From: Anuj Mittal <anujx.mittal at intel.com>
>>>
>>> Enable lzma compression support in rpm.
>>
>> Your commit message says what the patch does but not why? Presumably this change increases the size of the rpm install so what is the benefit?
>>
>> Cheers,
>>
>> Richard
>>
> 




More information about the Openembedded-core mailing list