<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9246</bug_id>
          
          <creation_ts>2016-03-14 07:03:26 +0000</creation_ts>
          <short_desc>rpm: enable xz/lzma compression</short_desc>
          <delta_ts>2016-03-22 01:46:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.0.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rebecca Chang">rebecca.swee.fun.chang</reporter>
          <assigned_to name="Rebecca Chang">rebecca.swee.fun.chang</assigned_to>
          <cc>anuj.mittal</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>mei.yeen.ng</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>rebecca.swee.fun.chang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59920</commentid>
    <comment_count>0</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2016-03-14 07:03:26 +0000</bug_when>
    <thetext>We need rpm to support xz and lzma compression to unpack rpm files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59921</commentid>
    <comment_count>1</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2016-03-14 07:18:07 +0000</bug_when>
    <thetext>Submitted patch to OE-Core for review.
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/118992.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60090</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2016-03-17 15:35:36 +0000</bug_when>
    <thetext>Can you explain how you are creating the externally produced rpms and what your expected workflow is?

Just  to be sure, can you confirm that these files are in fact rpm5 format?

Mark Hatle please follow-up here with advice or pointers to workflow docs since producing rpm5 files externally may need special attention or SDK support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60092</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2016-03-17 15:48:10 +0000</bug_when>
    <thetext>This is already implemented, this is not a bug.

If it does not work, add a failure condition to this defect and assign it to me.

Use the PACKAGECONFIG options in your project&apos;s distribution or local.conf file to enable the optional arguments for RPM.  Items you may be interested in:

Default is:  PACKAGECONFIG ??= &quot;db bzip2 zlib popt openssl libelf python&quot;

You might be interested in the following.

PACKAGECONFIG[xz] = &quot;--with-xz,--without-xz,xz,&quot;
PACKAGECONFIG[xar] = &quot;--with-xar,--without-xar,xar,&quot;


Note enabling xz enables both xz and lzma options, as they are really the same thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60097</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-17 15:59:33 +0000</bug_when>
    <thetext>The patch was to simply enable xz by default.  Personally I&apos;m not convinced that&apos;s a sensible thing to do as it pulls in more libraries for a package format that we don&apos;t use.

(*if* there was a series to switch our packages to use xz then that would be different)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60098</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2016-03-17 16:01:17 +0000</bug_when>
    <thetext>In order to use/install (source) RPM packages produced in the xz format, you can use rpm2cpio.  Then when you build the package from source, it will use whatever format RPM is configured for.

With that said, I did comment on the patch on the oe list, but I&apos;m going to repeat part of it below:

&gt; If you can profile what adding the xz option does to a filesystem, I may change
&gt; my mind.  The profiling needs to include the size change to RPM program itself,
&gt; the produced filesystem (as it now has additional dependencies), and the package
&gt; feeds size.
&gt;
&gt; My guess, is:  RPM binary will increase in size marginally..  including XZ and
&gt; associated items could be potentially &apos;large&apos;.. and the size of the package
&gt; feeds will be reduced, but I don&apos;t have a good feeling as to how much.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60099</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2016-03-17 16:03:20 +0000</bug_when>
    <thetext>Ross, in order to switch to using XZ by default, the &apos;macros&apos; file for the rpmbuild process will need to be updated as well:

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

Ignore the stable or not comments above, I don&apos;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&apos;d forgotten about that originally.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60257</commentid>
    <comment_count>7</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2016-03-22 01:46:16 +0000</bug_when>
    <thetext>After reviewing the feedback, I will not pursue for upstream the changes to OE-Core. I will implement the changes on my own layer. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>