From 9e9dc09cdaaa0125cf68b87b0f15a85ea06d2f71 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Thu, 30 Mar 2023 15:01:59 +0200 Subject: [PATCH] find-provides.ksyms, find-requires.ksyms: avoid awaking debuginfod Starting with RHEL 9.2 and Fedora 35, debuginfod is enabled by default, which leads to significant startup times of various tools from the elfutils package (namely, readelf and objdump). Unset DEBUGINFOD_URLS to avoid it. * find-provides.ksyms (DEBUGINFOD_URLS): Unset. * find-requires.ksyms (DEBUGINFOD_URLS): Ditto. * kernel-srpm-macros.spec (Release): Bump to 18. (%changelog): Add a record. Suggested-by: Panu Matilainen Co-Authored-by: Denys Vlasenko Signed-off-by: Eugene Syromiatnikov --- find-provides.ksyms | 4 ++++ find-requires.ksyms | 4 ++++ kernel-srpm-macros.spec | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/find-provides.ksyms b/find-provides.ksyms index aa656e1..ccad20b 100755 --- a/find-provides.ksyms +++ b/find-provides.ksyms @@ -3,6 +3,10 @@ IFS=$'\n' export LC_ALL=C +# Prevent elfutils from trying to download debuginfos +unset DEBUGINFOD_URLS + + for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do dep_pfx="ksym" # For built-in kmods, "kernel()" syntax is used instead of "ksym()" diff --git a/find-requires.ksyms b/find-requires.ksyms index 6e176a4..e22e910 100755 --- a/find-requires.ksyms +++ b/find-requires.ksyms @@ -7,6 +7,10 @@ IFS=$'\n' +# Prevent elfutils from trying to download debuginfos +unset DEBUGINFOD_URLS + + # Extract all of the symbols provided by this module. all_provides() { for module in "$@"; do diff --git a/kernel-srpm-macros.spec b/kernel-srpm-macros.spec index bee42c7..b420b97 100644 --- a/kernel-srpm-macros.spec +++ b/kernel-srpm-macros.spec @@ -1,7 +1,7 @@ Name: kernel-srpm-macros Version: 1.0 # when bumping version and resetting release, don't forget to bump version of kernel-rpm-macros as well -Release: 17%{?dist} +Release: 18%{?dist} Summary: RPM macros that list arches the full kernel is built on # This package only exist in Fedora repositories # The license is the standard (MIT) specified in @@ -134,6 +134,9 @@ install -p -m 644 -t "%{buildroot}%{_fileattrsdir}" modalias.attr %{rrcdir}/rpmsort %changelog +* Tue Mar 30 2023 Eugene Syromiatnikov - 1.0-18 +- Avoid triggering debuginfod during elfutils tools usage. + * Tue Jan 31 2023 Eugene Syromiatnikov - 1.0-17 - Support storing of __crc_* symbols in sections other than .rodata. - Work around a change in type of __crc_* symbols for some kmods printed by nm