summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--9879affbbdec684adb343b331f47f06788681e3b.patch63
-rw-r--r--libzip.spec12
2 files changed, 71 insertions, 4 deletions
diff --git a/9879affbbdec684adb343b331f47f06788681e3b.patch b/9879affbbdec684adb343b331f47f06788681e3b.patch
new file mode 100644
index 0000000..a6a451e
--- /dev/null
+++ b/9879affbbdec684adb343b331f47f06788681e3b.patch
@@ -0,0 +1,63 @@
+From 9879affbbdec684adb343b331f47f06788681e3b Mon Sep 17 00:00:00 2001
+From: Thomas Klausner <tk@giga.or.at>
+Date: Fri, 6 Oct 2017 12:24:22 +0200
+Subject: [PATCH] nonrandomopen: override open64() as well.
+
+---
+ regress/nonrandomopen.c | 32 +++++++++++++++++++++++++++++++-
+ 1 file changed, 31 insertions(+), 1 deletion(-)
+
+diff --git a/regress/nonrandomopen.c b/regress/nonrandomopen.c
+index 4f74222..dd90c14 100644
+--- a/regress/nonrandomopen.c
++++ b/regress/nonrandomopen.c
+@@ -47,7 +47,8 @@
+ #endif
+
+ static int inited = 0;
+-static int (*real_open)(const char *path, int mode, ...) = NULL;
++static int (*real_open)(const char *path, int flags, ...) = NULL;
++static int (*real_open64)(const char *path, int flags, ...) = NULL;
+
+ static void
+ init(void)
+@@ -55,6 +56,10 @@ init(void)
+ real_open = dlsym(RTLD_NEXT, "open");
+ if (!real_open)
+ abort();
++ real_open64 = dlsym(RTLD_NEXT, "open64");
++ if (!real_open64) {
++ /* does not have to exist */
++ }
+ inited = 1;
+ }
+
+@@ -78,3 +83,28 @@ open(const char *path, int flags, ...)
+ return real_open(path, flags, mode);
+ }
+ }
++
++int
++open64(const char *path, int flags, ...)
++{
++ va_list ap;
++ mode_t mode;
++
++ if (!inited) {
++ init();
++ }
++
++ if (!real_open64) {
++ abort();
++ }
++
++ va_start(ap, flags);
++ mode = va_arg(ap, mode_t);
++ va_end(ap);
++
++ if (strcmp(path, "/dev/urandom") == 0) {
++ return real_open64("/dev/zero", flags, mode);
++ } else {
++ return real_open64(path, flags, mode);
++ }
++}
diff --git a/libzip.spec b/libzip.spec
index 96e5285..61aec08 100644
--- a/libzip.spec
+++ b/libzip.spec
@@ -28,7 +28,7 @@ Name: %{libname}
Name: %{libname}%{soname}
%endif
Version: 1.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Libraries
Summary: C library for reading, creating, and modifying zip archives
@@ -38,6 +38,9 @@ Source0: http://www.nih.at/libzip/libzip-%{version}.tar.xz
# to handle multiarch headers, ex from mysql-devel package
Source1: zipconf.h
+# Upstream for 32-bit test suite
+Patch0: 9879affbbdec684adb343b331f47f06788681e3b.patch
+
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
# Needed to run the test suite
@@ -116,6 +119,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"
@@ -151,9 +155,6 @@ ln -s ../%{_lib}/libzip/include/zipconf.h \
%check
%if %{with_tests}
-if [ %{__isa_bits} -lt 64 ]; then
- export XFAIL_TESTS="encryption-nonrandom-aes128.test encryption-nonrandom-aes192.test encryption-nonrandom-aes256.test"
-fi
make check
%else
@@ -190,6 +191,9 @@ make check
%changelog
+* Fri Oct 6 2017 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
+- test build
+
* Mon Sep 4 2017 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
- update to 1.3.0
- add dependency on bzip2 library