diff --git a/annobin.fortify-test.patch b/annobin.fortify-test.patch deleted file mode 100644 index 4d419ac..0000000 --- a/annobin.fortify-test.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- annobin.orig/tests/fortify-test 2022-01-10 09:50:07.005146672 +0000 -+++ annobin-10.45/tests/fortify-test 2022-01-10 10:23:56.827404265 +0000 -@@ -37,30 +37,37 @@ fi - # Now add in our newly built plugin. - OPTS+=" -fplugin=$PLUGIN" - -+# For debugging purposes, generate a linker map as well. -+OPTS+=" -Wl,-Map,fortify-test.map" -+ - start_test - --$GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe -+# Use atexit.c rather than main.c as it is bigger. -+COMMAND="$GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/atexit.c -o fortify-test.exe" -+$COMMAND - if [ $? != 0 ]; - then - echo " $TEST_NAME: FAIL: unable to compile test file" -- echo " $TEST_NAME: compile command: $GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe" -+ echo " $TEST_NAME: command: $COMMAND" - end_test - exit 1 - fi - - # Run annocheck - --SKIPS="--skip-cf-protection --skip-property-note --skip-stack-realign --skip-entry --skip-dynamic-tags --skip-lto --skip-warnings --skip-dynamic-tags --skip-not-dynamic-tags --skip-branch-protection --skip-not-branch-protection" --$ANNOCHECK main.exe $SKIPS > main.out --grep -e "Overall: FAIL" main.out -+SKIPS="--skip-all --test-fortify" -+A_COMMAND="$ANNOCHECK fortify-test.exe $SKIPS" -+$A_COMMAND > fortify-test.out -+grep -e "Overall: FAIL" fortify-test.out - if [ $? != 0 ]; - then - echo " $TEST_NAME: FAIL: compiling with -D_FORTIFY_SOURCE=2 still produces an executable that passes annocheck" -- echo " $TEST_NAME: compile command: $GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe" -- echo " $TEST_NAME: annocheck command: $ANNOCHECK main.exe $SKIPS" -+ echo " $TEST_NAME: compile command: $COMMAND" -+ echo " $TEST_NAME: annocheck command: $A_COMMAND" - echo " $TEST_NAME: annocheck output (with verbose enabled):" -- $ANNOCHECK main.exe $SKIPS --verbose -- uuencode main.exe main.exe -+ $A_COMMAND --verbose -+ uuencode fortify-test.exe fortify-test.exe -+ uuencode fortify-test.map fortify-test.map - end_test - exit 1 - fi ---- annobin.orig/gcc-plugin/annobin.cc 2022-01-10 09:50:06.991146761 +0000 -+++ annobin-10.45/gcc-plugin/annobin.cc 2022-01-10 11:31:49.507826587 +0000 -@@ -1,5 +1,5 @@ - /* annobin - a gcc plugin for annotating binary files. -- Copyright (c) 2017 - 2021 Red Hat. -+ Copyright (c) 2017 - 2022 Red Hat. - Created by Nick Clifton. - - This is free software; you can redistribute it and/or modify it -@@ -2485,6 +2485,7 @@ annobin_emit_end_symbol (const char * su - fprintf (asm_out_file, "\t.size %s%s, 0\n", annobin_current_endname, suffix); - annobin_inform (INFORM_VERBOSE, "Create symbol %s%s", annobin_current_endname, suffix); - -+#if 0 - /* If there is a bias to the start symbol, we can end up with the case where - the start symbol is after the end symbol. (If the section is empty). - Catch that and adjust the start symbol. This also pacifies eu-elflint -@@ -2509,7 +2510,8 @@ annobin_emit_end_symbol (const char * su - annobin_current_endname, suffix); - fprintf (asm_out_file, "\t.endif\n"); - } -- -+#endif -+ - fprintf (asm_out_file, "\t.popsection\n"); - } - -@@ -2774,7 +2776,7 @@ plugin_init (struct plugin_name_args * - solution is needed. */ - annobin_attach_type = group; - #if GCCPLUGIN_VERSION_MAJOR >= 11 -- if (target_start_sym_bias == 0) -+ /* if (target_start_sym_bias == 0)*/ - annobin_attach_type = link_order; - #endif - } diff --git a/annobin.spec b/annobin.spec index 036f357..f2f5ad0 100644 --- a/annobin.spec +++ b/annobin.spec @@ -1,9 +1,10 @@ Name: annobin Summary: Annotate and examine compiled binary files -Version: 10.57 -Release: 3%{?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/ # Watermark Protocol: https://fedoraproject.org/wiki/Toolchain/Watermark @@ -35,9 +36,14 @@ License: GPLv3+ # 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_with plugin_rebuild +%bcond_without plugin_rebuild # Allow the building of annobin without using annobin itself. # This is because if we are bootstrapping a new build environment we can have # a new version of gcc installed, but without a new of annobin installed. @@ -49,11 +55,11 @@ License: GPLv3+ # # 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 #--------------------------------------------------------------------------------- @@ -66,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 #--------------------------------------------------------------------------------- @@ -126,9 +132,6 @@ annotated files and reports on any missing security options. %package docs Summary: Documentation and shell scripts for use with annobin BuildArch: noarch -# annobin renamed to annobin-doc in 9.66-1 -Provides: %{name} = %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} # The documentation uses pod2man... BuildRequires: perl-interpreter perl-podlators gawk make sharutils @@ -141,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 #---------------------------------------------------------------------------- @@ -160,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 @@ -174,6 +175,22 @@ Installs the annocheck program which uses the notes generated by annobin to check that the specified files were compiled with the correct security 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 make + +%if %{with debuginfod} +BuildRequires: elfutils-debuginfod-client-devel +%endif + +Requires: %{name}-docs = %{version}-%{release} + +%description libannocheck +Installs the libannocheck library which uses the notes generated by the +annobin plugins to check that the specified files were compiled with the +correct security hardening options. + %endif #---------------------------------------------------------------------------- @@ -307,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 @@ -325,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} @@ -335,32 +356,39 @@ 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} -CONFIG_ARGS="$CONFIG_ARGS --without-test" +CONFIG_ARGS="$CONFIG_ARGS --without-tests" %endif %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" -%ifarch %{ix86} x86_64 +# 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 +export CLANG_TARGET_OPTIONS="-mbranch-protection=standard" +%endif +%ifnarch riscv64 +export CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS -flto" +%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 @@ -377,7 +405,12 @@ make -C gcc-plugin clean BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so" # Disable the standard annobin plugin so that we do get conflicts. +# 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')" +%endif # If building on systems with an assembler that does not support the # .attach_to_group pseudo op (eg RHEL-7) then enable the next line. @@ -389,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} @@ -422,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 @@ -455,34 +501,644 @@ fi %if %{with llvmplugin} %files plugin-llvm +%dir %{llvm_plugin_dir} %{llvm_plugin_dir}/annobin-for-llvm.so %endif %if %{with clangplugin} %files plugin-clang +%dir %{clang_plugin_dir} %{clang_plugin_dir}/annobin-for-clang.so %endif %if %{with gccplugin} %files plugin-gcc +%dir %{ANNOBIN_GCC_PLUGIN_DIR} %{ANNOBIN_GCC_PLUGIN_DIR}/annobin.so %{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 %if %{with annocheck} %files annocheck -%{_includedir}/libannocheck.h -%{_libdir}/libannocheck.* %{_bindir}/annocheck %{_mandir}/man1/annocheck.1* + +%files libannocheck +%{_includedir}/libannocheck.h +%{_libdir}/libannocheck.* +%{_libdir}/pkgconfig/libannocheck.pc %endif #--------------------------------------------------------------------------------- %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 13.05-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Thu Jan 15 2026 Nick Clifton - 13.05-1 +- Annocheck: Add .fc44 to list of known rpm file extensions. + +* Sat Dec 20 2025 Jakub Jelinek - 13.04-3 +- NVR bump to allow rebuild for new GCC in a side-tag. + +* Sat Dec 20 2025 Jakub Jelinek - 13.04-2 +- NVR bump to allow rebuild for new GCC in a side-tag. + +* Thu Dec 18 2025 Nick Clifton - 13.04-1 +- Annocheck: Fix compile time warnings from GCC-15 re: strchr returning a const char *. + +* Wed Nov 05 2025 Nick Clifton - 13.03-1 +- Annocheck: Skip production test for gcc libraries. (RHEL-123175) + +* Fri Oct 31 2025 Nick Clifton - 13.02-1 +- Annocheck: Update heuristic to detect gcc libraries. (RHEL-124869) + +* Thu Oct 23 2025 Nick Clifton - 13.01-1 +- Annocheck: Change FAIL for binaries built by a cross compiler to a MAYBE. (RHEL-123175) + +* Wed Aug 06 2025 Nick Clifton - 12.99-1 +- Annocheck: Improve detection of glibc static maths libraries. (RHEL-107470) + +* Wed Jul 23 2025 Fedora Release Engineering - 12.98-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jul 04 2025 Tulio Magno Quites Machado Filho - 12.98-1 +- Improve configure and meson files for consistent builds. + +* Thu Jun 19 2025 Nick Clifton - 12.97-1 +- Annocheck: Delete the temporary debug info directory after the tests have finished. + +* Wed Jun 04 2025 Nick Clifton - 12.96-1 +- Annocheck: Fix bugs in debug rpm location code. Add more glibc exceptions. (RHEL-95216) + +* Thu May 15 2025 Nick Clifton - 12.95-1 +- Annocheck: Improve performance with multiple debug info files and multiple files to scan. (#2366180) + +* Tue May 13 2025 Nick Clifton - 12.94-1 +- Annocheck: Update heuristic for detecting gcc files to cope with gcc 15. (#2365824) + +* Mon Mar 17 2025 Nick Clifton - 12.93-1 +- Annocheck: Fix test for GO revision. (RHEL-56031) + +* Fri Feb 14 2025 Nick Clifton - 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 - 12.91-1 +- Annocheck: Fix resource leak. (RHEL-79253) + +* Wed Feb 12 2025 Nick Clifton - 12.90-1 +- Annocheck: Fix double free. Add special handling for COMBOOT modules. + +* Tue Feb 11 2025 Nick Clifton - 12.89-1 +- Annocheck: Improve diagnostics when a separate debug info file cannot be found. + +* Mon Feb 03 2025 Nick Clifton - 12.88-1 +- Annocheck: Look for -fstack-clash-protection in DW_AT_producer string. (RHEL-77328) + +* Tue Jan 28 2025 Nick Clifton - 12.87-1 +- Annocheck: Fix locating string notes (again). Add exception for glibc benchmark tests. (RHEL-76456) + +* Mon Jan 27 2025 Nick Clifton - 12.86-1 +- Annocheck: Add crtoffloadtableS.o to list of known gcc binaries. (RHEL-760404) + +* Mon Jan 27 2025 Nick Clifton - 12.85-1 +- Annocheck: Fix the --debug-dir option. + +* Thu Jan 23 2025 Nick Clifton - 12.84-1 +- Annocheck: Fix corrupt warning message when unable to locate separate debug info files. + +* Wed Jan 22 2025 Nick Clifton - 12.83-1 +- Annocheck: Remove spurious debugging messages. + +* Wed Jan 22 2025 Nick Clifton - 12.82-1 +- Annocheck: Always look for annobin notes in separate debug info files. (RHEL-75778) + +* Thu Jan 16 2025 Nick Clifton - 12.81-1 +- Annocheck: Support multiple --debug-rpm and --debug-file options. (RHEL-73349) + +* Sat Jan 11 2025 Jakub Jelinek - 12.80-2 +- NVR bump to allow rebuild for new GCC in a side-tag. + +* Fri Dec 13 2024 Nick Clifton - 12.80-1 +- Annocheck: Add support for sys-root'ed glibc packages. (RHEL-71296) + +* Tue Dec 10 2024 Nick Clifton - 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 - 12.78-1 +- GCC Plugin: Fix building with gcc 15. (#32429) + +* Fri Nov 15 2024 Nick Clifton - 12.77-1 +- Annocheck: Fix overly long debug messages. + +* Fri Nov 15 2024 Nick Clifton - 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 - 12.75-1 +- Annocheck: Add more exceptions for gcc binaries. (RHEL-33365) +- Annocheck: Add --skip-passes option. + +* Wed Nov 06 2024 Nick Clifton - 12.74-1 +- Annocheck: Add exceptions for gcc binaries. (RHEL-33365) + +* Tue Nov 05 2024 Nick Clifton - 12.73-1 +- Annocheck: Skip property note test for i386 binaries created by LLVM. (#2323797) + +* Fri Nov 01 2024 Nick Clifton - 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 - 12.71-1 +- GCC Plugin: Change type of the .annobin.notes section from SHT_STRTAB to SHT_PROGBITS. + +* Tue Aug 13 2024 Nick Clifton - 12.70-1 +- Clang & LLVM Plugins: Include install directory in binary. (RHEL-54069) + +* Mon Aug 12 2024 Nick Clifton - 12.69-1 +- BuiltBy: Fix seg-fault when comparing language version strings. (RHEL-53497) + +* Wed Aug 07 2024 Nick Clifton - 12.67-1 +- Annocheck: Stop spurious assembler warnings. (RHEL-53213) +- Annocheck: Stop warnings about known gaps. (RHEL-53218) + +* Fri Aug 02 2024 Nick Clifton - 12.66-1 +- Annocheck: Fix stack realign test. (#2302427) + +* Mon Jul 29 2024 Nick Clifton - 12.65-1 +- Annocheck: Fix recording arguments for later re-use. (RHEL-50802) + +* Fri Jul 26 2024 Nick Clifton - 12.64-1 +- GCC Plugin: Fix building AArch64 components with gcc earlier than 11.3. + +* Mon Jul 22 2024 Nick Clifton - 12.63-1 +- Annocheck: Add improvements to the builtby utility. + +* Wed Jul 17 2024 Fedora Release Engineering - 12.62-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jul 08 2024 Nick Clifton - 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 - 12.60-1 +- Annocheck: Add support for Fortran binaries. + +* Tue Jun 11 2024 Nick Clifton - 12.59-1 +- Annocheck: Add heuristic for detecting parts of the CGO runtime library. + +* Mon Jun 10 2024 Nick Clifton - 12.58-1 +- Annocheck: Add improvements for handling Clang runtime binaries. + +* Tue Jun 04 2024 Nick Clifton - 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 - 12.55-1 +- Annocheck: Skip GAPS test for GO binaries. (RHEL-36308) + +* Mon May 20 2024 Nick Clifton - 12.54-2 +- Spec File: Add annobin plugin document directory to the files section. (#2279779) + +* Tue May 14 2024 Nick Clifton - 12.54-1 +- Annocheck: Remove some false positives for Rust binaries. (#2280239) + +* Thu May 09 2024 Nick Clifton - 12.53-2 +- Spec File: Add the annobin source directory to the files section. (#2279779) + +* Thu May 09 2024 Nick Clifton - 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 - 12.52-1 +- Annocheck: Add OpenSSL Engine test. (PTG-319) + +* Tue Apr 23 2024 Nick Clifton - 12.51-1 +- Annocheck: Test for gaps even when only one note is present. + +* Mon Apr 22 2024 Nick Clifton - 12.50-1 +- Annocheck: Skip AArch64 branch protection test for GO binaries. + +* Thu Apr 18 2024 Nick Clifton - 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 - 12.48-1 +- Annocheck: Update heuristics for detecting glibc code in executables. (RHEL-30579) + +* Wed Mar 27 2024 Nick Clifton - 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 - 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 - 12.45-1 +- GCC Plugin: Fix bug extracing the value of target specific command line options. + +* Wed Mar 06 2024 Nick Clifton - 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 - 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 - 12.42-1 +- Annocheck: Improve heuristics for locating debug info files. (#2267097) +- Configure: Harmonize configure options. + +* Tue Feb 27 2024 Nick Clifton - 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 - 12.40-2 +- Spec File: Remove a workaround for ppc64le. + +* Tue Feb 13 2024 Nick Clifton - 12.40-1 +- Annocheck: Improve heuristic for skipping LTO and FORTIFY tests. (#2264000) + +* Fri Feb 09 2024 Nick Clifton - 12.39-1 +- Annocheck: Also skip property note test for i686 binaries. (#2258571) + +* Tue Jan 23 2024 Nick Clifton - 12.38-1 +- Annocheck: Also skip the entry point test for i686 binaries. (#2258571) + +* Mon Jan 22 2024 Fedora Release Engineering - 12.37-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 12.37-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jan 17 2024 Nick Clifton - 12.37-1 +- GCC Plugin: Do not use section groups with string format notes. + +* Tue Jan 16 2024 Nick Clifton - 12.36-2 +- Spec File: NVR bump in order to allow building in side tag. + +* Tue Jan 16 2024 Nick Clifton - 12.36-1 +- Annocheck: Disable cf-protection test for i686 architecture. (#2258571) + +* Mon Jan 15 2024 Nick Clifton - 12.35-4 +- Spec File: NVR bump in order to allow building in side tag. + +* Mon Jan 15 2024 Nick Clifton - 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 - 12.35-2 +- Spec File: Do not install annocheck.1.gz when annocheck is disabled. + +* Thu Jan 04 2024 Nick Clifton - 12.35-1 +- Annocheck: Improve detection of FIPS compliant GO binaries. + +* Fri Dec 15 2023 Nick Clifton - 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 - 12.33-1 +- Tests: Fix implicit-values test so that it will compile with gcc 14+. + +* Fri Nov 24 2023 Nick Clifton - 12.32-1 +- GCC Plugin: Add support for -fhardended. + +* Wed Nov 15 2023 Nick Clifton - 12.31-1 +- Update glibc detection heuristics for PPC64. (RHEL-16453) + +* Wed Nov 01 2023 Nick Clifton - 12.30-1 +- Fix another atexit test failure. (#2247481) + +* Mon Oct 30 2023 Nick Clifton - 12.29-1 +- Fix atexit test failure. +- Notes: Add support for string format notes. + +* Fri Oct 06 2023 Nick Clifton - 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 - 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 - 12.26-1 +- LLVM Plugin: Fix building with LLVM version 17. + +* Wed Aug 30 2023 Nick Clifton - 12.25-1 +- GCC Plugin: Enable string note format by default. + +* Fri Aug 04 2023 Nick Clifton - 12.24-1 +- Annocheck: Change GO FIPS test to look for CGO_ENABLED markers. + +* Mon Jul 31 2023 Nick Clifton - 12.23-1 +- Annocheck: Add test for FIPS compliant GO binaries. + +* Wed Jul 26 2023 Nick Clifton - 12.22-1 +- Annocheck: Fix double free. (#2226749) + +* Wed Jul 19 2023 Fedora Release Engineering - 12.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 18 2023 Nick Clifton - 12.21-1 +- Spec File: migrated to SPDX license. (#2222112) + +* Mon Jul 17 2023 Nick Clifton - 12.20-2 +- Spec File: Change License field to use SPDX notation. (#2222112) + +* Mon Jul 17 2023 Nick Clifton - 12.20-1 +- Annocheck: Ignore AArch64 $x and $d symbols. (#2221192) + +* Wed Jul 05 2023 Nick Clifton - 12.19-1 +- GCC Plugin: Suppress active checks for fortran sources. Improve scanning of COLLECT_GCC_OPTIONS. + +* Thu Jun 29 2023 Nick Clifton - 12.18-1 +- Annocheck: Remove dependency upon binutils-devel. + +* Thu Jun 29 2023 Nick Clifton - 12.17-1 +- Annocheck: Add detection of known parts of libstdc++-nonshared.a that contain gaps. (#2217864) + +* Tue Jun 27 2023 Nick Clifton - 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 - 12.15-1 +- Annocheck: Add --suppress-version-warnings option. + +* Thu Jun 22 2023 Nick Clifton - 12.14-1 +- Annocheck: Do not ignore separate debuginfo files that do not contain any DWARF. (#2144553) + +* Tue Jun 20 2023 Nick Clifton - 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 - 12.12-1 +- Annocheck: Check for string notes in separate debug info files. (#2211694) + +* Fri May 26 2023 Petr Pisar - 12.11-1 +- Annocheck: Add support for el10 and rhel-10 profiles. (RHEL-526) + +* Mon May 22 2023 Petr Pisar - 12.10-3 +- Rebuild against rpm-4.19 (https://fedoraproject.org/wiki/Changes/RPM-4.19) + +* Fri May 05 2023 Nick Clifton - 12.10-2 +- GCC Plugin: Default to generating string format notes. (Experimental) + +* Fri Apr 28 2023 Nick Clifton - 12.10-1 +- Annocheck: Suppress more tests for Rust binaries. + +* Tue Apr 25 2023 Nick Clifton - 12.09-1 +- Annocheck: Fix detection of missing plugin options. (#2189492) + +* Tue Apr 25 2023 Nick Clifton - 12.08-1 +- Fix generation of auto-generated files. +- Fix covscan reported errors. + +* Fri Apr 21 2023 Nick Clifton - 12.07-1 +- gcc-plugin: generate warnings about misspelt -D_FORTIFY_SOURCE and/or -D_GLIBCXX_ASSERTIONS options. + +* Thu Apr 20 2023 Nick Clifton - 12.06-1 +- gcc-plugin: use a bigger buffer for constructing notes. + +* Wed Apr 19 2023 Nick Clifton - 12.05-1 +- llvm-plugin: Fix detection of optimization level. Improve test. +- clang-plugin: Improve test. + +* Mon Apr 17 2023 Nick Clifton - 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 - 12.03-1 +- configure: Simplify. + +* Tue Apr 11 2023 Nick Clifton - 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 - 12.01-1 +- gcc plugin: Keep ELF notes at protocol version 3. + +* Tue Mar 28 2023 Nick Clifton - 12.00-1 +- Protocol Version 4: String format notes. + +* Mon Mar 13 2023 Nick Clifton - 11.14-1 +- Annocheck: Update message for LTO tests. (#2177140) + +* Wed Mar 08 2023 Nick Clifton - 11.13-1 +- Annocheck: Add even more code to handle another glibc function built without LTO. + +* Fri Mar 03 2023 Nick Clifton - 11.12-1 +- Annocheck: Add code to handle another glibc function built without LTO. + +* Tue Feb 28 2023 Nick Clifton - 11.11-1 +- GCC Plugin: Do not run if other plugins are active. (#2162746) + +* Thu Feb 23 2023 Nick Clifton - 11.10-1 +- Annocheck: Add code to handle glibc functions built without LTO. + +* Thu Feb 02 2023 Nick Clifton - 11.09-1 +- Libannocheck: Fix thinko in debugging code. +- Annocheck: Fix LTO test. +- Notes: Display notes held in separate dbeuginfo files. + +* Tue Jan 31 2023 Nick Clifton - 11.08-1 +- Annocheck: Fix atexit test. Fix recording of version numbers. (#2165528) + +* Wed Jan 25 2023 Nick Clifton - 11.07-2 +- LLVM & Clang Plugins: Build with branch protection on AArch64. (#2164364) +- Fix gating tests. + +* Fri Jan 20 2023 Nick Clifton - 11.07-1 +- Libannocheck: Fix bug causing infinite looping when running tests. + +* Wed Jan 18 2023 Fedora Release Engineering - 11.06-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Jan 16 2023 Jakub Jelinek - 11.06-2 +- Rebuilt against GCC 13. + +* Fri Jan 13 2023 Nick Clifton - 11.06-1 +- Annocheck: Fix handling of file built by multiple versions of gcc. (#2160700) + +* Mon Jan 09 2023 Nick Clifton - 11.05-1 +- Annocheck: Fix handling of empty files. (#2159292) + +* Fri Jan 06 2023 Nick Clifton - 11.04-1 +- Annocheck: Add crti.o and crtn.o to the list of known glibc special files. (#2158740) + +* Fri Jan 06 2023 Nick Clifton - 11.03-1 +- Annocheck: Fix memory leaks. + +* Wed Jan 04 2023 Nick Clifton - 11.02-1 +- Annocheck: Do not assume that object files contain no code simply because they do not have an executable segment. (#2158182) + +* Wed Jan 04 2023 Nick Clifton - 11.01-1 +- Annocheck: Add more special glibc filenames. (#2158100) + +* Wed Dec 21 2022 Nick Clifton - 10.99-1 +- Annocheck: Improve handling of tool versions. + +* Tue Dec 20 2022 Nick Clifton - 10.98-3 +- Spec File: Fix building with plugin_rebuild enabled. + +* Fri Dec 16 2022 Nick Clifton - 10.98-1 +- GCC plugin: Fix building with gcc-13. + +* Fri Dec 16 2022 Nick Clifton - 10.97-1 +- Annocheck: Add test for binaries built by cross compilers. + +* Thu Dec 15 2022 Nick Clifton - 10.96-1 +- Annocheck: Improve heuristic used to detect binaries without code. (#2144533) + +* Mon Dec 12 2022 Nick Clifton - 10.95-1 +- Annocheck: Avoid using debug filename when parsing notes in a debuginfo file. (#2152280) + +* Wed Nov 30 2022 Nick Clifton - 10.94-1 +- Annocheck: Better detection of binaries which do not contain code. (#2144533) + +* Wed Nov 23 2022 Nick Clifton - 10.93-1 +- Annocheck: Provide more information when a test is skipped because the file being tested was not compiled. + +* Mon Nov 07 2022 Nick Clifton - 10.92-1 +- Annocheck: Try harder not to run mutually exclusive tests. + +* Fri Oct 21 2022 Nick Clifton - 10.91-1 +- Tests: Fix future-test so that it properly handles the situation where the compiler does not support the new options. + +* Wed Oct 19 2022 Nick Clifton - 10.90-1 +- Libannocheck: Actually set result fields after tests are run. + +* Tue Oct 11 2022 Nick Clifton - 10.89-1 +- Libannocheck: Replace libannocheck_version variable with LIBANNOCHECK_VERSION define. + +* Tue Oct 11 2022 Nick Clifton - 10.88-1 +- Libannocheck: Remove 'Requires binutils-devel' from libannocheck.pc. + +* Wed Oct 05 2022 Nick Clifton - 10.87-2 +- Libannocheck: Move into separate sub-package. + +* Fri Sep 30 2022 Nick Clifton - 10.87-1 +- Libannocheck: Add libannocheck.pc pkgconfig file. + +* Fri Sep 30 2022 Nick Clifton - 10.86-1 +- Libannocheck: Add libannocheck_reinit(). + +* Thu Sep 22 2022 Nick Clifton - 10.85-1 +- GCC Plugin: Record -ftrivial-auto-var-init and -fzero-call-used-regs. +- Annocheck: Add future tests for -ftrivial-auto-var-init and -fzero-call-used-regs. + +* Tue Sep 20 2022 Serge Guelton - 10.84-1 +- Clang Plugin: Fix for building with Clang-15. (#2125875) + +* Fri Sep 09 2022 Nick Clifton - 10.83-1 +- Annocheck: Add a test for the inconsistent use of -Ofast. (#1248744) + +* Tue Sep 06 2022 Nick Clifton - 10.81-2 +- NVR Bump in order to trigger a rebuild for ELN. (#2124562) + +* Thu Aug 11 2022 Nick Clifton - 10.81-1 +- Plugin: Fix top level configuration support for RiscV. + +* Tue Aug 09 2022 Nick Clifton - 10.80-1 +- Annocheck: Improvements to the size tool. + +* Mon Jul 25 2022 Nick Clifton - 10.79-1 +- Annocheck: Fixes for libannocheck.h. + +* Wed Jul 20 2022 Fedora Release Engineering - 10.78-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jul 05 2022 Nick Clifton - 10.78-1 +- Annocheck: Add automatic profile selection. + +* Mon Jul 04 2022 Nick Clifton - 10.77-1 +- Annocheck: Improve gap detection and reporting. + +* Wed Jun 29 2022 Nick Clifton - 10.76-3 +- Spec File: Use the %%dir directive in the %%files section to ensure that +- plugin directories are useable. (#2080454) + +* Fri Jun 24 2022 Nick Clifton - 10.76-2 +- Spec File: Remove bogus Provides from annobin-docs subpackage. + +* Tue Jun 14 2022 Nick Clifton - 10.76-1 +- Annocheck: Check build-id of separate debuginfo files. +- Annocheck: Add GAPS test replacing --ignore-gaps. + +* Thu Jun 09 2022 Nick Clifton - 10.75-1 +- Annocheck: Fix covscan detected race condition between stat() and open(). + +* Tue Jun 07 2022 Nick Clifton - 10.74-1 +- Annocheck: Handle binaries created by Rust 1.18. (#2094420) +- Annocheck: Add optional function name to --skip arguments. (PR 29229) + +* Tue May 17 2022 Nick Clifton - 10.73-1 +- Annocheck: Fix handling of command line options that take arguments. (#2086850) + +* Mon May 16 2022 Nick Clifton - 10.72-1 +- Annocheck: Do not complain about unenabled -mbranch-protection option in AArch64 binaries. (#2078909) + +* Wed May 11 2022 Nick Clifton - 10.71-1 +- gcc-plugin: Fix typo in configure.ac. + +* Tue May 10 2022 Nianqing Yao - 10.70-2 +- Add support for RISC-V. + +* Mon May 09 2022 Nick Clifton - 10.70-1 +- Annocheck: Add another special case for glibc rpms. (#2083070) + +* Fri May 06 2022 Nick Clifton - 10.69-1 +- Annocheck: Do not complain about unenabled -mbranch-protection option in AArch64 binaries if compiled using LTO. (#2082146) + +* Tue May 03 2022 Nick Clifton - 10.68-1 +- Annocheck: Add more glibc exceptions + check PT_TLS segments. (#2081131) + +* Fri Apr 22 2022 Nick Clifton - 10.67-1 +- Annocheck: Do not complain about missing -mbranch-protection option in AArch64 binaries if compiled by golang. + +* Wed Apr 13 2022 Nick Clifton - 10.66-1 +- Annocheck: Do not complain about missing -mbranch-protection option in AArch64 binaries if compiled in LTO mode. + +* Tue Apr 12 2022 Nick Clifton - 10.65-1 +- gcc-plugin: Add support for CLVC_INTEGER options. + +* Wed Apr 06 2022 Nick Clifton - 10.64-1 +- Annocheck: Even more special cases for AArch64 glibc on RHEL-8. (#2072082) + +* Wed Apr 06 2022 Nick Clifton - 10.63-1 +- Annocheck: Add more special cases for AArch64 glibc on RHEL-8. (#2072082) + +* Tue Apr 05 2022 Nick Clifton - 10.62-1 +- llvm-plugin: Fix a thinko in the sources. + +* Sat Apr 02 2022 Nick Clifton - 10.61-1 +- gcc-plugin: Add remap of OPT_Wall. +- configure: Fix typo in top level configure.ac. + +* Thu Mar 31 2022 Timm Bäder redhat.com> - 10.60-1 +- Add support for building using meson+ninja. + +* Wed Mar 30 2022 Serge Guelton - 10.59-2 +- Rebuilt against new LLVM release, with patch. + +* Wed Mar 30 2022 Nick Clifton - 10.59-1 +- Annocheck: Fix test for AArch64 property notes. (#2068657) + +* Mon Mar 14 2022 Nick Clifton - 10.58-1 +- gcc-plugin: Do not issue warning messages for autoconf generated source files. (#2009958) + * Wed Mar 09 2022 Jakub Jelinek - 10.57-3 - NVR bump to allow rebuild for new GCC. @@ -592,7 +1248,7 @@ fi * Fri Dec 17 2021 Nick Clifton - 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 - 10.38-1 - Annocheck: Add special case for x86_64 RHEL-7 gaps. (#2031133) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..6ae9ce7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,6 @@ summary: CI Gating Plan discover: how: fmf - directory: tests + url: https://src.fedoraproject.org/tests/annobin.git execute: - how: beakerlib + how: tmt diff --git a/sources b/sources index 7468bf5..ae2a779 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (annobin-10.57.tar.xz) = c4fb30cbb5dff15bd1dd38797785bd4f1a9de1e047436d598368847e3f250cd7e467b3fc4ea2c013ab22764e06aab899d0a1bea3c465b0b29e363b73de20e86f +SHA512 (annobin-13.05.tar.xz) = 07bc023018e3f456fae470b271915bde2e1ff367ee8bb58adb74255023ae59e8c45ced8e4bd2130bf8a496966d986bca9866e054019f6ca4660d78c129b6532f diff --git a/tests/README b/tests/README deleted file mode 100644 index 9ad59d4..0000000 --- a/tests/README +++ /dev/null @@ -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. diff --git a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf deleted file mode 100644 index 435d7ff..0000000 --- a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf +++ /dev/null @@ -1,16 +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 -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin-annocheck -- gcc -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 diff --git a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh deleted file mode 100755 index 41312a4..0000000 --- a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh +++ /dev/null @@ -1,54 +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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 - rlPhaseStartSetup - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "rpm -q annobin-annocheck gcc" - 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 a.out" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/identify/main.fmf b/tests/Regression/identify/main.fmf deleted file mode 100644 index a10e87d..0000000 --- a/tests/Regression/identify/main.fmf +++ /dev/null @@ -1,21 +0,0 @@ -summary: identify -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- devtoolset-10 -- devtoolset-10-annocheck -- devtoolset-11 -- devtoolset-11-annocheck -- gcc-toolset-10 -- gcc-toolset-10-annocheck -- gcc-toolset-11 -- gcc-toolset-11-annocheck -duration: 48h -extra-summary: /tools/annobin/Regression/identify -extra-task: /tools/annobin/Regression/identify diff --git a/tests/Regression/identify/runtest.sh b/tests/Regression/identify/runtest.sh deleted file mode 100755 index 7907036..0000000 --- a/tests/Regression/identify/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/Regression/lto-preprocessor-options/main.fmf b/tests/Regression/lto-preprocessor-options/main.fmf deleted file mode 100644 index 03e6b88..0000000 --- a/tests/Regression/lto-preprocessor-options/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: lto-preprocessor-options -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- gcc -- annobin -- annobin-annocheck -- redhat-rpm-config -duration: 48h -extra-summary: /tools/annobin/Regression/lto-preprocessor-options -extra-task: /tools/annobin/Regression/lto-preprocessor-options diff --git a/tests/Regression/lto-preprocessor-options/runtest.sh b/tests/Regression/lto-preprocessor-options/runtest.sh deleted file mode 100755 index 430d830..0000000 --- a/tests/Regression/lto-preprocessor-options/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/Regression/missing-check-for-x86-property-note-content/main b/tests/Regression/missing-check-for-x86-property-note-content/main deleted file mode 100644 index b7f4983..0000000 Binary files a/tests/Regression/missing-check-for-x86-property-note-content/main and /dev/null differ diff --git a/tests/Regression/missing-check-for-x86-property-note-content/main.fmf b/tests/Regression/missing-check-for-x86-property-note-content/main.fmf deleted file mode 100644 index a7afb11..0000000 --- a/tests/Regression/missing-check-for-x86-property-note-content/main.fmf +++ /dev/null @@ -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 -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -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 diff --git a/tests/Regression/missing-check-for-x86-property-note-content/runtest.sh b/tests/Regression/missing-check-for-x86-property-note-content/runtest.sh deleted file mode 100755 index 14392c0..0000000 --- a/tests/Regression/missing-check-for-x86-property-note-content/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/Regression/processing-params-in-reverse-order/main.fmf b/tests/Regression/processing-params-in-reverse-order/main.fmf deleted file mode 100644 index 19b497d..0000000 --- a/tests/Regression/processing-params-in-reverse-order/main.fmf +++ /dev/null @@ -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 -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -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 diff --git a/tests/Regression/processing-params-in-reverse-order/runtest.sh b/tests/Regression/processing-params-in-reverse-order/runtest.sh deleted file mode 100755 index 75b357e..0000000 --- a/tests/Regression/processing-params-in-reverse-order/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf b/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf deleted file mode 100644 index bd8362f..0000000 --- a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf +++ /dev/null @@ -1,17 +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 -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- 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 diff --git a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/runtest.sh b/tests/Regression/segv-when-processing-multiple-params-incl-symlink/runtest.sh deleted file mode 100755 index 6603c3c..0000000 --- a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/Regression/testsuite/main.fmf b/tests/Regression/testsuite/main.fmf deleted file mode 100644 index 7352f78..0000000 --- a/tests/Regression/testsuite/main.fmf +++ /dev/null @@ -1,28 +0,0 @@ -summary: testsuite -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- annobin-annocheck -- binutils-devel -- gcc -- gcc-c++ -- elfutils -- elfutils-devel -- make -- rpm-build -- rpm-devel -- gcc-plugin-devel -- yum -- dnf -- yum-utils -- bzip2-devel -- rpm-build -duration: 48h -extra-summary: /tools/annobin/Regression/testsuite -extra-task: /tools/annobin/Regression/testsuite diff --git a/tests/Regression/testsuite/runtest.sh b/tests/Regression/testsuite/runtest.sh deleted file mode 100755 index c8016ad..0000000 --- a/tests/Regression/testsuite/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 "yum-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 diff --git a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf deleted file mode 100644 index 9aea593..0000000 --- a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf +++ /dev/null @@ -1,16 +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 -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -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 diff --git a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh deleted file mode 100755 index ca991af..0000000 --- a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh +++ /dev/null @@ -1,54 +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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 - 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 |& \ - fgrep '.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 diff --git a/tests/Sanity/gcc-fedora-flags/hello.c b/tests/Sanity/gcc-fedora-flags/hello.c deleted file mode 100644 index 51b259b..0000000 --- a/tests/Sanity/gcc-fedora-flags/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - printf("Hello World\n"); -} diff --git a/tests/Sanity/gcc-fedora-flags/hello.cpp b/tests/Sanity/gcc-fedora-flags/hello.cpp deleted file mode 100644 index 400612b..0000000 --- a/tests/Sanity/gcc-fedora-flags/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - std::cout << "Hello World\n"; -} diff --git a/tests/Sanity/gcc-fedora-flags/main.c b/tests/Sanity/gcc-fedora-flags/main.c deleted file mode 100644 index 1a3455d..0000000 --- a/tests/Sanity/gcc-fedora-flags/main.c +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/Sanity/gcc-fedora-flags/main.cpp b/tests/Sanity/gcc-fedora-flags/main.cpp deleted file mode 100644 index 1a3455d..0000000 --- a/tests/Sanity/gcc-fedora-flags/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/Sanity/gcc-fedora-flags/main.fmf b/tests/Sanity/gcc-fedora-flags/main.fmf deleted file mode 100644 index f053025..0000000 --- a/tests/Sanity/gcc-fedora-flags/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: gcc-fedora-flags -description: '' -contact: -- Tom Stellard -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 diff --git a/tests/Sanity/gcc-fedora-flags/runtest.sh b/tests/Sanity/gcc-fedora-flags/runtest.sh deleted file mode 100755 index 8ef829f..0000000 --- a/tests/Sanity/gcc-fedora-flags/runtest.sh +++ /dev/null @@ -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 diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf deleted file mode 100644 index 49d2862..0000000 --- a/tests/Sanity/smoke/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: smoke test for annobin plugin -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- man-db -- gcc -- annobin -- annobin-annocheck -duration: 48h -extra-summary: /tools/annobin/Sanity/smoke -extra-task: /tools/annobin/Sanity/smoke diff --git a/tests/Sanity/smoke/runtest.sh b/tests/Sanity/smoke/runtest.sh deleted file mode 100755 index 566e571..0000000 --- a/tests/Sanity/smoke/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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