SHA256
1
0
forked from pool/file

Accepting request 74709 from Base:System

Update to file version 5.07

OBS-URL: https://build.opensuse.org/request/show/74709
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=43
This commit is contained in:
Sascha Peilicke 2011-06-30 11:08:09 +00:00 committed by Git OBS Bridge
commit f51aa5ec22
23 changed files with 446 additions and 545 deletions

View File

@ -1,13 +0,0 @@
--- python/setup.py
+++ python/setup.py 2006-02-10 09:51:18.000000000 +0100
@@ -3,8 +3,8 @@
magic_module = Extension('magic',
libraries = ['magic'],
- library_dirs = ['./','../','../src','/usr/lib/'],
- include_dirs = ['./','../','../src','/usr/include/'],
+ library_dirs = ['./','../','../src/.libs','/usr/lib/'],
+ include_dirs = ['./','../','../src/','/usr/include/'],
sources = ['py_magic.c'])
setup (name = 'Magic file extensions',

View File

@ -1,10 +0,0 @@
--- magic/Magdir/filesystems
+++ magic/Magdir/filesystems 2008-03-13 19:10:55.050787490 +0100
@@ -1109,6 +1109,7 @@
# reiserfs - russell@coker.com.au
0x10034 string ReIsErFs ReiserFS V3.5
0x10034 string ReIsEr2Fs ReiserFS V3.6
+0x10034 string ReIsEr3Fs ReiserFS V3.6.19
>0x1002c leshort x block size %d
>0x10032 leshort &2 (mounted or unclean)
>0x10000 lelong x num blocks %d

View File

@ -1,15 +0,0 @@
--- magic/Magdir/msdos
+++ magic/Magdir/msdos 2008-04-14 16:49:45.464433688 +0200
@@ -14,8 +14,10 @@
# OS/2 batch files are REXX. the second regex is a bit generic, oh well
# the matched commands seem to be common in REXX and uncommon elsewhere
-100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
-100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
+100 search/0xffff rxfuncadd
+>100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
+100 search/0xffff say
+>100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
0 leshort 0x14c MS Windows COFF Intel 80386 object file
#>4 ledate x stamp %s

View File

@ -1,10 +0,0 @@
--- magic/Magdir/commands
+++ magic/Magdir/commands 2010-02-05 14:32:12.093297356 +0000
@@ -52,6 +52,7 @@
# update to distinguish from *.vcf files
# this is broken because postscript has /EBEGIN{ for example.
#0 search/Ww BEGIN { awk script text
+0 regex =^\\s*BEGIN\\s*[{] awk script text
# AT&T Bell Labs' Plan 9 shell
0 string/w #!\ /bin/rc Plan 9 rc shell script text

View File

@ -1,26 +0,0 @@
--- magic/Magdir/images
+++ magic/Magdir/images 2010-11-24 12:11:01.520426341 +0000
@@ -551,11 +551,18 @@
# Bio-Rad .PIC is an image format used by microscope control systems
# and related image processing software used by biologists.
# From: Vebjorn Ljosa <vebjorn@ljosa.com>
-54 leshort 12345 Bio-Rad .PIC Image File
->0 leshort >0 %hd x
->2 leshort >0 %hd,
->4 leshort =1 1 image in file
->4 leshort >1 %hd images in file
+# BOOL values are two-byte integers; use them to rule out false positives.
+# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
+# Samples: http://www.loci.wisc.edu/software/sample-data
+14 leshort <2
+>4 leshort >0
+>49 byte 0
+>62 leshort <2
+>>54 leshort 12345 Bio-Rad .PIC Image File
+>>>0 leshort >0 %hd x
+>>>2 leshort >0 %hd,
+>>>4 leshort =1 1 image in file
+>>>4 leshort >1 %hd images in file
# From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
# The description of *.mrw format can be found at

View File

@ -1,182 +0,0 @@
--- magic/Magdir/commands
+++ magic/Magdir/commands 2010-02-05 14:28:46.657297767 +0000
@@ -4,73 +4,73 @@
# commands: file(1) magic for various shells and interpreters
#
#0 string : shell archive or script for antique kernel text
-0 string/w #!\ /bin/sh POSIX shell script text executable
+0 string/w #!\ /bin/sh POSIX shell script text
!:mime text/x-shellscript
-0 string/w #!\ /bin/csh C shell script text executable
+0 string/w #!\ /bin/csh C shell script text
!:mime text/x-shellscript
# korn shell magic, sent by George Wu, gwu@clyde.att.com
-0 string/w #!\ /bin/ksh Korn shell script text executable
+0 string/w #!\ /bin/ksh Korn shell script text
!:mime text/x-shellscript
-0 string/w #!\ /bin/tcsh Tenex C shell script text executable
+0 string/w #!\ /bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/bin/tcsh Tenex C shell script text executable
+0 string/w #!\ /usr/bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/tcsh Tenex C shell script text executable
+0 string/w #!\ /usr/local/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text executable
+0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
-0 string/w #!\ /bin/zsh Paul Falstad's zsh script text executable
+0 string/w #!\ /bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
+0 string/w #!\ /usr/bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
+0 string/w #!\ /usr/local/bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bin/ash Neil Brown's ash script text executable
+0 string/w #!\ /usr/local/bin/ash Neil Brown's ash script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bin/ae Neil Brown's ae script text executable
+0 string/w #!\ /usr/local/bin/ae Neil Brown's ae script text
!:mime text/x-shellscript
-0 string/w #!\ /bin/nawk new awk script text executable
+0 string/w #!\ /bin/nawk new awk script text
!:mime text/x-nawk
-0 string/w #!\ /usr/bin/nawk new awk script text executable
+0 string/w #!\ /usr/bin/nawk new awk script text
!:mime text/x-nawk
-0 string/w #!\ /usr/local/bin/nawk new awk script text executable
+0 string/w #!\ /usr/local/bin/nawk new awk script text
!:mime text/x-nawk
-0 string/w #!\ /bin/gawk GNU awk script text executable
+0 string/w #!\ /bin/gawk GNU awk script text
!:mime text/x-gawk
-0 string/w #!\ /usr/bin/gawk GNU awk script text executable
+0 string/w #!\ /usr/bin/gawk GNU awk script text
!:mime text/x-gawk
-0 string/w #!\ /usr/local/bin/gawk GNU awk script text executable
+0 string/w #!\ /usr/local/bin/gawk GNU awk script text
!:mime text/x-gawk
#
-0 string/w #!\ /bin/awk awk script text executable
+0 string/w #!\ /bin/awk awk script text
!:mime text/x-awk
-0 string/w #!\ /usr/bin/awk awk script text executable
+0 string/w #!\ /usr/bin/awk awk script text
!:mime text/x-awk
# update to distinguish from *.vcf files
# this is broken because postscript has /EBEGIN{ for example.
#0 search/Ww BEGIN { awk script text
# AT&T Bell Labs' Plan 9 shell
-0 string/w #!\ /bin/rc Plan 9 rc shell script text executable
+0 string/w #!\ /bin/rc Plan 9 rc shell script text
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
-0 string/w #!\ /bin/bash Bourne-Again shell script text executable
+0 string/w #!\ /bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/bin/bash Bourne-Again shell script text executable
+0 string/w #!\ /usr/bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bash Bourne-Again shell script text executable
+0 string/w #!\ /usr/local/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text executable
+0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
# using env
0 string #!/usr/bin/env a
->15 string >\0 %s script text executable
+>15 string >\0 %s script text
0 string #!\ /usr/bin/env a
->16 string >\0 %s script text executable
+>16 string >\0 %s script text
# PHP scripts
# Ulf Harnhammar <ulfh@update.uu.se>
@@ -80,9 +80,9 @@
!:mime text/x-php
0 search/1 =<?\r PHP script text
!:mime text/x-php
-0 search/1/w #!\ /usr/local/bin/php PHP script text executable
+0 search/1/w #!\ /usr/local/bin/php PHP script text
!:mime text/x-php
-0 search/1/w #!\ /usr/bin/php PHP script text executable
+0 search/1/w #!\ /usr/bin/php PHP script text
!:mime text/x-php
0 string Zend\x00 PHP script Zend Optimizer data
--- magic/Magdir/perl
+++ magic/Magdir/perl 2009-05-05 12:01:34.000000000 +0000
@@ -6,15 +6,15 @@
# The `eval' lines recognizes an outrageously clever hack.
# Keith Waclena <keith@cerberus.uchicago.edu>
# Send additions to <perl5-porters@perl.org>
-0 search/1/w #!\ /bin/perl Perl script text executable
+0 search/1/w #!\ /bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /bin/perl Perl script text
!:mime text/x-perl
-0 search/1/w #!\ /usr/bin/perl Perl script text executable
+0 search/1/w #!\ /usr/bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /usr/bin/perl Perl script text
!:mime text/x-perl
-0 search/1/w #!\ /usr/local/bin/perl Perl script text executable
+0 search/1/w #!\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
--- magic/Magdir/python
+++ magic/Magdir/python 2010-02-05 14:29:13.101297655 +0000
@@ -5,7 +5,7 @@
#
# From: David Necas <yeti@physics.muni.cz>
# often the module starts with a multiline string
-0 string """ a python script text executable
+0 string """ a python script text
# MAGIC as specified in Python/import.c (1.5 to 2.6a1 and 3.1a0, assuming
# that Py_UnicodeFlag is off for Python 2)
# 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n"
@@ -20,11 +20,11 @@
0 belong 0x3b0c0d0a python 3.0 byte-compiled
0 belong 0x4f0c0d0a python 3.1 byte-compiled
-0 search/1/w #!\ /usr/bin/python Python script text executable
+0 search/1/w #!\ /usr/bin/python Python script text
!:mime text/x-python
-0 search/1/w #!\ /usr/local/bin/python Python script text executable
+0 search/1/w #!\ /usr/local/bin/python Python script text
!:mime text/x-python
-0 search/1 #!/usr/bin/env\ python Python script text executable
+0 search/1 #!/usr/bin/env\ python Python script text
!:mime text/x-python
-0 search/1 #!\ /usr/bin/env\ ruby Python script text executable
+0 search/1 #!\ /usr/bin/env\ ruby Python script text
!:mime text/x-python
--- magic/Magdir/varied.script
+++ magic/Magdir/varied.script 2007-03-21 10:22:09.000000000 +0000
@@ -4,12 +4,12 @@
# varied.script: file(1) magic for various interpreter scripts
0 string #!\ / a
->3 string >\0 %s script text executable
+>3 string >\0 %s script text
0 string #!\t/ a
->3 string >\0 %s script text executable
+>3 string >\0 %s script text
0 string #!/ a
->2 string >\0 %s script text executable
-0 string #!\ script text executable
+>2 string >\0 %s script text
+0 string #!\ script text
>3 string >\0 for %s
# From: arno <arenevier@fdn.fr>

View File

@ -1,13 +0,0 @@
--- magic/Magdir/archive
+++ magic/Magdir/archive 2010-02-05 15:43:36.517302304 +0000
@@ -581,6 +581,10 @@
!:mime application/zip
>>4 byte 0x14 Zip archive data, at least v2.0 to extract
!:mime application/zip
+>>30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to extract
+>>>34 ubelong 0x74797065 \b, mime type
+>>>>38 regex application/[a-z\+\-]+ \b %s
+!:mime application/unknown+zip
# OpenOffice.org / KOffice / StarOffice documents
# Listed here because they ARE zip files

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45631a0885784f83fa39c54c01afd23a24dbafb3428b27d1049a657f32f54874
size 475598

11
file-5.07-biorad.dif Normal file
View File

@ -0,0 +1,11 @@
--- magic/Magdir/images
+++ magic/Magdir/images 2011-06-14 14:09:58.779926039 +0000
@@ -583,6 +583,8 @@
# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
# Samples: http://www.loci.wisc.edu/software/sample-data
14 leshort <2
+>4 leshort >0
+>49 byte 0
>62 leshort <2
>>54 leshort 12345 Bio-Rad .PIC Image File
>>>0 leshort >0 %hd x

14
file-5.07-clicfs.dif Normal file
View File

@ -0,0 +1,14 @@
--- magic/Localstuff
+++ magic/Localstuff 2011-06-14 17:40:22.417764753 +0000
@@ -53,3 +53,11 @@
0 string SOLV Sat-solver solv file,
>4 belong x version %ld
+
+# coolo's clicfs
+
+0 string/b CLIC ClicFS
+>4 byte x \b Version %c
+>5 byte x \b%c
+>6 long >0
+>>6 pstring/l >0 \b, Target "%s"

View File

@ -1,15 +1,15 @@
--- src/readelf.c
+++ src/readelf.c 2008-04-14 16:43:48.082574211 +0200
@@ -663,7 +663,7 @@ core:
+++ src/readelf.c 2011-06-14 13:58:06.424425742 +0000
@@ -678,7 +678,7 @@ core:
default:
if (xnh_type == NT_PRPSINFO) {
if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
- size_t i, j;
+ size_t i, j, m = 0;
unsigned char c;
/*
* Extract the program name. We assume
@@ -675,7 +675,9 @@ core:
@@ -690,7 +690,9 @@ core:
* If the characters aren't all printable,
* reject it.
*/

214
file-5.07-exec.dif Normal file
View File

@ -0,0 +1,214 @@
--- magic/Magdir/commands
+++ magic/Magdir/commands 2011-06-14 13:50:11.135927768 +0000
@@ -4,71 +4,71 @@
# commands: file(1) magic for various shells and interpreters
#
#0 string/w : shell archive or script for antique kernel text
-0 string/wt #!\ /bin/sh POSIX shell script text executable
+0 string/wt #!\ /bin/sh POSIX shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /bin/csh C shell script text executable
+0 string/wt #!\ /bin/csh C shell script text
!:mime text/x-shellscript
# korn shell magic, sent by George Wu, gwu@clyde.att.com
-0 string/wt #!\ /bin/ksh Korn shell script text executable
+0 string/wt #!\ /bin/ksh Korn shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
+0 string/wt #!\ /bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
+0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable
+0 string/wt #!\ /usr/local/tcsh Tenex C shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
+0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text
!:mime text/x-shellscript
#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
-0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable
+0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
+0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
+0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
+0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
+0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text
!:mime text/x-shellscript
-0 string/wt #!\ /bin/nawk new awk script text executable
+0 string/wt #!\ /bin/nawk new awk script text
!:mime text/x-nawk
-0 string/wt #!\ /usr/bin/nawk new awk script text executable
+0 string/wt #!\ /usr/bin/nawk new awk script text
!:mime text/x-nawk
-0 string/wt #!\ /usr/local/bin/nawk new awk script text executable
+0 string/wt #!\ /usr/local/bin/nawk new awk script text
!:mime text/x-nawk
-0 string/wt #!\ /bin/gawk GNU awk script text executable
+0 string/wt #!\ /bin/gawk GNU awk script text
!:mime text/x-gawk
-0 string/wt #!\ /usr/bin/gawk GNU awk script text executable
+0 string/wt #!\ /usr/bin/gawk GNU awk script text
!:mime text/x-gawk
-0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable
+0 string/wt #!\ /usr/local/bin/gawk GNU awk script text
!:mime text/x-gawk
#
-0 string/wt #!\ /bin/awk awk script text executable
+0 string/wt #!\ /bin/awk awk script text
!:mime text/x-awk
-0 string/wt #!\ /usr/bin/awk awk script text executable
+0 string/wt #!\ /usr/bin/awk awk script text
!:mime text/x-awk
0 regex =^\\s*BEGIN\\s*[{] awk script text
# AT&T Bell Labs' Plan 9 shell
-0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
+0 string/wt #!\ /bin/rc Plan 9 rc shell script text
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
-0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
+0 string/wt #!\ /bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
+0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
+0 string/wt #!\ /usr/local/bash Bourne-Again shell script text
!:mime text/x-shellscript
-0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
+0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text
!:mime text/x-shellscript
# using env
0 string/t #!/usr/bin/env a
->15 string/t >\0 %s script text executable
+>15 string/t >\0 %s script text
0 string/t #!\ /usr/bin/env a
->16 string/t >\0 %s script text executable
+>16 string/t >\0 %s script text
# PHP scripts
# Ulf Harnhammar <ulfh@update.uu.se>
@@ -78,9 +78,9 @@
!:mime text/x-php
0 search/1 =<?\r PHP script text
!:mime text/x-php
-0 search/1/w #!\ /usr/local/bin/php PHP script text executable
+0 search/1/w #!\ /usr/local/bin/php PHP script text
!:mime text/x-php
-0 search/1/w #!\ /usr/bin/php PHP script text executable
+0 search/1/w #!\ /usr/bin/php PHP script text
!:mime text/x-php
# Smarty compiled template, http://www.smarty.net/
# Elan Ruusamäe <glen@delfi.ee>
--- magic/Magdir/perl
+++ magic/Magdir/perl 2009-05-05 12:01:34.000000000 +0000
@@ -6,15 +6,15 @@
# The `eval' lines recognizes an outrageously clever hack.
# Keith Waclena <keith@cerberus.uchicago.edu>
# Send additions to <perl5-porters@perl.org>
-0 search/1/w #!\ /bin/perl Perl script text executable
+0 search/1/w #!\ /bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /bin/perl Perl script text
!:mime text/x-perl
-0 search/1/w #!\ /usr/bin/perl Perl script text executable
+0 search/1/w #!\ /usr/bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /usr/bin/perl Perl script text
!:mime text/x-perl
-0 search/1/w #!\ /usr/local/bin/perl Perl script text executable
+0 search/1/w #!\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text
!:mime text/x-perl
--- magic/Magdir/python
+++ magic/Magdir/python 2011-06-14 13:51:01.507926101 +0000
@@ -5,7 +5,7 @@
#
# From: David Necas <yeti@physics.muni.cz>
# often the module starts with a multiline string
-0 string/t """ a python script text executable
+0 string/t """ a python script text
# MAGIC as specified in Python/import.c (1.5 to 2.7a0 and 3.1a0, assuming
# that Py_UnicodeFlag is off for Python 2)
# 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n"
@@ -22,39 +22,39 @@
0 belong 0x4f0c0d0a python 3.1 byte-compiled
0 belong 0x6c0c0d0a python 3.2 byte-compiled
-0 search/1/w #!\ /usr/bin/python Python script text executable
+0 search/1/w #!\ /usr/bin/python Python script text
!:mime text/x-python
-0 search/1/w #!\ /usr/local/bin/python Python script text executable
+0 search/1/w #!\ /usr/local/bin/python Python script text
!:mime text/x-python
-0 search/1 #!/usr/bin/env\ python Python script text executable
+0 search/1 #!/usr/bin/env\ python Python script text
!:mime text/x-python
-0 search/1 #!\ /usr/bin/env\ python Python script text executable
+0 search/1 #!\ /usr/bin/env\ python Python script text
!:mime text/x-python
# from module.submodule import func1, func2
-0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
+0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text
!:mime text/x-python
# def __init__ (self, ...):
0 search/4096 def\ __init__
->&0 search/64 self Python script text executable
+>&0 search/64 self Python script text
!:mime text/x-python
# comments
0 search/4096 '''
->&0 regex .*'''$ Python script text executable
+>&0 regex .*'''$ Python script text
!:mime text/x-python
0 search/4096 """
->&0 regex .*"""$ Python script text executable
+>&0 regex .*"""$ Python script text
!:mime text/x-python
# try:
# except: or finally:
# block
0 search/4096 try:
->&0 regex \^\\s*except.*: Python script text executable
+>&0 regex \^\\s*except.*: Python script text
!:mime text/x-python
->&0 search/4096 finally: Python script text executable
+>&0 search/4096 finally: Python script text
!:mime text/x-python
--- magic/Magdir/varied.script
+++ magic/Magdir/varied.script 2011-06-14 13:52:38.827926417 +0000
@@ -4,12 +4,12 @@
# varied.script: file(1) magic for various interpreter scripts
0 string/t #!\ / a
->3 string >\0 %s script text executable
+>3 string >\0 %s script text
0 string/t #!\t/ a
->3 string >\0 %s script text executable
+>3 string >\0 %s script text
0 string/t #!/ a
->2 string >\0 %s script text executable
-0 string/t #!\ script text executable
+>2 string >\0 %s script text
+0 string/t #!\ script text
>3 string >\0 for %s
# From: arno <arenevier@fdn.fr>

View File

@ -1,7 +1,7 @@
--- magic/Magdir/filesystems
+++ magic/Magdir/filesystems 2009-10-27 16:55:38.087429836 +0100
@@ -1198,6 +1198,7 @@
32769 string CD001
+++ magic/Magdir/filesystems 2009-10-27 15:55:38.000000000 +0000
@@ -1236,6 +1236,7 @@
32769 string CD001 #
!:mime application/x-iso9660-image
>38913 string !NSR0 ISO 9660 CD-ROM filesystem data
+!:mime application/x-iso9660-image

View File

@ -1,9 +1,11 @@
--- magic/Magdir/llvm
+++ magic/Magdir/llvm 2010-04-19 14:13:15.518924957 +0000
@@ -9,3 +9,6 @@
+++ magic/Magdir/llvm 2010-04-19 14:13:16.000000000 +0000
@@ -9,5 +9,8 @@
0 string llvc0 LLVM byte-codes, null compression
0 string llvc1 LLVM byte-codes, gzip compression
0 string llvc2 LLVM byte-codes, bzip2 compression
+
+0 string BC\xc0\xde LLVM bitcode
+0 string \xde\xc0\x17\x0b LLVM bitcode, wrapper
0 string \xde\xc0\x17\x0b LLVM bitcode, wrapper
0 string BC\xc0\xde LLVM bitcode

View File

@ -1,15 +1,6 @@
--- magic/Magdir/audio
+++ magic/Magdir/audio 2008-04-14 16:17:59.000000000 +0200
@@ -116,7 +116,7 @@
# Real Audio (Magic .ra\0375)
0 belong 0x2e7261fd RealAudio sound file
!:mime audio/x-pn-realaudio
-0 string .RMF RealMedia file
+0 string .RMF\0\0\0 RealMedia file
!:mime application/vnd.rn-realmedia
#video/x-pn-realvideo
#video/vnd.rn-realvideo
@@ -127,7 +127,7 @@
+++ magic/Magdir/audio 2008-04-14 14:17:59.000000000 +0000
@@ -129,7 +129,7 @@
# Oct 31, 1995
# fixed by <doj@cubic.org> 2003-06-24
# Too short...
@ -19,8 +10,8 @@
#0 string JN Composer 669 Module sound data (extended format)
0 string MAS_U ULT(imate) Module sound data
--- magic/Magdir/bsdi
+++ magic/Magdir/bsdi 2003-12-08 17:50:03.000000000 +0100
@@ -19,7 +19,7 @@
+++ magic/Magdir/bsdi 2003-12-08 16:50:03.000000000 +0000
@@ -21,7 +21,7 @@
>32 byte 0x6a (uses shared libs)
# same as in SunOS 4.x, except for static shared libraries
@ -29,7 +20,7 @@
>0 byte &0x80
>>20 belong <4096 shared library
>>20 belong =4096 dynamically linked executable
@@ -28,13 +28,13 @@
@@ -30,13 +30,13 @@
>16 belong >0 not stripped
>36 belong 0xb4100001 (uses shared libs)
@ -45,33 +36,9 @@
>0 byte &0x80 dynamically linked executable
>0 byte ^0x80 executable
>16 belong >0 not stripped
--- magic/Magdir/commands
+++ magic/Magdir/commands 2009-05-05 13:57:30.778196178 +0200
@@ -12,6 +12,8 @@
!:mime text/x-shellscript
0 string/w #!\ /bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
+0 string/w #!\ /usr/bin/tcsh Tenex C shell script text executable
+!:mime text/x-shellscript
0 string/w #!\ /usr/local/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
0 string/w #!\ /usr/local/bin/tcsh Tenex C shell script text executable
@@ -54,7 +56,11 @@
0 string/w #!\ /bin/rc Plan 9 rc shell script text executable
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
-0 string/w #!\ /bin/bash Bourne-Again shell script text executable
+0 string/w #!\ /bin/bash Bourne-Again shell script text executable
+!:mime text/x-shellscript
+0 string/w #!\ /usr/bin/bash Bourne-Again shell script text executable
+!:mime text/x-shellscript
+0 string/w #!\ /usr/local/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/w #!\ /usr/local/bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
--- magic/Magdir/mach
+++ magic/Magdir/mach 2003-12-08 17:50:03.000000000 +0100
@@ -74,7 +74,7 @@
+++ magic/Magdir/mach 2003-12-08 16:50:03.000000000 +0000
@@ -76,7 +76,7 @@
>4 belong 11 hppa
>4 belong 12 acorn
>4 belong 13 m88k
@ -80,20 +47,9 @@
>4 belong 15 i860-big
>4 belong 16 i860
>4 belong 17 rs6000
--- magic/Magdir/msdos
+++ magic/Magdir/msdos 2005-07-25 15:24:04.000000000 +0200
@@ -271,7 +271,7 @@
# a few unknown ZIP sfxes, no idea if they are needed or if they are
# already captured by the generic patterns above
->122 string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive
+>0x7a string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive
>(8.s*16) search/0x20 PKSFX \b, ZIP self-extracting archive (PKZIP)
# TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
#
--- magic/Magdir/netbsd
+++ magic/Magdir/netbsd 2003-12-08 17:50:03.000000000 +0100
@@ -101,25 +101,25 @@
+++ magic/Magdir/netbsd 2003-12-08 16:50:03.000000000 +0000
@@ -102,25 +102,25 @@
0 belong&0377777777 045200507 a.out NetBSD/powerpc core
>12 string >\0 from '%s'
@ -124,8 +80,8 @@
>32 belong !0 (signal %d)
--- magic/Magdir/sun
+++ magic/Magdir/sun 2006-11-22 15:49:20.000000000 +0100
@@ -5,7 +5,7 @@
+++ magic/Magdir/sun 2006-11-22 14:49:20.000000000 +0000
@@ -6,7 +6,7 @@
# Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
# releases. (5.x uses ELF.)
#
@ -134,7 +90,7 @@
>0 byte &0x80
>>20 belong <4096 shared library
>>20 belong =4096 dynamically linked executable
@@ -13,12 +13,12 @@
@@ -14,12 +14,12 @@
>0 byte ^0x80 executable
>16 belong >0 not stripped

View File

@ -1,6 +1,6 @@
--- src/file.c
+++ src/file.c 2009-05-05 14:05:15.133901855 +0200
@@ -214,6 +214,8 @@ main(int argc, char *argv[])
+++ src/file.c 2009-05-05 12:05:15.000000000 +0000
@@ -195,6 +195,8 @@ main(int argc, char *argv[])
flags |= MAGIC_DEBUG|MAGIC_CHECK;
break;
case 'e':
@ -9,7 +9,7 @@
for (i = 0; i < sizeof(nv) / sizeof(nv[0]); i++)
if (strcmp(nv[i].name, optarg) == 0)
break;
@@ -225,7 +227,7 @@ main(int argc, char *argv[])
@@ -206,7 +208,7 @@ main(int argc, char *argv[])
break;
case 'f':
@ -18,7 +18,7 @@
usage();
if (magic == NULL)
if ((magic = load(magicfile, flags)) == NULL)
@@ -234,6 +236,8 @@ main(int argc, char *argv[])
@@ -215,6 +217,8 @@ main(int argc, char *argv[])
++didsomefiles;
break;
case 'F':
@ -27,8 +27,8 @@
separator = optarg;
break;
case 'i':
@@ -243,6 +247,8 @@ main(int argc, char *argv[])
flags |= MAGIC_CONTINUE;
@@ -227,6 +231,8 @@ main(int argc, char *argv[])
action = FILE_LIST;
break;
case 'm':
+ if (!optarg)

View File

@ -1,17 +1,17 @@
--- src/Makefile.am.orig
+++ src/Makefile.am
--- src/Makefile.am
+++ src/Makefile.am 2011-06-14 14:05:18.691926054 +0000
@@ -11,7 +11,7 @@ libmagic_la_SOURCES = magic.c apprentice
encoding.c compress.c is_tar.c readelf.c print.c fsmagic.c \
funcs.c file.h names.h patchlevel.h readelf.h tar.h apptype.c \
funcs.c file.h names.h readelf.h tar.h apptype.c \
file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h
-libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0
+libmagic_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libmagic.map -no-undefined -version-info 1:0:0
libmagic_la_LIBADD = $(LTLIBOBJS)
file_SOURCES = file.c
--- /dev/null
+++ src/libmagic.map
@@ -0,0 +1,16 @@
if MINGW
MINGWLIBS = -lgnurx -lshlwapi
else
--- src/libmagic.map
+++ src/libmagic.map 2011-06-14 00:00:00.000000000 +0000
@@ -0,0 +1,17 @@
+{
+global:
+ magic_buffer;
@ -23,9 +23,9 @@
+ magic_error;
+ magic_file;
+ magic_getpath;
+ magic_list;
+ magic_load;
+ magic_open;
+ magic_setflags;
+local: *;
+};
\ No newline at end of file

13
file-5.07-zip2.0.dif Normal file
View File

@ -0,0 +1,13 @@
--- magic/Magdir/archive
+++ magic/Magdir/archive 2010-02-05 15:43:37.000000000 +0000
@@ -564,6 +564,10 @@
# PKZIP multi-volume archive
0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
!:mime application/zip
+>>30 ubelong 0x6d696d65 Zip archive data, at least v2.0 to extract
+>>>34 ubelong 0x74797065 \b, mime type
+>>>>38 regex application/[a-z\+\-]+ \b %s
+!:mime application/unknown+zip
# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004

View File

@ -1,121 +1,6 @@
--- magic/Header
+++ magic/Header 2006-03-27 13:29:19.000000000 +0200
@@ -1,5 +1,7 @@
# Magic
# Magic data for file(1) command.
-# Machine-generated from src/cmd/file/magdir/*; edit there only!
-# Format is described in magic(files), where:
-# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
+# Format is described in magic(5).
+#
+# Note: If you have edited this file you may run `file -C'
+# to make a pre-compiled magic.mgc for faster execution
+#
--- magic/Makefile.am
+++ magic/Makefile.am 2010-02-05 16:37:45.805297766 +0100
@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
-pkgdata_DATA = magic.mgc
+pkgdata_DATA = magic.mgc magic
EXTRA_DIST = \
$(MAGIC_DIR)/Header \
@@ -20,7 +20,6 @@ $(MAGIC_FRAGMENT_DIR)/amanda \
$(MAGIC_FRAGMENT_DIR)/amigaos \
$(MAGIC_FRAGMENT_DIR)/animation \
$(MAGIC_FRAGMENT_DIR)/apl \
-$(MAGIC_FRAGMENT_DIR)/apple \
$(MAGIC_FRAGMENT_DIR)/applix \
$(MAGIC_FRAGMENT_DIR)/archive \
$(MAGIC_FRAGMENT_DIR)/asterix \
@@ -67,7 +66,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \
$(MAGIC_FRAGMENT_DIR)/erlang \
$(MAGIC_FRAGMENT_DIR)/esri \
$(MAGIC_FRAGMENT_DIR)/fcs \
-$(MAGIC_FRAGMENT_DIR)/filesystems \
$(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/fonts \
$(MAGIC_FRAGMENT_DIR)/fortran \
@@ -98,19 +96,19 @@ $(MAGIC_FRAGMENT_DIR)/island \
$(MAGIC_FRAGMENT_DIR)/ispell \
$(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/jpeg \
+$(MAGIC_FRAGMENT_DIR)/linux \
+$(MAGIC_FRAGMENT_DIR)/filesystems \
$(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \
-$(MAGIC_FRAGMENT_DIR)/linux \
$(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \
$(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/mach \
-$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/maple \
@@ -126,10 +124,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \
-$(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/motorola \
$(MAGIC_FRAGMENT_DIR)/mozilla \
$(MAGIC_FRAGMENT_DIR)/msdos \
+$(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/msvc \
$(MAGIC_FRAGMENT_DIR)/mup \
$(MAGIC_FRAGMENT_DIR)/natinst \
@@ -165,6 +163,8 @@ $(MAGIC_FRAGMENT_DIR)/pyramid \
$(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/apple \
+$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \
@@ -223,8 +223,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel
+RAW = magic
MAGIC = magic.mgc
-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
+CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW}
+
+${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST)
+ cat /dev/null > $@
+ for frag in $(EXTRA_DIST); do \
+ if test -f $(srcdir)/$$frag; then \
+ f=$(srcdir)/$$frag; \
+ else \
+ f=$$frag; \
+ fi; \
+ cat $$f; \
+ done >> $@
# FIXME: Build file natively as well so that it can be used to compile
# the target's magic file
@@ -236,7 +248,5 @@ FILE_COMPILE = $(top_builddir)/src/file
FILE_COMPILE_DEP = $(FILE_COMPILE)
endif
-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
- @mkdir magic && cp -p $(EXTRA_DIST) magic
- $(FILE_COMPILE) -C -m magic
- @rm -fr magic
+${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW)
+ $(FILE_COMPILE) -C -m $(RAW)
--- magic/Magdir/elf
+++ magic/Magdir/elf 2006-11-22 15:57:15.000000000 +0100
@@ -101,7 +101,7 @@
+++ magic/Magdir/elf 2006-11-22 14:57:15.000000000 +0000
@@ -102,7 +102,7 @@
>>18 leshort 47 Renesas H8/300H,
>>18 leshort 48 Renesas H8S,
>>18 leshort 49 Renesas H8/500,
@ -124,7 +9,7 @@
>>18 leshort 51 Stanford MIPS-X,
>>18 leshort 52 Motorola Coldfire,
>>18 leshort 53 Motorola M68HC12,
@@ -246,7 +246,7 @@
@@ -247,7 +247,7 @@
>>18 beshort 47 Renesas H8/300H,
>>18 beshort 48 Renesas H8S,
>>18 beshort 49 Renesas H8/500,
@ -134,8 +19,8 @@
>>18 beshort 52 Motorola Coldfire,
>>18 beshort 53 Motorola M68HC12,
--- magic/Magdir/linux
+++ magic/Magdir/linux 2009-05-05 14:25:20.898401425 +0200
@@ -81,21 +81,43 @@
+++ magic/Magdir/linux 2009-05-05 12:25:21.000000000 +0000
@@ -94,21 +94,43 @@
# and Nicolás Lichtmaier <nick@debian.org>
# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
# Linux kernel boot images (i386 arch) (Wolfram Kleff)
@ -194,23 +79,8 @@
# This also matches new kernels, which were caught above by "HdrS".
0 belong 0xb8c0078e Linux kernel
>0x1e3 string Loading version 1.3.79 or older
--- magic/Magdir/modem
+++ magic/Magdir/modem 2006-03-27 13:29:19.000000000 +0200
@@ -2,9 +2,9 @@
# modem: file(1) magic for modem programs
#
# From: Florian La Roche <florian@knorke.saar.de>
-4 string Research, Digifax-G3-File
->29 byte 1 , fine resolution
->29 byte 0 , normal resolution
+1 string PC\ Research,\ Inc Digifax-G3-File
+>29 byte 1 \b, fine resolution
+>29 byte 0 \b, normal resolution
0 short 0x0100 raw G3 data, byte-padded
0 short 0x1400 raw G3 data
--- magic/Magdir/msad
+++ magic/Magdir/msad 2006-03-27 13:29:19.000000000 +0200
+++ magic/Magdir/msad 2006-03-27 11:29:19.000000000 +0000
@@ -0,0 +1,5 @@
+#------------------------------------------------------------------------------
+# msad: file(1) magic for msad
@ -218,40 +88,124 @@
+# This must precede the heuristic for raw G3 data
+4 string Standard\ Jet\ DB Microsoft Access Database
--- magic/Magdir/msdos
+++ magic/Magdir/msdos 2009-05-05 14:29:29.646404153 +0200
@@ -70,6 +70,7 @@
>>&0 leshort 0x290 PA-RISC
>>&18 leshort&0x0100 >0 32-bit
>>&18 leshort&0x1000 >0 system file
+>>&228 lelong >0 \b, Mono/.Net assembly
>>&0xf4 search/0x140 \x0\x40\x1\x0
>>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
>30 string Copyright\ 1989-1990\ PKWARE\ Inc. Self-extracting PKZIP archive
@@ -107,7 +108,7 @@
>>>(0x3c.l+4) leshort 0x200 Intel Itanium
>>>(0x3c.l+22) leshort&0x0100 >0 32-bit
+++ magic/Magdir/msdos 2011-06-14 14:36:26.175926257 +0000
@@ -98,9 +98,9 @@
>>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
>>>(0x3c.l+22) leshort&0x1000 >0 system file
->>>(0x3c.l+232) lelong >0 Mono/.Net assembly
+>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly
>>>(0x3c.l+24) leshort 0x010b
->>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
+>>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly
>>>(0x3c.l+24) leshort 0x020b
->>>>(0x3c.l+248) lelong >0 Mono/.Net assembly
+>>>>(0x3c.l+248) lelong >0 \b, Mono/.Net assembly
>>>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
>>>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
@@ -520,6 +521,13 @@
# Acroread or something files wrongly identified as G3 .pfm
# these have the form \000 \001 any? \002 \000 \000
# or \000 \001 any? \022 \000 \000
+0 belong&0xffff00ff 0x00010012 PFM data
+>4 string \000\000
+>6 string >\060 - %s
# hooray, there's a DOS extender using the PE format, with a valid PE
# executable inside (which just prints a message and exits if run in win)
--- magic/Makefile.am
+++ magic/Makefile.am 2011-06-14 14:32:37.504427061 +0000
@@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir
MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
-pkgdata_DATA = magic.mgc
+pkgdata_DATA = magic.mgc magic
EXTRA_DIST = \
$(MAGIC_DIR)/Header \
@@ -19,7 +19,6 @@ $(MAGIC_FRAGMENT_DIR)/amanda \
$(MAGIC_FRAGMENT_DIR)/amigaos \
$(MAGIC_FRAGMENT_DIR)/animation \
$(MAGIC_FRAGMENT_DIR)/apl \
-$(MAGIC_FRAGMENT_DIR)/apple \
$(MAGIC_FRAGMENT_DIR)/applix \
$(MAGIC_FRAGMENT_DIR)/archive \
$(MAGIC_FRAGMENT_DIR)/asterix \
@@ -69,7 +68,6 @@ $(MAGIC_FRAGMENT_DIR)/epoc \
$(MAGIC_FRAGMENT_DIR)/erlang \
$(MAGIC_FRAGMENT_DIR)/esri \
$(MAGIC_FRAGMENT_DIR)/fcs \
-$(MAGIC_FRAGMENT_DIR)/filesystems \
$(MAGIC_FRAGMENT_DIR)/flash \
$(MAGIC_FRAGMENT_DIR)/fonts \
$(MAGIC_FRAGMENT_DIR)/fortran \
@@ -102,19 +100,19 @@ $(MAGIC_FRAGMENT_DIR)/ispell \
$(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/jpeg \
+$(MAGIC_FRAGMENT_DIR)/linux \
+$(MAGIC_FRAGMENT_DIR)/filesystems \
$(MAGIC_FRAGMENT_DIR)/karma \
$(MAGIC_FRAGMENT_DIR)/kde \
$(MAGIC_FRAGMENT_DIR)/kml \
$(MAGIC_FRAGMENT_DIR)/lecter \
$(MAGIC_FRAGMENT_DIR)/lex \
$(MAGIC_FRAGMENT_DIR)/lif \
-$(MAGIC_FRAGMENT_DIR)/linux \
$(MAGIC_FRAGMENT_DIR)/lisp \
$(MAGIC_FRAGMENT_DIR)/llvm \
$(MAGIC_FRAGMENT_DIR)/lua \
$(MAGIC_FRAGMENT_DIR)/luks \
$(MAGIC_FRAGMENT_DIR)/mach \
-$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/maple \
@@ -131,10 +129,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \
$(MAGIC_FRAGMENT_DIR)/mkid \
$(MAGIC_FRAGMENT_DIR)/mlssa \
$(MAGIC_FRAGMENT_DIR)/mmdf \
-$(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/motorola \
$(MAGIC_FRAGMENT_DIR)/mozilla \
$(MAGIC_FRAGMENT_DIR)/msdos \
+$(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msvc \
$(MAGIC_FRAGMENT_DIR)/mup \
@@ -173,6 +171,8 @@ $(MAGIC_FRAGMENT_DIR)/pyramid \
$(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/apple \
+$(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/rinex \
$(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \
@@ -238,8 +238,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
$(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel
+RAW = magic
MAGIC = magic.mgc
-CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
+CLEANFILES = ${MAGIC} $(MAGIC_DIR)/Localstuff ${RAW}
+
+0 belong&0xffff00ff 0x00010002 PFM data
+>4 string \000\000
+>6 string >\060 - %s
#0 string \000\001 pfm?
#>3 string \022\000\000Copyright\ yes
#>3 string \002\000\000Copyright\ yes
+${RAW}: $(MAGIC_DIR)/Header $(MAGIC_DIR)/Localstuff $(EXTRA_DIST)
+ cat /dev/null > $@
+ for frag in $(EXTRA_DIST); do \
+ if test -f $(srcdir)/$$frag; then \
+ f=$(srcdir)/$$frag; \
+ else \
+ f=$$frag; \
+ fi; \
+ cat $$f; \
+ done >> $@
# FIXME: Build file natively as well so that it can be used to compile
# the target's magic file
@@ -251,8 +263,5 @@ FILE_COMPILE = $(top_builddir)/src/file
FILE_COMPILE_DEP = $(FILE_COMPILE)
endif
-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
- @rm -fr magic
- @mkdir magic && cp -p $(EXTRA_DIST) magic
- $(FILE_COMPILE) -C -m magic
- @rm -fr magic
+${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW)
+ $(FILE_COMPILE) -C -m $(RAW)
--- src/Makefile.am
+++ src/Makefile.am 2008-04-14 17:14:56.000000000 +0200
+++ src/Makefile.am 2008-04-14 15:14:56.000000000 +0000
@@ -1,4 +1,4 @@
-MAGIC = $(pkgdatadir)/magic
+MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic
@ -259,7 +213,7 @@
include_HEADERS = magic.h
--- src/dcore.c
+++ src/dcore.c 2006-03-27 13:29:19.000000000 +0200
+++ src/dcore.c 2006-03-27 11:29:19.000000000 +0000
@@ -0,0 +1,207 @@
+/*
+ * Show goo about ELF core files

3
file-5.07.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eac62f5c2f25628420279c6a36f2c14911c776cdad89043c8ab69c0a448192e5
size 489733

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Jun 14 19:50:04 CEST 2011 - werner@suse.de
- Update to file version 5.07
* Several regressions in magic were fixed. A buffer overflow was
corrected. The program version is now recorded in only one place.
Several documentation improvements were made.
* The Python bindings were updated and fixed. Magic support for
OCF (EPUB) files and for lrzip files was added. Zip file magic
was adapted for files with unsupported special types. Many
more magic updates and fixes were made.
* Several minor bugs were fixed.
- Add magic for clicfs evne if upstream does not support it (bnc#681329)
-------------------------------------------------------------------
Wed Nov 24 13:17:11 CET 2010 - werner@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package file (Version 5.04)
# spec file for package file (Version 5.07)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -30,37 +30,34 @@ Obsoletes: file-64bit
%endif
#
# Set Version also in python-magic.spec
Version: 5.04
Release: 8
Version: 5.07
Release: 1
Summary: A Tool to Determine File Types
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.bz2
Source2: baselibs.conf
Patch: file-%{version}.dif
Patch1: file-5.02-misc.dif
Patch3: file-5.04-exec.dif
Patch1: file-5.07-misc.dif
Patch3: file-5.07-exec.dif
Patch4: file-4.24-autoconf.dif
Patch5: file-4.03-tex.dif
Patch7: file-4.20-ssd.dif
Patch8: file-4.20-xen.dif
Patch9: file-4.24-elf.dif
Patch9: file-5.07-elf.dif
Patch10: file-4.18-printf.dif
Patch11: file-4.24-reg_dos.dif
Patch12: file-5.02-option.dif
Patch12: file-5.07-option.dif
Patch13: file-4.21-scribus.dif
Patch14: file-5.04-awk.dif
Patch15: file-4.21-xcursor.dif
Patch16: file-4.21-reiserfs.dif
Patch20: file-4.24-mips.dif
Patch21: file-4.16-python.dif
Patch22: file-4.24-cromfs.dif
Patch24: file-4.24-warn.dif
Patch25: file-5.02-javacheck.dif
Patch26: file-4.24-solv.dif
Patch27: file-5.04-zip2.0.dif
Patch28: file-5.03-iso9660.dif
Patch29: file-5.04-llvm.dif
Patch30: file-5.04-visibility.patch
Patch31: file-5.04-biorad.dif
Patch27: file-5.07-zip2.0.dif
Patch28: file-5.07-iso9660.dif
Patch29: file-5.07-llvm.dif
Patch30: file-5.07-visibility.patch
Patch31: file-5.07-biorad.dif
Patch32: file-5.07-clicfs.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _miscdir %{_datadir}/misc
@ -107,18 +104,12 @@ Authors:
%patch8 -p0 -b .xen
%patch9 -p0 -b .elf
%patch10 -p0 -b .prtf
%patch11 -p0 -b .reg
%patch12 -p0 -b .opt
%patch13 -p0 -b .scri
%patch14 -p0 -b .awk
%patch15 -p0 -b .xcur
%patch16 -p0 -b .reiserfs
%ifarch mips
%patch20 -p0 -b .mips
%endif
%if 0%{?build_python_bindings:1}
%patch21 -p0 -b .python
%endif
%patch22 -p0 -b .cromfs
%patch24 -p0 -b .warn
%patch25 -p0 -b .javacheck
@ -128,6 +119,7 @@ Authors:
%patch29 -p0 -b .llvm
%patch30 -p0 -b .vis
%patch31 -p0 -b .biorad
%patch32 -p0 -b .clicfs
%patch
%build

View File

@ -1,5 +1,5 @@
#
# spec file for package python-magic (Version 5.04)
# spec file for package python-magic (Version 5.07)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,8 +26,8 @@ Url: http://www.darwinsys.com/file/
License: BSD 3 Clause, BSD 4 Clause
Group: Development/Languages/Python
AutoReqProv: on
Version: 5.04
Release: 8
Version: 5.07
Release: 1
Summary: Python module to use libmagic
%py_requires
Source99: file.spec