From 9006220708f96494df264df5b4f3f01fedbc888c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 17 Nov 2022 09:54:36 +0100 Subject: [PATCH 01/12] Build with -std=gnu89 (#2143565) --- zip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zip.spec b/zip.spec index f268133..58f5621 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 33%{?dist} +Release: 34%{?dist} License: BSD Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -39,7 +39,7 @@ program. %patch6 -p1 -b .zipnote %build -%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic +%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX -std=gnu89 $RPM_OPT_FLAGS" generic %install mkdir -p $RPM_BUILD_ROOT%{_bindir} @@ -62,6 +62,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Thu Nov 17 2022 Florian Weimer - 3.0-34 +- Build with -std=gnu89 (#2143565) + * Sat Jul 23 2022 Fedora Release Engineering - 3.0-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 98b40e35ca9c6183ddd875018ca70f88154e8d82 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 18 Nov 2022 08:06:30 +0100 Subject: [PATCH 02/12] Really build with -std=gnu89 (#2143565) --- zip-gnu89-build.patch | 15 +++++++++++++++ zip.spec | 9 +++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 zip-gnu89-build.patch diff --git a/zip-gnu89-build.patch b/zip-gnu89-build.patch new file mode 100644 index 0000000..65ee7a7 --- /dev/null +++ b/zip-gnu89-build.patch @@ -0,0 +1,15 @@ +zip uses C89-only features, so it needs to be built in C89 mode. + +diff --git a/unix/Makefile b/unix/Makefile +index 86cf54bf0f56cea9..244390893eab5fc6 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -202,7 +202,7 @@ generic: flags + eval $(MAKE) $(MAKEF) zips `cat flags` + + generic_gcc: +- $(MAKE) $(MAKEF) generic CC=gcc CPP="gcc -E" ++ $(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" CPP="gcc -E" + + # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes): + att6300nodir: diff --git a/zip.spec b/zip.spec index 58f5621..e63430e 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 34%{?dist} +Release: 35%{?dist} License: BSD Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -16,6 +16,7 @@ Patch3: zip-3.0-time.patch Patch4: man.patch Patch5: zip-3.0-format-security.patch Patch6: zipnote.patch +Patch7: zip-gnu89-build.patch BuildRequires: make BuildRequires: bzip2-devel, gcc Requires: unzip @@ -37,9 +38,10 @@ program. %patch4 -p1 -b .man %patch5 -p1 -b .format-security %patch6 -p1 -b .zipnote +%patch7 -p1 -b .gnu89-build %build -%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX -std=gnu89 $RPM_OPT_FLAGS" generic +%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc %install mkdir -p $RPM_BUILD_ROOT%{_bindir} @@ -62,6 +64,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Fri Nov 18 2022 Florian Weimer - 3.0-35 +- Really build with -std=gnu89 (#2143565) + * Thu Nov 17 2022 Florian Weimer - 3.0-34 - Build with -std=gnu89 (#2143565) From a52777446f6da7b8085c91d8e23cd8321d5df0b1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 08:16:41 +0000 Subject: [PATCH 03/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index e63430e..74966ec 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 35%{?dist} +Release: 36%{?dist} License: BSD Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -64,6 +64,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 3.0-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Nov 18 2022 Florian Weimer - 3.0-35 - Really build with -std=gnu89 (#2143565) From f0aa624a475347ca018da6736d5152fcf60e5505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 13 Apr 2023 14:47:41 +0200 Subject: [PATCH 04/12] migrate to SPDX license format --- zip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zip.spec b/zip.spec index 74966ec..23165e5 100644 --- a/zip.spec +++ b/zip.spec @@ -1,8 +1,8 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 36%{?dist} -License: BSD +Release: 37%{?dist} +License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -64,6 +64,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Thu Apr 13 2023 Lukáš Zaoral - 3.0-37 +- migrate to SPDX license format + * Sat Jan 21 2023 Fedora Release Engineering - 3.0-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 2105f009916ce9217b6eea8f9c259bb98caa871c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 19:42:58 +0000 Subject: [PATCH 05/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index 23165e5..c135645 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 37%{?dist} +Release: 38%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -64,6 +64,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 3.0-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Apr 13 2023 Lukáš Zaoral - 3.0-37 - migrate to SPDX license format From a2433a485914ddea1637097e381daf41bc943870 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mon, 18 Sep 2023 13:04:00 +0200 Subject: [PATCH 06/12] Fix: buffer overflow with unicode file names Resolves: rhbz#2165653 --- buffer_overflow.patch | 12 ++++++++++++ zip.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 buffer_overflow.patch diff --git a/buffer_overflow.patch b/buffer_overflow.patch new file mode 100644 index 0000000..2ee3fff --- /dev/null +++ b/buffer_overflow.patch @@ -0,0 +1,12 @@ +diff -urp zip30/fileio.c zip30/fileio.c +--- zip30/fileio.c 2008-05-29 03:13:24.000000000 +0300 ++++ zip30/fileio.c 2023-05-02 12:19:50.488314853 +0300 +@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin + if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) { + ZIPERR(ZE_MEM, "local_to_wide_string"); + } +- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1); ++ wsize = mbstowcs(wc_string, local_string, wsize + 1); + wc_string[wsize] = (wchar_t) 0; + + /* in case wchar_t is not zwchar */ diff --git a/zip.spec b/zip.spec index c135645..ad88b39 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 38%{?dist} +Release: 39%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -17,6 +17,7 @@ Patch4: man.patch Patch5: zip-3.0-format-security.patch Patch6: zipnote.patch Patch7: zip-gnu89-build.patch +Patch8: buffer_overflow.patch BuildRequires: make BuildRequires: bzip2-devel, gcc Requires: unzip @@ -39,6 +40,7 @@ program. %patch5 -p1 -b .format-security %patch6 -p1 -b .zipnote %patch7 -p1 -b .gnu89-build +%patch8 -p1 %build %{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc @@ -64,6 +66,10 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Mon Sep 18 2023 Jakub Martisko - 3.0-39 +- Fixc buffer overflow in unicode file names +Resolves: rhbz#2165653 + * Sat Jul 22 2023 Fedora Release Engineering - 3.0-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 5843ce319d15cc995771544f67e353ac1d78143b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 11:08:19 +0000 Subject: [PATCH 07/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index ad88b39..f6d5e05 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 39%{?dist} +Release: 40%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -66,6 +66,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 3.0-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Sep 18 2023 Jakub Martisko - 3.0-39 - Fixc buffer overflow in unicode file names Resolves: rhbz#2165653 From 22bf29651c674e013f783b0c418e4098ee4e20ae Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:50 +0200 Subject: [PATCH 08/12] Eliminate use of obsolete %patchN syntax (#2283636) --- zip.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zip.spec b/zip.spec index f6d5e05..bc32f03 100644 --- a/zip.spec +++ b/zip.spec @@ -33,14 +33,14 @@ program. %prep %setup -q -n zip30 -%patch1 -p1 -b .exec-shield -%patch2 -p1 -b .currdir -%patch3 -p1 -b .time -%patch4 -p1 -b .man -%patch5 -p1 -b .format-security -%patch6 -p1 -b .zipnote -%patch7 -p1 -b .gnu89-build -%patch8 -p1 +%patch -P1 -p1 -b .exec-shield +%patch -P2 -p1 -b .currdir +%patch -P3 -p1 -b .time +%patch -P4 -p1 -b .man +%patch -P5 -p1 -b .format-security +%patch -P6 -p1 -b .zipnote +%patch -P7 -p1 -b .gnu89-build +%patch -P8 -p1 %build %{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc From fabe9e5d1d71424b126e014f3e80611f3b2c1601 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:53:10 +0000 Subject: [PATCH 09/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index bc32f03..e8f8334 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 40%{?dist} +Release: 41%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -66,6 +66,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 3.0-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 3.0-40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 965d5021a90efceade8964771257b385036c84de Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 11 Dec 2024 11:58:26 +0100 Subject: [PATCH 10/12] Manpages: --no-extra option is actually called --strip-extra --- zip-3.0-man-strip-extra.patch | 11 +++++++++++ zip.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 zip-3.0-man-strip-extra.patch diff --git a/zip-3.0-man-strip-extra.patch b/zip-3.0-man-strip-extra.patch new file mode 100644 index 0000000..abb9f7c --- /dev/null +++ b/zip-3.0-man-strip-extra.patch @@ -0,0 +1,11 @@ +--- ./man/zip.1.old 2024-12-11 10:51:22.837845520 +0100 ++++ ./man/zip.1 2024-12-11 10:51:34.458142392 +0100 +@@ -2297,7 +2297,7 @@ + .B \-X + .TP + .PD +-.B \-\-no\-extra ++.B \-\-strip\-extra + Do not save extra file attributes (Extended Attributes on OS/2, uid/gid + and file times on Unix). The zip format uses extra fields to include + additional information for each entry. Some extra fields are specific diff --git a/zip.spec b/zip.spec index e8f8334..2a22eb1 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 41%{?dist} +Release: 42%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -18,6 +18,7 @@ Patch5: zip-3.0-format-security.patch Patch6: zipnote.patch Patch7: zip-gnu89-build.patch Patch8: buffer_overflow.patch +Patch9: zip-3.0-man-strip-extra.patch BuildRequires: make BuildRequires: bzip2-devel, gcc Requires: unzip @@ -41,6 +42,7 @@ program. %patch -P6 -p1 -b .zipnote %patch -P7 -p1 -b .gnu89-build %patch -P8 -p1 +%patch -P9 -p1 %build %{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc @@ -66,6 +68,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Wed Dec 11 2024 Jakub Martisko - 3.0-42 +- Fix teh manpage: --no-extra option is actually called --strip-extra + * Sat Jul 20 2024 Fedora Release Engineering - 3.0-41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8acab478a5db907f8568d2593308a9bf64b08693 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 16:47:24 +0000 Subject: [PATCH 11/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index 2a22eb1..9c8bbd2 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 42%{?dist} +Release: 43%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -68,6 +68,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 3.0-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Dec 11 2024 Jakub Martisko - 3.0-42 - Fix teh manpage: --no-extra option is actually called --strip-extra From 6375da78ffeaa94516e9e220aa4c3bd81a9a8ed9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 21:18:51 +0000 Subject: [PATCH 12/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- zip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zip.spec b/zip.spec index 9c8bbd2..c1b23e3 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 43%{?dist} +Release: 44%{?dist} License: Info-ZIP Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html @@ -68,6 +68,9 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 %{_mandir}/man1/zipsplit.1* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 3.0-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jan 19 2025 Fedora Release Engineering - 3.0-43 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild