commit minizip-ng for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package minizip-ng for openSUSE:Factory checked in at 2024-10-24 15:42:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minizip-ng (Old) and /work/SRC/openSUSE:Factory/.minizip-ng.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "minizip-ng" Thu Oct 24 15:42:49 2024 rev:2 rq:1217363 version:4.0.5 Changes: -------- --- /work/SRC/openSUSE:Factory/minizip-ng/minizip-ng.changes 2024-01-19 23:02:51.631486909 +0100 +++ /work/SRC/openSUSE:Factory/.minizip-ng.new.2020/minizip-ng.changes 2024-10-24 15:43:48.666753829 +0200 @@ -1,0 +2,10 @@ +Wed Oct 23 08:11:09 UTC 2024 - ming li <mli@suse.com> + +- Update to release 4.0.5 + * Add empty directories to zip file. + * Use hexadecimal prefix for MZ_VERSION_BUILD. + * Fix bz2 library name + * Use correct version needed to extract for BZIP2. + * Remove left over signing code from v3. + +------------------------------------------------------------------- Old: ---- 4.0.4.tar.gz New: ---- 4.0.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minizip-ng.spec ++++++ --- /var/tmp/diff_new_pack.U8z02g/_old 2024-10-24 15:43:49.094771613 +0200 +++ /var/tmp/diff_new_pack.U8z02g/_new 2024-10-24 15:43:49.098771780 +0200 @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %define build_flavor @BUILD_FLAVOR@%{nil} %define pkg_name minizip-ng @@ -29,7 +30,7 @@ %global compat_mode OFF %endif -Version: 4.0.4 +Version: 4.0.5 Release: 0 Summary: Companion library to zlib-ng for reading and writing ZIP files License: Zlib ++++++ 4.0.4.tar.gz -> 4.0.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/.github/dependabot.yml new/minizip-ng-4.0.5/.github/dependabot.yml --- old/minizip-ng-4.0.4/.github/dependabot.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/minizip-ng-4.0.5/.github/dependabot.yml 2024-03-06 04:30:16.000000000 +0100 @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/CMakeLists.txt new/minizip-ng-4.0.5/CMakeLists.txt --- old/minizip-ng-4.0.4/CMakeLists.txt 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/CMakeLists.txt 2024-03-06 04:30:16.000000000 +0100 @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.13) # Library version -set(VERSION "4.0.4") +set(VERSION "4.0.5") # API version set(SOVERSION "4") @@ -252,7 +252,7 @@ list(APPEND MINIZIP_LIB ${BZIP2_LIBRARIES}) list(APPEND MINIZIP_LBD ${BZIP2_LIBRARY_DIRS}) - set(PC_PRIVATE_LIBS "${PC_PRIVATE_LIBS} -lbzip2") + set(PC_PRIVATE_LIBS "${PC_PRIVATE_LIBS} -lbz2") elseif(MZ_FETCH_LIBS) clone_repo(bzip2 https://sourceware.org/git/bzip2.git) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/README.md new/minizip-ng-4.0.5/README.md --- old/minizip-ng-4.0.4/README.md 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/README.md 2024-03-06 04:30:16.000000000 +0100 @@ -6,6 +6,7 @@ [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/minizip.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:minizip) [![License: Zlib](https://img.shields.io/badge/license-zlib-lightgrey.svg)](https://github.com/zlib-ng/minizip-ng/blob/master/LICENSE) [![codecov.io](https://codecov.io/github/zlib-ng/minizip-ng/coverage.svg?branch=develop)](https://codecov.io/github/zlib-ng/minizip-ng/) +[![Packaging status](https://repology.org/badge/tiny-repos/minizip-ng.svg)](https://repology.org/project/minizip-ng/versions) Developed and maintained by Nathan Moinvaziri. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/doc/mz_zip_rw.md new/minizip-ng-4.0.5/doc/mz_zip_rw.md --- old/minizip-ng-4.0.4/doc/mz_zip_rw.md 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/doc/mz_zip_rw.md 2024-03-06 04:30:16.000000000 +0100 @@ -82,7 +82,6 @@ - [mz\_zip\_writer\_set\_compress\_method](#mz_zip_writer_set_compress_method) - [mz\_zip\_writer\_set\_compress\_level](#mz_zip_writer_set_compress_level) - [mz\_zip\_writer\_set\_zip\_cd](#mz_zip_writer_set_zip_cd) - - [mz\_zip\_writer\_set\_certificate](#mz_zip_writer_set_certificate) - [mz\_zip\_writer\_set\_overwrite\_cb](#mz_zip_writer_set_overwrite_cb) - [mz\_zip\_writer\_set\_password\_cb](#mz_zip_writer_set_password_cb) - [mz\_zip\_writer\_set\_progress\_cb](#mz_zip_writer_set_progress_cb) @@ -1815,27 +1814,6 @@ mz_zip_writer_set_zip_cd(zip_writer, 1); ``` -### mz_zip_writer_set_certificate - -Sets the certificate and timestamp url to use for signing when adding files in zip. - -**Arguments** -|Type|Name|Description| -|-|-|-| -|void *|handle|_mz_zip_writer_ instance| -|const char *|cert_path|Path to certificate to sign entries with| -|const char *|cert_pwd|Password for certificate to sign with| - -**Return** -|Type|Description| -|-|-| -|int32_t|[MZ_ERROR](mz_error.md) code, MZ_OK if successful| - -**Example** -``` -mz_zip_writer_set_certificate(zip_writer, "c:\\mycerts\\zip_cert.pfx", "mycertpwd"); -``` - ### mz_zip_writer_set_overwrite_cb Sets the callback for what to do when a zip file is about to be overwritten. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/minizip.c new/minizip-ng-4.0.5/minizip.c --- old/minizip-ng-4.0.4/minizip.c 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/minizip.c 2024-03-06 04:30:16.000000000 +0100 @@ -35,8 +35,6 @@ int32_t encoding; uint8_t verbose; uint8_t aes; - const char *cert_path; - const char *cert_pwd; } minizip_opt; /***************************************************************************/ @@ -261,8 +259,6 @@ mz_zip_writer_set_progress_cb(writer, options, minizip_add_progress_cb); mz_zip_writer_set_entry_cb(writer, options, minizip_add_entry_cb); mz_zip_writer_set_zip_cd(writer, options->zip_cd); - if (options->cert_path) - mz_zip_writer_set_certificate(writer, options->cert_path, options->cert_pwd); err = mz_zip_writer_open_file(writer, path, options->disk_size, options->append); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/mz.h new/minizip-ng-4.0.5/mz.h --- old/minizip-ng-4.0.4/mz.h 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/mz.h 2024-03-06 04:30:16.000000000 +0100 @@ -14,8 +14,8 @@ /***************************************************************************/ /* MZ_VERSION */ -#define MZ_VERSION ("4.0.4") -#define MZ_VERSION_BUILD (040004) +#define MZ_VERSION ("4.0.5") +#define MZ_VERSION_BUILD (0x040005) /* MZ_ERROR */ #define MZ_OK (0) /* zlib */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/mz_zip.c new/minizip-ng-4.0.5/mz_zip.c --- old/minizip-ng-4.0.4/mz_zip.c 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/mz_zip.c 2024-03-06 04:30:16.000000000 +0100 @@ -711,6 +711,10 @@ version_needed = 20; if (zip64) version_needed = 45; +#ifdef HAVE_BZIP2 + if (file_info->compression_method == MZ_COMPRESS_METHOD_BZIP2) + version_needed = 46; +#endif #ifdef HAVE_WZAES if ((file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (file_info->aes_version)) version_needed = 51; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minizip-ng-4.0.4/mz_zip_rw.c new/minizip-ng-4.0.5/mz_zip_rw.c --- old/minizip-ng-4.0.4/mz_zip_rw.c 2023-12-29 16:05:05.000000000 +0100 +++ new/minizip-ng-4.0.5/mz_zip_rw.c 2024-03-06 04:30:16.000000000 +0100 @@ -1052,9 +1052,6 @@ entry_cb; const char *password; const char *comment; - uint8_t *cert_data; - int32_t cert_data_size; - const char *cert_pwd; uint16_t compress_method; int16_t compress_level; uint8_t follow_links; @@ -1649,6 +1646,7 @@ struct dirent *entry = NULL; int32_t err = MZ_OK; int16_t is_dir = 0; + int32_t files_added = 0; const char *filename = NULL; const char *filenameinzip = path; char *wildcard_ptr = NULL; @@ -1718,6 +1716,18 @@ err = mz_zip_writer_add_path(handle, full_path, root_path, include_path, recursive); if (err != MZ_OK) break; + + files_added++; + } + + if (files_added == 0 && path != root_path) { + mz_path_get_filename(path, &filename); + + strncpy(path_dir, path, sizeof(path_dir) - 1); + path_dir[sizeof(path_dir) - 1] = 0; + mz_path_remove_filename(path_dir); + + err = mz_zip_writer_add_file(handle, path_dir, filename); } mz_os_close_dir(dir); @@ -1840,52 +1850,6 @@ writer->zip_cd = zip_cd; } -int32_t mz_zip_writer_set_certificate(void *handle, const char *cert_path, const char *cert_pwd) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - void *cert_stream = NULL; - uint8_t *cert_data = NULL; - int32_t cert_data_size = 0; - int32_t err = MZ_OK; - - if (!cert_path) - return MZ_PARAM_ERROR; - - cert_data_size = (int32_t)mz_os_get_file_size(cert_path); - - if (cert_data_size == 0) - return MZ_PARAM_ERROR; - - if (writer->cert_data) { - free(writer->cert_data); - writer->cert_data = NULL; - } - - cert_data = (uint8_t *)malloc(cert_data_size); - - /* Read pkcs12 certificate from disk */ - cert_stream = mz_stream_os_create(); - if (!cert_stream) - return MZ_MEM_ERROR; - - err = mz_stream_os_open(cert_stream, cert_path, MZ_OPEN_MODE_READ); - if (err == MZ_OK) { - if (mz_stream_os_read(cert_stream, cert_data, cert_data_size) != cert_data_size) - err = MZ_READ_ERROR; - mz_stream_os_close(cert_stream); - } - mz_stream_os_delete(&cert_stream); - - if (err == MZ_OK) { - writer->cert_data = cert_data; - writer->cert_data_size = cert_data_size; - writer->cert_pwd = cert_pwd; - } else { - free(cert_data); - } - - return err; -} - void mz_zip_writer_set_overwrite_cb(void *handle, void *userdata, mz_zip_writer_overwrite_cb cb) { mz_zip_writer *writer = (mz_zip_writer *)handle; writer->overwrite_cb = cb; @@ -1955,13 +1919,6 @@ writer = (mz_zip_writer *)*handle; if (writer) { mz_zip_writer_close(writer); - - if (writer->cert_data) - free(writer->cert_data); - - writer->cert_data = NULL; - writer->cert_data_size = 0; - free(writer); } *handle = NULL;
participants (1)
-
Source-Sync