summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorLaura Abbott <labbott@fedoraproject.org>2017-05-23 10:53:02 -0700
committerLaura Abbott <labbott@fedoraproject.org>2017-05-23 10:53:02 -0700
commitdebc7c545acd1171c5de82ddea7ab29933446a1a (patch)
treee26b330a39f1c908fce918f7daa35d5a9438b705 /kernel.spec
parent11ddff0f586af6ca52462a7f09bc08c165ee11fa (diff)
downloadkernel-debc7c545acd1171c5de82ddea7ab29933446a1a.tar.gz
kernel-debc7c545acd1171c5de82ddea7ab29933446a1a.tar.xz
kernel-debc7c545acd1171c5de82ddea7ab29933446a1a.zip
Update debuginfo generation
Once upon a time, the kernel needed a lot of special handling to generate proper debuginfo as the kernel was ahead in technology. These days, rpm has improved debuginfo support. The kernel has not kept up with this and it's forward looking calls are now out of date. Switch to more standard invocations of debuginfo calls.
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec49
1 files changed, 19 insertions, 30 deletions
diff --git a/kernel.spec b/kernel.spec
index e6d6cc354..5b2359ecd 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -395,7 +395,16 @@ BuildRequires: pciutils-devel gettext ncurses-devel
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
%if %{with_debuginfo}
BuildRequires: rpm-build, elfutils
-%define debuginfo_args --strict-build-id -r
+BuildConflicts: rpm < 4.13.0.1-19
+# Most of these should be enabled after more investigation
+%undefine _include_minidebuginfo
+%undefine _find_debuginfo_dwz_opts
+%undefine _unique_build_ids
+%undefine _unique_debug_names
+%undefine _unique_debug_srcs
+%global _find_debuginfo_opts -r
+%global _missing_build_ids_terminate_build 1
+%global _no_recompute_build_ids 1
%endif
%if %{signkernel}%{signmodules}
@@ -492,9 +501,6 @@ Source5000: patch-4.%{base_sublevel}-git%{gitrev}.xz
## Patches needed for building this package
-# build tweak for build ID magic, even for -vanilla
-Patch001: kbuild-AFTER_LINK.patch
-
## compile fixes
# ongoing complaint, full discussion delayed until ksummit/plumbers
@@ -689,7 +695,7 @@ This package provides debug information for the perf package.
# symlinks because of the trailing nonmatching alternation and
# the leading .*, because of find-debuginfo.sh's buggy handling
# of matching the pattern against the symlinks file.
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX' -o perf-debuginfo.list}
+%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX' -o perf-debuginfo.list}
%package -n python-perf
Summary: Python bindings for apps which will manipulate perf events
@@ -710,7 +716,7 @@ AutoReqProv: no
This package provides debug information for the perf python bindings.
# the python_sitearch macro should already be defined from above
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{python_sitearch}/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list}
+%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{python_sitearch}/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list}
%endif # with_perf
@@ -765,7 +771,7 @@ This package provides debug information for package kernel-tools.
# symlinks because of the trailing nonmatching alternation and
# the leading .*, because of find-debuginfo.sh's buggy handling
# of matching the pattern against the symlinks file.
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list}
+%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list}
%endif # with_tools
@@ -785,7 +791,7 @@ AutoReqProv: no\
%description %{?1:%{1}-}debuginfo\
This package provides debug information for package %{name}%{?1:-%{1}}.\
This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\
+%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\
%{nil}
#
@@ -1266,18 +1272,6 @@ cd ..
%define sparse_mflags C=1
%endif
-%if %{with_debuginfo}
-# This override tweaks the kernel makefiles so that we run debugedit on an
-# object before embedding it. When we later run find-debuginfo.sh, it will
-# run debugedit again. The edits it does change the build ID bits embedded
-# in the stripped object, but repeating debugedit is a no-op. We do it
-# beforehand to get the proper final build ID bits into the embedded image.
-# This affects the vDSO images in vmlinux, and the vmlinux image in bzImage.
-export AFTER_LINK=\
-'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug \
- -i $@ > $@.id"'
-%endif
-
cp_vmlinux()
{
eu-strip --remove-comment -o "$2" "$1"
@@ -1489,12 +1483,8 @@ BuildKernel() {
cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf
%if %{with_debuginfo}
- if test -s vmlinux.id; then
- cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
- else
- echo >&2 "*** ERROR *** no vmlinux build ID! ***"
- exit 1
- fi
+ eu-readelf -n vmlinux | grep "Build ID" | awk '{print $NF}' > vmlinux.id
+ cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
#
# save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
@@ -1731,10 +1721,6 @@ popd
%if %{with_debuginfo}
-%define __debug_install_post \
- /usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\
-%{nil}
-
%ifnarch noarch
%global __debug_package 1
%files -f debugfiles.list debuginfo-common-%{_target_cpu}
@@ -2161,6 +2147,9 @@ fi
#
#
%changelog
+* Tue May 23 2017 Laura Abbott <labbott@fedoraproject.org>
+- Update debuginfo generation
+
* Tue May 23 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.0-0.rc2.git1.1
- Linux v4.12-rc2-49-gfde8e33
- Reenable debugging options.