Skip to contentSkip to conversation

config.json: Use buildtools on RHEL9 derivatives

PATCH New Paul Barker 1 participant 1 message Mar 31

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config.json: Use buildtools on RHEL9 derivatives

tar 1.34 (and possibly earlier versions) is unable to extract tarballs containing read-only files with xattrs. This was fixed upstream, but it's unlikely at this point that the fix will be backported to RHEL9 related distros (CentOS Stream 9, AlmaLinux 9, Rocky Linux 9). The issue affects these distros specifically because they have selinux enabled by default and this uses xattrs.

The specific failure we've seen is with the /usr/lib/udev/hwdb.bin file installed by the systemd recipe - this file is chmod 0444. This leads to the following error, typically during do_image_wic (shortened and split to make it readable):

    subprocess.CalledProcessError: Command
    'tar --xattrs --xattrs-include='*' -cf - -S -C .../tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/rootfs -p . |
    tar --xattrs --xattrs-include='*' -xf - -C .../tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/tmp-wic/rootfs2'
    returned non-zero exit status 2.

To work around this, we will need to use the buildtools tarball on affected systems.

Fixes [YOCTO #16143].

---
 config.json | 3 +++
 1 file changed, 3 insertions(+)
config.json +3 -0
index 0902e8620b0d..f0ea2e75e124 100644
@@ -2006,6 +2006,9 @@
         "alma8*"       : "${BUILDTOOLS_URL}",
         "rocky8*"      : "${BUILDTOOLS_URL}",
         "stream8*"     : "${BUILDTOOLS_URL}",
+        "alma9*"       : "${BUILDTOOLS_URL}",
+        "rocky9*"      : "${BUILDTOOLS_URL}",
+        "stream9*"     : "${BUILDTOOLS_URL}",
         "opensuse154*" : "${BUILDTOOLS_URL}",
         "opensuse155*" : "${BUILDTOOLS_URL}",
         "opensuse156*" : "${BUILDTOOLS_URL}",

---
base-commit: 85905638be7b50e594d210e2aa64a6809df43c1b
change-id: 20260331-rhel9-de17845fa440

Best regards,

Signature · 1 line
Paul Barker