<?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>15606</bug_id>
          
          <creation_ts>2024-10-03 09:21:11 +0000</creation_ts>
          <short_desc>core-image-sato-sdk-xxx-.tar.gz wrong user:group</short_desc>
          <delta_ts>2024-11-11 12:05:11 +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>5.1.4</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>5.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Berger">pokylinux</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tim.orling</cc>
    
    <cc>yoann.congal</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>99752</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-10-03 09:21:11 +0000</bug_when>
    <thetext>poky master

commit id: 312488228ad408fb0f29b2aa272e72cf87de8e93

= core-image-minimal looks good =

5.1.x

sudo tar xvf core-image-minimal-multi-v7-ml.rootfs.tar.bz2 -C /opt/resy/5.1.66/multi-v7-ml/imx6q-phytec-mira-rdk-nand/lumpi-core-image-minimal

ls -lah
total 68K
drwxr-xr-x 17 root root 4.0K Mar  9  2018 .
drwxr-xr-x  6 root root 4.0K Oct  3 09:02 ..
drwxr-xr-x  2 root root 4.0K Mar  9  2018 bin
drwxr-xr-x  2 root root 4.0K Mar  9  2018 boot
drwxr-xr-x  2 root root 4.0K Mar  9  2018 dev
drwxr-xr-x 20 root root 4.0K Mar  9  2018 etc
drwxr-xr-x  3 root root 4.0K Mar  9  2018 home
drwxr-xr-x  7 root root 4.0K Mar  9  2018 lib
drwxr-xr-x  2 root root 4.0K Mar  9  2018 media
drwxr-xr-x  2 root root 4.0K Mar  9  2018 mnt
dr-xr-xr-x  2 root root 4.0K Mar  9  2018 proc
drwxr-xr-x  2 root root 4.0K Mar  9  2018 run
drwxr-xr-x  2 root root 4.0K Mar  9  2018 sbin
dr-xr-xr-x  2 root root 4.0K Mar  9  2018 sys
drwxrwxrwt  2 root root 4.0K Mar  9  2018 tmp
drwxr-xr-x  9 root root 4.0K Mar  9  2018 usr
drwxr-xr-x  8 root root 4.0K Mar  9  2018 var

= core-image-sato-sdk wrong user:group (not booting over nfs) =

drwxr-xr-x 18 student student 4.0K Mar  9  2018 .
drwxr-xr-x  6 root    root    4.0K Oct  3 09:13 ..
drwxr-xr-x  2 student student 4.0K Mar  9  2018 bin
drwxr-xr-x  2 student student 4.0K Mar  9  2018 boot
drwxr-xr-x  2 student student 4.0K Mar  9  2018 dev
drwxr-xr-x 62 student student 4.0K Mar  9  2018 etc
drwxr-xr-x  3 student student 4.0K Mar  9  2018 home
drwxr-xr-x  9 student student 4.0K Mar  9  2018 lib
drwxr-xr-x  2 student student 4.0K Mar  9  2018 media
drwxr-xr-x  2 student student 4.0K Mar  9  2018 mnt
drwxr-xr-x  3 student student 4.0K Mar  9  2018 opt
drwxr-xr-x  2 student student 4.0K Mar  9  2018 proc
drwxr-xr-x  2 student student 4.0K Mar  9  2018 run
drwxr-xr-x  2 student student 4.0K Mar  9  2018 sbin
drwxr-xr-x  2 student student 4.0K Mar  9  2018 sys
drwxr-xr-t  2 student student 4.0K Mar  9  2018 tmp
drwxr-xr-x 11 student student 4.0K Mar  9  2018 usr
drwxr-xr-x  9 student student 4.0K Mar  9  2018 var

It should be something like:

drwxr-xr-x 17 root root 4.0K Oct  2 22:32 .
drwxr-xr-x  5 root root 4.0K Oct  3 09:20 ..
drwxr-xr-x  2 root root 4.0K Mar  9  2018 bin
drwxr-xr-x  2 root root 4.0K Mar  9  2018 boot
drwxr-xr-x  2 root root 4.0K Mar  9  2018 dev
drwxr-xr-x 62 root root 4.0K Oct  2 22:32 etc
drwxr-xr-x  3 root root 4.0K Mar  9  2018 home
drwxr-xr-x  9 root root 4.0K Mar  9  2018 lib
drwxr-xr-x  2 root root 4.0K Mar  9  2018 media
drwxr-xr-x  2 root root 4.0K Mar  9  2018 mnt
drwxr-xr-x  3 root root 4.0K Mar  9  2018 opt
drwxr-xr-x  2 root root 4.0K Mar  9  2018 proc
drwxr-xr-x  2 root root 4.0K Mar  9  2018 run
drwxr-xr-x  2 root root 4.0K Mar  9  2018 sbin
drwxr-xr-x  2 root root 4.0K Mar  9  2018 sys
lrwxrwxrwx  1 root root    8 Oct  2 22:32 tmp -&gt; /var/tmp
drwxr-xr-x 11 root root 4.0K Mar  9  2018 usr
drwxr-xr-x  9 root root 4.0K Oct  2 22:32 var</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99754</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-10-03 13:40:57 +0000</bug_when>
    <thetext>The good news is that the problem does not seem to exist on the styhead branch, but only on master.

This[1] commit from styhead looks good. 

[1] 16ffecc808365f7399fb58d53dcd07ff951eba3c7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99755</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-10-03 13:49:09 +0000</bug_when>
    <thetext>a quick diff against master shows this:

$ git diff master meta/classes-recipe/image_types.bbclass
diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass
index 87d6effc6c..b230add314 100644
--- a/meta/classes-recipe/image_types.bbclass
+++ b/meta/classes-recipe/image_types.bbclass
@@ -145,7 +145,7 @@ IMAGE_CMD:vfat = &quot;oe_mkvfatfs ${EXTRA_IMAGECMD}&quot;
 
 IMAGE_CMD_TAR ?= &quot;tar&quot;
 # ignore return code 1 &quot;file changed as we read it&quot; as other tasks(e.g. do_image_wic) may be hardlinking rootfs
-IMAGE_CMD:tar = &quot;${IMAGE_CMD_TAR} --sort=name --format=posix --pax-option=delete=atime,delete=ctime --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]&quot;
+IMAGE_CMD:tar = &quot;${IMAGE_CMD_TAR} --sort=name --format=posix --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]&quot;
 SPDX_IMAGE_PURPOSE:tar = &quot;archive&quot;
 
 do_image_cpio[cleandirs] += &quot;${WORKDIR}/cpio_append&quot;
@@ -283,7 +283,6 @@ EXTRA_IMAGECMD:f2fs ?= &quot;&quot;
 # otherwise mkfs.vfat will automatically pick one.
 EXTRA_IMAGECMD:vfat ?= &quot;&quot;
 
-do_image_tar[depends] += &quot;tar-replacement-native:do_populate_sysroot&quot;
 do_image_cpio[depends] += &quot;cpio-native:do_populate_sysroot&quot;
 do_image_jffs2[depends] += &quot;mtd-utils-native:do_populate_sysroot&quot;
 do_image_cramfs[depends] += &quot;util-linux-native:do_populate_sysroot&quot;
@@ -392,5 +391,3 @@ IMAGE_TYPES_MASKED ?= &quot;&quot;
 
 # bmap requires python3 to be in the PATH
 EXTRANATIVEPATH += &quot;${@&apos;python3-native&apos; if d.getVar(&apos;IMAGE_FSTYPES&apos;).find(&apos;.bmap&apos;) else &apos;&apos;}&quot;
-# reproducible tar requires our tar, not the host&apos;s
-EXTRANATIVEPATH += &quot;${@&apos;tar-native&apos; if &apos;tar&apos; in d.getVar(&apos;IMAGE_FSTYPES&apos;) else &apos;&apos;}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99757</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2024-10-03 14:43:22 +0000</bug_when>
    <thetext>That change isn&apos;t quite the right thing, but Ross will take a look. Thank you Ross.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99764</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-03 15:16:08 +0000</bug_when>
    <thetext>With current master I can&apos;t replicate.  I build core-image-sato-sdk and then looked at a listing of the rootfs tarball:

$ tar atvf tmp/deploy/images/qemuarm64/core-image-sato-sdk-qemuarm64.rootfs.tar.bz2 | head
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./
lrwxrwxrwx 0/0               0 2018-03-09 12:34 ./bin -&gt; usr/bin
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./boot/
lrwxrwxrwx 0/0               0 2018-03-09 12:34 ./boot/Image -&gt; Image-6.10.11-yocto-standard
-rw-r--r-- 0/0        22409728 2018-03-09 12:34 ./boot/Image-6.10.11-yocto-standard
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./dev/
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./etc/

The files have root:root ownership.

This smells like user error, in that the tarball was not unpacked as root.  Can you verify that your rootfs tarballs have incorrect permissions when you list the contents, instead of unpacking them?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99766</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-10-03 19:05:33 +0000</bug_when>
    <thetext>Mine don&apos;t.

I build, as ususal, in a docker container and it&apos;s the same process - actually scripted, I use to unpack it. Switching to styhead fixed it.

$ tar atvf core-image-sato-sdk-multi-v7-ml.rootfs.tar.bz2 | head
drwxr-xr-x 1000/1000         0 2018-03-09 12:34 ./
drwxr-xr-x 1000/1000         0 2018-03-09 12:34 ./bin/
lrwxrwxrwx 1000/1000         0 2018-03-09 12:34 ./bin/ash -&gt; /bin/busybox.nosuid
lrwxrwxrwx 1000/1000         0 2018-03-09 12:34 ./bin/base64 -&gt; /usr/bin/base64.coreutils
lrwxrwxrwx 1000/1000         0 2018-03-09 12:34 ./bin/bash -&gt; /bin/bash.bash
-rwxr-xr-x 1000/1000    846372 2018-03-09 12:34 ./bin/bash.bash
lrwxrwxrwx 1000/1000         0 2018-03-09 12:34 ./bin/busybox -&gt; busybox.nosuid
-rwxr-xr-x 1000/1000    476920 2018-03-09 12:34 ./bin/busybox.nosuid
-rwsr-xr-x 1000/1000     42440 2018-03-09 12:34 ./bin/busybox.suid
lrwxrwxrwx 1000/1000         0 2018-03-09 12:34 ./bin/cat -&gt; /bin/cat.coreutils</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99830</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 15:20:06 +0000</bug_when>
    <thetext>Huh.

What image are you running inside the docker? (and specifically, what version of tar does it have?)

Can you replicate with a pristine poky in a fresh build directory with no configuration and just bitbake core-image-sato-sdk?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99845</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-10-11 17:57:54 +0000</bug_when>
    <thetext>in the container I have:

Ubuntu 22.04.4 LTS

tar --version
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99918</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-17 15:12:18 +0000</bug_when>
    <thetext>Very odd.

Can you confirm that you can replicate with a *pristine* poky with no layers/configuration?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99964</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-22 19:16:54 +0000</bug_when>
    <thetext>Inside a podman container (specifically, the kas container which is Debian based) I also can&apos;t replicate:

$ tar atvf core-image-sato-qemuarm64.rootfs-20241022163312.tar.bz2|head
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./
drwxr-xr-x 0/0               0 2018-03-09 12:34 ./bin/
lrwxrwxrwx 0/0               0 2018-03-09 12:34 ./bin/ash -&gt; /bin/busybox.nosuid</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100136</commentid>
    <comment_count>10</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-11-10 18:31:53 +0000</bug_when>
    <thetext>with master 626031da74b31d0a8c5ca9d5a1acac9a2d55e998 it seems to be OK again. Something healed for me ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100140</commentid>
    <comment_count>11</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-11-11 12:05:11 +0000</bug_when>
    <thetext>Closing then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>