#1 make keep-section debuginfo part to be forward-looking
Closed 2 years ago by jistone. Opened 6 years ago by ignatenkobrain.
rpms/ ignatenkobrain/rust macro  into  rawhide

file modified
+5 -4
@@ -177,12 +177,13 @@ 

  # there's no stable ABI, we still need the unallocated metadata (.rustc) to

  # support custom-derive plugins like #[proc_macro_derive(Foo)].  But eu-strip is

  # very eager by default, so we have to limit it to -g, only debugging symbols.

- %if 0%{?fedora} >= 27

- # Newer find-debuginfo.sh supports --keep-section, which is preferable. rhbz1465997

- %global _find_debuginfo_opts --keep-section .rustc

- %else

+ %if (0%{?fedora} && 0%{?fedora} < 27) || (0%{?rhel} && 0%{?rhel} <= 7)

  %global _find_debuginfo_opts -g

  %undefine _include_minidebuginfo

+ %else

+ # Newer find-debuginfo.sh supports --keep-section, which is preferable.

+ # https://bugzilla.redhat.com/show_bug.cgi?id=1465997

+ %global _find_debuginfo_opts --keep-section .rustc

  %endif

  

  # Use hardening ldflags.

The goal should be to be forward-looking by default.

Signed-off-by: Igor Gnatenko ignatenkobrain@fedoraproject.org

This seems worse to me. Before, the default case was the safe one, which will be fine on any system. If mageia took that part of the spec without changes, everything would still work, just not with optimal stripping.

But with the default using the new feature, you have to explicitly list all systems that don't support it, or else you get a broken package. Not even rpmbuild-time broken, because find-debuginfo.sh will effectively ignore the options it doesn't understand. You won't know it's broken until you try to compile something with a rust plugin that needs the .rustc metadata.

The current conditional is only gated for RHEL 7's sake, using the "forward-looking" mode by default as you desired.

Pull-Request has been closed by jistone

2 years ago
Metadata