Compare commits

..

17 commits

Author SHA1 Message Date
Fedora Release Engineering
6375da78ff Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:18:51 +00:00
Fedora Release Engineering
8acab478a5 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:47:24 +00:00
Jakub Martisko
965d5021a9 Manpages: --no-extra option is actually called --strip-extra 2024-12-11 11:58:26 +01:00
Fedora Release Engineering
fabe9e5d1d Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:53:10 +00:00
Software Management Team
22bf29651c Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:50 +02:00
Fedora Release Engineering
5843ce319d Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 11:08:19 +00:00
Jakub Martisko
a2433a4859 Fix: buffer overflow with unicode file names
Resolves: rhbz#2165653
2023-09-18 13:04:00 +02:00
Fedora Release Engineering
2105f00991 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:42:58 +00:00
Lukáš Zaoral
f0aa624a47
migrate to SPDX license format 2023-04-13 14:47:41 +02:00
Fedora Release Engineering
a52777446f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:16:41 +00:00
Florian Weimer
98b40e35ca Really build with -std=gnu89 (#2143565) 2022-11-18 08:06:30 +01:00
Florian Weimer
9006220708 Build with -std=gnu89 (#2143565) 2022-11-17 09:54:36 +01:00
Fedora Release Engineering
359c42d3bf Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:56:04 +00:00
Fedora Release Engineering
aa70fe9dea - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:52:18 +00:00
Fedora Release Engineering
58c0889b70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 22:18:40 +00:00
Jakub Martisko
0a4a3aefb6 Use the generic build target instead of generic_gcc 2021-03-05 13:48:55 +01:00
Jakub Martisko
eaea924793 Use build macros 2021-03-05 13:27:50 +01:00
4 changed files with 104 additions and 11 deletions

12
buffer_overflow.patch Normal file
View file

@ -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 */

View file

@ -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

15
zip-gnu89-build.patch Normal file
View file

@ -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:

View file

@ -1,8 +1,8 @@
Summary: A file compression and packaging utility compatible with PKZIP
Name: zip
Version: 3.0
Release: 28%{?dist}
License: BSD
Release: 44%{?dist}
License: Info-ZIP
Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz
URL: http://www.info-zip.org/Zip.html
@ -16,6 +16,9 @@ Patch3: zip-3.0-time.patch
Patch4: man.patch
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
@ -31,22 +34,25 @@ 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
%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
%patch -P9 -p1
%build
make -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc %{?_smp_mflags}
%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc
%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BULD_ROOT%{_mandir}/man1
make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \
MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install
%{make_install} -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \
MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1
%files
%license LICENSE
@ -62,6 +68,55 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \
%{_mandir}/man1/zipsplit.1*
%changelog
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Dec 11 2024 Jakub Martisko <jamartis@redhat.com> - 3.0-42
- Fix teh manpage: --no-extra option is actually called --strip-extra
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Sep 18 2023 Jakub Martisko <jamartis@redhat.com> - 3.0-39
- Fixc buffer overflow in unicode file names
Resolves: rhbz#2165653
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Apr 13 2023 Lukáš Zaoral <lzaoral@redhat.com> - 3.0-37
- migrate to SPDX license format
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Nov 18 2022 Florian Weimer <fweimer@redhat.com> - 3.0-35
- Really build with -std=gnu89 (#2143565)
* Thu Nov 17 2022 Florian Weimer <fweimer@redhat.com> - 3.0-34
- Build with -std=gnu89 (#2143565)
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Mar 05 2021 Jakub Martisko <jamartis@redhat.com> - 3.0-30
- Use generic build instead of generic_gcc
* Fri Mar 05 2021 Jakub Martisko <jamartis@redhat.com> - 3.0-29
- Use build macros
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild