From 8ed233c742dd7fe0f12b9993353a1289c62f2f3f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 01:57:05 +0000 Subject: [PATCH 01/26] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- zziplib.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/zziplib.spec b/zziplib.spec index 6ff3d16..a065b1c 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -13,6 +13,7 @@ Patch3: CVE-2018-16548.part1.patch Patch4: CVE-2018-16548.part2.patch Patch5: CVE-2018-16548.part3.patch +BuildRequires: make BuildRequires: gcc BuildRequires: perl-interpreter BuildRequires: python2 From 1192b9170b48cf58fa568f4b44d2d5bf6d0818a7 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 21 Jan 2021 11:05:32 +0100 Subject: [PATCH 02/26] Rebase to 0.13.71 Build no longer needs python2 Resolves: 1807565 --- .gitignore | 1 + CVE-2018-16548.part1.patch | 71 -------- CVE-2018-16548.part2.patch | 50 ------ CVE-2018-16548.part3.patch | 22 --- CVE-2018-17828.part2.patch | 55 ------ CVE-2018-17828.patch | 341 ------------------------------------- sources | 2 +- zziplib.spec | 39 ++--- 8 files changed, 16 insertions(+), 565 deletions(-) delete mode 100644 CVE-2018-16548.part1.patch delete mode 100644 CVE-2018-16548.part2.patch delete mode 100644 CVE-2018-16548.part3.patch delete mode 100644 CVE-2018-17828.part2.patch delete mode 100644 CVE-2018-17828.patch diff --git a/.gitignore b/.gitignore index a810290..2b7387c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ zziplib-0.13.49.tar.bz2 /v0.13.67.tar.gz /v0.13.68.tar.gz /v0.13.69.tar.gz +/v0.13.71.tar.gz diff --git a/CVE-2018-16548.part1.patch b/CVE-2018-16548.part1.patch deleted file mode 100644 index 25c2b74..0000000 --- a/CVE-2018-16548.part1.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 9411bde3e4a70a81ff3ffd256b71927b2d90dcbb Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 11:32:04 +0200 -Subject: [PATCH] Avoid memory leak from __zzip_parse_root_directory(). - ---- - test/test.zip | Bin 1361 -> 1361 bytes - zzip/zip.c | 36 ++++++++++++++++++++++++++++++++++-- - 2 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/zzip/zip.c b/zzip/zip.c -index 88b833b..a685280 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -475,9 +475,15 @@ __zzip_parse_root_directory(int fd, - } else - { - if (io->fd.seeks(fd, zz_rootseek + zz_offset, SEEK_SET) < 0) -+ { -+ free(hdr0); - return ZZIP_DIR_SEEK; -+ } - if (io->fd.read(fd, &dirent, sizeof(dirent)) < __sizeof(dirent)) -+ { -+ free(hdr0); - return ZZIP_DIR_READ; -+ } - d = &dirent; - } - -@@ -577,12 +583,38 @@ __zzip_parse_root_directory(int fd, - - if (hdr_return) - *hdr_return = hdr0; -+ else -+ { -+ /* If it is not assigned to *hdr_return, it will never be free()'d */ -+ free(hdr0); -+ /* Make sure we don't free it again in case of error */ -+ hdr0 = NULL; -+ } - } /* else zero (sane) entries */ - # ifndef ZZIP_ALLOW_MODULO_ENTRIES -- return (entries != zz_entries ? ZZIP_CORRUPTED : 0); -+ if (entries != zz_entries) -+ { -+ /* If it was assigned to *hdr_return, undo assignment */ -+ if (p_reclen && hdr_return) -+ *hdr_return = NULL; -+ /* Free it, if it was not already free()'d */ -+ if (hdr0 != NULL) -+ free(hdr0); -+ return ZZIP_CORRUPTED; -+ } - # else -- return ((entries & (unsigned)0xFFFF) != zz_entries ? ZZIP_CORRUPTED : 0); -+ if (((entries & (unsigned)0xFFFF) != zz_entries) -+ { -+ /* If it was assigned to *hdr_return, undo assignment */ -+ if (p_reclen && hdr_return) -+ *hdr_return = NULL; -+ /* Free it, if it was not already free()'d */ -+ if (hdr0 != NULL) -+ free(hdr0); -+ return ZZIP_CORRUPTED; -+ } - # endif -+ return 0; - } - - /* ------------------------- high-level interface ------------------------- */ diff --git a/CVE-2018-16548.part2.patch b/CVE-2018-16548.part2.patch deleted file mode 100644 index b9bea26..0000000 --- a/CVE-2018-16548.part2.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d2e5d5c53212e54a97ad64b793a4389193fec687 Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 11:49:28 +0200 -Subject: [PATCH] Avoid memory leak from __zzip_parse_root_directory(). - ---- - zzip/zip.c | 25 ++----------------------- - 1 file changed, 2 insertions(+), 23 deletions(-) - -diff --git a/zzip/zip.c b/zzip/zip.c -index a685280..51a1a4d 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -587,34 +587,13 @@ __zzip_parse_root_directory(int fd, - { - /* If it is not assigned to *hdr_return, it will never be free()'d */ - free(hdr0); -- /* Make sure we don't free it again in case of error */ -- hdr0 = NULL; - } - } /* else zero (sane) entries */ - # ifndef ZZIP_ALLOW_MODULO_ENTRIES -- if (entries != zz_entries) -- { -- /* If it was assigned to *hdr_return, undo assignment */ -- if (p_reclen && hdr_return) -- *hdr_return = NULL; -- /* Free it, if it was not already free()'d */ -- if (hdr0 != NULL) -- free(hdr0); -- return ZZIP_CORRUPTED; -- } -+ return (entries != zz_entries) ? ZZIP_CORRUPTED : 0; - # else -- if (((entries & (unsigned)0xFFFF) != zz_entries) -- { -- /* If it was assigned to *hdr_return, undo assignment */ -- if (p_reclen && hdr_return) -- *hdr_return = NULL; -- /* Free it, if it was not already free()'d */ -- if (hdr0 != NULL) -- free(hdr0); -- return ZZIP_CORRUPTED; -- } -+ return ((entries & (unsigned)0xFFFF) != zz_entries) ? ZZIP_CORRUPTED : 0; - # endif -- return 0; - } - - /* ------------------------- high-level interface ------------------------- */ diff --git a/CVE-2018-16548.part3.patch b/CVE-2018-16548.part3.patch deleted file mode 100644 index f2f8214..0000000 --- a/CVE-2018-16548.part3.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0e1dadb05c1473b9df2d7b8f298dab801778ef99 Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 13:55:35 +0200 -Subject: [PATCH] One more free() to avoid memory leak. - ---- - zzip/zip.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/zzip/zip.c b/zzip/zip.c -index 51a1a4d..bc6c080 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -589,6 +589,8 @@ __zzip_parse_root_directory(int fd, - free(hdr0); - } - } /* else zero (sane) entries */ -+ else -+ free(hdr0); - # ifndef ZZIP_ALLOW_MODULO_ENTRIES - return (entries != zz_entries) ? ZZIP_CORRUPTED : 0; - # else diff --git a/CVE-2018-17828.part2.patch b/CVE-2018-17828.part2.patch deleted file mode 100644 index 111167c..0000000 --- a/CVE-2018-17828.part2.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/bins/unzip-mem.c b/bins/unzip-mem.c -index c45cb72..ff564a5 100644 ---- a/bins/unzip-mem.c -+++ b/bins/unzip-mem.c -@@ -88,10 +88,49 @@ static void zzip_mem_entry_pipe(ZZIP_MEM_DISK* disk, - } - } - -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void zzip_mem_entry_make(ZZIP_MEM_DISK* disk, - ZZIP_MEM_ENTRY* entry) - { -- FILE* file = fopen (entry->zz_name, "wb"); -+ char name_stripped[PATH_MAX]; -+ FILE* file; -+ -+ strncpy(name_stripped, entry->zz_name, PATH_MAX); -+ remove_dotdotslash(name_stripped); -+ -+ file = fopen (name_stripped, "wb"); - if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); } - perror (entry->zz_name); - if (status < EXIT_WARNINGS) status = EXIT_WARNINGS; diff --git a/CVE-2018-17828.patch b/CVE-2018-17828.patch deleted file mode 100644 index a340295..0000000 --- a/CVE-2018-17828.patch +++ /dev/null @@ -1,341 +0,0 @@ -From 81dfa6b3e08f6934885ba5c98939587d6850d08e Mon Sep 17 00:00:00 2001 -From: Josef Moellers -Date: Thu, 4 Oct 2018 14:21:48 +0200 -Subject: [PATCH] Fix issue #62: Remove any "../" components from pathnames of - extracted files. [CVE-2018-17828] - ---- - bins/unzzipcat-big.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-mem.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-mix.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-zip.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - 4 files changed, 224 insertions(+), 4 deletions(-) - -diff --git a/bins/unzzipcat-big.c b/bins/unzzipcat-big.c -index 982d262..88c4d65 100644 ---- a/bins/unzzipcat-big.c -+++ b/bins/unzzipcat-big.c -@@ -53,6 +53,48 @@ static void unzzip_cat_file(FILE* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -70,6 +112,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -79,7 +131,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - -diff --git a/bins/unzzipcat-mem.c b/bins/unzzipcat-mem.c -index 9bc966b..793bde8 100644 ---- a/bins/unzzipcat-mem.c -+++ b/bins/unzzipcat-mem.c -@@ -58,6 +58,48 @@ static void unzzip_mem_disk_cat_file(ZZIP_MEM_DISK* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -75,6 +117,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -84,7 +136,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) -diff --git a/bins/unzzipcat-mix.c b/bins/unzzipcat-mix.c -index 91c2f00..73b6ed6 100644 ---- a/bins/unzzipcat-mix.c -+++ b/bins/unzzipcat-mix.c -@@ -69,6 +69,48 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -86,6 +128,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -95,7 +147,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) -diff --git a/bins/unzzipcat-zip.c b/bins/unzzipcat-zip.c -index 2810f85..7f7f3fa 100644 ---- a/bins/unzzipcat-zip.c -+++ b/bins/unzzipcat-zip.c -@@ -69,6 +69,48 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -86,6 +128,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -95,7 +147,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) diff --git a/sources b/sources index 4a02881..562f581 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.13.69.tar.gz) = ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 +SHA512 (v0.13.71.tar.gz) = e035d0ac26dca78335ae3defc652543ff7b353a1a95d76ed1beeb21a08e16f287a62d488f528cfbb77d5b558581b68d439aa0823577524e9aa61a3cf5f208cb5 diff --git a/zziplib.spec b/zziplib.spec index a065b1c..a379384 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,23 +1,17 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib -Version: 0.13.69 -Release: 9%{?dist} +Version: 0.13.71 +Release: 1%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz Patch0: zziplib-0.13.69-multilib.patch -Patch1: CVE-2018-17828.patch -Patch2: CVE-2018-17828.part2.patch -Patch3: CVE-2018-16548.part1.patch -Patch4: CVE-2018-16548.part2.patch -Patch5: CVE-2018-16548.part3.patch - BuildRequires: make BuildRequires: gcc BuildRequires: perl-interpreter -BuildRequires: python2 -BuildRequires: python2-rpm-macros +BuildRequires: python +BuildRequires: python-rpm-macros BuildRequires: zip BuildRequires: xmlto BuildRequires: zlib-devel @@ -66,32 +60,21 @@ zziplib library. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - -# Force py2 for the build -find . -name '*.py' | xargs sed -i 's@#! /usr/bin/python@#! %__python2@g;s@#! /usr/bin/env python@#! %__python2@g' %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -export PYTHON=%__python2 %configure \ --disable-static \ --enable-sdl \ - --enable-frame-pointer \ - --enable-builddir=_builddir + --enable-frame-pointer # Remove rpath on 64bit archs -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' */libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # Only patch generated _config.h on non-i686 and armv7hl # These platforms have a correct _config.h already + %ifnarch i686 armv7hl -cd _builddir %apply_patch %{PATCH0} -p2 -cd .. %endif %make_build @@ -119,6 +102,12 @@ cd .. %{_mandir}/man3/* %changelog +* Thu Jan 21 2021 Jakub Martisko - 0.13.71-1 +- Rebase to 0.13.71 +- Drop the CVE patches, they are now part of the upstream package +- Build no longer requires python2 +- Resolves: 1807565 + * Wed Jul 29 2020 Fedora Release Engineering - 0.13.69-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2ccdbe84a14a89109f4231cc398c9d30e1d438a4 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 21 Jan 2021 11:05:32 +0100 Subject: [PATCH 03/26] Rebase to 0.13.71 Build no longer needs python2 Resolves: 1807565 --- .gitignore | 1 + CVE-2018-16548.part1.patch | 71 -------- CVE-2018-16548.part2.patch | 50 ------ CVE-2018-16548.part3.patch | 22 --- CVE-2018-17828.part2.patch | 55 ------ CVE-2018-17828.patch | 341 ------------------------------------- sources | 2 +- zziplib.spec | 40 ++--- 8 files changed, 17 insertions(+), 565 deletions(-) delete mode 100644 CVE-2018-16548.part1.patch delete mode 100644 CVE-2018-16548.part2.patch delete mode 100644 CVE-2018-16548.part3.patch delete mode 100644 CVE-2018-17828.part2.patch delete mode 100644 CVE-2018-17828.patch diff --git a/.gitignore b/.gitignore index a810290..2b7387c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ zziplib-0.13.49.tar.bz2 /v0.13.67.tar.gz /v0.13.68.tar.gz /v0.13.69.tar.gz +/v0.13.71.tar.gz diff --git a/CVE-2018-16548.part1.patch b/CVE-2018-16548.part1.patch deleted file mode 100644 index 25c2b74..0000000 --- a/CVE-2018-16548.part1.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 9411bde3e4a70a81ff3ffd256b71927b2d90dcbb Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 11:32:04 +0200 -Subject: [PATCH] Avoid memory leak from __zzip_parse_root_directory(). - ---- - test/test.zip | Bin 1361 -> 1361 bytes - zzip/zip.c | 36 ++++++++++++++++++++++++++++++++++-- - 2 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/zzip/zip.c b/zzip/zip.c -index 88b833b..a685280 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -475,9 +475,15 @@ __zzip_parse_root_directory(int fd, - } else - { - if (io->fd.seeks(fd, zz_rootseek + zz_offset, SEEK_SET) < 0) -+ { -+ free(hdr0); - return ZZIP_DIR_SEEK; -+ } - if (io->fd.read(fd, &dirent, sizeof(dirent)) < __sizeof(dirent)) -+ { -+ free(hdr0); - return ZZIP_DIR_READ; -+ } - d = &dirent; - } - -@@ -577,12 +583,38 @@ __zzip_parse_root_directory(int fd, - - if (hdr_return) - *hdr_return = hdr0; -+ else -+ { -+ /* If it is not assigned to *hdr_return, it will never be free()'d */ -+ free(hdr0); -+ /* Make sure we don't free it again in case of error */ -+ hdr0 = NULL; -+ } - } /* else zero (sane) entries */ - # ifndef ZZIP_ALLOW_MODULO_ENTRIES -- return (entries != zz_entries ? ZZIP_CORRUPTED : 0); -+ if (entries != zz_entries) -+ { -+ /* If it was assigned to *hdr_return, undo assignment */ -+ if (p_reclen && hdr_return) -+ *hdr_return = NULL; -+ /* Free it, if it was not already free()'d */ -+ if (hdr0 != NULL) -+ free(hdr0); -+ return ZZIP_CORRUPTED; -+ } - # else -- return ((entries & (unsigned)0xFFFF) != zz_entries ? ZZIP_CORRUPTED : 0); -+ if (((entries & (unsigned)0xFFFF) != zz_entries) -+ { -+ /* If it was assigned to *hdr_return, undo assignment */ -+ if (p_reclen && hdr_return) -+ *hdr_return = NULL; -+ /* Free it, if it was not already free()'d */ -+ if (hdr0 != NULL) -+ free(hdr0); -+ return ZZIP_CORRUPTED; -+ } - # endif -+ return 0; - } - - /* ------------------------- high-level interface ------------------------- */ diff --git a/CVE-2018-16548.part2.patch b/CVE-2018-16548.part2.patch deleted file mode 100644 index b9bea26..0000000 --- a/CVE-2018-16548.part2.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d2e5d5c53212e54a97ad64b793a4389193fec687 Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 11:49:28 +0200 -Subject: [PATCH] Avoid memory leak from __zzip_parse_root_directory(). - ---- - zzip/zip.c | 25 ++----------------------- - 1 file changed, 2 insertions(+), 23 deletions(-) - -diff --git a/zzip/zip.c b/zzip/zip.c -index a685280..51a1a4d 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -587,34 +587,13 @@ __zzip_parse_root_directory(int fd, - { - /* If it is not assigned to *hdr_return, it will never be free()'d */ - free(hdr0); -- /* Make sure we don't free it again in case of error */ -- hdr0 = NULL; - } - } /* else zero (sane) entries */ - # ifndef ZZIP_ALLOW_MODULO_ENTRIES -- if (entries != zz_entries) -- { -- /* If it was assigned to *hdr_return, undo assignment */ -- if (p_reclen && hdr_return) -- *hdr_return = NULL; -- /* Free it, if it was not already free()'d */ -- if (hdr0 != NULL) -- free(hdr0); -- return ZZIP_CORRUPTED; -- } -+ return (entries != zz_entries) ? ZZIP_CORRUPTED : 0; - # else -- if (((entries & (unsigned)0xFFFF) != zz_entries) -- { -- /* If it was assigned to *hdr_return, undo assignment */ -- if (p_reclen && hdr_return) -- *hdr_return = NULL; -- /* Free it, if it was not already free()'d */ -- if (hdr0 != NULL) -- free(hdr0); -- return ZZIP_CORRUPTED; -- } -+ return ((entries & (unsigned)0xFFFF) != zz_entries) ? ZZIP_CORRUPTED : 0; - # endif -- return 0; - } - - /* ------------------------- high-level interface ------------------------- */ diff --git a/CVE-2018-16548.part3.patch b/CVE-2018-16548.part3.patch deleted file mode 100644 index f2f8214..0000000 --- a/CVE-2018-16548.part3.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0e1dadb05c1473b9df2d7b8f298dab801778ef99 Mon Sep 17 00:00:00 2001 -From: jmoellers -Date: Fri, 7 Sep 2018 13:55:35 +0200 -Subject: [PATCH] One more free() to avoid memory leak. - ---- - zzip/zip.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/zzip/zip.c b/zzip/zip.c -index 51a1a4d..bc6c080 100644 ---- a/zzip/zip.c -+++ b/zzip/zip.c -@@ -589,6 +589,8 @@ __zzip_parse_root_directory(int fd, - free(hdr0); - } - } /* else zero (sane) entries */ -+ else -+ free(hdr0); - # ifndef ZZIP_ALLOW_MODULO_ENTRIES - return (entries != zz_entries) ? ZZIP_CORRUPTED : 0; - # else diff --git a/CVE-2018-17828.part2.patch b/CVE-2018-17828.part2.patch deleted file mode 100644 index 111167c..0000000 --- a/CVE-2018-17828.part2.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/bins/unzip-mem.c b/bins/unzip-mem.c -index c45cb72..ff564a5 100644 ---- a/bins/unzip-mem.c -+++ b/bins/unzip-mem.c -@@ -88,10 +88,49 @@ static void zzip_mem_entry_pipe(ZZIP_MEM_DISK* disk, - } - } - -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void zzip_mem_entry_make(ZZIP_MEM_DISK* disk, - ZZIP_MEM_ENTRY* entry) - { -- FILE* file = fopen (entry->zz_name, "wb"); -+ char name_stripped[PATH_MAX]; -+ FILE* file; -+ -+ strncpy(name_stripped, entry->zz_name, PATH_MAX); -+ remove_dotdotslash(name_stripped); -+ -+ file = fopen (name_stripped, "wb"); - if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); } - perror (entry->zz_name); - if (status < EXIT_WARNINGS) status = EXIT_WARNINGS; diff --git a/CVE-2018-17828.patch b/CVE-2018-17828.patch deleted file mode 100644 index a340295..0000000 --- a/CVE-2018-17828.patch +++ /dev/null @@ -1,341 +0,0 @@ -From 81dfa6b3e08f6934885ba5c98939587d6850d08e Mon Sep 17 00:00:00 2001 -From: Josef Moellers -Date: Thu, 4 Oct 2018 14:21:48 +0200 -Subject: [PATCH] Fix issue #62: Remove any "../" components from pathnames of - extracted files. [CVE-2018-17828] - ---- - bins/unzzipcat-big.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-mem.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-mix.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - bins/unzzipcat-zip.c | 57 +++++++++++++++++++++++++++++++++++++++++++- - 4 files changed, 224 insertions(+), 4 deletions(-) - -diff --git a/bins/unzzipcat-big.c b/bins/unzzipcat-big.c -index 982d262..88c4d65 100644 ---- a/bins/unzzipcat-big.c -+++ b/bins/unzzipcat-big.c -@@ -53,6 +53,48 @@ static void unzzip_cat_file(FILE* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -70,6 +112,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -79,7 +131,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - -diff --git a/bins/unzzipcat-mem.c b/bins/unzzipcat-mem.c -index 9bc966b..793bde8 100644 ---- a/bins/unzzipcat-mem.c -+++ b/bins/unzzipcat-mem.c -@@ -58,6 +58,48 @@ static void unzzip_mem_disk_cat_file(ZZIP_MEM_DISK* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -75,6 +117,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -84,7 +136,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) -diff --git a/bins/unzzipcat-mix.c b/bins/unzzipcat-mix.c -index 91c2f00..73b6ed6 100644 ---- a/bins/unzzipcat-mix.c -+++ b/bins/unzzipcat-mix.c -@@ -69,6 +69,48 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -86,6 +128,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -95,7 +147,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) -diff --git a/bins/unzzipcat-zip.c b/bins/unzzipcat-zip.c -index 2810f85..7f7f3fa 100644 ---- a/bins/unzzipcat-zip.c -+++ b/bins/unzzipcat-zip.c -@@ -69,6 +69,48 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out) - } - } - -+/* -+ * NAME: remove_dotdotslash -+ * PURPOSE: To remove any "../" components from the given pathname -+ * ARGUMENTS: path: path name with maybe "../" components -+ * RETURNS: Nothing, "path" is modified in-place -+ * NOTE: removing "../" from the path ALWAYS shortens the path, never adds to it! -+ * Also, "path" is not used after creating it. -+ * So modifying "path" in-place is safe to do. -+ */ -+static inline void -+remove_dotdotslash(char *path) -+{ -+ /* Note: removing "../" from the path ALWAYS shortens the path, never adds to it! */ -+ char *dotdotslash; -+ int warned = 0; -+ -+ dotdotslash = path; -+ while ((dotdotslash = strstr(dotdotslash, "../")) != NULL) -+ { -+ /* -+ * Remove only if at the beginning of the pathname ("../path/name") -+ * or when preceded by a slash ("path/../name"), -+ * otherwise not ("path../name..")! -+ */ -+ if (dotdotslash == path || dotdotslash[-1] == '/') -+ { -+ char *src, *dst; -+ if (!warned) -+ { -+ /* Note: the first time through the pathname is still intact */ -+ fprintf(stderr, "Removing \"../\" path component(s) in %s\n", path); -+ warned = 1; -+ } -+ /* We cannot use strcpy(), as there "The strings may not overlap" */ -+ for (src = dotdotslash+3, dst=dotdotslash; (*dst = *src) != '\0'; src++, dst++) -+ ; -+ } -+ else -+ dotdotslash +=3; /* skip this instance to prevent infinite loop */ -+ } -+} -+ - static void makedirs(const char* name) - { - char* p = strrchr(name, '/'); -@@ -86,6 +128,16 @@ static void makedirs(const char* name) - - static FILE* create_fopen(char* name, char* mode, int subdirs) - { -+ char *name_stripped; -+ FILE *fp; -+ int mustfree = 0; -+ -+ if ((name_stripped = strdup(name)) != NULL) -+ { -+ remove_dotdotslash(name_stripped); -+ name = name_stripped; -+ mustfree = 1; -+ } - if (subdirs) - { - char* p = strrchr(name, '/'); -@@ -95,7 +147,10 @@ static FILE* create_fopen(char* name, char* mode, int subdirs) - free (dir_name); - } - } -- return fopen(name, mode); -+ fp = fopen(name, mode); -+ if (mustfree) -+ free(name_stripped); -+ return fp; - } - - static int unzzip_cat (int argc, char ** argv, int extract) diff --git a/sources b/sources index 4a02881..562f581 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.13.69.tar.gz) = ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 +SHA512 (v0.13.71.tar.gz) = e035d0ac26dca78335ae3defc652543ff7b353a1a95d76ed1beeb21a08e16f287a62d488f528cfbb77d5b558581b68d439aa0823577524e9aa61a3cf5f208cb5 diff --git a/zziplib.spec b/zziplib.spec index 6ff3d16..a379384 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,22 +1,17 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib -Version: 0.13.69 -Release: 9%{?dist} +Version: 0.13.71 +Release: 1%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz Patch0: zziplib-0.13.69-multilib.patch -Patch1: CVE-2018-17828.patch -Patch2: CVE-2018-17828.part2.patch -Patch3: CVE-2018-16548.part1.patch -Patch4: CVE-2018-16548.part2.patch -Patch5: CVE-2018-16548.part3.patch - +BuildRequires: make BuildRequires: gcc BuildRequires: perl-interpreter -BuildRequires: python2 -BuildRequires: python2-rpm-macros +BuildRequires: python +BuildRequires: python-rpm-macros BuildRequires: zip BuildRequires: xmlto BuildRequires: zlib-devel @@ -65,32 +60,21 @@ zziplib library. %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - -# Force py2 for the build -find . -name '*.py' | xargs sed -i 's@#! /usr/bin/python@#! %__python2@g;s@#! /usr/bin/env python@#! %__python2@g' %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -export PYTHON=%__python2 %configure \ --disable-static \ --enable-sdl \ - --enable-frame-pointer \ - --enable-builddir=_builddir + --enable-frame-pointer # Remove rpath on 64bit archs -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' */libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # Only patch generated _config.h on non-i686 and armv7hl # These platforms have a correct _config.h already + %ifnarch i686 armv7hl -cd _builddir %apply_patch %{PATCH0} -p2 -cd .. %endif %make_build @@ -118,6 +102,12 @@ cd .. %{_mandir}/man3/* %changelog +* Thu Jan 21 2021 Jakub Martisko - 0.13.71-1 +- Rebase to 0.13.71 +- Drop the CVE patches, they are now part of the upstream package +- Build no longer requires python2 +- Resolves: 1807565 + * Wed Jul 29 2020 Fedora Release Engineering - 0.13.69-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 7b961e1f4cf8a43d67fceff49e54b436fdcba793 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 28 Jan 2021 00:47:23 +0000 Subject: [PATCH 04/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index a379384..bd53e15 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -102,6 +102,9 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{_mandir}/man3/* %changelog +* Thu Jan 28 2021 Fedora Release Engineering - 0.13.71-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Thu Jan 21 2021 Jakub Martisko - 0.13.71-1 - Rebase to 0.13.71 - Drop the CVE patches, they are now part of the upstream package From f438f94aec8a9a7e6a447b2432fe95a7a275a6f4 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mon, 1 Feb 2021 15:41:03 +0100 Subject: [PATCH 05/26] Use versioned python3 as buildrequires --- zziplib.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zziplib.spec b/zziplib.spec index bd53e15..a6ea96e 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -10,8 +10,8 @@ Patch0: zziplib-0.13.69-multilib.patch BuildRequires: make BuildRequires: gcc BuildRequires: perl-interpreter -BuildRequires: python -BuildRequires: python-rpm-macros +BuildRequires: python3 +BuildRequires: python3-rpm-macros BuildRequires: zip BuildRequires: xmlto BuildRequires: zlib-devel @@ -102,6 +102,9 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{_mandir}/man3/* %changelog +* Mon Feb 01 2021 Jakub Martisko - 0.13.71-3 +- Use python3 (versioned) as buildrequires + * Thu Jan 28 2021 Fedora Release Engineering - 0.13.71-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From bdb7772234f4886afee4f8d86712853e9432f450 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 22:24:26 +0000 Subject: [PATCH 06/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index a6ea96e..2fc3e42 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -102,6 +102,9 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{_mandir}/man3/* %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.13.71-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Feb 01 2021 Jakub Martisko - 0.13.71-3 - Use python3 (versioned) as buildrequires From dcff9c0002e4a4bbd78d738d684e4c1866c8ad5b Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 1 Sep 2021 18:19:41 +0200 Subject: [PATCH 07/26] Sync the multilib patches with rhel Resolves: rhbz#1988061 Related: rhbz#1915747 --- multilib-32.patch | 29 +++++++++++++++++++++++++++++ multilib-64.patch | 29 +++++++++++++++++++++++++++++ zziplib-0.13.69-multilib.patch | 31 ------------------------------- 3 files changed, 58 insertions(+), 31 deletions(-) create mode 100644 multilib-32.patch create mode 100644 multilib-64.patch delete mode 100644 zziplib-0.13.69-multilib.patch diff --git a/multilib-32.patch b/multilib-32.patch new file mode 100644 index 0000000..ae99a59 --- /dev/null +++ b/multilib-32.patch @@ -0,0 +1,29 @@ +--- ./a/zzip/_config.h 2021-07-21 14:18:09.000000000 +0200 ++++ ./b/zzip/_config.h 2021-07-21 14:46:24.037432969 +0200 +@@ -138,9 +138,12 @@ + + /* whether the system defaults to 32bit off_t but can do 64bit when requested + */ ++#if __WORDSIZE == 32 + #ifndef ZZIP_LARGEFILE_SENSITIVE + #define ZZIP_LARGEFILE_SENSITIVE 1 + #endif ++#endif ++/* #undef LARGEFILE_SENSITIVE */ + + /* Define to the sub-directory where libtool stores uninstalled libraries. */ + #ifndef ZZIP_LT_OBJDIR +@@ -227,9 +230,13 @@ + #endif + + /* Number of bits in a file offset, on hosts where this is settable. */ ++#if __WORDSIZE == 32 + #ifndef ZZIP__FILE_OFFSET_BITS + #define ZZIP__FILE_OFFSET_BITS 64 + #endif ++#endif ++/* #undef _FILE_OFFSET_BITS */ ++ + + /* Define for large files, on AIX-style hosts. */ + /* #undef _LARGE_FILES */ diff --git a/multilib-64.patch b/multilib-64.patch new file mode 100644 index 0000000..5285e3a --- /dev/null +++ b/multilib-64.patch @@ -0,0 +1,29 @@ +--- ./a/zzip/_config.h 2021-07-21 14:18:14.000000000 +0200 ++++ ./b/zzip/_config.h 2021-07-21 14:46:24.037432969 +0200 +@@ -138,6 +138,11 @@ + + /* whether the system defaults to 32bit off_t but can do 64bit when requested + */ ++#if __WORDSIZE == 32 ++#ifndef ZZIP_LARGEFILE_SENSITIVE ++#define ZZIP_LARGEFILE_SENSITIVE 1 ++#endif ++#endif + /* #undef LARGEFILE_SENSITIVE */ + + /* Define to the sub-directory where libtool stores uninstalled libraries. */ +@@ -225,8 +230,14 @@ + #endif + + /* Number of bits in a file offset, on hosts where this is settable. */ ++#if __WORDSIZE == 32 ++#ifndef ZZIP__FILE_OFFSET_BITS ++#define ZZIP__FILE_OFFSET_BITS 64 ++#endif ++#endif + /* #undef _FILE_OFFSET_BITS */ + ++ + /* Define for large files, on AIX-style hosts. */ + /* #undef _LARGE_FILES */ + diff --git a/zziplib-0.13.69-multilib.patch b/zziplib-0.13.69-multilib.patch deleted file mode 100644 index 24cf64b..0000000 --- a/zziplib-0.13.69-multilib.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up ./_builddir/zzip/_config.h.orig ./_builddir/zzip/_config.h ---- ./_builddir/zzip/_config.h.orig 2018-07-23 09:11:59.971840954 +0300 -+++ ./_builddir/zzip/_config.h 2018-07-23 09:12:07.438731527 +0300 -@@ -139,6 +139,11 @@ - /* whether the system defaults to 32bit off_t but can do 64bit when requested - */ - /* #undef LARGEFILE_SENSITIVE */ -+#if __WORDSIZE == 32 -+#ifndef ZZIP_LARGEFILE_SENSITIVE -+#define ZZIP_LARGEFILE_SENSITIVE 1 -+#endif -+#endif - - /* Define to the sub-directory where libtool stores uninstalled libraries. */ - #ifndef ZZIP_LT_OBJDIR -@@ -197,6 +202,15 @@ - /* The number of bytes in type short */ - /* #undef SIZEOF_SHORT */ - -+/* The number of bytes in type long */ -+#ifndef ZZIP_SIZEOF_LONG -+#if __WORDSIZE == 32 -+#define ZZIP_SIZEOF_LONG 4 -+#elif __WORDSIZE == 64 -+#define ZZIP_SIZEOF_LONG 8 -+#endif -+#endif -+ - /* Define to 1 if you have the ANSI C header files. */ - #ifndef ZZIP_STDC_HEADERS - #define ZZIP_STDC_HEADERS 1 From 2dbdeda26793fda1a05002dfe3bfea4c226e8b73 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 1 Sep 2021 18:23:46 +0200 Subject: [PATCH 08/26] Forgot to add specfile to the last commit --- zziplib.spec | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/zziplib.spec b/zziplib.spec index 2fc3e42..59447ce 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,11 +1,14 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz -Patch0: zziplib-0.13.69-multilib.patch + + +Patch100: multilib-32.patch +Patch101: multilib-64.patch BuildRequires: make BuildRequires: gcc @@ -73,9 +76,16 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # Only patch generated _config.h on non-i686 and armv7hl # These platforms have a correct _config.h already -%ifnarch i686 armv7hl -%apply_patch %{PATCH0} -p2 + +pushd %{_builddir}/zziplib-%{version} +%ifarch i686 armv7hl + patch -p2 < %{PATCH100} %endif +%ifnarch i686 armv7hl + patch -p2 < %{PATCH101} +%endif +popd + %make_build @@ -102,6 +112,12 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{_mandir}/man3/* %changelog +* Wed Sep 01 2021 Jakub Martisko - 0.13.71-5 +- Use the multilib patches from RHEL +- Resolves ftbfs +Resolves: rhbz#1988061 +Related: rhbz#1915747 + * Fri Jul 23 2021 Fedora Release Engineering - 0.13.71-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 8f2206a997bc54f56e101a93303af4b9f1484e2b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 05:58:26 +0000 Subject: [PATCH 09/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index 59447ce..0a16d4e 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -112,6 +112,9 @@ popd %{_mandir}/man3/* %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 0.13.71-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Sep 01 2021 Jakub Martisko - 0.13.71-5 - Use the multilib patches from RHEL - Resolves ftbfs From 4a515dd0a9d67178360cc703aed05db4dce9fe0e Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Sat, 5 Feb 2022 23:49:35 +0000 Subject: [PATCH 10/26] Fix pkgconfig files --- remove_ldflags_pkconfig_files.patch | 11 +++++++++++ zziplib.spec | 14 ++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 remove_ldflags_pkconfig_files.patch diff --git a/remove_ldflags_pkconfig_files.patch b/remove_ldflags_pkconfig_files.patch new file mode 100644 index 0000000..65af4e5 --- /dev/null +++ b/remove_ldflags_pkconfig_files.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -19143,7 +19143,7 @@ Name: @PACKAGE_NAME@ + Description: @PACKAGE_DESCRIPTION@ + Version: @PACKAGE_VERSION@ + Requires: @PACKAGE_REQUIRES@ +-Libs: -L\${libdir} @LDFLAGS@ @LIBS@ ++Libs: -L\${libdir} @LIBS@ + Cflags: -I\${includedir} @CPPFLAGS@ + AXEOF + fi # DONE generate $pkgconfig_generate.in diff --git a/zziplib.spec b/zziplib.spec index 0a16d4e..0742089 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,17 +1,17 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.71 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz - +Patch1: remove_ldflags_pkconfig_files.patch Patch100: multilib-32.patch Patch101: multilib-64.patch BuildRequires: make -BuildRequires: gcc +BuildRequires: gcc BuildRequires: perl-interpreter BuildRequires: python3 BuildRequires: python3-rpm-macros @@ -62,7 +62,7 @@ zziplib library. %prep %setup -q - +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" @@ -80,8 +80,7 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool pushd %{_builddir}/zziplib-%{version} %ifarch i686 armv7hl patch -p2 < %{PATCH100} -%endif -%ifnarch i686 armv7hl +%else patch -p2 < %{PATCH101} %endif popd @@ -112,6 +111,9 @@ popd %{_mandir}/man3/* %changelog +* Sat Feb 05 2022 Leigh Scott - 0.13.71-7 +- Fix pkgconfig files + * Sat Jan 22 2022 Fedora Release Engineering - 0.13.71-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 79ad2633a3dd8c5bfb7d554c46244ec7e33b1e65 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Wed, 9 Feb 2022 19:04:27 +0200 Subject: [PATCH 11/26] Package 0.13.72 - Fixes CVE-2020-18442 - Resolves: rhbz#1973831 - Switch build to CMake, drop 32-bit patches as checks integrated in CMake already Signed-off-by: Alexander Bokovoy --- .gitignore | 1 + multilib-32.patch | 29 ------------------- multilib-64.patch | 29 ------------------- remove_ldflags_pkconfig_files.patch | 11 -------- sources | 2 +- zziplib.spec | 44 ++++++++--------------------- 6 files changed, 14 insertions(+), 102 deletions(-) delete mode 100644 multilib-32.patch delete mode 100644 multilib-64.patch delete mode 100644 remove_ldflags_pkconfig_files.patch diff --git a/.gitignore b/.gitignore index 2b7387c..061bb6d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ zziplib-0.13.49.tar.bz2 /v0.13.68.tar.gz /v0.13.69.tar.gz /v0.13.71.tar.gz +/v0.13.72.tar.gz diff --git a/multilib-32.patch b/multilib-32.patch deleted file mode 100644 index ae99a59..0000000 --- a/multilib-32.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- ./a/zzip/_config.h 2021-07-21 14:18:09.000000000 +0200 -+++ ./b/zzip/_config.h 2021-07-21 14:46:24.037432969 +0200 -@@ -138,9 +138,12 @@ - - /* whether the system defaults to 32bit off_t but can do 64bit when requested - */ -+#if __WORDSIZE == 32 - #ifndef ZZIP_LARGEFILE_SENSITIVE - #define ZZIP_LARGEFILE_SENSITIVE 1 - #endif -+#endif -+/* #undef LARGEFILE_SENSITIVE */ - - /* Define to the sub-directory where libtool stores uninstalled libraries. */ - #ifndef ZZIP_LT_OBJDIR -@@ -227,9 +230,13 @@ - #endif - - /* Number of bits in a file offset, on hosts where this is settable. */ -+#if __WORDSIZE == 32 - #ifndef ZZIP__FILE_OFFSET_BITS - #define ZZIP__FILE_OFFSET_BITS 64 - #endif -+#endif -+/* #undef _FILE_OFFSET_BITS */ -+ - - /* Define for large files, on AIX-style hosts. */ - /* #undef _LARGE_FILES */ diff --git a/multilib-64.patch b/multilib-64.patch deleted file mode 100644 index 5285e3a..0000000 --- a/multilib-64.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- ./a/zzip/_config.h 2021-07-21 14:18:14.000000000 +0200 -+++ ./b/zzip/_config.h 2021-07-21 14:46:24.037432969 +0200 -@@ -138,6 +138,11 @@ - - /* whether the system defaults to 32bit off_t but can do 64bit when requested - */ -+#if __WORDSIZE == 32 -+#ifndef ZZIP_LARGEFILE_SENSITIVE -+#define ZZIP_LARGEFILE_SENSITIVE 1 -+#endif -+#endif - /* #undef LARGEFILE_SENSITIVE */ - - /* Define to the sub-directory where libtool stores uninstalled libraries. */ -@@ -225,8 +230,14 @@ - #endif - - /* Number of bits in a file offset, on hosts where this is settable. */ -+#if __WORDSIZE == 32 -+#ifndef ZZIP__FILE_OFFSET_BITS -+#define ZZIP__FILE_OFFSET_BITS 64 -+#endif -+#endif - /* #undef _FILE_OFFSET_BITS */ - -+ - /* Define for large files, on AIX-style hosts. */ - /* #undef _LARGE_FILES */ - diff --git a/remove_ldflags_pkconfig_files.patch b/remove_ldflags_pkconfig_files.patch deleted file mode 100644 index 65af4e5..0000000 --- a/remove_ldflags_pkconfig_files.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure -+++ b/configure -@@ -19143,7 +19143,7 @@ Name: @PACKAGE_NAME@ - Description: @PACKAGE_DESCRIPTION@ - Version: @PACKAGE_VERSION@ - Requires: @PACKAGE_REQUIRES@ --Libs: -L\${libdir} @LDFLAGS@ @LIBS@ -+Libs: -L\${libdir} @LIBS@ - Cflags: -I\${includedir} @CPPFLAGS@ - AXEOF - fi # DONE generate $pkgconfig_generate.in diff --git a/sources b/sources index 562f581..daf2dbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.13.71.tar.gz) = e035d0ac26dca78335ae3defc652543ff7b353a1a95d76ed1beeb21a08e16f287a62d488f528cfbb77d5b558581b68d439aa0823577524e9aa61a3cf5f208cb5 +SHA512 (v0.13.72.tar.gz) = 4bb089e74813c6fac9657cd96e44e4a6469bf86aba3980d885c4573e8db45e74fd07bbdfcec9f36297c72227c8c0b2c37dab1bc4326cef8529960e482fe501c8 diff --git a/zziplib.spec b/zziplib.spec index 0742089..a2f59f1 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,15 +1,11 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib -Version: 0.13.71 -Release: 7%{?dist} +Version: 0.13.72 +Release: 1%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz -Patch1: remove_ldflags_pkconfig_files.patch -Patch100: multilib-32.patch -Patch101: multilib-64.patch - BuildRequires: make BuildRequires: gcc BuildRequires: perl-interpreter @@ -20,8 +16,7 @@ BuildRequires: xmlto BuildRequires: zlib-devel BuildRequires: SDL-devel BuildRequires: pkgconfig -#BuildRequires: autoconf -#BuildRequires: automake +BuildRequires: cmake %description The zziplib library is intentionally lightweight, it offers the ability to @@ -62,35 +57,14 @@ zziplib library. %prep %setup -q -%patch1 -p1 %build -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -%configure \ - --disable-static \ - --enable-sdl \ - --enable-frame-pointer -# Remove rpath on 64bit archs -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool -# Only patch generated _config.h on non-i686 and armv7hl -# These platforms have a correct _config.h already - - -pushd %{_builddir}/zziplib-%{version} -%ifarch i686 armv7hl - patch -p2 < %{PATCH100} -%else - patch -p2 < %{PATCH101} -%endif -popd - - -%make_build +%cmake -B "%{_vpath_builddir}" +%make_build -C "%{_vpath_builddir}" %install -%make_install +%make_install -C "%{_vpath_builddir}" %ldconfig_scriptlets @@ -111,6 +85,12 @@ popd %{_mandir}/man3/* %changelog +* Wed Feb 09 2022 Alexander Bokovoy - 0.13.72-1 +- 0.13.72 +- Fixes CVE-2020-18442 +- Resolves: rhbz#1973831 +- Switch build to CMake, drop 32-bit patches as checks integrated in CMake already + * Sat Feb 05 2022 Leigh Scott - 0.13.71-7 - Fix pkgconfig files From 07b676070aebaa34a23425f02b16dae8c33bb33d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 14:02:32 +0000 Subject: [PATCH 12/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index a2f59f1..a918f74 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -85,6 +85,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.13.72-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Feb 09 2022 Alexander Bokovoy - 0.13.72-1 - 0.13.72 - Fixes CVE-2020-18442 From 41f2bfec6353f952f48bf7711ee73df6115cfe5b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 08:23:04 +0000 Subject: [PATCH 13/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index a918f74..c28dd31 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ or MPLv1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -85,6 +85,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.13.72-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 0.13.72-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 6b1fb9e7a1c115bc73ed876e8a66881d73042e14 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Wed, 17 May 2023 11:51:15 -0400 Subject: [PATCH 14/26] Update License tag to SPDX identifiers Examined the source code and updated the License tag to an SPDX expression representing this project. The author offers the source under either LGPL-2.0-or-later or MPL-1.1. Signed-off-by: David Cantrell --- zziplib.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zziplib.spec b/zziplib.spec index c28dd31..b468800 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,8 +1,8 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 -Release: 3%{?dist} -License: LGPLv2+ or MPLv1.1 +Release: 4%{?dist} +License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -85,6 +85,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Wed May 17 2023 David Cantrell - 0.13.72-4 +- Update License tag to SPDX identifiers + * Sat Jan 21 2023 Fedora Release Engineering - 0.13.72-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 820f1b5c11d7caf913352021b0f6ba2cffc1dcb3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 19:49:34 +0000 Subject: [PATCH 15/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index b468800..7181a2f 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -85,6 +85,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.13.72-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed May 17 2023 David Cantrell - 0.13.72-4 - Update License tag to SPDX identifiers From 40e2e7cd84ade4cbf61eb619909c711dbc153978 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 11:22:03 +0000 Subject: [PATCH 16/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index 7181a2f..e3b879d 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,7 +1,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -85,6 +85,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 0.13.72-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 0.13.72-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 5e3e24b6fbbb6461e5b0fcae2f554ff86eeb927a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 11 Feb 2024 15:27:01 -0500 Subject: [PATCH 17/26] Workaround GCC 14 strictness Discussion is ongoing upstream on how to fix various incompatible types issues, but no fix has been agreed upon yet: https://bugzilla.redhat.com/show_bug.cgi?id=2256917 --- zziplib.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zziplib.spec b/zziplib.spec index e3b879d..9c107a2 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,3 +1,7 @@ +# FTBFS with GCC 14, reported upstream, no fix yet +# https://bugzilla.redhat.com/show_bug.cgi?id=2256917 +%global build_type_safety_c 1 + Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.72 From 9766ac2cc147c93cf6560642462f42329dfcd449 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 4 Apr 2024 12:10:39 +0200 Subject: [PATCH 18/26] Rebase to 0.13.74 --- .gitignore | 1 + sources | 2 +- zziplib.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 061bb6d..6ab02a9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ zziplib-0.13.49.tar.bz2 /v0.13.69.tar.gz /v0.13.71.tar.gz /v0.13.72.tar.gz +/v0.13.74.tar.gz diff --git a/sources b/sources index daf2dbb..c4d587b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.13.72.tar.gz) = 4bb089e74813c6fac9657cd96e44e4a6469bf86aba3980d885c4573e8db45e74fd07bbdfcec9f36297c72227c8c0b2c37dab1bc4326cef8529960e482fe501c8 +SHA512 (v0.13.74.tar.gz) = 7dd27247cbc475e2c6beb3a96c620f9938ade0dff6f4e088f9c28432fc4cc01df9d6771ec3d5e07baabe27033f4764d60e31c4c54588559de64e894d0557c94f diff --git a/zziplib.spec b/zziplib.spec index 9c107a2..6148d85 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -1,11 +1,10 @@ # FTBFS with GCC 14, reported upstream, no fix yet # https://bugzilla.redhat.com/show_bug.cgi?id=2256917 -%global build_type_safety_c 1 Summary: Lightweight library to easily extract data from zip files Name: zziplib -Version: 0.13.72 -Release: 6%{?dist} +Version: 0.13.74 +Release: 1%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -75,6 +74,7 @@ zziplib library. %files %doc docs/COPYING* ChangeLog README TODO %{_libdir}/*.so.* +%exclude %{_datadir}/zziplib/*.cmake %files utils %{_bindir}/* @@ -89,6 +89,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Thu Apr 04 2024 Jakub Martisko - 0.13.74-1 +- Rebase to 0.13.74 + * Sat Jan 27 2024 Fedora Release Engineering - 0.13.72-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 8f12ede02eb0bd4daf61a4bf7756b6b292e9568c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:59:48 +0000 Subject: [PATCH 19/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index 6148d85..90c5bd9 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.74 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -89,6 +89,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 0.13.74-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Apr 04 2024 Jakub Martisko - 0.13.74-1 - Rebase to 0.13.74 From 5452bf6e704403ddc7f2fb4e9def18c98bb1fd0e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 16:55:40 +0000 Subject: [PATCH 20/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index 90c5bd9..9f3829f 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.74 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -89,6 +89,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 0.13.74-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Jul 20 2024 Fedora Release Engineering - 0.13.74-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From d0bf72c8e4887de708edbb11feac75eb0616978b Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 22 Jan 2025 15:30:16 +0100 Subject: [PATCH 21/26] Rebase to zziplib-0.13.78 --- .gitignore | 2 ++ sources | 2 +- zziplib.spec | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6ab02a9..d246baf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ zziplib-0.13.49.tar.bz2 /v0.13.71.tar.gz /v0.13.72.tar.gz /v0.13.74.tar.gz +/zziplib-0.13.78.tar.gz +/v0.13.78.tar.gz diff --git a/sources b/sources index c4d587b..4f1e5be 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v0.13.74.tar.gz) = 7dd27247cbc475e2c6beb3a96c620f9938ade0dff6f4e088f9c28432fc4cc01df9d6771ec3d5e07baabe27033f4764d60e31c4c54588559de64e894d0557c94f +SHA512 (v0.13.78.tar.gz) = e96771c310a1a9eb227027e8c2a495409c01dd273b483b3a04119d6a273cce7c88ba77c192fcde5e85d0a37c847a0df8e521f460d00920e62153400f0743ea78 diff --git a/zziplib.spec b/zziplib.spec index 9f3829f..ad8e677 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -3,8 +3,8 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib -Version: 0.13.74 -Release: 3%{?dist} +Version: 0.13.78 +Release: 1%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -75,6 +75,7 @@ zziplib library. %doc docs/COPYING* ChangeLog README TODO %{_libdir}/*.so.* %exclude %{_datadir}/zziplib/*.cmake +%exclude %{_libdir}/cmake/zziplib/*.cmake %files utils %{_bindir}/* @@ -89,6 +90,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Wed Jan 22 2025 Jakub Martisko - 0.13.78-1 +- Rebase to 0.13.78 + * Sun Jan 19 2025 Fedora Release Engineering - 0.13.74-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 796ae21d860467945603fa23a9f239c232132c68 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 21:22:27 +0000 Subject: [PATCH 22/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index ad8e677..34d701e 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.78 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -90,6 +90,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.13.78-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jan 22 2025 Jakub Martisko - 0.13.78-1 - Rebase to 0.13.78 From 95093d8460ff06ef5bc47e5dedf7a23a636a252a Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Tue, 11 Nov 2025 14:40:29 +0100 Subject: [PATCH 23/26] Allow to build with CMake 4.0 (rhbz#2381654) --- zziplib.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index 34d701e..de92d19 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.78 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -62,6 +62,8 @@ zziplib library. %setup -q %build +# TODO: Please submit an issue to upstream (rhbz#2381654) +export CMAKE_POLICY_VERSION_MINIMUM=3.5 %cmake -B "%{_vpath_builddir}" %make_build -C "%{_vpath_builddir}" @@ -90,6 +92,9 @@ zziplib library. %{_mandir}/man3/* %changelog +* Tue Nov 11 2025 Cristian Le - 0.13.78-3 +- Allow to build with CMake 4.0 (rhbz#2381654) + * Fri Jul 25 2025 Fedora Release Engineering - 0.13.78-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From d03f4d156aaa2eb0596796c71641b9414f5a6581 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 21:12:32 +0000 Subject: [PATCH 24/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index de92d19..f4d5ae4 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.78 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -92,6 +92,9 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5 %{_mandir}/man3/* %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 0.13.78-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Tue Nov 11 2025 Cristian Le - 0.13.78-3 - Allow to build with CMake 4.0 (rhbz#2381654) From 19ff1f90e5b0f7f85ee40f4a1de36805868ad79e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:45:13 +0000 Subject: [PATCH 25/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- zziplib.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zziplib.spec b/zziplib.spec index f4d5ae4..6a37379 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.78 -Release: 4%{?dist} +Release: 5%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -92,6 +92,9 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5 %{_mandir}/man3/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 0.13.78-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Sat Jan 17 2026 Fedora Release Engineering - 0.13.78-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From a9eea40832e32b53cb0132c935bfb11b9df5957d Mon Sep 17 00:00:00 2001 From: Jakub Sencak Date: Tue, 21 Jul 2026 17:38:30 +0200 Subject: [PATCH 26/26] Replaced make macros with cmake macros - the %cmake macro defaults to ninja generator instead of make - removed obsolete files. - added CMake files to devel. Assisted-by: Sonnet 4.5 --- zziplib.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/zziplib.spec b/zziplib.spec index 6a37379..5f64f51 100644 --- a/zziplib.spec +++ b/zziplib.spec @@ -4,7 +4,7 @@ Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.78 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPL-2.0-or-later OR MPL-1.1 URL: http://zziplib.sourceforge.net/ Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz @@ -64,20 +64,18 @@ zziplib library. %build # TODO: Please submit an issue to upstream (rhbz#2381654) export CMAKE_POLICY_VERSION_MINIMUM=3.5 -%cmake -B "%{_vpath_builddir}" +%cmake -%make_build -C "%{_vpath_builddir}" +%cmake_build %install -%make_install -C "%{_vpath_builddir}" +%cmake_install %ldconfig_scriptlets %files %doc docs/COPYING* ChangeLog README TODO %{_libdir}/*.so.* -%exclude %{_datadir}/zziplib/*.cmake -%exclude %{_libdir}/cmake/zziplib/*.cmake %files utils %{_bindir}/* @@ -85,13 +83,18 @@ export CMAKE_POLICY_VERSION_MINIMUM=3.5 %files devel %doc docs/README.SDL docs/*.htm %{_includedir}/* -%exclude %{_libdir}/*.la +%{_libdir}/cmake/zziplib/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/*.m4 %{_mandir}/man3/* %changelog +* Tue Jul 22 2026 Jakub Sencak - 0.13.78-6 +- Replaced make macros with cmake macros; the cmake macro defaults to ninja generator instead of make +- Removed obsolete files +- Ship CMake config files in -devel package + * Fri Jul 17 2026 Fedora Release Engineering - 0.13.78-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild