diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-21 23:37:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-02-21 23:37:51 +0000 |
commit | e4fd6bd2019587959255de708597d8545515f721 (patch) | |
tree | 4894f239fb340e0c50c6c77ff65d990a4d649681 /sys-apps | |
parent | Set some useflag defaults and other minor changes (diff) | |
download | historical-e4fd6bd2019587959255de708597d8545515f721.tar.gz historical-e4fd6bd2019587959255de708597d8545515f721.tar.bz2 historical-e4fd6bd2019587959255de708597d8545515f721.zip |
Add fix from upstream for some short read errors (like with thumb.db files).
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/file/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/file/Manifest | 10 | ||||
-rw-r--r-- | sys-apps/file/file-5.00-r2.ebuild | 60 | ||||
-rw-r--r-- | sys-apps/file/files/file-5.00-short-read.patch | 163 |
4 files changed, 237 insertions, 5 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog index f1d1803287fa..5e0e72e72b98 100644 --- a/sys-apps/file/ChangeLog +++ b/sys-apps/file/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/file # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.165 2009/02/14 02:43:28 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.166 2009/02/21 23:37:50 vapier Exp $ + +*file-5.00-r2 (21 Feb 2009) + + 21 Feb 2009; Mike Frysinger <vapier@gentoo.org> + +files/file-5.00-short-read.patch, +file-5.00-r2.ebuild: + Add fix from upstream for some short read errors (like with thumb.db + files). *file-5.00-r1 (14 Feb 2009) diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest index a89de6b2178f..f26ebf1d29f6 100644 --- a/sys-apps/file/Manifest +++ b/sys-apps/file/Manifest @@ -4,6 +4,7 @@ Hash: SHA1 AUX file-4.15-libtool.patch 561 RMD160 f2b9f4c93f199ab3145d70816b3c624349af97a0 SHA1 6e2c1cd8dee4d022c35a056e94a4030af1f4b1fa SHA256 badb8261dad5df39bac1d6a6da1668eb8a2ff0b01c2c80baa8abfe07fd99681d AUX file-4.21-disable-regex.patch 645 RMD160 7038707815a1b8138a8bcff2249b8e2a1da2a94b SHA1 02e57e29a86adf0c36b935bc29bc386c7183c2df SHA256 cd53443c5bc81bbc38d3928a1f6cfd1f5022953a69cebd2a2c73a3759b5cbbfc AUX file-5.00-localization.patch 3014 RMD160 c421f942e861f496f32000bf9d22f561a4337faf SHA1 1a2a3f0449418e0b107385a0e79d9a1416d7a873 SHA256 067d76f13d165267977b09908adab3a041a9e8c2af2b7bbc9a1f80a29553586f +AUX file-5.00-short-read.patch 4299 RMD160 8cfb2f4e10427fe28c54288a9ef2d657844b24a6 SHA1 761d4be123c1303df925b8559c8b5365816311ee SHA256 0ac90591b5bc5604119ae771794ba6840e08fa3dbbf8572f332f54c1b72f1dc7 DIST file-4.21.tar.gz 549938 RMD160 c8cfee27ba7a033bae355e458921eac39913b1e0 SHA1 4a919572fed1896212c2d7f41f841845efc1287a SHA256 6f5644d56cc603138533158076a6cb41cd33c33d27e5310cb76cb6576151ca67 DIST file-4.23.tar.gz 563704 RMD160 29153a3fb18b2d8f7da9fd66712fbd6ed4ea49f2 SHA1 83a90894a6b89f80207b9fcf0e382a627e4c5f0b SHA256 2fad96e6475b7a67e1e96f05e825b779686fd0cb3f041a10ca6622a4d9f7d147 DIST file-4.25.tar.gz 582227 RMD160 c877a223a1dbdfd38c6f5ac385b533e8c5223fe1 SHA1 0d4a0b678a4c13fbc38cd0ea633ef4df60d74f22 SHA256 abcd5bc7f9a604b5966463eac4a3f54de180a08adb513d902bb44152ebad6c8a @@ -14,13 +15,14 @@ EBUILD file-4.23.ebuild 1459 RMD160 f993d6a1806e144bd9ce088412cd7509aeabfb78 SHA EBUILD file-4.25.ebuild 1471 RMD160 740d209a58b57890900cbc76b88a3e737a159050 SHA1 c766724eeaa5a324da707656f0c012ed88cd91b1 SHA256 fe1d539efbb1aa0b76a72d9bb1cb33b4937fa4ed89234bcbe5479ab7602539f9 EBUILD file-4.26.ebuild 1471 RMD160 6ef9416ea87d2d6f600a7e6abde7847c87ef45d6 SHA1 aabcc05b9e540720bfc73734535769b4349d90c4 SHA256 d4404550f1e0e2979fe8dc1f17a0f58e806ed6a8230f88c906d278309a4fa663 EBUILD file-5.00-r1.ebuild 1636 RMD160 3ee50986f2993f861a293dc54b99fb1e5fdab05c SHA1 b8718db37485065584925b6cfe552ac7e8d43417 SHA256 96ed4752350a61c08487cd0274f569c507a6a86e38745365e8daf6f1d2c55d58 +EBUILD file-5.00-r2.ebuild 1680 RMD160 c332f873f00c3c80862afcda41058562514b6ad9 SHA1 ce30052ccc223db606d752fc565b3f85f5f77602 SHA256 313795aff0edb1bc494d1e95bb8da2f14f0d16b92e0c4fc1e87f1d3564a1e2d6 EBUILD file-5.00.ebuild 1471 RMD160 d71a9f569fd2a3d49806420501c49e26c5c12b04 SHA1 48399ddce617473755b85cb8285e51568edcb5e2 SHA256 b9d9e17cbdc8952d6a9944be0e15ecb273e431dd8ef1167501fe70f445643d02 -MISC ChangeLog 19677 RMD160 c6fcaf0361fa57d21f92d4c6e5a375c960edded3 SHA1 9c99ee4dcff54d25a347c260cb336fd63af009b0 SHA256 860ac6aa5ad0611605f362d3ea3c60a23313715f8211296a13cc8ea3fea33e48 +MISC ChangeLog 19897 RMD160 bdb0938a417db014bc486b187f8336ed210386db SHA1 02447532a26ad22dfcb4c21a8f773982c2e180f7 SHA256 cfd641026ff6d96749bda904e157d60389e9e99db5ece22066324e8611322a9e MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkmWMKgACgkQn/5bYzqsSmGcegCfYfLwAsCN1wNvWYDT2ag2RT6q -Ng0An1sNhM4iZpuJmRG6txrYoXeuVj9S -=rUWo +iEYEARECAAYFAkmgkFQACgkQn/5bYzqsSmFfXwCeOrw2bCOmpPLkaw7fnSogIJpX +kvoAoMDVcrn4PYpN4sXRnNLzQIAP8o4t +=WMJq -----END PGP SIGNATURE----- diff --git a/sys-apps/file/file-5.00-r2.ebuild b/sys-apps/file/file-5.00-r2.ebuild new file mode 100644 index 000000000000..ee401e0b1de9 --- /dev/null +++ b/sys-apps/file/file-5.00-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-5.00-r2.ebuild,v 1.1 2009/02/21 23:37:50 vapier Exp $ + +inherit eutils distutils libtool flag-o-matic + +DESCRIPTION="identify a file's format by scanning binary data for patterns" +HOMEPAGE="ftp://ftp.astron.com/pub/file/" +SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz + ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="python" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + + epatch "${FILESDIR}"/${PN}-4.15-libtool.patch #99593 + epatch "${FILESDIR}"/${P}-localization.patch #258452 + epatch "${FILESDIR}"/${P}-short-read.patch + + elibtoolize + epunt_cxx + + # make sure python links against the current libmagic #54401 + sed -i "/library_dirs/s:'\.\./src':'../src/.libs':" python/setup.py + # dont let python README kill main README #60043 + mv python/README{,.python} + + # only one data file, so put it into /usr/share/misc/ + sed -i '/^pkgdatadir/s:/@PACKAGE@::' $(find -name Makefile.in) +} + +src_compile() { + # file uses things like strndup() and wcwidth() + append-flags -D_GNU_SOURCE + + econf --datadir=/usr/share/misc || die + emake || die "emake failed" + + use python && cd python && distutils_src_compile +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc ChangeLog MAINT README + + use python && cd python && distutils_src_install +} + +pkg_postinst() { + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm +} diff --git a/sys-apps/file/files/file-5.00-short-read.patch b/sys-apps/file/files/file-5.00-short-read.patch new file mode 100644 index 000000000000..1c35946f4257 --- /dev/null +++ b/sys-apps/file/files/file-5.00-short-read.patch @@ -0,0 +1,163 @@ +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; + } |