Browse Source

Import Debian version 4.24-3

Daniel Baumann 16 years ago
parent
commit
f8c5334b6d

+ 1 - 1
debian/compat

@@ -1 +1 @@
-6
+7

+ 2 - 2
debian/control

@@ -2,8 +2,8 @@ Source: file
 Section: utils
 Priority: standard
 Maintainer: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 6), dpatch, autotools-dev, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 7), dpatch, autotools-dev, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev
+Standards-Version: 3.8.0
 Homepage: http://www.darwinsys.com/file/
 Vcs-Browser: http://git.debian.net/?p=file.git
 Vcs-Git: git://git.debian.net/git/file.git

+ 97 - 82
debian/copyright

@@ -1,82 +1,97 @@
-This package was debianized by Daniel Baumann <daniel@debian.org> on
-Tue, 27 Mar 2007 13:28:00 +0100.
-
-It was downloaded from:
-
-	<ftp://ftp.astron.com/pub/file/>
-
-Upstream Author:
-
-	Christos Zoulas <christos@zoulas.com>
-
-License:
-
-	Copyright (C) 1985-1995 Ian F. Darwin
-	Copyright (C) 1994-2008 Christos Zoulas <christos@zoulas.com>
-
-	This software is not subject to any export provision of the United
-	States Department of Commerce, and may be exported to any country or
-	planet.
-
-	Redistribution and use in source and binary forms, with or without
-	modification, are permitted provided that the following conditions are
-	met:
-
-	1. Redistributions of source code must retain the above copyright notice
-	   immediately at the beginning of the file, without modification, this
-	   list of conditions, and the following disclaimer.
-
-	2. Redistributions in binary form must reproduce the above copyright
-	   notice, this list of conditions and the following disclaimer in the
-	   documentation and/or other materials provided with the distribution.
-
-	THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-	ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-	IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-	PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
-	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-	THE POSSIBILITY OF SUCH DAMAGE.
-
-License (magic/Magdir/os9):
-
-	Copyright (C) 1996 Ignatios Souvatzis
-	All rights reserved.
-
-	Redistribution and use in source and binary forms, with or without
-	modification, are permitted provided that the following conditions are
-	met:
-
-	1. Redistributions of source code must retain the above copyright
-	notice, this list of conditions and the following disclaimer.
-
-	2. Redistributions in binary form must reproduce the above copyright
-	notice, this list of conditions and the following disclaimer in the
-	documentation and/or other materials provided with the distribution.
-
-	3. All advertising materials mentioning features or use of this software
-	must display the following acknowledgement:
-	This product includes software developed by Ignatios Souvatzis for the
-	NetBSD project.
-
-	4. The name of the author may not be used to endorse or promote products
-	derived from this software without specific prior written permission.
-
-	THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-	DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
-	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-	(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-	SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-	HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-	STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-	ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-	POSSIBILITY OF SUCH DAMAGE.
-
-The Debian packaging is (C) 2007-2008, Daniel Baumann <daniel@debian.org> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'.
+Author: Christos Zoulas <christos@zoulas.com>
+Download: ftp://ftp.astron.com/pub/file/
+
+Files: *
+Copyright:
+ (C) 1985-1995 Ian F. Darwin
+ (C) 1994-2008 Christos Zoulas <christos@zoulas.com>
+License: BSD
+ This software is not subject to any export provision of the United States
+ Department of Commerce, and may be exported to any country or planet.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice immediately at the beginning of the file, without modification,
+    this list of conditions, and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+Files: magic/Magdir/os9
+Copyright: (C) 1996 Ignatios Souvatzis
+License: BSD
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ 3. All advertising materials mentioning features or use of this software
+    must display the following acknowledgement:
+    This product includes software developed by Ignatios Souvatzis for
+    the NetBSD project.
+ .
+ 4. The name of the author may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: (C) 2007-2008 Daniel Baumann <daniel@debian.org>
+License: BSD
+ This software is not subject to any export provision of the United States
+ Department of Commerce, and may be exported to any country or planet.
+ .
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice immediately at the beginning of the file, without modification,
+    this list of conditions, and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.

+ 20 - 0
debian/patches/00list

@@ -1,3 +1,15 @@
+201-magic-update-mp3.dpatch
+202-magic-update-awk.dpatch
+203-magic-update-reiserfs.dpatch
+204-magic-update-asf.dpatch
+205-magic-update-tcsh.dpatch
+206-magic-update-bash.dpatch
+207-magic-update-zip.dpatch
+208-magic-update-real.dpatch
+209-magic-update-os2.dpatch
+210-magic-update-digifax.dpatch
+211-magic-update-mono.dpatch
+212-magic-update-pfm.dpatch
 320-magic-add-par2.dpatch
 321-magic-add-pe5.dpatch
 322-magic-add-pmenu.dpatch
@@ -12,8 +24,16 @@
 331-magic-add-supercollider.dpatch
 333-magic-add-xen.dpatch
 334-magic-add-xcursor.dpatch
+335-magic-add-freemind.dpatch
+336-magic-add-qdbm.dpatch
+337-magic-add-tokyocabinet.dpatch
+338-magic-add-cromfs.dpatch
+339-magic-add-scribus.dpatch
+340-magic-add-selinux.dpatch
 903-file-localmagic.dpatch
 904-file-make.dpatch
+905-file-printf.dpatch
 906-file-hurd.dpatch
+907-file-funcs.dpatch
 998-doc-manpages.dpatch
 999-conglomeration.dpatch

+ 19 - 0
debian/patches/201-magic-update-mp3.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 201-magic-update-mp3.dpatch by Werner Fink <werner@suse.de>
+##
+## DP: Fixes regressions with mp3 files (Closes: #480683, #481377).
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/animation file-4.24/magic/Magdir/animation
+--- file-4.24.orig/magic/Magdir/animation	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/magic/Magdir/animation	2008-05-21 09:23:29.000000000 +0000
+@@ -276,7 +276,7 @@
+ # modified by Joerg Jenderek
+ # GRR the original test are too common for many DOS files
+ # so don't accept as MP3 until we've tested the rate
+-0       beshort&0xFFFE
++0	beshort&0xFFFE 0xFFFA
+ # rates
+ >2      byte&0xF0       0x10           MPEG ADTS, layer III, v1,  32 kbps
+ !:mime	audio/mpeg

+ 18 - 0
debian/patches/202-magic-update-awk.dpatch

@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 202-magic-update-awk.dpatch by Werner Fink <werner@suse.de>
+##
+## DP: Updates (and re-enables) awk magic.
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/commands file-4.24/magic/Magdir/commands
+--- file-4.24.orig/magic/Magdir/commands	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/magic/Magdir/commands	2008-05-21 09:36:15.000000000 +0000
+@@ -49,6 +49,7 @@
+ # update to distinguish from *.vcf files
+ # this is broken because postscript has /EBEGIN{ for example.
+ #0	search/Bb	BEGIN {			awk script text
++0	regex		=^\\s*BEGIN\\s*[{]	awk script text
+ 
+ # AT&T Bell Labs' Plan 9 shell
+ 0	string/b	#!\ /bin/rc	Plan 9 rc shell script text executable

+ 18 - 0
debian/patches/203-magic-update-reiserfs.dpatch

@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 203-magic-update-reiserfs.dpatch by Werner Fink <werner@suse.de>
+##
+## DP: Updating reiserfs magic to detect ReiserFS V3.6.19.
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/filesystems file-4.24/magic/Magdir/filesystems
+--- file-4.24.orig/magic/Magdir/filesystems	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/magic/Magdir/filesystems	2008-05-21 09:43:04.000000000 +0000
+@@ -1178,6 +1178,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

+ 18 - 0
debian/patches/204-magic-update-asf.dpatch

@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 204-magic-update-asf.dpatch by Daniel Baumann <daniel@debian.org>
+##
+## DP: Add mime to asf magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/animation file/magic/Magdir/animation
+--- file.orig/magic/Magdir/animation	2008-05-26 23:24:27.000000000 +0200
++++ file/magic/Magdir/animation	2008-05-31 15:03:45.000000000 +0200
+@@ -686,6 +686,7 @@
+ 
+ # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
+ 0	belong			0x3026b275	Microsoft ASF
++!:mime	video/x-ms-asf
+ 
+ # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
+ 0	string			\x8aMNG		MNG video data,

+ 19 - 0
debian/patches/205-magic-update-tcsh.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 205-magic-update-tcsh.dpatch
+##
+## DP: Add another shebang path for tcsh.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands
+--- file.orig/magic/Magdir/commands	2008-06-13 09:30:59.000000000 +0200
++++ file/magic/Magdir/commands	2008-06-13 09:31:50.000000000 +0200
+@@ -12,6 +12,8 @@
+ !:mime	application/x-shellscript
+ 0	string/b 	#!\ /bin/tcsh		Tenex C shell script text executable
+ !:mime	application/x-shellscript
++0	string/b	#!\ /usr/bin/tcsh	Tenex C shell script text executable
++!:mime application/x-shellscript
+ 0	string/b 	#!\ /usr/local/tcsh	Tenex C shell script text executable
+ !:mime	application/x-shellscript
+ 0	string/b	#!\ /usr/local/bin/tcsh	Tenex C shell script text executable

+ 21 - 0
debian/patches/206-magic-update-bash.dpatch

@@ -0,0 +1,21 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 206-magic-update-bash.dpatch
+##
+## DP: Add another shebang path for bash.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands
+--- file.orig/magic/Magdir/commands	2008-06-13 14:56:16.000000000 +0200
++++ file/magic/Magdir/commands	2008-06-13 14:57:49.000000000 +0200
+@@ -59,6 +59,10 @@
+ # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
+ 0	string/b	#!\ /bin/bash	Bourne-Again shell script text executable
+ !:mime	application/x-shellscript
++0	string/b	#!\ /usr/bin/bash	Bourne-Again shell script text executable
++!:mime	application/x-shellscript
++0	string/b	#!\ /usr/local/bash	Bourne-Again shell script text executable
++!:mime	application/x-shellscript
+ 0	string/b	#!\ /usr/local/bin/bash	Bourne-Again shell script text executable
+ !:mime	application/x-shellscript
+ 

+ 19 - 0
debian/patches/207-magic-update-zip.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 207-magic-update-zip.dpatch
+##
+## DP: Update zip magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos
+--- file.orig/magic/Magdir/msdos	2008-05-31 22:17:03.000000000 +0200
++++ file/magic/Magdir/msdos	2008-06-13 09:44:56.000000000 +0200
+@@ -256,7 +256,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
+ #

+ 19 - 0
debian/patches/208-magic-update-real.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 207-magic-update-real.dpatch
+##
+## DP: Update RealMedia magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/audio file/magic/Magdir/audio
+--- file.orig/magic/Magdir/audio	2008-05-31 22:17:03.000000000 +0200
++++ file/magic/Magdir/audio	2008-06-13 09:48:01.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

+ 23 - 0
debian/patches/209-magic-update-os2.dpatch

@@ -0,0 +1,23 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 209-magic-update-os2.dpatch
+##
+## DP: Update OS/2 REXX magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos
+--- file.orig/magic/Magdir/msdos	2008-06-13 09:44:56.000000000 +0200
++++ file/magic/Magdir/msdos	2008-06-13 09:51:35.000000000 +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

+ 23 - 0
debian/patches/210-magic-update-digifax.dpatch

@@ -0,0 +1,23 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 210-magic-update-digifax.dpatch
+##
+## DP: Update Digifax magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/modem file/magic/Magdir/modem
+--- file.orig/magic/Magdir/modem	2008-06-13 15:00:30.000000000 +0200
++++ file/magic/Magdir/modem	2008-06-13 15:25:40.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

+ 27 - 0
debian/patches/211-magic-update-mono.dpatch

@@ -0,0 +1,27 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 211-magic-update-mono.dpatch
+##
+## DP: Update Mono magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos
+--- file.orig/magic/Magdir/msdos	2008-06-13 15:23:32.000000000 +0200
++++ file/magic/Magdir/msdos	2008-06-13 15:28:28.000000000 +0200
+@@ -65,6 +65,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
+@@ -94,7 +95,7 @@
+ >>>>(0x3c.l+4)	leshort		0x290	PA-RISC
+ >>>>(0x3c.l+22)	leshort&0x0100	>0	32-bit
+ >>>>(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+0xf8)	string		UPX0 \b, UPX compressed
+ >>>>(0x3c.l+0xf8)	search/0x140	PEC2 \b, PECompact2 compressed

+ 24 - 0
debian/patches/212-magic-update-pfm.dpatch

@@ -0,0 +1,24 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 212-magic-update-pfm.dpatch
+##
+## DP: Update pfm magic.
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos
+--- file.orig/magic/Magdir/msdos	2008-06-13 15:28:28.000000000 +0200
++++ file/magic/Magdir/msdos	2008-06-13 15:32:04.000000000 +0200
+@@ -504,6 +504,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
++
++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

+ 19 - 0
debian/patches/335-magic-add-freemind.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 335-magic-add-freemind.dpatch by Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
+##
+## DP: New magic for Freemind (Closes: #472385).
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/wordprocessors file/magic/Magdir/wordprocessors
+--- file.orig/magic/Magdir/wordprocessors	2008-05-04 14:12:49.000000000 +0000
++++ file/magic/Magdir/wordprocessors	2008-05-04 14:18:38.000000000 +0000
+@@ -148,3 +148,8 @@
+ 0	string		DOC
+ >43	byte		0x16	Just System Word Processor Ichitaro v6
+ !:mime	application/x-ichitaro6
++
++# Type: Freemind mindmap documents
++# From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
++0	string/cB	\<map\ version	Freemind document
++!:mime	application/x-freemind

+ 19 - 0
debian/patches/336-magic-add-qdbm.dpatch

@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 336-magic-add-qdmb.dpatch by Benoit Sibaud <bsibaud@april.org>
+##
+## DP: New magic for QDBM Quick Database Manager (Closes: #481717).
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/database file-4.24/magic/Magdir/database
+--- file-4.24.orig/magic/Magdir/database	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/magic/Magdir/database	2008-05-21 09:07:49.000000000 +0000
+@@ -242,3 +242,8 @@
+ # URL:  http://www.grc.nasa.gov/WWW/cgns/adf/
+ # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
+ 0	string	@(#)ADF\ Database	CGNS Advanced Data Format
++
++# Type:	QDBM Quick Database Manager
++# From:	Benoit Sibaud <bsibaud@april.org>
++0	string	\\[depot\\]\n\f		Quick Database Manager, little endian
++0	string	\\[DEPOT\\]\n\f		Quick Database Manager, big endian

+ 20 - 0
debian/patches/337-magic-add-tokyocabinet.dpatch

@@ -0,0 +1,20 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 337-magic-add-tokyocabinet.dpatch by Benoit Sibaud <bsibaud@april.org>
+##
+## DP: New magic for TokyoCabinet database (Closes: #481768).
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/database file-4.24/magic/Magdir/database
+--- file-4.24.orig/magic/Magdir/database	2008-05-21 09:07:49.000000000 +0000
++++ file-4.24/magic/Magdir/database	2008-05-21 09:15:26.000000000 +0000
+@@ -247,3 +247,9 @@
+ # From:	Benoit Sibaud <bsibaud@april.org>
+ 0	string	\\[depot\\]\n\f		Quick Database Manager, little endian
+ 0	string	\\[DEPOT\\]\n\f		Quick Database Manager, big endian
++
++# Type:	TokyoCabinet database
++# URL:	http://tokyocabinet.sourceforge.net/
++# From:	Benoit Sibaud <bsibaud@april.org>
++0	string	ToKyO\ CaBiNeT\n	TokyoCabinet database
++>14	string	x			(version %s)

+ 26 - 0
debian/patches/338-magic-add-cromfs.dpatch

@@ -0,0 +1,26 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 338-magic-add-cromfs.dpatch by Werner Fink <werner@suse.de>
+##
+## DP: Adds new magic for CROM filesystem.
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/filesystems file-4.24/magic/Magdir/filesystems
+--- file-4.24.orig/magic/Magdir/filesystems	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/magic/Magdir/filesystems	2008-05-21 09:40:38.000000000 +0000
+@@ -1289,3 +1289,15 @@
+ # really le32 operation,destination,payloadsize (but quite predictable)
+ # 01 00 00 00 00 00 00 c0 00 02 00 00
+ 0	string		\1\0\0\0\0\0\0\300\0\2\0\0	Marvell Libertas firmware
++
++# Type:	CROM filesystem
++# From:	Werner Fink <werner@suse.de>
++0	string	CROMFS	CROMFS
++>6	string	>\0	\b version %2.2s,
++>8	ulequad	>0	\b block data at %lld,
++>16	ulequad	>0	\b fblock table at %lld,
++>24	ulequad	>0	\b inode table at %lld,
++>32	ulequad	>0	\b root at %lld,
++>40	ulelong	>0	\b fblock size = %ld,
++>44	ulelong	>0	\b block size = %ld,
++>48	ulequad	>0	\b bytes = %lld

+ 20 - 0
debian/patches/339-magic-add-scribus.dpatch

@@ -0,0 +1,20 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 339-magic-add-scribus.dpatch by Werner Fink <werner@suse.de>
+##
+## DP: Adds new magics for Scribus.
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/magic/Magdir/wordprocessors file-4.24/magic/Magdir/wordprocessors
+--- file-4.24.orig/magic/Magdir/wordprocessors	2008-05-21 09:49:43.000000000 +0000
++++ file-4.24/magic/Magdir/wordprocessors	2008-05-21 09:50:54.000000000 +0000
+@@ -153,3 +153,9 @@
+ # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
+ 0	string/cB	\<map\ version	Freemind document
+ !:mime	application/x-freemind
++
++# Type:        Scribus
++# From:        Werner Fink <werner@suse.de>
++0	string	\<SCRIBUSUTF8\ Version		Scribus Document
++0	string	\<SCRIBUSUTF8NEW\ Version	Scribus Document
++!:mime	application/x-scribus

+ 57 - 0
debian/patches/340-magic-add-selinux.dpatch

@@ -0,0 +1,57 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 339-magic-add-selinux.dpatch by Russell Coker <russell@coker.com.au>
+##
+## DP: Adds new magics for SE Linux (Closes: #485886).
+
+@DPATCH@
+
+diff -Naurp file.orig/magic/Magdir/selinux file/magic/Magdir/selinux
+--- file.orig/magic/Magdir/selinux	1970-01-01 01:00:00.000000000 +0100
++++ file/magic/Magdir/selinux	2008-06-13 09:07:24.000000000 +0200
+@@ -0,0 +1,24 @@
++# Type:	SE Linux policy modules *.pp reference policy
++#	for Fedora 5 to 9, RHEL5, and Debian Etch and Lenny.
++# URL:	http://doc.coker.com.au/computers/selinux-magic
++# From:	Russell Coker <russell@coker.com.au>
++
++0		lelong	0xf97cff8f	SE Linux modular policy
++>4		lelong	x		version %d,
++>8		lelong	x		%d sections,
++>>(12.l)	lelong	0xf97cff8d
++>>>(12.l+27)	lelong	x		mod version %d,
++>>>(12.l+31)	lelong	0		Not MLS,
++>>>(12.l+31)	lelong	1		MLS,
++>>>(12.l+23)	lelong	2
++>>>>(12.l+47)	string	>\0		module name %s
++>>>(12.l+23)	lelong	1		base
++
++1	string	policy_module(	SE Linux policy module source
++2	string	policy_module(	SE Linux policy module source
++
++0	string	##\ <summary>	SE Linux policy interface source
++
++#0	search	gen_context(	SE Linux policy file contexts
++
++#0	search	gen_sens(	SE Linux policy MLS constraints source
+diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
+--- file.orig/magic/Makefile.am	2008-06-13 09:07:45.000000000 +0200
++++ file/magic/Makefile.am	2008-06-13 09:08:16.000000000 +0200
+@@ -164,6 +164,7 @@ $(MAGIC_FRAGMENT_DIR)/sc \
+ $(MAGIC_FRAGMENT_DIR)/sccs \
+ $(MAGIC_FRAGMENT_DIR)/scientific \
+ $(MAGIC_FRAGMENT_DIR)/securitycerts \
++$(MAGIC_FRAGMENT_DIR)/selinux \
+ $(MAGIC_FRAGMENT_DIR)/sendmail \
+ $(MAGIC_FRAGMENT_DIR)/sequent \
+ $(MAGIC_FRAGMENT_DIR)/sgi \
+diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in
+--- file.orig/magic/Makefile.in	2008-06-13 09:07:45.000000000 +0200
++++ file/magic/Makefile.in	2008-06-13 09:08:23.000000000 +0200
+@@ -324,6 +324,7 @@ $(MAGIC_FRAGMENT_DIR)/sc \
+ $(MAGIC_FRAGMENT_DIR)/sccs \
+ $(MAGIC_FRAGMENT_DIR)/scientific \
+ $(MAGIC_FRAGMENT_DIR)/securitycerts \
++$(MAGIC_FRAGMENT_DIR)/selinux \
+ $(MAGIC_FRAGMENT_DIR)/sendmail \
+ $(MAGIC_FRAGMENT_DIR)/sequent \
+ $(MAGIC_FRAGMENT_DIR)/sgi \

+ 18 - 0
debian/patches/905-file-printf.dpatch

@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 905-file-printf.dpatch by Martin Dorey <mdorey@bluearc.com>
+##
+## DP: Removing annoying warnings when files can't be opened (Closes: #481512).
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/src/magic.c file-4.24/src/magic.c
+--- file-4.24.orig/src/magic.c	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/src/magic.c	2008-05-21 08:47:05.000000000 +0000
+@@ -302,7 +302,6 @@ file_or_fd(struct magic_set *ms, const c
+ 			(void)strcat(strcpy(tmp, inname), ".exe");
+ 			if ((fd = open(tmp, flags)) < 0) {
+ #endif
+-				fprintf(stderr, "couldn't open file\n");
+ 				if (info_from_stat(ms, sb.st_mode) == -1)
+ 					goto done;
+ 				rv = 0;

+ 58 - 0
debian/patches/907-file-funcs.dpatch

@@ -0,0 +1,58 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 907-file-funcs.dpatch by Martin Dorey <mdorey@bluearc.com>
+##
+## DP: Fixing regression in file 4.24 with file_printf(); (Closes: #481523).
+
+@DPATCH@
+
+diff -Naurp file-4.24.orig/src/funcs.c file-4.24/src/funcs.c
+--- file-4.24.orig/src/funcs.c	2008-05-04 14:12:49.000000000 +0000
++++ file-4.24/src/funcs.c	2008-05-21 08:54:06.000000000 +0000
+@@ -45,18 +45,15 @@ FILE_RCSID("@(#)$File: funcs.c,v 1.39 20
+  * Like printf, only we append to a buffer.
+  */
+ protected int
+-file_printf(struct magic_set *ms, const char *fmt, ...)
++file_vprintf(struct magic_set *ms, const char *fmt, va_list ap)
+ {
+-	va_list ap;
+ 	size_t size;
+ 	int len;
+ 	char *buf, *newstr;
+ 
+-	va_start(ap, fmt);
+ 	len = vasprintf(&buf, fmt, ap);
+ 	if (len < 0)
+ 		goto out;
+-	va_end(ap);
+ 
+ 	if (ms->o.buf != NULL) {
+ 		len = asprintf(&newstr, "%s%s", ms->o.buf, buf);
+@@ -73,6 +70,18 @@ out:
+ 	return -1;
+ }
+ 
++protected int
++file_printf(struct magic_set *ms, const char *fmt, ...)
++{
++	va_list ap;
++	int len;
++
++	va_start(ap, fmt);
++	len = file_vprintf(ms, fmt, ap);
++	va_end(ap);
++	return len;
++}
++
+ /*
+  * error - print best error message possible
+  */
+@@ -89,7 +98,7 @@ file_error_core(struct magic_set *ms, in
+ 		ms->o.buf = NULL;
+ 		file_printf(ms, "line %u: ", lineno);
+ 	}
+-        file_printf(ms, f, va);
++	file_vprintf(ms, f, va);
+ 	if (error > 0)
+ 		file_printf(ms, " (%s)", strerror(error));
+ 	ms->haderr++;