[file] fix #1101404 - remove weak Pascal patterns

Jan Kaluža jkaluza at fedoraproject.org
Wed Sep 3 08:29:47 UTC 2014


commit cf93dca77bccfff73951ff4364eecc7eb5d94acd
Author: Jan Kaluza <jkaluza at redhat.com>
Date:   Wed Sep 3 10:29:37 2014 +0200

    fix #1101404 - remove weak Pascal patterns
    
    - fix #1107995 - detect locale-archive
    - fix #1130693, #1115111 - fix detection of MSOOXML, OOXML and ZIP
    - fix #1124940 - detect Python 3.4 byte-compiled files

 file-5.19-locale-archive.patch |   11 +++++++++++
 file-5.19-msooxml.patch        |   22 ++++++++++++++++++++++
 file-5.19-pascal.patch         |   29 +++++++++++++++++++++++++++++
 file-5.19-python-3.4.patch     |   24 ++++++++++++++++++++++++
 file.spec                      |   16 +++++++++++++++-
 5 files changed, 101 insertions(+), 1 deletions(-)
---
diff --git a/file-5.19-locale-archive.patch b/file-5.19-locale-archive.patch
new file mode 100644
index 0000000..29539b3
--- /dev/null
+++ b/file-5.19-locale-archive.patch
@@ -0,0 +1,11 @@
+diff --git a/magic/Magdir/linux b/magic/Magdir/linux
+index e099cd3..2af3005 100644
+--- a/magic/Magdir/linux
++++ b/magic/Magdir/linux
+@@ -413,3 +413,6 @@
+ >>>>20		belong		>16
+ >>>>>36		belong		x	\b, DT structure block size=%d
+ 
++# glibc locale archive as defined in glibc locale/locarchive.h
++0		lelong		0xde020109	locale archive
++>24		lelong		x	%d strings
diff --git a/file-5.19-msooxml.patch b/file-5.19-msooxml.patch
new file mode 100644
index 0000000..30d2951
--- /dev/null
+++ b/file-5.19-msooxml.patch
@@ -0,0 +1,22 @@
+From bf3fea9e6c0b18e9a645d2a796a1e3ae29be5ee5 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos at zoulas.com>
+Date: Tue, 5 Aug 2014 07:38:45 +0000
+Subject: [PATCH] PR/360: Andreas Koehler: Escape regex properly.
+
+---
+ magic/Magdir/msooxml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/magic/Magdir/msooxml b/magic/Magdir/msooxml
+index c908b71..80bdf13 100644
+--- a/magic/Magdir/msooxml
++++ b/magic/Magdir/msooxml
+@@ -16,7 +16,7 @@
+ 0		string		PK\003\004
+ !:strength +10
+ # make sure the first file is correct
+->0x1E		regex		\[Content_Types\]\.xml|_rels/\.rels
++>0x1E		regex		\\[Content_Types\\]\\.xml|_rels/\\.rels
+ # skip to the second local file header
+ # since some documents include a 520-byte extra field following the file
+ # header, we need to scan for the next header
diff --git a/file-5.19-pascal.patch b/file-5.19-pascal.patch
new file mode 100644
index 0000000..1cf433b
--- /dev/null
+++ b/file-5.19-pascal.patch
@@ -0,0 +1,29 @@
+From d9e9aa9f06757947a1e51f80925445b2f18a6fc3 Mon Sep 17 00:00:00 2001
+From: Reuben Thomas <rrt at sc3d.org>
+Date: Mon, 14 Jul 2014 14:21:33 +0000
+Subject: [PATCH] Comment out too-sensitive Pascal magic
+
+---
+ magic/Magdir/pascal | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/magic/Magdir/pascal b/magic/Magdir/pascal
+index a95939c..d8e61c6 100644
+--- a/magic/Magdir/pascal
++++ b/magic/Magdir/pascal
+@@ -1,10 +1,10 @@
+ #------------------------------------------------------------------------------
+-# $File: pascal,v 1.1 2011/12/08 12:12:46 rrt Exp $
++# $File: pascal,v 1.1 2011/12/08 12:12:46 rrt Exp $
+ # pascal:  file(1) magic for Pascal source
+ #
+ 0	search/8192	(input,		Pascal source text
+ !:mime	text/x-pascal
+-0	regex		\^program	Pascal source text
+-!:mime	text/x-pascal
+-0	regex           	\^record		Pascal source text
+-!:mime	text/x-pascal
++#0	regex		\^program	Pascal source text
++#!:mime	text/x-pascal
++#0	regex           	\^record		Pascal source text
++#!:mime	text/x-pascal
diff --git a/file-5.19-python-3.4.patch b/file-5.19-python-3.4.patch
new file mode 100644
index 0000000..3d3104c
--- /dev/null
+++ b/file-5.19-python-3.4.patch
@@ -0,0 +1,24 @@
+From 8f462b16513c6961a938d0eb443bc538574eeeca Mon Sep 17 00:00:00 2001
+From: Benedikt Morbach <bmorbach at redhat.com>
+Date: Wed, 30 Jul 2014 18:53:58 +0200
+Subject: [PATCH] add support for python 3.4 byte-compiled files
+
+---
+ magic/Magdir/python | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/magic/Magdir/python b/magic/Magdir/python
+index d5e2964..19d4b55 100644
+--- a/magic/Magdir/python
++++ b/magic/Magdir/python
+@@ -23,6 +23,7 @@
+ 0	belong		0x4f0c0d0a	python 3.1 byte-compiled
+ 0	belong		0x6c0c0d0a	python 3.2 byte-compiled
+ 0	belong		0x9e0c0d0a	python 3.3 byte-compiled
++0	belong		0xee0c0d0a	python 3.4 byte-compiled
+ 
+ 0	search/1/w	#!\ /usr/bin/python	Python script text executable
+ !:mime text/x-python
+-- 
+1.9.3
+
diff --git a/file.spec b/file.spec
index 26f7f33..b24f2f9 100644
--- a/file.spec
+++ b/file.spec
@@ -4,7 +4,7 @@
 Summary: A utility for determining file types
 Name: file
 Version: 5.19
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: BSD
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -19,6 +19,10 @@ Patch6: file-5.04-generic-msdos.patch
 Patch7: file-5.14-x86boot.patch
 Patch8: file-5.14-perl.patch
 Patch9: file-5.19-CVE-2014-3587.patch
+Patch10: file-5.19-pascal.patch
+Patch11: file-5.19-locale-archive.patch
+Patch12: file-5.19-msooxml.patch
+Patch13: file-5.19-python-3.4.patch
 URL: http://www.darwinsys.com/file/
 Requires: file-libs = %{version}-%{release}
 BuildRequires: zlib-devel
@@ -88,6 +92,10 @@ file(1) command.
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 
 # Patches can generate *.orig files, which can't stay in the magic dir,
 # otherwise there will be problems with compiling magic file!
@@ -196,6 +204,12 @@ cd %{py3dir}
 %endif
 
 %changelog
+* Wed Sep 03 2014 Jan Kaluza <jkaluza at redhat.com> - 5.19-5
+- fix #1101404 - remove weak Pascal patterns
+- fix #1107995 - detect locale-archive
+- fix #1130693, #1115111 - fix detection of MSOOXML, OOXML and ZIP
+- fix #1124940 - detect Python 3.4 byte-compiled files
+
 * Fri Aug 22 2014 Jan Kaluza <jkaluza at redhat.com> - 5.19-4
 - fix #1132787 - CVE-2014-3587
 


More information about the scm-commits mailing list