From 8764aaf2d8ffb232c1dcd4dcada29097b5b97223 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 27 Jun 2023 10:01:49 +0200 Subject: add upstream patch for tests --- libzip-tests.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ libzip.spec | 5 +++++ 2 files changed, 65 insertions(+) create mode 100644 libzip-tests.patch diff --git a/libzip-tests.patch b/libzip-tests.patch new file mode 100644 index 0000000..228b51c --- /dev/null +++ b/libzip-tests.patch @@ -0,0 +1,60 @@ +From cabb10e1519fb0379472c12ec77b09b00a1f13ec Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Sun, 25 Jun 2023 23:34:17 +0200 +Subject: [PATCH] Work around Linux's non-POSIX behaviour in getopt(3). + +Closes #386. +--- + regress/cancel_45.test | 2 +- + regress/cancel_90.test | 2 +- + regress/cm-default.test | 2 +- + regress/progress.test | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/regress/cancel_45.test b/regress/cancel_45.test +index c6989b58..591c4105 100644 +--- a/regress/cancel_45.test ++++ b/regress/cancel_45.test +@@ -1,6 +1,6 @@ + # test default compression stores if smaller; test cancel after 45% + return 1 +-arguments -n test.zip cancel 45 add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 ++arguments -n -- test.zip cancel 45 add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 + file large-uncompressible large-uncompressible + stdout + 0.0% done +diff --git a/regress/cancel_90.test b/regress/cancel_90.test +index da68ae77..ac34af73 100644 +--- a/regress/cancel_90.test ++++ b/regress/cancel_90.test +@@ -1,6 +1,6 @@ + # test default compression stores if smaller; test cancel after 90% + return 1 +-arguments -n test.zip cancel 90 add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 ++arguments -n -- test.zip cancel 90 add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 + file large-uncompressible large-uncompressible + stdout + 0.0% done +diff --git a/regress/cm-default.test b/regress/cm-default.test +index 0d3665f7..d7baa6e0 100644 +--- a/regress/cm-default.test ++++ b/regress/cm-default.test +@@ -1,5 +1,5 @@ + # test default compression stores if smaller + return 0 +-arguments -n test.zip add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 ++arguments -n -- test.zip add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 + file test.zip {} cm-default.zip + file large-uncompressible large-uncompressible +diff --git a/regress/progress.test b/regress/progress.test +index a8ebefe7..e5c26003 100644 +--- a/regress/progress.test ++++ b/regress/progress.test +@@ -1,6 +1,6 @@ + # test default compression stores if smaller; print progress + return 0 +-arguments -n test.zip print_progress add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 ++arguments -n -- test.zip print_progress add compressible aaaaaaaaaaaaaa add uncompressible uncompressible add_nul large-compressible 8200 add_file large-uncompressible large-uncompressible 0 -1 + file test.zip {} cm-default.zip + file large-uncompressible large-uncompressible + stdout diff --git a/libzip.spec b/libzip.spec index cb00eaa..2d0d57a 100644 --- a/libzip.spec +++ b/libzip.spec @@ -50,6 +50,9 @@ License: BSD-3-Clause URL: https://libzip.org/ Source0: https://libzip.org/download/libzip-%{version}.tar.xz +# Upstream patch +Patch0: libzip-tests.patch + BuildRequires: gcc BuildRequires: zlib-devel >= 1.1.2 BuildRequires: bzip2-devel @@ -164,6 +167,8 @@ The %{name}-tools package provides command line tools split off %{name}: %setup -q -n %{libname}-%{version} : ========== BUILD in %{_prefix} ========== +%patch -P0 -p1 -b .upstream + # unwanted in package documentation rm INSTALL.md -- cgit