From 3317ae10db545cbb449fe8de964912a053e74218 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 30 Jan 2020 16:46:33 +0000 Subject: [PATCH] Add support for debuginfod (disabled by default) --- .gitignore | 1 + annobin.spec | 26 ++++++++++++++++++++++---- sources | 2 +- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f883c67..15a611f 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,4 @@ /annobin-8.91.tar.xz /annobin-8.92.tar.xz /annobin-9.01.tar.xz +/annobin-9.03.tar.xz diff --git a/annobin.spec b/annobin.spec index e278e0b..d53e14a 100644 --- a/annobin.spec +++ b/annobin.spec @@ -1,9 +1,8 @@ Name: annobin Summary: Binary annotation plugin for GCC -Version: 9.01 -Release: 3%{?dist} - +Version: 9.03 +Release: 1%{?dist} License: GPLv3+ URL: https://fedoraproject.org/wiki/Toolchain/Watermark # Maintainer: nickc@redhat.com @@ -30,13 +29,20 @@ URL: https://fedoraproject.org/wiki/Toolchain/Watermark # Use "--without annocheck" to disable the installation of the annocheck program. %bcond_without annocheck +# Use "--with debuginfod" to enable support for debuginfod in the annocheck program. +%bcond_with debuginfod + # Set this to zero to disable the requirement for a specific version of gcc. # This should only be needed if there is some kind of problem with the version # checking logic or when building on RHEL-7 or earlier. %global with_hard_gcc_version_requirement 1 # Enable this if it is necessary to build annobin without using annobin. -%undefine _annotated_build +# This is useful for example if the annobin plugin fails because of a change +# in the size of gcc's global_options structure. In order to rebuild annobin +# against the changed gcc it is necessary to disable annobin as otherwise +# the configuration step of annobin's build will fail. +# %%undefine _annotated_build #--------------------------------------------------------------------------------- Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz @@ -127,6 +133,9 @@ of the resulting files. Summary: A tool for checking the security hardening status of binaries BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel binutils-devel +%if %{with debuginfod} +BuildRequires: libdebuginfod +%endif %description annocheck Installs the annocheck program which uses the notes generated by annobin to @@ -162,7 +171,13 @@ touch doc/annobin.info #--------------------------------------------------------------------------------- %build + +%if %{with debuginfod} +%configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_PLUGIN_DIR} --with-debuginfod +%else %configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_PLUGIN_DIR} +%endif + %make_build # Rebuild the plugin, this time using the plugin itself! This # ensures that the plugin works, and that it contains annotations @@ -224,6 +239,9 @@ fi #--------------------------------------------------------------------------------- %changelog +* Thu Jan 30 2020 Nick Clifton - 9.03-1 +- Add debuginfod support. + * Tue Jan 28 2020 Fedora Release Engineering - 9.01-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index f21bc7f..9c9cb16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (annobin-9.01.tar.xz) = 60db676559ddb280739cc1e269f143ac8a86a53424af18101a565bcb5945540161473499df6b733e30f896684e0ef373f0e01bea4dd017df4c32ea31a5de4d0b +SHA512 (annobin-9.03.tar.xz) = 3b2bbadcc700abaf9a927bc07fb7b9f577590b64025ce182a179b523bc033ab5ef8060ca04c6796ed672c80a5f7d92de81d429e565096b8791cddb7142110cec