From bd9ef03952031919edd96885295ce9b48fa3d3e1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Jul 2020 10:53:09 +0200 Subject: update to 1.7.2 fix installation layout using patch from https://github.com/nih-at/libzip/pull/190 fix pkgconfig usability using patch from https://github.com/nih-at/libzip/pull/191 --- compat_reports/1.7.1_to_1.7.2/compat_report.html | 519 +++++++++++++++++++++++ libzip-gnuinstalldirs.patch | 126 ++++++ libzip-privlibs.patch | 65 +++ libzip.spec | 34 +- libzip.xml | 2 +- 5 files changed, 735 insertions(+), 11 deletions(-) create mode 100644 compat_reports/1.7.1_to_1.7.2/compat_report.html create mode 100644 libzip-gnuinstalldirs.patch create mode 100644 libzip-privlibs.patch diff --git a/compat_reports/1.7.1_to_1.7.2/compat_report.html b/compat_reports/1.7.1_to_1.7.2/compat_report.html new file mode 100644 index 0000000..85cdf05 --- /dev/null +++ b/compat_reports/1.7.1_to_1.7.2/compat_report.html @@ -0,0 +1,519 @@ + + + + + + + + + +libzip: 1.7.1 to 1.7.2 compatibility report + + + +

API compatibility report for the libzip library between 1.7.1 and 1.7.2 versions on x86_64

+ +
+
+ Binary
Compatibility
+ Source
Compatibility
+
+

Test Info


+ + + + + + + +
Library Namelibzip
Version #11.7.1
Version #21.7.2
Archx86_64
GCC Version9
SubjectBinary Compatibility
+

Test Results


+ + + + + + +
Total Header Files2
Total Libraries1
Total Symbols / Types125 / 54
Compatibility100%
+

Problem Summary


+ + + + + + + + + +
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low0
+ +

Header Files  2 


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

Libraries  1 


+
+libzip.so.5.3
+
+
to the top
+


+

Test Info


+ + + + + + +
Library Namelibzip
Version #11.7.1
Version #21.7.2
Archx86_64
SubjectSource Compatibility
+

Test Results


+ + + + + + +
Total Header Files2
Total Libraries1
Total Symbols / Types263 / 91
Compatibility100%
+

Problem Summary


+ + + + + + + + + +
SeverityCount
Added Symbols-0
Removed SymbolsHigh0
Problems with
Data Types
High0
Medium0
Low0
Problems with
Symbols
High0
Medium0
Low0
Problems with
Constants
Low2
+ + +

Problems with Constants, Low Severity  2 


+zipconf.h
+ +[+] LIBZIP_VERSION +
+ + + +[+] LIBZIP_VERSION_MICRO +
+ + +
+to the top
+

Header Files  2 


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

Libraries  1 


+
+libzip.so.5.3
+
+
to the top
+



+ +
+ + diff --git a/libzip-gnuinstalldirs.patch b/libzip-gnuinstalldirs.patch new file mode 100644 index 0000000..088b5a6 --- /dev/null +++ b/libzip-gnuinstalldirs.patch @@ -0,0 +1,126 @@ +From ebe01b5c259fa28b4da24cc1c11ab24a31281b64 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 13 Jul 2020 08:16:59 +0200 +Subject: [PATCH] restore GNUInstallDirs + +--- + CMakeLists.txt | 17 +++++++++-------- + lib/CMakeLists.txt | 10 +++++----- + man/CMakeLists.txt | 8 ++++---- + 3 files changed, 18 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8013d2ea..b2f81b1c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,6 +29,7 @@ include(CheckCSourceRuns) + include(CheckCSourceCompiles) + include(CheckStructHasMember) + include(TestBigEndian) ++include(GNUInstallDirs) + if(ENABLE_COMMONCRYPTO) + check_include_files(CommonCrypto/CommonCrypto.h COMMONCRYPTO_FOUND) + else() +@@ -234,7 +235,7 @@ endif(WIN32) + + # rpath handling: use rpath in installed binaries + if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) +- 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) + endif() + +@@ -279,9 +280,9 @@ endif() + # pkgconfig file + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix \${prefix}) +-set(bindir \${exec_prefix}/bin) +-set(libdir \${exec_prefix}/lib) +-set(includedir \${prefix}/include) ++SET(bindir \${exec_prefix}/${CMAKE_INSTALL_BINDIR}) ++SET(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) ++SET(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) + if(CMAKE_SYSTEM_NAME MATCHES BSD) + set(PKG_CONFIG_RPATH "-Wl,-R\${libdir}") + endif(CMAKE_SYSTEM_NAME MATCHES BSD) +@@ -295,7 +296,7 @@ foreach(LIB ${LIBS_PRIVATE}) + endforeach() + configure_file(libzip.pc.in libzip.pc @ONLY) + if(LIBZIP_DO_INSTALL) +- install(FILES ${PROJECT_BINARY_DIR}/libzip.pc DESTINATION lib/pkgconfig) ++ install(FILES ${PROJECT_BINARY_DIR}/libzip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() + + # fixed size integral types +@@ -417,7 +418,7 @@ write_basic_package_version_file("${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-v + COMPATIBILITY AnyNewerVersion) + + configure_package_config_file("${PROJECT_NAME}-config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" +- INSTALL_DESTINATION lib/cmake/libzip) ++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libzip) + + # Add targets to the build-tree export set + export(TARGETS zip +@@ -427,10 +428,10 @@ export(TARGETS zip + if(LIBZIP_DO_INSTALL) + install(FILES ${PROJECT_BINARY_DIR}/zipconf.h DESTINATION include) + install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake +- DESTINATION lib/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + ) + install(EXPORT ${PROJECT_NAME}-targets NAMESPACE libzip:: FILE ${PROJECT_NAME}-targets.cmake +- DESTINATION lib/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + ) + endif() + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 5a6f1713..082203d0 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -181,11 +181,11 @@ target_include_directories(zip + if(LIBZIP_DO_INSTALL) + install(TARGETS zip + EXPORT ${PROJECT_NAME}-targets +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- INCLUDES DESTINATION include +- LIBRARY DESTINATION lib) +- install(FILES zip.h DESTINATION include) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES zip.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + endif() + + # create zip_err_str.h from zip.h +diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt +index ce714ec4..90d462a5 100644 +--- a/man/CMakeLists.txt ++++ b/man/CMakeLists.txt +@@ -104,10 +104,10 @@ foreach(MAN_PAGE ${MAN_PAGES}) + string(REGEX REPLACE "[1-9]$" "${DOCUMENTATION_FORMAT}" SOURCE_FILE ${MAN_PAGE}) + if(LIBZIP_DO_INSTALL) + if (DOCUMENTATION_FORMAT MATCHES "html") +- install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION share/doc/${PROJECT_NAME} RENAME ${SOURCE_FILE}) ++ install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME} RENAME ${SOURCE_FILE}) + else() + string(REGEX REPLACE ".*(.)$" "man\\1" SUBDIR ${MAN_PAGE}) +- install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION man/${SUBDIR}) ++ install(FILES ${PROJECT_BINARY_DIR}/man/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_MANDIR}/${SUBDIR}) + endif() + endif() + # configure_file does not find out about updates to the sources, and it does not provide a target +@@ -147,9 +147,9 @@ foreach(LINKS_LINE ${MANPAGE_LINKS}) + set(TARGET ${CMAKE_MATCH_2}) + if(LIBZIP_DO_INSTALL) + if (DOCUMENTATION_FORMAT MATCHES "html") +- INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION share/doc/${PROJECT_NAME} RENAME ${TARGET}.html) ++ INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME} RENAME ${TARGET}.html) + else() +- INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION man/man3 RENAME ${TARGET}.3) ++ INSTALL(FILES ${PROJECT_BINARY_DIR}/man/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 RENAME ${TARGET}.3) + endif() + endif() + endif() diff --git a/libzip-privlibs.patch b/libzip-privlibs.patch new file mode 100644 index 0000000..779d10c --- /dev/null +++ b/libzip-privlibs.patch @@ -0,0 +1,65 @@ +From a5cc4eb9e2ea44253bb1ca9f59ca65a314127cef Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 13 Jul 2020 09:10:26 +0200 +Subject: [PATCH] switch back to library names from find_package + +--- + lib/CMakeLists.txt | 12 ++++++------ + src/CMakeLists.txt | 2 +- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 5a6f1713..7ae2afef 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -138,12 +138,12 @@ endif(WIN32) + + if(HAVE_LIBBZ2) + target_sources(zip PRIVATE zip_algorithm_bzip2.c) +- target_link_libraries(zip PRIVATE BZip2::BZip2) ++ target_link_libraries(zip PRIVATE ${BZIP2_LIBRARIES}) + endif() + + if(HAVE_LIBLZMA) + target_sources(zip PRIVATE zip_algorithm_xz.c) +- target_link_libraries(zip PRIVATE LibLZMA::LibLZMA) ++ target_link_libraries(zip PRIVATE ${LIBLZMA_LIBRARY}) + endif() + + if(HAVE_COMMONCRYPTO) +@@ -153,13 +153,13 @@ elseif(HAVE_WINDOWS_CRYPTO) + target_link_libraries(zip PRIVATE bcrypt) + elseif(HAVE_GNUTLS) + target_sources(zip PRIVATE zip_crypto_gnutls.c) +- target_link_libraries(zip PRIVATE GnuTLS::GnuTLS Nettle::Nettle) ++ target_link_libraries(zip PRIVATE ${GNUTLS_LIBRARY} ${NETTLE_LIBRARY}) + elseif(HAVE_OPENSSL) + target_sources(zip PRIVATE zip_crypto_openssl.c) +- target_link_libraries(zip PRIVATE OpenSSL::Crypto) ++ target_link_libraries(zip PRIVATE ${OPENSSL_LIBRARIES}) + elseif(HAVE_MBEDTLS) + target_sources(zip PRIVATE zip_crypto_mbedtls.c) +- target_link_libraries(zip PRIVATE MbedTLS::MbedTLS) ++ target_link_libraries(zip PRIVATE ${MBEDTLS_LIBRARIES}) + endif() + + if(HAVE_CRYPTO) +@@ -170,7 +170,7 @@ if(SHARED_LIB_VERSIONNING) + set_target_properties(zip PROPERTIES VERSION 5.3 SOVERSION 5) + endif() + +-target_link_libraries(zip PRIVATE ZLIB::ZLIB) ++target_link_libraries(zip PRIVATE ${ZLIB_LIBRARIES}) + target_include_directories(zip + PUBLIC + $ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b6eb0b19..85ce0e63 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -10,4 +10,4 @@ foreach(PROGRAM zipcmp zipmerge ziptool) + target_sources(${PROGRAM} PRIVATE getopt.c) + endif(NOT HAVE_GETOPT) + endforeach() +-target_link_libraries(zipcmp ${FTS_LIB} ZLIB::ZLIB) ++target_link_libraries(zipcmp ${FTS_LIB} ${ZLIB_LIBRARIES}) diff --git a/libzip.spec b/libzip.spec index bec3ccd..fefcd17 100644 --- a/libzip.spec +++ b/libzip.spec @@ -10,7 +10,7 @@ # %global libname libzip %global soname 5 -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %if 0%{?rhel} == 6 %global with_xz 0 %else @@ -22,7 +22,7 @@ Name: %{libname} %else Name: %{libname}%{soname} %endif -Version: 1.7.1 +Version: 1.7.2 Release: 1%{?dist} Summary: C library for reading, creating, and modifying zip archives @@ -30,12 +30,15 @@ License: BSD URL: https://libzip.org/ Source0: https://libzip.org/download/libzip-%{version}.tar.xz +Patch0: libzip-gnuinstalldirs.patch +Patch1: libzip-privlibs.patch + BuildRequires: gcc -BuildRequires: zlib-devel +BuildRequires: zlib-devel >= 1.1.2 BuildRequires: bzip2-devel BuildRequires: openssl-devel %if %{with_xz} -BuildRequires: xz-devel +BuildRequires: xz-devel >= 5.2 %endif %if 0%{?rhel} == 6 || 0%{?rhel} == 7 BuildRequires: cmake3 >= 3.0.2 @@ -116,21 +119,25 @@ The %{name}-tools package provides command line tools split off %{name}: %prep %setup -q -n %{libname}-%{version} +%patch0 -p1 -b .gnuinstalldirs +%patch1 -p1 -b .privlib # unwanted in package documentation rm INSTALL.md -%if ! %{with_xz} -sed -e '/store_to_xz.test/d;/xz_to_store.test/d' -i regress/CMakeLists.txt -%endif - %build -%if 0%{?rhel} == 6 || 0%{?rhel} == 7 # drop skipped test which make test suite fails (cmake issue ?) sed -e '/clone-fs-/d' \ +%if ! %{with_xz} + -e '/store_to_xz.test/d;/xz_to_store.test/d' \ +%endif +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 -e '/add_from_stdin/d' \ +%endif -i regress/CMakeLists.txt + +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 sed -e 's/COMMAND cmake /COMMAND cmake3 /' -i CMakeLists.txt regress/CMakeLists.txt %cmake3 \ %else @@ -161,7 +168,7 @@ make install DESTDIR=%{buildroot} INSTALL='install -p' %check -%if %{with_tests} +%if %{with tests} make check %else : Test suite disabled @@ -198,6 +205,13 @@ make check %changelog +* Mon Jul 13 2020 Remi Collet - 1.7.2-1 +- update to 1.7.2 +- fix installation layout using patch from + https://github.com/nih-at/libzip/pull/190 +- fix pkgconfig usability using patch from + https://github.com/nih-at/libzip/pull/191 + * Sun Jun 14 2020 Remi Collet - 1.7.1-1 - update to 1.7.1 diff --git a/libzip.xml b/libzip.xml index b67343d..30940b6 100644 --- a/libzip.xml +++ b/libzip.xml @@ -9,7 +9,7 @@ -1.7.1 +1.7.2 -- cgit