Fix fortran broken test

A recent change in the Fedora distribution broke the fort2.sh test by
confusing a grep command.
This patch makes the grep command more specific to fix the failure and
re-enable the build.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Frederic Berat 2022-05-17 09:47:48 +02:00
parent 3e8430b36d
commit 03d6634ca1
2 changed files with 25 additions and 1 deletions

View File

@ -15,7 +15,7 @@ Summary: A GNU tool for automatically creating Makefiles
Name: automake Name: automake
# Any bump here requires libtool rebuild, rhbz#1813010 # Any bump here requires libtool rebuild, rhbz#1813010
Version: %{api_version}.5 Version: %{api_version}.5
Release: 4%{?dist} Release: 5%{?dist}
# docs ~> GFDL, sources ~> GPLv2+, mkinstalldirs ~> PD and install-sh ~> MIT # docs ~> GFDL, sources ~> GPLv2+, mkinstalldirs ~> PD and install-sh ~> MIT
License: GPLv2+ and GFDL and Public Domain and MIT License: GPLv2+ and GFDL and Public Domain and MIT
@ -24,6 +24,11 @@ Source: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz
Source2: http://git.savannah.gnu.org/cgit/config.git/plain/config.sub Source2: http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
Source3: http://git.savannah.gnu.org/cgit/config.git/plain/config.guess Source3: http://git.savannah.gnu.org/cgit/config.git/plain/config.guess
# ~> downstream
# The patch is only made necessary due to fedora specific changes
# which lead to .package_note-automake-1.16.5-3.fc36.x86_64.ld
# being inserted in build logs, breaking the original grep instruction
Patch0: fort2.patch
URL: http://www.gnu.org/software/automake/ URL: http://www.gnu.org/software/automake/
Requires: autoconf >= 2.65 Requires: autoconf >= 2.65
@ -131,6 +136,9 @@ make -k %{?_smp_mflags} check %{?TESTS_FLAGS: TESTS="%{TESTS_FLAGS}"} \
%changelog %changelog
* Tue May 17 2022 Frederic Berat <fberat@redhat.com> - 1.16.5-5
- Fix fort2.sh test
* Mon Feb 07 2022 Frederic Berat <fberat@redhat.com> - 1.16.5-4 * Mon Feb 07 2022 Frederic Berat <fberat@redhat.com> - 1.16.5-4
- Switch to java-devel as a build requirement (#2051135) - Switch to java-devel as a build requirement (#2051135)

16
fort2.patch Normal file
View File

@ -0,0 +1,16 @@
diff -r -U5 automake-1.16.5.old/t/fort2.sh automake-1.16.5/t/fort2.sh
--- automake-1.16.5.old/t/fort2.sh 2022-05-16 15:12:39.683825720 +0200
+++ automake-1.16.5/t/fort2.sh 2022-05-16 15:12:53.495805448 +0200
@@ -80,11 +80,11 @@
grep ' fake-fc .* --@08 .* greets\.f08 ' out
grep ' fake-fc .* --@08 .* sub/bonjour\.f08 ' out
grep ' fake-fc .* --gby .* --@95 .*[` ]bye\.f95 ' out
grep ' fake-fc .* --gby .* --@90 .*[` ]sub/baz\.f90 ' out
-test $(grep -c '.*--gby.*\.f' out) -eq 2
+test $(grep -cE '.*--gby.*bye\.f95|--gby.*baz\.f90' out) -eq 2
$EGREP 'fake-fc.*--@(95|03|08).*\.f90' out && exit 1
$EGREP 'fake-fc.*--@(90|03|08).*\.f95' out && exit 1
$EGREP 'fake-fc.*--@(90|95|08).*\.f03' out && exit 1
$EGREP 'fake-fc.*--@(95|95|03).*\.f08' out && exit 1