Import latest changes from rawhide, including hard requirement on the version of gcc used.
This commit is contained in:
parent
8ee25de178
commit
672036adc1
|
@ -14,3 +14,4 @@
|
|||
/annobin-5.0.tar.xz
|
||||
/annobin-5.1.tar.xz
|
||||
/annobin-5.2.tar.xz
|
||||
/annobin-5.6.tar.xz
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
diff -rup annobin.orig/tests/Makefile.am annobin-5.6/tests/Makefile.am
|
||||
--- annobin.orig/tests/Makefile.am 2018-05-04 14:23:33.303562575 +0100
|
||||
+++ annobin-5.6/tests/Makefile.am 2018-05-04 14:23:52.212354792 +0100
|
||||
@@ -12,7 +12,7 @@ TESTS=compile-test \
|
||||
abi-test \
|
||||
missing-notes-test \
|
||||
function-sections-test \
|
||||
- assembler-gap-test
|
||||
+
|
||||
|
||||
XFAIL_TESTS=hardening-fail-test
|
||||
|
||||
diff -rup annobin.orig/tests/Makefile.in annobin-5.6/tests/Makefile.in
|
||||
--- annobin.orig/tests/Makefile.in 2018-05-04 14:23:33.304562564 +0100
|
||||
+++ annobin-5.6/tests/Makefile.in 2018-05-04 14:23:59.205277949 +0100
|
||||
@@ -217,7 +217,7 @@ TESTS = compile-test \
|
||||
abi-test \
|
||||
missing-notes-test \
|
||||
function-sections-test \
|
||||
- assembler-gap-test
|
||||
+
|
||||
|
||||
XFAIL_TESTS = hardening-fail-test
|
||||
all: all-am
|
78
annobin.spec
78
annobin.spec
|
@ -11,7 +11,7 @@
|
|||
|
||||
Name: annobin
|
||||
Summary: Binary annotation plugin for GCC
|
||||
Version: 5.2
|
||||
Version: 5.6
|
||||
Release: 3%{?dist}
|
||||
|
||||
License: GPLv3+
|
||||
|
@ -20,12 +20,21 @@ URL: https://fedoraproject.org/wiki/Toolchain/Watermark
|
|||
# Use "--without tests" to disable the testsuite. The default is to run them.
|
||||
%bcond_without tests
|
||||
|
||||
# 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.
|
||||
%global with_hard_gcc_version_requirement 1
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz
|
||||
# For the latest sources use: git clone git://sourceware.org/git/annobin.git
|
||||
|
||||
# This is a gcc plugin, hence gcc is required.
|
||||
Requires: gcc
|
||||
# Insert patches here, if needed.
|
||||
|
||||
# Skip the assembler test as the Fedora 28 assembler does not support
|
||||
# the --generate-missing-build-notes=yes commmand line option.
|
||||
Patch01: annobin-skip-assembler-test.patch
|
||||
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
|
@ -57,6 +66,59 @@ of the resulting files.
|
|||
|
||||
%global ANNOBIN_PLUGIN_DIR %(gcc --print-file-name=plugin)
|
||||
|
||||
# [Stolen from gcc-python-plugin]
|
||||
# GCC will only load plugins that were built against exactly that build of GCC
|
||||
# We thus need to embed the exact GCC version as a requirement within the
|
||||
# metadata.
|
||||
#
|
||||
# Define "gcc_vr", a variable to hold the VERSION-RELEASE string for the gcc
|
||||
# we are being built against.
|
||||
#
|
||||
# Unfortunately, we can't simply run:
|
||||
# rpm -q --qf="%%{version}-%%{release}"
|
||||
# to determine this, as there's no guarantee of a sane rpm database within
|
||||
# the chroots created by our build system
|
||||
#
|
||||
# So we instead query the version from gcc's output.
|
||||
#
|
||||
# gcc.spec has:
|
||||
# Version: %%{gcc_version}
|
||||
# Release: %%{gcc_release}%%{?dist}
|
||||
# ...snip...
|
||||
# echo 'Red Hat %%{version}-%%{gcc_release}' > gcc/DEV-PHASE
|
||||
#
|
||||
# So, given this output:
|
||||
#
|
||||
# $ gcc --version
|
||||
# gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
|
||||
# Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# we can scrape out the "4.6.1" from the version line.
|
||||
#
|
||||
# The following implements the above:
|
||||
#
|
||||
# Note - gawk will emit a warning message saying:
|
||||
#
|
||||
# gawk: cmd. line:1: warning: escape sequence `\)' treated as plain `)'
|
||||
#
|
||||
# I have not been able to work out how to remove this message, but still provide
|
||||
# sufficient escaping for the command line to survive intact as it is passed
|
||||
# down through the sub-shell.
|
||||
|
||||
%global gcc_vr %(gcc --version | gawk 'match (\$0, ".*Red Hat \([^\\)-]*\)", a) { print a[1]; }')
|
||||
|
||||
# This is a gcc plugin, hence gcc is required.
|
||||
%if %{with_hard_gcc_version_requirement}
|
||||
Requires: gcc == %{gcc_vr}
|
||||
BuildRequires: gcc == %{gcc_vr}
|
||||
%else
|
||||
Requires: gcc
|
||||
%endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
|
@ -124,11 +186,19 @@ exit 0
|
|||
%exclude %{_datadir}/doc/annobin-plugin/LICENSE
|
||||
%doc %{_datadir}/doc/annobin-plugin/annotation.proposal.txt
|
||||
%doc %{_infodir}/annobin.info.gz
|
||||
%doc %{_mandir}/man1/annobin.1.gz
|
||||
%doc %{_mandir}/man1/built-by.1.gz
|
||||
%doc %{_mandir}/man1/check-abi.1.gz
|
||||
%doc %{_mandir}/man1/hardened.1.gz
|
||||
%doc %{_mandir}/man1/run-on-binaries.1.gz
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
%changelog
|
||||
* Thu may 03 2018 Nick Clifton <nickc@redhat.com> - 5.2-3
|
||||
* Fri May 04 2018 Nick Clifton <nickc@redhat.com> - 5.6-3
|
||||
- Import latest changes from rawhide, including hard requirement on the version of gcc used.
|
||||
|
||||
* Thu May 03 2018 Nick Clifton <nickc@redhat.com> - 5.2-3
|
||||
- Rebuild with the latest gcc.
|
||||
|
||||
* Mon Apr 30 2018 Nick Clifton <nickc@redhat.com> - 5.2-2
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (annobin-5.2.tar.xz) = 966f18fead2bc659d0f2c8c10e859aeaff8fcb13a7f16d5a7eaeead5f7bea283d92e308b166f7b21d209f3f607383a871649b5793c6563b929ec8c602c4b8ac2
|
||||
SHA512 (annobin-5.6.tar.xz) = f2451b950644dd90c5077773e4cf8576badb6f4bfeca389e57d1ea548efd4346fb76ac2e7a4da144e797c7be9d4cfe0ae4f60cc8659b589d46aef74317097af3
|
||||
|
|
Loading…
Reference in New Issue