summaryrefslogtreecommitdiff
path: root/sys-libs/minizip-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-01 02:21:02 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-01 02:21:02 +0000
commitd682a95de35077b0728025627e082b67339fa249 (patch)
tree39d9937c5811d188bcc3ca56fd3305a42f94fde6 /sys-libs/minizip-ng
parentc4b414ba84991b36b62c066b701385eaf44cdd49 (diff)
gentoo auto-resync : 01:01:2023 - 02:21:02
Diffstat (limited to 'sys-libs/minizip-ng')
-rw-r--r--sys-libs/minizip-ng/Manifest6
-rw-r--r--sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch68
-rw-r--r--sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch129
-rw-r--r--sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild (renamed from sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild)20
4 files changed, 14 insertions, 209 deletions
diff --git a/sys-libs/minizip-ng/Manifest b/sys-libs/minizip-ng/Manifest
index dfd281b88071..daa5eda80065 100644
--- a/sys-libs/minizip-ng/Manifest
+++ b/sys-libs/minizip-ng/Manifest
@@ -1,8 +1,6 @@
-AUX minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch 2040 BLAKE2B 679a4c8878b06eb28352942e6b0f8285daf0f2d1cc3315071e3592f10fcfaaa11caf1b67e4a73c83201a85bf63750bbf7d3d0d4d7c2a5b2dd1b317eb5beac9f6 SHA512 b1913d03a49931b929435372b2e07d63ec13bf0513ac39549612514443efcd114d143848e6d0a6de751f1ed8499ecae4ecbfb0fce579e6e66549ea90f862417d
-AUX minizip-ng-3.0.6-test-temporary.patch 6922 BLAKE2B 65bc4803aec94e56d7d868096320bac78f425485cff9c0d8d7214e5321e136e239100c292356be69e638f34bba6104bbca95e3db7e8b9f71ccec5e60cab92510 SHA512 e52ebc658cf1bc6df0fcff481562fe61527fbae6fd4a1477ef0a9185e967d9eb0ea7678e6f330429f993fae97a639baf82df672fc1a71275c7f3d7f1c83c8596
AUX minizip-ng-3.0.7-system-gtest.patch 733 BLAKE2B 9af012238754b34424eeb55d117fd5ae700ef971a8b58e0240d576b459bf7c1ae67e762bfd16dcbb95b206b019f9728eae8d4a1482fe85f21e884880494e9e78 SHA512 9020ef82288e9e92136a68acbc2310ff227d1e4f089f625b95224c5944c17c4c092dd7ed93345fb2cd8522e18ba0361868fd269dc545181270416009bbf6c37f
-DIST minizip-ng-3.0.6.tar.gz 642138 BLAKE2B 3faddeef035da0417671ef5578b90ad9ec9a69f376d04fb8095f93e27e3276931ef432e179613e841e754ff6e915e8c631eeaa48795aaa87773e45465bd14afa SHA512 92aaad655e7dbec60ab8075435ccdc72314f75f0516aa4a16094215df2b14b108c2b49cdf6c876e396f0f43f52ad63f52ce7db2e119efe25c55b8b873bef9d4f
DIST minizip-ng-3.0.7.tar.gz 643065 BLAKE2B e7026a5cc54fac6eba6fd1e79f8d53474966999aec1c24c70ff2207b93314f1e1cf5360841570ace66a30d6178f0057428757c7ba9b2d4bb14feb397142dedcb SHA512 01805ec955514efca32f4beb0e1241e94591d7d1d6119036c55d898a595de038bb18b8a2ffe5dab13101a890d14485aaefdf81680a7c60aa4ab3fd9de63ee991
-EBUILD minizip-ng-3.0.6-r1.ebuild 2630 BLAKE2B 064300fb88178deb975a1d289da94d6ab8160a9abb4fe56eb6d97c9a97891b33bd87103879b23357de7f1d752fa97b0a5bb243c9fd5e423495db6e739c0e736c SHA512 2c3bcf82cf6791458fbfef030f2299a3fe1b841501b4b80666fb4f14d35eb90e1533eed8724002e04af5dc3375ced455144f639806f37ea0b828576caa304c8a
+DIST minizip-ng-3.0.8.tar.gz 643788 BLAKE2B aa937fe8d0e776c8a00754c7a5eae7769b096d044a1b65b124adc0531b757579d8e0e0f5a4784669d9d94a7ea512625160b8b02f908a29e027f31911adf0f524 SHA512 f9742c5fc54ac08d78d7e942e90a7e7f1bc40a2812e7555570bd152ed441dbc5a004b79d2edf32d3fbda64db493cd1a0512d16deb84c0791d3fc86718e9ad0b1
EBUILD minizip-ng-3.0.7.ebuild 2584 BLAKE2B 2eb43757b21e6cc60d3bdd18700e86d10b2d98102780adf0d56407e899762850e0ac1113242b642b9b5a300ec848168dbff3436706030b94ff33b25486060699 SHA512 541621a23fcb02d2a58583f39193c81fd9e06079596240f6424f764d5b8f9b810c4c5b9279119019ed1f657aac575134247475957a79b59caf5021132feeeee0
+EBUILD minizip-ng-3.0.8.ebuild 2526 BLAKE2B 91191963335fbdcb08a62bcf4abcfc6e0389f14e813b949eaafd6fa91b6f4d7806cb0913c5025fd2f94be1a2a9681f1b6ca51455be8237217b2baec1ce300b81 SHA512 653d3d2ad33a897956373cfe0590d69fda129670731a5dbb60daf1dfc56ab85e7f52039ff71714591483665d5c87d26867d882296b18ef9608e44f15d8554798
MISC metadata.xml 638 BLAKE2B 8a74cb73b53a8fa34aa5ad31ff7770fe47a6224161b6cce692d837004ffcbad15de7d318b3eb9dfa6db0f6f83eae0ed6238df19c27a82daeb7d958113f96478f SHA512 596d4f19cd3680b59ba2f94a8ebedb1fa84f5ca9e3d5125c76b5e787cd8b2e560152bf8151bfe140d03beae6a244b7a87210cc211c8493e0766852c776eef721
diff --git a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch b/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch
deleted file mode 100644
index 92db9c05b5d1..000000000000
--- a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-https://github.com/zlib-ng/minizip-ng/pull/651
-
-From 1be6ea22e127a99786aefd2896e08bab43ad1333 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Sun, 2 Oct 2022 01:39:17 +0100
-Subject: [PATCH] Switch getrandom() and arc4random_buf() usage order
-
-We need to match the order of inclusions at the top of the file
-otherwise we might end up trying to use arc4random_buf() when
-available (because HAVE_ARC4RANODM_BUF is set) even though
-we hit HAVE_GETRANDOM first above and only included
-<sys/random.h> because of it.
-
-Besides, if getrandom() is available, we should really prefer
-it anyway.
-
-Fixes an implicit function declaration:
-```
-minizip-ng-3.0.6/mz_os_posix.c:124:5: error: implicit declaration of function 'arc4random_buf' [-Werror=implicit-function-declaration]
-```
---- a/mz_os_posix.c
-+++ b/mz_os_posix.c
-@@ -117,7 +117,22 @@ void mz_os_utf8_string_delete(uint8_t **string) {
-
- /***************************************************************************/
-
--#if defined(HAVE_ARC4RANDOM_BUF)
-+#if defined(HAVE_GETRANDOM)
-+int32_t mz_os_rand(uint8_t *buf, int32_t size) {
-+ int32_t left = size;
-+ int32_t written = 0;
-+
-+ while (left > 0) {
-+ written = getrandom(buf, left, 0);
-+ if (written < 0)
-+ return MZ_INTERNAL_ERROR;
-+
-+ buf += written;
-+ left -= written;
-+ }
-+ return size - left;
-+}
-+#elif defined(HAVE_ARC4RANDOM_BUF)
- int32_t mz_os_rand(uint8_t *buf, int32_t size) {
- if (size < 0)
- return 0;
-@@ -139,21 +154,6 @@ int32_t mz_os_rand(uint8_t *buf, int32_t size) {
- }
- return size - left;
- }
--#elif defined(HAVE_GETRANDOM)
--int32_t mz_os_rand(uint8_t *buf, int32_t size) {
-- int32_t left = size;
-- int32_t written = 0;
--
-- while (left > 0) {
-- written = getrandom(buf, left, 0);
-- if (written < 0)
-- return MZ_INTERNAL_ERROR;
--
-- buf += written;
-- left -= written;
-- }
-- return size - left;
--}
- #else
- int32_t mz_os_rand(uint8_t *buf, int32_t size) {
- static unsigned calls = 0;
diff --git a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch b/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch
deleted file mode 100644
index d38603ac7378..000000000000
--- a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-https://github.com/zlib-ng/minizip-ng/issues/623
-https://github.com/zlib-ng/minizip-ng/commit/6261d6f5ec5bd275257354c048f68ad9723c3231
-
-From 6261d6f5ec5bd275257354c048f68ad9723c3231 Mon Sep 17 00:00:00 2001
-From: Nathan Moinvaziri <nathan@solidstatenetworks.com>
-Date: Sat, 11 Jun 2022 10:36:42 -0700
-Subject: [PATCH] Generate test files in binary temp directory.
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -804,6 +804,8 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS)
- endif()
- endif()
-
-+ set(TEST_TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary)
-+
- add_test(NAME test_cmd COMMAND test_cmd WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
- function(create_compress_tests EXTRA_NAME EXTRA_ARGS)
-@@ -840,33 +842,43 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS)
- foreach(INDEX RANGE ${COMPRESS_METHOD_COUNT})
- list(GET COMPRESS_METHOD_NAMES ${INDEX} COMPRESS_METHOD_NAME)
- list(GET COMPRESS_METHOD_ARGS ${INDEX} COMPRESS_METHOD_ARG)
-+
-+ set(COMPRESS_METHOD_DEST_DIR
-+ ${TEST_TEMP_DIR}/${COMPRESS_METHOD_NAME}-${EXTRA_NAME})
-+ set(COMPRESS_METHOD_PATH
-+ ${TEST_TEMP_DIR}/${COMPRESS_METHOD_NAME}-${EXTRA_NAME}.zip)
-+
- add_test(NAME ${COMPRESS_METHOD_NAME}-zip-${EXTRA_NAME}
- COMMAND minizip_cmd ${COMPRESS_METHOD_ARG} -o ${EXTRA_ARGS}
-- result.zip test.c test.h empty.txt random.bin uniform.bin fuzz
-+ ${COMPRESS_METHOD_PATH}
-+ test.c test.h empty.txt random.bin uniform.bin fuzz
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- add_test(NAME ${COMPRESS_METHOD_NAME}-list-${EXTRA_NAME}
-- COMMAND minizip_cmd -l ${EXTRA_ARGS} result.zip
-+ COMMAND minizip_cmd -l ${EXTRA_ARGS} ${COMPRESS_METHOD_PATH}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- if(NOT MZ_COMPRESS_ONLY)
- add_test(NAME ${COMPRESS_METHOD_NAME}-unzip-${EXTRA_NAME}
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- add_test(NAME ${COMPRESS_METHOD_NAME}-append-${EXTRA_NAME}
- COMMAND minizip_cmd ${COMPRESS_METHOD_ARG} -a ${EXTRA_ARGS}
-- result.zip single.txt
-+ ${COMPRESS_METHOD_PATH} single.txt
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- if(NOT MZ_COMPRESS_ONLY)
- add_test(NAME ${COMPRESS_METHOD_NAME}-append-unzip-${EXTRA_NAME}
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- add_test(NAME ${COMPRESS_METHOD_NAME}-erase-${EXTRA_NAME}
-- COMMAND minizip_cmd -o -e result.zip test.c test.h
-+ COMMAND minizip_cmd -o -e ${COMPRESS_METHOD_PATH} test.c test.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- if(NOT MZ_COMPRESS_ONLY)
- add_test(NAME ${COMPRESS_METHOD_NAME}-erase-unzip-${EXTRA_NAME}
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- endforeach()
-@@ -891,43 +903,49 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS)
- if(NOT MZ_COMPRESS_ONLY)
- if(MZ_ZLIB OR MZ_LIBCOMP)
- add_test(NAME unzip-tiny
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${TEST_TEMP_DIR}/unzip-tiny
- fuzz/unzip_fuzzer_seed_corpus/tiny.zip
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- if(MZ_BZIP2)
- add_test(NAME unzip-bzip2
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${TEST_TEMP_DIR}/unzip-bzip2
- fuzz/unzip_fuzzer_seed_corpus/bzip2.zip
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- if(MZ_LZMA)
- add_test(NAME unzip-lzma
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${TEST_TEMP_DIR}/unzip-lzma
- fuzz/unzip_fuzzer_seed_corpus/lzma.zip
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- if(MZ_PKCRYPT)
- add_test(NAME unzip-pkcrypt
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -p test123
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${TEST_TEMP_DIR}/unzip-pkcrypt -p test123
- fuzz/unzip_fuzzer_seed_corpus/encrypted_pkcrypt.zip
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- if(MZ_WZAES)
- add_test(NAME unzip-wzaes
-- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -p test123
-+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS}
-+ -d ${TEST_TEMP_DIR}/unzip-wzaes -p test123
- fuzz/unzip_fuzzer_seed_corpus/encrypted_wzaes.zip
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
- endif()
- endif()
- if(NOT MZ_COMPRESS_ONLY AND NOT MZ_DECOMPRESS_ONLY)
- if(MZ_ZLIB AND NOT MZ_LIBCOMP)
-+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/random.bin DESTINATION ${TEST_TEMP_DIR})
- add_test(NAME gz
- COMMAND minigzip_cmd random.bin
-- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
-+ WORKING_DIRECTORY ${TEST_TEMP_DIR})
- add_test(NAME ungz
-- COMMAND minigzip_cmd -x -d out random.bin.gz
-- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
-+ COMMAND minigzip_cmd -x -d ${TEST_TEMP_DIR} random.bin.gz
-+ WORKING_DIRECTORY ${TEST_TEMP_DIR})
- endif()
- endif()
- endif()
-
diff --git a/sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild
index cbc57fa9e859..42274c85d130 100644
--- a/sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild
+++ b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild
@@ -29,18 +29,18 @@ RDEPEND="
openssl? ( dev-libs/openssl:= )
zstd? ( app-arch/zstd:= )
"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch
- "${FILESDIR}"/${P}-test-temporary.patch
-)
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
src_configure() {
local mycmakeargs=(
-DMZ_COMPAT=$(usex compat)
+
-DMZ_BUILD_TESTS=$(usex test)
-DMZ_BUILD_UNIT_TESTS=$(usex test)
+
-DMZ_FETCH_LIBS=OFF
-DMZ_FORCE_FETCH_LIBS=OFF
@@ -55,8 +55,6 @@ src_configure() {
-DMZ_PKCRYPT=ON
-DMZ_WZAES=ON
-DMZ_OPENSSL=$(usex openssl)
- # TODO: Re-enable, ideally unconditionally, for arc4random
- # Revisit when https://github.com/zlib-ng/minizip-ng/pull/648 fixed
-DMZ_LIBBSD=ON
-DMZ_SIGNING=ON
@@ -82,6 +80,12 @@ src_test() {
src_install() {
cmake_src_install
+ if use test ; then
+ # Test binaries, bug #874591
+ rm "${ED}"/usr/bin/minigzip || die
+ rm "${ED}"/usr/bin/minizip-ng || die
+ fi
+
if use compat ; then
ewarn "minizip-ng is experimental and replacing the system zlib[minizip] is dangerous"
ewarn "Please be careful!"