From: Paul Barker <paul@pbarker.dev>
To: quentin.schulz@cherry.de, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] sanity: Require tar 1.35 or later on rhel9-alike distros
Date: Fri, 03 Apr 2026 13:30:32 +0100 [thread overview]
Message-ID: <9c10e55cf57909e1cdbbf9d1a1dae2e01ebf808c.camel@pbarker.dev> (raw)
In-Reply-To: <aebb87e9-8bb8-4e89-ad2c-6dc447cd8ece@cherry.de>
[-- Attachment #1: Type: text/plain, Size: 3557 bytes --]
On Fri, 2026-04-03 at 14:06 +0200, Quentin Schulz via
lists.openembedded.org wrote:
> 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.
Hi Quentin, thanks for the feedback!
The issue exists in upstream tar, I'm unsure when it was introduced. It
was fixed for 1.35 [1].
We have only seen issues on the autobuilder with rhel9 related distros.
This is tracked by RedHat [2], but a fix is not expected as they don't
want to risk breaking any existing workarounds.
In our bugzilla, this is the remaining error in #16143 [3] after the
pseudo fixes, see comments 23 onwards.
[1]: https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=0b74885e81b90d6ab4890b195dce99ca9109fe59
[2]: https://redhat.atlassian.net/browse/RHEL-158896
[3]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16143
Best regards,
--
Paul Barker
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2026-04-03 12:30 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 ` [OE-core] " Quentin Schulz
2026-04-03 12:30 ` Paul Barker [this message]
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=9c10e55cf57909e1cdbbf9d1a1dae2e01ebf808c.camel@pbarker.dev \
--to=paul@pbarker.dev \
--cc=openembedded-core@lists.openembedded.org \
--cc=quentin.schulz@cherry.de \
/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