From 006e9acec2708eb48b148b3f1ed3cb8e89107447 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 3 Dec 2014 10:52:44 -0500 Subject: Revert "clean up some debuginfo stuff & python-sitearch" This reverts commit d0c82b7f5af913cac8533e7e2dbd2a149eaf42f0. Doing local builds via fedpkg local results in %{python_sitearch} not being expanded properly and the build failing. We also see that all of the .ko files have no symbols. Just reverting it for now. --- kernel.spec | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'kernel.spec') diff --git a/kernel.spec b/kernel.spec index 500cc1a33..6c289c294 100644 --- a/kernel.spec +++ b/kernel.spec @@ -376,7 +376,6 @@ Requires: kernel-%{?variant:%{variant}-}modules-uname-r = %{KVERREL}%{?variant} # # List the packages used during the kernel build # -BuildRequires: python-devel BuildRequires: kmod, patch, bash, sh-utils, tar BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make, diffutils, gawk BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc @@ -385,7 +384,7 @@ BuildRequires: net-tools, hostname, bc BuildRequires: sparse %endif %if %{with_perf} -BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel perl(ExtUtils::Embed) bison flex +BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) bison flex BuildRequires: audit-libs-devel %ifnarch s390 s390x %{arm} BuildRequires: numactl-devel @@ -397,8 +396,7 @@ BuildRequires: pciutils-devel gettext ncurses-devel BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils -%define _missing_build_ids_terminate_build 1 -%global _find_debuginfo_opts -r +%define debuginfo_args --strict-build-id -r %endif %if %{signmodules} @@ -699,7 +697,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 _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|XXX' -o perf-debuginfo.list} +%{expand:%%global debuginfo_args %{?debuginfo_args} -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 @@ -709,6 +707,8 @@ The python-perf package contains a module that permits applications written in the Python programming language to use the interface to manipulate perf events. +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + %package -n python-perf-debuginfo Summary: Debug information for package perf python bindings Group: Development/Debug @@ -717,8 +717,8 @@ AutoReqProv: no %description -n python-perf-debuginfo This package provides debug information for the perf python bindings. -%define __python_sitearch %%{python_sitearch} -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_libdir}/python*/site-packages/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list} +# 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} %endif # with_perf @@ -773,7 +773,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 _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)?|XXX' -o kernel-tools-debuginfo.list} +%{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)?|XXX' -o kernel-tools-debuginfo.list} %endif # with_tools @@ -792,7 +792,7 @@ AutoReqProv: no\ %description -n %{name}%{?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 _find_debuginfo_opts %{?_find_debuginfo_opts} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:[+]%{1}}/.*|/.*%%{KVERREL}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\ %{nil} # @@ -1823,6 +1823,10 @@ 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} @@ -2070,7 +2074,7 @@ fi %files -n python-perf %defattr(-,root,root) -%{__python_sitearch} +%{python_sitearch} %if %{with_debuginfo} %files -f perf-debuginfo.list -n perf-debuginfo @@ -2197,12 +2201,6 @@ fi # ||----w | # || || %changelog -* Tue Dec 02 2014 Kyle McMartin -- python-devel is BuildRequires regardless of with_perf. -- Use %_find_debuginfo_opts instead of pointless debuginfo_args. -- Remove pointless __debug_install_post. -- Remove python_sitearch since it's in the global rpm macros anyway. - * Mon Dec 01 2014 Josh Boyer - 3.18.0-0.rc7.git0.1 - Linux v3.18-rc7 -- cgit