<?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>12410</bug_id>
          
          <creation_ts>2017-12-07 21:47:14 +0000</creation_ts>
          <short_desc>cannot use pigz, pigz is not a drop in replacement for gzip</short_desc>
          <delta_ts>2018-02-20 20:14:20 +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>core</component>
          <version>2.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78603</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-12-07 21:47:14 +0000</bug_when>
    <thetext>The recipe for pigz builds pigz. Then it boldly installs the pigz binary under the name gzip (class-target installs fine, with update-alternatives). This is done based on the pigz claim that it is a drop-in replacement for gzip. There are several problems with this:

A.
pigz is NOT a drop in replacement for gzip:

In particular:

gzip -n 
pigz -n

behave differently. You need to specify

pigz -n -T 

to have the same affect as:

gzip -n

However, calling gzip with -T results in an error.

So what do you do when you don&apos;t want any timestamsp in your compressed image?

&quot;gzip -n&quot; does not work (because gzip is actually pigz)
&quot;gzip -n -T&quot; would/could work, but this is wrong on many levels.

B. 
Great confusion:
If a recipe/class uses gzip, not clear which program is actually used:
1. Host gzip?
2. gzip-native?
3. pigz?

We need to know this in order to use correct command line arguments.


C.
An obvious fix would be to call &quot;pigz&quot; if we want &quot;pigz&quot; or &quot;gzip&quot; if we want &quot;gzip&quot;. This does not work as there is no &quot;pigz&quot; binary. At the very least there should be pigz binary (maybe with a symlink as gzip..)


So pretending pigz is the same as gzip is not just confusing but also (in some cases) wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78721</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-12-18 16:11:20 +0000</bug_when>
    <thetext>I tested Fedora26:
$ which gzip
/usr/bin/gzip
$ /usr/bin/gzip --version
gzip 1.8

$ which pigz
/usr/bin/pigz
$ /usr/bin/pigz --version
pigz 2.3.4

So on Fedora26 gzip/pigz are installed as two separate programs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79362</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-02-06 12:00:45 +0000</bug_when>
    <thetext>Patch on the list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79516</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-02-20 20:14:20 +0000</bug_when>
    <thetext>Fixed in oe-core 1624b7bfea7ac31c344a6cfcc7865a038e943814.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>