Compare commits

...
Sign in to create a new pull request.

140 commits

Author SHA1 Message Date
Fedora Release Engineering
d29890bd41 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:41:03 +00:00
Nick Clifton
ba3345aaf8 Annocheck: Add .fc44 to list of known rpm file extensions. 2026-01-15 15:29:42 +00:00
Jakub Jelinek
2576bee059 13.04-3 2025-12-20 15:11:11 +01:00
Jakub Jelinek
20e0cb02b6 13.04-2 2025-12-20 13:43:13 +01:00
Nick Clifton
e11676d4ef Annocheck: Fix compile time warnings from GCC-15 re: strchr returning a const char *. 2025-12-18 08:48:36 +00:00
Nick Clifton
a84ff42993 Annocheck: Skip production test for gcc libraries. (RHEL-123175) 2025-11-05 10:32:54 +00:00
Nick Clifton
60e36afe5f Annocheck: Update heuristic to detect gcc libraries. (RHEL-124869) 2025-10-31 14:52:22 +00:00
Nick Clifton
844d102d83 Annocheck: Change FAIL for binaries built by a cross compiler to a MAYBE. (RHEL-123175) 2025-10-23 17:01:42 +01:00
Nick Clifton
8bc321d24a Annocheck: Improve detection of glibc static maths libraries. (RHEL-107470) 2025-08-06 10:36:49 +01:00
Fedora Release Engineering
6869ce708f Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 16:59:30 +00:00
Nick Clifton
9c45dd821c Improve configure and meson files for consistent builds. 2025-07-07 10:34:33 +01:00
Nick Clifton
4ed470d1fb 12.97: Annocheck: delete temporary debuginfo directory 2025-06-19 11:06:02 +01:00
Nick Clifton
874f029d05 Annocheck: Fix bugs in debug rpm location code. Add more glibc exceptions. (RHEL-95216) 2025-06-04 17:17:24 +01:00
Nick Clifton
e3fb5aa977 Annocheck: Improve performance with multiple debug info files and multiple files to scan. (#2366180) 2025-05-15 16:31:37 +01:00
Nick Clifton
55b74474e1 Annocheck: Update heuristic for detecting gcc files to cope with gcc 15. (#2365824) 2025-05-13 10:59:11 +01:00
Nicholas Clifton
4b2447ab99 Merge #36 Generate latest-annobin.tar.xz at %prep 2025-03-17 12:22:31 +00:00
Nick Clifton
5d1c0d8e7e 12.93: Fix GO revision test 2025-03-17 11:40:30 +00:00
Tulio Magno Quites Machado Filho
5c3d24ca6f Generate latest-annobin.tar.xz at %prep
Generate a source tarball for annobin during the prep phase, after all
the patches have been applied.  Use this new tarball when installing the
annobin source code for the GCC plugin.

On distros without downstream patches, this change should not produce
any changes.
2025-03-14 10:47:40 -03:00
Nick Clifton
be7ffb96bc Annocheck: Do not rely upon libelf's ability to detect links to separate debuginfo files. (RHEL-79264) 2025-02-14 10:54:12 +00:00
Nick Clifton
38595c3a34 Annocheck: Fix resource leak. (RHEL-79256) 2025-02-13 14:03:32 +00:00
Nick Clifton
c5469afe65 Annocheck: Fix double free(). Add special handling for COMBOOT modules 2025-02-12 10:18:34 +00:00
Nick Clifton
36aba6172f Annocheck: Improve diagnostics when a separate debug info file cannot be found. 2025-02-11 10:55:02 +00:00
Nick Clifton
274102f8bd Annocheck: Look for -fstack-clash-protection in DW_AT_producer string. (RHEL-77328) 2025-02-03 15:01:29 +00:00
Nick Clifton
5cc01bd7ed NVR bump 2025-01-28 12:06:14 +00:00
Nick Clifton
667f38a457 Annocheck: Fix locating string notes (again). Add exception for glibc benchmark tests. (RHEL-76456) 2025-01-28 12:03:03 +00:00
Nick Clifton
a64f9d3ef1 Annocheck: Add crtoffloadtableS.o to list of known gcc binaries. (RHEL-760404) 2025-01-28 09:39:10 +00:00
Nick Clifton
52003fae98 12.85: Annocheck: Fix the --debug-dir option 2025-01-27 12:38:04 +00:00
Nick Clifton
3ed5a5358c Annocheck: Fix corrupt warning message when unable to locate separate debug info files. 2025-01-23 16:49:52 +00:00
Nick Clifton
63d1c12cd1 12.83: Annocheck: Remove spurious debugging messages 2025-01-22 11:41:30 +00:00
Nick Clifton
2415dea790 Annocheck: Always look for annobin notes in separate debug info files. (RHEL-75778) 2025-01-22 09:49:29 +00:00
Nick Clifton
50892b98b6 Annocheck: Support multiple --debug-rpm options. (RHEL-73349) 2025-01-16 10:57:14 +00:00
Jakub Jelinek
b1ea65635a 12.80-2 2025-01-11 10:48:27 +01:00
Nick Clifton
ad8d2bb481 Annocheck: Add support for sys-root'ed glibc packages.
Resolves: RHEL-71296
2024-12-13 16:04:32 +00:00
Nick Clifton
8174c433db GCC Plugin: Tidy up use of gcc's diagnoatic headers. Testsuite: Use configured compiler when running tests.
Resolves: PR 32429
2024-12-10 11:03:32 +00:00
Nick Clifton
3366463083 GCC Plugin: Fix building with gcc 15. 2024-12-09 17:03:30 +00:00
Nick Clifton
66d77f6d27 Annocheck: Fix overly long debug messages. 2024-11-15 11:02:49 +00:00
Nick Clifton
bfeba1a32c Annocheck: Rename rwx-seg test to load-segments. Add more checks. Add check for gaps as a future fail.
Annocheck: Add --no-allow-excpetions to disable exceptions for known special binaries.
Annocheck: Add --enable-future to enable future fail components in normal tests.
Annocheck: Fix bug preventing the inclusion of the rpm name in reports.
2024-11-15 10:15:41 +00:00
Nick Clifton
20e56a3c65 Annocheck: Add more exceptions for gcc binaries. (RHEL-33365)
Annocheck: Add --skip-passes option.
2024-11-12 08:51:17 +00:00
Nick Clifton
a136ae0fec Annocheck: Add exceptions for gcc binaries. (RHEL-33365) 2024-11-06 09:00:24 +00:00
Nick Clifton
58d868552b Annocheck: Skip property note test for i386 binaries created by LLVM. (#2323797) 2024-11-05 14:18:23 +00:00
Nick Clifton
c59a7e6fcd Annocheck: Skip FORTIFY and GLIBC_ASSERTIONS tests for LLVM produced binaries with unparseable DW_AT_producer attributes in their DWARF debug info. (RHEL-65411) 2024-11-01 17:07:52 +00:00
Nick Clifton
d1cb3897cd GCC Plugin: Change type of the .annobin.notes section from SHT_STRTAB to SHT_PROGBITS. 2024-10-14 11:46:45 +01:00
Nick Clifton
f14a6141ce Clang & LLVM Plugins: Include install directory in binary. (RHEL-54069) 2024-08-14 08:31:05 +01:00
Nick Clifton
7583405a16 BuiltBy: Fix seg-fault when comparing language version strings. (RHEL-53497) 2024-08-12 14:27:20 +01:00
Nick Clifton
1af9abd0da Annocheck: Stop spurious assembler warnings. (RHEL-53213) - Annocheck: Stop warnings about known gaps. (RHEL-53218) 2024-08-07 16:11:25 +01:00
Nick Clifton
723cebcb85 Annocheck: Fix stack realign test. (#2302427) 2024-08-02 12:21:43 +01:00
Nick Clifton
971ba2a8a8 Annocheck: Fix recording arguments for later re-use. 2024-07-29 14:26:39 +01:00
Nick Clifton
0e3736f8d5 GCC Plugin: Fix building AArch64 component with GCC < 11.5 2024-07-26 11:36:40 +01:00
Nick Clifton
45d3b32bb5 Annocheck: Add improvements to the builtby utility. 2024-07-22 16:41:34 +01:00
Fedora Release Engineering
8b14651d73 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 17:00:25 +00:00
Nick Clifton
66acf79a65 Annocheck: Add support for ADA binaries.
Annocheck: Add support for binaries built from more than two high level source languages.
Annocheck: Add support for object files containing no executable code.
Annocheck: Do not FAIL LLVM compiled binaries that have not been built with sanitize-cfi and/or sanitize-safe-stack.
2024-07-08 16:18:17 +01:00
Nick Clifton
ef0b5b688f Annocheck: Add support for Fortran binaries. 2024-06-26 13:14:34 +01:00
Nick Clifton
e3ef33dbab Annocheck: Add heuristic for detecting parts of the CGO runtime library. 2024-06-11 11:09:31 +01:00
Nick Clifton
259c41299f Annocheck: Add improvements for handling Clang runtime binaries. 2024-06-10 20:21:55 +01:00
Nick Clifton
d6a496d36f Annocheck: Add tweaks for mixed Rust/C binaries. Annocheck: Add more glibc source file names.
Resolves: #2284605
2024-06-04 12:59:30 +01:00
Nick Clifton
ae512e7472 Annocheck: Skip GAPS test for GO binaries. (RHEL-36308) 2024-05-20 17:02:37 +01:00
Nick Clifton
bdb24185ac Spec File: Add annobin plugin document directory to the files section. (#2279779) 2024-05-20 11:01:20 +01:00
Nick Clifton
9258b8e345 Remove spurious tabs in spec file 2024-05-15 09:40:39 +01:00
Nick Clifton
2f7d934a1b Annocheck: Remove some false positives for Rust binaries. (#2280239) 2024-05-14 13:12:09 +01:00
Nick Clifton
ccc51555db Spec File: Add the annobin source directory to the files section. (#2279779) 2024-05-09 14:57:48 +01:00
Nick Clifton
c1911b4522 Annocheck: Defer passing the branch protection test until all notes have been checked.
GCC Plugin: Add extra code for detecting the branch protection setting.  (RHEL-35958)
2024-05-09 13:32:34 +01:00
Nick Clifton
36d58767e8 Annocheck: Add OpenSSL Engine test. (PTG-319) 2024-04-25 15:37:11 +01:00
Nick Clifton
347ab12f1b Fix typo in RiscV-64 test 2024-04-23 17:06:11 +01:00
Nick Clifton
bfcebe5b7a Annocheck: Test for gaps even when only one note is present. 2024-04-23 14:01:09 +01:00
Nick Clifton
3c6b5392cb Annocheck: Skip AArch64 branch protection test for GO binaries. 2024-04-22 10:10:53 +01:00
Nick Clifton
ea27843b39 GCC Plugin: Disable active check for -Wimplicit-int for non-C sources. (#2275884) 2024-04-18 14:57:25 +01:00
Nick Clifton
f781e05bf2 Annocheck: Update heuristics for detecting glibc code in executables. 2024-04-02 12:24:49 +01:00
Nick Clifton
896c08393d Clang & LLVM Plugins: Allow environment to override fortification level. (RHEL-30579) - Spec File: Override fortification level and set it to 3. 2024-03-27 15:34:11 +00:00
Nick Clifton
303819a5ab Improve AArch64 branch protection (again) 2024-03-25 17:14:25 +00:00
Nick Clifton
47385af4e7 GCC Plugin: Fix bug extracing the value of target specific command line options. 2024-03-21 13:55:31 +00:00
Nick Clifton
5f0f6e2130 Configure: Remove check for FrontendPluginRegistry.h header as it is stored in a non-standard location on Debian systems.
Debuginfod test: Allow for the libdwfl library silently contacting the debuginfod server.
2024-03-06 11:09:08 +00:00
Nick Clifton
69b1a48d80 LLVM Plugin: Use llvm-config to get the correct paths and options for building executables.
Clang Plugin: Likewise.
Enable silent rules for most building.
Annocheck: Correctly extract DWARF attributes from DT_REL files.
2024-03-05 19:15:50 +00:00
Nick Clifton
25eb793fc6 Annocheck: Improve heuristics for locating debug info files.
Resolves: #2267097
2024-03-01 13:23:24 +00:00
Nick Clifton
0effccb8be Clang Plugin: Fix building with Clang 18. GCC Plugin: Add support for MIPS specific target functions; use .dc.a for address expressions in 64-bit ELF format notes.
Resolves PR #31414
2024-02-27 14:12:46 +00:00
Nick Clifton
73b8007cea Spec File: Remove a workaround for ppc64le. 2024-02-21 10:40:46 +00:00
Nick Clifton
f8fff3b527 fix version number in changelog entry 2024-02-20 10:42:34 +00:00
Nick Clifton
53b741aee7 Annocheck: Improve heuristic for skipping LTO and FORTIFY tests. (#2264000) 2024-02-13 10:41:58 +00:00
Nick Clifton
b33d6eb99f Annocheck: Also skip property note test for i686 binaries. (#2258571) 2024-02-09 19:44:11 +00:00
Nick Clifton
060caaa613 Annocheck: Also skip the entry point test for i686 binaries.
Resolves: #2258571
2024-01-23 11:21:43 +00:00
Fedora Release Engineering
a27178473c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 23:03:39 +00:00
Fedora Release Engineering
fd3c6e395f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 12:57:19 +00:00
Nick Clifton
d284a8fcc1 GCC Plugin: Do not use section groups with string notes. 2024-01-17 14:24:49 +00:00
Nick Clifton
14a9d08e3b Spec File: NVR bump in order to allow building in side tag. 2024-01-16 12:09:50 +00:00
Nick Clifton
9285dfc44f Annocheck: Disable cf-protection test for i686 architecture.
Resolves: #2258571
2024-01-16 11:32:07 +00:00
Nick Clifton
bcf9899fd2 Spec File: NVR bump in order to allow building in side tag. 2024-01-15 10:53:17 +00:00
Nick Clifton
7e0b254b14 temporarily disable hard gcc version check 2024-01-15 10:05:28 +00:00
Nick Clifton
7c96faca28 NVR bump to allow rebuild in side tag 2024-01-15 09:21:52 +00:00
Nick Clifton
8f0126e8de Spec File: Do not install annocheck.1.gz when annocheck is disabled 2024-01-11 15:27:40 +00:00
Nick Clifton
74b0aa2a4f Annocheck: Improve detection of FIPS compliant GO binaries. 2024-01-04 15:00:28 +00:00
Nick Clifton
0fb7998b16 GCC Plugin: Fix recording of the -Wimplicit-int and -Wimplicit-function-declaration warnings. Add active checks for when they are deliberately disabled. 2023-12-15 13:31:47 +00:00
Nick Clifton
01a58912b3 Tests: Fix implicit-values test so that it will compile with gcc 14+. 2023-12-11 13:01:20 +00:00
Nick Clifton
5e535c171f GCC Plugin: Add support for -fhardended. 2023-11-24 11:10:53 +00:00
Nick Clifton
0a315f7267 Update glibc detection heuristics for PPC64. (RHEL-16453) 2023-11-15 15:56:06 +00:00
Nick Clifton
7bfea6e7ea Fix another atexit test failure. (#2247481) 2023-11-01 16:23:37 +00:00
Nick Clifton
e6c17188a8 Fix atexit test failure. Notes: Add support for string format notes. 2023-10-30 10:12:51 +00:00
Nick Clifton
518e422ce8 GCC Plugin: Record settings of -Wstrict-flex-arrays and -fstrict-flex-arrays
Annobin: Add future test of these options.
2023-10-06 13:30:21 +01:00
Nick Clifton
820e8490c1 12.27: Add detection and reporting of the absence of -Wimplicit-int and -Wimplicit-function-declaration 2023-09-26 14:59:48 +01:00
Nick Clifton
290b9207f3 Remove redundant patch 2023-09-26 11:18:36 +01:00
Nick Clifton
9aa8c4025e LLVM Plugin: Fix building with LLVM version 17. 2023-09-06 08:26:36 +01:00
Nick Clifton
d4a01699fc GCC Plugin: Enable string note format by default. 2023-08-30 08:32:43 +01:00
Nick Clifton
b8758c2ddd Annocheck: Change GO FIPS test to look for CGO_ENABLED markers. 2023-08-04 14:13:51 +01:00
Nick Clifton
1399107c1f Annocheck: Add test for FIPS compliant GO binaries. 2023-07-31 12:41:44 +01:00
Nick Clifton
bcd8d3a6c1 Annocheck: Fix double free. (#2226749) 2023-07-26 16:09:06 +01:00
Václav Kadlčík
e1ed0f967b Move downstream tests to a separate repository
The tests have been moved to
  https://src.fedoraproject.org/tests/annobin
The move will enable more flexible downstream usage, namely
in RHEL testing.
2023-07-26 13:09:38 +02:00
Fedora Release Engineering
420e5ffe64 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:17:45 +00:00
Nick Clifton
7d937f32ea Spec File: migrated to SPDX license. (#2222112) 2023-07-18 13:13:11 +01:00
Nick Clifton
5b54cac552 Spec File: Change License field to use SPDX notation. (#2222112) 2023-07-17 13:18:39 +01:00
Nick Clifton
2b17846e9b Annocheck: Ignore AArch64 $x and $d symbols. (#2221192) 2023-07-17 10:53:34 +01:00
Nick Clifton
1652c5101a GCC Plugin: Suppress active checks for fortran sources. Improve scanning of COLLECT_GCC_OPTIONS. 2023-07-05 14:30:54 +01:00
Nick Clifton
eca718919f Remove dependency upon libiberty 2023-07-03 15:52:09 +01:00
Tom Stellard
74ac5654d6 Fix Regression/testsuite test
Rawhide now has dnf5, so we need to install dnf5-plugins for the
builddep command to work.
2023-06-29 17:25:41 +00:00
Nick Clifton
de71a8d994 Annocheck: Add detection of known parts of libstdc++-nonshared.a that contain gaps. (#2217864) 2023-06-29 15:24:28 +01:00
Nick Clifton
351368aee5 Annocheck: Ignore weak/undef function symbols when checking to see if a binary contains code. (#2217840) 2023-06-27 13:10:32 +01:00
Nick Clifton
f84a88b3c7 Annocheck: Add --suppress-version-warnings option. 2023-06-26 16:32:51 +01:00
Nick Clifton
644bc59850 Annocheck: Do not ignore separate debuginfo files that do not contain any DWARF. 2023-06-22 16:46:30 +01:00
Nick Clifton
599631e996 12.13: More tweaks to glibc detection heuristics. (#2215968) 2023-06-20 14:36:52 +01:00
Nick Clifton
91e4265352 Check for string notes in debuginfo file, even if there are ELF notes in the main file 2023-06-02 14:54:24 +01:00
Nick Clifton
6e8c98dd8f Annocheck: Add support for el10 and rhel-10 profiles. 2023-05-26 12:09:29 +01:00
Petr Písař
b92fd219d6 Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) 2023-05-22 17:37:50 +02:00
Nick Clifton
9e5f183b04 add missing patch file 2023-05-05 11:44:33 +01:00
Nick Clifton
18b154e072 Enable new string format notes 2023-05-05 11:44:05 +01:00
Nick Clifton
6a9bd4377f Improve detection and reporting of problems with Rust binaries. 2023-04-28 14:22:04 +01:00
Nick Clifton
8725f42767 Annocheck: Fix detection of missing plugin options.
Resolves: #2189492
2023-04-25 17:49:30 +01:00
Nick Clifton
6a05b5374b 12.08: Fix covscan errors and libannocheck initialisation 2023-04-25 13:10:28 +01:00
Nick Clifton
c7f9bb74d9 gcc-plugin: generate warnings about misspelt -D_FORTIFY_SOURCE and/or -D_GLIBCXX_ASSERTIONS options. 2023-04-21 13:42:16 +01:00
Nick Clifton
8e60c8613b gcc-plugin: use a bigger buffer for constructing notes. 2023-04-20 17:20:10 +01:00
Nick Clifton
666fd997c8 Fix detection of optimization level in llvm plugin. 2023-04-20 11:02:31 +01:00
Nick Clifton
45e0e60d56 annocheck: Fix seg-fault when checking for glibc components in string format notes. 2023-04-19 13:22:11 +01:00
Nick Clifton
47dc851a55 configure: Simplify. 2023-04-13 20:03:14 +01:00
Nick Clifton
126c39082f Fix Clang and LLVM plugins to work with LLVM v16.
Improve string notes.
Add environment variable for annobin plugin options.
2023-04-11 13:53:28 +01:00
Nick Clifton
6f67429132 gcc plugin: Keep ELF notes at protocol version 3. 2023-03-30 12:27:52 +01:00
Nick Clifton
52cd4f8979 Annocheck: Add a few more glibc exceptions.
Protocol: Update to version 4 - add string notes.
2023-03-29 09:52:27 +01:00
Yaakov Selkowitz
4cb3354e13 Fix RHEL build
RHEL 7+ have rpm versions which support the --undefine parameter.
2023-03-14 13:40:34 -04:00
Nick Clifton
07c77149e9 Fix NVR 2023-03-13 16:10:45 +00:00
Nick Clifton
71f22a9e68 Annocheck: Update message for LTO tests. (#2177140) 2023-03-13 16:10:02 +00:00
Nick Clifton
bbc496884e Add more exceptions for glibc functions 2023-03-08 10:07:57 +00:00
Nick Clifton
24835ca037 Another special case for glibc 2023-03-03 16:06:25 +00:00
Nick Clifton
8c78c3f165 GCC Plugin: Do not run if other plugins are active. (#2162746) 2023-02-28 10:52:07 +00:00
Václav Kadlčík
85d843af12 Remove an obsoleted option from the CI plan
TMT has obsoleted the "directory" option. We do not need to replace it
with anything, the discovery phase works still the same way.
2023-02-27 09:17:24 +01:00
Nick Clifton
1465b9cc20 Annocheck: Add code to handle glibc functions built without LTO. 2023-02-23 13:44:06 +00:00
29 changed files with 469 additions and 729 deletions

View file

@ -1,9 +1,9 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 11.09
Release: 1%{?dist}
License: GPLv3+
Version: 13.05
Release: 2%{?dist}
License: GPL-3.0-or-later AND LGPL-2.0-or-later AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND GFDL-1.3-or-later
URL: https://sourceware.org/annobin/
# Maintainer: nickc@redhat.com
# Web Page: https://sourceware.org/annobin/
@ -36,7 +36,12 @@ URL: https://sourceware.org/annobin/
# 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
#
# Update: now that we have gcc version checking support in redhat-rpm-config
# there is no longer a great need for a hard gcc version check here. Not
# enabling this check greatly simplifies the process of installing a new major
# version of gcc into the buildroot.
%global with_hard_gcc_version_requirement 0
%bcond_without plugin_rebuild
# Allow the building of annobin without using annobin itself.
@ -50,11 +55,11 @@ URL: https://sourceware.org/annobin/
#
# The default is to use plugin during rebuilds (cf BZ 1630550) but this can
# be changed because of the need to be able to rebuild annobin when a change
# to gcc breaks the version installed into the buildroot. Mote however that
# to gcc breaks the version installed into the buildroot. Note however that
# uncommenting the lines below will result in annocheck not passing the rpminspect
# tests....
# %%if %%{without plugin_rebuild}
%undefine _annotated_build
# %%undefine _annotated_build
# %%endif
#---------------------------------------------------------------------------------
@ -67,7 +72,7 @@ Source: https://nickc.fedorapeople.org/%{annobin_sources}
%global annobin_source_dir %{_usrsrc}/annobin
# Insert patches here, if needed. Eg:
# Patch01: annobin-foo.patch
# Patch01: annobin-plugin-default-string-notes.patch
#---------------------------------------------------------------------------------
@ -139,17 +144,15 @@ Provides the documentation files and example shell scripts for use with annobin.
%package tests
Summary: Test scripts and binaries for checking the behaviour and output of the annobin plugin
Requires: %{name}-docs = %{version}-%{release}
BuildRequires: make sharutils
%if %{with debuginfod}
BuildRequires: elfutils-debuginfod-client-devel
%endif
%description tests
Provides a means to test the generation of annotated binaries and the parsing
of the resulting files.
BuildRequires: make
%if %{with debuginfod}
BuildRequires: elfutils-debuginfod-client-devel
%endif
%endif
#----------------------------------------------------------------------------
@ -158,7 +161,7 @@ BuildRequires: elfutils-debuginfod-client-devel
%package annocheck
Summary: A tool for checking the security hardening status of binaries
BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel binutils-devel make
BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel make
%if %{with debuginfod}
BuildRequires: elfutils-debuginfod-client-devel
@ -175,14 +178,13 @@ hardening options.
%package libannocheck
Summary: A library for checking the security hardening status of binaries
BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel binutils-devel make
BuildRequires: gcc elfutils elfutils-devel elfutils-libelf-devel rpm-devel make
%if %{with debuginfod}
BuildRequires: elfutils-debuginfod-client-devel
%endif
Requires: %{name}-docs = %{version}-%{release}
Requires: binutils-devel
%description libannocheck
Installs the libannocheck library which uses the notes generated by the
@ -322,6 +324,10 @@ touch configure */configure Makefile.in */Makefile.in
# Similarly we do not want to rebuild the documentation.
touch doc/annobin.info
# Generate a source tarball for installation later with all the patches
# applied. This must be the last step in the prep section.
tar -C ../ -cJf ../latest-annobin.tar.xz %{name}-%{version}
#---------------------------------------------------------------------------------
%build
@ -340,8 +346,8 @@ CONFIG_ARGS="$CONFIG_ARGS --with-debuginfod"
CONFIG_ARGS="$CONFIG_ARGS --without-debuginfod"
%endif
%if %{with clangplugin}
CONFIG_ARGS="$CONFIG_ARGS --with-clang"
%if %{without clangplugin}
CONFIG_ARGS="$CONFIG_ARGS --without-clang-plugin"
%endif
%if %{without gccplugin}
@ -350,8 +356,8 @@ CONFIG_ARGS="$CONFIG_ARGS --without-gcc-plugin"
CONFIG_ARGS="$CONFIG_ARGS --with-gcc-plugin-dir=%{ANNOBIN_GCC_PLUGIN_DIR}"
%endif
%if %{with llvmplugin}
CONFIG_ARGS="$CONFIG_ARGS --with-llvm"
%if %{without llvmplugin}
CONFIG_ARGS="$CONFIG_ARGS --without-llvm-plugin"
%endif
%if %{without tests}
@ -361,34 +367,28 @@ CONFIG_ARGS="$CONFIG_ARGS --without-tests"
%if %{without annocheck}
CONFIG_ARGS="$CONFIG_ARGS --without-annocheck"
%else
# Fedora supports AArch64's -mbranch-protection=bti, RHEL does not.
%if 0%{?fedora} != 0
export CFLAGS="$CFLAGS -DAARCH64_BRANCH_PROTECTION_SUPPORTED=1"
%endif
%endif
%set_build_flags
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS %build_cflags"
export LDFLAGS="$LDFLAGS %build_ldflags"
# Set target-specific security options to be used when building the
# Clang and LLVM plugins. FIXME: There should be a better way to do
# this.
# Set target-specific options to be used when building the Clang and LLVM plugins.
# FIXME: There should be a better way to do this.
%ifarch %{ix86} x86_64
export CLANG_TARGET_OPTIONS="-fcf-protection"
%endif
%ifarch aarch64
%if 0%{?fedora} != 0
export CLANG_TARGET_OPTIONS="-mbranch-protection=standard"
%endif
%ifnarch riscv64
export CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS -flto"
%endif
%ifarch ppc ppc64 ppc64le
# FIXME: This is a workaround for a problem with the Clang C++ headers. It should not be needed.
export CLANG_TARGET_OPTIONS="-mabi=ibmlongdouble"
%endif
# Override the default fortification level used by the Clang and LLVM plugins.
export PLUGIN_FORTIFY_OPTION="-D_FORTIFY_SOURCE=3"
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CXXFLAGS="$CFLAGS" %configure ${CONFIG_ARGS} || cat config.log
@ -405,8 +405,8 @@ make -C gcc-plugin clean
BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so"
# Disable the standard annobin plugin so that we do get conflicts.
# Note - Fedora's rpm uses a different way of evaluating macros.
%if 0%{?fedora} == 0
# Note - rpm-4.10 uses a different way of evaluating macros.
%if 0%{?rhel} && 0%{?rhel} < 7
OPTS="$(rpm --eval '%undefine _annotated_build %build_cflags %build_ldflags')"
%else
OPTS="$(rpm --undefine=_annotated_build --eval '%build_cflags %build_ldflags')"
@ -422,12 +422,14 @@ rm %{_tmppath}/tmp_annobin.so
%if %{with clangplugin}
cp clang-plugin/annobin-for-clang.so %{_tmppath}/tmp_annobin.so
make -C clang-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS"
# To enable verbose more in the plugin append the following: ANNOBIN="verbose"
make -C clang-plugin clean all CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS $BUILD_FLAGS" PLUGIN_INSTALL_DIR=%{clang_plugin_dir}
%endif
%if %{with llvmplugin}
cp llvm-plugin/annobin-for-llvm.so %{_tmppath}/tmp_annobin.so
make -C llvm-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS"
# To enable verbose more in the plugin append the following: ANNOBIN_VERBOSE="true"
make -C llvm-plugin clean all CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS $BUILD_FLAGS" PLUGIN_INSTALL_DIR=%{llvm_plugin_dir}
%endif
# endif for %%if {with_plugin_rebuild}
@ -455,27 +457,38 @@ cat `gcc --print-file-name=rpmver` > %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR}/%{av
# Also install a copy of the sources into the build tree.
mkdir -p %{buildroot}%{annobin_source_dir}
cp %{_sourcedir}/%{annobin_sources} %{buildroot}%{annobin_source_dir}/latest-annobin.tar.xz
cp ../latest-annobin.tar.xz %{buildroot}%{annobin_source_dir}/latest-annobin.tar.xz
%endif
rm -f %{buildroot}%{_infodir}/dir
# When annocheck is disabled, annocheck.1.gz will still be generated, remove it.
%if %{without annocheck}
rm -f %{_mandir}/man1/annocheck.1.gz
%endif
#---------------------------------------------------------------------------------
%if %{with tests}
%check
# Change the following line to "make check || :" on RHEL7 or if you need to see the
# test suite logs in order to diagnose a test failure.
make check
# The first "make check" is run with "|| :" so that we can capture any logs
# from failed tests. The second "make check" is there so that the build
# will fail if any of the tests fail.
make check || :
if [ -f tests/test-suite.log ]; then
cat tests/test-suite.log
fi
# If necessary use uuencode to preserve test binaries here. For example:
# uuencode tests/tmp_atexit/atexit.strip atexit.strip
make check
%endif
#---------------------------------------------------------------------------------
%files docs
%license COPYING3 LICENSE
%dir %{_datadir}/doc/annobin-plugin
%exclude %{_datadir}/doc/annobin-plugin/COPYING3
%exclude %{_datadir}/doc/annobin-plugin/LICENSE
%doc %{_datadir}/doc/annobin-plugin/annotation.proposal.txt
@ -505,6 +518,7 @@ fi
%{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so.0
%{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so.0.0.0
%{ANNOBIN_GCC_PLUGIN_DIR}/%{aver}
%dir %{annobin_source_dir}
%{annobin_source_dir}/latest-annobin.tar.xz
%endif
@ -522,6 +536,418 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 13.05-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Thu Jan 15 2026 Nick Clifton <nickc@redhat.com> - 13.05-1
- Annocheck: Add .fc44 to list of known rpm file extensions.
* Sat Dec 20 2025 Jakub Jelinek <jakub@redhat.com> - 13.04-3
- NVR bump to allow rebuild for new GCC in a side-tag.
* Sat Dec 20 2025 Jakub Jelinek <jakub@redhat.com> - 13.04-2
- NVR bump to allow rebuild for new GCC in a side-tag.
* Thu Dec 18 2025 Nick Clifton <nickc@redhat.com> - 13.04-1
- Annocheck: Fix compile time warnings from GCC-15 re: strchr returning a const char *.
* Wed Nov 05 2025 Nick Clifton <nickc@redhat.com> - 13.03-1
- Annocheck: Skip production test for gcc libraries. (RHEL-123175)
* Fri Oct 31 2025 Nick Clifton <nickc@redhat.com> - 13.02-1
- Annocheck: Update heuristic to detect gcc libraries. (RHEL-124869)
* Thu Oct 23 2025 Nick Clifton <nickc@redhat.com> - 13.01-1
- Annocheck: Change FAIL for binaries built by a cross compiler to a MAYBE. (RHEL-123175)
* Wed Aug 06 2025 Nick Clifton <nickc@redhat.com> - 12.99-1
- Annocheck: Improve detection of glibc static maths libraries. (RHEL-107470)
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 12.98-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jul 04 2025 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 12.98-1
- Improve configure and meson files for consistent builds.
* Thu Jun 19 2025 Nick Clifton <nickc@redhat.com> - 12.97-1
- Annocheck: Delete the temporary debug info directory after the tests have finished.
* Wed Jun 04 2025 Nick Clifton <nickc@redhat.com> - 12.96-1
- Annocheck: Fix bugs in debug rpm location code. Add more glibc exceptions. (RHEL-95216)
* Thu May 15 2025 Nick Clifton <nickc@redhat.com> - 12.95-1
- Annocheck: Improve performance with multiple debug info files and multiple files to scan. (#2366180)
* Tue May 13 2025 Nick Clifton <nickc@redhat.com> - 12.94-1
- Annocheck: Update heuristic for detecting gcc files to cope with gcc 15. (#2365824)
* Mon Mar 17 2025 Nick Clifton <nickc@redhat.com> - 12.93-1
- Annocheck: Fix test for GO revision. (RHEL-56031)
* Fri Feb 14 2025 Nick Clifton <nickc@redhat.com> - 12.92-1
- Annocheck: Do not rely upon libelf's ability to detect links to separate debuginfo files. (RHEL-79264)
* Thu Feb 13 2025 Nick Clifton <nickc@redhat.com> - 12.91-1
- Annocheck: Fix resource leak. (RHEL-79253)
* Wed Feb 12 2025 Nick Clifton <nickc@redhat.com> - 12.90-1
- Annocheck: Fix double free. Add special handling for COMBOOT modules.
* Tue Feb 11 2025 Nick Clifton <nickc@redhat.com> - 12.89-1
- Annocheck: Improve diagnostics when a separate debug info file cannot be found.
* Mon Feb 03 2025 Nick Clifton <nickc@redhat.com> - 12.88-1
- Annocheck: Look for -fstack-clash-protection in DW_AT_producer string. (RHEL-77328)
* Tue Jan 28 2025 Nick Clifton <nickc@redhat.com> - 12.87-1
- Annocheck: Fix locating string notes (again). Add exception for glibc benchmark tests. (RHEL-76456)
* Mon Jan 27 2025 Nick Clifton <nickc@redhat.com> - 12.86-1
- Annocheck: Add crtoffloadtableS.o to list of known gcc binaries. (RHEL-760404)
* Mon Jan 27 2025 Nick Clifton <nickc@redhat.com> - 12.85-1
- Annocheck: Fix the --debug-dir option.
* Thu Jan 23 2025 Nick Clifton <nickc@redhat.com> - 12.84-1
- Annocheck: Fix corrupt warning message when unable to locate separate debug info files.
* Wed Jan 22 2025 Nick Clifton <nickc@redhat.com> - 12.83-1
- Annocheck: Remove spurious debugging messages.
* Wed Jan 22 2025 Nick Clifton <nickc@redhat.com> - 12.82-1
- Annocheck: Always look for annobin notes in separate debug info files. (RHEL-75778)
* Thu Jan 16 2025 Nick Clifton <nickc@redhat.com> - 12.81-1
- Annocheck: Support multiple --debug-rpm and --debug-file options. (RHEL-73349)
* Sat Jan 11 2025 Jakub Jelinek <jakub@redhat.com> - 12.80-2
- NVR bump to allow rebuild for new GCC in a side-tag.
* Fri Dec 13 2024 Nick Clifton <nickc@redhat.com> - 12.80-1
- Annocheck: Add support for sys-root'ed glibc packages. (RHEL-71296)
* Tue Dec 10 2024 Nick Clifton <nickc@redhat.com> - 12.79-1
- GCC Plugin: Tidy up use of gcc's diagnoatic headers. (#32429)
- Testsuite: Use configured compiler when running tests.
* Mon Dec 09 2024 Nick Clifton <nickc@redhat.com> - 12.78-1
- GCC Plugin: Fix building with gcc 15. (#32429)
* Fri Nov 15 2024 Nick Clifton <nickc@redhat.com> - 12.77-1
- Annocheck: Fix overly long debug messages.
* Fri Nov 15 2024 Nick Clifton <nickc@redhat.com> - 12.76-1
- Annocheck: Rename rwx-seg test to load-segments. Add more checks. Add check for gaps as a future fail.
- Annocheck: Add --no-allow-excpetions to disable exceptions for known special binaries.
- Annocheck: Add --enable-future to enable future fail components in normal tests.
- Annocheck: Fix bug preventing the inclusion of the rpm name in reports.
* Tue Nov 12 2024 Nick Clifton <nickc@redhat.com> - 12.75-1
- Annocheck: Add more exceptions for gcc binaries. (RHEL-33365)
- Annocheck: Add --skip-passes option.
* Wed Nov 06 2024 Nick Clifton <nickc@redhat.com> - 12.74-1
- Annocheck: Add exceptions for gcc binaries. (RHEL-33365)
* Tue Nov 05 2024 Nick Clifton <nickc@redhat.com> - 12.73-1
- Annocheck: Skip property note test for i386 binaries created by LLVM. (#2323797)
* Fri Nov 01 2024 Nick Clifton <nickc@redhat.com> - 12.72-1
- Annocheck: Skip FORTIFY and GLIBC_ASSERTIONS tests for LLVM produced binaries with unparseable DW_AT_producer attributes in their DWARF debug info. (RHEL-65411)
* Mon Oct 14 2024 Nick Clifton <nickc@redhat.com> - 12.71-1
- GCC Plugin: Change type of the .annobin.notes section from SHT_STRTAB to SHT_PROGBITS.
* Tue Aug 13 2024 Nick Clifton <nickc@redhat.com> - 12.70-1
- Clang & LLVM Plugins: Include install directory in binary. (RHEL-54069)
* Mon Aug 12 2024 Nick Clifton <nickc@redhat.com> - 12.69-1
- BuiltBy: Fix seg-fault when comparing language version strings. (RHEL-53497)
* Wed Aug 07 2024 Nick Clifton <nickc@redhat.com> - 12.67-1
- Annocheck: Stop spurious assembler warnings. (RHEL-53213)
- Annocheck: Stop warnings about known gaps. (RHEL-53218)
* Fri Aug 02 2024 Nick Clifton <nickc@redhat.com> - 12.66-1
- Annocheck: Fix stack realign test. (#2302427)
* Mon Jul 29 2024 Nick Clifton <nickc@redhat.com> - 12.65-1
- Annocheck: Fix recording arguments for later re-use. (RHEL-50802)
* Fri Jul 26 2024 Nick Clifton <nickc@redhat.com> - 12.64-1
- GCC Plugin: Fix building AArch64 components with gcc earlier than 11.3.
* Mon Jul 22 2024 Nick Clifton <nickc@redhat.com> - 12.63-1
- Annocheck: Add improvements to the builtby utility.
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.62-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jul 08 2024 Nick Clifton <nickc@redhat.com> - 12.62-1
- Annocheck: Add support for ADA binaries.
- Annocheck: Add support for binaries built from more than two high level source languages.
- Annocheck: Add support for object files containing no executable code.
- Annocheck: Do not FAIL LLVM compiled binaries that have not been built with sanitize-cfi and/or sanitize-safe-stack.
* Wed Jun 26 2024 Nick Clifton <nickc@redhat.com> - 12.60-1
- Annocheck: Add support for Fortran binaries.
* Tue Jun 11 2024 Nick Clifton <nickc@redhat.com> - 12.59-1
- Annocheck: Add heuristic for detecting parts of the CGO runtime library.
* Mon Jun 10 2024 Nick Clifton <nickc@redhat.com> - 12.58-1
- Annocheck: Add improvements for handling Clang runtime binaries.
* Tue Jun 04 2024 Nick Clifton <nickc@redhat.com> - 12.57-1
- Annocheck: Add tweaks for mixed Rust/C binaries. (#2284605)
- Annocheck: Add more glibc source file names.
* Mon May 20 2024 Nick Clifton <nickc@redhat.com> - 12.55-1
- Annocheck: Skip GAPS test for GO binaries. (RHEL-36308)
* Mon May 20 2024 Nick Clifton <nickc@redhat.com> - 12.54-2
- Spec File: Add annobin plugin document directory to the files section. (#2279779)
* Tue May 14 2024 Nick Clifton <nickc@redhat.com> - 12.54-1
- Annocheck: Remove some false positives for Rust binaries. (#2280239)
* Thu May 09 2024 Nick Clifton <nickc@redhat.com> - 12.53-2
- Spec File: Add the annobin source directory to the files section. (#2279779)
* Thu May 09 2024 Nick Clifton <nickc@redhat.com> - 12.53-1
- Annocheck: Defer passing the branch protection test until all notes have been checked.
- GCC Plugin: Add extra code for detecting the branch protection setting. (RHEL-35958)
* Thu Apr 25 2024 Nick Clifton <nickc@redhat.com> - 12.52-1
- Annocheck: Add OpenSSL Engine test. (PTG-319)
* Tue Apr 23 2024 Nick Clifton <nickc@redhat.com> - 12.51-1
- Annocheck: Test for gaps even when only one note is present.
* Mon Apr 22 2024 Nick Clifton <nickc@redhat.com> - 12.50-1
- Annocheck: Skip AArch64 branch protection test for GO binaries.
* Thu Apr 18 2024 Nick Clifton <nickc@redhat.com> - 12.49-1
- GCC Plugin: Disable active check for -Wimplicit-int for non-C sources. (#2275884)
- Annocheck: Ignore stack checks for AMD GPU binaries.
- Annocheck: Do not produce FAIL result for i686 binaries in the RHEL-10 profile.
- Annocheck: Test for __stack_chk_guard being writeable.
* Tue Apr 02 2024 Nick Clifton <nickc@redhat.com> - 12.48-1
- Annocheck: Update heuristics for detecting glibc code in executables. (RHEL-30579)
* Wed Mar 27 2024 Nick Clifton <nickc@redhat.com> - 12.47-1
- Clang & LLVM Plugins: Allow environment to override fortification level. (RHEL-30579)
- Spec File: Override fortification level and set it to 3.
* Mon Mar 25 2024 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 12.46-1
- Annocheck: Improve detection of -mbranch-protection option.
- Clang Plugin: Add global-file-syms option.
- LLVM Plugin: Add global-file-syms option.
- Plugins: Add support for ANNOBIN environment variable.
* Thu Mar 21 2024 Nick Clifton <nickc@redhat.com> - 12.45-1
- GCC Plugin: Fix bug extracing the value of target specific command line options.
* Wed Mar 06 2024 Nick Clifton <nickc@redhat.com> - 12.44-1
- Configure: Remove check for FrontendPluginRegistry.h header as it is stored in a non-standard location on Debian systems.
- Debuginfod test: Allow for the libdwfl library silently contacting the debuginfod server.
* Tue Mar 05 2024 Nick Clifton <nickc@redhat.com> - 12.43-1
- LLVM Plugin: Use llvm-config to get the correct paths and options for building executables.
- Clang Plugin: Likewise.
- Enable silent rules for most building.
- Annocheck: Correctly extract DWARF attributes from DT_REL files.
* Fri Mar 01 2024 Nick Clifton <nickc@redhat.com> - 12.42-1
- Annocheck: Improve heuristics for locating debug info files. (#2267097)
- Configure: Harmonize configure options.
* Tue Feb 27 2024 Nick Clifton <nickc@redhat.com> - 12.41-1
- Clang Plugin: Fix building with Clang 18. (#31414)
- GCC Plugin: Add support for MIPS specific target functions.
- GCC Plugin: Use .dc.a for address expressions in 64-bit ELF format notes.
* Tue Feb 20 2024 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 12.40-2
- Spec File: Remove a workaround for ppc64le.
* Tue Feb 13 2024 Nick Clifton <nickc@redhat.com> - 12.40-1
- Annocheck: Improve heuristic for skipping LTO and FORTIFY tests. (#2264000)
* Fri Feb 09 2024 Nick Clifton <nickc@redhat.com> - 12.39-1
- Annocheck: Also skip property note test for i686 binaries. (#2258571)
* Tue Jan 23 2024 Nick Clifton <nickc@redhat.com> - 12.38-1
- Annocheck: Also skip the entry point test for i686 binaries. (#2258571)
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.37-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.37-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 17 2024 Nick Clifton <nickc@redhat.com> - 12.37-1
- GCC Plugin: Do not use section groups with string format notes.
* Tue Jan 16 2024 Nick Clifton <nickc@redhat.com> - 12.36-2
- Spec File: NVR bump in order to allow building in side tag.
* Tue Jan 16 2024 Nick Clifton <nickc@redhat.com> - 12.36-1
- Annocheck: Disable cf-protection test for i686 architecture. (#2258571)
* Mon Jan 15 2024 Nick Clifton <nickc@redhat.com> - 12.35-4
- Spec File: NVR bump in order to allow building in side tag.
* Mon Jan 15 2024 Nick Clifton <nickc@redhat.com> - 12.35-3
- Spec File: Disable hard gcc check in order to allow builds with new version of gcc.
* Thu Jan 11 2024 Songsong Zhang <U2FsdGVkX1@gmail.com> - 12.35-2
- Spec File: Do not install annocheck.1.gz when annocheck is disabled.
* Thu Jan 04 2024 Nick Clifton <nickc@redhat.com> - 12.35-1
- Annocheck: Improve detection of FIPS compliant GO binaries.
* Fri Dec 15 2023 Nick Clifton <nickc@redhat.com> - 12.34-1
- GCC Plugin: Fix recording of the -Wimplicit-int and -Wimplicit-function-declaration warnings. Add active checks for when they are deliberately disabled.
* Mon Dec 11 2023 Nick Clifton <nickc@redhat.com> - 12.33-1
- Tests: Fix implicit-values test so that it will compile with gcc 14+.
* Fri Nov 24 2023 Nick Clifton <nickc@redhat.com> - 12.32-1
- GCC Plugin: Add support for -fhardended.
* Wed Nov 15 2023 Nick Clifton <nickc@redhat.com> - 12.31-1
- Update glibc detection heuristics for PPC64. (RHEL-16453)
* Wed Nov 01 2023 Nick Clifton <nickc@redhat.com> - 12.30-1
- Fix another atexit test failure. (#2247481)
* Mon Oct 30 2023 Nick Clifton <nickc@redhat.com> - 12.29-1
- Fix atexit test failure.
- Notes: Add support for string format notes.
* Fri Oct 06 2023 Nick Clifton <nickc@redhat.com> - 12.28-1
- GCC Plugin: Record settings of -Wstrict-flex-arrays and -fstrict-flex-arrays
- Annobin: Add future test of these options.
* Tue Sep 26 2023 Nick Clifton <nickc@redhat.com> - 12.27-1
- GCC Plugin: Record settings of -Wimplicit-int and -Wimplicit-function-declaration.
- Annobin: Add test for these warnings.
* Wed Sep 06 2023 Nick Clifton <nickc@redhat.com> - 12.26-1
- LLVM Plugin: Fix building with LLVM version 17.
* Wed Aug 30 2023 Nick Clifton <nickc@redhat.com> - 12.25-1
- GCC Plugin: Enable string note format by default.
* Fri Aug 04 2023 Nick Clifton <nickc@redhat.com> - 12.24-1
- Annocheck: Change GO FIPS test to look for CGO_ENABLED markers.
* Mon Jul 31 2023 Nick Clifton <nickc@redhat.com> - 12.23-1
- Annocheck: Add test for FIPS compliant GO binaries.
* Wed Jul 26 2023 Nick Clifton <nickc@redhat.com> - 12.22-1
- Annocheck: Fix double free. (#2226749)
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 12.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 18 2023 Nick Clifton <nickc@redhat.com> - 12.21-1
- Spec File: migrated to SPDX license. (#2222112)
* Mon Jul 17 2023 Nick Clifton <nickc@redhat.com> - 12.20-2
- Spec File: Change License field to use SPDX notation. (#2222112)
* Mon Jul 17 2023 Nick Clifton <nickc@redhat.com> - 12.20-1
- Annocheck: Ignore AArch64 $x and $d symbols. (#2221192)
* Wed Jul 05 2023 Nick Clifton <nickc@redhat.com> - 12.19-1
- GCC Plugin: Suppress active checks for fortran sources. Improve scanning of COLLECT_GCC_OPTIONS.
* Thu Jun 29 2023 Nick Clifton <nickc@redhat.com> - 12.18-1
- Annocheck: Remove dependency upon binutils-devel.
* Thu Jun 29 2023 Nick Clifton <nickc@redhat.com> - 12.17-1
- Annocheck: Add detection of known parts of libstdc++-nonshared.a that contain gaps. (#2217864)
* Tue Jun 27 2023 Nick Clifton <nickc@redhat.com> - 12.16-1
- Annocheck: Ignore weak/undef function symbols when checking to see if a binary contains code. (#2217840)
* Mon Jun 26 2023 Nick Clifton <nickc@redhat.com> - 12.15-1
- Annocheck: Add --suppress-version-warnings option.
* Thu Jun 22 2023 Nick Clifton <nickc@redhat.com> - 12.14-1
- Annocheck: Do not ignore separate debuginfo files that do not contain any DWARF. (#2144553)
* Tue Jun 20 2023 Nick Clifton <nickc@redhat.com> - 12.13-1
- Annocheck: Ignore /dev/null filename in string notes.
- Annocheck: More tweaks to glibc detection heuristics. (#2215968)
* Thu Jun 01 2023 Nick Clifton <nickc@redhat.com> - 12.12-1
- Annocheck: Check for string notes in separate debug info files. (#2211694)
* Fri May 26 2023 Petr Pisar <ppisar@redhat.com> - 12.11-1
- Annocheck: Add support for el10 and rhel-10 profiles. (RHEL-526)
* Mon May 22 2023 Petr Pisar <ppisar@redhat.com> - 12.10-3
- Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19)
* Fri May 05 2023 Nick Clifton <nickc@redhat.com> - 12.10-2
- GCC Plugin: Default to generating string format notes. (Experimental)
* Fri Apr 28 2023 Nick Clifton <nickc@redhat.com> - 12.10-1
- Annocheck: Suppress more tests for Rust binaries.
* Tue Apr 25 2023 Nick Clifton <nickc@redhat.com> - 12.09-1
- Annocheck: Fix detection of missing plugin options. (#2189492)
* Tue Apr 25 2023 Nick Clifton <nickc@redhat.com> - 12.08-1
- Fix generation of auto-generated files.
- Fix covscan reported errors.
* Fri Apr 21 2023 Nick Clifton <nickc@redhat.com> - 12.07-1
- gcc-plugin: generate warnings about misspelt -D_FORTIFY_SOURCE and/or -D_GLIBCXX_ASSERTIONS options.
* Thu Apr 20 2023 Nick Clifton <nickc@redhat.com> - 12.06-1
- gcc-plugin: use a bigger buffer for constructing notes.
* Wed Apr 19 2023 Nick Clifton <nickc@redhat.com> - 12.05-1
- llvm-plugin: Fix detection of optimization level. Improve test.
- clang-plugin: Improve test.
* Mon Apr 17 2023 Nick Clifton <nickc@redhat.com> - 12.04-1
- configure: More improvements.
- annocheck: Fix seg-fault when checking for glibc components in string format notes.
* Thu Apr 13 2023 Nick Clifton <nickc@redhat.com> - 12.03-1
- configure: Simplify.
* Tue Apr 11 2023 Nick Clifton <nickc@redhat.com> - 12.02-1
- gcc plugin: Add filenames to string notes. Allow use of ANNOBIN environment variable.
- llvm plugin: Add workaround for building with LLVM-16.
- clang plugin: Fix for building with Clang-16.
* Thu Mar 30 2023 Nick Clifton <nickc@redhat.com> - 12.01-1
- gcc plugin: Keep ELF notes at protocol version 3.
* Tue Mar 28 2023 Nick Clifton <nickc@redhat.com> - 12.00-1
- Protocol Version 4: String format notes.
* Mon Mar 13 2023 Nick Clifton <nickc@redhat.com> - 11.14-1
- Annocheck: Update message for LTO tests. (#2177140)
* Wed Mar 08 2023 Nick Clifton <nickc@redhat.com> - 11.13-1
- Annocheck: Add even more code to handle another glibc function built without LTO.
* Fri Mar 03 2023 Nick Clifton <nickc@redhat.com> - 11.12-1
- Annocheck: Add code to handle another glibc function built without LTO.
* Tue Feb 28 2023 Nick Clifton <nickc@redhat.com> - 11.11-1
- GCC Plugin: Do not run if other plugins are active. (#2162746)
* Thu Feb 23 2023 Nick Clifton <nickc@redhat.com> - 11.10-1
- Annocheck: Add code to handle glibc functions built without LTO.
* Thu Feb 02 2023 Nick Clifton <nickc@redhat.com> - 11.09-1
- Libannocheck: Fix thinko in debugging code.
- Annocheck: Fix LTO test.
@ -822,7 +1248,7 @@ fi
* Fri Dec 17 2021 Nick Clifton <nickc@redhat.com> - 10.39-1
- Annocheck: Add /usr/lib/ld-linux-aarch64.so.1 to the list of known glibc binaries. (#2033255)
- Doc: Note that ENDBR is only needed as the landing pad for indirect branches/calls. (#28705)
- Spec File: Store full gcc version release string in plugin info file. (#2030671)
- Spec File: Store full gcc version release string in plugin info file. (#2030671)
* Tue Dec 14 2021 Nick Clifton <nickc@redhat.com> - 10.38-1
- Annocheck: Add special case for x86_64 RHEL-7 gaps. (#2031133)

View file

@ -1,6 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
url: https://src.fedoraproject.org/tests/annobin.git
execute:
how: tmt

View file

@ -1 +1 @@
SHA512 (annobin-11.09.tar.xz) = 41bf99d07110630f5b8773eb1e83d3d7c1355dae531d66f66721d45b06d9e0da01b447e5279480d62516303fdce6b9d0f1c8e8f6d541c42a590ce97b6c79f996
SHA512 (annobin-13.05.tar.xz) = 07bc023018e3f456fae470b271915bde2e1ff367ee8bb58adb74255023ae59e8c45ced8e4bd2130bf8a496966d986bca9866e054019f6ca4660d78c129b6532f

View file

@ -1,2 +0,0 @@
The test's Makefiles are not used in Fedora CI infrastructure. But are kept here
for backward compatibility with traditional beakerlib test harness in RHEL.

View file

@ -1,18 +0,0 @@
summary: Test for BZ#1958954 (annobin fails to skip endbr64 entry point check)
description: |
Bug summary: annobin fails to skip endbr64 entry point check for shared objects
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1958954
contact:
- Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-annocheck
- annobin-plugin-gcc
- gcc
- redhat-rpm-config
duration: 48h
extra-summary: /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check
extra-task: /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check

View file

@ -1,51 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check
# Description: Test for BZ#1958954 (annobin fails to skip endbr64 entry point check)
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "echo 'void f1(void) {}' > f1.c"
rlRun "echo 'void f2(void) {}' > f2.c"
rlRun "gcc `rpm --eval %build_cflags` -fpic -c f1.c"
rlRun "gcc `rpm --eval %build_cflags` -fpic -c f2.c"
rlRun "gcc `rpm --eval %build_ldflags` -shared f1.o f2.o"
rlRun "annocheck -v --skip-lto a.out"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,14 +0,0 @@
summary: identify
description: ''
contact:
- Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
recommend:
- annobin-plugin-gcc
- annobin-annocheck
duration: 48h
extra-summary: /tools/annobin/Regression/identify
extra-task: /tools/annobin/Regression/identify

View file

@ -1,43 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/identify
# Description: identify
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartTest
rlRun "rpm -qa | fgrep -e redhat-rpm-config -e gcc -e annobin -e binutils | sort"
rlRun "tool_v=$(annocheck --version | awk '/^annocheck: Version/ {print $3}')"
rlRun "__RPM=$(rpm --queryformat='%{name}\n' -qf $(man -w annobin))"
rlRun "rpm_v=$(rpm -q --queryformat='%{version}\n' $__RPM)"
# Following fails for annobin-8.89-2.el8
rlRun "[[ "x${tool_v}" == "x${rpm_v}." ]]"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,17 +0,0 @@
summary: lto-preprocessor-options
description: ''
contact:
- Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-plugin-gcc
- annobin-annocheck
- redhat-rpm-config
- gcc
- redhat-rpm-config
duration: 48h
extra-summary: /tools/annobin/Regression/lto-preprocessor-options
extra-task: /tools/annobin/Regression/lto-preprocessor-options

View file

@ -1,44 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/lto-preprocessor-options
# Description: lto-preprocessor-options
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2020 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartTest
b=`mktemp`
rlRun "rpm -qa | fgrep -e redhat-rpm-config -e gcc -e annobin -e binutils | sort"
rlRun "cflags=\"$(rpm --eval '%build_cflags')\""
rlRun "ldflags=\"$(rpm --eval '%build_ldflags')\""
rlRun "echo 'int main (void) { return 0; }' | gcc -xc -o $b $cflags $ldflags -flto - "
rlRun "annocheck -v $b"
rm $b
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,16 +0,0 @@
summary: missing-check-for-x86-property-note-content
description: |
Bug summary: annobin: Missing check for contents of x86 property note
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1991931
contact: Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-annocheck
duration: 48h
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1991931
extra-summary: /tools/annobin/Regression/missing-check-for-x86-property-note-content
extra-task: /tools/annobin/Regression/missing-check-for-x86-property-note-content

View file

@ -1,40 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/missing-check-for-x86-property-note-content
# Description: missing-check-for-x86-property-note-content
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartTest
rlRun "annocheck main" 1
rlRun "annocheck --fixed-format-messages main | \
grep '^Hardened: FAIL: test: cf-protection file: main.$'"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,16 +0,0 @@
summary: processing-params-in-reverse-order
description: |
Bug summary: annocheck processes (reports) parameters in reverse order
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1988714
contact: Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-annocheck
duration: 48h
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1988714
extra-summary: /tools/annobin/Regression/processing-params-in-reverse-order
extra-task: /tools/annobin/Regression/processing-params-in-reverse-order

View file

@ -1,42 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/processing-params-in-reverse-order
# Description: processing-params-in-reverse-order
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartTest
rlRun "TMP=$(mktemp)"
rlRun "annocheck --verbose --skip-all --test-stack-prot /bin/bash /bin/cat |& tee $TMP"
rlRun "fgrep -i /bin/ $TMP | head -1 | fgrep /bash"
rlRun "fgrep -i /bin/ $TMP | tail -1 | fgrep /cat"
rlRun "rm -f $TMP"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,18 +0,0 @@
summary: segv-when-processing-multiple-params-incl-symlink
description: |
Bug summary: annocheck segfaults sometimes when processing multiple parameters and symlink is involved
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1988715
contact: Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-plugin-gcc
- annobin-annocheck
- libstdc++
duration: 48h
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1988715
extra-summary: /tools/annobin/Regression/segv-when-processing-multiple-params-incl-symlink
extra-task: /tools/annobin/Regression/segv-when-processing-multiple-params-incl-symlink

View file

@ -1,44 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/segv-when-processing-multiple-params-incl-symlink
# Description: segv-when-processing-multiple-params-incl-symlink
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartTest
# This tries to test https://bugzilla.redhat.com/show_bug.cgi?id=1988715#c0
# keeping in mind that annocheck will evolve in the future, along its
# rules / policies, and the surrounding OS will evolve too. This test
# shouldn't report false positives though.
rlRun "rpm -qf /usr/lib64/libstdc++.so*"
rlRun "annocheck --follow-links --skip-all /usr/lib64/libstdc++.so*"
rlRun "annocheck --ignore-links --skip-all /usr/lib64/libstdc++.so*"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,24 +0,0 @@
summary: testsuite
description: ''
contact:
- Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-plugin-gcc
- annobin-annocheck
- binutils-devel
- bzip2-devel
- dnf
- elfutils
- elfutils-devel
- gcc-c++
- gcc-plugin-devel
- make
- rpm-build
- rpm-devel
duration: 48h
extra-summary: /tools/annobin/Regression/testsuite
extra-task: /tools/annobin/Regression/testsuite

View file

@ -1,85 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Regression/testsuite
# Description: testsuite
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="${PACKAGE:-$(rpm -qf --queryformat=%{name} $(man -w annobin))}"
export PACKAGE
GCC="${GCC:-$(which gcc)}"
rlJournalStart
rlPhaseStartSetup
rlLogInfo "PACKAGES=$PACKAGES"
rlLogInfo "REQUIRES=$REQUIRES"
rlLogInfo "COLLECTIONS=$COLLECTIONS"
rlLogInfo "X_SCLS=$X_SCLS"
rlLogInfo "GCC=$GCC"
rlRun "rpm -qa | fgrep -e redhat-rpm-config -e gcc -e annobin -e binutils | sort"
# In case more than one devtoolset- or gcc-toolset -build package is
# installed (they can co-exist from the packaging persp, but their
# coexistence causes unexpected results with rpm macros), then we have
# a mess of defined rpm macros coming e.g. from
# /etc/rpm/macros.gcc-toolset-10-config
# /etc/rpm/macros.gcc-toolset-9-config etc. To have just the needed
# macros (respective to given SCL under test) defined without
# uninstalling unneeded RPMs, we'll need an override mechanism. The
# following assumes just one SCL *enabled* (more than one installed),
# and doesn't care of a (useless) revert:
echo ${X_SCLS} | fgrep toolset && \
rlRun "cat /etc/rpm/*${X_SCLS%\ }* > ~/.rpmmacros"
rlAssertRpm $PACKAGE
rlRun "TMP=\$(mktemp -d)"
rlRun "pushd $TMP"
rlFetchSrcForInstalled $PACKAGE
rlRun "dnf builddep -y *src.rpm"
rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm"
rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/annobin.spec"
rlPhaseEnd
rlPhaseStartTest
rlRun "pushd BUILD/annobin-*"
set -o pipefail
rlRun "make check |& tee $TMP/check.log"
rlRun -l "grep '^PASS:' $TMP/check.log" 0
rlRun -l "grep '^FAIL:' $TMP/check.log" 1
PASSCOUNT=$(grep '^PASS:' $TMP/check.log | wc -l)
rlRun "[[ $PASSCOUNT -ge 7 ]]"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TMP"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,17 +0,0 @@
summary: Test for BZ#1973981 (annocheck silently ignores any file parameter)
description: |
Bug summary: annocheck silently ignores any file parameter beyond 256
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1973981
contact: Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-plugin-gcc
- annobin-annocheck
duration: 48h
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1973981
extra-summary: /tools/annobin/Sanity/annocheck-silently-ignores-any-file-parameter
extra-task: /tools/annobin/Sanity/annocheck-silently-ignores-any-file-parameter

View file

@ -1,55 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Sanity/annocheck-silently-ignores-any-file-parameter
# Description: Test for BZ#1973981 (annocheck silently ignores any file parameter)
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TMP=$(mktemp -d)"
rlRun "pushd $TMP"
rlPhaseEnd
rlPhaseStartTest
for i in `seq 0 299`; do touch ${i}.sample; done
samplecnt=$(ls *.sample | wc -l)
testcnt=$(ls *.sample | \
xargs annocheck |& \
grep -F \
-e '.sample: unable to read magic number' \
-e '.sample: is not an ELF format file' \
| wc -l)
rlRun "test $samplecnt -eq 300"
rlRun "test $testcnt -eq 300"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TMP"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,5 +0,0 @@
#include <stdio.h>
void hello() {
printf("Hello World\n");
}

View file

@ -1,5 +0,0 @@
#include <iostream>
void hello() {
std::cout << "Hello World\n";
}

View file

@ -1,6 +0,0 @@
void hello();
int main(int argc, char **argv) {
hello();
return 0;
}

View file

@ -1,6 +0,0 @@
void hello();
int main(int argc, char **argv) {
hello();
return 0;
}

View file

@ -1,17 +0,0 @@
summary: gcc-fedora-flags
description: ''
contact:
- Tom Stellard <tstellar@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
recommend:
- gcc
- gcc-c++
- annobin
- annobin-annocheck
- redhat-rpm-config
duration: 1h
extra-summary: /tools/annobin/Sanity/gcc-fedora-flags
extra-task: /tools/annobin/Sanity/gcc-fedora-flags

View file

@ -1,40 +0,0 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
set -x
default_cflags=`rpm -E %{build_cflags}`
default_cxxflags=`rpm -E %{build_cxxflags}`
default_ldflags=`rpm -E %{build_ldflags}`
cflags=`rpm -D '%toolchain gcc' -E %{build_cflags}`
cxxflags=`rpm -D '%toolchain gcc' -E %{build_cxxflags}`
ldflags=`rpm -D '%toolchain gcc' -E %{build_ldflags}`
set +x
rlJournalStart
rlPhaseStartTest
rlRun "rpm -qa | fgrep -e redhat-rpm-config -e gcc -e annobin -e binutils | sort"
rlRun "test \"$default_cflags\" = \"$cflags\""
rlRun "test \"$default_cxxflags\" = \"$cxxflags\""
rlRun "test \"$default_ldflags\" = \"$ldflags\""
rlRun "gcc $cflags -o hello.o -c hello.c"
rlRun "annocheck hello.o"
rlRun "gcc $cflags -o main.o -c main.c"
rlRun "gcc $ldflags -o hello main.o hello.o"
rlRun "annocheck hello"
rlRun "./hello | grep \"Hello World\""
rlRun "g++ $cxxflags -o hello-cpp.o -c hello.cpp"
rlRun "annocheck hello-cpp.o"
rlRun "g++ $cxxflags -o main-cpp.o -c main.cpp"
rlRun "g++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o"
rlRun "annocheck hello-cpp"
rlRun "./hello-cpp | grep \"Hello World\""
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,16 +0,0 @@
summary: smoke test for annobin plugin
description: ''
contact:
- Martin Cermak <mcermak@redhat.com>
component:
- annobin
test: ./runtest.sh
framework: beakerlib
require:
- annobin-plugin-gcc
- annobin-annocheck
- man-db
- gcc
duration: 48h
extra-summary: /tools/annobin/Sanity/smoke
extra-task: /tools/annobin/Sanity/smoke

View file

@ -1,45 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/annobin/Sanity/smoke
# Description: smoke test for annobin plugin
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="annobin"
rlJournalStart
rlPhaseStartSetup
rlRun "which gcc"
rlRun "man -w annobin"
rlRun "echo $X_SCLS"
rlPhaseEnd
rlPhaseStartTest
rlRun "rpm -qa | fgrep -e redhat-rpm-config -e gcc -e annobin -e binutils | sort"
rlRun "echo 'int main() {return 0;}' | gcc -xc -fplugin=annobin -o /dev/null -"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd