rpm: disable the RPM 6 script interpreter dependency generator
PATCH 1/1 rpm: disable the RPM 6 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 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.
--- ...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
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script-interpreter-dependency-gen.patch new file +72 -0
@@ -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
meta/recipes-devtools/rpm/rpm_6.0.2.bb +1 -0
@@ -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"
Signature · 1 line
2.34.1
Quoted 17 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Roshan Sivakumar via lists.openembedded.org
Sent: den 22 oktober 2026 10:47
To: [email protected]
Cc: Sumanth Gavini <[email protected]>; Roshan Sivakumar <[email protected]>
Subject: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generatorRPM 4 generated dependencies with the external
__find_requires/__find_providesgenerator, which OE disabled entirely via_use_internal_dependency_generator0. 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:
Quoted 4 lines
Requires:
/bin/sedOE manages build and runtime dependencies explicitly through DEPENDS / RDEPENDS and does not want these. They break real use cases:
I am not sure about the explicitly part. AFAIK, installed scripts with a #!/bin/bash shebang leads to an automatic dependency on bash. Whether it is RPM and/or bitbake doing that, I don't know.
Quoted 125 lines
- 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 duringdo_populate_sdk("nothing provides/bin/sedneeded 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_requiresset 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.patchmeta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +0
-0interpreter-dependency-gen.patch
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +42
-0@@ -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 bythe build system, not generated by rpmbuild]
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +30
-0+ +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 tgpgmeta/recipes-devtools/rpm/rpm_6.0.2.bb +1
-1@@ -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" --
Quoted 1 line
2.34.1
//Peter
Quoted 1 line
Quoted 1 line
Replying here again since the previous reply was sent in a separate thread.
I believe this dependency belongs here: openembedded-core/meta/recipes-kernel/linux/kernel-devsrc.bb at master · openembedded/openembedded-core<https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-kernel/linux/kernel-devsrc.bb#L460>
RDEPENDS:${PN} += "sed" in the above recipe is the right way to do it?
There should probably be a separate patch to satisfy that dependency.
Thanks,
Roshan.
________________________________
From: Peter Kjellerstedt <[email protected]>
Sent: Thursday, October 22, 2026 05:19
To: Roshan Sivakumar <[email protected]>; [email protected] <[email protected]>
Cc: Sumanth Gavini <[email protected]>
Subject: RE: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 17 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Roshan Sivakumar via lists.openembedded.org
Sent: den 22 oktober 2026 10:47
To: [email protected]
Cc: Sumanth Gavini <[email protected]>; Roshan Sivakumar <[email protected]>
Subject: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generatorRPM 4 generated dependencies with the external
__find_requires/__find_providesgenerator, which OE disabled entirely via_use_internal_dependency_generator0. 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:
Quoted 4 lines
Requires:
/bin/sedOE manages build and runtime dependencies explicitly through DEPENDS / RDEPENDS and does not want these. They break real use cases:
I am not sure about the explicitly part. AFAIK, installed scripts with a #!/bin/bash shebang leads to an automatic dependency on bash. Whether it is RPM and/or bitbake doing that, I don't know.
Quoted 125 lines
- 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 duringdo_populate_sdk("nothing provides/bin/sedneeded 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_requiresset 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.patchmeta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +0
-0interpreter-dependency-gen.patch
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +42
-0@@ -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 bythe build system, not generated by rpmbuild]
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +30
-0+ +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 tgpgmeta/recipes-devtools/rpm/rpm_6.0.2.bb +1
-1@@ -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" --
Quoted 1 line
2.34.1
//Peter
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi @Peter<mailto:[email protected]>,
Can we merge this fix and handle the dependencies using RDEPENDS in the individual recipes that need them like mentioned above?
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: [email protected] <[email protected]> on behalf of Roshan Sivakumar via lists.openembedded.org <[email protected]>
Sent: Friday, 23 October 2026 13:11:38
To: Peter Kjellerstedt <[email protected]>; [email protected] <[email protected]>
Cc: Sumanth Gavini <[email protected]>
Subject: Re: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 1 line
Quoted 1 line
Replying here again since the previous reply was sent in a separate thread.
I believe this dependency belongs here: openembedded-core/meta/recipes-kernel/linux/kernel-devsrc.bb at master · openembedded/openembedded-core<https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-kernel/linux/kernel-devsrc.bb#L460>
RDEPENDS:${PN} += "sed" in the above recipe is the right way to do it?
There should probably be a separate patch to satisfy that dependency.
Thanks,
Roshan.
________________________________
From: Peter Kjellerstedt <[email protected]>
Sent: Thursday, October 22, 2026 05:19
To: Roshan Sivakumar <[email protected]>; [email protected] <[email protected]>
Cc: Sumanth Gavini <[email protected]>
Subject: RE: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 17 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Roshan Sivakumar via lists.openembedded.org
Sent: den 22 oktober 2026 10:47
To: [email protected]
Cc: Sumanth Gavini <[email protected]>; Roshan Sivakumar <[email protected]>
Subject: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generatorRPM 4 generated dependencies with the external
__find_requires/__find_providesgenerator, which OE disabled entirely via_use_internal_dependency_generator0. 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:
Quoted 4 lines
Requires:
/bin/sedOE manages build and runtime dependencies explicitly through DEPENDS / RDEPENDS and does not want these. They break real use cases:
I am not sure about the explicitly part. AFAIK, installed scripts with a #!/bin/bash shebang leads to an automatic dependency on bash. Whether it is RPM and/or bitbake doing that, I don't know.
Quoted 125 lines
- 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 duringdo_populate_sdk("nothing provides/bin/sedneeded 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_requiresset 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.patchmeta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +0
-0interpreter-dependency-gen.patch
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +42
-0@@ -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 bythe build system, not generated by rpmbuild]
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +30
-0+ +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 tgpgmeta/recipes-devtools/rpm/rpm_6.0.2.bb +1
-1@@ -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" --
Quoted 1 line
2.34.1
//Peter
Well, I just feel that we are removing an existing feature if we do. It may be that it is only present when using DNF and RPM to generate the images (which we do), as I do not know whether the other packaging formats support dependencies on files. On the other hand, these kind of dependencies are often missed when adding them manually so if we are removing them from DNF/RPM, I think it would be more appropriate if bitbake detected them automatically, just like it automatically detects runtime dependencies for dynamic libraries.
//Peter
From: Roshan Sivakumar <[email protected]>
Sent: den 25 oktober 2026 14:49
To: Peter Kjellerstedt <[email protected]>; [email protected]
Cc: Sumanth Gavini <[email protected]>
Subject: Re: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
You don't often get email from [email protected]<mailto:[email protected]>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Hi @Peter<mailto:[email protected]>,
Can we merge this fix and handle the dependencies using RDEPENDS in the individual recipes that need them like mentioned above?
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Roshan Sivakumar via lists.openembedded.org <[email protected]<mailto:[email protected]>>
Sent: Friday, 23 October 2026 13:11:38
To: Peter Kjellerstedt <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Sumanth Gavini <[email protected]<mailto:[email protected]>>
Subject: Re: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 1 line
Quoted 1 line
Replying here again since the previous reply was sent in a separate thread.
I believe this dependency belongs here: openembedded-core/meta/recipes-kernel/linux/kernel-devsrc.bb at master * openembedded/openembedded-core<https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-kernel/linux/kernel-devsrc.bb#L460>
RDEPENDS:${PN} += "sed" in the above recipe is the right way to do it?
There should probably be a separate patch to satisfy that dependency.
Thanks,
Roshan.
________________________________
From: Peter Kjellerstedt <[email protected]<mailto:[email protected]>>
Sent: Thursday, October 22, 2026 05:19
To: Roshan Sivakumar <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Sumanth Gavini <[email protected]<mailto:[email protected]>>
Subject: RE: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 17 lines
-----Original Message-----
From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Roshan Sivakumar via lists.openembedded.org
Sent: den 22 oktober 2026 10:47
To: [email protected]<mailto:[email protected]>
Cc: Sumanth Gavini <[email protected]<mailto:[email protected]>>; Roshan Sivakumar <[email protected]<mailto:[email protected]>>
Subject: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generatorRPM 4 generated dependencies with the external
__find_requires/__find_providesgenerator, which OE disabled entirely via_use_internal_dependency_generator0. 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:
Quoted 4 lines
Requires:
/bin/sedOE manages build and runtime dependencies explicitly through DEPENDS / RDEPENDS and does not want these. They break real use cases:
I am not sure about the explicitly part. AFAIK, installed scripts with a #!/bin/bash shebang leads to an automatic dependency on bash. Whether it is RPM and/or bitbake doing that, I don't know.
Quoted 125 lines
- 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 duringdo_populate_sdk("nothing provides/bin/sedneeded 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_requiresset 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.--- ...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.patchmeta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +0
-0interpreter-dependency-gen.patch
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +42
-0@@ -0,0 +1,72 @@ +From: Roshan Sivakumar <[email protected]<mailto:[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 bythe build system, not generated by rpmbuild]
meta/recipes-devtools/rpm/files/0004-Do-not-install-the-script- new file +30
-0+ +Signed-off-by: Roshan Sivakumar <[email protected]<mailto:[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 tgpgmeta/recipes-devtools/rpm/rpm_6.0.2.bb +1
-1@@ -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" --
Quoted 1 line
2.34.1
//Peter
I believe this dependency belongs here: openembedded-core/meta/recipes-kernel/linux/kernel-devsrc.bb at master · openembedded/openembedded-core ( https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-kernel/linux/kernel-devsrc.bb#L460 )
RDEPENDS:${PN} += "sed" in the above recipe is the right way to do it?
There should probably be a separate patch to satisfy that dependency.
Quoted 5 lines · Roshan Sivakumar via lists.openembedded.org
RPM 4 generated dependencies with the external
__find_requires/__find_providesgenerator, which OE disabled entirely via_use_internal_dependency_generator0. RPM 6 removed that mechanism; for v6-format packages only the internal fileattr generators run.
I don't understand. What was enabled in rpm 4 and what was not? What ran and what didn't? The above seems to say that rpm 4 used external generator, which was disabled by oe, but then the disabling statement refers to internal generator.
Quoted 7 lines
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
Quoted 8 lines
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.
But if the script in a target package refers to /bin/sed, and the target root filesystem is not providing that, then the problem is not with the dependency checker, it's with the script and/or filesystem layout. Disabling the check does not address that problem, it just sweeps it under the carpet. Am I missing something? How does this work on Fedora for example, which also uses usrmerge?
Quoted 5 lines
- 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/sedneeded by kernel-devsrc").
This probably needs steps to reproduce, so we can better understand the issue.
Quoted 5 lines
- 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.
I also don't understand this. How does the non-reproducibility happen exactly? Why would it produce different requires?
Quoted 3 lines
This is the same class of regression already handled for the pkgconfig generator; see "rpm: disable the RPM 6 pkgconfig dependency generator".
There was also a concern during patch review that the checks that the generator does are useful to catch missing runtime dependencies in recipes, and disabling this would regress the packaging quality. Something like this checker should be made generic (e.g. run in do_package, regardless of specific packaging backend). How does this check work exactly, and where is it implemented? Do we have an equivalent in do_package (I vaguely remember that we do)? If there's an equivalent, then why it doesn't complain but the rpm-specific check does?
This needs further investigation.
Alex
Hi Alexander,
I agree that disabling RPM's shebang-based dependency generator removes an existing feature, so I've dropped that approach. Instead, I've sent a minimal patch that declares the missing dependency directly: [email protected] | [PATCH] kernel-devsrc: add runtime dependency on sed<https://lists.openembedded.org/g/openembedded-core/topic/patch_kernel_devsrc_add/122008476>
This pulls in the full sed package which provides /bin/sed in usrmerge builds : Blaming openembedded-core/meta/recipes-extended/sed/sed_4.10.bb at master · openembedded/openembedded-core<https://github.com/openembedded/openembedded-core/blame/master/meta/recipes-extended/sed/sed_4.10.bb#L66>.
Without this, populate_sdk task fails with "/bin/sed has no provider" error in builds where usermerge DISTRO_FEATURE is enabled.
But if the script in a target package refers to /bin/sed, and the target root filesystem is not providing that, then the problem is not with the dependency checker, it's with the script and/or filesystem layout. Disabling the check does not address that problem, it just sweeps it under the carpet. Am I missing something? How does this work on Fedora for example, which also uses usrmerge?
I agree, will investigate further on this. In the meantime, I'd suggest we take this minimal RDEPENDS fix to unblock the immediate issue.
Thanks,
Roshan.
________________________________
From: Alexander Kanavin <[email protected]>
Sent: Thursday, October 29, 2026 07:29
To: Roshan Sivakumar <[email protected]>
Cc: [email protected] <[email protected]>; Sumanth Gavini <[email protected]>; Richard Purdie <[email protected]>; Paul Barker <[email protected]>
Subject: Re: [OE-core][PATCH] rpm: disable the RPM 6 script interpreter dependency generator
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
On Thu, 22 Oct 2026 at 12:12, Roshan Sivakumar via lists.openembedded.org<http://lists.openembedded.org> <[email protected]<mailto:[email protected]>> wrote:
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.
I don't understand. What was enabled in rpm 4 and what was not? What ran and what didn't? The above seems to say that rpm 4 used external generator, which was disabled by oe, but then the disabling statement refers to internal generator.
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.
But if the script in a target package refers to /bin/sed, and the target root filesystem is not providing that, then the problem is not with the dependency checker, it's with the script and/or filesystem layout. Disabling the check does not address that problem, it just sweeps it under the carpet. Am I missing something? How does this work on Fedora for example, which also uses usrmerge?
- 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").
This probably needs steps to reproduce, so we can better understand the issue.
- 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.
I also don't understand this. How does the non-reproducibility happen exactly? Why would it produce different requires?
This is the same class of regression already handled for the pkgconfig generator; see "rpm: disable the RPM 6 pkgconfig dependency generator".
There was also a concern during patch review that the checks that the generator does are useful to catch missing runtime dependencies in recipes, and disabling this would regress the packaging quality. Something like this checker should be made generic (e.g. run in do_package, regardless of specific packaging backend). How does this check work exactly, and where is it implemented? Do we have an equivalent in do_package (I vaguely remember that we do)? If there's an equivalent, then why it doesn't complain but the rpm-specific check does?
This needs further investigation.
Alex