Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=065d24d47fbcfb25650d8f2ea16e5279a8146681

commit 065d24d47fbcfb25650d8f2ea16e5279a8146681
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Tue Sep 22 12:57:43 2009 +0200

unzip-6.0-1-i686

- version bump

diff --git a/source/base/unzip/CVE-2005-2475.diff 
b/source/base/unzip/CVE-2005-2475.diff
deleted file mode 100644
index d19c890..0000000
--- a/source/base/unzip/CVE-2005-2475.diff
+++ /dev/null
@@ -1,256 +0,0 @@
---- unzip-5.52.orig/unix/unix.c
-+++ unzip-5.52/unix/unix.c
-@@ -30,6 +30,9 @@
- #define UNZIP_INTERNAL
- #include "unzip.h"
-
-+#include <iconv.h>
-+#include <langinfo.h>
-+
- #ifdef SCO_XENIX
- #  define SYSNDIR
- #else  /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */
-@@ -1042,8 +1045,6 @@
-     ush z_uidgid[2];
-     int have_uidgid_flg;
-
--    fclose(G.outfile);
--
- /*---------------------------------------------------------------------------
-     If symbolic links are supported, allocate storage for a symlink control
-     structure, put the uncompressed "data" and other required info in it, and
-@@ -1063,6 +1064,7 @@
-             Info(slide, 0x201, ((char *)slide,
-               "warning:  symbolic link (%s) failed: mem alloc overflow\n",
-               FnFilter1(G.filename)));
-+            fclose(G.outfile);
-             return;
-         }
-
-@@ -1070,6 +1072,7 @@
-             Info(slide, 0x201, ((char *)slide,
-               "warning:  symbolic link (%s) failed: no mem\n",
-               FnFilter1(G.filename)));
-+            fclose(G.outfile);
-             return;
-         }
-         slnk_entry->next = NULL;
-@@ -1079,11 +1082,10 @@
-         slnk_entry->fname = slnk_entry->target + ucsize + 1;
-         strcpy(slnk_entry->fname, G.filename);
-
--        /* reopen the "link data" file for reading */
--        G.outfile = fopen(G.filename, FOPR);
-+        /* move back to the start of the file to re-read the "link data" */
-+        rewind(G.outfile);
-
--        if (!G.outfile ||
--            fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize)
-+        if (fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize)
-         {
-             Info(slide, 0x201, ((char *)slide,
-               "warning:  symbolic link (%s) failed\n",
-@@ -1115,12 +1117,20 @@
-     }
- #endif
-
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
-+    fclose(G.outfile);
-+#endif
-+
-     have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid);
-
-     /* if -X option was specified and we have UID/GID info, restore it */
-     if (have_uidgid_flg) {
-         TTrace((stderr, "close_outfile:  restoring Unix UID/GID info\n"));
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
-         if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
-+#else
-+        if (fchown(fileno(G.outfile), (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
-+#endif
-         {
-             if (uO.qflag)
-                 Info(slide, 0x201, ((char *)slide,
-@@ -1133,6 +1143,18 @@
-         }
-     }
-
-+#if (!defined(NO_FCHOWN) && !defined(NO_FCHMOD))
-+/*---------------------------------------------------------------------------
-+    Change the file permissions from default ones to those stored in the
-+    zipfile.
-+  
---------------------------------------------------------------------------*/
-+
-+    if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr)))
-+        perror("chmod (file attributes) error");
-+
-+    fclose(G.outfile);
-+#endif /* !NO_FCHOWN && !NO_FCHMOD */
-+
-     /* set the file's access and modification times */
-     if (utime(G.filename, &(zt.t2))) {
- #ifdef AOS_VS
-@@ -1151,6 +1173,7 @@
- #endif /* ?AOS_VS */
-     }
-
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
- /*---------------------------------------------------------------------------
-     Change the file permissions from default ones to those stored in the
-     zipfile.
-@@ -1160,6 +1183,7 @@
-     if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr)))
-         perror("chmod (file attributes) error");
- #endif
-+#endif /* NO_FCHOWN || NO_FCHMOD */
-
- } /* end function close_outfile() */
-
-@@ -1640,7 +1664,6 @@
-
-             if ((long)LG(dlen) > 0)
-             {
--                G.outfile = fopen(G.filename,"r+");
-                 fseek(G.outfile, -8, SEEK_END);
-                 fread(&ntc, 8, 1, G.outfile);
-                 if(ntc.id != *(long *)"XTcc")
-@@ -1650,7 +1673,6 @@
-                     fwrite (&ntc, 8, 1, G.outfile);
-                 }
-                 Info(slide, 0x201, ((char *)slide, "QData = %d", LG(dlen)));
--                fclose(G.outfile);
-             }
-             return;     /* finished, cancel further extra field scanning */
-           }
-@@ -1666,3 +1688,90 @@
-     }
- }
- #endif /* QLZIP */
-+
-+
-+typedef struct {
-+    char *local_charset;
-+    char *archive_charset;
-+} CHARSET_MAP;
-+
-+/* A mapping of local <-> archive charsets used by default to convert 
filenames
-+ * of DOS/Windows Zip archives. Currently very basic. */
-+static CHARSET_MAP dos_charset_map[] = {
-+    { "ANSI_X3.4-1968", "CP850" },
-+    { "ISO-8859-1", "CP850" },
-+    { "CP1252", "CP850" },
-+    { "UTF-8", "CP866" },
-+    { "KOI8-R", "CP866" },
-+    { "KOI8-U", "CP866" },
-+    { "ISO-8859-5", "CP866" }
-+};
-+
-+char OEM_CP[MAX_CP_NAME] = "";
-+char ISO_CP[MAX_CP_NAME] = "";
-+
-+/* Try to guess the default value of OEM_CP based on the current locale.
-+ * ISO_CP is left alone for now. */
-+void init_conversion_charsets()
-+{
-+    const char *local_charset;
-+    int i;
-+
-+    /* Make a guess only if OEM_CP not already set. */
-+    if(*OEM_CP == '\0') {
-+      local_charset = nl_langinfo(CODESET);
-+      for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++)
-+              if(!strcasecmp(local_charset, 
dos_charset_map[i].local_charset)) {
-+                      strncpy(OEM_CP, dos_charset_map[i].archive_charset,
-+                                      sizeof(OEM_CP));
-+                      break;
-+              }
-+    }
-+}
-+
-+/* Convert a string from one encoding to the current locale using iconv().
-+ * Be as non-intrusive as possible. If error is encountered during covertion
-+ * just leave the string intact. */
-+static void charset_to_intern(char *string, char *from_charset)
-+{
-+    iconv_t cd;
-+    char *s,*d, *buf;
-+    size_t slen, dlen, buflen;
-+    const char *local_charset;
-+
-+    if(*from_charset == '\0')
-+      return;
-+
-+    buf = NULL;
-+    local_charset = nl_langinfo(CODESET);
-+
-+    if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1)
-+        return;
-+
-+    slen = strlen(string);
-+    s = string;
-+    dlen = buflen = 2*slen;
-+    d = buf = malloc(buflen + 1);
-+    if(!d)
-+      goto cleanup;
-+    bzero(buf,buflen);
-+    if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1)
-+      goto cleanup;
-+    strncpy(string, buf, buflen);
-+
-+    cleanup:
-+    free(buf);
-+    iconv_close(cd);
-+}
-+
-+/* Convert a string from OEM_CP to the current locale charset. */
-+inline void oem_intern(char *string)
-+{
-+    charset_to_intern(string, OEM_CP);
-+}
-+
-+/* Convert a string from ISO_CP to the current locale charset. */
-+inline void iso_intern(char *string)
-+{
-+    charset_to_intern(string, ISO_CP);
-+}
---- unzip-5.52.orig/unix/unxcfg.h
-+++ unzip-5.52/unix/unxcfg.h
-@@ -15,6 +15,7 @@
-
- #include <sys/types.h>          /* off_t, time_t, dev_t, ... */
- #include <sys/stat.h>
-+#include <unistd.h>
-
- #ifndef COHERENT
- #  include <fcntl.h>            /* O_BINARY for open() w/o CR/LF translation 
*/
-@@ -141,4 +142,30 @@
- /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
- /*    and notfirstcall are used by do_wild().                          */
-
-+
-+#define MAX_CP_NAME 25
-+
-+#ifdef SETLOCALE
-+#  undef SETLOCALE
-+#endif
-+#define SETLOCALE(category, locale) setlocale(category, locale)
-+#include <locale.h>
-+
-+#ifdef _ISO_INTERN
-+#  undef _ISO_INTERN
-+#endif
-+#define _ISO_INTERN(str1) iso_intern(str1)
-+
-+#ifdef _OEM_INTERN
-+#  undef _OEM_INTERN
-+#endif
-+#ifndef IZ_OEM2ISO_ARRAY
-+#  define IZ_OEM2ISO_ARRAY
-+#endif
-+#define _OEM_INTERN(str1) oem_intern(str1)
-+
-+void iso_intern(char *);
-+void oem_intern(char *);
-+void init_conversion_charsets(void);
-+
- #endif /* !__unxcfg_h */
diff --git a/source/base/unzip/CVE-2005-4667.diff 
b/source/base/unzip/CVE-2005-4667.diff
deleted file mode 100644
index bdbfae1..0000000
--- a/source/base/unzip/CVE-2005-4667.diff
+++ /dev/null
@@ -1,94 +0,0 @@
---- unzip-5.52.orig/consts.h
-+++ unzip-5.52/consts.h
-@@ -34,9 +34,9 @@
-   "error:  expected central file header signature not found (file #%lu).\n";
- ZCONST char Far SeekMsg[] =
-   "error [%s]:  attempt to seek before beginning of zipfile\n%s";
--ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  %s\n";
-+ZCONST char Far FilenameNotMatched[] = "caution: filename not matched:  
%.512s\n";
- ZCONST char Far ExclFilenameNotMatched[] =
--  "caution: excluded filename not matched:  %s\n";
-+  "caution: excluded filename not matched:  %.512s\n";
-
- #ifdef VMS
-   ZCONST char Far ReportMsg[] = "\
---- unzip-5.52.orig/process.c
-+++ unzip-5.52/process.c
-@@ -74,20 +74,20 @@
-    /* do_seekable() strings */
- # ifdef UNIX
-    static ZCONST char Far CannotFindZipfileDirMsg[] =
--     "%s:  cannot find zipfile directory in one of %s or\n\
--        %s%s.zip, and cannot find %s, period.\n";
-+     "%s:  cannot find zipfile directory in one of %.512s or\n\
-+        %s%.512s.zip, and cannot find %.512s, period.\n";
-    static ZCONST char Far CannotFindEitherZipfile[] =
--     "%s:  cannot find or open %s, %s.zip or %s.\n";
-+     "%s:  cannot find or open %.512s, %.512s.zip or %.512s.\n";
- # else /* !UNIX */
- # ifndef AMIGA
-    static ZCONST char Far CannotFindWildcardMatch[] =
--     "%s:  cannot find any matches for wildcard specification \"%s\".\n";
-+     "%s:  cannot find any matches for wildcard specification \"%.512s\".\n";
- # endif /* !AMIGA */
-    static ZCONST char Far CannotFindZipfileDirMsg[] =
--     "%s:  cannot find zipfile directory in %s,\n\
--        %sand cannot find %s, period.\n";
-+     "%s:  cannot find zipfile directory in %.512s,\n\
-+        %sand cannot find %.512s, period.\n";
-    static ZCONST char Far CannotFindEitherZipfile[] =
--     "%s:  cannot find either %s or %s.\n";
-+     "%s:  cannot find either %.512s or %.512s.\n";
- # endif /* ?UNIX */
-    extern ZCONST char Far Zipnfo[];       /* in unzip.c */
- #ifndef WINDLL
---- unzip-5.52.orig/unzpriv.h
-+++ unzip-5.52/unzpriv.h
-@@ -1081,6 +1081,7 @@
- #  define FOPR  "r","ctx=stm"
- #  define FOPM  "r+","ctx=stm","rfm=fix","mrs=512"
- #  define FOPW  "w","ctx=stm","rfm=fix","mrs=512"
-+#  define FOPWR "w+","ctx=stm","rfm=fix","mrs=512"
- #endif /* VMS */
-
- #ifdef CMS_MVS
-@@ -1117,6 +1118,9 @@
- #  ifndef FOPWT
- #    define FOPWT "wt"
- #  endif
-+#  ifndef FOPWR
-+#    define FOPWR "w+b"
-+#  endif
- #else /* !MODERN */
- #  ifndef FOPR
- #    define FOPR "r"
-@@ -1130,6 +1134,9 @@
- #  ifndef FOPWT
- #    define FOPWT "w"
- #  endif
-+#  ifndef FOPWR
-+#    define FOPWR "w+b"
-+#  endif
- #endif /* ?MODERN */
-
- /*
-@@ -1193,7 +1200,9 @@
- #  define lastchar(ptr, len) (ptr[(len)-1])
- #  define MBSCHR(str, c) strchr(str, c)
- #  define MBSRCHR(str, c) strrchr(str, c)
--#  define SETLOCALE(category, locale)
-+#  ifndef SETLOCALE
-+#    define SETLOCALE(category, locale)
-+#  endif
- #endif /* ?_MBCS */
- #define INCSTR(ptr) PREINCSTR(ptr)
-
-@@ -2563,7 +2572,7 @@
-          !(((islochdr) || (isuxatt)) && \
-            ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
-         (hostnum) == FS_HPFS_ || \
--        ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
-+        ((hostnum) == FS_NTFS_/* && (hostver) == 50*/)) { \
-         _OEM_INTERN((string)); \
-     } else { \
-         _ISO_INTERN((string)); \
diff --git a/source/base/unzip/CVE-2008-0888.diff 
b/source/base/unzip/CVE-2008-0888.diff
deleted file mode 100644
index ecc8d6f..0000000
--- a/source/base/unzip/CVE-2008-0888.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-  * patch from Tavis Ormandy to address invalid free() calls in
-    the inflate_dynamic() function (CVE-2008-0888).
---- unzip-5.52.orig/inflate.c
-+++ unzip-5.52/inflate.c
-@@ -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 */
-@@ -1149,8 +1152,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/source/base/unzip/FrugalBuild b/source/base/unzip/FrugalBuild
index 250fafb..efdfb52 100644
--- a/source/base/unzip/FrugalBuild
+++ b/source/base/unzip/FrugalBuild
@@ -2,24 +2,20 @@
# Maintainer: Miklos Vajna <vmik...@frugalware.org>

pkgname=unzip
-pkgver=5.52
-pkgrel=7
+pkgver=6.0
+pkgrel=1
pkgdesc="Info-ZIP's unzip utility"
url="http://www.info-zip.org/UnZip.html";
depends=('glibc>=2.8-3')
groups=('base' 'chroot-core')
archs=('i686' 'x86_64' 'ppc')
-up2date="lynx -dump http://www.info-zip.org/UnZip.html|grep UnZip|sed -n 
's/.*p \(.*\) \[.*/\1/;1 p'"
-source=(ftp://ftp.info-zip.org/pub/infozip/src/unzip552.tgz CVE-2005-2475.diff 
CVE-2005-4667.diff \
-       unzip-symlink-fix.patch CVE-2008-0888.diff)
-sha1sums=('1831bd59b9e607a69052f83b263384895e2d4a19' \
-          '9b0ea13f9176a428d87c93e7c76465f4dc63d628' \
-          '0e6c8b3821c000590edeb42e33082704131dd6ec' \
-          '40d723181a06b499515768b29700487623ec13ae' \
-          'a3e068cc997d03f8dce1721a1ecb8d2046a3c119')
+up2date="lynx -dump $url |grep UnZip|sed -n 's/.*p \(.*\) \[.*/\1/;1 p'"
+source=(ftp://ftp.info-zip.org/pub/infozip/src/unzip${pkgver/./}.tgz)
+sha1sums=('abf7de8a4018a983590ed6f5cbd990d4740f8a22')

build()
{
+       Fcd unzip${pkgver/./}
[[ $CARCH == "i686" ]] && _TARGET_="linux_asm"
[[ $CARCH == "x86_64" ]] && _TARGET_="linux_noasm"
[[ $CARCH == "ppc" ]] && _TARGET_="linux_noasm"
diff --git a/source/base/unzip/unzip-symlink-fix.patch 
b/source/base/unzip/unzip-symlink-fix.patch
deleted file mode 100644
index 2ef9b07..0000000
--- a/source/base/unzip/unzip-symlink-fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Naur unzip-5.52.orig/fileio.c unzip-5.52/fileio.c
---- unzip-5.52.orig/fileio.c   2007-09-18 20:52:10.000000000 +0200
-+++ unzip-5.52/fileio.c        2007-09-18 20:51:46.000000000 +0200
-@@ -413,7 +413,11 @@
- #endif /* NOVELL_BUG_FAILSAFE */
-     Trace((stderr, "open_outfile:  doing fopen(%s) for writing\n",
-       FnFilter1(G.filename)));
-+#if defined(SYMLINKS) || defined(QLZIP)
-+    if ((G.outfile = fopen(G.filename, FOPWR)) == (FILE *)NULL) {
-+#else
-     if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) {
-+#endif
-         Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile),
-           FnFilter1(G.filename)));
-         return 1;
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to