diff --git a/file-5.04-cr2.patch b/file-5.04-cr2.patch new file mode 100644 index 0000000..d0374fd --- /dev/null +++ b/file-5.04-cr2.patch @@ -0,0 +1,21 @@ +diff --git a/magic/Magdir/images b/magic/Magdir/images +index 7586ad8..90f1694 100644 +--- a/magic/Magdir/images ++++ b/magic/Magdir/images +@@ -63,6 +63,16 @@ + 0 string IIN1 NIFF image data + !:mime image/x-niff + ++# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic ++# number. Put this above the TIFF test to make sure we detect them. ++# These are apparently all little-endian. ++# From: Adam Buchbinder ++# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2 ++0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data ++!:mime image/x-canon-cr2 ++>10 byte x \b, version %d. ++>11 byte x \b%d ++ + # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) + # The second word of TIFF files is the TIFF version number, 42, which has + # never changed. The TIFF specification recommends testing for it. diff --git a/file.spec b/file.spec index eda306b..329d55b 100644 --- a/file.spec +++ b/file.spec @@ -5,7 +5,7 @@ Summary: A utility for determining file types Name: file Version: 5.04 -Release: 16%{?dist} +Release: 17%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -27,6 +27,7 @@ Patch13: file-5.04-python-2.7.patch Patch14: file-5.04-webm.patch Patch15: file-5.05-latex-improve.patch Patch16: file-5.05-rpm-archs.patch +Patch17: file-5.04-cr2.patch Requires: file-libs = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -112,6 +113,7 @@ file(1) command. %patch15 -p1 #fixes #676041 %patch16 -p1 +%patch17 -p1 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ @@ -189,6 +191,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Jun 01 2011 Jan Kaluza - 5.04-17 +- fix #709520 - backported CR2 format detection + * Thu Feb 10 2011 Jan Kaluza - 5.04-16 - fix #676543 - improved TeX and LaTeX recognition - fix #676041 - detect all supported RPM architectures