RPM 4 generated dependencies with the external __find_requires /
__find_provides generator, which OE disabled entirely via
_use_internal_dependency_generator 0. RPM 6 removed that mechanism; for
v6-format packages only the internal fileattr generators run.
rpm's script.attr generator therefore runs for the first time in OE
builds. For every packaged executable whose first line is a #! shebang
it emits an interpreter dependency. kernel-devsrc ships
scripts/mksysmap (#!/bin/sed -f) as an executable, so its package gains:
Requires: /bin/sed
OE manages build and runtime dependencies explicitly through
DEPENDS / RDEPENDS and does not want these. They break real use cases:
- The interpreter path is taken verbatim from the shebang. A #!/bin/sed
script requires /bin/sed, but under usrmerge the only provider
(busybox) offers /usr/bin/sed. The literal paths never match and the
package becomes uninstallable.
- In the SDK the sole interpreter providers (busybox, coreutils, bash,
perl) are deliberately banned by target-sdk-provides-dummy, so these
auto-generated requires make -dev/-src packages uninstallable during
do_populate_sdk ("nothing provides /bin/sed needed by kernel-devsrc").
- The requires are non-reproducible: they are only emitted when the
interpreter is scanned from the shebang during packaging, so the same
recipe can produce different packages between the reproducible A and
B builds.
This is the same class of regression already handled for the pkgconfig
generator; see "rpm: disable the RPM 6 pkgconfig dependency generator".
Suppressing the generator from the rpmbuild command line
(__requires_exclude / __script_requires set to %{nil}) is not reliable:
rpm reloads the fileattr macros during dependency generation and
clobbers the --define. Remove script.attr and its helper script.req
from rpm's install lists via a source patch. This changes
do_unpack/do_patch, so the whole rpm recipe and everything downstream
re-hash and no stale rpm-native is reused.
Signed-off-by: Roshan Sivakumar <[email protected]>
---
...he-script-interpreter-dependency-gen.patch | 72 +++++++++++++++++++
meta/recipes-devtools/rpm/rpm_6.0.2.bb | 1 +
2 files changed, 73 insertions(+)
create mode 100644
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script-interpreter-dependency-gen.patch
diff --git
a/meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script-interpreter-dependency-gen.patch
b/meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script-interpreter-dependency-gen.patch
new file mode 100644
index 0000000000..8c3d1769c8
--- /dev/null
+++
b/meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script-interpreter-dependency-gen.patch
@@ -0,0 +1,72 @@
+From: Roshan Sivakumar <[email protected]>
+Date: Thu, 16 Oct 2026 00:00:00 +0000
+Subject: [PATCH] Do not install the script interpreter dependency generator
+
+RPM 4 generated dependencies with the external __find_requires /
+__find_provides generator, which OE disabled entirely via
+_use_internal_dependency_generator 0. RPM 6 removed that mechanism; for
+v6-format packages only the internal fileattr generators run.
+
+rpm's script.attr generator therefore runs for the first time in OE
+builds. For every packaged executable whose first line is a #! shebang
+it adds an interpreter dependency, e.g. a kernel-devsrc package shipping
+scripts/mksysmap (#!/bin/sed -f) gains:
+
+ Requires: /bin/sed
+
+OpenEmbedded manages build and runtime dependencies explicitly via
+DEPENDS/RDEPENDS and does not want these. They break real use cases:
+
+- The literal interpreter path is taken verbatim from the shebang, so a
+ #!/bin/sed script requires /bin/sed while the only provider (busybox)
+ offers /usr/bin/sed under usrmerge. The paths never match and the
+ package is uninstallable.
+- In the SDK the sole interpreter providers (busybox, coreutils, bash,
+ perl) are deliberately banned by target-sdk-provides-dummy, so these
+ auto-generated requires make -dev/-src packages uninstallable during
+ do_populate_sdk ("nothing provides /bin/sed").
+- The requires are non-reproducible: they are only emitted when the
+ interpreter happens to be scanned from the shebang in the build
+ sysroot, so the same recipe can produce different packages.
+
+This is the same class of problem fixed for pkgconfig.attr; see
+"rpm: disable the RPM 6 pkgconfig dependency generator".
+
+Suppressing the generator from the rpmbuild command line is not
+reliable: rpm reloads the fileattr macros during dependency generation
+and clobbers any --define. Remove script.attr and its helper script.req
+from rpm's install lists via a source patch. This changes
+do_unpack/do_patch, so the whole rpm recipe and everything downstream
+re-hash and no stale rpm-native is reused.
+
+Upstream-Status: Inappropriate [OE policy: dependencies are managed by the
build system, not generated by rpmbuild]
+
+Signed-off-by: Roshan Sivakumar <[email protected]>
+---
+ fileattrs/CMakeLists.txt | 2 +-
+ scripts/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fileattrs/CMakeLists.txt b/fileattrs/CMakeLists.txt
+--- a/fileattrs/CMakeLists.txt
++++ b/fileattrs/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ install(FILES
+ debuginfo.attr desktop.attr elf.attr font.attr metainfo.attr
+ ocaml.attr
+- rpm_macro.attr rpm_lua.attr script.attr sysusers.attr usergroup.attr
++ rpm_macro.attr rpm_lua.attr sysusers.attr usergroup.attr
+ DESTINATION ${RPM_CONFIGDIR}/fileattrs
+ )
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -6,7 +6,7 @@ install(PROGRAMS
+ check-buildroot check-rpaths check-rpaths-worker
+ find-lang.sh find-requires find-provides
+ ocamldeps.sh
+- fontconfig.prov script.req
++ fontconfig.prov
+ rpm_macros_provides.sh
+ rpmdb_dump rpmdb_load
+ rpm2cpio.sh tgpg
diff --git a/meta/recipes-devtools/rpm/rpm_6.0.2.bb
b/meta/recipes-devtools/rpm/rpm_6.0.2.bb
index c27f58a0e8..6c80c839ca 100644
--- a/meta/recipes-devtools/rpm/rpm_6.0.2.bb
+++ b/meta/recipes-devtools/rpm/rpm_6.0.2.bb
@@ -40,6 +40,7 @@ SRC_URI =
"git://github.com/rpm-software-management/rpm;protocol=https;branch=rp
file://0001-tools-elfdeps.cc-Remove-format-module.patch \
file://0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch \
file://0003-Do-not-install-the-pkgconfig-dependency-generator.patch
\
+
file://0004-Do-not-install-the-script-interpreter-dependency-gen.patch \
"
PE = "1"
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#248435):
https://lists.openembedded.org/g/openembedded-core/message/248435
Mute This Topic: https://lists.openembedded.org/mt/121881349/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-