[packages/zip] Rel 5; switch to using debian patches

arekm arekm at pld-linux.org
Mon Mar 2 16:23:03 CET 2026


commit 265856eac3a21660c522f43e9e77d33b62801d02
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 2 16:22:50 2026 +0100

    Rel 5; switch to using debian patches

 debian.patch          | 398 ++++++++++++++++++++++++++++++++++++++++++++++++++
 format-security.patch |  20 ---
 zip-multilib.patch    |  11 --
 zip-zmem.patch        |  11 --
 zip.spec              |   8 +-
 5 files changed, 400 insertions(+), 48 deletions(-)
---
diff --git a/zip.spec b/zip.spec
index 21782a0..d436379 100644
--- a/zip.spec
+++ b/zip.spec
@@ -9,16 +9,14 @@ Summary(tr.UTF-8):	PKZIP(tm)-uyumlu .zip dosyaları yaratır
 Summary(uk.UTF-8):	Утиліта для компресування та упаковки файлів, сумісна з PKZIP
 Name:		zip
 Version:	3.0
-Release:	4
+Release:	5
 License:	distributable
 Group:		Applications/Archiving
 Source0:	ftp://ftp.info-zip.org/pub/infozip/src/%{name}%(echo %{version} | tr -d .).tgz
 # Source0-md5:	7b74551e63f8ee6aab6fbc86676c0d37
 Source2:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source2-md5:	72d619b4f70c06c34e5244125b62fdce
-Patch0:		%{name}-zmem.patch
-Patch1:		%{name}-multilib.patch
-Patch2:		format-security.patch
+Patch0:		debian.patch
 BuildRequires:	bzip2-devel
 BuildRequires:	unzip
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -81,8 +79,6 @@ bir birleşimi gibidir ve PKZIP uyumludur.
 %prep
 %setup -q -n %{name}30
 %patch -P0 -p1
-%patch -P1 -p1
-%patch -P2 -p1
 
 %build
 %{__make} -f unix/Makefile generic \
diff --git a/debian.patch b/debian.patch
new file mode 100644
index 0000000..d2087b5
--- /dev/null
+++ b/debian.patch
@@ -0,0 +1,398 @@
+From: A Costa <agcosta at gis.net>
+Subject: manpage typo: transfering -> transferring
+Bug-Debian: https://bugs.debian.org/301914
+X-Debian-version: 2.31-2
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -2756,7 +2756,7 @@
+ .I zip
+ handles some of the conversion internally.
+ When using Kermit to transfer zip files from VMS to MSDOS, type "set
+-file type block" on VMS.  When transfering from MSDOS to VMS, type
++file type block" on VMS.  When transferring from MSDOS to VMS, type
+ "set file type fixed" on VMS.  In both cases, type "set file type
+ binary" on MSDOS.
+ .LP
+--- a/zip.txt
++++ b/zip.txt
+@@ -1957,7 +1957,7 @@
+        be converted using Rahul Dhesi's BILF program.   This  version  of  zip
+        handles some of the conversion internally.  When using Kermit to trans-
+        fer zip files from VMS to MSDOS, type "set file  type  block"  on  VMS.
+-       When  transfering from MSDOS to VMS, type "set file type fixed" on VMS.
++       When transferring from MSDOS to VMS, type "set file type fixed" on VMS.
+        In both cases, type "set file type binary" on MSDOS.
+ 
+        Under some older VMS versions, zip may  hang  for  file  specifications
+From: A Costa <agcosta at gis.net>
+Subject: manpage typo: priviliges -> privileges
+Bug-Debian: https://bugs.debian.org/309877
+X-Debian-version: 2.31-3
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -2403,7 +2403,7 @@
+ .TP
+ .PD
+ .B \-\-use\-privileges
+-[WIN32] Use priviliges (if granted) to obtain all aspects of WinNT security.
++[WIN32] Use privileges (if granted) to obtain all aspects of WinNT security.
+ .TP
+ .PD 0
+ .B \-@
+--- a/zip.txt
++++ b/zip.txt
+@@ -1696,7 +1696,7 @@
+ 
+        -!
+        --use-privileges
+-              [WIN32]  Use  priviliges  (if  granted) to obtain all aspects of
++              [WIN32]  Use  privileges  (if  granted) to obtain all aspects of
+               WinNT security.
+ 
+        -@
+From: Lior Kaplan <webmaster at guides.co.il>
+Subject: put manpages in section 1, not in section 1L
+Bug-Debian: https://bugs.debian.org/308045
+X-Debian-version: 2.31-3
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -13,7 +13,7 @@
+ .\" 30 August 2007, 27 April 2008, 25 May 2008, 27 May 2008 by EG,
+ .\" 7 June 2008 by SMS and EG; 12 June 2008 by EG)
+ .\"
+-.TH ZIP 1L "16 June 2008 (v3.0)" Info-ZIP
++.TH ZIP 1 "16 June 2008 (v3.0)" Info-ZIP
+ .SH NAME
+ zip \- package and compress (archive) files
+ .SH SYNOPSIS
+@@ -53,14 +53,14 @@
+ and is compatible with PKZIP (Phil Katz's ZIP for MSDOS systems).
+ .LP
+ A companion program
+-.RI ( unzip (1L))
++.RI ( unzip (1))
+ unpacks
+ .I zip
+ archives.
+ The
+ .I zip
+ and
+-.IR unzip (1L)
++.IR unzip (1)
+ programs can work with archives produced by PKZIP (supporting
+ most PKZIP features up to PKZIP version 4.6),
+ and PKZIP and PKUNZIP can work with archives produced by
+@@ -2661,10 +2661,10 @@
+ [VMS] see ZIPOPT
+ .SH "SEE ALSO"
+ compress(1),
+-shar(1L),
++shar(1),
+ tar(1),
+-unzip(1L),
+-gzip(1L)
++unzip(1),
++gzip(1)
+ .SH DIAGNOSTICS
+ The exit status (or error level) approximates the exit codes defined by PKWARE
+ and takes on the following values, except under VMS:
+From: Santiago Vila <sanvila at debian.org>
+Subject: Do not set unwanted CFLAGS, as it breaks DEB_BUILD_OPTIONS
+X-Debian-version: 2.32-1
+
+--- a/unix/configure
++++ b/unix/configure
+@@ -98,7 +98,7 @@
+ _EOF_
+       $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
+       if test $? -eq 0; then
+-        CFLAGS_OPT='-O3'
++        # CFLAGS_OPT='-O3'
+         echo "  GNU C ($CFLAGS_OPT)"
+         # Special Mac OS X shared library "ld" option?
+         if test ` uname -s 2> /dev/null ` = 'Darwin'; then
+From: Santiago Vila <sanvila at debian.org>
+Subject: manpage typo: preceeding -> preceding
+X-Debian-version: 3.0-2
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -502,7 +502,7 @@
+ where the option starts with --, has a multicharacter name, can
+ include a trailing dash to negate the option (if the option
+ supports it), and can have a value (option argument) specified by
+-preceeding it with = (no spaces).  Values can also follow the
++preceding it with = (no spaces).  Values can also follow the
+ argument.  So
+ .IP
+ \fC--before-date=mmddyyyy\fP
+--- a/zip.txt
++++ b/zip.txt
+@@ -376,7 +376,7 @@
+ 
+        where the option starts with --, has a multicharacter name, can include
+        a  trailing  dash to negate the option (if the option supports it), and
+-       can have a value (option argument) specified by preceeding  it  with  =
++       can have a value (option argument) specified by preceding  it  with  =
+        (no spaces).  Values can also follow the argument.  So
+ 
+               --before-date=mmddyyyy
+From: Kees Cook <kees at debian.org>
+Subject: put stack markings in i386 assembly to avoid executable stack
+Bug-Debian: https://bugs.debian.org/528280
+X-Debian-version: 3.0-2
+
+--- a/crc_i386.S
++++ b/crc_i386.S
+@@ -302,3 +302,5 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+ 
+ #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */
++.section .note.GNU-stack, "", @progbits
++.previous
+--- a/match.S
++++ b/match.S
+@@ -405,3 +405,5 @@
+ #endif /* i386 || _I386 || _i386 || __i386  */
+ 
+ #endif /* !USE_ZLIB */
++.section .note.GNU-stack, "", @progbits
++.previous
+From: Christian Spieler
+Subject: zipnote.c: Close in_file instead of undefined file x
+Bug-Debian: https://bugs.debian.org/628594
+X-Debian-version: 3.0-4
+
+--- a/zipnote.c
++++ b/zipnote.c
+@@ -661,7 +661,7 @@
+     if ((r = zipcopy(z)) != ZE_OK)
+       ziperr(r, "was copying an entry");
+   }
+-  fclose(x);
++  fclose(in_file);
+ 
+   /* Write central directory and end of central directory with new comments */
+   if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */
+From: Santiago Vila <sanvila at debian.org>
+Subject: Use format specifier %s to print strings, not the string itself
+Bug-Debian: https://bugs.debian.org/673476
+X-Debian-version: 3.0-5
+
+--- a/zip.c
++++ b/zip.c
+@@ -1028,7 +1028,7 @@
+ 
+   for (i = 0; i < sizeof(text)/sizeof(char *); i++)
+   {
+-    printf(text[i]);
++    printf("%s", text[i]);
+     putchar('\n');
+   }
+ #ifdef DOS
+@@ -1225,7 +1225,7 @@
+             CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
+   for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
+   {
+-    printf(cryptnote[i]);
++    printf("%s", cryptnote[i]);
+     putchar('\n');
+   }
+   ++i;  /* crypt support means there IS at least one compilation option */
+From: Santiago Vila <sanvila at debian.org>
+Subject: unix/configure: Take linking flags from the environment
+Bug-Debian: https://bugs.debian.org/673476
+X-Debian-version: 3.0-5
+
+--- a/unix/configure
++++ b/unix/configure
+@@ -18,7 +18,7 @@
+ 
+ CC=${1-cc}
+ CFLAGS=${2-"-I. -DUNIX"}
+-LFLAGS1=''
++LFLAGS1=${LDFLAGS}
+ LFLAGS2=''
+ LN="ln -s"
+ 
+From: Santiago Vila <sanvila at debian.org>
+Subject: Remove (optional) build date to make the build reproducible
+Bug-Debian: https://bugs.debian.org/779042
+
+--- a/unix/unix.c
++++ b/unix/unix.c
+@@ -1020,7 +1020,7 @@
+ 
+ 
+ /* Define the compile date string */
+-#ifdef __DATE__
++#if 0
+ #  define COMPILE_DATE " on " __DATE__
+ #else
+ #  define COMPILE_DATE ""
+From: Santiago Vila <sanvila at debian.org>
+Subject: manpage typo: amgibuities -> ambiguities
+X-Debian-version: 3.0-12
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -297,7 +297,7 @@
+ If Zip64 support for large files and archives is enabled and
+ \fIzip\fR is used as a filter, \fIzip\fR creates a Zip64 archive
+ that requires a PKZIP 4.5 or later compatible unzip to read it.  This is
+-to avoid amgibuities in the zip file structure as defined in the current
++to avoid ambiguities in the zip file structure as defined in the current
+ zip standard (PKWARE AppNote) where the decision to use Zip64 needs to
+ be made before data is written for the entry, but for a stream the size
+ of the data is not known at that point.  If the data is known to be smaller
+--- a/zip.txt
++++ b/zip.txt
+@@ -184,7 +184,7 @@
+ 
+        If  Zip64  support  for  large files and archives is enabled and zip is
+        used as a filter, zip creates a Zip64 archive that requires a PKZIP 4.5
+-       or  later compatible unzip to read it.  This is to avoid amgibuities in
++       or  later compatible unzip to read it.  This is to avoid ambiguities in
+        the zip file structure as defined in the current zip  standard  (PKWARE
+        AppNote)  where  the decision to use Zip64 needs to be made before data
+        is written for the entry, but for a stream the size of the data is  not
+From: Santiago Vila <sanvila at debian.org>
+Subject: Fix build with gcc-14
+Bug-Debian: https://bugs.debian.org/1075706
+X-Debian-version: 3.0-14
+
+--- a/unix/configure
++++ b/unix/configure
+@@ -514,14 +514,16 @@
+   echo Check for $func
+   echo "int main(){ $func(); return 0; }" > conftest.c
+   $CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
+-  [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
++# glibc-based systems do not need this
++# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
+ done
+ 
+ 
+ echo Check for memset
+ echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
+ $CC -o conftest conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
++# glibc-based systems do not need this
++# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
+ 
+ 
+ echo Check for memmove
+@@ -551,7 +553,8 @@
+ }
+ _EOF_
+ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
++# glibc-based systems do not need this
++# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
+ 
+ 
+ echo Check for directory libraries
+@@ -567,7 +570,8 @@
+     $CC -o conftest conftest.c -l$lib >/dev/null 2>/dev/null
+     [ $? -eq 0 ] && OPT=-l$lib && break
+   done
+-  if [ ${OPT} ]; then
++  # glibc-based systems do not need this
++  if true; then
+     LFLAGS2="${LFLAGS2} ${OPT}"
+   else
+     CFLAGS="${CFLAGS} -DNO_DIR"
+@@ -629,7 +633,8 @@
+ }
+ _EOF_
+ $CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null
+-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC"
++# glibc-based systems do not need this
++# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC"
+ 
+ 
+ echo Check for /usr/local/bin and /usr/local/man
+From: Reuben Thomas <rrt at sc3d.org>
+Subject: Fix typo RISC OS/2 -> OS/2
+Bug-Debian: https://bugs.debian.org/1092811
+X-Debian-version: 3.0-15
+
+--- a/man/zip.1
++++ b/man/zip.1
+@@ -2776,7 +2776,7 @@
+ However, the structure layout returned by the 32-bit DosQueryPathInfo()
+ is a bit different, it uses extra padding bytes and link pointers (it's
+ a linked list) to have all fields on 4-byte boundaries for portability
+-to future RISC OS/2 versions. Therefore the value reported by
++to future OS/2 versions. Therefore the value reported by
+ .I zip
+ (which uses this 32-bit-mode size) differs from that reported by DIR.
+ .I zip
+--- a/zip.txt
++++ b/zip.txt
+@@ -1974,7 +1974,7 @@
+        when  DIRing  a  file.   However,  the structure layout returned by the
+        32-bit DosQueryPathInfo() is a bit different,  it  uses  extra  padding
+        bytes  and  link  pointers  (it's  a linked list) to have all fields on
+-       4-byte boundaries for portability to future RISC OS/2 versions.  There-
++       4-byte  boundaries  for  portability  to  future OS/2 versions.  There-
+        fore  the value reported by zip (which uses this 32-bit-mode size) dif-
+        fers from that reported by DIR.   zip  stores  the  32-bit  format  for
+        portability, even the 16-bit MS-C-compiled version running on OS/2 1.3,
+From: Shengjing Zhu <shengjing.zhu at canonical.com>
+Subject: Fix buffer overflow when filename contains unicode characters
+Bug-Debian: https://bugs.debian.org/1077054
+Bug-Debian: https://bugs.debian.org/1093629
+Bug-Ubuntu: https://launchpad.net/bugs/2062535
+Forwarded: https://sourceforge.net/p/infozip/bugs/81/
+Origin: https://src.fedoraproject.org/rpms/zip/raw/f41/f/buffer_overflow.patch
+
+--- a/fileio.c
++++ b/fileio.c
+@@ -3502,7 +3502,7 @@
+   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 */
+From: Florent 'Skia' Jacquet <florent.jacquet at canonical.com>
+Subject: Fix buffer overflow when using '-T -TT'
+Bug-Debian: https://bugs.debian.org/1093629
+Bug-Ubuntu: https://launchpad.net/bugs/2093024
+Forwarded: https://sourceforge.net/p/infozip/bugs/81/
+
+strlen(unzip_path) + strlen(zipname) + " " + "'" + "'" + '\0'
+The additional space required in the `cmd` buffer is 4, not 3.
+
+--- a/zip.c
++++ b/zip.c
+@@ -1437,7 +1437,7 @@
+     /* Replace first {} with archive name.  If no {} append name to string. */
+     here = strstr(unzip_path, "{}");
+ 
+-    if ((cmd = malloc(strlen(unzip_path) + strlen(zipname) + 3)) == NULL) {
++    if ((cmd = malloc(strlen(unzip_path) + strlen(zipname) + 4)) == NULL) {
+       ziperr(ZE_MEM, "building command string for testing archive");
+     }
+ 
+From: Marcin Owsiany <marcin at owsiany.pl>
+Subject: Fix symlink update detection
+Bug-Debian: https://bugs.debian.org/1005943
+
+--- a/unix/unix.c
++++ b/unix/unix.c
+@@ -423,7 +423,7 @@
+     }
+   }
+   if (n != NULL)
+-    *n = (s.st_mode & S_IFMT) == S_IFREG ? s.st_size : -1L;
++    *n = ((s.st_mode & S_IFMT) == S_IFREG || (s.st_mode & S_IFMT) == S_IFLNK) ? s.st_size : -1L;
+   if (t != NULL) {
+     t->atime = s.st_atime;
+     t->mtime = s.st_mtime;
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644
index 77cd8aa..0000000
--- a/format-security.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- zip30/zip.c~	2008-07-05 18:34:06.000000000 +0200
-+++ zip30/zip.c	2012-12-13 14:11:42.684570485 +0100
-@@ -1028,7 +1028,7 @@
- 
-   for (i = 0; i < sizeof(text)/sizeof(char *); i++)
-   {
--    printf(text[i]);
-+    printf("%s",text[i]);
-     putchar('\n');
-   }
- #ifdef DOS
-@@ -1225,7 +1225,7 @@
-             CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
-   for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
-   {
--    printf(cryptnote[i]);
-+    printf("%s", cryptnote[i]);
-     putchar('\n');
-   }
-   ++i;  /* crypt support means there IS at least one compilation option */
diff --git a/zip-multilib.patch b/zip-multilib.patch
deleted file mode 100644
index d0b93c6..0000000
--- a/zip-multilib.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- zip30/unix/configure.orig	2008-06-20 05:32:20.000000000 +0200
-+++ zip30/unix/configure	2009-11-01 13:19:07.000000000 +0100
-@@ -18,7 +18,7 @@
- 
- CC=${1-cc}
- CFLAGS=${2-"-I. -DUNIX"}
--LFLAGS1=''
-+LFLAGS1="${CFLAGS}"
- LFLAGS2=''
- LN="ln -s"
- 
diff --git a/zip-zmem.patch b/zip-zmem.patch
deleted file mode 100644
index f52bacc..0000000
--- a/zip-zmem.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN zip-2.3.orig/zip.h zip-2.3/zip.h
---- zip-2.3.orig/zip.h	Mon Nov  8 20:36:51 1999
-+++ zip-2.3/zip.h	Sat May  6 00:55:56 2000
-@@ -60,6 +60,7 @@
- 
- /* Set up portability */
- #include "tailor.h"
-+#include <strings.h>
- 
- #ifdef USE_ZLIB
- #  include "zlib.h"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zip.git/commitdiff/265856eac3a21660c522f43e9e77d33b62801d02



More information about the pld-cvs-commit mailing list