Openembedded Core Discussions
 help / color / mirror / Atom feed
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 11/12] package_rpm.bbclass: Suppress pkgconfig() Requires for sstate compatibility
Date: Sun, 16 Aug 2026 16:11:03 -0700	[thread overview]
Message-ID: <20260816231104.3871015-12-sumanth.gavini@windriver.com> (raw)
In-Reply-To: <20260816231104.3871015-1-sumanth.gavini@windriver.com>

rpm 4 had two dependency generation systems: an external generator
(System 1) and an internal fileattr-based generator (System 2).
OE used System 1 and disabled everything via:

  --define '_use_internal_dependency_generator 0'
  --define '__find_requires %{nil}'
  --define '__find_provides %{nil}'

This meant pkgconfigdeps.sh (part of System 2) never ran in OE builds.

rpm 6 removed System 1 entirely. For v6-format packages it only runs
the fileattr system (System 2), and _use_internal_dependency_generator
is ignored.  So __find_requires %{nil} no longer works, and
pkgconfigdeps.sh now runs for the first time in OE builds.

pkgconfigdeps.sh --requires generates both "Requires:/usr/bin/pkg-config"
and "Requires: pkgconfig(foo)" for each .pc dependency.  This creates a
sstate compatibility problem: packages built before the pkgconfigdeps.sh
fix (which unsets PKG_CONFIG_SYSROOT_DIR) have no "Provides:pkgconfig(foo)"
because pkg-config was failing silently.  When DNF installs a mix of old
sstate packages (no Provides) and new packages (now generating
Requires),
it fails with:

  nothing provides pkgconfig(zlib) needed by elfutils-dev
  nothing provides pkgconfig(x11) needed by libdrm-dev

In rpm 6, the correct way to suppress a specific fileattr generator is
via its per-generator macro.  Set __pkgconfig_requires %{nil} so new
packages don't generate Requires that old sstate packages can't satisfy.
Provides generation (__pkgconfig_provides) is kept so packages still
advertise their pkgconfig modules.

OE manages build and runtime deps via DEPENDS/RDEPENDS; auto-generated
pkgconfig() Requires from rpmbuild are not needed.  This follows the
same pattern as the existing __font_provides %{nil}.

Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
 meta/classes-global/package_rpm.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 51ad195baa..1e016971f5 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -599,6 +599,7 @@ python do_package_rpm () {
     cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
     cmd = cmd + " --define '_buildhost reproducible'"
     cmd = cmd + " --define '__font_provides %{nil}'"
+    cmd = cmd + " --define '__pkgconfig_requires %{nil}'"
     cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
     cmd = cmd + " --define 'debug_package %{nil}'"
     cmd = cmd + " --define '_tmppath " + workdir + "'"


  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 ` [PATCH v15 10/12] libarchive: Disable RPM filter auto-bidding and update huge_rpm test Sumanth Gavini
2026-08-23  8:06   ` [OE-core] " Richard Purdie
2026-08-16 23:11 ` Sumanth Gavini [this message]
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-12-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