summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-20 09:59:59 +0100
committerRemi Collet <remi@remirepo.net>2017-11-20 09:59:59 +0100
commit8ac68c0ae749495230418caf726ae4ad3068ae5b (patch)
treede0c62f80c72cd3ce5c8f643660c5dcaeae95708
parentc5616ea1427c289fa9baf96b03f09fac38c9c1f6 (diff)
test build: add upstream patch for regression in 1.3.1
-rw-r--r--f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch35
-rw-r--r--libzip.spec15
2 files changed, 46 insertions, 4 deletions
diff --git a/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch b/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
new file mode 100644
index 0000000..9f5b71a
--- /dev/null
+++ b/f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
@@ -0,0 +1,35 @@
+From f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd Mon Sep 17 00:00:00 2001
+From: Dieter Baron <dillo@nih.at>
+Date: Mon, 20 Nov 2017 09:23:02 +0100
+Subject: [PATCH] Do not discard za in case of error.
+
+Fixes serious bug introduced in 1.3.1.
+---
+ lib/zip_close.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/lib/zip_close.c b/lib/zip_close.c
+index 71f4bf7..2aff0dd 100644
+--- a/lib/zip_close.c
++++ b/lib/zip_close.c
+@@ -216,15 +216,16 @@ zip_close(zip_t *za)
+ }
+ }
+
++ _zip_progress_end(za->progress);
++
+ if (error) {
+ zip_source_rollback_write(za->src);
++ return -1;
+ }
+
+- _zip_progress_end(za->progress);
+-
+ zip_discard(za);
+-
+- return error ? -1 : 0;
++
++ return 0;
+ }
+
+
diff --git a/libzip.spec b/libzip.spec
index b262082..ef98839 100644
--- a/libzip.spec
+++ b/libzip.spec
@@ -23,13 +23,15 @@ Name: %{libname}
Name: %{libname}%{soname}
%endif
Version: 1.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Libraries
Summary: C library for reading, creating, and modifying zip archives
+Patch0: f8ef1a2c7855c0b5dbf7de32269cc7633eb620bd.patch
+
License: BSD
-URL: http://www.nih.at/libzip/index.html
-Source0: http://www.nih.at/libzip/libzip-%{version}.tar.xz
+URL: https://libzip.org/
+Source0: https://libzip.org/download/libzip-%{version}.tar.xz
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
@@ -109,6 +111,7 @@ The %{name}-tools package provides command line tools split off %{name}:
%prep
%setup -q -n %{libname}-%{version}
+%patch0 -p1
# Avoid lib64 rpaths (FIXME: recheck this on newer releases)
%if "%{_libdir}" != "/usr/lib"
@@ -167,9 +170,13 @@ make check
%changelog
-* Mon Nov 20 2017 Remi Collet <remi@fedoraproject.org> - 1.3.1-1
+* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 1.3.1-2
+- add upstream patch for regression in 1.3.1
+
+* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 1.3.1-1
- update to 1.3.1
- drop multilib header hack
+- change URL to https://libzip.org/
* Fri Oct 6 2017 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
- test build