From c11462288d96842ebadecd57731e4f589e49dc77 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 30 Dec 2017 08:18:40 +0100 Subject: update to 1.4.0 switch to cmake add upstream patch for lib64 --- compat_reports/1.3.2_to_1.4.0/compat_report.html | 1057 ++++++++++++++++++++++ libzip-rpath.patch | 13 + libzip-upstream.patch | 140 +++ libzip.spec | 40 +- libzip.xml | 2 +- 5 files changed, 1239 insertions(+), 13 deletions(-) create mode 100644 compat_reports/1.3.2_to_1.4.0/compat_report.html create mode 100644 libzip-rpath.patch create mode 100644 libzip-upstream.patch diff --git a/compat_reports/1.3.2_to_1.4.0/compat_report.html b/compat_reports/1.3.2_to_1.4.0/compat_report.html new file mode 100644 index 0000000..380e6f6 --- /dev/null +++ b/compat_reports/1.3.2_to_1.4.0/compat_report.html @@ -0,0 +1,1057 @@ + + + + + + + + +libzip: 1.3.2 to 1.4.0 compatibility report + + + +

API compatibility report for the libzip library between 1.3.2 and 1.4.0 versions on x86_64

+ +
+
+ Binary
Compatibility
+ Source
Compatibility
+
+

Test Info


+ + + + + + + +
Library Namelibzip
Version #11.3.2
Version #21.4.0
Archx86_64
GCC Version7
SubjectBinary Compatibility
+

Test Results


+ + + + + + +
Total Header Files2
Total Libraries1
Total Symbols / Types119 / 48
Compatibility100%
+

Problem Summary


+ + + + + + + + + + + +
SeverityCount
Added Symbols-3
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low0
Other Changes
in Data Types
-1
Other Changes
in Constants
-4
+ +

Added Symbols  3 


+zip.h, libzip.so.5.0
+zip_source_begin_write_cloning ( zip_source_t* p1, zip_uint64_t p2 )
+zip_source_buffer_fragment ( zip_t* p1, zip_buffer_fragment_t const* p2, zip_uint64_t p3, int p4 )
+zip_source_buffer_fragment_create ( zip_buffer_fragment_t const* p1, zip_uint64_t p2, int p3, zip_error_t* p4 )
+
+to the top
+ +

Other Changes in Data Types  1 


+zip.h
+ +[+] enum zip_source_cmd  1  +
+ + +
+to the top
+ +

Other Changes in Constants  4 


+zipconf.h
+ +[+] INT_LIBZIP +
+ + + +[+] LONG_LIBZIP +
+ + + +[+] LONG_LONG_LIBZIP +
+ + + +[+] SHORT_LIBZIP +
+ + +
+to the top
+

Header Files  2 


+
+zip.h
+zipconf.h
+
+
to the top
+

Libraries  1 


+
+libzip.so.5.0.0
+
+
to the top
+


+

Test Info


+ + + + + + +
Library Namelibzip
Version #11.3.2
Version #21.4.0
Archx86_64
SubjectSource Compatibility
+

Test Results


+ + + + + + +
Total Header Files2
Total Libraries1
Total Symbols / Types279 / 81
Compatibility97.8%
+

Problem Summary


+ + + + + + + + + + + +
SeverityCount
Added Symbols-3
Removed SymbolsHigh6
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low17
Other Changes
in Data Types
-1
Other Changes
in Constants
-4
+ +

Added Symbols  3 


+zip.h
+zip_source_begin_write_cloning ( zip_source_t* p1, zip_uint64_t p2 )
+zip_source_buffer_fragment ( zip_t* p1, zip_buffer_fragment_t const* p2, zip_uint64_t p3, int p4 )
+zip_source_buffer_fragment_create ( zip_buffer_fragment_t const* p1, zip_uint64_t p2, int p3, zip_error_t* p4 )
+
+to the top
+

Removed Symbols  6 


+inttypes.h
+imaxabs ( intmax_t __n )
+imaxdiv ( intmax_t __numer, intmax_t __denom )
+strtoimax ( char const*restrict __nptr, char**restrict __endptr, int __base )
+strtoumax ( char const*restrict __nptr, char**restrict __endptr, int __base )
+wcstoimax ( wchar_t const*restrict __nptr, wchar_t**restrict __endptr, int __base )
+wcstoumax ( wchar_t const*restrict __nptr, wchar_t**restrict __endptr, int __base )
+
+to the top
+ +

Problems with Constants, Low Severity  17 


+zip.h
+ +[+] ZIP_EXTRA_FIELD_ALL +
+ + + +[+] ZIP_EXTRA_FIELD_NEW +
+ + +
+zipconf.h
+ +[+] LIBZIP_VERSION +
+ + + +[+] LIBZIP_VERSION_MICRO +
+ + + +[+] LIBZIP_VERSION_MINOR +
+ + + +[+] ZIP_INT16_MAX +
+ + + +[+] ZIP_INT16_MIN +
+ + + +[+] ZIP_INT32_MAX +
+ + + +[+] ZIP_INT32_MIN +
+ + + +[+] ZIP_INT64_MAX +
+ + + +[+] ZIP_INT64_MIN +
+ + + +[+] ZIP_INT8_MAX +
+ + + +[+] ZIP_INT8_MIN +
+ + + +[+] ZIP_UINT16_MAX +
+ + + +[+] ZIP_UINT32_MAX +
+ + + +[+] ZIP_UINT64_MAX +
+ + + +[+] ZIP_UINT8_MAX +
+ + +
+to the top
+ +

Other Changes in Data Types  1 


+zip.h
+ +[+] enum zip_source_cmd  1  +
+ + +
+to the top
+ +

Other Changes in Constants  4 


+zipconf.h
+ +[+] INT_LIBZIP +
+ + + +[+] LONG_LIBZIP +
+ + + +[+] LONG_LONG_LIBZIP +
+ + + +[+] SHORT_LIBZIP +
+ + +
+to the top
+

Header Files  2 


+
+zip.h
+zipconf.h
+
+
to the top
+

Libraries  1 


+
+libzip.so.5.0.0
+
+
to the top
+



+ +
+ + diff --git a/libzip-rpath.patch b/libzip-rpath.patch new file mode 100644 index 0000000..bc5e2da --- /dev/null +++ b/libzip-rpath.patch @@ -0,0 +1,13 @@ +diff -up ./CMakeLists.txt.rpm ./CMakeLists.txt +--- ./CMakeLists.txt.rpm 2017-12-30 07:46:53.988134130 +0100 ++++ ./CMakeLists.txt 2017-12-30 07:47:03.787185954 +0100 +@@ -139,9 +139,6 @@ endif(CMAKE_SYSTEM_NAME MATCHES WindowsP + + ADD_DEFINITIONS("-DHAVE_CONFIG_H") + +-# rpath handling: use rpath in installed binaries +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # Testing + ENABLE_TESTING() diff --git a/libzip-upstream.patch b/libzip-upstream.patch new file mode 100644 index 0000000..50be182 --- /dev/null +++ b/libzip-upstream.patch @@ -0,0 +1,140 @@ +From 42a3c4a40b9925b8ef0fb8f38b200fdc9f6fe5a4 Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Fri, 29 Dec 2017 22:29:37 +0100 +Subject: [PATCH] Use GNUInstallDirs variables to allow installation + customization. + +--- + CMakeLists.txt | 13 ++++++------- + lib/CMakeLists.txt | 8 ++++---- + src/CMakeLists.txt | 6 +++--- + 3 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69cdb8b..b61f5ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,5 @@ + # TODO: +-# 1. Problems generating html pages. +-# 2. create usable libtool .la file ++# create usable libtool .la file + + CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2) + +@@ -141,7 +140,7 @@ endif(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES Window + ADD_DEFINITIONS("-DHAVE_CONFIG_H") + + # rpath handling: use rpath in installed binaries +-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") ++SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # Testing +@@ -157,8 +156,8 @@ ADD_SUBDIRECTORY(examples) + # pkgconfig file + SET(prefix ${CMAKE_INSTALL_PREFIX}) + SET(exec_prefix \${prefix}) +-SET(libdir \${exec_prefix}/lib) +-SET(includedir \${prefix}/include) ++SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) ++SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) + IF(BZIP2_FOUND) + SET(LIBS "${LIBS} -lbz2") + ENDIF() +@@ -167,7 +166,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES BSD) + SET(PKG_CONFIG_RPATH "-Wl,-R\${libdir}") + ENDIF(CMAKE_SYSTEM_NAME MATCHES BSD) + CONFIGURE_FILE(libzip.pc.in libzip.pc @ONLY) +-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzip.pc DESTINATION lib/pkgconfig) ++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + # write out config file + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +@@ -188,4 +187,4 @@ FILE(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/runtest + + # installation + +-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION include) ++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 855ccf5..ecbb45e 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -1,6 +1,6 @@ + INCLUDE(CheckFunctionExists) + +-INSTALL(FILES zip.h DESTINATION include) ++INSTALL(FILES zip.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + # from http://www.cmake.org/Wiki/CMakeMacroLibtoolFile + MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value) +@@ -203,7 +203,7 @@ ADD_LIBRARY(zip ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) + SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 5.0 SOVERSION 5) + TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY} ${OPTIONAL_LIBRARY}) + INSTALL(TARGETS zip +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + #CREATE_LIBTOOL_FILE(zip lib) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2a3f4d2..ccc8f7e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -8,12 +8,12 @@ ENDIF(NOT HAVE_GETOPT) + + ADD_EXECUTABLE(zipcmp zipcmp.c ${SRC_EXTRA_FILES}) + TARGET_LINK_LIBRARIES(zipcmp zip) +-INSTALL(TARGETS zipcmp RUNTIME DESTINATION bin) ++INSTALL(TARGETS zipcmp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + ADD_EXECUTABLE(zipmerge zipmerge.c ${SRC_EXTRA_FILES}) + TARGET_LINK_LIBRARIES(zipmerge zip) +-INSTALL(TARGETS zipmerge RUNTIME DESTINATION bin) ++INSTALL(TARGETS zipmerge RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + ADD_EXECUTABLE(ziptool ziptool.c ${SRC_EXTRA_FILES}) + TARGET_LINK_LIBRARIES(ziptool zip) +-INSTALL(TARGETS ziptool RUNTIME DESTINATION bin) ++INSTALL(TARGETS ziptool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +From 3a7497b791289e316aa794b7f2f1a95dd26ced26 Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Fri, 29 Dec 2017 22:35:53 +0100 +Subject: [PATCH] Set bindir in pkgconfig file and use it. + +--- + CMakeLists.txt | 1 + + libzip.pc.in | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b61f5ea..3366b25 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -156,6 +156,7 @@ ADD_SUBDIRECTORY(examples) + # pkgconfig file + SET(prefix ${CMAKE_INSTALL_PREFIX}) + SET(exec_prefix \${prefix}) ++SET(bindir \${exec_prefix}/${CMAKE_INSTALL_BINDIR}) + SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) + SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) + IF(BZIP2_FOUND) +diff --git a/libzip.pc.in b/libzip.pc.in +index 53abc47..7be7f3e 100644 +--- a/libzip.pc.in ++++ b/libzip.pc.in +@@ -1,9 +1,10 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ ++bindir=@bindir@ + libdir=@libdir@ + includedir=@includedir@ + +-zipcmp=@prefix@/bin/zipcmp ++zipcmp=@bindir@/zipcmp + + Name: libzip + Description: library for handling zip archives diff --git a/libzip.spec b/libzip.spec index 4a6a9a1..b0329e2 100644 --- a/libzip.spec +++ b/libzip.spec @@ -17,7 +17,7 @@ Name: %{libname} %else Name: %{libname}%{soname} %endif -Version: 1.3.2 +Version: 1.4.0 Release: 1%{?dist} Group: System Environment/Libraries Summary: C library for reading, creating, and modifying zip archives @@ -26,8 +26,18 @@ License: BSD URL: https://libzip.org/ Source0: https://libzip.org/download/libzip-%{version}.tar.xz +# drop RPATH from installed binaries +Patch0: libzip-rpath.patch +# allow path customization (lib64) +Patch1: libzip-upstream.patch + BuildRequires: zlib-devel BuildRequires: bzip2-devel +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +BuildRequires: cmake3 >= 3.0.2 +%else +BuildRequires: cmake >= 3.0.2 +%endif # Needed to run the test suite # find regress/ -type f | /usr/lib/rpm/perl.req # find regress/ -type f | /usr/lib/rpm/perl.prov @@ -104,17 +114,21 @@ The %{name}-tools package provides command line tools split off %{name}: %prep %setup -q -n %{libname}-%{version} +%patch1 -p1 -b .upstream +%patch0 -p1 -b .rpm -# Avoid lib64 rpaths (FIXME: recheck this on newer releases) -%if "%{_libdir}" != "/usr/lib" -sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure -#autoreconf -f -i -%endif +# unwanted in package documentation +rm INSTALL.md %build -%configure \ - --disable-static +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +# drop skipped test which make test suite fails (cmake issue ?) +sed -e '/clone-fs-/d' -i regress/CMakeLists.txt +%cmake3 . +%else +%cmake . +%endif make %{?_smp_mflags} @@ -122,9 +136,6 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} INSTALL='install -p' -## unpackaged files -rm -fv %{buildroot}%{_libdir}/lib*.la - %check %if %{with_tests} @@ -151,7 +162,7 @@ make check %{_mandir}/man1/zip* %files devel -%doc API-CHANGES AUTHORS THANKS *.md +%doc AUTHORS THANKS *.md %{_includedir}/zip.h %{_includedir}/zipconf*.h %{_libdir}/libzip.so @@ -162,6 +173,11 @@ make check %changelog +* Sat Dec 30 2017 Remi Collet - 1.4.0-1 +- update to 1.4.0 +- switch to cmake +- add upstream patch for lib64 + * Mon Nov 20 2017 Remi Collet - 1.3.2-1 - update to 1.3.2 diff --git a/libzip.xml b/libzip.xml index 0696548..92c639e 100644 --- a/libzip.xml +++ b/libzip.xml @@ -9,7 +9,7 @@ -1.3.2 +1.4.0 -- cgit