Browse Source

Import Debian version 5.01-1

Daniel Baumann 15 years ago
parent
commit
10af599ad3

+ 1 - 1
debian/control

@@ -61,7 +61,7 @@ Description: File type determination library using "magic" numbers (Python bindi
  given file in Python.
 
 Package: python-magic-dbg
-Section: python
+Section: debug
 Architecture: any
 Priority: extra
 Depends: python-magic (= ${binary:Version}), python-dbg, ${shlibs:Depends}

+ 6 - 6
debian/patches/112-magic-update-linuxswap.patch

@@ -20,12 +20,12 @@ diff -Naurp file.orig/magic/Magdir/linux file/magic/Magdir/linux
 +>0x404	long		x		size %d pages,
 +>1052	string		\0		no label,
 +>1052	string		>\0		LABEL=%s,
-+>0x40c	belong		x		UUID=%x
-+>0x410	beshort		x		\b-%x
-+>0x412	beshort		x		\b-%x
-+>0x414	beshort		x		\b-%x
-+>0x416	belong		x		\b-%x
-+>0x41a	beshort		x		\b%x
++>0x40c	belong		x		UUID=%08x
++>0x410	beshort		x		\b-%04x
++>0x412	beshort		x		\b-%04x
++>0x414	beshort		x		\b-%04x
++>0x416	belong		x		\b-%08x
++>0x41a	beshort		x		\b%04x
  # ECOFF magic for OSF/1 and Linux (only tested under Linux though)
  #
  #	from Erik Troan (ewt@redhat.com) examining od dumps, so this

+ 6 - 6
debian/patches/113-magic-update-linuxext.patch

@@ -19,12 +19,12 @@ diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems
  #  else large INCOMPAT?
 ->>0x460 lelong          >0x000003f      ext4 filesystem data
 +>>0x460	lelong          >0x000003f      ext4 filesystem data
-+>0x468	belong		x		\b, UUID=%x
-+>0x46c	beshort		x		\b-%x
-+>0x46e	beshort		x		\b-%x
-+>0x470	beshort		x		\b-%x
-+>0x472	belong		x		\b-%x
-+>0x476	beshort		x		\b%x
++>0x468	belong		x		\b, UUID=%08x
++>0x46c	beshort		x		\b-%04x
++>0x46e	beshort		x		\b-%04x
++>0x470	beshort		x		\b-%04x
++>0x472	belong		x		\b-%08x
++>0x476	beshort		x		\b%04x
 +>0x478	string		>0		\b, volume name "%s"
  # General flags for any ext* fs
 ->0x460  lelong          &0x0000004      (needs journal recovery)

+ 39 - 0
debian/patches/118-magic-update-z-machine.patch

@@ -0,0 +1,39 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description: Fixing false matches against Z-machine pattern. A particular MP3 file as well as a particular file from texlive-omega match the pattern for Z-machine games. Make the pattern a bit more restrictive to get rid of the false matches. (Closes: #499748)
+
+diff -Naurp file.orig/magic/Magdir/adventure file/magic/Magdir/adventure
+--- file.orig/magic/Magdir/adventure	2009-03-21 09:20:03.000000000 +0000
++++ file/magic/Magdir/adventure	2009-03-21 09:27:01.000000000 +0000
+@@ -17,17 +17,23 @@
+ #------------------------------------------------------------------------------
+ # Z-machine:  file(1) magic for Z-machine binaries.
+ #
+-# This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which
+-# appears to be a version-0 Z-machine binary.
++# Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
+ #
+-# The (false match) message is to correct that behavior.  Perhaps it is
+-# not needed.
++# The first byte is the Z-machine revision; it is always between 1 and 8. We
++# had false matches (for instance, inbig5.ocp from the Omega TeX extension as
++# well as an occasional MP3 file), so we sanity-check the version number.
+ #
+-16	belong&0xfe00f0f0	0x3030	Infocom game data
+->0	ubyte			0	(false match)
+->0	ubyte			>0	(Z-machine %d,
+->>2	ubeshort		x	Release %d /
+->>18	string			>\0	Serial %.6s)
++# It might be possible to sanity-check the release number as well, as it seems
++# (at least in classic Infocom games) to always be a relatively small number,
++# always under 150 or so, but as this isn't rigorous, we'll wait on that until
++# it becomes clear that it's needed.
++#
++0	ubyte			>0
++>0	ubyte			<9
++>>16	belong&0xfe00f0f0	0x3030	Infocom game data
++>>>0	ubyte			x	(Z-machine %d,
++>>>>2	ubeshort		x	Release %d /
++>>>>18	string			>\0	Serial %.6s)
+ 
+ #------------------------------------------------------------------------------
+ # Glulx:  file(1) magic for Glulx binaries.

+ 35 - 0
debian/patches/119-magic-update-xwd.patch

@@ -0,0 +1,35 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description:
+ The XWD magic is too simple--it just matches a single big-endian long at the
+ beginning of the file. This patch implements a few other checks
+ (Closes: #511764).
+
+diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images
+--- file.orig/magic/Magdir/images	2009-03-21 09:20:04.000000000 +0000
++++ file/magic/Magdir/images	2009-03-21 09:34:29.000000000 +0000
+@@ -308,11 +308,20 @@
+ #   As described in /usr/X11R6/include/X11/XWDFile.h
+ #   used by the xwd program.
+ #   Bradford Castalia, idaeim, 1/01
+-4	belong	7			XWD X Window Dump image data
+->100	string	>\0			\b, "%s"
+->16	belong	x			\b, %dx
+->20	belong	x			\b%dx
+->12	belong	x			\b%d
++#   updated by Adam Buchbinder, 2/09
++# The following assumes version 7 of the format; the first long is the length
++# of the header, which is at least 25 4-byte longs, and the one at offset 8
++# is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
++# which is a maximum of 32.
++0	belong	>100
++>8	belong	<3
++>>12	belong	<33
++>>>4	belong	7			XWD X Window Dump image data
++!:mime	image/x-xwindowdump
++>>>>100	string	>\0			\b, "%s"
++>>>>16	belong	x			\b, %dx
++>>>>20	belong	x			\b%dx
++>>>>12	belong	x			\b%d
+ 
+ # PDS - Planetary Data System
+ #   These files use Parameter Value Language in the header section.

+ 18 - 0
debian/patches/121-magic-update-utf.patch

@@ -0,0 +1,18 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description:
+ UTF-32BE text is detected by the presence of the Byte Order Mark, in UTF-32BE
+ encoding. The stock version of the BOM is incorrect; it should read 00 00 FE
+ FF, according to the Unicode FAQ: http://unicode.org/faq/utf_bom.html#bom4
+ (Closes: #513526).
+
+diff -Naurp file.orig/magic/Magdir/unicode file/magic/Magdir/unicode
+--- file.orig/magic/Magdir/unicode	2009-03-21 09:20:03.000000000 +0000
++++ file/magic/Magdir/unicode	2009-03-21 17:02:09.000000000 +0000
+@@ -9,6 +9,6 @@
+ 0	string	+/v+			Unicode text, UTF-7
+ 0	string	+/v/			Unicode text, UTF-7
+ 0	string	\335\163\146\163	Unicode text, UTF-8-EBCDIC
+-0	string	\376\377\000\000	Unicode text, UTF-32, big-endian
++0	string	\000\000\376\377	Unicode text, UTF-32, big-endian
+ 0	string	\377\376\000\000	Unicode text, UTF-32, little-endian
+ 0	string	\016\376\377		Unicode text, SCSU (Standard Compression Scheme for Unicode)

+ 31 - 0
debian/patches/122-magic-update-spectrum.patch

@@ -0,0 +1,31 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description: Updating magic for spectrum tap files (Closes: #501589).
+
+diff -Naurp file.orig/magic/Magdir/spectrum file/magic/Magdir/spectrum
+--- file.orig/magic/Magdir/spectrum	2009-03-21 09:20:03.000000000 +0000
++++ file/magic/Magdir/spectrum	2009-03-21 17:24:09.000000000 +0000
+@@ -19,13 +19,17 @@
+ # Tape file. This assumes the .TAP starts with a Spectrum-format header,
+ # which nearly all will.
+ #
+-0       string          \023\000\000    Spectrum .TAP data
+->4      string          x               "%-10.10s"
+->3      byte            0               - BASIC program
+->3      byte            1               - number array
+->3      byte            2               - character array
+->3      byte            3               - memory block
+->>14    belong          0x001B0040      (screen)
++# Update: Sanity-check string contents to be printable.
++#  -Adam Buchbinder <adam.buchbinder@gmail.com>
++#
++0       string          \023\000\000
++>4      string          >\0
++>>4     string          <\177           Spectrum .TAP data "%-10.10s"
++>>>3    byte            0               - BASIC program
++>>>3    byte            1               - number array
++>>>3    byte            2               - character array
++>>>3    byte            3               - memory block
++>>>>14  belong          0x001B0040      (screen)
+ 
+ # The following three blocks are from pak21-spectrum@srcf.ucam.org
+ # TZX tape images

+ 8 - 8
debian/patches/215-magic-add-qdbm.patch

@@ -2,14 +2,14 @@ Author: Benoit Sibaud <bsibaud@april.org>
 Description: New magic for QDBM Quick Database Manager (Closes: #481717).
 
 diff -Naurp file.orig/magic/Magdir/database file/magic/Magdir/database
---- file.orig/magic/Magdir/database	2008-05-04 14:12:49.000000000 +0000
-+++ file/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
+--- file.orig/magic/Magdir/database	2009-05-03 00:07:11.000000000 +0000
++++ file/magic/Magdir/database	2009-05-03 08:21:15.000000000 +0000
+@@ -267,3 +267,8 @@
+ >40	lequad		x			\b, bnum=%lld
+ >48	lequad		x			\b, rnum=%lld
+ >56	lequad		x			\b, fsiz=%lld
 +
 +# 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
++0	string		\\[depot\\]\n\f		Quick Database Manager, little endian
++0	string		\\[DEPOT\\]\n\f		Quick Database Manager, big endian

+ 7 - 7
debian/patches/216-magic-add-tokyocabinet.patch

@@ -2,15 +2,15 @@ Author: Benoit Sibaud <bsibaud@april.org>
 Description: New magic for TokyoCabinet database (Closes: #481768).
 
 diff -Naurp file.orig/magic/Magdir/database file/magic/Magdir/database
---- file.orig/magic/Magdir/database	2008-05-21 09:07:49.000000000 +0000
-+++ file/magic/Magdir/database	2008-05-21 09:15:26.000000000 +0000
-@@ -247,3 +247,9 @@
+--- file.orig/magic/Magdir/database	2009-05-03 08:22:43.000000000 +0000
++++ file/magic/Magdir/database	2009-05-03 08:23:25.000000000 +0000
+@@ -272,3 +272,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
+ 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)
++0	string		ToKyO\ CaBiNeT\n	TokyoCabinet database
++>14	string		x			(version %s)

+ 41 - 0
debian/patches/221-magic-add-git.patch

@@ -0,0 +1,41 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description:
+ Add detection for git packs and indexes, making sure it doesn't clash with id
+ Software PACK files (Closes: #509942).
+
+diff -Naurp file.orig/magic/Magdir/games file/magic/Magdir/games
+--- file.orig/magic/Magdir/games	2009-03-21 09:20:03.000000000 +0000
++++ file/magic/Magdir/games	2009-03-21 17:13:30.000000000 +0000
+@@ -33,6 +33,7 @@
+ # Quake
+ 
+ 0       string  PACK    Quake I or II world or extension
++>8	lelong	>0	\b, %d entries
+ 
+ #0       string  -1\x0a  Quake I demo
+ #>30     string  x        version %.4s
+diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision
+--- file.orig/magic/Magdir/revision	2009-03-21 09:20:03.000000000 +0000
++++ file/magic/Magdir/revision	2009-03-21 17:13:30.000000000 +0000
+@@ -12,6 +12,21 @@
+ # From: Josh Triplett <josh@freedesktop.org>
+ 0	string	#\ v2\ git\ bundle\n	Git bundle
+ 
++# Type: Git pack
++# From: Adam Buchbinder <adam.buchbinder@gmail.com>
++# The actual magic is 'PACK', but that clashes with Doom/Quake packs. However,
++# those have a little-endian offset immediately following the magic 'PACK',
++# the first byte of which is never 0, while the first byte of the Git pack
++# version, since it's a tiny number stored in big-endian format, is always 0.
++0	string	PACK\0		Git pack
++>4	belong	>0		\b, version %d
++>>8	belong	>0		\b, %d objects
++
++# Type: Git pack index
++# From: Adam Buchbinder <adam.buchbinder@gmail.com>
++0	string	\377tOc		Git pack index
++>4	belong	=2		\b, version 2
++
+ # Type:	Mercurial bundles
+ # From:	Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
+ 0	string	HG10		Mercurial bundle,

+ 52 - 4
debian/patches/900-file-mgc.patch

@@ -2,8 +2,8 @@ Author: Daniel Baumann <daniel@debian.org>
 Description: Reverting upstream change of stopping to build plain magic file (Closes: #481247).
 
 diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
---- file.orig/magic/Makefile.am	2008-06-17 17:49:11.000000000 +0000
-+++ file/magic/Makefile.am	2008-07-15 13:49:08.000000000 +0000
+--- file.orig/magic/Makefile.am	2009-05-03 00:07:11.000000000 +0000
++++ file/magic/Makefile.am	2009-05-03 08:51:56.000000000 +0000
 @@ -4,7 +4,7 @@
  MAGIC_FRAGMENT_BASE = Magdir
  MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE)
@@ -13,7 +13,7 @@ diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
  
  EXTRA_DIST = Header Localstuff \
  $(MAGIC_FRAGMENT_DIR)/acorn \
-@@ -216,8 +216,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
+@@ -220,8 +220,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
  $(MAGIC_FRAGMENT_DIR)/zilog \
  $(MAGIC_FRAGMENT_DIR)/zyxel 
  
@@ -35,7 +35,7 @@ diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
  
  # FIXME: Build file natively as well so that it can be used to compile
  # the target's magic file
-@@ -229,6 +241,5 @@ FILE_COMPILE = $(top_builddir)/src/file
+@@ -233,6 +245,5 @@ FILE_COMPILE = $(top_builddir)/src/file
  FILE_COMPILE_DEP = $(FILE_COMPILE)
  endif
  
@@ -44,3 +44,51 @@ diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
 -	@mv $(MAGIC_FRAGMENT_BASE).mgc $@
 +${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW)
 +	$(FILE_COMPILE) -C -m $(RAW)
+diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in
+--- file.orig/magic/Makefile.in	2009-05-03 00:07:11.000000000 +0000
++++ file/magic/Makefile.in	2009-05-03 08:55:09.000000000 +0000
+@@ -170,7 +170,7 @@ top_srcdir = @top_srcdir@
+ #
+ MAGIC_FRAGMENT_BASE = Magdir
+ MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE)
+-pkgdata_DATA = magic.mgc
++pkgdata_DATA = magic.mgc magic
+ EXTRA_DIST = Header Localstuff \
+ $(MAGIC_FRAGMENT_DIR)/acorn \
+ $(MAGIC_FRAGMENT_DIR)/adi \
+@@ -385,8 +385,21 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
+ $(MAGIC_FRAGMENT_DIR)/zilog \
+ $(MAGIC_FRAGMENT_DIR)/zyxel 
+ 
++RAW = magic
+ MAGIC = magic.mgc
+-CLEANFILES = ${MAGIC}
++CLEANFILES = ${MAGIC} ${RAW}
++
++${RAW}: Header 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 >> $@
++
+ @IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file
+ 
+ # FIXME: Build file natively as well so that it can be used to compile
+@@ -582,10 +595,8 @@ uninstall-am: uninstall-pkgdataDATA
+ 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ 	uninstall uninstall-am uninstall-pkgdataDATA
+ 
+-
+-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
+-	$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR)
+-	@mv $(MAGIC_FRAGMENT_BASE).mgc $@
++${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) $(RAW)
++	$(FILE_COMPILE) -C -m $(RAW)
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:

+ 17 - 0
debian/patches/905-doc-manpages-typo.patch

@@ -0,0 +1,17 @@
+Author: Adam Buchbinder <adam.buchbinder@gmail.com>
+Description:
+ A spacing error causes a reference to the hexdump manpage to show up as
+ "hexdump(1,)" rather than "hexdump(1),"; this patch fixes it (Closes: #515761).
+
+diff -Naurp file.orig/doc/file.man file/doc/file.man
+--- file.orig/doc/file.man	2009-03-21 09:20:04.000000000 +0000
++++ file/doc/file.man	2009-03-21 16:57:49.000000000 +0000
+@@ -341,7 +341,7 @@ options.
+ .Xr magic __FSECTION__ ,
+ .Xr strings 1 ,
+ .Xr od 1 ,
+-.Xr hexdump 1,
++.Xr hexdump 1 ,
+ .Xr file 1posix
+ .Sh STANDARDS CONFORMANCE
+ This program is believed to exceed the System V Interface Definition

+ 6 - 0
debian/patches/series

@@ -16,6 +16,10 @@
 115-magic-update-ruby.patch
 116-magic-update-gimp.patch
 117-magic-update-wav.patch
+118-magic-update-z-machine.patch
+119-magic-update-xwd.patch
+121-magic-update-utf.patch
+122-magic-update-spectrum.patch
 200-magic-add-par2.patch
 201-magic-add-pe5.patch
 202-magic-add-pmenu.patch
@@ -37,9 +41,11 @@
 218-magic-add-scribus.patch
 219-magic-add-selinux.patch
 220-magic-add-bzr.patch
+221-magic-add-git.patch
 900-file-mgc.patch
 901-file-localmagic.patch
 902-file-make.patch
 903-file-hurd.patch
 904-doc-manpages.patch
+905-doc-manpages-typo.patch
 999-conglomeration.patch

+ 1 - 0
debian/rules

@@ -68,6 +68,7 @@ install: build
 
 	# Installing package
 	$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
+	mv debian/tmp/usr/share/misc debian/tmp/usr/share/file
 
 	install -D -m 0644 magic/magic.local debian/tmp/etc/magic
 	install -D -m 0644 magic/magic.local debian/tmp/etc/magic.mime