summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-25 02:53:54 +0000
committerMike Frysinger <vapier@gentoo.org>2010-01-25 02:53:54 +0000
commit180ff084a9a5838df087ddb82a8b8860e71f3a1a (patch)
tree2cbf895c8ecd44509a3d50f7f1589d71bae0ac68 /sys-apps/file/files
parentfix invalid atom and header (diff)
downloadgentoo-2-180ff084a9a5838df087ddb82a8b8860e71f3a1a.tar.gz
gentoo-2-180ff084a9a5838df087ddb82a8b8860e71f3a1a.tar.bz2
gentoo-2-180ff084a9a5838df087ddb82a8b8860e71f3a1a.zip
old
Diffstat (limited to 'sys-apps/file/files')
-rw-r--r--sys-apps/file/files/file-4.21-disable-regex.patch18
-rw-r--r--sys-apps/file/files/file-5.00-localization.patch80
-rw-r--r--sys-apps/file/files/file-5.00-short-read.patch163
3 files changed, 0 insertions, 261 deletions
diff --git a/sys-apps/file/files/file-4.21-disable-regex.patch b/sys-apps/file/files/file-4.21-disable-regex.patch
deleted file mode 100644
index cc7af288f65d..000000000000
--- a/sys-apps/file/files/file-4.21-disable-regex.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-The new regex was added but the old one left in. Make sure to punt the old
-one for resource issues on glibc.
-
-http://bugs.gentoo.org/174217
-
---- file-4.21/magic/Magdir/msdos
-+++ file-4.21/magic/Magdir/msdos
-@@ -17,10 +17,6 @@
- 100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
- 100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
-
--
--100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text
--100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text
--
- 0 leshort 0x14c MS Windows COFF Intel 80386 object file
- #>4 ledate x stamp %s
- 0 leshort 0x166 MS Windows COFF MIPS R4000 object file
diff --git a/sys-apps/file/files/file-5.00-localization.patch b/sys-apps/file/files/file-5.00-localization.patch
deleted file mode 100644
index f598c15084a3..000000000000
--- a/sys-apps/file/files/file-5.00-localization.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-http://bugs.gentoo.org/258452
-
-From: christos@zoulas.com (Christos Zoulas)
-To: file@mx.gw.com
-Date: Fri, 13 Feb 2009 13:46:12 -0500
-Subject: Re: file 5.00 error with a French .doc file
-
-On Feb 12, 5:05am, dnovotny@redhat.com (Daniel Novotny) wrote:
--- Subject: file 5.00 error with a French .doc file
-
-|
-| ------=_Part_10359_582458326.1234433130940
-| Content-Type: text/plain; charset=utf-8
-| Content-Transfer-Encoding: 7bit
-|
-| hello,
-|
-| the new file 5.00 returns error exit code for a .DOC file:
-|
-| $ file ~/Download/PMD.doc
-| /home/pmatilai/Download/PMD.doc: ERROR: CDF V2 Document, Little Endian, Os:
-| Windows, Version 5.1, Code page: 1252vasprintf failed (Invalid or incomplete
-| multibyte or wide character)
-|
-| I am attaching the file for analysis
-|
-| (btw this corrupts rpmbuild process, which checks every file it packs)
-|
-| best regards,
-
-$ file -m ../magic/magic.mgc PMD.doc
-PMD.doc: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Title: \225, Subject: , Author: Bekrar, Keywords: , Comments: , Template: Normal.dot, Last Saved By: Bekrar, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Total Editing Time: 01:00, Create Time/Date: Mon Aug 15 10:51:00 2005, Last Saved Time/Date: Mon Aug 15 11:02:00 2005, Number of Pages: 2, Number of Words: 646, Number of Characters: 3555, Security: 0
-
-It must be the \225 character. Since we don't handle localization, I will
-just eat the bad strings. Here is the output after the change:
-
-PMD.doc: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code page: 1252, Author: Bekrar, Template: Normal.dot, Last Saved By: Bekrar, Revision Number: 2, Name of Creating Application: Microsoft Office Word, Total Editing Time: 01:00, Create Time/Date: Mon Aug 15 10:51:00 2005, Last Saved Time/Date: Mon Aug 15 11:02:00 2005, Number of Pages: 2, Number of Words: 646, Number of Characters: 3555, Security: 0
-
-
-Index: readcdf.c
-===================================================================
-RCS file: /p/file/cvsroot/file/src/readcdf.c,v
-retrieving revision 1.11
-diff -u -u -r1.11 readcdf.c
---- src/readcdf.c 3 Feb 2009 20:27:51 -0000 1.11
-+++ src/readcdf.c 13 Feb 2009 18:45:33 -0000
-@@ -75,9 +75,23 @@
- if (len > 1) {
- s = info[i].pi_str.s_buf;
- if (NOTMIME(ms)) {
-- if (file_printf(ms, ", %s: %.*s", buf,
-- len, s) == -1)
-- return -1;
-+ char vbuf[1024];
-+ size_t j;
-+ for (j = 0; j < sizeof(vbuf) && len--;
-+ j++, s++) {
-+ if (*s == '\0')
-+ break;
-+ if (isprint((unsigned char)*s))
-+ vbuf[j] = *s;
-+ }
-+ if (j == sizeof(vbuf))
-+ --j;
-+ vbuf[j] = '\0';
-+ if (vbuf[0]) {
-+ if (file_printf(ms, ", %s: %s",
-+ buf, vbuf) == -1)
-+ return -1;
-+ }
- } else if (info[i].pi_id ==
- CDF_PROPERTY_NAME_OF_APPLICATION) {
- if (strstr(s, "Word"))
-
-christos
-
-_______________________________________________
-File mailing list
-File@mx.gw.com
-http://mx.gw.com/mailman/listinfo/file
diff --git a/sys-apps/file/files/file-5.00-short-read.patch b/sys-apps/file/files/file-5.00-short-read.patch
deleted file mode 100644
index 1c35946f4257..000000000000
--- a/sys-apps/file/files/file-5.00-short-read.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From: christos@zoulas.com (Christos Zoulas)
-Date: Fri, 20 Feb 2009 10:49:11 -0500
-To: File Utility <file@mx.gw.com>
-Subject: Re: Error: file-5.00: Thumbs.db : Cannot read short stream (Invalid argument)
-
-On Feb 18, 9:14am, dnovotny@redhat.com (Daniel Novotny) wrote:
--- Subject: Error: file-5.00: Thumbs.db : Cannot read short stream (Invalid
-
-| hello,
-|
-| because the Fedora rpm building process runs "file" on every file it packs
-| and fails if there is an error, I have another bug report with
-| a crash in file
-|
-| $ file ~/work/file-testfiles/Thumbs.db
-| /home/dnovotny/work/file-testfiles/Thumbs.db: ERROR: Cannot read short stream (Invalid argument)
-|
-| the previous version 4.26 goes like this:
-|
-| $ file /usr/share/FlightGear/Aircraft/c172p/Models/Immat/Thumbs.db
-| /usr/share/FlightGear/Aircraft/c172p/Models/Immat/Thumbs.db: Microsoft Office
-| Document
-|
-| the file is probably not MS Office document at all, it just confuses the file logic
-| and this remained not repaired, because it did not return error, which now does
-|
-| regards,
-|
-| Daniel Novotny
-
-Here's a patch.
-
-christos
-
-Index: cdf.c
-===================================================================
-RCS file: /p/file/cvsroot/file/src/cdf.c,v
-retrieving revision 1.17
-diff -u -u -r1.17 cdf.c
---- file/src/cdf.c 3 Feb 2009 20:27:51 -0000 1.17
-+++ file/src/cdf.c 20 Feb 2009 15:45:39 -0000
-@@ -239,7 +239,9 @@
- cdf_unpack_header(h, buf);
- cdf_swap_header(h);
- if (h->h_magic != CDF_MAGIC) {
-- DPRINTF(("Bad magic 0x%x != 0x$x\n", h->h_magic, CDF_MAGIC));
-+ DPRINTF(("Bad magic 0x%llx != 0x%llx\n",
-+ (unsigned long long)h->h_magic,
-+ (unsigned long long)CDF_MAGIC));
- errno = EFTYPE;
- return -1;
- }
-@@ -539,10 +541,11 @@
- if (dir->dir_tab[i].d_type == CDF_DIR_TYPE_ROOT_STORAGE)
- break;
-
-+ /* If the it is not there, just fake it; some docs don't have it */
- if (i == dir->dir_len) {
-- DPRINTF(("Cannot find root storage node\n"));
-- errno = EFTYPE;
-- return -1;
-+ scn->sst_tab = NULL;
-+ scn->sst_len = 0;
-+ return 0;
- }
- d = &dir->dir_tab[i];
-
-Index: readcdf.c
-===================================================================
-RCS file: /p/file/cvsroot/file/src/readcdf.c,v
-retrieving revision 1.12
-diff -u -u -r1.12 readcdf.c
---- file/src/readcdf.c 13 Feb 2009 18:46:48 -0000 1.12
-+++ file/src/readcdf.c 20 Feb 2009 15:45:39 -0000
-@@ -129,7 +129,10 @@
- case CDF_CLIPBOARD:
- break;
- default:
-- file_error(ms, 0, "Internal parsing error");
-+#ifndef EFTYPE /* XXX: vapier: copied from cdf.c for now ... */
-+#define EFTYPE EINVAL
-+#endif
-+ errno = EFTYPE;
- return -1;
- }
- }
-@@ -202,6 +202,7 @@
- cdf_stream_t sst, scn;
- cdf_dir_t dir;
- int i;
-+ const char *expn = "";
- (void)&nbytes;
- (void)&buf;
-
-@@ -214,7 +215,7 @@
- #endif
-
- if (cdf_read_sat(fd, &h, &sat) == -1) {
-- file_error(ms, errno, "Can't read SAT");
-+ expn = "Can't read SAT";
- return -1;
- }
- #ifdef CDF_DEBUG
-@@ -222,7 +223,7 @@
- #endif
-
- if ((i = cdf_read_ssat(fd, &h, &sat, &ssat)) == -1) {
-- file_error(ms, errno, "Can't read SAT");
-+ expn = "Can't read SSAT";
- goto out1;
- }
- #ifdef CDF_DEBUG
-@@ -230,12 +231,12 @@
- #endif
-
- if ((i = cdf_read_dir(fd, &h, &sat, &dir)) == -1) {
-- file_error(ms, errno, "Can't read directory");
-+ expn = "Can't read directory";
- goto out2;
- }
-
- if ((i = cdf_read_short_stream(fd, &h, &sat, &dir, &sst)) == -1) {
-- file_error(ms, errno, "Cannot read short stream");
-+ expn = "Cannot read short stream";
- goto out3;
- }
-
-@@ -244,19 +245,14 @@
- #endif
- if ((i = cdf_read_summary_info(fd, &h, &sat, &ssat, &sst, &dir, &scn))
- == -1) {
-- /* Some files don't have summary info! */
--#ifdef notyet
-- file_error(ms, errno, "Can't read summary_info");
--#else
-- i = 0;
--#endif
-+ expn = "";
- goto out4;
- }
- #ifdef CDF_DEBUG
- cdf_dump_summary_info(&h, &scn);
- #endif
- if ((i = cdf_file_summary_info(ms, &scn)) == -1)
-- file_error(ms, errno, "Can't expand summary_info");
-+ expn = "Can't expand summary_info";
- free(scn.sst_tab);
- out4:
- free(sst.sst_tab);
-@@ -266,5 +262,13 @@
- free(ssat.sat_tab);
- out1:
- free(sat.sat_tab);
-+ if (i != 1) {
-+ if (file_printf(ms, "CDF V2 Document") == -1)
-+ return -1;
-+ if (*expn)
-+ if (file_printf(ms, ", corrupt: %s", expn) == -1)
-+ return -1;
-+ i = 1;
-+ }
- return i;
- }