From 24f9322972949e7bbc2e5b55e4831cf9df50fe44 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 May 2015 09:14:08 +0200 Subject: [PATCH] - update to 1.0.1 - soname bump from .2 to .4 - drop ziptorrent - create "tools" sub package bootstrap build with both .2 and .4 soname --- .gitignore | 1 + libzip-0.11.2-CVE-2015-2331.patch | 12 ----- libzip.spec | 77 +++++++++++++++++++++++-------- sources | 2 +- 4 files changed, 61 insertions(+), 31 deletions(-) delete mode 100644 libzip-0.11.2-CVE-2015-2331.patch diff --git a/.gitignore b/.gitignore index 8ea9eb0..74d2ce8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ libzip-0.9.3.tar.bz2 /libzip-0.10.1.tar.bz2 /libzip-0.11.1.tar.xz /libzip-0.11.2.tar.xz +/libzip-1.0.1.tar.xz diff --git a/libzip-0.11.2-CVE-2015-2331.patch b/libzip-0.11.2-CVE-2015-2331.patch deleted file mode 100644 index 67d2abc..0000000 --- a/libzip-0.11.2-CVE-2015-2331.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up libzip-0.11.2/lib/zip_dirent.c.CVE-2015-2331 libzip-0.11.2/lib/zip_dirent.c ---- libzip-0.11.2/lib/zip_dirent.c.CVE-2015-2331 2013-11-28 10:57:10.000000000 -0600 -+++ libzip-0.11.2/lib/zip_dirent.c 2015-03-23 07:45:27.486986723 -0500 -@@ -110,7 +110,7 @@ _zip_cdir_new(zip_uint64_t nentry, struc - - if (nentry == 0) - cd->entry = NULL; -- else if ((cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) { -+ else if ((nentry > SIZE_MAX/sizeof(*(cd->entry))) || (cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) { - _zip_error_set(error, ZIP_ER_MEMORY, 0); - free(cd); - return NULL; diff --git a/libzip.spec b/libzip.spec index 5c56bda..38d6d97 100644 --- a/libzip.spec +++ b/libzip.spec @@ -1,25 +1,33 @@ - -%define multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 +%global multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: libzip -Version: 0.11.2 -Release: 5%{?dist} +Version: 1.0.1 +Release: 0%{?dist} Summary: C library for reading, creating, and modifying zip archives License: BSD URL: http://www.nih.at/libzip/index.html Source0: http://www.nih.at/libzip/libzip-%{version}.tar.xz - -# https://bugzilla.redhat.com/show_bug.cgi?id=1204677 -# http://hg.nih.at/libzip/raw-rev/9f11d54f692e -Patch1: libzip-0.11.2-CVE-2015-2331.patch - -#BuildRequires: automake libtool -BuildRequires: zlib-devel - # to handle multiarch headers, ex from mysql-devel package Source1: zipconf.h +BuildRequires: zlib-devel +# TODO remove this - Hack to not break buildroot +BuildRequires: libzip +# Needed to run the test suite +# find regress/ -type f | /usr/lib/rpm/perl.req +BuildRequires: perl +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Path) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(Symbol) +BuildRequires: perl(UNIVERSAL) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) + %description libzip is a C library for reading, creating, and modifying zip archives. Files @@ -27,14 +35,26 @@ can be added from data buffers, files, or compressed data copied directly from other zip archives. Changes made without closing the archive can be reverted. The API is documented by man pages. + %package devel -Summary: Development files for %{name} +Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} + %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package tools +Summary: Command line tools from %{libname} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tools +The %{name}-tools package provides command line tools split off %{name}: +- zipcmp +- zipmerge + + %prep %autosetup -p1 @@ -70,33 +90,54 @@ ln -s ../%{_lib}/libzip/include/zipconf.h \ %{buildroot}%{_includedir}/zipconf.h %endif +# TODO remove this - Hack to not break buildroot +cp -p %{_libdir}/libzip.so.2.1.0 %{buildroot}%{_libdir} +ln -s libzip.so.2.1.0 %{buildroot}%{_libdir}/libzip.so.2 + %check +%if %{with_tests} make check +%else +: Test suite disabled +%endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files -%doc API-CHANGES AUTHORS LICENSE NEWS README THANKS TODO +%license LICENSE +%{_libdir}/libzip.so.4* +# TODO remove this - Hack to not break buildroot +%{_libdir}/libzip.so.2* + +%files tools %{_bindir}/zipcmp %{_bindir}/zipmerge -%{_bindir}/ziptorrent -%{_libdir}/libzip.so.2* -%{_mandir}/man1/*zip* +%{_mandir}/man1/zip* %files devel +%doc API-CHANGES AUTHORS NEWS README THANKS TODO %{_includedir}/zip.h %{_includedir}/zipconf*.h %dir %{_libdir}/libzip %{_libdir}/libzip/include %{_libdir}/libzip.so %{_libdir}/pkgconfig/libzip.pc -%{_mandir}/man3/*zip* +%{_mandir}/man3/libzip* +%{_mandir}/man3/zip* +%{_mandir}/man3/ZIP* %changelog +* Tue May 5 2015 Remi Collet - 1.0.1-1 +- update to 1.0.1 +- soname bump from .2 to .4 +- drop ziptorrent +- create "tools" sub package + * Mon Mar 23 2015 Rex Dieter 0.11.2-5 - actually apply patch (using %%autosetup) diff --git a/sources b/sources index 3188a4d..f76fd3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -44c99b67dca34707b5728e5f8434fe91 libzip-0.11.2.tar.xz +e2371fc6f04a46efdaf8cbf4118ffafd libzip-1.0.1.tar.xz