Rebase to upstream release 3.0.0

Use OpenSSL instead of ports of Brian Gladman
epel9
Patrik Novotný 4 years ago
parent a5d3135fe1
commit d1964984c6

1
.gitignore vendored

@ -18,3 +18,4 @@
/aes-gladman-minizip-2.10.6.tar.gz
/minizip-2.10.6.tar.gz
/sha-gladman-minizip-2.10.6.tar.gz
/minizip-3.0.0-1.fc34.src.rpm

@ -1,32 +0,0 @@
From cde57e38025f798d9cf23ae3ecd3594e135e6ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
Date: Wed, 28 Nov 2018 14:38:38 +0100
Subject: [PATCH] Use absolute paths for install directories.
---
CMakeLists.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cc7bf59..a936be15 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,12 +39,12 @@ include(CheckTypeSize)
include(GNUInstallDirs)
include(ExternalProject)
-set(INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Installation directory for executables")
-set(INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries")
-set(INSTALL_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Installation directory for headers")
-set(INSTALL_MAN_DIR ${CMAKE_INSTALL_MANDIR} CACHE PATH "Installation directory for manual pages")
-set(INSTALL_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH "Installation directory for pkgconfig (.pc) files")
-set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/minizip CACHE PATH "Installation directory for cmake files.")
+set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" CACHE PATH "Installation directory for executables")
+set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation directory for libraries")
+set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH "Installation directory for headers")
+set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}" CACHE PATH "Installation directory for manual pages")
+set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
+set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/minizip" CACHE PATH "Installation directory for cmake files.")
set(MINIZIP_PC ${CMAKE_CURRENT_BINARY_DIR}/minizip.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/minizip.pc.cmakein ${MINIZIP_PC} @ONLY)

@ -1,44 +0,0 @@
From 861ba9e9fe82403805119fb3879f77d2d80be1fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
Date: Mon, 26 Oct 2020 16:23:03 +0100
Subject: [PATCH] Allow option to skip git clone for MZ_BRG
Downloading additional sources during build is problematic for
distribution integration.
---
CMakeLists.txt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c7d45d..4f775d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,9 +31,10 @@
option(MZ_BUILD_FUZZ_TEST "Builds minizip fuzzer executables" OFF)
option(MZ_CODE_COVERAGE "Builds with code coverage flags" OFF)
option(MZ_FILE32_API "Builds using posix 32-bit file api" OFF)
+option(BRG_FORCE_FETCH "Clone Brian Gladman's encryption library from GIT" ON)
set(MZ_PROJECT_SUFFIX "" CACHE STRING "Project name suffix for package managers")
-mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX)
+mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX BRG_FORCE_FETCH)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 OLD)
@@ -475,8 +476,10 @@
message(FATAL_ERROR "AES and SHA libraries not found")
endif()
- clone_repo(aes https://github.com/BrianGladman/aes)
- clone_repo(sha https://github.com/BrianGladman/sha)
+ if(BRG_FORCE_FETCH)
+ clone_repo(AES https://github.com/BrianGladman/aes)
+ clone_repo(SHA https://github.com/BrianGladman/sha)
+ endif()
set(BRG_AES_SRC
lib/aes/brg_endian.h
2.26.2
--- minizip-2.10.6/CMakeLists.txt 2020-12-29 22:16:01.000000000 +0100
+++ blahbleh 2021-01-12 14:07:44.050770188 +0100

@ -1,34 +0,0 @@
From 3f9345400bec0676acbb023e0755fc7daee6a26a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
Date: Tue, 27 Oct 2020 10:08:31 +0100
Subject: [PATCH] Rename Brian Gladman's shared libraries
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f775d8..b3e0649 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -507,8 +507,8 @@
lib/sha/sha1.h
lib/sha/sha2.h)
- add_library(aes STATIC ${BRG_AES_SRC} ${BRG_AES_HDR})
- add_library(sha STATIC ${BRG_SHA_SRC} ${BRG_SHA_HDR})
+ add_library(aes-gladman STATIC ${BRG_AES_SRC} ${BRG_AES_HDR})
+ add_library(sha-gladman STATIC ${BRG_SHA_SRC} ${BRG_SHA_HDR})
# Check to see which random generation functions we have
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
@@ -555,7 +555,7 @@
list(APPEND MINIZIP_SRC mz_crypt_brg.c)
list(APPEND MINIZIP_INC lib/aes lib/sha)
- list(APPEND MINIZIP_DEP aes sha)
+ list(APPEND MINIZIP_DEP aes-gladman sha-gladman)
endif()
# Include compatibility layer
2.26.2

@ -1,20 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d070550..a191805 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -599,7 +599,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${VERSION}
SOVERSION ${SOVERSION}
LINKER_LANGUAGE C
- PREFIX ""
+ PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX}
DEFINE_SYMBOL "MZ_EXPORTS"
POSITION_INDEPENDENT_CODE 1)
if(MZ_LZMA)
@@ -804,4 +804,4 @@ if(MZ_BUILD_FUZZ_TEST)
install(TARGETS zip_fuzzer RUNTIME DESTINATION "bin")
install(TARGETS unzip_fuzzer RUNTIME DESTINATION "bin")
endif()
-endif()
+endif()
\ No newline at end of file

@ -1,21 +1,20 @@
Name: minizip
Version: 2.10.6
Release: 2%{?dist}
Version: 3.0.0
Release: 1%{?dist}
Summary: Minizip contrib in zlib with the latest bug fixes and advanced features
License: zlib
URL: https://github.com/nmoinvaz/%{name}
Source0: https://github.com/nmoinvaz/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/BrianGladman/aes/archive/master.tar.gz#/aes-gladman-%{name}-%{version}.tar.gz
Source2: https://github.com/BrianGladman/sha/archive/master.tar.gz#/sha-gladman-%{name}-%{version}.tar.gz
Patch0: minizip-2.10.2-BRG_FORCE_FETCH.patch
Patch1: minizip-2.10.2-rename-gladmans-shared-libraries.patch
BuildRequires: make
BuildRequires: cmake gcc-c++ libbsd-devel zlib-devel bzip2-devel libzstd-devel xz-devel
Provides: bundled(aes-gladman)
Provides: bundled(sha1-gladman)
BuildRequires: cmake gcc-c++
BuildRequires: libbsd-devel
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: libzstd-devel
BuildRequires: xz-devel
BuildRequires: openssl-devel
%description
@ -37,17 +36,11 @@ Development files for %{name} library.
%prep
%autosetup -p1
mkdir lib
cd lib
gzip -dc %{_sourcedir}/aes-gladman-%{name}-%{version}.tar.gz | tar -xvvf -
gzip -dc %{_sourcedir}/sha-gladman-%{name}-%{version}.tar.gz | tar -xvvf -
mv aes{-master,}
mv sha{-master,}
%autosetup -n %{name}-ng-%{version}
%build
%cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} -DZSTD_FORCE_FETCH=OFF -DBRG_FORCE_FETCH=OFF
%cmake . -DMZ_BUILD_TEST=ON -DSKIP_INSTALL_BINARIES=ON -DINSTALL_INC_DIR=%{_includedir}/%{name} -DZSTD_FORCE_FETCH=OFF
%cmake_build
@ -66,8 +59,6 @@ make test
%license LICENSE
%doc README.md
%{_libdir}/lib%{name}.so.*
%{_libdir}/libaes-gladman.a
%{_libdir}/libsha-gladman.a
%files devel
@ -79,6 +70,10 @@ make test
%{_includedir}/%{name}/zip.h
%changelog
* Tue Feb 09 2021 Patrik Novotný <panovotn@redhat.com> - 3.0.0-1
- Rebase to upstream release 3.0.0
- Use OpenSSL instead of BRG libraries
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

@ -1,3 +1 @@
SHA512 (aes-gladman-minizip-2.10.6.tar.gz) = f9eb661b4c1dca7803b31be1e97a07e97e5042cda6ab390444626272e368a7bb5331c50c46c862e6901e03c4227222332efab6361880a49c9810fb3a734b6de8
SHA512 (minizip-2.10.6.tar.gz) = 8ac8fb7325c6795379c49c1aff7e86ae06be18879e579a89c4c0c5b0726548cdfaa1afeeda06abf6be7496a8f3f2462266f976529fa75705f6ea9f89db70cac8
SHA512 (sha-gladman-minizip-2.10.6.tar.gz) = 33f8915168fe161df3243731d8949611824abee36089eae91540162edc4b972d758268c7cab9e5fc7e908af5ce4affd8cdda7b0ce727b3d7c7f2ef15126e1e36
SHA512 (minizip-3.0.0-1.fc34.src.rpm) = 3971f18d60faf7dc383edfecc44f2f4a0266ccfd41e443b257854703d78b111f281cca10f2351600222ca7641c8b4b45c007d33ea13e4e36944224a2772520f3

Loading…
Cancel
Save