- fix #676543 - improved TeX and LaTeX recognition

- fix #676041 - detect all supported RPM architectures
This commit is contained in:
Jan Kaluza 2011-02-10 09:28:32 +01:00
parent 8319e9c4a4
commit 2097b7de9f
3 changed files with 143 additions and 1 deletions

View File

@ -0,0 +1,74 @@
diff --git a/magic/Magdir/python b/magic/Magdir/python
index 51edbad..a8c31c2 100644
--- a/magic/Magdir/python
+++ b/magic/Magdir/python
@@ -32,7 +32,7 @@
# from module.submodule import func1, func2
-0 regex/b \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
+0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
!:mime text/x-python
# def __init__ (self, ...):
diff --git a/magic/Magdir/tex b/magic/Magdir/tex
index 161a24e..9991c45 100644
--- a/magic/Magdir/tex
+++ b/magic/Magdir/tex
@@ -37,34 +37,42 @@
!:mime text/x-info
# TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
-0 search/400 \\input TeX document text
+0 search/4096 \\input TeX document text
!:mime text/x-tex
-0 search/400 \\section LaTeX document text
+!:strength + 15
+0 search/4096 \\section LaTeX document text
!:mime text/x-tex
-0 search/400 \\setlength LaTeX document text
+!:strength + 18
+0 search/4096 \\setlength LaTeX document text
!:mime text/x-tex
-0 search/400 \\documentstyle LaTeX document text
+!:strength + 15
+0 search/4096 \\documentstyle LaTeX document text
!:mime text/x-tex
-0 search/400 \\chapter LaTeX document text
+!:strength + 18
+0 search/4096 \\chapter LaTeX document text
!:mime text/x-tex
-0 search/400 \\documentclass LaTeX 2e document text
+!:strength + 18
+0 search/4096 \\documentclass LaTeX 2e document text
!:mime text/x-tex
-0 search/400 \\relax LaTeX auxiliary file
+!:strength + 15
+0 search/4096 \\relax LaTeX auxiliary file
!:mime text/x-tex
-0 search/400 \\contentsline LaTeX table of contents
+!:strength + 15
+0 search/4096 \\contentsline LaTeX table of contents
!:mime text/x-tex
-0 search/400 %\ -*-latex-*- LaTeX document text
+!:strength + 15
+0 search/4096 %\ -*-latex-*- LaTeX document text
!:mime text/x-tex
# Tex document, from Hendrik Scholz <hendrik@scholz.net>
0 search/1 \\ifx TeX document text
# Index and glossary files
-0 search/400 \\indexentry LaTeX raw index file
-0 search/400 \\begin{theindex} LaTeX sorted index
-0 search/400 \\glossaryentry LaTeX raw glossary
-0 search/400 \\begin{theglossary} LaTeX sorted glossary
-0 search/400 This\ is\ makeindex Makeindex log file
+0 search/4096 \\indexentry LaTeX raw index file
+0 search/4096 \\begin{theindex} LaTeX sorted index
+0 search/4096 \\glossaryentry LaTeX raw glossary
+0 search/4096 \\begin{theglossary} LaTeX sorted glossary
+0 search/4096 This\ is\ makeindex Makeindex log file
# End of TeX

57
file-5.05-rpm-archs.patch Normal file
View File

@ -0,0 +1,57 @@
diff --git a/magic/Magdir/rpm b/magic/Magdir/rpm
index c40e1b5..d252ced 100644
--- a/magic/Magdir/rpm
+++ b/magic/Magdir/rpm
@@ -21,12 +21,29 @@
>>>8 beshort 8 RS6000
>>>8 beshort 9 IA64
>>>8 beshort 10 Sparc64
+>>>8 beshort 11 MIPSel
+>>>8 beshort 12 ARM
+>>>8 beshort 13 MiNT
+>>>8 beshort 14 S/390
+>>>8 beshort 15 S/390x
+>>>8 beshort 16 PowerPC64
+>>>8 beshort 17 SuperH
+>>>8 beshort 18 Xtensa
#delta RPM Daniel Novotny (dnovotny@redhat.com)
0 string drpm Delta RPM
!:mime application/x-rpm
>12 string x %s
-
+>>>8 beshort 1 i386/x86_64
+>>>8 beshort 2 Alpha/Sparc64
+>>>8 beshort 3 Sparc
+>>>8 beshort 4 MIPS
+>>>8 beshort 5 PowerPC
+>>>8 beshort 6 68000
+>>>8 beshort 7 SGI
+>>>8 beshort 8 RS6000
+>>>8 beshort 9 IA64
+>>>8 beshort 10 Sparc64
>>>8 beshort 11 MIPSel
>>>8 beshort 12 ARM
>>>8 beshort 13 MiNT
@@ -42,3 +59,21 @@
0 string drpm Delta RPM
!:mime application/x-rpm
>12 string x %s
+>>>8 beshort 1 i386/x86_64
+>>>8 beshort 2 Alpha/Sparc64
+>>>8 beshort 3 Sparc
+>>>8 beshort 4 MIPS
+>>>8 beshort 5 PowerPC
+>>>8 beshort 6 68000
+>>>8 beshort 7 SGI
+>>>8 beshort 8 RS6000
+>>>8 beshort 9 IA64
+>>>8 beshort 10 Sparc64
+>>>8 beshort 11 MIPSel
+>>>8 beshort 12 ARM
+>>>8 beshort 13 MiNT
+>>>8 beshort 14 S/390
+>>>8 beshort 15 S/390x
+>>>8 beshort 16 PowerPC64
+>>>8 beshort 17 SuperH
+>>>8 beshort 18 Xtensa

View File

@ -5,13 +5,16 @@
Summary: A utility for determining file types
Name: file
Version: 5.05
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
URL: http://www.darwinsys.com/file/
# all patches are accepted by upstream
Patch1: file-5.04-zip64.patch
Patch2: file-5.05-python-magic.patch
Patch3: file-5.05-latex-improve.patch
Patch4: file-5.05-rpm-archs.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -69,6 +72,10 @@ file(1) command.
%patch1 -p1
#keeps compatibility with older python-magic versions
%patch2 -p1
#fixes #676543
%patch3 -p1
#fixes #676041
%patch4 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@ -148,6 +155,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Thu Feb 10 2011 Jan Kaluza <jkaluza@redhat.com> - 5.05-2
- fix #676543 - improved TeX and LaTeX recognition
- fix #676041 - detect all supported RPM architectures
* Tue Jan 18 2011 Jan Kaluza <jkaluza@redhat.com> - 5.05-1
- fix #670319 - update to new upstream release 5.05
- removed useless patches