SHA256
6
0
forked from pool/tre

Accepting request 1009751 from home:favogt:branches:devel:libraries:c_c++

- Add patch to fix testsuite with bash >= 5.2:
  * 0001-Remove-broken-agrep-test-entry.patch

OBS-URL: https://build.opensuse.org/request/show/1009751
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tre?expand=0&rev=23
This commit is contained in:
Dirk Mueller 2022-10-11 12:39:37 +00:00 committed by Git OBS Bridge
parent 7766a2fadc
commit 0d86640771
3 changed files with 121 additions and 4 deletions

View File

@ -0,0 +1,112 @@
From 35f61f40d6b68928ca5d409fa9fc204ea77e2199 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Tue, 11 Oct 2022 11:35:53 +0200
Subject: [PATCH] Remove broken agrep test entry
It's meant to cause agrep to return with exit code 2, but asserts that it's
exit code 1 instead.
It's meant to ensure that using ".*" as pattern results in exit code 2 because
it matches also an empty string. However, glob expansion results in ".*"
picking up files such as "." and ".." from the CWD, which get interpreted as
valid pattern. This results in exit status 1 (no match found) which is what
the .ok file expects, but that's invalid.
With bash 5.2, glob expansion no longer matches "." and ".." by default, so
the test works as intended by accident, causing a mismatch with the expected
wrong exit code.
It's unfortunately not easily possible to avoid glob expansion in this case.
Just remove the test for now.
---
tests/agrep/exitstatus.args | 1 -
tests/agrep/exitstatus.ok | 61 -------------------------------------
2 files changed, 62 deletions(-)
diff --git a/tests/agrep/exitstatus.args b/tests/agrep/exitstatus.args
index 808ae77..2f53e97 100644
--- a/tests/agrep/exitstatus.args
+++ b/tests/agrep/exitstatus.args
@@ -5,6 +5,5 @@ this-wont-be-found
.
-v .
# Some errors which should give exit status 2.
--d .* dummy
-d {1 dummy
\
diff --git a/tests/agrep/exitstatus.ok b/tests/agrep/exitstatus.ok
index 28427bb..bd23b4c 100644
--- a/tests/agrep/exitstatus.ok
+++ b/tests/agrep/exitstatus.ok
@@ -521,67 +521,6 @@ Exit status 1.
Exit status 1.
#### TEST: agrep -H -n -s --color --show-position -v . < exitstatus.in
-Exit status 1.
-#### TEST: agrep -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -c -d .* dummy exitstatus.in
-exitstatus.in:0
-
-Exit status 1.
-#### TEST: agrep -c -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -l -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -l -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -n -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -n -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -s -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -s -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -M -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -M -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --show-position -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --show-position -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --color -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep --color -d .* dummy < exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy exitstatus.in
-
-Exit status 1.
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy < exitstatus.in
-
Exit status 1.
#### TEST: agrep -d {1 dummy exitstatus.in
--
2.36.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Oct 11 09:44:20 UTC 2022 - Fabian Vogt <fvogt@suse.com>
- Add patch to fix testsuite with bash >= 5.2:
* 0001-Remove-broken-agrep-test-entry.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 27 20:23:27 UTC 2022 - Dirk Müller <dmueller@suse.com> Thu Jan 27 20:23:27 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -33,6 +33,8 @@ Patch0: %{name}.diff
# See https://github.com/laurikari/tre/pull/19. # See https://github.com/laurikari/tre/pull/19.
Patch1: %{name}-chicken.patch Patch1: %{name}-chicken.patch
Patch2: CVE-2016-8859.patch Patch2: CVE-2016-8859.patch
# https://github.com/laurikari/tre/pull/87
Patch3: 0001-Remove-broken-agrep-test-entry.patch
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: glibc-locale BuildRequires: glibc-locale
BuildRequires: libtool BuildRequires: libtool
@ -81,10 +83,7 @@ approximate patterns as well as block oriented search.
%lang_package %lang_package
%prep %prep
%setup -q %autosetup -p1
%patch0 -p1
%patch1 -p1 -b .chicken
%patch2 -p1
./utils/autogen.sh ./utils/autogen.sh
%build %build