<?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>14205</bug_id>
          
          <creation_ts>2021-01-27 17:55:25 +0000</creation_ts>
          <short_desc>[Poky] Poky&apos;s sanity.bbclass and path.py assume tar is gtar</short_desc>
          <delta_ts>2024-06-05 19:21:50 +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>Other YP Layers</product>
          <component>layers</component>
          <version>unspecified</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>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bernhard Rosenkränzer">bero</reporter>
          <assigned_to name="Simone Weiß">simone.p.weiss</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>simone.p.weiss</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>89043</commentid>
    <comment_count>0</comment_count>
    <who name="Bernhard Rosenkränzer">bero</who>
    <bug_when>2021-01-27 17:55:25 +0000</bug_when>
    <thetext>Poky makes various assumptions about &quot;tar&quot; being GNU tar.

There is no way to override the location of tar (e.g. TAR=gtar) for distros that use a different default &quot;tar&quot;.


I&apos;ve had successful builds with libarchive tar by skipping the check in sanity.bbclass, replacing
cmd = &quot;tar --xattrs --xattrs-include=&apos;*&apos; -cf - -S -C %s -p . | tar --xattrs --xattrs-include=&apos;*&apos; -xf - -C %s&quot; % (src, dst)
in poky/meta/lib/oe/path.py with
cmd = &quot;tar c --xattrs -f - -S -C %s -p . | tar x --xattrs -f - -C %s&quot; % (src, dst)
and replacing (in the same file)
cmd = &quot;cd %s; find . -type d -print | tar --xattrs --xattrs-include=&apos;*&apos; -cf - -S -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include=&apos;*&apos; -xhf - -C %s&quot; % (src, src, dst)
with
cmd = &quot;cd %s; find . -type d -print | tar c --xattrs -f - -S -C %s -p --no-recursion --files-from - | tar x --xattrs -f - -C %s&quot; % (src, src, dst)


Not sure if there&apos;s any unwanted side effects from using libarchive tar -- so not sure if this should be fixed the way I&apos;ve described (with a check for which tar implementation is being used) or simply with a check for different tar implementations instead of hardcoding that &quot;tar&quot; is the one to use.

All distros I&apos;ve checked that use a different implementation as their default tar have GNU tar available in their repositories as well (by another name, typically gtar).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89053</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-01-28 13:47:36 +0000</bug_when>
    <thetext>If you change the &quot;tar&quot; link created in HOSTTOOLS to point at gtar it would probably resolve this. Not sure how to do that cleanly but we could document it and suggest it to people with this issue. Which distros is this an issue on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89062</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-01-28 15:44:08 +0000</bug_when>
    <thetext>We may just document this limitation or add a sanity check and refuse to continue unless tar is gtar.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>