From: Sumanth Gavini <sumanth.gavini@windriver.com>
To: openembedded-core@lists.openembedded.org
Cc: alex.kanavin@gmail.com, mathieu.dubois-briand@bootlin.com,
mattware@cisco.com, esparlin@cisco.com, peter.marko@siemens.com,
randy.macleod@windriver.com
Subject: [PATCH v15 10/12] libarchive: Disable RPM filter auto-bidding and update huge_rpm test
Date: Sun, 16 Aug 2026 16:11:02 -0700 [thread overview]
Message-ID: <20260816231104.3871015-11-sumanth.gavini@windriver.com> (raw)
In-Reply-To: <20260816231104.3871015-1-sumanth.gavini@windriver.com>
* Add 0005-Disable-RPM-filter-auto-bidding.patch:
- RPM is now handled by the format reader. Disable the filter's automatic
bidding (return 0) so it never intercepts RPM files during normal
archive opening. The filter remains functional when explicitly requested
via archive_read_append_filter(ARCHIVE_FILTER_RPM).
This ensures debuginfod and other tools that use
archive_read_support_format_all() will use the new RPM format reader
for RPM 6 packages, while maintaining API compatibility.
* Update 0004-Convert-RPM-reader-into-a-proper-format.patch:
- Include the test_read_format_huge_rpm.c changes from upstream PR #2846.
With the filter no longer auto-bidding, the format reader handles the
truncated test RPM: opens successfully (ARCHIVE_OK), returns ARCHIVE_EOF
on next_header, and identifies the format as ARCHIVE_FORMAT_RPM.
Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
.../meta/nativesdk-sdk-provides-dummy.bb | 1 -
.../recipes-devtools/pkgconf/pkgconf_3.0.5.bb | 2 +-
...vert-RPM-reader-into-a-proper-format.patch | 42 ++++++++++-
...0005-Disable-RPM-filter-auto-bidding.patch | 73 +++++++++++++++++++
.../libarchive/libarchive_3.8.9.bb | 1 +
5 files changed, 116 insertions(+), 3 deletions(-)
create mode 100644 meta/recipes-extended/libarchive/libarchive/0005-Disable-RPM-filter-auto-bidding.patch
diff --git a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
index 6075770bf0..37dad54409 100644
--- a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -11,7 +11,6 @@ DUMMYPROVIDES = "\
/bin/sh \
/bin/bash \
/usr/bin/env \
- /usr/bin/pkg-config \
libGL.so()(64bit) \
libGL.so \
"
diff --git a/meta/recipes-devtools/pkgconf/pkgconf_3.0.5.bb b/meta/recipes-devtools/pkgconf/pkgconf_3.0.5.bb
index 79ac3208d3..3343857867 100644
--- a/meta/recipes-devtools/pkgconf/pkgconf_3.0.5.bb
+++ b/meta/recipes-devtools/pkgconf/pkgconf_3.0.5.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "http://pkgconf.org"
BUGTRACKER = "https://github.com/pkgconf/pkgconf/issues"
SECTION = "devel"
PROVIDES += "pkgconfig"
-RPROVIDES:${PN} += "pkgconfig"
+RPROVIDES:${PN} += "pkgconfig /usr/bin/pkg-config"
# The pkgconf license seems to be functionally equivalent to BSD-2-Clause or
# ISC, but has different wording, so needs its own name.
diff --git a/meta/recipes-extended/libarchive/libarchive/0004-Convert-RPM-reader-into-a-proper-format.patch b/meta/recipes-extended/libarchive/libarchive/0004-Convert-RPM-reader-into-a-proper-format.patch
index 29d12bb539..03a207f33f 100644
--- a/meta/recipes-extended/libarchive/libarchive/0004-Convert-RPM-reader-into-a-proper-format.patch
+++ b/meta/recipes-extended/libarchive/libarchive/0004-Convert-RPM-reader-into-a-proper-format.patch
@@ -11,6 +11,14 @@ Without this patch, debuginfod cannot scan RPM 6 packages:
libarchive error: cannot open archive from pipe: Unrecognized
archive format
+The test_read_format_huge_rpm test is updated from upstream PR #2846
+to match the format reader behavior: the format reader opens the
+truncated RPM successfully (ARCHIVE_OK), returns ARCHIVE_EOF on
+next_header (no valid entries in the crafted file), and correctly
+identifies the format as ARCHIVE_FORMAT_RPM. This test requires the
+companion 0005 patch (which disables the filter's auto-bidding) so
+that the format reader handles the file instead of the filter.
+
Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/2846]
Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
@@ -29,7 +37,8 @@ Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
libarchive/test/test_archive_read_support.c | 2 +-
.../test_read_format_cpio_svr4_bzip2_rpm.c | 4 +-
.../test_read_format_cpio_svr4_gzip_rpm.c | 4 +-
- 14 files changed, 1162 insertions(+), 15 deletions(-)
+ libarchive/test/test_read_format_huge_rpm.c | 13 +-
+ 15 files changed, 1169 insertions(+), 20 deletions(-)
create mode 100644 libarchive/archive_read_support_format_rpm.c
diff --git a/Makefile.am b/Makefile.am
@@ -1398,3 +1407,34 @@ index 6062c48..11dbbb4 100644
assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+diff --git a/libarchive/test/test_read_format_huge_rpm.c b/libarchive/test/test_read_format_huge_rpm.c
+index 51208c7..10c7fb7 100644
+--- a/libarchive/test/test_read_format_huge_rpm.c
++++ b/libarchive/test/test_read_format_huge_rpm.c
+@@ -26,6 +26,7 @@
+
+ DEFINE_TEST(test_read_format_huge_rpm)
+ {
++ struct archive_entry *ae;
+ struct archive *a;
+ const char *name = "test_read_format_huge_rpm.rpm";
+
+@@ -33,11 +34,13 @@ DEFINE_TEST(test_read_format_huge_rpm)
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ extract_reference_file(name);
+- /* This archive is truncated -- if it has data, the bid has screwed up */
+- assertEqualIntA(a, ARCHIVE_FATAL, archive_read_open_filename(a, name, 2));
+- assertEqualStringA(a, "Truncated input file "
+- "(needed 34359738384 bytes, only 10256 available)",
+- archive_error_string(a));
++ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
++
++ /* This archive should have no entries -- if it has entries, the bid has screwed up */
++ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
++
++ /* Verify that the format detection worked. */
++ assertEqualInt(ARCHIVE_FORMAT_RPM, archive_format(a));
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
diff --git a/meta/recipes-extended/libarchive/libarchive/0005-Disable-RPM-filter-auto-bidding.patch b/meta/recipes-extended/libarchive/libarchive/0005-Disable-RPM-filter-auto-bidding.patch
new file mode 100644
index 0000000000..26a0159908
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0005-Disable-RPM-filter-auto-bidding.patch
@@ -0,0 +1,73 @@
+From 882166d7fa113f0c2108864b8a579d01816e1fce Mon Sep 17 00:00:00 2001
+From: Sumanth Gavini <sumanth.gavini@windriver.com>
+Date: Tue, 11 Aug 2026 12:02:31 -0700
+Subject: [PATCH] libarchive: Disable RPM filter auto-bidding
+
+RPM is now handled by the format reader (archive_read_support_format_rpm).
+Disable the filter's automatic bidding so it never intercepts RPM files
+during normal archive opening. The filter remains functional when
+explicitly requested via archive_read_append_filter(ARCHIVE_FILTER_RPM).
+
+This ensures debuginfod and other tools that use archive_read_support_format_all()
+will use the new RPM format reader for RPM 6 packages, while maintaining
+API compatibility for code that explicitly appends the RPM filter.
+
+Upstream-Status: Inappropriate [OE specific - keep filter for API compat while format reader handles RPM 6]
+
+Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
+---
+ libarchive/archive_read_support_filter_rpm.c | 37 ++++----------------
+ 1 file changed, 6 insertions(+), 31 deletions(-)
+
+diff --git a/libarchive/archive_read_support_filter_rpm.c b/libarchive/archive_read_support_filter_rpm.c
+index 01bd1bf..8e90da3 100644
+--- a/libarchive/archive_read_support_filter_rpm.c
++++ b/libarchive/archive_read_support_filter_rpm.c
+@@ -79,39 +79,14 @@ static int
+ rpm_bidder_bid(struct archive_read_filter_bidder *b,
+ struct archive_read_filter *f)
+ {
+- const unsigned char *p;
+- int bits_checked;
+-
+ (void)b; /* UNUSED */
++ (void)f; /* UNUSED */
+
+- p = __archive_read_filter_ahead(f, 8, NULL);
+- if (p == NULL)
+- return (0);
+-
+- bits_checked = 0;
+- /*
+- * Verify Header Magic Bytes : 0XED 0XAB 0XEE 0XDB
+- */
+- if (memcmp(p, "\xED\xAB\xEE\xDB", 4) != 0)
+- return (0);
+- bits_checked += 32;
+- /*
+- * Check major version.
+- */
+- if (p[4] != 3 && p[4] != 4)
+- return (0);
+- bits_checked += 8;
+- /*
+- * Check package type; binary or source.
+- */
+- if (p[6] != 0)
+- return (0);
+- bits_checked += 8;
+- if (p[7] != 0 && p[7] != 1)
+- return (0);
+- bits_checked += 8;
+-
+- return (bits_checked);
++ /* RPM is now handled by the format reader
++ * (archive_read_support_format_rpm). Return 0 so the filter never
++ * wins automatic bidding. The filter still works when explicitly
++ * appended via archive_read_append_filter(ARCHIVE_FILTER_RPM). */
++ return (0);
+ }
+
+ static const struct archive_read_filter_vtable
+--
+2.49.0
diff --git a/meta/recipes-extended/libarchive/libarchive_3.8.9.bb b/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
index 3b3824e778..2eefa28532 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.8.9.bb
@@ -36,6 +36,7 @@ SRC_URI = "https://libarchive.org/downloads/libarchive-${PV}.tar.gz \
file://0001-append_filter-Verify-that-bidder-and-filter-match.patch \
file://0003-Remove-bidder-name.patch \
file://0004-Convert-RPM-reader-into-a-proper-format.patch \
+ file://0005-Disable-RPM-filter-auto-bidding.patch \
"
UPSTREAM_CHECK_URI = "https://www.libarchive.org/"
next prev parent reply other threads:[~2026-08-16 23:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 23:10 [PATCH v15 00/12] rpm: 4.20.1 -> 6.0.2 Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 01/12] package_rpm.bbclass: Drop external dependency generator to support rpm 6 Sumanth Gavini
2026-08-17 8:55 ` Mathieu Dubois-Briand
2026-08-17 13:34 ` Gavini, Sumanth
2026-08-17 14:48 ` Mathieu Dubois-Briand
2026-08-17 20:15 ` Alexander Kanavin
2026-08-19 7:10 ` Mathieu Dubois-Briand
2026-08-22 9:05 ` [OE-core] " Richard Purdie
2026-08-16 23:10 ` [PATCH v15 02/12] package_rpm.bbclass: Define _lib and _libdir for rpmbuild Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 03/12] lib/oe/package.py: Don't add ldconfig_postinst_fragment for glibc or musl Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 04/12] lib/oe/package.py: Don't redirect stderr Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 05/12] target-sdk-provides-dummy: Add pkg-config to DUMMYPROVIDES Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 06/12] rpm: 4.20.1 -> 6.0.2 Sumanth Gavini
2026-08-16 23:10 ` [PATCH v15 07/12] libarchive: Make it work with rpm 6.0.2 Sumanth Gavini
2026-08-16 23:11 ` [PATCH v15 08/12] rpm: Fix pkgconfig() Provides missing in cross-built RPMs Sumanth Gavini
2026-08-16 23:11 ` [PATCH v15 09/12] libarchive: Add RPM format reader to support rpm 6 Sumanth Gavini
2026-08-16 23:11 ` Sumanth Gavini [this message]
2026-08-23 8:06 ` [OE-core] [PATCH v15 10/12] libarchive: Disable RPM filter auto-bidding and update huge_rpm test Richard Purdie
2026-08-16 23:11 ` [PATCH v15 11/12] package_rpm.bbclass: Suppress pkgconfig() Requires for sstate compatibility Sumanth Gavini
2026-08-16 23:11 ` [PATCH v15 12/12] lib/oe/package_manager/rpm: Enable DNF filelists to resolve file deps Sumanth Gavini
2026-08-17 22:20 ` [OE-core] [PATCH v15 00/12] rpm: 4.20.1 -> 6.0.2 Richard Purdie
2026-08-18 1:13 ` Ryan Eatmon
2026-08-18 16:09 ` Gavini, Sumanth
2026-08-18 21:05 ` Richard Purdie
2026-08-21 23:49 ` Gavini, Sumanth
2026-08-24 18:01 ` 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=20260816231104.3871015-11-sumanth.gavini@windriver.com \
--to=sumanth.gavini@windriver.com \
--cc=alex.kanavin@gmail.com \
--cc=esparlin@cisco.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=mattware@cisco.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.marko@siemens.com \
--cc=randy.macleod@windriver.com \
/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