From 922809d7399daa657607dc5ca0c1bd24f3472a47 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Tue, 10 Nov 2020 16:14:43 -0500 Subject: [PATCH] Resolves: #1889545 --- dyninst-10.2.1-dbid.patch | 13 ++----------- dyninst-10.2.1-pie.patch | 8 -------- dyninst.spec | 14 +++++++++++++- 3 files changed, 15 insertions(+), 20 deletions(-) delete mode 100644 dyninst-10.2.1-pie.patch diff --git a/dyninst-10.2.1-dbid.patch b/dyninst-10.2.1-dbid.patch index 91b5407..78f3997 100644 --- a/dyninst-10.2.1-dbid.patch +++ b/dyninst-10.2.1-dbid.patch @@ -92,18 +92,9 @@ https://sourceware.org/elfutils/Debuginfod.html elseif(NOT (LibElf_FOUND AND LibDwarf_FOUND) AND STERILE_BUILD) message(FATAL_ERROR "Elfutils not found and cannot be downloaded because build is sterile.") else() -@@ -104,7 +121,7 @@ else() - if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR NOT (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")) - message(FATAL_ERROR "ElfUtils will only build with the GNU compiler") - endif() -- -+ - include(ExternalProject) - externalproject_add( - ElfUtils ---- /dedyninst-10.2.1/dyninst-10.2.1/null -+++ b/cmake/Modules/FindLibDebuginfod.cmake +--- /dev/null ++++ dyninst-10.2.1/dyninst-10.2.1/cmake/Modules/FindLibDebuginfod.cmake @@ -0,0 +1,76 @@ +#======================================================================================== +# FindDebuginfod diff --git a/dyninst-10.2.1-pie.patch b/dyninst-10.2.1-pie.patch deleted file mode 100644 index 095f037..0000000 --- a/dyninst-10.2.1-pie.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-02-24 09:41:30.207108160 -0500 -+++ dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-08-25 15:57:28.437496257 -0400 -@@ -5,4 +5,4 @@ - set (DYNINST_ROOT ${PROJECT_SOURCE_DIR}/..) --set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}") --set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}") -+# set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}") -+# set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}") diff --git a/dyninst.spec b/dyninst.spec index 7f428c3..cf7facd 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,7 +1,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.dyninst.org Version: 10.2.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 @@ -22,6 +22,7 @@ Patch5: testsuite-10.1.0-throw.patch BuildRequires: gcc-c++ BuildRequires: elfutils-devel BuildRequires: elfutils-libelf-devel +BuildRequires: elfutils-debuginfod-client-devel BuildRequires: boost-devel BuildRequires: binutils-devel BuildRequires: cmake @@ -102,6 +103,7 @@ CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS LDFLAGS %cmake \ + -DENABLE_DEBUGINFOD=1 \ -DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \ -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \ -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ @@ -139,6 +141,13 @@ cd ../%{testsuite_base} mkdir -p %{buildroot}/etc/ld.so.conf.d echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf +# Ugly hack to mask testsuite files from debuginfo extraction. Running the +# testsuite requires debuginfo, so extraction is useless. However, debuginfo +# extraction is still nice for the main libraries, so we don't want to disable +# it package-wide. The permissions are restored by attr(755,-,-) in files. +find %{buildroot}%{_libdir}/dyninst/testsuite/ \ + -type f '!' -name '*.a' -execdir chmod 644 '{}' '+' + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -177,6 +186,9 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Tue Nov 10 2020 Stan Cox - 10.2.1-2 +- Enable debuginfod + * Wed Oct 28 2020 Stan Cox - 10.2.1-1 - Update to 10.2.1