diff mbox series

[v17,13/14] package_rpm.bbclass: suppress RPM 6 fileattr dependency generators

Message ID 20260825013312.2695028-14-sumanth.gavini@windriver.com
State New
Headers show
Series rpm: 4.20.1 -> 6.0.2 | expand

Commit Message

Sumanth Gavini Aug. 25, 2026, 1:33 a.m. UTC
RPM 6 replaced the monolithic __find_requires/__find_provides scripts
(RPM 4) with per-filetype fileattr dependency generators. Each file type
now has its own macro pair:

  __elf_requires / __elf_provides     (ELF binaries)
  __script_requires                   (shell scripts)
  __pkgconfig_provides                (pkg-config .pc files)
  __desktop_provides                  (freedesktop .desktop files)
  __debuginfo_provides                (debuginfo packages)
  __metainfo_provides                 (AppStream metainfo)
  __ocaml_requires / __ocaml_provides (OCaml modules)
  __rpm_lua_provides                  (Lua RPM macros)
  __rpm_macro_provides                (RPM macro files)
  __usergroup_provides                (user/group entries)

None of these are appropriate for cross-compiled embedded packages:
- ELF deps are target-arch specific and would resolve against wrong
  sysroot libraries
- pkg-config, OCaml, Lua and macro provides are host tooling concepts
  not applicable in an embedded rootfs
- OE already handles its own dependency tracking via perfiledeps scripts

Suppress all of them with %{nil} to restore the RPM 4 behaviour where
OE's perfiledeps scripts have full control over what gets generated.

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

Patch

diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 1e016971f5..71d5c5dee3 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -600,6 +600,18 @@  python do_package_rpm () {
     cmd = cmd + " --define '_buildhost reproducible'"
     cmd = cmd + " --define '__font_provides %{nil}'"
     cmd = cmd + " --define '__pkgconfig_requires %{nil}'"
+    cmd = cmd + " --define '__elf_requires %{nil}'"
+    cmd = cmd + " --define '__elf_provides %{nil}'"
+    cmd = cmd + " --define '__script_requires %{nil}'"
+    cmd = cmd + " --define '__pkgconfig_provides %{nil}'"
+    cmd = cmd + " --define '__desktop_provides %{nil}'"
+    cmd = cmd + " --define '__debuginfo_provides %{nil}'"
+    cmd = cmd + " --define '__metainfo_provides %{nil}'"
+    cmd = cmd + " --define '__ocaml_requires %{nil}'"
+    cmd = cmd + " --define '__ocaml_provides %{nil}'"
+    cmd = cmd + " --define '__rpm_lua_provides %{nil}'"
+    cmd = cmd + " --define '__rpm_macro_provides %{nil}'"
+    cmd = cmd + " --define '__usergroup_provides %{nil}'"
     cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
     cmd = cmd + " --define 'debug_package %{nil}'"
     cmd = cmd + " --define '_tmppath " + workdir + "'"