Please can the change covered by this Fedora rawhide pull-request also be applied to the RHEL-9 rpm package: https://src.fedoraproject.org/rpms/rpm/pull-request/25 The change adds an extra variable which, if defined, is passed on to the find-debuginfo.sh script when it is invoked. The new variable - _find_debuginfo_extra_opts - is used by the redhat-rpm-config package to pass a "remove-section .gnu.build.attributes" option to the find-debuginfo script. This option forces any annobin notes present in the target executable to be moved to its separate debuginfo file.
In line with a change to the rawhide PR, I am now asking if the invocation of the find-debuginfo script could include the variable _find_debuginfo_vendor_opts, rather than _find_debuginfo_extra_opts.
Fixed in rpm-4.16.1.3-15.el9. Note for QE - together with the recent change to redhat-rpm-config this update should mean that once these packages hit the buildroot other packages will start to see a reduction in the size of their executable files. The annobin data that was once held in those files should now be moved to their associated debuginfo files. So if you have a build environment with rpm-4.16.1-3-15 and redhat-rpm-config-196-1 installed and you then use it to build another package, lets say "binutils", then you should find that the files in the binary rpm(s) do not contain a .gnu.build.attributes section whereas the files in the debuginfo rpm(s) do contain this section.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (rpm bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8365