rpms/file/devel file-5.00-thumbs-db.patch, NONE, 1.1 file.spec, 1.89, 1.90
Daniel Novotny
dnovotny at fedoraproject.org
Mon Feb 23 11:28:32 UTC 2009
Author: dnovotny
Update of /cvs/extras/rpms/file/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8334
Modified Files:
file.spec
Added Files:
file-5.00-thumbs-db.patch
Log Message:
fix #486105
file-5.00-thumbs-db.patch:
--- NEW FILE file-5.00-thumbs-db.patch ---
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-5.00/src/cdf.c 3 Feb 2009 20:27:51 -0000 1.17
+++ file-5.00/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-5.00/src/readcdf.c 13 Feb 2009 18:46:48 -0000 1.12
+++ file-5.00/src/readcdf.c 20 Feb 2009 15:45:39 -0000
@@ -129,7 +129,7 @@
case CDF_CLIPBOARD:
break;
default:
- file_error(ms, 0, "Internal parsing error");
+ ;
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;
}
Index: file.spec
===================================================================
RCS file: /cvs/extras/rpms/file/devel/file.spec,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- file.spec 16 Feb 2009 15:21:15 -0000 1.89
+++ file.spec 23 Feb 2009 11:28:02 -0000 1.90
@@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.00
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -13,6 +13,7 @@
Patch0: file-4.21-pybuild.patch
Patch1: file-5.00-devdrv.patch
Patch2: file-5.00-non-english-word.patch
+Patch3: file-5.00-thumbs-db.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -63,6 +64,8 @@
%patch1 -p1
#fixes #485141
%patch2 -p1
+#fixes #486105
+%patch3 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@@ -136,6 +139,10 @@
%endif
%changelog
+* Mon Feb 23 2009 Daniel Novotny <dnovotny at redhat.com> 5.00-3
+- fix #486105 - file-5.00-2.fc11 fails to recognise a file
+ (and makes rpmbuild fail)
+
* Mon Feb 16 2009 Daniel Novotny <dnovotny at redhat.com> 5.00-2
- fix #485141 - rpm failed while checking a French Word file
More information about the fedora-extras-commits
mailing list