public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: paul@pbarker.dev, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] sanity: Require tar 1.35 or later on rhel9-alike distros
Date: Fri, 3 Apr 2026 14:06:11 +0200	[thread overview]
Message-ID: <aebb87e9-8bb8-4e89-ad2c-6dc447cd8ece@cherry.de> (raw)
In-Reply-To: <20260403-rhel9-tar-v1-1-b9c7fb64bbd9@pbarker.dev>

Hi Paul,

On 4/3/26 1:54 PM, Paul Barker via lists.openembedded.org wrote:
> 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.
> 
> That error message is likely to confuse users, and the fix is not
> obvious. So, error out if tar 1.34 or earlier is present on affected
> distros and recommend upgrading or using the buildtools tarball.
> 
> Signed-off-by: Paul Barker <paul@pbarker.dev>
> ---
>   meta/classes-global/sanity.bbclass | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
> index b5d905399b73..2e486966a93b 100644
> --- a/meta/classes-global/sanity.bbclass
> +++ b/meta/classes-global/sanity.bbclass
> @@ -551,6 +551,21 @@ def check_tar_version(sanity_data):
>       except subprocess.CalledProcessError as e:
>           return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output)
>   
> +    try:
> +        distro = oe.lsb.distro_identifier()
> +    except Exception:
> +        distro = None
> +
> +    if distro:
> +        rhel9_alike_prefixes = ("rhel-9", "centos-9", "rocky-9", "almalinux-9")
> +        rhel9_tar_minimum_version = "1.35"
> +        for prefix in rhel9_alike_prefixes:

The commit log doesn't explain why that is specific to centos 9 and 
derivatives.

Did CentOS break tar only for themselves, or is it the only distro with 
that specific broken tar version or is it the only distro with that old 
of a version of tar?

I'm asking because I am not sure we need to filter on the distro AND we 
also probably should update the min version of tar listed in 
documentation/poky.yaml.in in yocto-docs.

Cheers,
Quentin


  reply	other threads:[~2026-04-03 12:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 11:54 [PATCH] sanity: Require tar 1.35 or later on rhel9-alike distros Paul Barker
2026-04-03 12:06 ` Quentin Schulz [this message]
2026-04-03 12:30   ` [OE-core] " Paul Barker
2026-04-03 12:56     ` Quentin Schulz
2026-04-03 13:06       ` Paul Barker
2026-04-03 13:27         ` Quentin Schulz
2026-04-03 16:47 ` Mathieu Dubois-Briand
2026-04-03 17:07   ` Yoann Congal
2026-04-04  5:55     ` Mathieu Dubois-Briand
2026-04-05 14:15       ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aebb87e9-8bb8-4e89-ad2c-6dc447cd8ece@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul@pbarker.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox