From ae7f69310952e3c083c115a929e1cc4d579da10ec05b0afba1ca64db81451150 Mon Sep 17 00:00:00 2001 From: Philipp Thomas Date: Fri, 21 May 2010 14:47:23 +0000 Subject: [PATCH] - Update to 6.0: * Support PKWARE ZIP64 extensions, allowing Zip archives and Zip archive entries larger than 4 GiBytes and more than 65536 entries within a single Zip archive. This support is currently only available for Unix, OpenVMS and Win32/Win64. * Support for bzip2 compression method. * Support for UTF-8 encoded entry names, both through PKWARE's "General Purpose Flags Bit 11" indicator and Info-ZIP's new "up" unicode path extra field. (Currently, on Windows the UTF-8 handling is limited to the character subset contained in the configured non-unicode "system code page".) * Fixed "Time of Creation/Time of Use" vulnerability when setting attributes of extracted files, for Unix and Unix-like ports. * Fixed memory leak when processing invalid deflated data. * Fixed long-standing bug in unshrink (partial_clear), added boundary checks against invalid compressed data. * On Unix, keep inherited SGID attribute bit for extracted directories unless restoration of owner/group id or SUID/SGID/Tacky attributes was requested. * On Unix, allow extracted filenames to contain embedded control characters when explicitly requested by specifying the new command line option "-^". * On Unix, support restoration of symbolic link attributes. * On Unix, support restoration of 32-bit UID/GID data using the new "ux" IZUNIX3 extra field introduced with Zip 3.0. * Support symbolic links zipped up on VMS. * New -D option to suppress restoration of timestamps for extracted directory entries (on those ports that support setting of directory timestamps). By specifying "-DD", this new option also allows to suppress timestamp restoration for ALL extracted files on all UnZip ports which support restoration of timestamps. On VMS, the default behaviour is now to skip restoration of directory timestamps; here, "--D" restores ALL timestamps, "-D" restores none. * On OS/2, Win32, and Unix, the (previously optional) feature UNIXBACKUP to allow saving backup copies of overwritten files on extraction is now enabled by default. OBS-URL: https://build.opensuse.org/package/show/Archiving/unzip?expand=0&rev=8 --- unzip-5.5.2-goo-sec.patch | 50 ----- unzip-5.52-filename_too_long.patch | 20 +- unzip-5.52-use_librcc.patch | 14 +- unzip-CVE-2005-2475.patch | 36 ---- unzip-iso8859_2.patch | 86 +++++---- unzip-near-4GB.patch | 267 --------------------------- unzip-no_file_name_translation.patch | 73 ++++---- unzip-open_missing_mode.patch | 52 ++++-- unzip-optflags.patch | 18 +- unzip.changes | 40 ++++ unzip.dif | 11 +- unzip.spec | 23 +-- unzip552.tar.bz2 | 3 - unzip60.tar.bz2 | 3 + 14 files changed, 208 insertions(+), 488 deletions(-) delete mode 100644 unzip-5.5.2-goo-sec.patch delete mode 100644 unzip-CVE-2005-2475.patch delete mode 100644 unzip-near-4GB.patch delete mode 100644 unzip552.tar.bz2 create mode 100644 unzip60.tar.bz2 diff --git a/unzip-5.5.2-goo-sec.patch b/unzip-5.5.2-goo-sec.patch deleted file mode 100644 index 01593f8..0000000 --- a/unzip-5.5.2-goo-sec.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- inflate.c 2005-02-27 06:08:46.000000000 +0000 -+++ inflate.c 2006-07-19 21:45:33.543595000 +0100 -@@ -983,6 +983,7 @@ - unsigned l; /* last length */ - unsigned m; /* mask for bit lengths table */ - unsigned n; /* number of lengths to get */ -+ struct huft *tlp; - struct huft *tl; /* literal/length code table */ - struct huft *td; /* distance code table */ - unsigned bl; /* lookup bits for tl */ -@@ -996,6 +997,8 @@ - int retval = 0; /* error code returned: initialized to "no error" */ - - -+ td = tlp = tl = (struct huft *)NULL; -+ - /* make local bit buffer */ - Trace((stderr, "\ndynamic block")); - b = G.bb; -@@ -1047,9 +1050,9 @@ - while (i < n) - { - NEEDBITS(bl) -- j = (td = tl + ((unsigned)b & m))->b; -+ j = (tlp = tl + ((unsigned)b & m))->b; - DUMPBITS(j) -- j = td->v.n; -+ j = tlp->v.n; - if (j < 16) /* length of code in bits (0..15) */ - ll[i++] = l = j; /* save last length in l */ - else if (j == 16) /* repeat last length 3 to 6 times */ -@@ -1141,6 +1144,7 @@ - huft_free(td); - } - huft_free(tl); -+ - return retval; - } - -@@ -1149,8 +1153,8 @@ - - cleanup_and_exit: - /* free the decoding tables, return */ -- huft_free(tl); -- huft_free(td); -+ if (tl) huft_free(tl); -+ if (td) huft_free(td); - return retval; - } - diff --git a/unzip-5.52-filename_too_long.patch b/unzip-5.52-filename_too_long.patch index a673426..10aab51 100644 --- a/unzip-5.52-filename_too_long.patch +++ b/unzip-5.52-filename_too_long.patch @@ -1,17 +1,17 @@ ---- process.c -+++ process.c -@@ -156,8 +156,8 @@ +Index: process.c +=================================================================== +--- process.c.orig 2009-03-06 02:25:10.000000000 +0100 ++++ process.c 2010-05-21 13:17:28.292590863 +0200 +@@ -203,6 +203,8 @@ static ZCONST char Far Cent64EndSigSearc + #endif static ZCONST char Far ZipfileCommTrunc1[] = "\ncaution: zipfile comment truncated\n"; - -- -- +static ZCONST char Far FileNameTooLong[] = + "%s: error: %s (truncated): %s\n"; - - /*******************************/ - /* Function process_zipfiles() */ -@@ -314,6 +314,17 @@ + #ifndef NO_ZIPINFO + static ZCONST char Far NoZipfileComment[] = + "There is no zipfile comment.\n"; +@@ -390,6 +392,17 @@ int process_zipfiles(__G) /* return P lastzipfn = G.zipfn; diff --git a/unzip-5.52-use_librcc.patch b/unzip-5.52-use_librcc.patch index 1f0c7e5..a870735 100644 --- a/unzip-5.52-use_librcc.patch +++ b/unzip-5.52-use_librcc.patch @@ -4,7 +4,7 @@ Description: Provides header file Index: dsrecode.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ dsrecode.c 2010-05-10 18:00:17.972091018 +0200 ++++ dsrecode.c 2010-05-21 14:25:19.192590879 +0200 @@ -0,0 +1,137 @@ +#include + @@ -145,9 +145,9 @@ Index: dsrecode.c +} Index: fileio.c =================================================================== ---- fileio.c.orig 2010-05-10 18:00:17.912090858 +0200 -+++ fileio.c 2010-05-10 18:00:17.976090793 +0200 -@@ -78,7 +78,7 @@ +--- fileio.c.orig 2010-05-21 14:25:19.172590765 +0200 ++++ fileio.c 2010-05-21 14:25:19.192590879 +0200 +@@ -82,7 +82,7 @@ # endif #endif #include "ebcdic.h" /* definition/initialization of ebcdic[] */ @@ -158,9 +158,9 @@ Index: fileio.c Note: Under Windows, the maximum size of the buffer that can be used Index: unzpriv.h =================================================================== ---- unzpriv.h.orig 2010-05-10 18:00:17.848090721 +0200 -+++ unzpriv.h 2010-05-10 18:00:18.016090830 +0200 -@@ -2582,10 +2582,11 @@ char *GetLoadPath OF((__GPRO)); +--- unzpriv.h.orig 2010-05-21 14:24:55.632590821 +0200 ++++ unzpriv.h 2010-05-21 14:25:19.220590722 +0200 +@@ -3025,10 +3025,11 @@ char *GetLoadPath OF((__GPRO)); !(((islochdr) || (isuxatt)) && \ ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ (hostnum) == FS_HPFS_ || \ diff --git a/unzip-CVE-2005-2475.patch b/unzip-CVE-2005-2475.patch deleted file mode 100644 index 56846d1..0000000 --- a/unzip-CVE-2005-2475.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- unix/unix.c -+++ unix/unix.c -@@ -1042,6 +1042,16 @@ - ush z_uidgid[2]; - int have_uidgid_flg; - -+/*--------------------------------------------------------------------------- -+ Change the file permissions from default ones to those stored in the -+ zipfile. This has to done *before* closing the file. -+ ---------------------------------------------------------------------------*/ -+ -+#ifndef NO_CHMOD -+ if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr))) -+ perror("chmod (file attributes) error"); -+#endif -+ - fclose(G.outfile); - - /*--------------------------------------------------------------------------- -@@ -1151,16 +1161,6 @@ - #endif /* ?AOS_VS */ - } - --/*--------------------------------------------------------------------------- -- Change the file permissions from default ones to those stored in the -- zipfile. -- ---------------------------------------------------------------------------*/ -- --#ifndef NO_CHMOD -- if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr))) -- perror("chmod (file attributes) error"); --#endif -- - } /* end function close_outfile() */ - - #endif /* !MTS */ diff --git a/unzip-iso8859_2.patch b/unzip-iso8859_2.patch index dc933c0..499e5f3 100644 --- a/unzip-iso8859_2.patch +++ b/unzip-iso8859_2.patch @@ -1,6 +1,8 @@ ---- unzip-5.52/ebcdic.h -+++ unzip-5.52/ebcdic.h -@@ -254,6 +254,25 @@ +Index: ebcdic.h +=================================================================== +--- ebcdic.h.orig 2008-03-21 13:04:22.000000000 +0100 ++++ ebcdic.h 2010-05-21 14:07:51.000091055 +0200 +@@ -254,6 +254,25 @@ ZCONST uch Far iso2oem_850[] = { 0xD0, 0xA4, 0x95, 0xA2, 0x93, 0xE4, 0x94, 0xF6, /* F0 - F7 */ 0x9B, 0x97, 0xA3, 0x96, 0x81, 0xEC, 0xE7, 0x98 /* F8 - FF */ }; @@ -26,7 +28,7 @@ #endif /* IZ_ISO2OEM_ARRAY */ #ifdef IZ_OEM2ISO_ARRAY -@@ -275,8 +294,28 @@ +@@ -275,6 +294,25 @@ ZCONST uch Far oem2iso_850[] = { 0xAD, 0xB1, 0x3D, 0xBE, 0xB6, 0xA7, 0xF7, 0xB8, /* F0 - F7 */ 0xB0, 0xA8, 0xB7, 0xB9, 0xB3, 0xB2, 0xA6, 0xA0 /* F8 - FF */ }; @@ -51,22 +53,21 @@ +}; #endif /* IZ_OEM2ISO_ARRAY */ -+ - #if defined(THEOS) || defined(THEOS_SUPPORT) - # include "theos/charconv.h" - #endif ---- unzip-5.52/man/unzip.1 -+++ unzip-5.52/man/unzip.1 + /* The following pointers to the OEM<-->ISO translation tables are used +Index: man/unzip.1 +=================================================================== +--- man/unzip.1.orig 2009-04-20 02:33:10.000000000 +0200 ++++ man/unzip.1 2010-05-21 14:23:25.824590928 +0200 @@ -25,7 +25,7 @@ unzip \- list, test and extract compressed files in a ZIP archive .PD .SH SYNOPSIS --\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCKLMVWX$/:\fP]] -+\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCKLMOVX$/:\fP]] +-\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCDKLMUVWX$/:^\fP]] ++\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCDKLMOUVWX$/:^\fP]] \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] [\fB\-d\fP\ \fIexdir\fP] .PD -@@ -342,6 +342,9 @@ +@@ -386,6 +386,9 @@ of \fIzip\fP(1L), which stores filenotes overwrite existing files without prompting. This is a dangerous option, so use it with care. (It is often used with \fB\-f\fP, however, and is the only way to overwrite directory EAs under OS/2.) @@ -76,9 +77,11 @@ .IP \fB\-P\fP\ \fIpassword\fP use \fIpassword\fP to decrypt encrypted zipfile entries (if any). \fBTHIS IS INSECURE!\fP Many multi-user operating systems provide ways for any user to ---- unzip-5.52/unzip.c -+++ unzip-5.52/unzip.c -@@ -1327,6 +1327,12 @@ +Index: unzip.c +=================================================================== +--- unzip.c.orig 2009-04-16 20:26:52.000000000 +0200 ++++ unzip.c 2010-05-21 14:23:25.824590928 +0200 +@@ -1592,6 +1592,12 @@ int uz_opts(__G__ pargc, pargv) } else ++uO.overwrite_all; break; @@ -91,9 +94,11 @@ case ('p'): /* pipes: extract to stdout, no messages */ if (negative) { uO.cflag = FALSE; ---- unzip-5.52/unzip.h -+++ unzip-5.52/unzip.h -@@ -462,6 +462,7 @@ +Index: unzip.h +=================================================================== +--- unzip.h.orig 2009-02-15 19:12:54.000000000 +0100 ++++ unzip.h 2010-05-21 14:23:25.824590928 +0200 +@@ -502,6 +502,7 @@ typedef struct _UzpOpts { int K_flag; /* -K: keep setuid/setgid/tacky permissions */ #endif int lflag; /* -12slmv: listing format (zipinfo) */ @@ -101,15 +106,17 @@ int L_flag; /* -L: convert filenames from some OSes to lowercase */ int overwrite_none; /* -n: never overwrite files (no prompting) */ #ifdef AMIGA ---- unzip-5.52/unzpriv.h -+++ unzip-5.52/unzpriv.h -@@ -2456,8 +2456,15 @@ +Index: unzpriv.h +=================================================================== +--- unzpriv.h.orig 2009-04-20 01:59:26.000000000 +0200 ++++ unzpriv.h 2010-05-21 14:24:02.641090783 +0200 +@@ -2899,8 +2899,15 @@ char *GetLoadPath OF((__GPRO)); # define IZ_ISO2OEM_ARRAY # endif - # define _ISO_INTERN(str1) {register uch *p;\ + # define _ISO_INTERN(str1) if (iso2oem) {register uch *p;\ - for (p=(uch *)(str1); *p; p++)\ - *p = native((*p & 0x80) ? iso2oem[*p & 0x7f] : *p);} -+ if (uO.iso8859_2 == FASLE) { \ ++ if (uO.iso8859_2 == FALSE) { \ + for (p=(uch *)(str1); *p; p++) \ + *p = native((*p & 0x80) ? iso2oem[*p & 0x7f] : *p); \ + } \ @@ -121,10 +128,10 @@ # else # define _ISO_INTERN(str1) A_TO_N(str1) # endif -@@ -2471,8 +2478,15 @@ +@@ -2914,8 +2921,15 @@ char *GetLoadPath OF((__GPRO)); # define IZ_OEM2ISO_ARRAY # endif - # define _OEM_INTERN(str1) {register uch *p;\ + # define _OEM_INTERN(str1) if (oem2iso) {register uch *p;\ - for (p=(uch *)(str1); *p; p++)\ - *p = native((*p & 0x80) ? oem2iso[*p & 0x7f] : *p);} + if (uO.iso8859_2 == FALSE) { \ @@ -139,37 +146,36 @@ # endif #endif -@@ -2497,7 +2511,9 @@ - #if (!defined(INTERN_TO_ISO) && !defined(ASCII2ISO)) - # ifdef CRTL_CP_IS_OEM +@@ -2942,6 +2956,7 @@ char *GetLoadPath OF((__GPRO)); /* know: "ASCII" is "OEM" */ --# define ASCII2ISO(c) (((c) & 0x80) ? oem2iso[(c) & 0x7f] : (c)) -+# define ASCII2ISO(c) (((c) & 0x80) ? \ -+ ((uO.iso8859_2 == FALSE) ? oem2iso[(c) & 0x7f] : oem2iso_2[(c) & 0x7f]) : \ -+ (c)) + # define ASCII2ISO(c) \ + ((((c) & 0x80) && oem2iso) ? oem2iso[(c) & 0x7f] : (c)) ++ (( ((c) & 0x80) ? ((uO.iso8859_2 == FALSE) ? (oem2iso ? oem2iso[(c) & 0x7f] : (c)) : oem2iso_2[(c) & 0x7f]) : (c)) # if (defined(NEED_STR2ISO) && !defined(CRYP_USES_OEM2ISO)) # define CRYP_USES_OEM2ISO # endif -@@ -2513,7 +2529,9 @@ +@@ -2957,8 +2972,9 @@ char *GetLoadPath OF((__GPRO)); # define ASCII2OEM(c) (c) # else /* assume: "ASCII" is "ISO-ANSI" */ --# define ASCII2OEM(c) (((c) & 0x80) ? iso2oem[(c) & 0x7f] : (c)) +-# define ASCII2OEM(c) \ +- ((((c) & 0x80) && iso2oem) ? iso2oem[(c) & 0x7f] : (c)) +# define ASCII2OEM(c) (((c) & 0x80) ? \ -+ ((uO.iso8859_2 == FALSE) ? iso2oem[(c) & 0x7f] : iso2oem_2[(c) & 0x7f]) : \ ++ ((uO.iso8859_2 == FALSE) ? (iso2oem ? iso2oem[(c) & 0x7f] : (c)) : iso2oem_2[(c) & 0x7f]) : \ + (c)) # if (defined(NEED_STR2OEM) && !defined(CRYP_USES_ISO2OEM)) # define CRYP_USES_ISO2OEM # endif -@@ -2584,9 +2602,11 @@ +@@ -3029,10 +3045,12 @@ char *GetLoadPath OF((__GPRO)); #endif #ifdef IZ_ISO2OEM_ARRAY - extern ZCONST uch Far iso2oem[]; + extern ZCONST uch Far *iso2oem; + extern ZCONST uch Far iso2oem_2[]; + extern ZCONST uch Far iso2oem_850[]; #endif #ifdef IZ_OEM2ISO_ARRAY - extern ZCONST uch Far oem2iso[]; + extern ZCONST uch Far *oem2iso; + extern ZCONST uch Far oem2iso_2[]; + extern ZCONST uch Far oem2iso_850[]; #endif - extern ZCONST char Far VersionDate[]; diff --git a/unzip-near-4GB.patch b/unzip-near-4GB.patch deleted file mode 100644 index fd7af74..0000000 --- a/unzip-near-4GB.patch +++ /dev/null @@ -1,267 +0,0 @@ ---- extract.c 2005-02-26 05:47:30.000000000 +0100 -+++ extract.c 2007-12-03 13:49:01.000000000 +0100 -@@ -308,7 +308,7 @@ int extract_or_test_files(__G) /* ret - int reached_end, no_endsig_found; - int error, error_in_archive=PK_COOL; - int *fn_matched=NULL, *xn_matched=NULL; -- unsigned members_processed; -+ Z_OFF_T members_processed; - ulg num_skipped=0L, num_bad_pwd=0L; - Z_OFF_T old_extra_bytes = 0L; - #ifdef SET_DIR_ATTRIB -@@ -541,7 +541,7 @@ int extract_or_test_files(__G) /* ret - G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); - #else /* !USE_STRM_INPUT */ - G.cur_zipfile_bufstart = -- lseek(G.zipfd, cd_bufstart, SEEK_SET); -+ lseek64(G.zipfd,(Z_OFF_T)cd_bufstart, SEEK_SET); - #endif /* ?USE_STRM_INPUT */ - read(G.zipfd, (char *)G.inbuf, INBUFSIZ); /* been here before... */ - G.inptr = cd_inptr; -@@ -942,7 +942,8 @@ static int extract_or_test_entrylist(__G - Trace((stderr, - "debug: bufstart = %ld, cur_zipfile_bufstart = %ld\n", - (long)bufstart, (long)G.cur_zipfile_bufstart)); -- if (request < 0) { -+ if ((request < 0) || (request > MAX_ZIP_SIZE)) { /* >2^32-8193 */ -+ printf("retry - request = 0x%lu\n", (ulg)request); - Info(slide, 0x401, ((char *)slide, LoadFarStringSmall(SeekMsg), - G.zipfn, LoadFarString(ReportMsg))); - error_in_archive = PK_ERR; -@@ -982,7 +983,7 @@ static int extract_or_test_entrylist(__G - G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); - #else /* !USE_STRM_INPUT */ - G.cur_zipfile_bufstart = -- lseek(G.zipfd, bufstart, SEEK_SET); -+ lseek64(G.zipfd, bufstart, SEEK_SET); - #endif /* ?USE_STRM_INPUT */ - if ((G.incnt = read(G.zipfd, (char *)G.inbuf, INBUFSIZ)) <= 0) - { ---- fileio.c 2005-02-27 03:10:12.000000000 +0100 -+++ fileio.c 2007-12-03 13:49:01.000000000 +0100 -@@ -113,6 +113,9 @@ static int disk_error OF((__GPRO)); - /* Strings used in fileio.c */ - /****************************/ - -+static ZCONST char Far ZipFileTooBig[] = -+ "error: Zip file too big (greater than %lu bytes)\n"; -+ - static ZCONST char Far CannotOpenZipfile[] = - "error: cannot open zipfile [ %s ]\n %s\n"; - -@@ -183,6 +186,7 @@ static ZCONST char Far ExtraFieldTooLong - int open_input_file(__G) /* return 1 if open failed */ - __GDEF - { -+ struct stat64 sb; - /* - * open the zipfile for reading and in BINARY mode to prevent cr/lf - * translation, which would corrupt the bitstreams -@@ -201,9 +205,9 @@ int open_input_file(__G) /* return 1 - G.zipfd = fopen(G.zipfn, FOPR); - #else /* !USE_STRM_INPUT */ - # ifdef O_BINARY -- G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY); -+ G.zipfd = open(G.zipfn, O_RDONLY | O_BINARY | O_LARGEFILE); - # else -- G.zipfd = open(G.zipfn, O_RDONLY); -+ G.zipfd = open(G.zipfn, O_RDONLY | O_LARGEFILE); - # endif - #endif /* ?USE_STRM_INPUT */ - #endif /* ?CMS_MVS */ -@@ -221,6 +225,12 @@ int open_input_file(__G) /* return 1 - G.zipfn, strerror(errno))); - return 1; - } -+ fstat64(G.zipfd, &sb); -+ if (sb.st_size > MAX_ZIP_SIZE) { -+ Info(slide, 0x401, ((char *)slide, -+ LoadFarString(ZipFileTooBig), -+ ((ulg)MAX_ZIP_SIZE))); -+ } - return 0; - - } /* end function open_input_file() */ -@@ -238,6 +248,7 @@ int open_input_file(__G) /* return 1 - int open_outfile(__G) /* return 1 if fail */ - __GDEF - { -+ int fd; - #ifdef DLL - if (G.redirect_data) - return (redirect_outfile(__G) == FALSE); -@@ -259,7 +270,7 @@ int open_outfile(__G) /* return - } - #endif /* BORLAND_STAT_BUG */ - #ifdef SYMLINKS -- if (SSTAT(G.filename, &G.statbuf) == 0 || lstat(G.filename,&G.statbuf) == 0) -+ if (SSTAT(G.filename, &G.statbuf) == 0 || lstat64(G.filename,&G.statbuf) == 0) - #else - if (SSTAT(G.filename, &G.statbuf) == 0) - #endif /* ?SYMLINKS */ -@@ -413,7 +424,9 @@ int open_outfile(__G) /* return - #endif /* NOVELL_BUG_FAILSAFE */ - Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", - FnFilter1(G.filename))); -- if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) { -+ -+ fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT); -+ if ((G.outfile = fdopen(fd, FOPW)) == (FILE *)NULL) { - Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), - FnFilter1(G.filename))); - return 1; -@@ -682,7 +695,7 @@ int seek_zipf(__G__ abs_offset) - Z_OFF_T inbuf_offset = request % INBUFSIZ; - Z_OFF_T bufstart = request - inbuf_offset; - -- if (request < 0) { -+ if (request < 0) { - Info(slide, 1, ((char *)slide, LoadFarStringSmall(SeekMsg), - G.zipfn, LoadFarString(ReportMsg))); - return(PK_BADERR); -@@ -694,7 +707,7 @@ int seek_zipf(__G__ abs_offset) - fseek(G.zipfd, bufstart, SEEK_SET); - G.cur_zipfile_bufstart = ftell(G.zipfd); - #else /* !USE_STRM_INPUT */ -- G.cur_zipfile_bufstart = lseek(G.zipfd, bufstart, SEEK_SET); -+ G.cur_zipfile_bufstart = lseek64(G.zipfd, bufstart, SEEK_SET); - #endif /* ?USE_STRM_INPUT */ - Trace((stderr, - " request = %ld, (abs+extra) = %ld, inbuf_offset = %ld\n", -@@ -1850,7 +1863,7 @@ int check_for_newer(__G__ filename) /* - Trace((stderr, "check_for_newer: doing lstat(%s)\n", - FnFilter1(filename))); - /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ -- if (lstat(filename, &G.statbuf) == 0) { -+ if (lstat64(filename, &G.statbuf) == 0) { - Trace((stderr, - "check_for_newer: lstat(%s) returns 0: symlink does exist\n", - FnFilter1(filename))); -@@ -1867,7 +1880,7 @@ int check_for_newer(__G__ filename) /* - - #ifdef SYMLINKS - /* GRR OPTION: could instead do this test ONLY if G.symlnk is true */ -- if (lstat(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) { -+ if (lstat64(filename, &G.statbuf) == 0 && S_ISLNK(G.statbuf.st_mode)) { - Trace((stderr, "check_for_newer: %s is a symbolic link\n", - FnFilter1(filename))); - if (QCOND2 && !IS_OVERWRT_ALL) ---- globals.h 2004-11-22 01:42:00.000000000 +0100 -+++ globals.h 2007-12-03 13:49:01.000000000 +0100 -@@ -256,7 +256,12 @@ typedef struct Globals { - local_file_hdr lrec; /* used in unzip.c, extract.c */ - cdir_file_hdr crec; /* used in unzip.c, extract.c, misc.c */ - ecdir_rec ecrec; /* used in unzip.c, extract.c */ -- struct stat statbuf; /* used by main, mapname, check_for_newer */ -+#ifdef _LARGEFILE64_SOURCE -+ struct stat64 statbuf; /* used by main, mapname, check_for_newer */ -+#else -+ struct stat statbuf; /* used by main, mapname, check_for_newer */ -+#endif -+ - - int mem_mode; - uch *outbufptr; /* extract.c static */ ---- list.c 2005-01-27 02:02:02.000000000 +0100 -+++ list.c 2007-12-03 13:55:10.000000000 +0100 -@@ -62,12 +62,12 @@ - "%8lu %-7s%8lu %4s %02u%c%02u%c%02u %02u:%02u %08lx %c"; - static ZCONST char Far LongFileTrailer[] = - "-------- ------- --- \ -- -------\n%8lu %8lu %4s %lu file%s\n"; -+ -------\n%8ju %8ju %4s %lu file%s\n"; - #ifdef OS2_EAS - static ZCONST char Far ShortHdrStats[] = - "%9lu %6lu %6lu %02u%c%02u%c%02u %02u:%02u %c"; - static ZCONST char Far ShortFileTrailer[] = " -------- ----- ----- \ -- -------\n%9lu %6lu %6lu %lu file%s\n"; -+ -------\n%9ju %6lu %6lu %lu file%s\n"; - static ZCONST char Far OS2ExtAttrTrailer[] = - "%lu file%s %lu bytes of OS/2 extended attributes attached.\n"; - static ZCONST char Far OS2ACLTrailer[] = -@@ -76,7 +76,7 @@ - static ZCONST char Far ShortHdrStats[] = - "%9lu %02u%c%02u%c%02u %02u:%02u %c"; - static ZCONST char Far ShortFileTrailer[] = " -------- \ -- -------\n%9lu %lu file%s\n"; -+ -------\n%9ju %lu file%s\n"; - #endif /* ?OS2_EAS */ - #endif /* !WINDLL */ - -@@ -105,7 +105,8 @@ int list_files(__G) /* return PK-type - struct tm *t; - #endif - unsigned yr, mo, dy, hh, mm; -- ulg csiz, tot_csize=0L, tot_ucsize=0L; -+ ulg csiz; -+ unsigned long long tot_csize=0, tot_ucsize=0; - #ifdef OS2_EAS - ulg ea_size, tot_easize=0L, tot_eafiles=0L; - ulg acl_size, tot_aclsize=0L, tot_aclfiles=0L; ---- process.c 2007-12-03 13:44:30.000000000 +0100 -+++ process.c 2007-12-03 13:49:01.000000000 +0100 -@@ -934,8 +934,8 @@ static int find_ecrec(__G__ searchlen) - Treat case of short zipfile separately. - ---------------------------------------------------------------------------*/ - -- if (G.ziplen <= INBUFSIZ) { -- lseek(G.zipfd, 0L, SEEK_SET); -+ if ((unsigned long)G.ziplen <= (unsigned long)INBUFSIZ) { -+ lseek64(G.zipfd, 0L, SEEK_SET); - if ((G.incnt = read(G.zipfd,(char *)G.inbuf,(unsigned int)G.ziplen)) - == (int)G.ziplen) - -@@ -962,7 +962,7 @@ static int find_ecrec(__G__ searchlen) - fseek((FILE *)G.zipfd, G.ziplen-tail_len, SEEK_SET); - G.cur_zipfile_bufstart = ftell((FILE *)G.zipfd); - #else /* !USE_STRM_INPUT */ -- G.cur_zipfile_bufstart = lseek(G.zipfd, G.ziplen-tail_len, -+ G.cur_zipfile_bufstart = lseek64(G.zipfd, G.ziplen-tail_len, - SEEK_SET); - #endif /* ?USE_STRM_INPUT */ - if ((G.incnt = read(G.zipfd, (char *)G.inbuf, -@@ -996,7 +996,7 @@ static int find_ecrec(__G__ searchlen) - - for (i = 1; !found && (i <= numblks); ++i) { - G.cur_zipfile_bufstart -= INBUFSIZ; -- lseek(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); -+ lseek64(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); - if ((G.incnt = read(G.zipfd,(char *)G.inbuf,INBUFSIZ)) - != INBUFSIZ) - break; /* fall through and fail */ ---- unix/Makefile 2007-12-03 13:44:30.000000000 +0100 -+++ unix/Makefile 2007-12-03 13:54:38.000000000 +0100 -@@ -783,7 +783,7 @@ linux_asm: linux - # Linux (Posix, approximately SysV): virtually any version since before 0.96, - # for any platform. Change "-O" to "-O3" or whatever, as desired... - linux_noasm: unix_make -- $(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS) -I. $(LOC)" -+ $(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -I. $(LOC)" - - # Linux with lcc compiler: __inline__ (stat.h) not recognized, and must edit - # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined. -O3 ---- unzip.h 2007-12-03 13:44:30.000000000 +0100 -+++ unzip.h 2007-12-03 13:49:01.000000000 +0100 -@@ -606,6 +606,8 @@ typedef struct central_directory_file_he - #define UZ_ST_CONTINUE 0 - #define UZ_ST_BREAK 1 - -+#define MAX_ZIP_SIZE 0xffffdffe -+ - - /*--------------------------------------------------------------------------- - Prototypes for public UnZip API (DLL) functions. ---- unzpriv.h 2007-12-03 13:44:30.000000000 +0100 -+++ unzpriv.h 2007-12-03 13:49:01.000000000 +0100 -@@ -785,9 +785,9 @@ - #endif - #ifndef SSTAT - # ifdef WILD_STAT_BUG --# define SSTAT(path,pbuf) (iswild(path) || stat(path,pbuf)) -+# define SSTAT(path,pbuf) (iswild(path) || stat64(path,pbuf)) - # else --# define SSTAT stat -+# define SSTAT stat64 - # endif - #endif - #ifndef STRNICMP diff --git a/unzip-no_file_name_translation.patch b/unzip-no_file_name_translation.patch index 45aec25..b26c340 100644 --- a/unzip-no_file_name_translation.patch +++ b/unzip-no_file_name_translation.patch @@ -1,6 +1,8 @@ ---- man/zipinfo.1-dist 2007-04-25 12:18:27.000000000 +0200 -+++ man/zipinfo.1 2007-04-25 12:19:43.000000000 +0200 -@@ -114,7 +114,10 @@ +Index: man/zipinfo.1 +=================================================================== +--- man/zipinfo.1.orig 2010-05-21 14:23:25.824590928 +0200 ++++ man/zipinfo.1 2010-05-21 14:24:41.631590822 +0200 +@@ -114,7 +114,10 @@ useful in cases where the stored filenam .TP .B \-s list zipfile info in short Unix ``\fCls \-l\fR'' format. This is the default @@ -12,32 +14,24 @@ .TP .B \-m list zipfile info in medium Unix ``\fCls \-l\fR'' format. Identical to the ---- man/unzip.1-dist 2007-04-25 12:04:20.000000000 +0200 -+++ man/unzip.1 2007-04-25 12:19:54.000000000 +0200 +Index: man/unzip.1 +=================================================================== +--- man/unzip.1.orig 2010-05-21 14:23:25.824590928 +0200 ++++ man/unzip.1 2010-05-21 14:24:41.635590912 +0200 @@ -25,7 +25,7 @@ unzip \- list, test and extract compressed files in a ZIP archive .PD .SH SYNOPSIS --\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCKLMOVX$/:\fP]] -+\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCKLMOSVX$/:\fP]] +-\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCDKLMOUVWX$/:^\fP]] ++\fBunzip\fP [\fB\-Z\fP] [\fB\-cflptTuvz\fP[\fBabjnoqsCDKLMOSUVWX$/:^\fP]] \fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.] [\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.] [\fB\-d\fP\ \fIexdir\fP] .PD -@@ -371,6 +371,11 @@ - spaces in filenames. Conversion of spaces to underscores can eliminate the - awkwardness in some cases. - .TP -+.B \-S -+suppress the conversion of file name encodings. This is useful when an -+archive contains file names with non-latin letters. You have to convert -+the file names appropriately to your native encoding manually afterwards. -+.TP - .B \-U - (obsolete; to be removed in a future release) leave filenames uppercase if - created under MS-DOS, VMS, etc. See \fB\-L\fP above. ---- unzpriv.h-dist 2007-04-25 11:55:59.000000000 +0200 -+++ unzpriv.h 2007-04-25 12:12:22.000000000 +0200 -@@ -2577,6 +2577,7 @@ char *GetLoadPath OF((__GPRO)); +Index: unzpriv.h +=================================================================== +--- unzpriv.h.orig 2010-05-21 14:24:02.641090783 +0200 ++++ unzpriv.h 2010-05-21 14:24:55.632590821 +0200 +@@ -3020,6 +3020,7 @@ char *GetLoadPath OF((__GPRO)); */ #ifndef Ext_ASCII_TO_Native # define Ext_ASCII_TO_Native(string, hostnum, hostver, isuxatt, islochdr) \ @@ -45,7 +39,7 @@ if (((hostnum) == FS_FAT_ && \ !(((islochdr) || (isuxatt)) && \ ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ -@@ -2585,7 +2586,7 @@ char *GetLoadPath OF((__GPRO)); +@@ -3028,7 +3029,7 @@ char *GetLoadPath OF((__GPRO)); _OEM_INTERN((string)); \ } else { \ _ISO_INTERN((string)); \ @@ -54,9 +48,11 @@ #endif ---- zipinfo.c-dist 2007-04-25 12:17:17.000000000 +0200 -+++ zipinfo.c 2007-04-25 12:18:09.000000000 +0200 -@@ -517,6 +517,12 @@ int zi_opts(__G__ pargc, pargv) +Index: zipinfo.c +=================================================================== +--- zipinfo.c.orig 2010-05-21 14:23:25.824590928 +0200 ++++ zipinfo.c 2010-05-21 14:24:41.695590831 +0200 +@@ -527,6 +527,12 @@ int zi_opts(__G__ pargc, pargv) else uO.lflag = 3; break; @@ -69,24 +65,29 @@ case 't': /* totals line */ if (negative) tflag_2v = tflag_slm = FALSE, negative = 0; ---- unzip.c-dist 2007-04-25 11:58:44.000000000 +0200 -+++ unzip.c 2007-04-25 12:12:35.000000000 +0200 -@@ -1416,6 +1416,12 @@ int uz_opts(__G__ pargc, pargv) - uO.sflag = TRUE; +Index: unzip.c +=================================================================== +--- unzip.c.orig 2010-05-21 14:23:25.824590928 +0200 ++++ unzip.c 2010-05-21 14:24:41.727590745 +0200 +@@ -1689,6 +1689,13 @@ int uz_opts(__G__ pargc, pargv) + else + uO.S_flag = TRUE; break; - #endif /* DOS_FLX_NLM_OS2_W32 */ -+ case ('S'): /* suppress file name encoding conversions */ ++#else ++ case ('S'): /* suppress file name encoding conversions */ + if (negative) + uO.no_conv_enc = FALSE, negative = 0; + else + uO.no_conv_enc = TRUE; + break; + #endif /* VMS */ case ('t'): if (negative) - uO.tflag = FALSE, negative = 0; ---- unzip.h-dist 2007-04-25 11:59:03.000000000 +0200 -+++ unzip.h 2007-04-25 12:12:11.000000000 +0200 -@@ -478,6 +478,7 @@ typedef struct _UzpOpts { +Index: unzip.h +=================================================================== +--- unzip.h.orig 2010-05-21 14:23:25.824590928 +0200 ++++ unzip.h 2010-05-21 14:24:41.731591035 +0200 +@@ -518,6 +518,7 @@ typedef struct _UzpOpts { #if (defined(MSDOS) || defined(FLEXOS) || defined(OS2) || defined(WIN32)) int sflag; /* -s: convert spaces in filenames to underscores */ #endif diff --git a/unzip-open_missing_mode.patch b/unzip-open_missing_mode.patch index 104426f..7f5d804 100644 --- a/unzip-open_missing_mode.patch +++ b/unzip-open_missing_mode.patch @@ -1,13 +1,43 @@ ---- fileio.c -+++ fileio.c -@@ -425,7 +425,9 @@ - Trace((stderr, "open_outfile: doing fopen(%s) for writing\n", - FnFilter1(G.filename))); - -- fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT); -+ fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT, +Index: fileio.c +=================================================================== +--- fileio.c.orig 2010-05-21 14:25:41.384590892 +0200 ++++ fileio.c 2010-05-21 14:32:27.459889721 +0200 +@@ -71,6 +71,11 @@ + #include "crc32.h" + #include "crypt.h" + #include "ttyio.h" ++#include ++#include ++#include ++ ++ + + /* setup of codepage conversion for decryption passwords */ + #if CRYPT +@@ -270,6 +275,7 @@ int open_input_file(__G) /* return 1 + int open_outfile(__G) /* return 1 if fail */ + __GDEF + { ++ int fd; + #ifdef DLL + if (G.redirect_data) + return (redirect_outfile(__G) == FALSE); +@@ -454,13 +460,16 @@ int open_outfile(__G) /* retur + #if defined(ATH_BE_UNX) || defined(AOS_VS) || defined(QDOS) || defined(TANDEM) + mode_t umask_sav = umask(0077); + #endif ++ fd = open(G.filename, O_WRONLY | O_LARGEFILE | O_CREAT, + /* 0644 in portable POSIX notation: */ + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - if ((G.outfile = fdopen(fd, FOPW)) == (FILE *)NULL) { - Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile), - FnFilter1(G.filename))); + #if defined(SYMLINKS) || defined(QLZIP) + /* These features require the ability to re-read extracted data from + the output files. Output files are created with Read&Write access. + */ +- G.outfile = zfopen(G.filename, FOPWR); ++ G.outfile = zfdopen(fd, FOPWR); + #else +- G.outfile = zfopen(G.filename, FOPW); ++ G.outfile = zfdopen(fd, FOPW); + #endif + #if defined(ATH_BE_UNX) || defined(AOS_VS) || defined(QDOS) || defined(TANDEM) + umask(umask_sav); diff --git a/unzip-optflags.patch b/unzip-optflags.patch index 7ff5c9f..1d27fa7 100644 --- a/unzip-optflags.patch +++ b/unzip-optflags.patch @@ -1,22 +1,22 @@ Index: unix/Makefile =================================================================== ---- unix/Makefile.orig 2010-05-10 17:45:59.892090727 +0200 -+++ unix/Makefile 2010-05-10 17:46:18.636090912 +0200 -@@ -773,7 +773,7 @@ isi: unix_make +--- unix/Makefile.orig 2010-05-21 13:11:26.128591070 +0200 ++++ unix/Makefile 2010-05-21 13:14:45.429090869 +0200 +@@ -809,7 +809,7 @@ isi: unix_make linux: unix_make @echo 'NOTE: use linux_noasm target for non-Intel Linux compiles.' $(MAKE) unzips CC=gcc LD=gcc AS=gcc\ -- CF="-O3 -Wall -I. -DASM_CRC $(LOC)"\ -+ CF="$(RPM_OPT_FLAGS) -I. -DASM_CRC $(LOC)"\ - AF="-Di386 $(AF)" CRC32=crc_gcc +- CFLAGS="-O3 -Wall -DASM_CRC"\ ++ CFLAGS="$(RPM_OPT_FLAGS) -DASM_CRC"\ + AF="-Di386 $(AF)" CRCA_O=crc_gcc$O # GRR: this echo is pointless; if user gets this far, no difference to install # @echo 'Be sure to use the install_asm target rather than the install target' -@@ -783,7 +783,7 @@ linux_asm: linux +@@ -819,7 +819,7 @@ linux_asm: linux # Linux (Posix, approximately SysV): virtually any version since before 0.96, # for any platform. Change "-O" to "-O3" or whatever, as desired... linux_noasm: unix_make -- $(MAKE) unzips CC=gcc LD=gcc CF="-O -Wall -I. $(LOC)" -+ $(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS) -I. $(LOC)" +- $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O -Wall" ++ $(MAKE) unzips CC=gcc LD=gcc CF="$(RPM_OPT_FLAGS)" # Linux with lcc compiler: __inline__ (stat.h) not recognized, and must edit # /usr/include/gnu/types.h to get rid of "long long" if __LCC__ defined. -O3 diff --git a/unzip.changes b/unzip.changes index 6b43642..53c4888 100644 --- a/unzip.changes +++ b/unzip.changes @@ -1,3 +1,43 @@ +------------------------------------------------------------------- +Fri May 21 16:39:24 CEST 2010 - pth@suse.de + +- Update to 6.0: + * Support PKWARE ZIP64 extensions, allowing Zip archives and Zip archive + entries larger than 4 GiBytes and more than 65536 entries within a + single Zip archive. This support is currently only available for Unix, + OpenVMS and Win32/Win64. + * Support for bzip2 compression method. + * Support for UTF-8 encoded entry names, both through PKWARE's "General + Purpose Flags Bit 11" indicator and Info-ZIP's new "up" unicode path + extra field. (Currently, on Windows the UTF-8 handling is limited to + the character subset contained in the configured non-unicode "system + code page".) + * Fixed "Time of Creation/Time of Use" vulnerability when setting + attributes of extracted files, for Unix and Unix-like ports. + * Fixed memory leak when processing invalid deflated data. + * Fixed long-standing bug in unshrink (partial_clear), added boundary + checks against invalid compressed data. + * On Unix, keep inherited SGID attribute bit for extracted directories + unless restoration of owner/group id or SUID/SGID/Tacky attributes was + requested. + * On Unix, allow extracted filenames to contain embedded control + characters when explicitly requested by specifying the new command line + option "-^". + * On Unix, support restoration of symbolic link attributes. + * On Unix, support restoration of 32-bit UID/GID data using the new "ux" + IZUNIX3 extra field introduced with Zip 3.0. + * Support symbolic links zipped up on VMS. + * New -D option to suppress restoration of timestamps for extracted + directory entries (on those ports that support setting of directory + timestamps). By specifying "-DD", this new option also allows to + suppress timestamp restoration for ALL extracted files on all UnZip + ports which support restoration of timestamps. On VMS, the default + behaviour is now to skip restoration of directory timestamps; here, + "--D" restores ALL timestamps, "-D" restores none. + * On OS/2, Win32, and Unix, the (previously optional) feature UNIXBACKUP + to allow saving backup copies of overwritten files on extraction is now + enabled by default. + ------------------------------------------------------------------- Mon May 10 16:39:20 UTC 2010 - pth@suse.de diff --git a/unzip.dif b/unzip.dif index c379b6d..bd0ccd6 100644 --- a/unzip.dif +++ b/unzip.dif @@ -1,7 +1,8 @@ -diff -Nur unzip-5.50.orig/unix/Makefile unzip-5.50/unix/Makefile ---- unzip-5.50.orig/unix/Makefile Sat Feb 16 18:00:38 2002 -+++ unzip-5.50/unix/Makefile Mon Mar 11 08:40:41 2002 -@@ -61,8 +61,8 @@ +Index: unix/Makefile +=================================================================== +--- unix/Makefile.orig 2009-01-18 23:41:18.000000000 +0100 ++++ unix/Makefile 2010-05-21 14:06:56.192590841 +0200 +@@ -64,8 +64,8 @@ FL2 = $(LF2) # general-purpose stuff #CP = cp @@ -12,7 +13,7 @@ diff -Nur unzip-5.50.orig/unix/Makefile unzip-5.50/unix/Makefile RM = rm -f CHMOD = chmod BINPERMS = 755 -@@ -102,7 +102,7 @@ +@@ -121,7 +121,7 @@ INSTALL_PROGRAM = $(INSTALL) INSTALL_D = mkdir -p # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate manext = 1 diff --git a/unzip.spec b/unzip.spec index 3f2b825..f1831d5 100644 --- a/unzip.spec +++ b/unzip.spec @@ -23,20 +23,18 @@ Group: Productivity/Archiving/Compression Provides: crunzip Obsoletes: crunzip AutoReqProv: on -Version: 5.52 -Release: 144 +Version: 6.00 +%define fileversion 60 +Release: 1 Summary: A program to unpack compressed files -Source: unzip552.tar.bz2 +Source: %{name}%{fileversion}.tar.bz2 Url: http://www.info-zip.org/ -Patch: unzip.dif +Patch0: unzip.dif Patch1: unzip-iso8859_2.patch Patch3: unzip-optflags.patch Patch4: unzip-5.52-filename_too_long.patch Patch5: unzip-no_file_name_translation.patch -Patch6: unzip-near-4GB.patch -Patch7: unzip-CVE-2005-2475.patch Patch8: unzip-open_missing_mode.patch -Patch9: unzip-5.5.2-goo-sec.patch Patch10: unzip-5.52-use_librcc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: librcc-devel @@ -55,20 +53,17 @@ Authors: Info-ZIP %prep -%setup -q -%patch -p1 -%patch1 -p1 +%setup -q -n %{name}%{fileversion} +%patch0 +%patch1 %patch3 %patch4 %patch5 -%patch6 -%patch7 %patch8 -%patch9 %patch10 %build -export RPM_OPT_FLAGS="%optflags -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fstack-protector" +export RPM_OPT_FLAGS="%optflags -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -fstack-protector -I." make %{?jobs:-j%jobs} -f unix/Makefile LF2=-lrcc linux_noasm %install diff --git a/unzip552.tar.bz2 b/unzip552.tar.bz2 deleted file mode 100644 index ba96633..0000000 --- a/unzip552.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67ac960892936d07286da931f66e02fdd472192cef3d48fd88ba0046c2ea04a4 -size 864023 diff --git a/unzip60.tar.bz2 b/unzip60.tar.bz2 new file mode 100644 index 0000000..477a8c1 --- /dev/null +++ b/unzip60.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8ce25f541563a112b077b4d61cfabee81d3d98b99c9ce60cf51266703dce9b2 +size 1063255