tests: fix grep warning leading to test failure

Recent grep version emits a warning when \ is found before /.
This leads to a test failure in libtool.

Patch sent upstream:
https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg00004.html

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Frédéric Bérat 2022-12-21 13:33:27 +01:00
parent 671c69b6ca
commit e5a7e0081e
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From 414deacee0f564afdf2d7750450274c581330a59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= <fberat@redhat.com>
Date: Wed, 21 Dec 2022 13:14:03 +0100
Subject: [PATCH] tests: Fix grep warning about stray \ before /
Recent version of grep emit a warning if stray \ is found before /.
This leads to the link-order test failure.
* tests/link-order.at: Remove unneeded \ before /
---
tests/link-order.at | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/link-order.at b/tests/link-order.at
index 3f01a00d..a145347f 100644
--- a/tests/link-order.at
+++ b/tests/link-order.at
@@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax
case $hardcode_direct$hardcode_direct_absolute in
yesno)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
*)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
esac
--
2.38.1

View File

@ -8,7 +8,7 @@
Summary: The GNU Portable Library Tool
Name: libtool
Version: 2.4.7
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+ and LGPLv2+ and GFDL
URL: http://www.gnu.org/software/libtool/
@ -39,6 +39,10 @@ Patch3: libtool-2.4.6-disable_non-pic_arm.patch
# https://lists.gnu.org/archive/html/libtool-patches/2022-02/msg00000.html
Patch4: libtool-2.4.6-keep-compiler-deps.patch
# Patch sent upstream
# https://lists.gnu.org/archive/html/libtool-patches/2022-12/msg00004.html
Patch5: 0001-tests-Fix-grep-warning-about-stray-before.patch
%if ! 0%{?_module_build}
Patch100: libtool-nodocs.patch
%endif
@ -165,6 +169,9 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%changelog
* Wed Dec 21 2022 Frederic Berat <fberat@redhat.com> - 2.4.7-3
- Fix test failure due to grep update
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild