From 3536d7161f7b5a1d008a079d2063c6b88c67d317 Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Mon, 8 Sep 2025 17:34:38 +0800 Subject: [PATCH 1/2] [BUG]update to unzip-6.0-48 to #ICWYGV update to unzip-6.0-48 for bugfix Signed-off-by: Jacob Wang --- unzip-6.0-RHEL-86228.patch | 19 +++++++++++++++++++ unzip.spec | 32 +++++++++----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 unzip-6.0-RHEL-86228.patch diff --git a/unzip-6.0-RHEL-86228.patch b/unzip-6.0-RHEL-86228.patch new file mode 100644 index 0000000..25c2fbb --- /dev/null +++ b/unzip-6.0-RHEL-86228.patch @@ -0,0 +1,19 @@ +From: Roy Tam +Subject: Handle Microsoft ZIP64 files by ignoring invalid "Total number of disks" field +Origin: https://sourceforge.net/p/infozip/bugs/42/ +Bug: https://sourceforge.net/p/infozip/bugs/42/ +Bug-Debian: https://bugs.debian.org/1064000 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/unzip/+bug/2051952 +X-Debian-version: 6.0-29 + +--- a/process.c ++++ b/process.c +@@ -1281,7 +1281,7 @@ + fprintf(stdout,"\nnumber of disks (ECR) %u, (ECLOC64) %lu\n", + G.ecrec.number_this_disk, ecloc64_total_disks); fflush(stdout); + #endif +- if ((G.ecrec.number_this_disk != 0xFFFF) && ++ if ((G.ecrec.number_this_disk != 0xFFFF) && ecloc64_total_disks && + (G.ecrec.number_this_disk != ecloc64_total_disks - 1)) { + /* Note: For some unknown reason, the developers at PKWARE decided to + store the "zip64 total disks" value as a counter starting from 1, diff --git a/unzip.spec b/unzip.spec index fc6963e..1094968 100644 --- a/unzip.spec +++ b/unzip.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 + # Settings for EL <= 7 %if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} @@ -7,7 +7,7 @@ Summary: A utility for unpacking zip files Name: unzip Version: 6.0 -Release: 47%{anolis_release}%{?dist} +Release: 48%{?dist} License: BSD Group: Applications/Archiving Source: http://downloads.sourceforge.net/infozip/unzip60.tar.gz @@ -78,17 +78,11 @@ Patch33: unzip-zipbomb-part6.patch Patch34: unzip-zipbomb-switch.patch Patch35: unzip-6.0-fix-warning-messages-on-big-files.patch +#https://sources.debian.org/src/unzip/6.0-29/debian/patches/29-handle-windows-zip64-files.patch/ +Patch36: unzip-6.0-RHEL-86228.patch URL: http://www.info-zip.org/UnZip.html BuildRequires: bzip2-devel -Requires: glibc -Provides: /usr/bin/funzip -Provides: /usr/bin/unzip -Provides: /usr/bin/unzipsfx -Provides: /usr/bin/zipgrep -Provides: /usr/bin/zipinfo - - %description The unzip utility is used to list, test, or extract files from a zip archive. Zip archives are commonly found on MS-DOS systems. The zip @@ -100,14 +94,6 @@ in some respects. Install the unzip package if you need to list, test or extract files from a zip archive. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. - %prep %setup -q -n unzip60 %patch1 -p1 -b .bzip2-configure @@ -148,6 +134,7 @@ Doc pages for %{name}. %patch33 -p1 %patch34 -p1 %patch35 -p1 +%patch36 -p1 %build # IZ_HAVE_UXUIDGID is needed for right functionality of unzip -X @@ -163,15 +150,14 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{ %files %defattr(-,root,root) %license LICENSE COPYING.OLD +%doc README BUGS %{_bindir}/* %{_mandir}/*/* -%files doc -%doc README BUGS - %changelog -* Tue Dec 24 2024 Hangbo Fan - 6.0-47.0.1 -- Add doc sub package +* Mon Apr 07 2025 Jakub Martisko - 6.0-48 +- Allow decompression of some wrongly compressed files +Resolves: RHEL-86231 * Wed Jul 03 2024 Jakub Martisko - 6.0-47 - Fix: Unzip Fails on Large Zip Files -- Gitee From e8c163dfe90d04ebfbb235ded45aa6d98735eb11 Mon Sep 17 00:00:00 2001 From: HangBo Fan Date: Mon, 18 Jul 2022 11:09:11 +0800 Subject: [PATCH 2/2] spec: add doc sub package --- unzip.spec | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/unzip.spec b/unzip.spec index 1094968..4f83a15 100644 --- a/unzip.spec +++ b/unzip.spec @@ -1,4 +1,4 @@ - +%define anolis_release .0.1 # Settings for EL <= 7 %if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro} @@ -7,7 +7,7 @@ Summary: A utility for unpacking zip files Name: unzip Version: 6.0 -Release: 48%{?dist} +Release: 48%{anolis_release}%{?dist} License: BSD Group: Applications/Archiving Source: http://downloads.sourceforge.net/infozip/unzip60.tar.gz @@ -83,6 +83,14 @@ Patch36: unzip-6.0-RHEL-86228.patch URL: http://www.info-zip.org/UnZip.html BuildRequires: bzip2-devel +Requires: glibc +Provides: /usr/bin/funzip +Provides: /usr/bin/unzip +Provides: /usr/bin/unzipsfx +Provides: /usr/bin/zipgrep +Provides: /usr/bin/zipinfo + + %description The unzip utility is used to list, test, or extract files from a zip archive. Zip archives are commonly found on MS-DOS systems. The zip @@ -94,6 +102,14 @@ in some respects. Install the unzip package if you need to list, test or extract files from a zip archive. +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Doc pages for %{name}. + %prep %setup -q -n unzip60 %patch1 -p1 -b .bzip2-configure @@ -150,11 +166,16 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{ %files %defattr(-,root,root) %license LICENSE COPYING.OLD -%doc README BUGS %{_bindir}/* %{_mandir}/*/* +%files doc +%doc README BUGS + %changelog +* Mon Sep 08 2025 Hangbo Fan - 6.0-48.0.1 +- Add doc sub package + * Mon Apr 07 2025 Jakub Martisko - 6.0-48 - Allow decompression of some wrongly compressed files Resolves: RHEL-86231 -- Gitee