--- file-5.04.orig/debian/rules +++ file-5.04/debian/rules @@ -0,0 +1,128 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make +-include /usr/share/python/python.mk + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CROSS= --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) CC=$(DEB_HOST_GNU_TYPE)-gcc LD=$(DEB_HOST_GNU_TYPE)-ld +else + CROSS= --build=$(DEB_BUILD_GNU_TYPE) +endif + +# HOWMANY is the number of bytes looked at by file +CFLAGS += -DHOWMANY=0x18000 + +PYTHON_VERSIONS=$(shell pyversions -r debian/control) + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + rm -f config.guess config.sub + + [ ! -f Makefile ] || $(MAKE) clean + [ ! -f Makefile ] || $(MAKE) distclean + rm -rf python/build + + dh_clean + +config.status: configure patch + dh_testdir + +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif + + ./configure $(CROSS) --prefix=/usr --datadir=\$${prefix}/share --mandir=\$${prefix}/share/man --enable-fsect-man5 CFLAGS="$(CFLAGS)" + +build: build-stamp +build-stamp: config.status + dh_testdir + + $(MAKE) + + set -e; \ + for python in $(PYTHON_VERSIONS); \ + do \ + (cd python && $$python setup.py build_ext \ + -L$(CURDIR)/src/.libs); \ + done + set -e; \ + for python in $(PYTHON_VERSIONS); do \ + (cd python && $$python-dbg setup.py build_ext -L$(CURDIR)/src/.libs); \ + done + + touch build-stamp + + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # 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 + + set -e; \ + for python in $(PYTHON_VERSIONS); \ + do \ + (cd python && $$python setup.py install --no-compile \ + --root=$(CURDIR)/debian/python-magic $(py_setup_install_args)); \ + done + + set -e; \ + for python in $(PYTHON_VERSIONS); do \ + (cd python && $$python-dbg setup.py install --no-compile \ + --root=$(CURDIR)/debian/python-magic-dbg $(py_setup_install_args)); \ + done + find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f + find debian/python-*-dbg -depth -empty -exec rmdir {} \; + + # Installing additional headers + mkdir -p debian/libmagic-dev/usr/include/file + cp src/file.h src/patchlevel.h debian/libmagic-dev/usr/include/file + +binary: binary-arch + +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_bugfiles + dh_install --sourcedir=debian/tmp + dh_lintian + dh_link + dh_pysupport +ifeq (,$(findstring -i, $(DH_OPTIONS))) + dh_strip -Npython-magic -Npython-magic-dbg + DH_OPTIONS= dh_strip -ppython-magic --dbg-package=python-magic-dbg + + rm -rf debian/python-magic-dbg/usr/share/doc/python-magic-dbg + mkdir -p debian/python-magic-dbg/usr/share/doc + ln -s python-magic debian/python-magic-dbg/usr/share/doc/python-magic-dbg +endif + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + +.PHONY: clean build install binary binary-arch binary-indep --- file-5.04.orig/debian/libmagic1.bug-presubj +++ file-5.04/debian/libmagic1.bug-presubj @@ -0,0 +1,14 @@ +This bug will be filed against the package file. To avoid duplicate reports, +please make sure you have checked the BTS on that package. + +Please consider your severities. + +If you wish for a new filetype being recognized, this is a wishlist bug. +Most bugs reported against the file package are in this category. +If what file reports now is wildly wrong or misleading, a higher severity +may be appropriate. + +If file correctly reports the filetype, but you would like to receive +additional information about the file (such as the resolution of an image), +this is also wishlist. Please bear in mind that such requests will likely +be ignored when they are not accompanied by a patch. --- file-5.04.orig/debian/file.bug-control +++ file-5.04/debian/file.bug-control @@ -0,0 +1 @@ +Submit-As: file --- file-5.04.orig/debian/changelog +++ file-5.04/debian/changelog @@ -0,0 +1,1443 @@ +file (5.04-5+squeeze2) squeeze-security; urgency=high + + * Fix overeager detection of CDF file as Word documents + + -- Florian Weimer Sun, 04 Mar 2012 16:55:53 +0100 + +file (5.04-5+squeeze1) squeeze-security; urgency=high + + * Switch to the CDF parser from file 5.11. Fixes crashes detected by + CERT/CC BFF fuzzer. + * Keep old prefix "CDF V2" in file types. + + -- Florian Weimer Wed, 29 Feb 2012 20:05:56 +0100 + +file (5.04-5) unstable; urgency=low + + [ Daniel Baumann ] + * Adding patch from Adam Buchbinder to fix + false positives in Bio-Rad PIC detection (Closes: #589056). + * Adding patch from Adam Buchbinder to add + new magics for JFS filesystem images (Closes: #589067). + * Adding patch from Nahuel Greco to add new magics + for Erlang DETS files (Closes: #589723). + + [ Judit Foglszinger ] + * Adding myself to uploaders. + * Replacing dh_python with dh_pysupport in debian/rules (Closes: + #529351). + + -- Daniel Baumann Thu, 05 Aug 2010 17:06:03 +0200 + +file (5.04-4) unstable; urgency=low + + * Adding patch from Arnaud Giersch to fix that file does not always correctly report the + faulty command for core files (Closes: #422524, #427876). + * Adding patch from Adam Buchbinder to + update qemu magics (Closes: #451524). + * Adding patch from Ori Avtalion to fix a typo and + a formating issue in file manpage (Closes: #499754). + * Renumbering patches. + * Adding patch from Adam Buchbinder to add + new magic for datafork fonts (Closes: #291908). + * Adding patch from Adam Buchbinder to add + new magics for PDB files (Closes: #480829). + * Adding patch from Adam Buchbinder to + update PSF2 magics (Closes: #492035). + * Adding patch from Adam Buchbinder to add + new magics for Canon CRW and CR2 files (Closes: #516054). + * Adding patch from Richard Smith to update + Dyalog APL magics (Closes: #537893). + * Adding patch from Євгеній Мещеряков to add new + magic for GDSII (Closes: #576462). + * Adding patch from Frédéric Brière to add new + magics for Git index files (Closes: #583679). + + -- Daniel Baumann Tue, 13 Jul 2010 19:37:04 +0200 + +file (5.04-3) unstable; urgency=low + + * Adding patch to add new magic for DACT (Closes: #582945). + * Updating magic-add-dact.patch to append to compress instead of + archive magic files. + * Updating standards version to 3.9.0. + * Adding patch from Eloi Notario to update lzma + magics (Closes: #576950). + * Adding (empty) directory holding custom magics (Closes: #582944). + * Adding patch for consistent spelling of XZ compression (Closes: + #541087). + + -- Daniel Baumann Sun, 11 Jul 2010 02:41:19 +0200 + +file (5.04-2) unstable; urgency=low + + * Bumping versioned build-depends on debhelper because of dh_bugfiles + usage. + * Shortening package long-descriptions (Closes: #570817). + * Updating copyright file to current state of the art (Closes: + #573519). + * Sorting and wrapping build-depends. + * Sorting and wrapping depends. + * Sorting fields in control. + * Stopping to ship (partially outdated) plain text mime files, which + was always unsupported, the only supported interface still is using + the library. + * Adding README.Debian to file to tell users and package maintainers + on how to add their own magics. + * Dropping la files. + * Moving local magics stubs from file to libmagic1 where they actually + belong. + + -- Daniel Baumann Sat, 27 Mar 2010 11:55:37 +0100 + +file (5.04-1) unstable; urgency=low + + * Updating year in copyright file. + * Updating to standards 3.8.4. + * Merging upstream version 5.04. + * Removing magic-update-asf.patch, went upstream. + * Rediffing magic-update-awk.patch. + * Rediffing magic-update-bash.patch. + * Rediffing magic-update-tcsh.patch. + * Rediffing magic-update-linuxswap.patch. + * Removing magic-update-ruby.patch, went upstream. + * Removing magic-update-postscript-fonts.patch, went upstream. + * Rediffing magic-add-par2.patch. + * Rediffing magic-add-cromfs.patch. + * Rediffing magic-add-bacula.patch. + * Removing magic-add-ppc-swapfile.patch, went upstream. + * Rediffing file-mgc.patch. + * Removing file-hurd.patch, went upstream. + * Updating magic-add-freemind.patch for new upstream. + * Using debhhelper bug files rather than manual installing in rules + file. + * Renaming directory for storing local debian additions to more common + name. + + -- Daniel Baumann Mon, 01 Feb 2010 14:26:27 +0100 + +file (5.03-5) unstable; urgency=low + + * Adding explicit debian source version 1.0 until switch to 3.0. + * Updating setup.py calls in rules for python2.6 again, thanks to + Jakub Wilk (Closes: #555208). + + -- Daniel Baumann Sat, 19 Dec 2009 20:03:32 +0100 + +file (5.03-4) unstable; urgency=low + + * Adding README.source. + * Adding patch to add new magic for Lyx (Closes: #556194). + * Adding patch from Adam Buchbinder to add + new magic for bacula volumes (Closes: #556981). + * Adding patch from Adam Buchbinder to add + new magic for olympus orf files (Closes: #519305). + * Adding patch from Josh Triplett to add new + magic for gstreamer binary registry files (Closes: #559117). + * Adding patch from Daniel Novotny to add new + magic for MDMP crash report data files. + * Adding patch from Daniel Novotny to add update + magic for postscript fonts. + * Adding patch from Daniel Novotny to add new + magic for xfs dumps. + * Adding patch from Daniel Novotny to add new + magic for ppc swapfiles. + * Adding patch from Daniel Novotny to add new + magic for delta iso files. + * Adding patch from Daniel Novotny to add new + magic for delta rpm files. + * Adding patch from Alexander Danilov + to add new magic for AVCHD Clip Information files (Closes: #538847). + * Adding patch to add new magic for Chiasmus (Closes: #540368). + * Adding patch from Adam Buchbinder to + update magic for truetype collections (Closes: #545709). + * Adding patch from Joerg Friedrich + to add support for all flags from magic.h in python-magic (Closes: + #529354). + * Adding patch from Adam Buchbinder to add + new magic for HDR formats (Closes: #520416). + * Adding patch from Adam Buchbinder to add + new magic for Foveon X3F (Closes: #516800). + * Adding patch from Adam Buchbinder to add + new magic for Paint.NET images (Closes: #504779). + * Adding patch to add mime type for 7-zip files (Closes: #552742). + + -- Daniel Baumann Sat, 05 Dec 2009 19:04:48 +0100 + +file (5.03-3) unstable; urgency=low + + * Updating tgif magic, thanks to Hugo Graumann + (Closes: #549601). + * Enabling nut magic patch. + * Correcting wrong vcs-browser field. + * Updating setup.py calls in rules for python2.6, thanks to Piotr + Ozarowski (Closes: #555208). + + -- Daniel Baumann Tue, 10 Nov 2009 19:46:51 +0100 + +file (5.03-2) unstable; urgency=low + + * Adding patch from Adam Buchbinder to add + new magic for the NUT Container format (Closes: #528242). + * Adding patch from Alan Woodland to add new magic + for BLCR context files (Closes: #538407). + * Updating standards version to 3.8.3. + * Updating maintainer field. + * Updating vcs fields. + + -- Daniel Baumann Sun, 04 Oct 2009 11:28:34 +0200 + +file (5.03-1) unstable; urgency=high + + * Merging upstream version 5.03: + - Fixes more buffer overflows. + + -- Daniel Baumann Fri, 08 May 2009 23:07:54 +0200 + +file (5.02-1) unstable; urgency=high + + * Using correct rfc-2822 date formats in changelog. + * Merging upstream version 5.02: + - Fixes a buffer overflow. + + -- Daniel Baumann Tue, 05 May 2009 00:05:44 +0200 + +file (5.01-1) unstable; urgency=low + + * Adding patch from Adam Buchbinder to + fix false matches against Z-machine pattern (Closes: #499748). + * Adding patch from Adam Buchbinder to + improve XWD magic in order to not give false results on mp3 files + (Closes: #511764). + * Adding patch from Adam Buchbinder to fix + unescaped spaces in erlang magic (Closes: #514056). + * Updating UUID patches to cope with leading zeroes, thanks to Bjorn + Mork (Closes: #515019). + * Updating section for python-magic-dbg. + * Adding patch from Adam Buchbinder to fix + a spacing error in the manpage (Closes: #515761). + * Adding patch from Adam Buchbinder to + updated utf-8 big-endian magic (Closes: #513526). + * Adding patch from Adam Buchbinder to add + new magic for git packs and indexes (Closes: #509942). + * Adding patch from Adam Buchbinder to + update magic for spectrum tap files (Closes: #501589). + * Merging upstream version 5.01. + * Removing magic-update-erlang.patch, went upstream. + * Rediffing magic-add-qdbm.patch. + * Rediffing magic-add-tokyocabinet.patch. + * Manually renaming magic directory in rules to correct name. + * Updating file-mgc.patch for file 5, produces raw magics again now + (Closes: #522433). + + -- Daniel Baumann Sun, 03 May 2009 11:02:00 +0200 + +file (5.00-1) unstable; urgency=low + + * Merging upstream version 5.00 (Closes: #520532). + * Using quilt rather than dpatch. + * Updating years in copyright file. + * Reordering rules file. + * Stopping to rebootstrap autofoo, it is not needed anymore. + * Updating to standards version 3.8.1. + * Updating conglomeration.patch. + + -- Daniel Baumann Sat, 21 Mar 2009 09:59:00 +0100 + +file (4.26-2) unstable; urgency=medium + + * Using patch-stamp rather than patch in rules file. + * Replacing obsolete dh_clean -k with dh_prep. + * Adding patch from Toeroek Edwin to update llvm magics + (Closes: #505805). + * Adding patch to add mime entries for ruby (Closes: #502201). + * Adding patch from Ori Avtalion to update gimp magics + (Closes: #501200). + * Corrected spelling of 'ScummVM' in magic-add-scummvm.dpatch. + * Adding patch from Adam Buchbinder to update wav + magics (Closes: #508174). + + -- Daniel Baumann Tue, 09 Dec 2008 13:28:00 +0100 + +file (4.26-1) unstable; urgency=low + + * Updating vcs fields in control file. + * Merging upstream version 4.26. + * Rediffing 903-file-localmagic.dpatch. + + -- Daniel Baumann Mon, 08 Sep 2008 13:57:00 +0200 + +file (4.25-1) unstable; urgency=low + + * Adding patch from Russell Coker to add volume label + and UUID support for linux ext (Closes: #489865). + * Adding patch from Russell Coker to add volume label + and UUID support for linux swap (Closes: #489865). + * Adding patch from Eric Cooper to update ocaml magics + (Closes: #488992). + * Removing 907-file-funcs.dpatch, went upstream. + * Removing 905-file-printf.dpatch, went upstream. + * Updating 903-file-localmagic.dpatch for 4.25. + * Updating 901-file-mgc.dpatch for 4.25. + * Updating 338-magic-add-cromfs.dpatch for 4.25. + * Updating 325-magic-add-sgf.dpatch for 4.25. + * Updating 321-magic-add-pe5.dpatch for 4.25. + * Updating 212-magic-update-pfm.dpatch for 4.25. + * Updating 211-magic-update-mono.dpatch for 4.25. + * Updating 206-magic-update-bash.dpatch for 4.25. + * Updating 205-magic-update-tcsh.dpatch for 4.25. + * Removing 201-magic-update-mp3.dpatch, went upstream. + * Merging upstream version 4.25. + + -- Daniel Baumann Tue, 15 Jul 2008 16:26:00 +0200 + +file (4.24-4) unstable; urgency=high + + * Adding patch from Jelmer Vernooij to add new + magics for bzr (Closes: #488742). + * Adding symlinks to /usr/share/misc to conform to the LSB, thanks to + Matthias Klose . + * Adding zlibg1-dev to libmagic-dev depends (Closes: #472856). + * Adding patch to revert upstream change to stop build plain magic + files. This fixes #481247 correctly now (Closes: #481247). + * Reverting previous wrong NMU. + + -- Daniel Baumann Tue, 01 Jul 2008 18:46:00 +0200 + +file (4.24-3.1) unstable; urgency=low + + * Non-maintainer upload from the Cambridge BSP. + * Work around bug #488562, that file assumes readdir() will return sorted + names - instead of compiling magic.mgc from Magdir directly, use the logic + already in debian/rules to build (the file that will become) + /usr/share/file/magic, then compile magic.mgc from that. (Closes: #481247) + + -- Simon McVittie Sun, 29 Jun 2008 19:32:24 +0000 + +file (4.24-3) unstable; urgency=medium + + * Rewriting copyright file in machine-interpretable format. + * Updating package to debhelper 7. + * Adding patch to update pfm magic. + * Adding patch to update mono magic. + * Adding patch to update Digifax magic. + * Adding patch to update OS/2 REXX magic. + * Adding patch to update real media magic. + * Adding patch to update zip magic. + * Updating bash magic to also look for /usr/bin/bash. + * Updating tcsh magic to also look for /usr/bin/tcsh. + * Adding patch from Russell Coker to add new magic for + selinux (Closes: #485886). + * Updating to standards 3.8.0. + * Adding patch to add mime for asf magics (Closes: #483797). + * Adding patch from Werner Fink to add new magic for scribus. + * Adding patch from Werner Fink to update reiserfs magic also + detecting ReiserFS V3.6.19. + * Adding patch from Werner Fink to add new magic for CROM + filesystem. + * Adding patch from Werner Fink to update (and re-enabled) + awk magic. + * Adding patch from Werner Fink to fix regressions with mp3 + files (Closes: #480683, #481377). + * Adding patch for new TokyoCabinet database magic, thanks Benoit Sibaud + (Closes: #481768). + * Adding patch for new QDBM Quick Database Manager magic, thanks Benoit Sibaud + (Closes: #481717). + * Fixing regression in file 4.24 with file_printf(), thanks Martin Dorey + (Closes: #481523). + * Removing annoying warnings when files can't be opened, thanks Martin Dorey + (Closes: #481512). + * Adding new magic for freemind, thanks to Jamie Thompson + (Closes: #472385). + + -- Daniel Baumann Thu, 26 Jun 2008 16:06:00 +0200 + +file (4.24-2) unstable; urgency=medium + + * Adding plain magic files for compatibility. + * Using lintian debhelper to install lintian overrides. + * Removing watch file. + * Removing useless whitespaces in changelog file. + * Adding vcs fields in control file. + * Upgrading package to debhelper 6. + + -- Daniel Baumann Sat, 03 May 2008 14:09:00 +0200 + +file (4.24-1) experimental; urgency=low + + * New upstream release: + - The following patches went upstream completely: + 102-magic-remove-bennet, 103-magic-remove-bzip, 104-magic-remove-cgm, + 105-magic-remove-com, 106-magic-remove-emf, 108-magic-remove-quicktime, + 201-magic-update-avi, 203-magic-update-cow, 204-magic-update-cracklib, + 206-magic-update-elf-b, 207-magic-update-elf-c, 208-magic-update-hp, + 209-magic-update-jpeg, 210-magic-update-m4v, 211-magic-update-macintosh, + 213-magic-update-pcp, 214-magic-update-perl, 215-magic-update-sh, + 216-magic-update-spectrum, 301-magic-add-adf, 302-magic-add-apple2, + 303-magic-add-arm, 304-magic-add-avg, 305-magic-add-clarion, + 306-magic-add-dds, 307-magic-add-erlang, 308-magic-add-gedcom, + 309-magic-add-git, 309-magic-add-inform, 310-magic-add-llvm, + 311-magic-add-lua, 312-magic-add-luks, 313-magic-add-lzma, + 314-magic-add-mathcad, 315-magic-add-mdi, 316-magic-add-mercurial, + 317-magic-add-mozilla, 318-magic-add-nlm, and 332-magic-add-svg, + 901-file-elf, 902-file-kfreebsd, and 905-file-segfault. + - The following patches went upstream almost completely: + 998-doc-manpages and 999-conglomeration. + - Thanks to Reuben Thomas to merge them. + + -- Daniel Baumann Tue, 01 Apr 2008 11:30:00 +0200 + +file (4.23-2) unstable; urgency=low + + * Applied patch from Neil Williams to add crossbuild + support to debian/rules (Closes: #465111). + + -- Daniel Baumann Sun, 10 Feb 2008 20:16:00 +0100 + +file (4.23-1) unstable; urgency=low + + * New upstream release: + - Removing '101-magic-remove-awk.dpatch', went upstream. + - Removing '107-magic-remove-msi.dpatch', went upstream. + - Removing '202-magic-update-blender.dpatch', went upstream. + - Removing '205-magic-update-elf-a.dpatch', went upstream. + - Removing '212-magic-update-os2rexx.dpatch', went upstream. + - Removing '319-magic-add-ocfs.dpatch', went upstream. + + -- Daniel Baumann Sat, 12 Jan 2008 17:23:00 +0100 + +file (4.21-4) unstable; urgency=low + + * Bumping to new policy. + * Using new homepage field in control. + * Using ${binary:Version} in all depends. + * Added patch from Josh Triplett to add new magic for + Mozilla XUL fastload files (XUL.mfasl and XPC.mfasl; Closes: #452354). + * Added patch from Seo Sanghyeon to add new + magic for Mercurial bundles (Closes: #451067). + * Correct wrong applied patch for SNES sound files (Closes: #410847). + * Added patch from Mathias Brodala to add new magic for + X11 cursor files (Closes: #451246). + + -- Daniel Baumann Sun, 23 Dec 2007 18:09:00 +0100 + +file (4.21-3) unstable; urgency=low + + * Including extra headers in /usr/include/file (Closes: #397307). + * Added patch from Eduardo Sabbatella to + add magic for SGF Smart Game Format (Closes: #428605). + * Added patch from Josh Triplett to add magic for git + bundles (Closes: #430070). + * Added patch from Mathieu Malaterre to extend + JPEG 2000 magic (Closes: #439005). + * Added patch from Daniele Sempione to add magic for + Microsoft Document Imaging Format (.mdi) (Closes: #430548). + * Added patch from Nicolas Collignon to add magics + for OpenSSH and OpenSSL certificates/key files (Closes: #439537). + + -- Daniel Baumann Sun, 26 Aug 2007 09:51:00 +0200 + +file (4.21-2) unstable; urgency=low + + * Applied patch from Michael Casadevall to fix + FTBFS on hurd (Closes: #433716). + + -- Daniel Baumann Thu, 19 Jul 2007 08:27:00 +0200 + +file (4.21-1) unstable; urgency=low + + * New upstream release. + * Rediffed 211-magic-update-os2rexx.dpatch. + * Removed 302-magic-add-ape.dpatch, went upstream. + * Rediffed 304-magic-add-arm.dpatch. + * Rediffed 317-magic-add-ocfs.dpatch. + * Rediffed 318-magic-add-par2.dpatch. + * Rediffed 322-magic-add-scummvm.dpatch. + * Rediffed 325-magic-add-subversion.dpatch. + * Rediffed 326-magic-add-supercollider.dpatch. + * Rediffed 328-magic-add-xen.dpatch. + * Removed 999-upstream-reg-startend.dpatch, now included in upstream. + * Updated 905-file-segfault.dpatch. + * Rediffed 999-conglomeration.dpatch. + + -- Daniel Baumann Fri, 01 Jun 2007 20:29:00 +0200 + +file (4.20-8) unstable; urgency=low + + * Build a python-magic-dbg package. + + -- Daniel Baumann Thu, 17 May 2007 20:40:00 +0200 + +file (4.20-7) unstable; urgency=medium + + * Replacing work around patch from Ubuntu with proper fix from + Werner Fink of OpenSuse (CVE-2007-2026). + + -- Daniel Baumann Thu, 17 May 2007 19:57:00 +0200 + +file (4.20-6) unstable; urgency=medium + + * Fixed clean: target in rule (Closes: #424269). + * Added patch from Anthon van der Neut to add magic for LUKS + (Closes: #394246). + * Added patch from Jelmer Vernooij to add magic for + Power-Tab. + * Added patch from Sven Anders to fix a segfault with -c. + * Added patch from Kees Cook to work around regex DoS + (CVE-2007-2026) by disabling the respective magic. + * Added patch from Noel Torres to add magic + for SVG (Closes: #417331). + * Added patch from Josh Triplett to add magic for + Mathcad documents (Closes: #421426). + * Added patch from Matthias Urlichs to update elf magic + with missing elf architectures (Closes: #424859). + * Added patch from Josef Spillner <2005@kuarepoti-dju.net> to update magic + for HFS+ partition table detection (Closes: #405313). + + -- Daniel Baumann Thu, 17 May 2007 18:15:00 +0200 + +file (4.20-5) unstable; urgency=low + + * Added patch from Ralph Amissah to update magic for + SiSU Markup Language. + * Added patch from Josh Triplett to disable magic for + Bennet Yee's face format (Closes: #420855). + * Updated copyright file (Closes: #398453). + + -- Daniel Baumann Thu, 26 Apr 2007 08:13:00 +0200 + +file (4.20-4) unstable; urgency=low + + * Rediffed some patches, now having always the same format of adding new + magics. + * Added patch from Ralph Amissah to add magic for + SiSU Markup Language. + * Added patch from Radek Vokal to add magic for + Xen saved domains. + * Added patch from Radek Vokal to add magic for + Apple Emulator 2IMG format. + * Added patch from Aaron Botsis to add magic for + Oracle Clustered Filesytem. + * Added patch from Werner Fink to update pcp magics. + * Added patch from Mads Martin Joergensen to add magic for + NetWare Loadable Modules (NLMs). + * Added patch from Reuben Thomas to add magic for + Inform interactive fiction language (Closes: #394522). + * Added patch to add magic for Erlang BEAM and JAM files (Closes: #388356). + * Added patch from David Newgas to add magic for + AVG vault files (Closes: #381053). + * Added patch from root to add magic for detecting + H.264 video in AVI files (Closes: #347263). + * Added patch from Seo Sanghyeon to update + lua magic with Lua bytecode (Closes: #335036). + * Added patch from Daniel van Eeden to add magic for + PAR2 archive files (Closes: #294070). + * Added patch from Mario Lang to add magic for + SuperCollider 3 Synth Definition File Format (Closes: #284803). + * Added patch from Russell Coker to add magic for + Adaptive Multi-Rate Codec files (Closes: #279322). + * Added patch from Phil Endecott to add magic for + GEDCOME genealogical data files (Closes: #277339). + * Added patch from Nicolas François to + fix wrong formating in manpage (Closes: #417511). + + -- Daniel Baumann Tue, 03 Apr 2007 14:25:00 +0200 + +file (4.20-3) unstable; urgency=low + + * Added patch from Josh Triplett to add magic for + SNES SPC700 sound files (Closes: #410847). + * Added patch from Reuben Thomas to add magic for the + Lua scripting language (Closes: #394524). + * Added patch from Nigel McNie to detect m4v files as m4v + instead of mp4 (Closes: #384018). + * Added patch from Mark Hindley to update + sh scripts identifier (Closes: #368613). + * Added patch from Robert Millan to add magic for the + LZMA compression format (Closes: #364260). + * Added patch from Simon Horman to add magic for the + Ulead Photo Explorer5 image format (Closes: #339397). + * Added patch from Robert Millan to add magic for the + Monkey's audio format (Closes: #334862). + * Added patch from Josh Babcock to updated magic for + Blender (Closes: #323291). + * Added patch from Matthew Palmer to update magic for + COW from 2.0 to 3.0 (Closes: #283515, #319128). + * Added patch from Robert Millan to add magic for the + OpenRISC binary format (Closes: #316076). + * Added patch from Philip Kendall to update the + spectrum magics (Closes: #296202). + * Added patch from Al Stone to add magic for the + LLVM byte-codes (Closes: #293427). + * Added patch from Julien Blache to add magic for + Clarion files (Closes: #282680). + * Added patch from Sven Hartge to add magic for + scummVM savegame files (Closes: #263488). + * Added patch from Nicolas Chauvat to add magic + for CGNS Advnaced Data Format files (Closes: #242644). + * Added patch from Edward Betts to add magic for + pmenu (Closes: #38543). + + -- Daniel Baumann Tue, 27 Mar 2007 17:51:00 +0100 + +file (4.20-2) unstable; urgency=low + + * New maintainer (Closes: #416263). + * Redone debian directory. + + -- Daniel Baumann Tue, 27 Mar 2007 13:28:00 +0100 + +file (4.20-1) unstable; urgency=high + + * New upstream version + - Fixes supposed vulnerability in the file_fprintf in funcs.c + (closes: #415362 and justifies urgency) + - MPEG ADTS signedness fixed (closes: #392009) + - Better TeX/LaTeX magic (closes: #402062) + - Better XML mimetype magic (closes: #345834) + - More linespacing in manpage (closes: #402058) + * Revert URL in copyright file (see #406820), as the old one is supposed to + be correct, even if it disappeared temporarily. + * Fixed typo in manpage (closes: #394514) + * Make Perl script entries consistent (closes: #394523) + * Disable second MS Installer entry (closes: #409895) + * Disable one-byte magic for COM (closes: #393775, #339618) + * audio/midi mimetype (closes: #401839) + * Enable gzip mimetype magic (closes: #324889) + * Disabled some QuickTime entries (ASCII words, closes: #366986, #308394) + + -- Michael Piefel Mon, 19 Mar 2007 14:55:46 +0100 + +file (4.19-1) unstable; urgency=low + + * New upstream version. + * Use correct new URL to upstream now (closes: #406820) + + -- Michael Piefel Fri, 19 Jan 2007 16:03:27 +0100 + +file (4.17-5) unstable; urgency=high + + * Initialize some previously uninitialized memory, this could lead to a + segmentation fault when using magic_compile in libmagic (closes: #403085) + + -- Michael Piefel Fri, 15 Dec 2006 13:36:12 +0100 + +file (4.17-4) unstable; urgency=medium + + * Add proper depends for python-magic (fixes not yet filed serious bug) + + -- Michael Piefel Tue, 26 Sep 2006 14:01:00 +0200 + +file (4.17-3) unstable; urgency=low + + * Add example /etc/magic.mime and document the fact that file only look for + a magic.mime file if the base magic file exists (closes: #382057) + * Remove AWK detection by regular expression testing just for ‘BEGIN:’; + this caused a lot of false guesses (and problems with naughty programs + reading other programs’ files), this closes: #308305, #375403 and makes + others disappear (for the time being, for example, it closes: #375722) + * Added Python 2.5 byte-compiled (closes: #376711) + * Fix some bad MIME types (closes: #379042, thanks to Moritz Naumann) + + -- Michael Piefel Mon, 14 Aug 2006 15:28:25 +0200 + +file (4.17-2) unstable; urgency=low + + * Using new python infrastructure now: python2.3-magic and python2.4-magic + dropped in favour of python-magic containing all versions + * Identify Mono assemblies (closes: #314756) + + -- Michael Piefel Wed, 14 Jun 2006 11:39:15 +0200 + +file (4.17-1) unstable; urgency=low + + * New upstream (closes: #343648) + * Improved over-confident 64bit-cracklib rule (closes: #343504) + * Revert ELF file-reading (by Alessandro Rubini, closes: #345089) + * Detect GNU/kFreeBSD binaries (by Robert Millan, closes: #307475) + + -- Michael Piefel Wed, 15 Mar 2006 10:25:06 +0100 + +file (4.15-2) unstable; urgency=low + + * Add Build-Depends to python, although I really don’t see the point of the + python package (since file Build-Depended transitively on python2.3 + anyway), which claims to be a dependency package only (closes: #333859) + * Disabled EMF detection as it not only caused false positives, which might + have been acceptible, but a segmentation fault (closes: #333502) + * Move the magic databases from /usr/share/misc/file to /usr/share/file; + this still violates the FHS in letter, but not in spirit; this is + different from the position in other distros (closes: #215139, #278478) + + -- Michael Piefel Fri, 14 Oct 2005 16:01:54 +0200 + +file (4.15-1) unstable; urgency=low + + * New upstream, closes: #305914 + - Maya with string version (closes: #246962) + - added ESRI Shapefile format (closes: #277552) + - added Adlib tunes (closes: #317192) + - many more magic additions, probably closing some bugs as well + - magic files can now contain regular expressions + * Fix manpage typo (closes: #323539) + * Mention possibly unexpected behaviour of -k in man page (closes: #259193) + * ELF machine 21 can be PowerPC64 (closes: #299620) + * Remove gzip/bzip2-detection for Debian packages (closes: #328623) + * Updated HP 38/39/40/48/49 magic (closes: #326680) + * Disabled BZIP detection (closes: #277648) + * Enabled the python bindings (Martin von Löwis, closes: #325073) + + -- Michael Piefel Wed, 12 Oct 2005 10:35:17 +0200 + +file (4.12-1) unstable; urgency=high + + * New upstream version. Closes: #283316, a potential stack smash in ELF + header parsing. Urgency set to high. + * /etc/magic is read, as it should (Closes: #279324) + * No further changes to increase the slim chance of getting into Sarge. + + -- Michael Piefel Mon, 06 Dec 2004 10:42:47 +0100 + +file (4.10-3) unstable; urgency=high + + * The “for the love of Branden” release. + * Urgency high in a vain attempt to get this into sarge. + * Fix MIME detection for 3DS (actually, remove it because it was hilarious, + closes: #216368) + * Do _not_ depend on gcc-3.4 + + -- Michael Piefel Fri, 30 Jul 2004 11:14:48 +0200 + +file (4.10-2) unstable; urgency=medium + + * Fix multibyte vs. byte issue in files-from (closes: #261799) + + -- Michael Piefel Wed, 28 Jul 2004 11:40:53 +0200 + +file (4.10-1) unstable; urgency=low + + * New upstream version. + - No more doubling of file names with -z (closes: #260393) + * New magic for SLL16 (closes: #249190) + * New magic for SVN dumps (closes: #256652) + * Patch for error return code on non-existant files + (courtesy of Federico Grau, closes: #257805) + + -- Michael Piefel Mon, 26 Jul 2004 12:58:40 +0200 + +file (4.09-1) unstable; urgency=low + + * New upstream version. This includes almost every patch that the Debian + version had, so this package is very close to upstream's. + * Disable some more Apple magic (closes: #231476); curiously, most of the + Apple magic is very weak. + * Disable very weak Assembler magic (closes: #223328) + * Disable weak AWK magic (closes: #223282) + * Added DjVu magic (closes: #238570) + * Removed erroneous 5th column in magic.mime (closes: #246428) + * Better error report messages in two places (closes: #243446, #252951) + * Use /etc/magic again (failed to touch Makefile.in, closes: #231306) + + -- Michael Piefel Fri, 11 Jun 2004 14:35:30 +0200 + +file (4.07-2) unstable; urgency=low + + * Move the "debian-additions" magic file back in; it got lost + * Move up "compress" in the list to test for gzip before FLI; this + closes: #228391 - but what happens if I have a real FLI file that + starts with the two gzip magic bytes? + * Replace the really bad magic for MP3 in magic.mime with the one found + in "animation" (closes: #227625) + + -- Michael Piefel Tue, 20 Jan 2004 11:57:47 +0100 + +file (4.07-1) unstable; urgency=low + + * New upstream + * do not loop endlessly when encountering zero-length section offsets in ELF + headers (closes: #226289) + + -- Michael Piefel Wed, 14 Jan 2004 10:54:32 +0100 + +file (4.06-2) unstable; urgency=low + + * Unified HTML detection for normal and mime; handles the main complaint of + #223340, but not all of it. + * Added Hangul Word Processor File (closes: #219867) + * Added Outlook personal folder (closes: #183764) + * Added Mobipocket e-book (closes: #222855) + * Added BIOS ROM dumps (closes: #150880) + * Added some Doom and Quake (closes: #135671) + * Added Sun/Cobalt boot ROMs (closes: #216867) + * Made VMware magic more robust and (hopefully) correct (closes: #219037); + file used to report nothing at all, due to an empty description string and + heavy reliance on the subtype (which didn't match) + + -- Michael Piefel Fri, 12 Dec 2003 13:25:34 +0100 + +file (4.06-1) unstable; urgency=low + + * New upstream. + - Return error for non-existant files (closes: #215801) + - Adds BitTorrent (closes: #201301) + * Fix minor AAC typo (closes: #215052) + * More QuickTime subformats (closes: #198809) + * Rearrange Flac detection (closes: #213693) + * Improved CAB detection (closes: #208926, #205431) + * Added Netscape Bookmarks (closes: #207344) + * Added DACT (closes: #195882) + * Added GCC precompiled headers (closes: #204304) + * Added GEOS (closes: #162852) + * Added HVQM4 (Still counting, Mark? Closes: #151138) + + -- Michael Piefel Fri, 17 Oct 2003 12:40:54 +0200 + +file (4.04-1) unstable; urgency=low + + * New upstream + * add MAXPATHLEN to apprentice.c in order to make it build on the + Hurd (closes: #212215) + * add TFMX (closes: #151217, as the rest was already there) + * recognize PO files (closes: #138423) + + -- Michael Piefel Tue, 23 Sep 2003 17:06:48 +0200 + +file (4.03-3) unstable; urgency=low + + * more and better magic: + - added Python 2.3 byte-compiled + - corrected magic for HFS+ (closes: #207576) + - fixed XML magic and added to MIME magic (closes: #186613) + - added Xbox magic (closes: #183432) + - remove ", English" from MIME type output (closes: #160415) + - remove the vain attempts to guess the size of JPEG files as they are + either wrong or confusing (sort of closes: #74938, #153833, #198053) + - add Gnumeric magic to both normal and MIME magic; note you still have to + pass -z to file (closes: #205708, #206756) + - remove compresse MIME types (related to #170981) + - add ACE archiver (closes: #178807) + * add more descriptive message for unreadable files (closes: #203168) + * rearranges header inclusions so that configuration is the same in all + compiled files (closes: #208785) + * fix the long-standing crash-on-compressed bug (closes: #197442, #207458) + + -- Michael Piefel Fri, 05 Sep 2003 11:59:54 +0200 + +file (4.03-2) unstable; urgency=low + + * Compressed Flash (closes: #179640), also for MIME (closes: #186946) + * Added GPG (closes: #197646) and JFFS2 (closes: #188780); + accidentally also closes: #203158 (debian-additions not empty anymore) + + -- Michael Piefel Tue, 29 Jul 2003 13:28:39 +0200 + +file (4.03-1) unstable; urgency=low + + * New upstream + - fixes Zsh bug (closes: #195583, #196163) + - incorporates many Debian changes to magic entries + - also closes: #196162 (no more Broken HTML) + * Reformatted ancient changelog entries and made sure changelog + is in UTF-8. + * File depends on correct library version now (closes: #194697) + * Recognizes more Magic Cookies (closes: #201301) + * Dynamically updates libtool (closes: #195330) + + -- Michael Piefel Sun, 27 Jul 2003 23:39:15 +0200 + +file (4.02-4) unstable; urgency=low + + * The "no closes:" release. + * Removed one last artifact of the raw-magic option. + * Adapt the very-short-file fix to the new environment. + + -- Michael Piefel Sat, 17 May 2003 20:01:17 +0200 + +file (4.02-3) unstable; urgency=low + + * Remove the nomgc symbol from the library (closes: #193355); this kind of + reopens #115573, but I am now sure that this is not a bug, document the + behaviour instead. + * Make HTML magic a little less picky (closes: #193296) + * Close files after looking at them (closes: #193580) + * Don't report bogus for unreadable files (closes: #193582) + + -- Michael Piefel Sat, 17 May 2003 18:01:27 +0200 + +file (4.02-2) unstable; urgency=low + + * Changed Priority of libmagic-dev to optional (closes: #193254) + * Add Conflicts of libmagic1 to older file (closes: #193236, #193238) + * Use newer libtool (closes: #193152) + + -- Michael Piefel Wed, 14 May 2003 13:47:47 +0200 + +file (4.02-1) unstable; urgency=low + + * New upstream version + * Acknowledge NMU, closes: #184204 + * Description length limit is down to 64 again. The easy way, setting it in + file.h, doesn't work anymore, and I've not yet found out why. + * Upstream has made a library out of the magic number recognition routines. + Consequently, split the package up into three binary packages, adding + libmagic1 and libmagic-dev. + * debian/rules: all new and shiny; better autotools supprt + * add some more magic: + - TI emulators skins (closes: #167267) + - Objective Caml (closes: #166830) + - ReBorn (closes: #156279) + - SE Linux policy database (closes: #159283) + - Flow Cytometry Standard (closes: #160984) + * remove some magic: + - Brian Postma's Soundmon Module (closes: #168661) + - LILO (closes: #160602) + * fixed some magic: + - XWD X Window Dump (closes: #164047, #81771) + * fix reference to magic man page in README (closes: #159992) + + -- Michael Piefel Sun, 11 May 2003 20:15:20 +0200 + +file (3.40-1.1) unstable; urgency=high + + * [readelf.c] Apply patch from upstream version 3.41 to fix buffer overflow + - CAN-2003-0102 + - http://www.idefense.com/advisory/03.04.03.txt + - Closes: #184204 + + -- Matt Zimmerman Thu, 03 Apr 2003 13:50:22 -0500 + +file (3.40-1) unstable; urgency=low + + * New upstream version (closes... no, this time I'm faster) + * Switched Maintainer and Uploaders field, thereby effectively taken over + the package after not having heard of the previous maintainer for about + a year (finally officially closes: #174338, which is already closed) + * No more whitespace on first line of debian/rules (closes: #164651) + * It seems this already was fixed, but using an addition to the additional + StuffIt magic now (closes: #170893) + * Added VRML (closes: #166955) + * Corrected unknown groff character names in magic(5) manpage (closes: #180056) + * Update TI Calculator Magic (closes: #162820) + * Make the ELF string extraction a little more robust (closes: #166832) + * Recognizes HTML even with whitespace (closes: #119193) + * Do not hang on rapidly growing archives with -z (closes: #162896) + * Remove CVS date from Ogg output, it is not very useful as version number + is printed anyway, and may cause trouble as it is not a real string, thus + breaking the output routine for LANG!=C (closes: #178479) + * Fix alignment of multifile output and wide characters + + -- Michael Piefel Sun, 16 Feb 2003 17:31:21 +0100 + +file (3.39-1) unstable; urgency=low + + * NMU + * New upstream version (closes: #148212, #151907) + - incorporates most Debian patches + - adds 9660 filesystem magic (closes: #157050; Upstream has + a different magic than reporter.) + - adds MNG magic (closes: #147264, see below) + - adds PHP magic (closes: #145929) + - detects UTF-8 and UTF-16 with BOM (closes: #102076) + - some short string magic commented out (closes: #134266) + * New Debian patches + - improved Linux kernel magic, make it like lilo (closes: #106898) + - changed BMP MIME type to x-ms-bmp (closes: #124234) + - added JNG magic (closes: #147264) + - added alternate ZIP magic (closes: #56292) + - added alternate StuffIt magic (closes: #114027) + - added/changed magic for Screamtracker (closes: #60009) + - added vCalendar magic (closes: #158338) + - added ZX spectrum magic (closes: #157162) + - added EST flat binary (closes: #139239), Aculab VoIP firmware + (closes: #138967), PPCBoot image (closes: #138958); thank you, Mark + - tried some magic for multiple master fonts (closes: #29685) + - removed some Mac magic (closes: #113733); this is not the + real fix (TM), but works for the particular problem + - removed some two-byte ASCII magic - too simple (closes: #144398) + - fixed some entries extracting strings (changed \n to \0) + - added new command line option -M which ignores compiled databases + (closes: #115573) + - give warning for one-byte files (magic is at least two bytes long, + closes: #95778, #117222) + * Move Debian magic additions all together in one spot to facilitate + patching and communication with upstream + + -- Michael Piefel Sun, 01 Sep 2002 13:13:15 +0200 + +file (3.37-3.1) unstable; urgency=low + + * NMU + * Removed regexp.patch and kleff, they didn't serve a purpose + * Bumped standards-version to 3.5. + * Added Kimwitu magic + * Improved MS Office magic (closes: #116693, #54960) + * Added XV thumb, ISDN vbox, KiSS (closes: #54391) + * Emacs 19 improved upstream (closes: #101336) + * Added long HtmlHelp magic (closes: #113876) + * Added webshots desktop (closes: #118517) + * Added newer Python magic (closes: #119572) + * Ogg magic improved upstream (closes: #91858) + * XFS cleaned up (closes: #129172) + * Targa reports size (closes: #133024) + * Documented arbitrary 50 character description limit and increased it + to 80 characters (closes: #12415) - the patch for unlimited length + doesn't work, at least not at advertised. + * Added Atari MSA (closes: #95040) + * TI-8x updated (closes: #102824) + * Better Swap (closes: #105504) + * Increased buffer size to 96K (closes: #105505) + * Better CRAMFS (closes: #115575) + * Added JFFS (closes: #118900) + * Added Hercules DASD image magic (closes: #122326) + * Added TDB magic (closes: #122328) + * Added Matlab (closes: #125666) + * Added Squeak images and (closes: #131627) + * Added User Mode COW magic (closes: #134619) + * Added even better Ogg magic and even include it (closes: #134663) + + -- Michael Piefel Mon, 04 Mar 2002 19:47:32 +0100 + +file (3.37-3) unstable; urgency=low + + * Implemented internal gzip support through the zlib library. It's much + faster than executing gzip and it works better. Many small files that + weren't properly handled now are. I've tested this with over 400 random + gzipped files and it works, but please, report any problem with this. + + -- Nicolás Lichtmaier Sun, 14 Oct 2001 05:56:19 -0300 + +file (3.37-2) unstable; urgency=low + + * The new sread function was sooo broken... I have now enhanced + it with the amazing capability of handling EOF. Now file -z + shouldn't hang (closes:Bug#115156). + + -- Nicolás Lichtmaier Thu, 11 Oct 2001 03:10:10 -0300 + +file (3.37-1) unstable; urgency=low + + * New upstream release: + * Recognizes mp3 files with IDv2 tags (closes:Bug#112829, Bug#96688). + * Adds magic for RRDtool databases (closes:Bug#114372). + * Weak magic for AppleWorks spreadsheet data was removed + (closes:Bug#110451,Bug#98447). + * Remove warning for not using a compiled magic version for /etc/magic. + I won't try to implement something to create a compiled version of + /etc/magic as: 1) This fle is empty by default and will have only a few + manually added entries, so there wouldn't be any speed gain; 2) It will + add complexity and it wouldn't be trivial. + * Added a note in magic2mime(1) deprecating its use. + * No longer recognizes sunclock's "vector map format" as PostScript + (closes:Bug#105930). + * Added magic for cramfs and reiserfs from russell@coker.com.au + (closes:Bug#105485, Bug#105508). + * Added two Palm file formats from + John Gruenenfelder (closes:Bug#104034). + + -- Nicolás Lichtmaier Mon, 08 Oct 2001 19:49:42 -0300 + +file (3.33-5) unstable; urgency=low + + * Added "Build-Depends: debhelper" (closes:Bug#86829). + * New magic for S/390 ELF binaries (closes:Bug#93491). + * Added support for large files (closes:Bug#93402). + * Fixed magic2mime to cope with the new charset detection + (closes:Bug#92931). + * Added -s option to short usage message (-h) (closes:Bug#85910). + * Added magic for Paint Shop Pro from + Telford Tendys (closes:Bug#85359). + * Removed minor PS version number from font detection magic, + suggested by Reinhard Kotucha + (closes:Bug#82667). + * Added magic for Flac audio (what's that? =) ) from + Matt Zimmerman (closes:Bug#91857). + * Added magic for newer LHA files (does someone still use lha? wow!) + from Paul Martin (closes:Bug#83454). + * Now shows which compressor a Debian package uses, + contributed by Ben Collins (closes:Bug#48389). + * Removed creation date report from Debian magic, it no longer works. + It seems that the gzipped members of the .deb file are no longer + created with the proper date. + * Added lots of Palm documents contributed by + Michael-John Turner (but replaced "document" with + "PalmOS document") (closes:Bug#87759). + * Added magic for Squish and JAM echomail/netmail Fidonet areas storage + formats contributed by peter@softwolves.pp.se (closes:Bug#90172). + + -- Nicolás Lichtmaier Sun, 06 May 2001 02:13:10 -0300 + +file (3.33-4) unstable; urgency=low + + * Modified Newton PDA package format magic so it doesn't match + Java source code files. + * When using -z, don't write the NUL terminator to the uncompressing + program. + * Ignore output from gzip (gzip should have an option to disable the + "unexpected end of file" error message) (closes:Bug#83317). + * Minor updates to debian/rules. + * Reordered description for MIPS object files to please weak parsing + in libtool (closes:Bug#83303). + + -- Nicolás Lichtmaier Tue, 30 Jan 2001 22:39:03 -0300 + +file (3.33-3) unstable; urgency=low + + * Code for detecting if an input stream is seekable assumed that lseek + returns 0 on success, which is untrue, and file was copying every ELF + file probed to a temporary file. Fixed (closes:Bug#82261). + Found by Colin Watson . + * Uses -g only if debug is in the DEB_BUILD_OPTIONS variable. + * Updated standards-version to 3.2.1. + + -- Nicolás Lichtmaier Mon, 15 Jan 2001 02:26:35 -0300 + +file (3.33-2) unstable; urgency=low + + * Added ELF magic for IBM AS/390 mainframe (closes:Bug#79575). + * Fix from Adam Heat for very small .gz files and -z, I've also + added NUL termination of the uncompressed buffer + (closes:Bug#16837,Bug#36724,Bug#37838). + * If the file is ELF and is not seekable, `file' will now copy + it to a temporary file because the ELF code needs to fseek + everywhere in the file. The idea was from Adam Heath . + (closes:Bug#28964,Bug#70629). + + -- Nicolás Lichtmaier Sun, 07 Jan 2001 23:38:58 -0300 + +file (3.33-1) unstable; urgency=low + + * New upstream release (closes:Bug#67970). Fixes: + * Recognizes Berkeley DB files (closes:Bug#18821). + * Tries to recognize EBCDIC encoded files (closes:Bug#31949). + * lif files recognized in LE systems (closes:Bug#78261). + * Contributions from Wolfram Kleff (closes:Bug#56667). + * Changed pgp armored data to pgp armored *text*. + * Added GEM image and metafile from. + * Added Vivo video format. + * Added STAD packed image. + * Added AFX compressed files. + * Added GFA-BASIC 3 data. + * Added ICE and X11 authority data. + * Added magic for DJGPP compiled files from Robert vd Boon + (closes:Bug#70600). + * Changed file for data here and there (closes:Bug#35851). + * Added Sketch document (closes:Bug#67511). + * Added SMJPEG (image format used in games) (closes:Bug#62224). + * Added magic for Sony PlayStation executables (closes:Bug#31310). + * Added other way of detecting perl scripts (closes:Bug#45426). + * Fixed detection of MP3 files with the new -i option. + * Adapted Debian patch to include long-options alternatives for the + new -k and -i options. Updated the manpage. + + -- Nicolás Lichtmaier Sun, 10 Dec 2000 19:02:07 -0300 + +file (3.28-1) unstable; urgency=low + + * New upstream release. Fixes: + * A serious attempt to detect JPEG is done now, but the + format seems to be not very magic friendly (closes:Bug#31950). + * DB2 magic added (closes:Bug#19097). + * Added another case combination for the detection of HTML files + (closes:Bug#45326). + * Improved newly added xml detection (eg: added XSL stylesheets detection). + * Some magic files weren't being included, modified Makefile.am. + The files now included are jpeg, grace, mcrypt, palm and spectrum. + + -- Nicolás Lichtmaier Tue, 28 Dec 1999 00:58:01 -0300 + +file (3.27-7) unstable; urgency=low + + * Added entry for recently announced new LSM file format. + * Removed README.Debian and folded it into the copyright file + (closes:Bug#53069). + + -- Nicolás Lichtmaier Fri, 24 Dec 1999 20:23:48 -0300 + +file (3.27-6) unstable; urgency=low + + * Applied patch with improvements to magi2mime + from J.H.M. Dassen (Ray) (closes:Bug#51399). + * Added some Windows magic from Pavel Machek + (closes:Bug#31023). + * Added magic for PCX, Adobe's PSD, MS Word, and replaced + magic for kernel detection with contributions from + Wolfram Kleff (closes:Bug#46781). + * Added magic for Linux kernel System.map files. + + -- Nicolás Lichtmaier Sun, 12 Dec 1999 17:09:08 -0300 + +file (3.27-5) unstable; urgency=low + + * Put docs and manpages under /usr/share. + * Updated `Standards-Version' to 3.1.0. + * Added contributed magic for `Smith Corona Personal Word Processors' + (closes:Bug#45704). + * Added magic for X-Post-it (closes:Bug#43031). + * Improved detection of MS-DOS batch files a bit (closes:Bug#50205). + + -- Nicolás Lichtmaier Mon, 15 Nov 1999 01:09:13 -0300 + +file (3.27-4) unstable; urgency=low + + * It was not reading /etc/magic. + * Updated manpage to say that local magic entries are read from + and should be written to /etc/magic. + + -- Nicolás Lichtmaier Sat, 10 Jul 1999 19:40:17 -0300 + +file (3.27-3) unstable; urgency=low + + * Added detection of SIDPlay audio files (closes: Bug#35564, Bug#35483). + * Added "#include " to compress.c (closes: Bug#37705). + * Fixed tiny typos in README (closes: Bug#38877). + * Added magic for Atari ST executables from Wolfram Kleff + . + * Added formats for some communications standards contributed by + W. Borgert (closes: Bug#34542, Bug#34779). + * Removed detection of format `Fasttracker "oktalyzer" module sound data'. + It was just 2 bytes at offset 0 and generated false positives + (closes: Bug#36704). + * Added detection of MPEG audio level 2.5 and improved messages for level + 3 (mp3) contributed by Wolfram Kleff + (closes: Bug#40733). + * Added audio/midi to magic2mime. + * Readded magic2mime to package. It was removed by mistake. + + -- Nicolás Lichtmaier Sat, 10 Jul 1999 03:11:45 -0300 + +file (3.27-2) unstable; urgency=low + + * Removed detection of unstriped binaries. Patch from + Sean Perry . Fixes bugs #38407, #38417, 38419. + * Added detection of NITF files from jrv@vanzandt.mv.com. + Fixes bug #38452. + * No longer includes Localstuff in /usr/share/misc/magic. Local + definitions should go to /etc/magic. + + -- Nicolás Lichtmaier Fri, 28 May 1999 00:39:32 -0300 + +file (3.27-1) unstable; urgency=low + + * New upstream release. Fixes bugs #36786, #30692, + #29353 (added shockwave/flash files). + * Removed detection of "OS/2 URL objects": too general. + * Truncates \n on output. file's outputs MUST be one line per file. + Fixes bugs #34439, #34290, #35222, #32305, #32302, #30875. + + -- Nicolás Lichtmaier Tue, 25 May 1999 21:50:13 -0300 + +file (3.26-2) frozen unstable; urgency=low + + * Moved x86 boot sector detection after linux kernel detection. + Fixes bug #24185. + * Added kernel version extraction for newer kernels. + * Removed `,' from GIF description's end. + * Changed version shown to 3.26-Debian, as this version is different from + upstream. + * Added manpage for magic2mime. + * Added more mime types for magic2mime and some fixes for the script. + * Switched to debhelper. + + -- Nicolás Lichtmaier Wed, 20 Jan 1999 02:08:24 -0300 + +file (3.26-1) frozen unstable; urgency=low + + * New upstream release. Upstream author included many Debian enhancements + and added some minor fixes. Fixes bug #30692. Bug #30875 was fixed in + previous NMU. + * Fixed autoconf use. + + -- Nicolás Lichtmaier Wed, 20 Jan 1999 03:15:45 +0000 + +file (3.24-4.2) frozen unstable; urgency=HIGH + + * NMU: + Fix critical bugs #31031 and #31057. + + -- Vincent Renardias Wed, 06 Jan 1999 01:51:15 +0100 + +file (3.24-4.1) frozen unstable; urgency=low + + * Non-maintainer release. + * Add patch so "\n"-style escapes work (closes:Bug#22854). + + -- Joel Klecker Sun, 13 Dec 1998 16:44:18 -0800 + +file (3.24-4) frozen unstable; urgency=low + + * Added `-f' to an rm that might obstaculize automatic builds, + fixes bug #19970. + * Removed very old Debian package detection that caused files starting + with 0.9 to show no description at all, fixes bugs #19657 and #19677. + + -- Nicolás Lichtmaier Sun, 22 Mar 1998 23:18:34 -0300 + +file (3.24-3) unstable; urgency=low + + * Small fix in online help. + * Changed `Standards-version' to 2.4.0.0 (no changes required). + * Moved /usr/share/magic to /usr/share/misc/magic, fixes bug #18639. + + -- Nicolás Lichtmaier Sun, 08 Mar 1998 14:28:45 -0300 + +file (3.24-2) unstable; urgency=low + + * Fixed upstream completely broken configure.in (wasn't showing special + files major & minor numbers). + * Included upsstream magic2mime in the binary package. + * Added more HTML tokns to names.h. + * Added lzop compressd files definition, contributed + by Paolo Molaro . + * Moved magic data to /usr/share/magic (not a conffile). /etc/magic will + be used for local magic definitions. + + -- Nicolás Lichtmaier Tue, 24 Feb 1998 21:21:59 -0300 + +file (3.24-1) unstable; urgency=low + + * names.h: Added HTML. + * New upstream release. + + -- Nicolás Lichtmaier Sat, 21 Feb 1998 00:47:11 -0300 + +file (3.23-1) unstable; urgency=low + + * Added long version for the new option `-b' (`--brief'). Added long + option to manpage. Added the option to the usge message (`--help'). + * Added GNU message catalog magic, contributed + by Santiago Vila Doncel , fixes bug #14743. + * Removed duplcated entry for romfs, fixes bug #13977. + * New upstream release, fixes bug #17830. + + -- Nicolás Lichtmaier Thu, 19 Feb 1998 00:12:32 -0300 + +file (3.20.1-8) unstable; urgency=low + + * Added magic for Octave contributed + by Dirk Eddelbuettel + * names.h: Added detectionn of Java source code. + * softmagic.c: When converting endianness only swap bytes if needed. + * Use %m instead of strerr. + * Added magic for WordPerfect files, contributed + by Scott K. Ellis . + + -- Nicolás Lichtmaier Fri, 10 Oct 1997 17:22:27 -0300 + +file (3.20.1-7) unstable; urgency=low + + * Changed maintainer address. + * Added filesystems and Linux86 magic, contributed + by Juan Cespedes , fixes #13279. + * Keep files' date. + * Added GIMP file formats, contributed + by Kenneth MacDonald . + + -- Nicolás Lichtmaier Wed, 09 Jul 1997 00:22:38 -0300 + +file (3.20.1-6) unstable; urgency=low + + * Minor changes to debian/rules. + * Modified manpage. + * Added `--help' option. + * Added magic data for vgetty voice formats (thanks to + David Engel ). + * Arguments to a printf casted to long long, fixes #10779. + + -- Nicolás Lichtmaier Mon, 23 Jun 1997 20:21:58 -0300 + +file (3.20.1-5) unstable; urgency=low + + * Added Linux kernel boot image version detection for new kernels. + * Removed `-Wall' warnings. + * Added "DEC SRC Virtual Paper: Lectern files" type, + contributed by Karl M. Hegbloom . + * Removed useless RCS ids. + * Corrected compilation flags. + * Don't try to keep file modification time, it changed file status change + time. And it's more natural a change in access time than in file status + change time. Fixes bug #7920. + * Minor fix to manpage. + + -- Nicolás Lichtmaier Wed, 18 Jun 1997 21:55:49 -0300 + +file (3.20.1-4) unstable; urgency=low + + * Built with libc6. + + -- Nicolás Lichtmaier Wed, 18 Jun 1997 00:09:58 -0300 + +file (3.20.1-3) unstable; urgency=low + + * Removed information about who created the /etc/magic file. + * Removed creation date from /etc/magic. This changed the md5sum of this + conffile every release. + * Man page updated. + * Added long options support. + + -- Nicolás Lichtmaier Tue, 11 Mar 1997 15:19:43 -0300 + +file (3.20.1-2) unstable; urgency=low + + * Improved MS applications' docuemts detection (#4473). + * Added Steve McIntyre's contributed formats (#6735). + * New upstream release has fixed bugs #5777 #5838 and #6656 . All + reporting that file didn't detect Java's .class. + * My name is Nicolás. Fixes #7238 (!). + + -- Nicolás Lichtmaier Wed, 12 Feb 1997 02:53:42 -0300 + +file (3.20.1-1) unstable; urgency=low + + * Added LSM files detection. + * Clarified header of /etc/magic. + * Added detection of creation time for .deb's. + * Added detection of 2.1.x kernels. + * Upstream fix to handle \n in arguments to string format broke + description that expected \n to end the string. Changed file + to discard \n's and following text at print time. + * Upstream changelog included. + * New upstream release + + -- Nicolás Lichtmaier Sun, 9 Feb 1997 23:41:39 -0300 + +file (3.19-7) unstable; urgency=low + + * Corrected section in control file. + * New maintainer. + + -- Nicolás Lichtmaier Sun, 9 Feb 1997 21:49:19 -0300 + +file (3.19-6) unstable; urgency=low + + * Added detection of pcap data files (like used by tcpdump) Peter Tobias + + * Removed signal detection from core files. Doesn't work for ELF binaries + Peter Tobias . + * Changed to new source format. + + -- Nicolás Lichtmaier Mon, 3 Feb 1997 20:11:00 -0300 + +file (3.19-5) + + * Change of maintainer and updated for multi-architecture build (fixes Bug #3332) + * Un-right-justified the description field + * Move entry for debian packages to the correct spot and update it for debian 2.0 packages (fixes Bug #3411) + * Add entry for TrueType fonts to Magdir/fonts + + -- Darren Stalder , Mon Jul 8 23:07:21 1996 + +file (3.19-4) + * added entry for Adobe Postscript PPD files in Magdir/ppd. + +file (3.19-3) + * added entry for linux kernal images to source file Magdir/linux + +file (3.19-2) + * add MAGIC=/etc/magic to make(1) invocation + * change maintainer email address + +file (3.19-1) + * added debian.* files + * modified Magdir/archive to add debian-split entry to ar archives + * modified magdir/elf to add more entry for core file --- file-5.04.orig/debian/file.README.Debian +++ file-5.04/debian/file.README.Debian @@ -0,0 +1,26 @@ +file for Debian +--------------- + +How users can inject their own magics for fun: + + 1. open /etc/magic and /etc/magic.mime with a text editor, as root, + and add your own magics. + + 2. have fun. + + +How package maintainers can inject their own magics for profit: + + 1. place your magics as plain text files in + /usr/share/file/${binary_package_name}. + + 2. call 'file --compile ${binary_package_name}' from /usr/share/file + in your postinst script (maybe we should have a trigger for that + at some point). this will produce the binary magics + /usr/share/file/${binary_package_name}.mgc. + + 3. remove the binary magics in your postrm script. + + 4. profit. + + -- Daniel Baumann Sat, 27 Mar 2010 11:22:58 +0100 --- file-5.04.orig/debian/file.docs +++ file-5.04/debian/file.docs @@ -0,0 +1 @@ +README --- file-5.04.orig/debian/pycompat +++ file-5.04/debian/pycompat @@ -0,0 +1 @@ +2 --- file-5.04.orig/debian/file.install +++ file-5.04/debian/file.install @@ -0,0 +1,2 @@ +/usr/bin +/usr/share/man/man1 --- file-5.04.orig/debian/libmagic1.install +++ file-5.04/debian/libmagic1.install @@ -0,0 +1,4 @@ +/etc +/usr/lib/*.so.* +/usr/share/file +/usr/share/man/man5 --- file-5.04.orig/debian/libmagic1.links +++ file-5.04/debian/libmagic1.links @@ -0,0 +1,2 @@ +/usr/share/file/magic.mgc /usr/share/misc/magic.mgc +/usr/share/file/magic /usr/share/misc/magic --- file-5.04.orig/debian/libmagic1.dirs +++ file-5.04/debian/libmagic1.dirs @@ -0,0 +1 @@ +/usr/share/file/magic --- file-5.04.orig/debian/copyright +++ file-5.04/debian/copyright @@ -0,0 +1,99 @@ +Upstream-Contact: Christos Zoulas +Upstream-Homepage: http://www.darwinsys.com/file/ +Maintainer-Contact: Daniel Baumann +Maintainer-Homepage: http://daniel.debian-maintainers.org/ + +Files: * +Copyright: + (C) 1985-1995 Ian F. Darwin + (C) 1994-2010 Christos Zoulas +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-2010 Daniel Baumann +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. --- file-5.04.orig/debian/file.bug-presubj +++ file-5.04/debian/file.bug-presubj @@ -0,0 +1,11 @@ +Please consider your severities. + +If you wish for a new filetype being recognized, this is a wishlist bug. +Most bugs reported against the file package are in this category. +If what file reports now is wildly wrong or misleading, a higher severity +may be appropriate. + +If file correctly reports the filetype, but you would like to receive +additional information about the file (such as the resolution of an image), +this is also wishlist. Please bear in mind that such requests will likely +be ignored when they are not accompanied by a patch. --- file-5.04.orig/debian/libmagic1.bug-control +++ file-5.04/debian/libmagic1.bug-control @@ -0,0 +1 @@ +Submit-As: file --- file-5.04.orig/debian/control +++ file-5.04/debian/control @@ -0,0 +1,76 @@ +Source: file +Section: utils +Priority: standard +Maintainer: Daniel Baumann +Uploaders: + Daniel Baumann , Judit Foglszinger +Build-Depends: + debhelper (>= 7.4.3~), autotools-dev, python, python-all-dev, python-all-dbg, + python-support, quilt (>= 0.46-7), zlib1g-dev +Standards-Version: 3.9.0 +Homepage: http://www.darwinsys.com/file/ +Vcs-Browser: http://git.debian-maintainers.org/?p=daniel/file.git +Vcs-Git: git://git.debian-maintainers.org/git/daniel/file.git +XS-Python-Version: all + +Package: file +Section: utils +Priority: standard +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, libmagic1 (= ${binary:Version}) +Description: Determines file type using "magic" numbers + File tests each argument in an attempt to classify it. There are three sets of + tests, performed in this order: filesystem tests, magic number tests, and + language tests. The first test that succeeds causes the file type to be + printed. + +Package: libmagic1 +Section: libs +Priority: standard +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Conflicts: file (<< 5.04-2) +Suggests: file +Description: File type determination library using "magic" numbers + This library can be used to classify files according to magic number tests. It + implements the core functionality of the file command. + +Package: libmagic-dev +Section: libdevel +Priority: optional +Architecture: any +Depends: ${misc:Depends}, libmagic1 (= ${binary:Version}) +Suggests: file +Description: File type determination library using "magic" numbers (development) + This library can be used to classify files according to magic number tests. It + implements the core functionality of the file command. + . + This package contains the development files. + +Package: python-magic +Section: python +Priority: extra +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends} +Provides: ${python:Provides} +Suggests: python-magic-dbg +XB-Python-Version: ${python:Versions} +Description: File type determination library using "magic" numbers (Python bindings) + This library can be used to classify files according to magic number tests. It + implements the core functionality of the file command. + . + This package contains the Python bindings. + +Package: python-magic-dbg +Section: debug +Priority: extra +Architecture: any +Depends: + ${misc:Depends}, ${shlibs:Depends}, python-magic (= ${binary:Version}), + python-dbg +Description: File type determination library using "magic" numbers (Python bindings/debug) + This library can be used to classify files according to magic number tests. It + implements the core functionality of the file command. + . + This package contains the Python bindings, built for the Python debug + interpreter. --- file-5.04.orig/debian/README.source +++ file-5.04/debian/README.source @@ -0,0 +1,37 @@ +Package Repositories +-------------------- + +Backports for the current stable debian distribution as well as snapshots of +unreleased versions may be available in repositories listed on the maintainers +homepage. The current URL of the maintainer homepage can be seen in +debian/copyright. + + +Source Access +------------- + +You can obtain the sources of this package with: + + $ apt-get source ${PACKAGE} + +whereas '${PACKAGE}' has to be replaced with the actual name of the package. + +This package is maintained with the Git version control system. The current git +source tree can be obtained with: + + $ git clone ${GIT_URI} + +whereas '${GIT_URI}' has to be replaced with the actual URI for the Git +repository. The current Git URI can be seen in debian/control in the extracted +package sources. + +More information about Git can be found in the git-core package. + +This package may use the Quilt patch system to manage all modifications to the +upstream source. Changes, if any, are stored in the source package as diffs in +debian/diff and are applied during the build. Current modifications can be +applied to the source tree with: + + $ QUILT_PATCHES=debian/patches quilt push -a + +More information about Quilt can be found in the quilt package. --- file-5.04.orig/debian/python-magic.examples +++ file-5.04/debian/python-magic.examples @@ -0,0 +1 @@ +python/example.py --- file-5.04.orig/debian/compat +++ file-5.04/debian/compat @@ -0,0 +1 @@ +7 --- file-5.04.orig/debian/libmagic-dev.install +++ file-5.04/debian/libmagic-dev.install @@ -0,0 +1,4 @@ +/usr/include +/usr/lib/*.a +/usr/lib/*.so +/usr/share/man/man3 --- file-5.04.orig/debian/file.lintian-overrides +++ file-5.04/debian/file.lintian-overrides @@ -0,0 +1,2 @@ +# File and its library companion should always be updated together +file: package-has-a-duplicate-relation --- file-5.04.orig/debian/source/format +++ file-5.04/debian/source/format @@ -0,0 +1 @@ +1.0 --- file-5.04.orig/debian/patches/235-magic-add-hdr.patch +++ file-5.04/debian/patches/235-magic-add-hdr.patch @@ -0,0 +1,26 @@ +Author: Adam Buchbinder +Description: Adding new magics for HDR formats (Closes: #520416). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-12-05 18:35:08.000000000 +0100 ++++ file/magic/Magdir/images 2009-12-05 18:40:05.000000000 +0100 +@@ -639,3 +639,19 @@ + # Extension: .cpi + # From: Alexander Danilov + 0 string HDMV0100 AVCHD Clip Information ++ ++# From: Adam Buchbinder ++# URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ ++# Radiance HDR; usually has .pic or .hdr extension. ++0 string #?RADIANCE\n Radiance HDR image data ++#!mime image/vnd.radiance ++ ++# From: Adam Buchbinder ++# URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf ++# Used by the pfstools packages. The regex matches for the image size could ++# probably use some work. The MIME type is made up; if there's one in ++# actual common use, it should replace the one below. ++0 string PFS1\x0a PFS HDR image data ++#!mime image/x-pfs ++>1 regex [0-9]*\ \b, %s ++>>1 regex \ [0-9]{4} \bx%s --- file-5.04.orig/debian/patches/213-magic-add-xcursor.patch +++ file-5.04/debian/patches/213-magic-add-xcursor.patch @@ -0,0 +1,15 @@ +Author: Mathias Brodala +Description: New magic for X11 cursor files (Closes: #451246). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-02-18 11:38:10.000000000 +0000 ++++ file/magic/Magdir/images 2009-02-18 11:39:22.000000000 +0000 +@@ -610,3 +610,8 @@ + # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) + # From: Simon Horman + 0 string IIO2H Ulead Photo Explorer5 ++ ++# Type: X11 cursor ++# URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup ++# From: Mathias Brodala ++0 string Xcur X11 cursor --- file-5.04.orig/debian/patches/101-magic-update-awk.patch +++ file-5.04/debian/patches/101-magic-update-awk.patch @@ -0,0 +1,14 @@ +Author: Werner Fink +Description: Updates (and re-enables) awk magic. + +diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands +--- file.orig/magic/Magdir/commands 2010-01-30 09:44:26.000000000 +0000 ++++ file/magic/Magdir/commands 2010-02-01 11:51:38.000000000 +0000 +@@ -50,6 +50,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 executable --- file-5.04.orig/debian/patches/908-file-coredump.patch +++ file-5.04/debian/patches/908-file-coredump.patch @@ -0,0 +1,34 @@ +Author: Arnaud Giersch +Description: + File does not always correctly report the faulty command for core files + anymore. + +diff -Naurp file.orig/src/readelf.c file/src/readelf.c +--- file.orig/src/readelf.c 2010-07-11 00:17:48.717928843 +0200 ++++ file/src/readelf.c 2010-07-13 16:45:37.341674011 +0200 +@@ -738,6 +738,25 @@ core: + /* + * Well, that worked. + */ ++ ++ /* ++ * Try next offsets, in case this match is ++ * in the middle of a string. ++ */ ++ size_t k; ++ for (k = i + 1 ; k < NOFFSETS ; k++) { ++ if (prpsoffsets(k) >= prpsoffsets(i)) ++ continue; ++ size_t no; ++ int adjust = 1; ++ for (no = doff + prpsoffsets(k); ++ no < doff + prpsoffsets(i); no++) ++ adjust = adjust ++ && isprint(nbuf[no]); ++ if (adjust) ++ i = k; ++ } ++ + cname = (unsigned char *) + &nbuf[doff + prpsoffsets(i)]; + for (cp = cname; *cp && isprint(*cp); cp++) --- file-5.04.orig/debian/patches/233-magic-add-avchd.patch +++ file-5.04/debian/patches/233-magic-add-avchd.patch @@ -0,0 +1,15 @@ +Author: Alexander Danilov +Description: Add new magic for AVCHD Clip Information files (Closes: #538847). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-12-05 18:09:09.000000000 +0100 ++++ file/magic/Magdir/images 2009-12-05 18:10:44.000000000 +0100 +@@ -634,3 +634,8 @@ + !:mime image/x-olympus-orf + 0 string IIRS Olympus ORF raw image data, little-endian + !:mime image/x-olympus-orf ++ ++# Type: files used in modern AVCHD camcoders to store clip information ++# Extension: .cpi ++# From: Alexander Danilov ++0 string HDMV0100 AVCHD Clip Information --- file-5.04.orig/debian/patches/108-magic-update-digifax.patch +++ file-5.04/debian/patches/108-magic-update-digifax.patch @@ -0,0 +1,19 @@ +Author: n/a +Description: Updating Digifax magic. + +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 +-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 --- file-5.04.orig/debian/patches/210-magic-add-subversion.patch +++ file-5.04/debian/patches/210-magic-add-subversion.patch @@ -0,0 +1,15 @@ +Author: Michael Piefel +Description: New magic for SVN dumps (closes: #256652). + +diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision +--- file.orig/magic/Magdir/revision 2008-02-19 17:27:33.000000000 +0000 ++++ file/magic/Magdir/revision 2009-02-18 11:54:35.000000000 +0000 +@@ -17,3 +17,8 @@ + 0 string HG10 Mercurial bundle, + >4 string UN uncompressed + >4 string BZ bzip2 compressed ++ ++# Type: Subversion (SVN) dumps ++# From: Uwe Zeisberger ++0 string SVN-fs-dump-format-version: Subversion dumpfile ++>28 string >\0 (version: %s) --- file-5.04.orig/debian/patches/cdf-cert-bff-crashes +++ file-5.04/debian/patches/cdf-cert-bff-crashes @@ -0,0 +1,1364 @@ +Index: git/src/cdf.c +=================================================================== +--- git.orig/src/cdf.c 2012-02-29 20:13:05.341191429 +0100 ++++ git/src/cdf.c 2012-02-29 20:13:19.726010338 +0100 +@@ -24,15 +24,18 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + /* +- * Parse composite document files, the format used in Microsoft Office +- * document files before they switched to zipped xml. ++ * Parse Composite Document Files, the format used in Microsoft Office ++ * document files before they switched to zipped XML. + * Info from: http://sc.openoffice.org/compdocfileformat.pdf ++ * ++ * N.B. This is the "Composite Document File" format, and not the ++ * "Compound Document Format", nor the "Channel Definition Format". + */ + + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: cdf.c,v 1.36 2010/01/22 20:56:26 christos Exp $") ++FILE_RCSID("@(#)$File: cdf.c,v 1.49 2012/02/20 20:04:37 christos Exp $") + #endif + + #include +@@ -54,10 +57,6 @@ + + #include "cdf.h" + +-#ifndef __arraycount +-#define __arraycount(a) (sizeof(a) / sizeof(a[0])) +-#endif +- + #ifdef CDF_DEBUG + #define DPRINTF(a) printf a, fflush(stdout) + #else +@@ -71,19 +70,21 @@ + + #define NEED_SWAP (cdf_bo.u == (uint32_t)0x01020304) + +-#define CDF_TOLE8(x) ((uint64_t)(NEED_SWAP ? cdf_tole8(x) : (uint64_t)(x))) +-#define CDF_TOLE4(x) ((uint32_t)(NEED_SWAP ? cdf_tole4(x) : (uint32_t)(x))) +-#define CDF_TOLE2(x) ((uint16_t)(NEED_SWAP ? cdf_tole2(x) : (uint16_t)(x))) ++#define CDF_TOLE8(x) ((uint64_t)(NEED_SWAP ? _cdf_tole8(x) : (uint64_t)(x))) ++#define CDF_TOLE4(x) ((uint32_t)(NEED_SWAP ? _cdf_tole4(x) : (uint32_t)(x))) ++#define CDF_TOLE2(x) ((uint16_t)(NEED_SWAP ? _cdf_tole2(x) : (uint16_t)(x))) ++#define CDF_GETUINT32(x, y) cdf_getuint32(x, y) ++ + + /* + * swap a short + */ +-uint16_t +-cdf_tole2(uint16_t sv) ++static uint16_t ++_cdf_tole2(uint16_t sv) + { + uint16_t rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; ++ uint8_t *s = (uint8_t *)(void *)&sv; ++ uint8_t *d = (uint8_t *)(void *)&rv; + d[0] = s[1]; + d[1] = s[0]; + return rv; +@@ -92,12 +93,12 @@ + /* + * swap an int + */ +-uint32_t +-cdf_tole4(uint32_t sv) ++static uint32_t ++_cdf_tole4(uint32_t sv) + { + uint32_t rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; ++ uint8_t *s = (uint8_t *)(void *)&sv; ++ uint8_t *d = (uint8_t *)(void *)&rv; + d[0] = s[3]; + d[1] = s[2]; + d[2] = s[1]; +@@ -108,12 +109,12 @@ + /* + * swap a quad + */ +-uint64_t +-cdf_tole8(uint64_t sv) ++static uint64_t ++_cdf_tole8(uint64_t sv) + { + uint64_t rv; +- uint8_t *s = (uint8_t *)(void *)&sv; +- uint8_t *d = (uint8_t *)(void *)&rv; ++ uint8_t *s = (uint8_t *)(void *)&sv; ++ uint8_t *d = (uint8_t *)(void *)&rv; + d[0] = s[7]; + d[1] = s[6]; + d[2] = s[5]; +@@ -125,11 +126,41 @@ + return rv; + } + ++/* ++ * grab a uint32_t from a possibly unaligned address, and return it in ++ * the native host order. ++ */ ++static uint32_t ++cdf_getuint32(const uint8_t *p, size_t offs) ++{ ++ uint32_t rv; ++ (void)memcpy(&rv, p + offs * sizeof(uint32_t), sizeof(rv)); ++ return CDF_TOLE4(rv); ++} ++ + #define CDF_UNPACK(a) \ + (void)memcpy(&(a), &buf[len], sizeof(a)), len += sizeof(a) + #define CDF_UNPACKA(a) \ + (void)memcpy((a), &buf[len], sizeof(a)), len += sizeof(a) + ++uint16_t ++cdf_tole2(uint16_t sv) ++{ ++ return CDF_TOLE2(sv); ++} ++ ++uint32_t ++cdf_tole4(uint32_t sv) ++{ ++ return CDF_TOLE4(sv); ++} ++ ++uint64_t ++cdf_tole8(uint64_t sv) ++{ ++ return CDF_TOLE8(sv); ++} ++ + void + cdf_swap_header(cdf_header_t *h) + { +@@ -231,17 +262,18 @@ + } + + static int +-cdf_check_stream_offset(const cdf_stream_t *sst, const void *p, size_t tail, +- int line) ++cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h, ++ const void *p, size_t tail, int line) + { + const char *b = (const char *)sst->sst_tab; + const char *e = ((const char *)p) + tail; + (void)&line; +- if (e >= b && (size_t)(e - b) < sst->sst_dirlen * sst->sst_len) ++ if (e >= b && (size_t)(e - b) < CDF_SEC_SIZE(h) * sst->sst_len) + return 0; +- DPRINTF(("%d: offset begin %p end %p %zu >= %zu [%zu %zu]\n", +- line, b, e, (size_t)(e - b), sst->sst_dirlen * sst->sst_len, +- sst->sst_dirlen, sst->sst_len)); ++ DPRINTF(("%d: offset begin %p end %p %" SIZE_T_FORMAT "u" ++ " >= %" SIZE_T_FORMAT "u [%" SIZE_T_FORMAT "u %" ++ SIZE_T_FORMAT "u]\n", line, b, e, (size_t)(e - b), ++ CDF_SEC_SIZE(h) * sst->sst_len, CDF_SEC_SIZE(h), sst->sst_len)); + errno = EFTYPE; + return -1; + } +@@ -284,7 +316,8 @@ + cdf_unpack_header(h, buf); + cdf_swap_header(h); + if (h->h_magic != CDF_MAGIC) { +- DPRINTF(("Bad magic 0x%llx != 0x%llx\n", ++ DPRINTF(("Bad magic 0x%" INT64_T_FORMAT "x != 0x%" ++ INT64_T_FORMAT "x\n", + (unsigned long long)h->h_magic, + (unsigned long long)CDF_MAGIC)); + goto out; +@@ -309,18 +342,27 @@ + cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len, + const cdf_header_t *h, cdf_secid_t id) + { +- assert((size_t)CDF_SEC_SIZE(h) == len); +- return cdf_read(info, (off_t)CDF_SEC_POS(h, id), +- ((char *)buf) + offs, len); ++ size_t ss = CDF_SEC_SIZE(h); ++ size_t pos = CDF_SEC_POS(h, id); ++ assert(ss == len); ++ return cdf_read(info, (off_t)pos, ((char *)buf) + offs, len); + } + + ssize_t + cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs, + size_t len, const cdf_header_t *h, cdf_secid_t id) + { +- assert((size_t)CDF_SHORT_SEC_SIZE(h) == len); ++ size_t ss = CDF_SHORT_SEC_SIZE(h); ++ size_t pos = CDF_SHORT_SEC_POS(h, id); ++ assert(ss == len); ++ if (pos > CDF_SEC_SIZE(h) * sst->sst_len) { ++ DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %" ++ SIZE_T_FORMAT "u\n", ++ pos, CDF_SEC_SIZE(h) * sst->sst_len)); ++ return -1; ++ } + (void)memcpy(((char *)buf) + offs, +- ((const char *)sst->sst_tab) + CDF_SHORT_SEC_POS(h, id), len); ++ ((const char *)sst->sst_tab) + pos, len); + return len; + } + +@@ -340,16 +382,18 @@ + break; + + #define CDF_SEC_LIMIT (UINT32_MAX / (4 * ss)) +- if (h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec || ++ if ((nsatpersec > 0 && ++ h->h_num_sectors_in_master_sat > CDF_SEC_LIMIT / nsatpersec) || + i > CDF_SEC_LIMIT) { +- DPRINTF(("Number of sectors in master SAT too big %u %zu\n", +- h->h_num_sectors_in_master_sat, i)); ++ DPRINTF(("Number of sectors in master SAT too big %u %" ++ SIZE_T_FORMAT "u\n", h->h_num_sectors_in_master_sat, i)); + errno = EFTYPE; + return -1; + } + + sat->sat_len = h->h_num_sectors_in_master_sat * nsatpersec + i; +- DPRINTF(("sat_len = %zu ss = %zu\n", sat->sat_len, ss)); ++ DPRINTF(("sat_len = %" SIZE_T_FORMAT "u ss = %" SIZE_T_FORMAT "u\n", ++ sat->sat_len, ss)); + if ((sat->sat_tab = CAST(cdf_secid_t *, calloc(sat->sat_len, ss))) + == NULL) + return -1; +@@ -385,8 +429,8 @@ + if (sec < 0) + goto out; + if (i >= sat->sat_len) { +- DPRINTF(("Out of bounds reading MSA %u >= %u", +- i, sat->sat_len)); ++ DPRINTF(("Out of bounds reading MSA %" SIZE_T_FORMAT ++ "u >= %" SIZE_T_FORMAT "u", i, sat->sat_len)); + errno = EFTYPE; + goto out2; + } +@@ -459,7 +503,8 @@ + } + if (i >= scn->sst_len) { + DPRINTF(("Out of bounds reading long sector chain " +- "%u > %u\n", i, scn->sst_len)); ++ "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", i, ++ scn->sst_len)); + errno = EFTYPE; + goto out; + } +@@ -504,7 +549,8 @@ + } + if (i >= scn->sst_len) { + DPRINTF(("Out of bounds reading short sector chain " +- "%u > %u\n", i, scn->sst_len)); ++ "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", ++ i, scn->sst_len)); + errno = EFTYPE; + goto out; + } +@@ -550,7 +596,7 @@ + nd = ss / CDF_DIRECTORY_SIZE; + + dir->dir_len = ns * nd; +- dir->dir_tab = CAST(cdf_directory_t *, ++ dir->dir_tab = CAST(cdf_directory_t *, + calloc(dir->dir_len, sizeof(dir->dir_tab[0]))); + if (dir->dir_tab == NULL) + return -1; +@@ -612,7 +658,8 @@ + } + if (i >= ssat->sat_len) { + DPRINTF(("Out of bounds reading short sector chain " +- "%u > %u\n", i, ssat->sat_len)); ++ "%" SIZE_T_FORMAT "u > %" SIZE_T_FORMAT "u\n", i, ++ ssat->sat_len)); + errno = EFTYPE; + goto out; + } +@@ -649,7 +696,7 @@ + if (d->d_stream_first_sector < 0) + goto out; + +- return cdf_read_long_sector_chain(info, h, sat, ++ return cdf_read_long_sector_chain(info, h, sat, + d->d_stream_first_sector, d->d_size, scn); + out: + scn->sst_tab = NULL; +@@ -693,19 +740,19 @@ + } + + int +-cdf_read_property_info(const cdf_stream_t *sst, uint32_t offs, +- cdf_property_info_t **info, size_t *count, size_t *maxcount) ++cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, ++ uint32_t offs, cdf_property_info_t **info, size_t *count, size_t *maxcount) + { + const cdf_section_header_t *shp; + cdf_section_header_t sh; +- const uint32_t *p, *q, *e; ++ const uint8_t *p, *q, *e; + int16_t s16; + int32_t s32; + uint32_t u32; + int64_t s64; + uint64_t u64; + cdf_timestamp_t tp; +- size_t i, o, nelements, j; ++ size_t i, o, o4, nelements, j; + cdf_property_info_t *inp; + + if (offs > UINT32_MAX / 4) { +@@ -714,7 +761,7 @@ + } + shp = CAST(const cdf_section_header_t *, (const void *) + ((const char *)sst->sst_tab + offs)); +- if (cdf_check_stream_offset(sst, shp, sizeof(*shp), __LINE__) == -1) ++ if (cdf_check_stream_offset(sst, h, shp, sizeof(*shp), __LINE__) == -1) + goto out; + sh.sh_len = CDF_TOLE4(shp->sh_len); + #define CDF_SHLEN_LIMIT (UINT32_MAX / 8) +@@ -744,32 +791,34 @@ + *info = inp; + inp += *count; + *count += sh.sh_properties; +- p = CAST(const uint32_t *, (const void *) ++ p = CAST(const uint8_t *, (const void *) + ((const char *)(const void *)sst->sst_tab + + offs + sizeof(sh))); +- e = CAST(const uint32_t *, (const void *) ++ e = CAST(const uint8_t *, (const void *) + (((const char *)(const void *)shp) + sh.sh_len)); +- if (cdf_check_stream_offset(sst, e, 0, __LINE__) == -1) ++ if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1) + goto out; + for (i = 0; i < sh.sh_properties; i++) { +- q = (const uint32_t *)(const void *) +- ((const char *)(const void *)p + +- CDF_TOLE4(p[(i << 1) + 1])) - 2; ++ size_t ofs = CDF_GETUINT32(p, (i << 1) + 1); ++ q = (const uint8_t *)(const void *) ++ ((const char *)(const void *)p + ofs ++ - 2 * sizeof(uint32_t)); + if (q > e) { + DPRINTF(("Ran of the end %p > %p\n", q, e)); + goto out; + } +- inp[i].pi_id = CDF_TOLE4(p[i << 1]); +- inp[i].pi_type = CDF_TOLE4(q[0]); +- DPRINTF(("%d) id=%x type=%x offs=%x\n", i, inp[i].pi_id, +- inp[i].pi_type, (const char *)q - (const char *)p)); ++ inp[i].pi_id = CDF_GETUINT32(p, i << 1); ++ inp[i].pi_type = CDF_GETUINT32(q, 0); ++ DPRINTF(("%" SIZE_T_FORMAT "u) id=%x type=%x offs=0x%tx,0x%x\n", ++ i, inp[i].pi_id, inp[i].pi_type, q - p, offs)); + if (inp[i].pi_type & CDF_VECTOR) { +- nelements = CDF_TOLE4(q[1]); ++ nelements = CDF_GETUINT32(q, 1); + o = 2; + } else { + nelements = 1; + o = 1; + } ++ o4 = o * sizeof(uint32_t); + if (inp[i].pi_type & (CDF_ARRAY|CDF_BYREF|CDF_RESERVED)) + goto unknown; + switch (inp[i].pi_type & CDF_TYPEMASK) { +@@ -779,34 +828,48 @@ + case CDF_SIGNED16: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&s16, &q[o], sizeof(s16)); ++ (void)memcpy(&s16, &q[o4], sizeof(s16)); + inp[i].pi_s16 = CDF_TOLE2(s16); + break; + case CDF_SIGNED32: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&s32, &q[o], sizeof(s32)); ++ (void)memcpy(&s32, &q[o4], sizeof(s32)); + inp[i].pi_s32 = CDF_TOLE4((uint32_t)s32); + break; + case CDF_BOOL: + case CDF_UNSIGNED32: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&u32, &q[o], sizeof(u32)); ++ (void)memcpy(&u32, &q[o4], sizeof(u32)); + inp[i].pi_u32 = CDF_TOLE4(u32); + break; + case CDF_SIGNED64: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&s64, &q[o], sizeof(s64)); ++ (void)memcpy(&s64, &q[o4], sizeof(s64)); + inp[i].pi_s64 = CDF_TOLE8((uint64_t)s64); + break; + case CDF_UNSIGNED64: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&u64, &q[o], sizeof(u64)); ++ (void)memcpy(&u64, &q[o4], sizeof(u64)); + inp[i].pi_u64 = CDF_TOLE8((uint64_t)u64); + break; ++ case CDF_FLOAT: ++ if (inp[i].pi_type & CDF_VECTOR) ++ goto unknown; ++ (void)memcpy(&u32, &q[o4], sizeof(u32)); ++ u32 = CDF_TOLE4(u32); ++ memcpy(&inp[i].pi_f, &u32, sizeof(inp[i].pi_f)); ++ break; ++ case CDF_DOUBLE: ++ if (inp[i].pi_type & CDF_VECTOR) ++ goto unknown; ++ (void)memcpy(&u64, &q[o4], sizeof(u64)); ++ u64 = CDF_TOLE8((uint64_t)u64); ++ memcpy(&inp[i].pi_d, &u64, sizeof(inp[i].pi_d)); ++ break; + case CDF_LENGTH32_STRING: + case CDF_LENGTH32_WSTRING: + if (nelements > 1) { +@@ -822,24 +885,30 @@ + *info = inp; + inp = *info + nelem; + } +- DPRINTF(("nelements = %d\n", nelements)); ++ DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", ++ nelements)); + for (j = 0; j < nelements; j++, i++) { +- uint32_t l = CDF_TOLE4(q[o]); ++ uint32_t l = CDF_GETUINT32(q, o); + inp[i].pi_str.s_len = l; +- inp[i].pi_str.s_buf = +- (const char *)(const void *)(&q[o+1]); +- DPRINTF(("l = %d, r = %d, s = %s\n", l, ++ inp[i].pi_str.s_buf = (const char *) ++ (const void *)(&q[o4 + sizeof(l)]); ++ DPRINTF(("l = %d, r = %" SIZE_T_FORMAT ++ "u, s = %s\n", l, + CDF_ROUND(l, sizeof(l)), + inp[i].pi_str.s_buf)); +- l = 4 + (uint32_t)CDF_ROUND(l, sizeof(l)); +- o += l >> 2; ++ if (l & 1) ++ l++; ++ o += l >> 1; ++ if (q + o >= e) ++ goto out; ++ o4 = o * sizeof(uint32_t); + } + i--; + break; + case CDF_FILETIME: + if (inp[i].pi_type & CDF_VECTOR) + goto unknown; +- (void)memcpy(&tp, &q[o], sizeof(tp)); ++ (void)memcpy(&tp, &q[o4], sizeof(tp)); + inp[i].pi_tp = CDF_TOLE8((uint64_t)tp); + break; + case CDF_CLIPBOARD: +@@ -850,7 +919,7 @@ + unknown: + DPRINTF(("Don't know how to deal with %x\n", + inp[i].pi_type)); +- goto out; ++ break; + } + } + return 0; +@@ -860,8 +929,8 @@ + } + + int +-cdf_unpack_summary_info(const cdf_stream_t *sst, cdf_summary_info_header_t *ssi, +- cdf_property_info_t **info, size_t *count) ++cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h, ++ cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count) + { + size_t i, maxcount; + const cdf_summary_info_header_t *si = +@@ -870,8 +939,8 @@ + CAST(const cdf_section_declaration_t *, (const void *) + ((const char *)sst->sst_tab + CDF_SECTION_DECLARATION_OFFSET)); + +- if (cdf_check_stream_offset(sst, si, sizeof(*si), __LINE__) == -1 || +- cdf_check_stream_offset(sst, sd, sizeof(*sd), __LINE__) == -1) ++ if (cdf_check_stream_offset(sst, h, si, sizeof(*si), __LINE__) == -1 || ++ cdf_check_stream_offset(sst, h, sd, sizeof(*sd), __LINE__) == -1) + return -1; + ssi->si_byte_order = CDF_TOLE2(si->si_byte_order); + ssi->si_os_version = CDF_TOLE2(si->si_os_version); +@@ -888,9 +957,10 @@ + errno = EFTYPE; + return -1; + } +- if (cdf_read_property_info(sst, CDF_TOLE4(sd->sd_offset), +- info, count, &maxcount) == -1) ++ if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), ++ info, count, &maxcount) == -1) { + return -1; ++ } + } + return 0; + } +@@ -1015,13 +1085,14 @@ + size_t i, j, s = size / sizeof(cdf_secid_t); + + for (i = 0; i < sat->sat_len; i++) { +- (void)fprintf(stderr, "%s[%zu]:\n%.6d: ", prefix, i, i * s); ++ (void)fprintf(stderr, "%s[%" SIZE_T_FORMAT "u]:\n%.6" ++ SIZE_T_FORMAT "u: ", prefix, i, i * s); + for (j = 0; j < s; j++) { + (void)fprintf(stderr, "%5d, ", + CDF_TOLE4(sat->sat_tab[s * i + j])); + if ((j + 1) % 10 == 0) +- (void)fprintf(stderr, "\n%.6d: ", +- i * s + j + 1); ++ (void)fprintf(stderr, "\n%.6" SIZE_T_FORMAT ++ "u: ", i * s + j + 1); + } + (void)fprintf(stderr, "\n"); + } +@@ -1040,7 +1111,8 @@ + if (j == 16) { + j = 0; + abuf[15] = '\0'; +- (void)fprintf(stderr, "%s\n%.4x: ", abuf, i + 1); ++ (void)fprintf(stderr, "%s\n%.4" SIZE_T_FORMAT "x: ", ++ abuf, i + 1); + } + } + (void)fprintf(stderr, "\n"); +@@ -1072,7 +1144,8 @@ + d = &dir->dir_tab[i]; + for (j = 0; j < sizeof(name); j++) + name[j] = (char)CDF_TOLE2(d->d_name[j]); +- (void)fprintf(stderr, "Directory %zu: %s\n", i, name); ++ (void)fprintf(stderr, "Directory %" SIZE_T_FORMAT "u: %s\n", ++ i, name); + if (d->d_type < __arraycount(types)) + (void)fprintf(stderr, "Type: %s\n", types[d->d_type]); + else +@@ -1083,9 +1156,9 @@ + (void)fprintf(stderr, "Right child: %d\n", d->d_right_child); + (void)fprintf(stderr, "Flags: 0x%x\n", d->d_flags); + cdf_timestamp_to_timespec(&ts, d->d_created); +- (void)fprintf(stderr, "Created %s", ctime(&ts.tv_sec)); ++ (void)fprintf(stderr, "Created %s", cdf_ctime(&ts.tv_sec)); + cdf_timestamp_to_timespec(&ts, d->d_modified); +- (void)fprintf(stderr, "Modified %s", ctime(&ts.tv_sec)); ++ (void)fprintf(stderr, "Modified %s", cdf_ctime(&ts.tv_sec)); + (void)fprintf(stderr, "Stream %d\n", d->d_stream_first_sector); + (void)fprintf(stderr, "Size %d\n", d->d_size); + switch (d->d_type) { +@@ -1107,7 +1180,7 @@ + default: + break; + } +- ++ + } + } + +@@ -1121,7 +1194,7 @@ + + for (i = 0; i < count; i++) { + cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); +- (void)fprintf(stderr, "%zu) %s: ", i, buf); ++ (void)fprintf(stderr, "%" SIZE_T_FORMAT "u) %s: ", i, buf); + switch (info[i].pi_type) { + case CDF_NULL: + break; +@@ -1137,17 +1210,25 @@ + (void)fprintf(stderr, "unsigned 32 [%u]\n", + info[i].pi_u32); + break; ++ case CDF_FLOAT: ++ (void)fprintf(stderr, "float [%g]\n", ++ info[i].pi_f); ++ break; ++ case CDF_DOUBLE: ++ (void)fprintf(stderr, "double [%g]\n", ++ info[i].pi_d); ++ break; + case CDF_LENGTH32_STRING: + (void)fprintf(stderr, "string %u [%.*s]\n", + info[i].pi_str.s_len, + info[i].pi_str.s_len, info[i].pi_str.s_buf); + break; + case CDF_LENGTH32_WSTRING: +- (void)fprintf(stderr, "string %u [", ++ (void)fprintf(stderr, "string %u [", + info[i].pi_str.s_len); + for (j = 0; j < info[i].pi_str.s_len - 1; j++) + (void)fputc(info[i].pi_str.s_buf[j << 1], stderr); +- (void)fprintf(stderr, "]\n"); ++ (void)fprintf(stderr, "]\n"); + break; + case CDF_FILETIME: + tp = info[i].pi_tp; +@@ -1157,7 +1238,7 @@ + } else { + cdf_timestamp_to_timespec(&ts, tp); + (void)fprintf(stderr, "timestamp %s", +- ctime(&ts.tv_sec)); ++ cdf_ctime(&ts.tv_sec)); + } + break; + case CDF_CLIPBOARD: +@@ -1181,7 +1262,7 @@ + size_t count; + + (void)&h; +- if (cdf_unpack_summary_info(sst, &ssi, &info, &count) == -1) ++ if (cdf_unpack_summary_info(sst, h, &ssi, &info, &count) == -1) + return; + (void)fprintf(stderr, "Endian: %x\n", ssi.si_byte_order); + (void)fprintf(stderr, "Os Version %d.%d\n", ssi.si_os_version & 0xff, +Index: git/src/cdf.h +=================================================================== +--- git.orig/src/cdf.h 2012-02-29 20:13:05.341191429 +0100 ++++ git/src/cdf.h 2012-02-29 20:13:19.726010338 +0100 +@@ -24,20 +24,35 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + /* +- * Info from: http://sc.openoffice.org/compdocfileformat.pdf ++ * Parse Composite Document Files, the format used in Microsoft Office ++ * document files before they switched to zipped XML. ++ * Info from: http://sc.openoffice.org/compdocfileformat.pdf ++ * ++ * N.B. This is the "Composite Document File" format, and not the ++ * "Compound Document Format", nor the "Channel Definition Format". + */ + + #ifndef _H_CDF_ + #define _H_CDF_ + ++#ifdef WIN32 ++#include ++#define timespec timeval ++#define tv_nsec tv_usec ++#endif ++#ifdef __DJGPP__ ++#define timespec timeval ++#define tv_nsec tv_usec ++#endif ++ + typedef int32_t cdf_secid_t; + + #define CDF_LOOP_LIMIT 10000 + + #define CDF_SECID_NULL 0 + #define CDF_SECID_FREE -1 +-#define CDF_SECID_END_OF_CHAIN -2 +-#define CDF_SECID_SECTOR_ALLOCATION_TABLE -3 ++#define CDF_SECID_END_OF_CHAIN -2 ++#define CDF_SECID_SECTOR_ALLOCATION_TABLE -3 + #define CDF_SECID_MASTER_SECTOR_ALLOCATION_TABLE -4 + + typedef struct { +@@ -61,15 +76,15 @@ + cdf_secid_t h_master_sat[436/4]; + } cdf_header_t; + +-#define CDF_SEC_SIZE(h) (1 << (h)->h_sec_size_p2) ++#define CDF_SEC_SIZE(h) ((size_t)(1 << (h)->h_sec_size_p2)) + #define CDF_SEC_POS(h, secid) (CDF_SEC_SIZE(h) + (secid) * CDF_SEC_SIZE(h)) +-#define CDF_SHORT_SEC_SIZE(h) (1 << (h)->h_short_sec_size_p2) ++#define CDF_SHORT_SEC_SIZE(h) ((size_t)(1 << (h)->h_short_sec_size_p2)) + #define CDF_SHORT_SEC_POS(h, secid) ((secid) * CDF_SHORT_SEC_SIZE(h)) + +-typedef int32_t cdf_dirid_t; ++typedef int32_t cdf_dirid_t; + #define CDF_DIRID_NULL -1 + +-typedef int64_t cdf_timestamp_t; ++typedef int64_t cdf_timestamp_t; + #define CDF_BASE_YEAR 1601 + #define CDF_TIME_PREC 10000000 + +@@ -78,11 +93,11 @@ + uint16_t d_namelen; + uint8_t d_type; + #define CDF_DIR_TYPE_EMPTY 0 +-#define CDF_DIR_TYPE_USER_STORAGE 1 +-#define CDF_DIR_TYPE_USER_STREAM 2 +-#define CDF_DIR_TYPE_LOCKBYTES 3 +-#define CDF_DIR_TYPE_PROPERTY 4 +-#define CDF_DIR_TYPE_ROOT_STORAGE 5 ++#define CDF_DIR_TYPE_USER_STORAGE 1 ++#define CDF_DIR_TYPE_USER_STREAM 2 ++#define CDF_DIR_TYPE_LOCKBYTES 3 ++#define CDF_DIR_TYPE_PROPERTY 4 ++#define CDF_DIR_TYPE_ROOT_STORAGE 5 + uint8_t d_color; + #define CDF_DIR_COLOR_READ 0 + #define CDF_DIR_COLOR_BLACK 1 +@@ -91,8 +106,8 @@ + cdf_dirid_t d_storage; + uint64_t d_storage_uuid[2]; + uint32_t d_flags; +- cdf_timestamp_t d_created; +- cdf_timestamp_t d_modified; ++ cdf_timestamp_t d_created; ++ cdf_timestamp_t d_modified; + cdf_secid_t d_stream_first_sector; + uint32_t d_size; + uint32_t d_unused0; +@@ -154,7 +169,9 @@ + int32_t _pi_s32; + uint64_t _pi_u64; + int64_t _pi_s64; +- cdf_timestamp_t _pi_tp; ++ cdf_timestamp_t _pi_tp; ++ float _pi_f; ++ double _pi_d; + struct { + uint32_t s_len; + const char *s_buf; +@@ -166,6 +183,8 @@ + #define pi_s32 pi_val._pi_s32 + #define pi_u16 pi_val._pi_u16 + #define pi_s16 pi_val._pi_s16 ++#define pi_f pi_val._pi_f ++#define pi_d pi_val._pi_d + #define pi_tp pi_val._pi_tp + #define pi_str pi_val._pi_str + } cdf_property_info_t; +@@ -174,13 +193,13 @@ + + /* Variant type definitions */ + #define CDF_EMPTY 0x00000000 +-#define CDF_NULL 0x00000001 ++#define CDF_NULL 0x00000001 + #define CDF_SIGNED16 0x00000002 + #define CDF_SIGNED32 0x00000003 + #define CDF_FLOAT 0x00000004 + #define CDF_DOUBLE 0x00000005 + #define CDF_CY 0x00000006 +-#define CDF_DATE 0x00000007 ++#define CDF_DATE 0x00000007 + #define CDF_BSTR 0x00000008 + #define CDF_DISPATCH 0x00000009 + #define CDF_ERROR 0x0000000a +@@ -191,7 +210,7 @@ + #define CDF_SIGNED8 0x00000010 + #define CDF_UNSIGNED8 0x00000011 + #define CDF_UNSIGNED16 0x00000012 +-#define CDF_UNSIGNED32 0x00000013 ++#define CDF_UNSIGNED32 0x00000013 + #define CDF_SIGNED64 0x00000014 + #define CDF_UNSIGNED64 0x00000015 + #define CDF_INT 0x00000016 +@@ -226,7 +245,7 @@ + #define CDF_PROPERTY_SUBJECT 0x00000003 + #define CDF_PROPERTY_AUTHOR 0x00000004 + #define CDF_PROPERTY_KEYWORDS 0x00000005 +-#define CDF_PROPERTY_COMMENTS 0x00000006 ++#define CDF_PROPERTY_COMMENTS 0x00000006 + #define CDF_PROPERTY_TEMPLATE 0x00000007 + #define CDF_PROPERTY_LAST_SAVED_BY 0x00000008 + #define CDF_PROPERTY_REVISION_NUMBER 0x00000009 +@@ -276,19 +295,20 @@ + cdf_sat_t *); + int cdf_read_short_stream(const cdf_info_t *, const cdf_header_t *, + const cdf_sat_t *, const cdf_dir_t *, cdf_stream_t *); +-int cdf_read_property_info(const cdf_stream_t *, uint32_t, ++int cdf_read_property_info(const cdf_stream_t *, const cdf_header_t *, uint32_t, + cdf_property_info_t **, size_t *, size_t *); + int cdf_read_summary_info(const cdf_info_t *, const cdf_header_t *, + const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *, + const cdf_dir_t *, cdf_stream_t *); +-int cdf_unpack_summary_info(const cdf_stream_t *, cdf_summary_info_header_t *, +- cdf_property_info_t **, size_t *); ++int cdf_unpack_summary_info(const cdf_stream_t *, const cdf_header_t *, ++ cdf_summary_info_header_t *, cdf_property_info_t **, size_t *); + int cdf_print_classid(char *, size_t, const cdf_classid_t *); + int cdf_print_property_name(char *, size_t, uint32_t); + int cdf_print_elapsed_time(char *, size_t, cdf_timestamp_t); + uint16_t cdf_tole2(uint16_t); + uint32_t cdf_tole4(uint32_t); + uint64_t cdf_tole8(uint64_t); ++char *cdf_ctime(const time_t *); + + #ifdef CDF_DEBUG + void cdf_dump_header(const cdf_header_t *); +Index: git/src/cdf_time.c +=================================================================== +--- git.orig/src/cdf_time.c 2012-02-29 20:13:05.341191429 +0100 ++++ git/src/cdf_time.c 2012-02-29 20:13:19.726010338 +0100 +@@ -27,7 +27,7 @@ + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: cdf_time.c,v 1.8 2009/06/20 20:47:30 christos Exp $") ++FILE_RCSID("@(#)$File: cdf_time.c,v 1.10 2011/02/10 17:03:16 christos Exp $") + #endif + + #include +@@ -45,12 +45,6 @@ + 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 + }; + +-#ifdef __DJGPP__ +-#define timespec timeval +-#define tv_nsec tv_usec +-#endif +- +- + /* + * Return the number of days between jan 01 1601 and jan 01 of year. + */ +@@ -127,7 +121,7 @@ + tm.tm_year = (int)(CDF_BASE_YEAR + (t / 365)); + + rdays = cdf_getdays(tm.tm_year); +- t -= rdays; ++ t -= rdays - 1; + tm.tm_mday = cdf_getday(tm.tm_year, (int)t); + tm.tm_mon = cdf_getmonth(tm.tm_year, (int)t); + tm.tm_wday = 0; +@@ -171,6 +165,18 @@ + return 0; + } + ++char * ++cdf_ctime(const time_t *sec) ++{ ++ static char ctbuf[26]; ++ char *ptr = ctime(sec); ++ if (ptr != NULL) ++ return ptr; ++ (void)snprintf(ctbuf, sizeof(ctbuf), "*Bad* 0x%16.16llx\n", ++ (long long)*sec); ++ return ctbuf; ++} ++ + + #ifdef TEST + int +@@ -182,7 +188,7 @@ + char *p, *q; + + cdf_timestamp_to_timespec(&ts, tst); +- p = ctime(&ts.tv_sec); ++ p = cdf_ctime(&ts.tv_sec); + if ((q = strchr(p, '\n')) != NULL) + *q = '\0'; + if (strcmp(ref, p) != 0) +Index: git/src/readcdf.c +=================================================================== +--- git.orig/src/readcdf.c 2012-02-29 20:13:05.341191429 +0100 ++++ git/src/readcdf.c 2012-02-29 20:13:19.726010338 +0100 +@@ -26,7 +26,7 @@ + #include "file.h" + + #ifndef lint +-FILE_RCSID("@(#)$File: readcdf.c,v 1.22 2010/01/20 01:36:55 christos Exp $") ++FILE_RCSID("@(#)$File: readcdf.c,v 1.28 2012/02/17 05:27:45 christos Exp $") + #endif + + #include +@@ -44,241 +44,275 @@ + cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, + size_t count) + { +- size_t i; +- cdf_timestamp_t tp; +- struct timespec ts; +- char buf[64]; +- const char *str = "vnd.ms-office"; +- const char *s; +- int len; +- +- for (i = 0; i < count; i++) { +- cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); +- switch (info[i].pi_type) { +- case CDF_NULL: +- break; +- case CDF_SIGNED16: +- if (NOTMIME(ms) && file_printf(ms, ", %s: %hd", buf, +- info[i].pi_s16) == -1) +- return -1; +- break; +- case CDF_SIGNED32: +- if (NOTMIME(ms) && file_printf(ms, ", %s: %d", buf, +- info[i].pi_s32) == -1) +- return -1; +- break; +- case CDF_UNSIGNED32: +- if (NOTMIME(ms) && file_printf(ms, ", %s: %u", buf, +- info[i].pi_u32) == -1) +- return -1; +- break; +- case CDF_LENGTH32_STRING: +- case CDF_LENGTH32_WSTRING: +- len = info[i].pi_str.s_len; +- if (len > 1) { +- char vbuf[1024]; +- size_t j, k = 1; +- +- if (info[i].pi_type == CDF_LENGTH32_WSTRING) +- k++; +- s = info[i].pi_str.s_buf; +- for (j = 0; j < sizeof(vbuf) && len--; +- j++, s += k) { +- if (*s == '\0') +- break; +- if (isprint((unsigned char)*s)) +- vbuf[j] = *s; +- } +- if (j == sizeof(vbuf)) +- --j; +- vbuf[j] = '\0'; +- if (NOTMIME(ms)) { +- if (vbuf[0]) { +- if (file_printf(ms, ", %s: %s", +- buf, vbuf) == -1) +- return -1; +- } +- } else if (info[i].pi_id == +- CDF_PROPERTY_NAME_OF_APPLICATION) { +- if (strstr(vbuf, "Word")) +- str = "msword"; +- else if (strstr(vbuf, "Excel")) +- str = "vnd.ms-excel"; +- else if (strstr(vbuf, "Powerpoint")) +- str = "vnd.ms-powerpoint"; +- else if (strstr(vbuf, +- "Crystal Reports")) +- str = "x-rpt"; +- } +- } +- break; +- case CDF_FILETIME: +- tp = info[i].pi_tp; +- if (tp != 0) { +- if (tp < 1000000000000000LL) { +- char tbuf[64]; +- cdf_print_elapsed_time(tbuf, +- sizeof(tbuf), tp); +- if (NOTMIME(ms) && file_printf(ms, +- ", %s: %s", buf, tbuf) == -1) +- return -1; +- } else { +- char *c, *ec; +- cdf_timestamp_to_timespec(&ts, tp); +- c = ctime(&ts.tv_sec); +- if ((ec = strchr(c, '\n')) != NULL) +- *ec = '\0'; +- +- if (NOTMIME(ms) && file_printf(ms, +- ", %s: %s", buf, c) == -1) +- return -1; +- } +- } +- break; +- case CDF_CLIPBOARD: +- break; +- default: +- return -1; +- } +- } +- if (!NOTMIME(ms)) { +- if (file_printf(ms, "application/%s", str) == -1) +- return -1; +- } +- return 1; ++ size_t i; ++ cdf_timestamp_t tp; ++ struct timespec ts; ++ char buf[64]; ++ const char *str = NULL; ++ const char *s; ++ int len; ++ ++ for (i = 0; i < count; i++) { ++ cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); ++ switch (info[i].pi_type) { ++ case CDF_NULL: ++ break; ++ case CDF_SIGNED16: ++ if (NOTMIME(ms) && file_printf(ms, ", %s: %hd", buf, ++ info[i].pi_s16) == -1) ++ return -1; ++ break; ++ case CDF_SIGNED32: ++ if (NOTMIME(ms) && file_printf(ms, ", %s: %d", buf, ++ info[i].pi_s32) == -1) ++ return -1; ++ break; ++ case CDF_UNSIGNED32: ++ if (NOTMIME(ms) && file_printf(ms, ", %s: %u", buf, ++ info[i].pi_u32) == -1) ++ return -1; ++ break; ++ case CDF_FLOAT: ++ if (NOTMIME(ms) && file_printf(ms, ", %s: %g", buf, ++ info[i].pi_f) == -1) ++ return -1; ++ break; ++ case CDF_DOUBLE: ++ if (NOTMIME(ms) && file_printf(ms, ", %s: %g", buf, ++ info[i].pi_d) == -1) ++ return -1; ++ break; ++ case CDF_LENGTH32_STRING: ++ case CDF_LENGTH32_WSTRING: ++ len = info[i].pi_str.s_len; ++ if (len > 1) { ++ char vbuf[1024]; ++ size_t j, k = 1; ++ ++ if (info[i].pi_type == CDF_LENGTH32_WSTRING) ++ k++; ++ s = info[i].pi_str.s_buf; ++ for (j = 0; j < sizeof(vbuf) && len--; ++ j++, s += k) { ++ if (*s == '\0') ++ break; ++ if (isprint((unsigned char)*s)) ++ vbuf[j] = *s; ++ } ++ if (j == sizeof(vbuf)) ++ --j; ++ vbuf[j] = '\0'; ++ if (NOTMIME(ms)) { ++ if (vbuf[0]) { ++ if (file_printf(ms, ", %s: %s", ++ buf, vbuf) == -1) ++ return -1; ++ } ++ } else if (info[i].pi_id == ++ CDF_PROPERTY_NAME_OF_APPLICATION) { ++ if (strstr(vbuf, "Word")) ++ str = "msword"; ++ else if (strstr(vbuf, "Excel")) ++ str = "vnd.ms-excel"; ++ else if (strstr(vbuf, "Powerpoint")) ++ str = "vnd.ms-powerpoint"; ++ else if (strstr(vbuf, ++ "Crystal Reports")) ++ str = "x-rpt"; ++ } ++ } ++ break; ++ case CDF_FILETIME: ++ tp = info[i].pi_tp; ++ if (tp != 0) { ++ if (tp < 1000000000000000LL) { ++ char tbuf[64]; ++ cdf_print_elapsed_time(tbuf, ++ sizeof(tbuf), tp); ++ if (NOTMIME(ms) && file_printf(ms, ++ ", %s: %s", buf, tbuf) == -1) ++ return -1; ++ } else { ++ char *c, *ec; ++ cdf_timestamp_to_timespec(&ts, tp); ++ c = cdf_ctime(&ts.tv_sec); ++ if ((ec = strchr(c, '\n')) != NULL) ++ *ec = '\0'; ++ ++ if (NOTMIME(ms) && file_printf(ms, ++ ", %s: %s", buf, c) == -1) ++ return -1; ++ } ++ } ++ break; ++ case CDF_CLIPBOARD: ++ break; ++ default: ++ return -1; ++ } ++ } ++ if (!NOTMIME(ms)) { ++ if (str == NULL) ++ return 0; ++ if (file_printf(ms, "application/%s", str) == -1) ++ return -1; ++ } ++ return 1; + } + + private int +-cdf_file_summary_info(struct magic_set *ms, const cdf_stream_t *sst) ++cdf_file_summary_info(struct magic_set *ms, const cdf_header_t *h, ++ const cdf_stream_t *sst) + { +- cdf_summary_info_header_t si; +- cdf_property_info_t *info; +- size_t count; +- int m; +- +- if (cdf_unpack_summary_info(sst, &si, &info, &count) == -1) +- return -1; +- +- if (NOTMIME(ms)) { +- if (file_printf(ms, "CDF V2 Document") == -1) +- return -1; +- +- if (file_printf(ms, ", %s Endian", +- si.si_byte_order == 0xfffe ? "Little" : "Big") == -1) +- return -1; +- switch (si.si_os) { +- case 2: +- if (file_printf(ms, ", Os: Windows, Version %d.%d", +- si.si_os_version & 0xff, +- (uint32_t)si.si_os_version >> 8) == -1) +- return -1; +- break; +- case 1: +- if (file_printf(ms, ", Os: MacOS, Version %d.%d", +- (uint32_t)si.si_os_version >> 8, +- si.si_os_version & 0xff) == -1) +- return -1; +- break; +- default: +- if (file_printf(ms, ", Os %d, Version: %d.%d", si.si_os, +- si.si_os_version & 0xff, +- (uint32_t)si.si_os_version >> 8) == -1) +- return -1; +- break; +- } +- } ++ cdf_summary_info_header_t si; ++ cdf_property_info_t *info; ++ size_t count; ++ int m; ++ ++ if (cdf_unpack_summary_info(sst, h, &si, &info, &count) == -1) ++ return -1; ++ ++ if (NOTMIME(ms)) { ++ if (file_printf(ms, "Composite Document File V2 Document") ++ == -1) ++ return -1; ++ ++ if (file_printf(ms, ", %s Endian", ++ si.si_byte_order == 0xfffe ? "Little" : "Big") == -1) ++ return -2; ++ switch (si.si_os) { ++ case 2: ++ if (file_printf(ms, ", Os: Windows, Version %d.%d", ++ si.si_os_version & 0xff, ++ (uint32_t)si.si_os_version >> 8) == -1) ++ return -2; ++ break; ++ case 1: ++ if (file_printf(ms, ", Os: MacOS, Version %d.%d", ++ (uint32_t)si.si_os_version >> 8, ++ si.si_os_version & 0xff) == -1) ++ return -2; ++ break; ++ default: ++ if (file_printf(ms, ", Os %d, Version: %d.%d", si.si_os, ++ si.si_os_version & 0xff, ++ (uint32_t)si.si_os_version >> 8) == -1) ++ return -2; ++ break; ++ } ++ } + +- m = cdf_file_property_info(ms, info, count); +- free(info); ++ m = cdf_file_property_info(ms, info, count); ++ free(info); + +- return m; ++ return m == -1 ? -2 : m; + } + + protected int + file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, + size_t nbytes) + { +- cdf_info_t info; +- cdf_header_t h; +- cdf_sat_t sat, ssat; +- cdf_stream_t sst, scn; +- cdf_dir_t dir; +- int i; +- const char *expn = ""; +- const char *corrupt = "corrupt: "; +- +- info.i_fd = fd; +- info.i_buf = buf; +- info.i_len = nbytes; +- if (ms->flags & MAGIC_APPLE) +- return 0; +- if (cdf_read_header(&info, &h) == -1) +- return 0; ++ cdf_info_t info; ++ cdf_header_t h; ++ cdf_sat_t sat, ssat; ++ cdf_stream_t sst, scn; ++ cdf_dir_t dir; ++ int i; ++ const char *expn = ""; ++ const char *corrupt = "corrupt: "; ++ ++ info.i_fd = fd; ++ info.i_buf = buf; ++ info.i_len = nbytes; ++ if (ms->flags & MAGIC_APPLE) ++ return 0; ++ if (cdf_read_header(&info, &h) == -1) ++ return 0; + #ifdef CDF_DEBUG +- cdf_dump_header(&h); ++ cdf_dump_header(&h); + #endif + +- if ((i = cdf_read_sat(&info, &h, &sat)) == -1) { +- expn = "Can't read SAT"; +- goto out0; +- } ++ if ((i = cdf_read_sat(&info, &h, &sat)) == -1) { ++ expn = "Can't read SAT"; ++ goto out0; ++ } + #ifdef CDF_DEBUG +- cdf_dump_sat("SAT", &sat, CDF_SEC_SIZE(&h)); ++ cdf_dump_sat("SAT", &sat, CDF_SEC_SIZE(&h)); + #endif + +- if ((i = cdf_read_ssat(&info, &h, &sat, &ssat)) == -1) { +- expn = "Can't read SSAT"; +- goto out1; +- } ++ if ((i = cdf_read_ssat(&info, &h, &sat, &ssat)) == -1) { ++ expn = "Can't read SSAT"; ++ goto out1; ++ } + #ifdef CDF_DEBUG +- cdf_dump_sat("SSAT", &ssat, CDF_SHORT_SEC_SIZE(&h)); ++ cdf_dump_sat("SSAT", &ssat, CDF_SHORT_SEC_SIZE(&h)); + #endif + +- if ((i = cdf_read_dir(&info, &h, &sat, &dir)) == -1) { +- expn = "Can't read directory"; +- goto out2; +- } +- +- if ((i = cdf_read_short_stream(&info, &h, &sat, &dir, &sst)) == -1) { +- expn = "Cannot read short stream"; +- goto out3; +- } ++ if ((i = cdf_read_dir(&info, &h, &sat, &dir)) == -1) { ++ expn = "Can't read directory"; ++ goto out2; ++ } ++ ++ if ((i = cdf_read_short_stream(&info, &h, &sat, &dir, &sst)) == -1) { ++ expn = "Cannot read short stream"; ++ goto out3; ++ } + #ifdef CDF_DEBUG +- cdf_dump_dir(&info, &h, &sat, &ssat, &sst, &dir); ++ cdf_dump_dir(&info, &h, &sat, &ssat, &sst, &dir); + #endif + +- if ((i = cdf_read_summary_info(&info, &h, &sat, &ssat, &sst, &dir, +- &scn)) == -1) { +- if (errno == ESRCH) { +- corrupt = expn; +- expn = "No summary info"; +- } else { +- expn = "Cannot read summary info"; +- } +- goto out4; +- } ++ if ((i = cdf_read_summary_info(&info, &h, &sat, &ssat, &sst, &dir, ++ &scn)) == -1) { ++ if (errno == ESRCH) { ++ corrupt = expn; ++ expn = "No summary info"; ++ } else { ++ expn = "Cannot read summary info"; ++ } ++ goto out4; ++ } + #ifdef CDF_DEBUG +- cdf_dump_summary_info(&h, &scn); ++ cdf_dump_summary_info(&h, &scn); + #endif +- if ((i = cdf_file_summary_info(ms, &scn)) == -1) +- expn = "Can't expand summary_info"; +- free(scn.sst_tab); ++ if ((i = cdf_file_summary_info(ms, &h, &scn)) < 0) ++ expn = "Can't expand summary_info"; ++ if (i == 0) { ++ const char *str = "vnd.ms-office"; ++ cdf_directory_t *d; ++ char name[__arraycount(d->d_name)]; ++ size_t j, k; ++ for (j = 0; j < dir.dir_len; j++) { ++ d = &dir.dir_tab[j]; ++ for (k = 0; k < sizeof(name); k++) ++ name[k] = (char)cdf_tole2(d->d_name[k]); ++ if (strstr(name, "WordDocument") == 0) { ++ str = "msword"; ++ break; ++ } ++ } ++ if (file_printf(ms, "application/%s", str) == -1) ++ return -1; ++ i = 1; ++ } ++ free(scn.sst_tab); + out4: +- free(sst.sst_tab); ++ free(sst.sst_tab); + out3: +- free(dir.dir_tab); ++ free(dir.dir_tab); + out2: +- free(ssat.sat_tab); ++ free(ssat.sat_tab); + out1: +- free(sat.sat_tab); ++ free(sat.sat_tab); + out0: +- if (i != 1) { +- if (file_printf(ms, "CDF V2 Document") == -1) +- return -1; +- if (*expn) +- if (file_printf(ms, ", %s%s", corrupt, expn) == -1) +- return -1; +- i = 1; +- } +- return i; ++ if (i != 1) { ++ if (i == -1) ++ if (file_printf(ms, "Composite Document File V2 Document") ++ == -1) ++ return -1; ++ if (*expn) ++ if (file_printf(ms, ", %s%s", corrupt, expn) == -1) ++ return -1; ++ i = 1; ++ } ++ return i; + } +Index: git/src/file.h +=================================================================== +--- git.orig/src/file.h 2012-02-29 20:13:24.457968395 +0100 ++++ git/src/file.h 2012-02-29 20:13:35.100966457 +0100 +@@ -74,6 +74,10 @@ + #endif + #define public + ++#ifndef __arraycount ++#define __arraycount(a) (sizeof(a) / sizeof(a[0])) ++#endif ++ + #ifndef __GNUC_PREREQ__ + #ifdef __GNUC__ + #define __GNUC_PREREQ__(x, y) \ --- file-5.04.orig/debian/patches/906-doc-manpages-typo2.patch +++ file-5.04/debian/patches/906-doc-manpages-typo2.patch @@ -0,0 +1,24 @@ +Author: Ori Avtalion +Description: Fixing typo and formating issue (Closes: #499754). + +diff -Naurp file.orig/doc/magic.man file/doc/magic.man +--- file.orig/doc/magic.man 2010-07-11 00:17:48.664928248 +0200 ++++ file/doc/magic.man 2010-07-13 17:08:25.697672263 +0200 +@@ -283,7 +283,7 @@ then print the string), with + The special test + .Em x + always evaluates to true. +-.Dv message ++.It Dv message + The message to be printed if the comparison succeeds. + If the string contains a + .Xr printf 3 +@@ -348,7 +348,7 @@ If a the test on a line at level + .Em n + succeeds, all following tests at level + .Em n+1 +-are performed, and the messages printed if the tests succeed, untile a line ++are performed, and the messages printed if the tests succeed, until a line + with level + .Em n + (or less) appears. --- file-5.04.orig/debian/patches/902-file-make.patch +++ file-5.04/debian/patches/902-file-make.patch @@ -0,0 +1,15 @@ +Author: Michael Piefel +Description: n/a + +diff -Naurp file.orig/src/Makefile.in file/src/Makefile.in +--- file.orig/src/Makefile.in 2008-01-12 17:55:24.000000000 +0000 ++++ file/src/Makefile.in 2008-01-12 17:56:46.000000000 +0000 +@@ -300,7 +300,7 @@ clean-binPROGRAMS: + done + file$(EXEEXT): $(file_OBJECTS) $(file_DEPENDENCIES) + @rm -f file$(EXEEXT) +- $(LINK) $(file_OBJECTS) $(file_LDADD) $(LIBS) ++ $(LINK) $(file_OBJECTS) $(file_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) --- file-5.04.orig/debian/patches/106-magic-update-real.patch +++ file-5.04/debian/patches/106-magic-update-real.patch @@ -0,0 +1,15 @@ +Author: n/a +Description: Update RealMedia magic. + +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 --- file-5.04.orig/debian/patches/117-magic-update-wav.patch +++ file-5.04/debian/patches/117-magic-update-wav.patch @@ -0,0 +1,21 @@ +Author: Adam Buchbinder +Description: pdating wav magics (Closes: #508174). + +diff -Naurp file.orig/magic/Magdir/riff file/magic/Magdir/riff +--- file.orig/magic/Magdir/riff 2008-12-05 17:28:11.000000000 -0500 ++++ file/magic/Magdir/riff 2008-12-05 17:33:48.000000000 -0500 +@@ -39,12 +39,14 @@ + >>20 leshort 2 \b, Microsoft ADPCM + >>20 leshort 6 \b, ITU G.711 A-law + >>20 leshort 7 \b, ITU G.711 mu-law ++>>20 leshort 8 \b, Microsoft DTS + >>20 leshort 17 \b, IMA ADPCM + >>20 leshort 20 \b, ITU G.723 ADPCM (Yamaha) + >>20 leshort 49 \b, GSM 6.10 + >>20 leshort 64 \b, ITU G.721 ADPCM + >>20 leshort 80 \b, MPEG + >>20 leshort 85 \b, MPEG Layer 3 ++>>20 leshort 0x2001 \b, DTS + >>22 leshort =1 \b, mono + >>22 leshort =2 \b, stereo + >>22 leshort >2 \b, %d channels --- file-5.04.orig/debian/patches/121-magic-update-utf.patch +++ file-5.04/debian/patches/121-magic-update-utf.patch @@ -0,0 +1,18 @@ +Author: Adam Buchbinder +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) --- file-5.04.orig/debian/patches/236-magic-add-foveon-x3f.patch +++ file-5.04/debian/patches/236-magic-add-foveon-x3f.patch @@ -0,0 +1,22 @@ +Author: Adam Buchbinder +Description: Adding new magics for Foveon X3F (Closes: #516800). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-12-05 18:43:12.000000000 +0100 ++++ file/magic/Magdir/images 2009-12-05 18:43:37.000000000 +0100 +@@ -655,3 +655,15 @@ + #!mime image/x-pfs + >1 regex [0-9]*\ \b, %s + >>1 regex \ [0-9]{4} \bx%s ++ ++# Type: Foveon X3F ++# URL: http://www.photofo.com/downloads/x3f-raw-format.pdf ++# From: Adam Buchbinder ++# Note that the MIME type isn't defined anywhere that I can find; if ++# there's a canonical type for this format, it should replace this one. ++0 string FOVb Foveon X3F raw image data ++!:mime image/x-x3f ++>6 leshort x \b, version %d. ++>4 leshort x \b%d ++>28 lelong x \b, %dx ++>32 lelong x \b%d --- file-5.04.orig/debian/patches/110-magic-update-pfm.patch +++ file-5.04/debian/patches/110-magic-update-pfm.patch @@ -0,0 +1,20 @@ +Author: n/a +Description: Updating pfm magic. + +diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos +--- file.orig/magic/Magdir/msdos 2008-07-02 15:16:52.000000000 +0000 ++++ file/magic/Magdir/msdos 2008-07-15 13:36:26.000000000 +0000 +@@ -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 --- file-5.04.orig/debian/patches/206-magic-add-sisu.patch +++ file-5.04/debian/patches/206-magic-add-sisu.patch @@ -0,0 +1,47 @@ +Author: Ralph Amissah +Description: New magic for SiSU Markup Language. + +diff -Naurp file.orig/magic/Magdir/sisu file/magic/Magdir/sisu +--- file.orig/magic/Magdir/sisu 1970-01-01 00:00:00.000000000 +0000 ++++ file/magic/Magdir/sisu 2008-04-07 08:10:25.000000000 +0000 +@@ -0,0 +1,18 @@ ++# Type: SiSU Markup Language ++# URL: http://www.sisudoc.org/ ++# From: Ralph Amissah ++ ++0 regex \^%?[\ \t]*SiSU[\ \t]+insert SiSU text insert ++>5 regex [0-9.]+ %s ++ ++0 regex \^%[\ \t]+SiSU[\ \t]+master SiSU text master ++>5 regex [0-9.]+ %s ++ ++0 regex \^%?[\ \t]*SiSU[\ \t]+text SiSU text ++>5 regex [0-9.]+ %s ++ ++0 regex \^%?[\ \t]*SiSU[\ \t][0-9.]+ SiSU text ++>5 regex [0-9.]+ %s ++ ++0 regex \^%*[\ \t]*sisu-[0-9.]+ SiSU text ++>5 regex [0-9.]+ %s +diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am +--- file.orig/magic/Makefile.am 2008-03-22 21:41:00.000000000 +0000 ++++ file/magic/Makefile.am 2008-04-07 08:11:04.000000000 +0000 +@@ -170,6 +170,7 @@ $(MAGIC_FRAGMENT_DIR)/sgi \ + $(MAGIC_FRAGMENT_DIR)/sgml \ + $(MAGIC_FRAGMENT_DIR)/sharc \ + $(MAGIC_FRAGMENT_DIR)/sinclair \ ++$(MAGIC_FRAGMENT_DIR)/sisu \ + $(MAGIC_FRAGMENT_DIR)/sketch \ + $(MAGIC_FRAGMENT_DIR)/smalltalk \ + $(MAGIC_FRAGMENT_DIR)/sniffer \ +diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in +--- file.orig/magic/Makefile.in 2008-03-22 21:41:06.000000000 +0000 ++++ file/magic/Makefile.in 2008-04-07 08:11:10.000000000 +0000 +@@ -330,6 +330,7 @@ $(MAGIC_FRAGMENT_DIR)/sgi \ + $(MAGIC_FRAGMENT_DIR)/sgml \ + $(MAGIC_FRAGMENT_DIR)/sharc \ + $(MAGIC_FRAGMENT_DIR)/sinclair \ ++$(MAGIC_FRAGMENT_DIR)/sisu \ + $(MAGIC_FRAGMENT_DIR)/sketch \ + $(MAGIC_FRAGMENT_DIR)/smalltalk \ + $(MAGIC_FRAGMENT_DIR)/sniffer \ --- file-5.04.orig/debian/patches/131-magic-update-dyatic.patch +++ file-5.04/debian/patches/131-magic-update-dyatic.patch @@ -0,0 +1,52 @@ +Author: Richard Smith +Description: Updating Dyalog APL magics (Closes: #537893). + +diff -Naurp file.orig/magic/Magdir/dyadic file/magic/Magdir/dyadic +--- file.orig/magic/Magdir/dyadic 2010-07-11 00:17:48.680930074 +0200 ++++ file/magic/Magdir/dyadic 2010-07-13 18:56:06.213685552 +0200 +@@ -3,7 +3,7 @@ + # $File: dyadic,v 1.4 2009/09/19 16:28:09 christos Exp $ + # Dyadic: file(1) magic for Dyalog APL. + # +-0 byte 0xaa ++0 byte 0xaa + >1 byte <4 Dyalog APL + >>1 byte 0x00 incomplete workspace + >>1 byte 0x01 component file +@@ -11,3 +11,36 @@ + >>1 byte 0x03 workspace + >>2 byte x version %d + >>3 byte x .%d ++ ++0 beshort 0xaa03 Dyalog APL ++>2 byte x workspace type %d ++>3 byte x subtype %d ++>7 byte&0x28 0x00 32-bit ++>7 byte&0x28 0x20 64-bit ++>7 byte&0x0c 0x00 classic ++>7 byte&0x0c 0x04 unicode ++>7 byte&0x88 0x00 big-endian ++>7 byte&0x88 0x80 little-endian ++ ++0 byte 0xaa Dyalog APL ++>1 byte 0x00 aplcore ++>1 byte 0x01 component file 32-bit non-journaled non-checksummed ++>1 byte 0x02 external variable exclusive ++>1 byte 0x06 external variable shared ++>1 byte 0x07 session ++>1 byte 0x08 mapped file 32-bit ++>1 byte 0x09 component file 64-bit non-journaled non-checksummed ++>1 byte 0x0a mapped file 64-bit ++>1 byte 0x0b component file 32-bit level 1 journaled non-checksummed ++>1 byte 0x0c component file 64-bit level 1 journaled non-checksummed ++>1 byte 0x0d component file 32-bit level 1 journaled checksummed ++>1 byte 0x0e component file 64-bit level 1 journaled checksummed ++>1 byte 0x0f component file 32-bit level 2 journaled checksummed ++>1 byte 0x10 component file 64-bit level 2 journaled checksummed ++>1 byte 0x11 component file 32-bit level 3 journaled checksummed ++>1 byte 0x12 component file 64-bit level 3 journaled checksummed ++>1 byte 0x13 component file 32-bit non-journaled checksummed ++>1 byte 0x14 component file 64-bit non-journaled checksummed ++>1 byte 0x80 DDB ++ ++0 short 0x6060 Dyalog APL transfer --- file-5.04.orig/debian/patches/207-magic-add-snes.patch +++ file-5.04/debian/patches/207-magic-add-snes.patch @@ -0,0 +1,22 @@ +Author: Josh Triplett +Description: New magic for SNES SPC700 sound files (Closes: #410847). + +diff -Naurp file.orig/magic/Magdir/audio file/magic/Magdir/audio +--- file.orig/magic/Magdir/audio 2008-11-07 15:44:13.000000000 +0000 ++++ file/magic/Magdir/audio 2009-02-18 11:43:50.000000000 +0000 +@@ -306,6 +306,15 @@ + >122 byte&0x1 =1 PAL + >122 byte&0x1 =0 NTSC + ++# Type: SNES SPC700 sound files ++# From: Josh Triplett ++0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file ++>&0 string 0.30 \b, version %s ++>>0x23 byte 0x1B \b, without ID666 tag ++>>0x23 byte 0x1A \b, with ID666 tag ++>>>0x2E string >\0 \b, song "%.32s" ++>>>0x4E string >\0 \b, game "%.32s" ++ + # Impulse tracker module (audio/x-it) + 0 string IMPM Impulse Tracker module sound data - + !:mime audio/x-mod --- file-5.04.orig/debian/patches/series +++ file-5.04/debian/patches/series @@ -0,0 +1,85 @@ +101-magic-update-awk.patch +102-magic-update-bash.patch +103-magic-update-reiserfs.patch +104-magic-update-tcsh.patch +105-magic-update-zip.patch +106-magic-update-real.patch +107-magic-update-os2.patch +108-magic-update-digifax.patch +109-magic-update-mono.patch +110-magic-update-pfm.patch +111-magic-update-ocaml.patch +112-magic-update-linuxswap.patch +113-magic-update-linuxext.patch +114-magic-update-llvm.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 +123-magic-update-tgif.patch +125-magic-update-truetype-fonts.patch +126-magic-update-7zip.patch +127-magic-update-lzma.patch +128-magic-update-xz.patch +129-magic-update-qemu.patch +130-magic-update-psf2.patch +131-magic-update-dyatic.patch +132-magic-update-bio-rad.patch +200-magic-add-par2.patch +201-magic-add-pe5.patch +202-magic-add-pmenu.patch +203-magic-add-powertab.patch +204-magic-add-scummvm.patch +205-magic-add-sgf.patch +206-magic-add-sisu.patch +207-magic-add-snes.patch +208-magic-add-ssh.patch +209-magic-add-ssl.patch +210-magic-add-subversion.patch +211-magic-add-supercollider.patch +212-magic-add-xen.patch +213-magic-add-xcursor.patch +214-magic-add-freemind.patch +215-magic-add-qdbm.patch +216-magic-add-tokyocabinet.patch +217-magic-add-cromfs.patch +218-magic-add-scribus.patch +219-magic-add-selinux.patch +220-magic-add-bzr.patch +221-magic-add-git.patch +222-magic-add-nut.patch +223-magic-add-blcr.patch +224-magic-add-lyx.patch +225-magic-add-bacula.patch +226-magic-add-olympus.patch +227-magic-add-gstreamer.patch +228-magic-add-mdmp.patch +229-magic-add-xfsdump.patch +231-magic-add-delta-iso.patch +232-magic-add-delta-rpm.patch +233-magic-add-avchd.patch +234-magic-add-chiasmus.patch +235-magic-add-hdr.patch +236-magic-add-foveon-x3f.patch +237-magic-add-paint-net.patch +238-magic-add-dact.patch +239-magic-add-datafork.patch +240-magic-add-pdb.patch +241-magic-add-canon.patch +242-magic-add-gdsii.patch +243-magic-add-git-index.patch +244-magic-add-jfs.patch +245-magic-add-erlang.patch +901-file-localmagic.patch +902-file-make.patch +904-doc-manpages.patch +905-doc-manpages-typo.patch +906-doc-manpages-typo2.patch +907-file-python.patch +908-file-coredump.patch +999-conglomeration.patch +cdf-cert-bff-crashes +cdf-restore-prefix +cdf-word-detection --- file-5.04.orig/debian/patches/cdf-word-detection +++ file-5.04/debian/patches/cdf-word-detection @@ -0,0 +1,13 @@ +Index: git/src/readcdf.c +=================================================================== +--- git.orig/src/readcdf.c 2012-03-04 16:53:50.248557916 +0100 ++++ git/src/readcdf.c 2012-03-04 16:53:53.156345659 +0100 +@@ -285,7 +285,7 @@ + d = &dir.dir_tab[j]; + for (k = 0; k < sizeof(name); k++) + name[k] = (char)cdf_tole2(d->d_name[k]); +- if (strstr(name, "WordDocument") == 0) { ++ if (strstr(name, "WordDocument") != 0) { + str = "msword"; + break; + } --- file-5.04.orig/debian/patches/104-magic-update-tcsh.patch +++ file-5.04/debian/patches/104-magic-update-tcsh.patch @@ -0,0 +1,15 @@ +Author: Daniel Baumann +Description: Addding another shebang path for tcsh. + +diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands +--- file.orig/magic/Magdir/commands 2010-01-30 09:44:26.000000000 +0000 ++++ file/magic/Magdir/commands 2010-02-01 11:57:33.000000000 +0000 +@@ -13,6 +13,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 --- file-5.04.orig/debian/patches/111-magic-update-ocaml.patch +++ file-5.04/debian/patches/111-magic-update-ocaml.patch @@ -0,0 +1,21 @@ +Author: Eric Cooper +Description: Updating ocaml magic (Closes: #488992). + +diff -Naurp file.orig/magic/Magdir/ocaml file/magic/Magdir/ocaml +--- file.orig/magic/Magdir/ocaml 2008-07-15 14:13:20.000000000 +0000 ++++ file/magic/Magdir/ocaml 2008-07-15 14:13:08.000000000 +0000 +@@ -1,7 +1,7 @@ + + #------------------------------------------------------------------------------ + # ocaml: file(1) magic for Objective Caml files. +-0 string Caml1999 Objective caml ++0 string Caml1999 OCaml + >8 string X exec file + >8 string I interface file (.cmi) + >8 string O object file (.cmo) +@@ -10,4 +10,4 @@ + >8 string Z native library file (.cmxa) + >8 string M abstract syntax tree implementation file + >8 string N abstract syntax tree interface file +->9 string >\0 (Version %3.3s). ++>9 string >\0 (Version %3.3s) --- file-5.04.orig/debian/patches/222-magic-add-nut.patch +++ file-5.04/debian/patches/222-magic-add-nut.patch @@ -0,0 +1,17 @@ +Author: Adam Buchbinder +Description: + Add support for NUT Container format, using the format's magic string. + (Closes: #528242). + +diff -Naurp file.orig/magic/Magdir/animation file/magic/Magdir/animation +--- file.orig/magic/Magdir/animation 2009-05-11 11:39:41.000000000 +0000 ++++ file/magic/Magdir/animation 2009-05-11 12:41:14.000000000 +0000 +@@ -813,3 +813,8 @@ + >>51 byte&0x20 !0 stereo + #>>51 byte&0x10 0 FFT + #>>51 byte&0x10 !0 DCT ++ ++# Type: NUT Container ++# URL: http://wiki.multimedia.cx/index.php?title=NUT ++# From: Adam Buchbinder ++0 string nut/multimedia\ container\0 NUT multimedia container --- file-5.04.orig/debian/patches/240-magic-add-pdb.patch +++ file-5.04/debian/patches/240-magic-add-pdb.patch @@ -0,0 +1,36 @@ +Author: Adam Buchbinder +Description: Adding new magics for PDB files (Closes: #480829). + +diff -Naurp file.orig/magic/Magdir/scientific file/magic/Magdir/scientific +--- file.orig/magic/Magdir/scientific 2010-07-11 00:17:48.700953291 +0200 ++++ file/magic/Magdir/scientific 2010-07-13 18:10:28.461677038 +0200 +@@ -71,3 +71,29 @@ + 0 string \060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data + 0 string \376\377\000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data + 0 string \377\376\060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data ++ ++# PDB: Protein Data Bank files ++# Adam Buchbinder ++# ++# http://www.wwpdb.org/documentation/format32/sect2.html ++# http://www.ch.ic.ac.uk/chemime/ ++# ++# The PDB file format is fixed-field, 80 columns. From the spec: ++# ++# COLS DATA ++# 1 - 6 "HEADER" ++# 11 - 50 String(40) ++# 51 - 59 Date ++# 63 - 66 IDcode ++# ++# Thus, positions 7-10, 60-62 and 67-80 are spaces. The Date must be in the ++# format DD-MMM-YY, e.g., 01-JAN-70, and the IDcode consists of numbers and ++# uppercase letters. However, examples have been seen without the date string, ++# e.g., the example on the chemime site. ++0 string HEADER\ \ \ \ ++>&0 regex/1 \^.{40} ++>>&0 regex/1 [0-9]{2}-[A-Z]{3}-[0-9]{2}\ {3} ++>>>&0 regex/1s [A-Z0-9]{4}.{14}$ ++>>>>&0 regex/1 [A-Z0-9]{4} Protein Data Bank data, ID Code %s ++!:mime chemical/x-pdb ++>>>>0 regex/1 [0-9]{2}-[A-Z]{3}-[0-9]{2} \b, %s --- file-5.04.orig/debian/patches/241-magic-add-canon.patch +++ file-5.04/debian/patches/241-magic-add-canon.patch @@ -0,0 +1,32 @@ +Author: Adam Buchbinder +Description: Adding new magics for Canon CRW and CR2 files (Closes: #516054). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2010-07-13 18:47:51.670671838 +0200 ++++ file/magic/Magdir/images 2010-07-13 18:48:12.525672541 +0200 +@@ -63,6 +63,25 @@ + 0 string IIN1 NIFF image data + !:mime image/x-niff + ++# Canon RAW version 1 (CRW) files are a type of Canon Image File Format ++# (CIFF) file. These are apparently all little-endian. ++# From: Adam Buchbinder ++# URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html ++0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data ++!:mime image/x-canon-crw ++>16 leshort x \b, version %d. ++>14 leshort x \b%d ++ ++# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic ++# number. Put this above the TIFF test to make sure we detect them. ++# These are apparently all little-endian. ++# From: Adam Buchbinder ++# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2 ++0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data ++!:mime image/x-canon-cr2 ++>10 byte x \b, version %d. ++>11 byte x \b%d ++ + # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) + # The second word of TIFF files is the TIFF version number, 42, which has + # never changed. The TIFF specification recommends testing for it. --- file-5.04.orig/debian/patches/214-magic-add-freemind.patch +++ file-5.04/debian/patches/214-magic-add-freemind.patch @@ -0,0 +1,15 @@ +Author: Jamie Thompson +Description: New magic for Freemind (Closes: #472385). + +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 ++0 string/w \ +Description: New magic for Power-Tab + +diff -Naurp file.orig/magic/Magdir/chord file/magic/Magdir/chord +--- file.orig/magic/Magdir/chord 2008-02-19 17:27:28.000000000 +0000 ++++ file/magic/Magdir/chord 2009-02-18 11:42:42.000000000 +0000 +@@ -7,3 +7,8 @@ + # + 0 string {title Chord text file + ++# Type: PowerTab file format ++# URL: http://www.power-tab.net/ ++# From: Jelmer Vernooij ++0 string ptab\003\000 Power-Tab v3 Tablature File ++0 string ptab\004\000 Power-Tab v4 Tablature File --- file-5.04.orig/debian/patches/cdf-restore-prefix +++ file-5.04/debian/patches/cdf-restore-prefix @@ -0,0 +1,22 @@ +Index: git/src/readcdf.c +=================================================================== +--- git.orig/src/readcdf.c 2012-02-29 20:32:37.313967770 +0100 ++++ git/src/readcdf.c 2012-02-29 20:32:51.308968638 +0100 +@@ -173,7 +173,7 @@ + return -1; + + if (NOTMIME(ms)) { +- if (file_printf(ms, "Composite Document File V2 Document") ++ if (file_printf(ms, "CDF V2 Document") + == -1) + return -1; + +@@ -306,7 +306,7 @@ + out0: + if (i != 1) { + if (i == -1) +- if (file_printf(ms, "Composite Document File V2 Document") ++ if (file_printf(ms, "CDF V2 Document") + == -1) + return -1; + if (*expn) --- file-5.04.orig/debian/patches/999-conglomeration.patch +++ file-5.04/debian/patches/999-conglomeration.patch @@ -0,0 +1,16 @@ +Author: Michael Piefel +Description: Needs to be broken out (FIXME). + +diff -Naurp file.orig/src/fsmagic.c file/src/fsmagic.c +--- file.orig/src/fsmagic.c 2008-02-14 20:14:52.000000000 +0000 ++++ file/src/fsmagic.c 2008-04-07 08:32:13.000000000 +0000 +@@ -110,7 +110,8 @@ file_fsmagic(struct magic_set *ms, const + if (file_printf(ms, "cannot open `%s' (%s)", + fn, strerror(errno)) == -1) + return -1; +- return 1; ++ ms->event_flags |= EVENT_HAD_ERR; ++ return -1; + } + + if (mime) { --- file-5.04.orig/debian/patches/901-file-localmagic.patch +++ file-5.04/debian/patches/901-file-localmagic.patch @@ -0,0 +1,47 @@ +Author: Michael Piefel +Description: No longer includes Localstuff in /usr/share/misc/magic. Local definitions should go to /etc/magic. + +diff -Naurp file.orig/magic/Header file/magic/Header +--- file.orig/magic/Header 2000-08-05 17:36:46.000000000 +0000 ++++ file/magic/Header 2008-09-08 11:53:44.000000000 +0000 +@@ -1,5 +1,5 @@ +-# 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). ++# Don't edit this file, edit /etc/magic or send your suggested inclusions to ++# this file as a wishlist bug against file (using the reportbug utility). ++ +diff -Naurp file.orig/magic/magic.local file/magic/magic.local +--- file.orig/magic/magic.local 1970-01-01 00:00:00.000000000 +0000 ++++ file/magic/magic.local 2008-09-08 11:53:44.000000000 +0000 +@@ -0,0 +1,3 @@ ++# Magic local data for file(1) command. ++# Insert here your local magic data. Format is described in magic(5). ++ +diff -Naurp file.orig/src/Makefile.am file/src/Makefile.am +--- file.orig/src/Makefile.am 2008-07-15 17:10:47.000000000 +0000 ++++ file/src/Makefile.am 2008-09-08 11:52:51.000000000 +0000 +@@ -4,7 +4,7 @@ include_HEADERS = magic.h + + bin_PROGRAMS = file + +-AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' ++AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"' + AM_CFLAGS = @WARNINGS@ + + libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ +diff -Naurp file.orig/src/Makefile.in file/src/Makefile.in +--- file.orig/src/Makefile.in 2008-08-30 10:01:42.000000000 +0000 ++++ file/src/Makefile.in 2008-09-08 11:53:21.000000000 +0000 +@@ -198,7 +198,7 @@ top_srcdir = @top_srcdir@ + MAGIC = $(pkgdatadir)/magic + lib_LTLIBRARIES = libmagic.la + include_HEADERS = magic.h +-AM_CPPFLAGS = -DMAGIC='"$(MAGIC)"' ++AM_CPPFLAGS = -DMAGIC='"/etc/magic:$(MAGIC)"' + AM_CFLAGS = @WARNINGS@ + libmagic_la_SOURCES = magic.c apprentice.c softmagic.c ascmagic.c \ + compress.c is_tar.c readelf.c print.c fsmagic.c \ --- file-5.04.orig/debian/patches/216-magic-add-tokyocabinet.patch +++ file-5.04/debian/patches/216-magic-add-tokyocabinet.patch @@ -0,0 +1,16 @@ +Author: Benoit Sibaud +Description: New magic for TokyoCabinet database (Closes: #481768). + +diff -Naurp file.orig/magic/Magdir/database file/magic/Magdir/database +--- 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 + 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 ++0 string ToKyO\ CaBiNeT\n TokyoCabinet database ++>14 string x (version %s) --- file-5.04.orig/debian/patches/907-file-python.patch +++ file-5.04/debian/patches/907-file-python.patch @@ -0,0 +1,33 @@ +Author: Joerg Friedrich +Description: + Adding support for all flags from magic.h in python-magic (Closes: #529354). + +diff -Naurp file.orig/python/py_magic.c file/python/py_magic.c +--- file.orig/python/py_magic.c 2009-12-05 17:30:09.000000000 +0100 ++++ file/python/py_magic.c 2009-12-05 18:35:22.000000000 +0100 +@@ -303,11 +303,24 @@ static struct const_vals { + { "MAGIC_SYMLINK", MAGIC_SYMLINK }, + { "MAGIC_COMPRESS", MAGIC_COMPRESS }, + { "MAGIC_DEVICES", MAGIC_DEVICES }, +- { "MAGIC_MIME", MAGIC_MIME }, ++ { "MAGIC_MIME_TYPE", MAGIC_MIME_TYPE }, + { "MAGIC_CONTINUE", MAGIC_CONTINUE }, + { "MAGIC_CHECK", MAGIC_CHECK }, + { "MAGIC_PRESERVE_ATIME", MAGIC_PRESERVE_ATIME }, ++ { "MAGIC_RAW", MAGIC_RAW}, + { "MAGIC_ERROR", MAGIC_ERROR}, ++ { "MAGIC_MIME_ENCODING", MAGIC_MIME_ENCODING }, ++ { "MAGIC_MIME", MAGIC_MIME }, ++ { "MAGIC_APPLE", MAGIC_APPLE }, ++ { "MAGIC_NO_CHECK_COMPRESS", MAGIC_NO_CHECK_COMPRESS }, ++ { "MAGIC_NO_CHECK_TAR", MAGIC_NO_CHECK_TAR }, ++ { "MAGIC_NO_CHECK_SOFT", MAGIC_NO_CHECK_SOFT }, ++ { "MAGIC_NO_CHECK_APPTYPE", MAGIC_NO_CHECK_APPTYPE }, ++ { "MAGIC_NO_CHECK_ELF", MAGIC_NO_CHECK_ELF }, ++ { "MAGIC_NO_CHECK_TEXT", MAGIC_NO_CHECK_TEXT }, ++ { "MAGIC_NO_CHECK_CDF", MAGIC_NO_CHECK_CDF }, ++ { "MAGIC_NO_CHECK_TOKENS", MAGIC_NO_CHECK_TOKENS }, ++ { "MAGIC_NO_CHECK_ENCODING", MAGIC_NO_CHECK_ENCODING }, + { NULL } + }; + --- file-5.04.orig/debian/patches/118-magic-update-z-machine.patch +++ file-5.04/debian/patches/118-magic-update-z-machine.patch @@ -0,0 +1,39 @@ +Author: Adam Buchbinder +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 + # +-# 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. --- file-5.04.orig/debian/patches/229-magic-add-xfsdump.patch +++ file-5.04/debian/patches/229-magic-add-xfsdump.patch @@ -0,0 +1,17 @@ +Author: Daniel Novotny +Description: Add new magic for xfs dumps. + +diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig/magic/Magdir/filesystems 2009-12-05 17:44:07.000000000 +0100 ++++ file/magic/Magdir/filesystems 2009-12-05 17:46:52.000000000 +0100 +@@ -1414,3 +1414,10 @@ + >40 ulelong >0 \b fblock size = %ld, + >44 ulelong >0 \b block size = %ld, + >48 ulequad >0 \b bytes = %lld ++ ++# Type: xfs metadump image ++# From: Daniel Novotny ++# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog ++# but can we do the << ? For now it's always 512 (0x200) anyway. ++0 string XFSM ++>0x200 string XFSB XFS filesystem metadump image --- file-5.04.orig/debian/patches/234-magic-add-chiasmus.patch +++ file-5.04/debian/patches/234-magic-add-chiasmus.patch @@ -0,0 +1,38 @@ +Author: Daniel Baumann +Description: Adding new magics for Chiasmus (Closes: #540368). + +diff -Naurp file.orig/magic/Magdir/bsi file/magic/Magdir/bsi +--- file.orig/magic/Magdir/bsi 1970-01-01 01:00:00.000000000 +0100 ++++ file/magic/Magdir/bsi 2009-12-05 18:16:59.000000000 +0100 +@@ -0,0 +1,9 @@ ++# Chiasmus is a encryption standard developed by the German Federal ++# Office for Information Security (Bundesamt fuer Sicherheit in der ++# Informationstechnik). ++ ++# Extension: .xia ++0 string XIA1 Chiasmus encrypted data ++ ++# Extension: .xis ++0 string XIS Chiasmus key +diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am +--- file.orig/magic/Makefile.am 2009-12-05 18:09:09.000000000 +0100 ++++ file/magic/Makefile.am 2009-12-05 18:17:20.000000000 +0100 +@@ -30,6 +30,7 @@ $(MAGIC_FRAGMENT_DIR)/blender \ + $(MAGIC_FRAGMENT_DIR)/blit \ + $(MAGIC_FRAGMENT_DIR)/bout \ + $(MAGIC_FRAGMENT_DIR)/bsdi \ ++$(MAGIC_FRAGMENT_DIR)/bsi \ + $(MAGIC_FRAGMENT_DIR)/btsnoop \ + $(MAGIC_FRAGMENT_DIR)/c-lang \ + $(MAGIC_FRAGMENT_DIR)/c64 \ +diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in +--- file.orig/magic/Makefile.in 2009-12-05 18:09:09.000000000 +0100 ++++ file/magic/Makefile.in 2009-12-05 18:17:24.000000000 +0100 +@@ -195,6 +195,7 @@ $(MAGIC_FRAGMENT_DIR)/blender \ + $(MAGIC_FRAGMENT_DIR)/blit \ + $(MAGIC_FRAGMENT_DIR)/bout \ + $(MAGIC_FRAGMENT_DIR)/bsdi \ ++$(MAGIC_FRAGMENT_DIR)/bsi \ + $(MAGIC_FRAGMENT_DIR)/btsnoop \ + $(MAGIC_FRAGMENT_DIR)/c-lang \ + $(MAGIC_FRAGMENT_DIR)/c64 \ --- file-5.04.orig/debian/patches/113-magic-update-linuxext.patch +++ file-5.04/debian/patches/113-magic-update-linuxext.patch @@ -0,0 +1,64 @@ +Author: Russell Coker +Description: Adding volume label and UUID support for linux ext (Closes: #489865). + +diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig/magic/Magdir/filesystems 2008-07-02 13:47:23.000000000 +0000 ++++ file/magic/Magdir/filesystems 2008-07-15 14:21:39.000000000 +0000 +@@ -1027,6 +1027,8 @@ + + # ext2/ext3 filesystems - Andreas Dilger + # ext4 filesystem - Eric Sandeen ++# volume label and UUID Russell Coker ++# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/ + 0x438 leshort 0xEF53 Linux + >0x44c lelong x rev %d + >0x43e leshort x \b.%d +@@ -1042,25 +1044,32 @@ + # else large RO_COMPAT? + >>>0x464 lelong >0x0000007 ext4 filesystem data + # else large INCOMPAT? +->>0x460 lelong >0x000003f ext4 filesystem data ++>>0x460 lelong >0x000003f ext4 filesystem data ++>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) +->0x43a leshort &0x0000002 (errors) ++>0x460 lelong &0x0000004 (needs journal recovery) ++>0x43a leshort &0x0000002 (errors) + # INCOMPAT flags +->0x460 lelong &0x0000001 (compressed) +-#>0x460 lelong &0x0000002 (filetype) +-#>0x460 lelong &0x0000010 (meta bg) +->0x460 lelong &0x0000040 (extents) +->0x460 lelong &0x0000080 (64bit) +-#>0x460 lelong &0x0000100 (mmp) +-#>0x460 lelong &0x0000200 (flex bg) ++>0x460 lelong &0x0000001 (compressed) ++#>0x460 lelong &0x0000002 (filetype) ++#>0x460 lelong &0x0000010 (meta bg) ++>0x460 lelong &0x0000040 (extents) ++>0x460 lelong &0x0000080 (64bit) ++#>0x460 lelong &0x0000100 (mmp) ++#>0x460 lelong &0x0000200 (flex bg) + # RO_INCOMPAT flags +-#>0x464 lelong &0x0000001 (sparse super) +->0x464 lelong &0x0000002 (large files) +->0x464 lelong &0x0000008 (huge files) +-#>0x464 lelong &0x0000010 (gdt checksum) +-#>0x464 lelong &0x0000020 (many subdirs) +-#>0x463 lelong &0x0000040 (extra isize) ++#>0x464 lelong &0x0000001 (sparse super) ++>0x464 lelong &0x0000002 (large files) ++>0x464 lelong &0x0000008 (huge files) ++#>0x464 lelong &0x0000010 (gdt checksum) ++#>0x464 lelong &0x0000020 (many subdirs) ++#>0x463 lelong &0x0000040 (extra isize) + + # SGI disk labels - Nathan Scott + 0 belong 0x0BE5A941 SGI disk label (volume header) --- file-5.04.orig/debian/patches/128-magic-update-xz.patch +++ file-5.04/debian/patches/128-magic-update-xz.patch @@ -0,0 +1,15 @@ +Author: Daniel Baumann +Description: Updatng magic for xz (Closes: #541087). + +diff -Naurp file.orig/magic/Magdir/compress file/magic/Magdir/compress +--- file.orig/magic/Magdir/compress 2010-07-11 02:03:39.853952057 +0200 ++++ file/magic/Magdir/compress 2010-07-11 02:04:12.528952297 +0200 +@@ -196,7 +196,7 @@ + >5 lequad !0xffffffffffffffff non-streamed, size %lld + + # http://tukaani.org/xz/xz-file-format.txt +-0 ustring \xFD7zXZ\x00 xz compressed data ++0 ustring \xFD7zXZ\x00 XZ compressed data + !:mime application/x-xz + + # AFX compressed files (Wolfram Kleff) --- file-5.04.orig/debian/patches/200-magic-add-par2.patch +++ file-5.04/debian/patches/200-magic-add-par2.patch @@ -0,0 +1,14 @@ +Author: Daniel van Eeden +Description: New magic for PAR2 archive files (Closes: #294070). + +diff -Naurp file.orig/magic/Magdir/archive file/magic/Magdir/archive +--- file.orig/magic/Magdir/archive 2010-01-30 09:44:26.000000000 +0000 ++++ file/magic/Magdir/archive 2010-02-01 12:09:56.000000000 +0000 +@@ -830,3 +830,7 @@ + >24 belong 0 no checksum + >24 belong 1 SHA-1 checksum + >24 belong 2 MD5 checksum ++ ++# Type: Parity Archive ++# From: Daniel van Eeden ++0 string PAR2 Parity Archive Volume Set --- file-5.04.orig/debian/patches/204-magic-add-scummvm.patch +++ file-5.04/debian/patches/204-magic-add-scummvm.patch @@ -0,0 +1,14 @@ +Author: Sven Hartge +Description: New magic for ScummVM savegame files (Closes: #263488). + +diff -Naurp file.orig/magic/Magdir/console file/magic/Magdir/console +--- file.orig/magic/Magdir/console 2007-09-26 20:22:31.000000000 +0000 ++++ file/magic/Magdir/console 2008-01-12 17:36:55.000000000 +0000 +@@ -252,3 +252,7 @@ + # .w3m + 0 string HM3W Warcraft III map file + ++# Type: scummVM savegame files ++# From: Sven Hartge ++0 string SCVM ScummVM savegame ++>12 string >\0 "%s" --- file-5.04.orig/debian/patches/244-magic-add-jfs.patch +++ file-5.04/debian/patches/244-magic-add-jfs.patch @@ -0,0 +1,26 @@ +Author: Adam Buchbinder +Description: Adding new magic for JFS filesystem images (Closes: #589067). + +diff -Naurp file.orig//magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig//magic/Magdir/filesystems 2010-07-14 19:53:22.762672355 +0200 ++++ file/magic/Magdir/filesystems 2010-07-14 19:54:33.318672139 +0200 +@@ -1523,3 +1523,19 @@ + # From: Daniel Novotny + 0 string DISO Delta ISO data, + >4 belong x version %d ++ ++# JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.) ++# See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags. ++# From: Adam Buchbinder ++0x8000 string JFS1 ++# Because it's text-only magic, check a binary value (version) to be sure. ++# Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be ++# mountable. ++>&0 lelong <3 JFS2 filesystem image ++# Label is followed by a UUID; we have to limit string length to avoid ++# appending the UUID in the case of a 16-byte label. ++>>&144 regex [\x20-\x7E]{1,16} (label "%s") ++>>&0 lequad x \b, %lld blocks ++>>&8 lelong x \b, blocksize %d ++>>&32 lelong&0x00000006 >0 (dirty) ++>>&36 lelong >0 (compressed) --- file-5.04.orig/debian/patches/245-magic-add-erlang.patch +++ file-5.04/debian/patches/245-magic-add-erlang.patch @@ -0,0 +1,12 @@ +Author: Nahuel Greco +Description: Adding new magics for Erlang DETS files (Closes: #589723). + +diff -Naurp file.orig/magic/Magdir/erlang file/magic/Magdir/erlang +--- file.orig/magic/Magdir/erlang 2010-07-11 00:17:48.680930074 +0200 ++++ file/magic/Magdir/erlang 2010-07-22 00:00:57.484882096 +0200 +@@ -17,3 +17,5 @@ + 79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2 + + 4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3 ++ ++0 bequad 0x0000000000ABCDEF Erlang DETS file --- file-5.04.orig/debian/patches/225-magic-add-bacula.patch +++ file-5.04/debian/patches/225-magic-add-bacula.patch @@ -0,0 +1,16 @@ +Author: Adam Buchbinder +Description: Add Bacula volume support (Closes: #556981). + +diff -Naurp file.orig/magic/Magdir/archive file/magic/Magdir/archive +--- file.orig/magic/Magdir/archive 2010-02-01 12:13:41.000000000 +0000 ++++ file/magic/Magdir/archive 2010-02-01 12:14:07.000000000 +0000 +@@ -834,3 +834,9 @@ + # Type: Parity Archive + # From: Daniel van Eeden + 0 string PAR2 Parity Archive Volume Set ++ ++# Bacula volume format. (Volumes always start with a block header.) ++# URL: http://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html ++# From: Adam Buchbinder ++12 string BB02 Bacula volume ++>20 bedate x \b, started %s --- file-5.04.orig/debian/patches/126-magic-update-7zip.patch +++ file-5.04/debian/patches/126-magic-update-7zip.patch @@ -0,0 +1,14 @@ +Author: Daniel Baumann +Description: Adding mime type for 7-zip (Closes: #552742). + +diff -Naurp file.orig/magic/Magdir/compress file/magic/Magdir/compress +--- file.orig/magic/Magdir/compress 2009-12-05 17:30:09.000000000 +0100 ++++ file/magic/Magdir/compress 2009-12-05 18:54:52.000000000 +0100 +@@ -187,6 +187,7 @@ + 0 string 7z\274\257\047\034 7-zip archive data, + >6 byte x version %d + >7 byte x \b.%d ++!:mime application/x-7z-compressed + + # Type: LZMA + # URL: http://www.7-zip.org/sdk.html --- file-5.04.orig/debian/patches/243-magic-add-git-index.patch +++ file-5.04/debian/patches/243-magic-add-git-index.patch @@ -0,0 +1,19 @@ +Author: Frédéric Brière +Description: Adding new magics for Git index files (Closes: #583679). + +diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision +--- file.orig/magic/Magdir/revision 2010-07-13 19:28:53.070674134 +0200 ++++ file/magic/Magdir/revision 2010-07-13 19:28:37.817698688 +0200 +@@ -28,6 +28,12 @@ + 0 string \377tOc Git pack index + >4 belong =2 \b, version 2 + ++# Type: Git index file ++# From: Frédéric Brière ++0 string DIRC Git index ++>4 belong >0 \b, version %d ++>>8 belong >0 \b, %d entries ++ + # Type: Mercurial bundles + # From: Seo Sanghyeon + 0 string HG10 Mercurial bundle, --- file-5.04.orig/debian/patches/105-magic-update-zip.patch +++ file-5.04/debian/patches/105-magic-update-zip.patch @@ -0,0 +1,15 @@ +Author: n/a +Description: Updating zip magic. + +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 + # --- file-5.04.orig/debian/patches/208-magic-add-ssh.patch +++ file-5.04/debian/patches/208-magic-add-ssh.patch @@ -0,0 +1,37 @@ +Author: Nicolas Collignon +Description: New magic for OpenSSH key files (Closes: #439537). + +diff -Naurp file.orig/magic/Magdir/ssh file/magic/Magdir/ssh +--- file.orig/magic/Magdir/ssh 1970-01-01 00:00:00.000000000 +0000 ++++ file/magic/Magdir/ssh 2009-02-18 11:50:34.000000000 +0000 +@@ -0,0 +1,8 @@ ++# Type: OpenSSH key files ++# From: Nicolas Collignon ++ ++0 string SSH\ PRIVATE\ KEY OpenSSH RSA1 private key, ++>28 string >\0 version %s ++ ++0 string ssh-dss\ OpenSSH DSA public key ++0 string ssh-rsa\ OpenSSH RSA public key +diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am +--- file.orig/magic/Makefile.am 2009-02-18 11:49:05.000000000 +0000 ++++ file/magic/Makefile.am 2009-02-18 11:51:14.000000000 +0000 +@@ -183,6 +183,7 @@ $(MAGIC_FRAGMENT_DIR)/softquad \ + $(MAGIC_FRAGMENT_DIR)/spec \ + $(MAGIC_FRAGMENT_DIR)/spectrum \ + $(MAGIC_FRAGMENT_DIR)/sql \ ++$(MAGIC_FRAGMENT_DIR)/ssh \ + $(MAGIC_FRAGMENT_DIR)/sun \ + $(MAGIC_FRAGMENT_DIR)/sysex \ + $(MAGIC_FRAGMENT_DIR)/teapot \ +diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in +--- file.orig/magic/Makefile.in 2009-02-18 11:49:05.000000000 +0000 ++++ file/magic/Makefile.in 2009-02-18 11:51:20.000000000 +0000 +@@ -345,6 +345,7 @@ $(MAGIC_FRAGMENT_DIR)/softquad \ + $(MAGIC_FRAGMENT_DIR)/spec \ + $(MAGIC_FRAGMENT_DIR)/spectrum \ + $(MAGIC_FRAGMENT_DIR)/sql \ ++$(MAGIC_FRAGMENT_DIR)/ssh \ + $(MAGIC_FRAGMENT_DIR)/sun \ + $(MAGIC_FRAGMENT_DIR)/sysex \ + $(MAGIC_FRAGMENT_DIR)/teapot \ --- file-5.04.orig/debian/patches/223-magic-add-blcr.patch +++ file-5.04/debian/patches/223-magic-add-blcr.patch @@ -0,0 +1,54 @@ +Author: Alan Woodland +Description: Add support for BLCR context files (Closes: #538407). + +diff -Naurp file.orig/magic/Magdir/blcr file/magic/Magdir/blcr +--- file.orig/magic/Magdir/blcr 1970-01-01 00:00:00.000000000 +0000 ++++ file/magic/Magdir/blcr 2009-07-25 16:16:17.000000000 +0000 +@@ -0,0 +1,25 @@ ++# Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files ++# http://ftg.lbl.gov/checkpoint ++0 string C\0\0\0R\0\0\0 BLCR ++>16 lelong 1 x86 ++>16 lelong 3 alpha ++>16 lelong 5 x86-64 ++>16 lelong 7 ARM ++>8 lelong x context data (little endian, version %d) ++# Uncomment the following only of your "file" program supports "search" ++#>0 search/1024 VMA\06 for kernel ++#>>&1 byte x %d. ++#>>&2 byte x %d. ++#>>&3 byte x %d ++0 string \0\0\0C\0\0\0R BLCR ++>16 belong 2 SPARC ++>16 belong 4 ppc ++>16 belong 6 ppc64 ++>16 belong 7 ARMEB ++>16 belong 8 SPARC64 ++>8 belong x context data (big endian, version %d) ++# Uncomment the following only of your "file" program supports "search" ++#>0 search/1024 VMA\06 for kernel ++#>>&1 byte x %d. ++#>>&2 byte x %d. ++#>>&3 byte x %d +diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am +--- file.orig/magic/Makefile.am 2009-07-25 16:15:25.000000000 +0000 ++++ file/magic/Makefile.am 2009-07-25 16:16:54.000000000 +0000 +@@ -25,6 +25,7 @@ $(MAGIC_FRAGMENT_DIR)/att3b \ + $(MAGIC_FRAGMENT_DIR)/audio \ + $(MAGIC_FRAGMENT_DIR)/basis \ + $(MAGIC_FRAGMENT_DIR)/bflt \ ++$(MAGIC_FRAGMENT_DIR)/blcr \ + $(MAGIC_FRAGMENT_DIR)/blender \ + $(MAGIC_FRAGMENT_DIR)/blit \ + $(MAGIC_FRAGMENT_DIR)/bout \ +diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in +--- file.orig/magic/Makefile.in 2009-07-25 16:15:25.000000000 +0000 ++++ file/magic/Makefile.in 2009-07-25 16:16:58.000000000 +0000 +@@ -190,6 +190,7 @@ $(MAGIC_FRAGMENT_DIR)/att3b \ + $(MAGIC_FRAGMENT_DIR)/audio \ + $(MAGIC_FRAGMENT_DIR)/basis \ + $(MAGIC_FRAGMENT_DIR)/bflt \ ++$(MAGIC_FRAGMENT_DIR)/blcr \ + $(MAGIC_FRAGMENT_DIR)/blender \ + $(MAGIC_FRAGMENT_DIR)/blit \ + $(MAGIC_FRAGMENT_DIR)/bout \ --- file-5.04.orig/debian/patches/123-magic-update-tgif.patch +++ file-5.04/debian/patches/123-magic-update-tgif.patch @@ -0,0 +1,15 @@ +Author: Hugo Graumann +Description: Updating tgif magic (Closes: #549601). + +diff -Naurp file.orig/magic/Magdir/tgif file/magic/Magdir/tgif +--- file.orig/magic/Magdir/tgif 2009-10-02 12:14:27.000000000 +0000 ++++ file/magic/Magdir/tgif 2009-10-04 21:49:54.000000000 +0000 +@@ -1,6 +1,5 @@ + #------------------------------------------------------------------------------ + # file(1) magic for tgif(1) files + # From Hendrik Scholz +- +-0 string %TGIF\ x Tgif file version %s +- ++0 string %TGIF\ Tgif file version ++>6 string x %s --- file-5.04.orig/debian/patches/232-magic-add-delta-rpm.patch +++ file-5.04/debian/patches/232-magic-add-delta-rpm.patch @@ -0,0 +1,16 @@ +Author: Daniel Novotny +Description: Add new magic for delta rpm files. + +diff -Naurp file.orig/magic/Magdir/rpm file/magic/Magdir/rpm +--- file.orig/magic/Magdir/rpm 2009-12-05 17:30:09.000000000 +0100 ++++ file/magic/Magdir/rpm 2009-12-05 17:56:35.000000000 +0100 +@@ -21,3 +21,9 @@ + >>8 beshort 11 MIPSel + >>8 beshort 12 ARM + >>10 string x %s ++ ++# Type: Delta RPM ++# From: Daniel Novotny (dnovotny@redhat.com) ++0 string drpm Delta RPM ++!:mime application/x-rpm ++>12 string x %s --- file-5.04.orig/debian/patches/116-magic-update-gimp.patch +++ file-5.04/debian/patches/116-magic-update-gimp.patch @@ -0,0 +1,14 @@ +Author: Ori Avtalion +Description: Adding mime entries for gimp (Closes: #501200). + +diff -Naurp file.orig/magic/Magdir/gimp file/magic/Magdir/gimp +--- file.orig/magic/Magdir/gimp 2008-10-19 14:31:15.000000000 +0000 ++++ file/magic/Magdir/gimp 2008-11-15 19:32:22.000000000 +0000 +@@ -10,6 +10,7 @@ + # ('Bucky' LaDieu, nega@vt.edu) + + 0 string gimp\ xcf GIMP XCF image data, ++!:mime image/x-xcf + >9 string file version 0, + >9 string v version + >>10 string >\0 %s, --- file-5.04.orig/debian/patches/218-magic-add-scribus.patch +++ file-5.04/debian/patches/218-magic-add-scribus.patch @@ -0,0 +1,16 @@ +Author: Werner Fink +Description: Adds new magics for Scribus. + +diff -Naurp file.orig/magic/Magdir/wordprocessors file/magic/Magdir/wordprocessors +--- file.orig/magic/Magdir/wordprocessors 2008-05-21 09:49:43.000000000 +0000 ++++ file/magic/Magdir/wordprocessors 2008-05-21 09:50:54.000000000 +0000 +@@ -153,3 +153,9 @@ + # From: Jamie Thompson + 0 string/cB \ ++0 string \ +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. --- file-5.04.orig/debian/patches/114-magic-update-llvm.patch +++ file-5.04/debian/patches/114-magic-update-llvm.patch @@ -0,0 +1,20 @@ +Author: Toeroek Edwin +Description: Updating llvm magic (Closes: #505805). + +diff -Naurp file.orig/magic/Magdir/llvm file/magic/Magdir/llvm +--- file.orig/magic/Magdir/llvm 2008-10-19 14:31:15.000000000 +0000 ++++ file/magic/Magdir/llvm 2008-11-15 19:15:51.000000000 +0000 +@@ -1,10 +1,12 @@ + + #------------------------------------------------------------------------------ + # llvm: file(1) magic for LLVM byte-codes +-# URL: http://llvm.cs.uiuc.edu/docs/BytecodeFormat.html#signature ++# URL: http://llvm.org/docs/BitCodeFormat.html + # From: Al Stone + + 0 string llvm LLVM byte-codes, uncompressed + 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 \xde\xc0\x17\x0b LLVM bitcode, wrapper ++0 string BC\xc0\xde LLVM bitcode --- file-5.04.orig/debian/patches/237-magic-add-paint-net.patch +++ file-5.04/debian/patches/237-magic-add-paint-net.patch @@ -0,0 +1,15 @@ +Author: Adam Buchbinder +Description: Adding new magics for Paint.NET images (Closes: #504779). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-12-05 18:46:53.000000000 +0100 ++++ file/magic/Magdir/images 2009-12-05 18:47:27.000000000 +0100 +@@ -667,3 +667,8 @@ + >4 leshort x \b%d + >28 lelong x \b, %dx + >32 lelong x \b%d ++ ++# Paint.NET file ++# From Adam Buchbinder ++0 string PDN3 Paint.NET image data ++!:mime image/x-paintnet --- file-5.04.orig/debian/patches/231-magic-add-delta-iso.patch +++ file-5.04/debian/patches/231-magic-add-delta-iso.patch @@ -0,0 +1,15 @@ +Author: Daniel Novotny +Description: Add new magic for delta iso files. + +diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig/magic/Magdir/filesystems 2009-12-05 17:53:02.000000000 +0100 ++++ file/magic/Magdir/filesystems 2009-12-05 17:54:22.000000000 +0100 +@@ -1421,3 +1421,8 @@ + # but can we do the << ? For now it's always 512 (0x200) anyway. + 0 string XFSM + >0x200 string XFSB XFS filesystem metadump image ++ ++# Type: delta ISO ++# From: Daniel Novotny ++0 string DISO Delta ISO data, ++>4 belong x version %d --- file-5.04.orig/debian/patches/122-magic-update-spectrum.patch +++ file-5.04/debian/patches/122-magic-update-spectrum.patch @@ -0,0 +1,31 @@ +Author: Adam Buchbinder +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 ++# ++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 --- file-5.04.orig/debian/patches/127-magic-update-lzma.patch +++ file-5.04/debian/patches/127-magic-update-lzma.patch @@ -0,0 +1,21 @@ +Author: Eloi Notario +Description: Updatng magic for lzma (Closes: #576950). + +diff -Naurp file.orig/magic/Magdir/compress file/magic/Magdir/compress +--- file.orig/magic/Magdir/compress 2010-03-27 11:55:00.000000000 +0100 ++++ file/magic/Magdir/compress 2010-07-11 00:07:23.645946357 +0200 +@@ -190,11 +190,9 @@ + >7 byte x \b.%d + + # Type: LZMA +-# URL: http://www.7-zip.org/sdk.html +-# From: Robert Millan and Reuben Thomas +-# Commented out because apparently not reliable (according to Debian +-# bug #364260) +-#0 string ]\000\000\200\000 LZMA compressed data ++0 lelong 0x8000005d LZMA compressed data, ++>5 lequad =0xffffffffffffffff streamed ++>5 lequad !0xffffffffffffffff non-streamed, size %lld + + # http://tukaani.org/xz/xz-file-format.txt + 0 ustring \xFD7zXZ\x00 xz compressed data --- file-5.04.orig/debian/patches/201-magic-add-pe5.patch +++ file-5.04/debian/patches/201-magic-add-pe5.patch @@ -0,0 +1,15 @@ +Author: Simon Horman +Description: New magic for the Ulead Photo Explorer5 image format (Closes: #339397). + +diff -Naurp file.org/magic/Magdir/images file/magic/Magdir/images +--- file.org/magic/Magdir/images 2009-02-02 15:55:49.000000000 +0000 ++++ file/magic/Magdir/images 2009-02-18 11:28:44.000000000 +0000 +@@ -605,3 +605,8 @@ + # JPEG 2000 Code Stream Bitmap + # From Petr Splichal + 0 string \xFF\x4F\xFF\x51\x00 JPEG-2000 Code Stream Bitmap data ++ ++# Type: Ulead Photo Explorer5 (.pe5) ++# URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) ++# From: Simon Horman ++0 string IIO2H Ulead Photo Explorer5 --- file-5.04.orig/debian/patches/125-magic-update-truetype-fonts.patch +++ file-5.04/debian/patches/125-magic-update-truetype-fonts.patch @@ -0,0 +1,22 @@ +Author: Adam Buchbinder +Description: Update magic of TrueType Collections (Closes: #545709). + +diff -Naurp file.orig/magic/Magdir/fonts file/magic/Magdir/fonts +--- file.orig/magic/Magdir/fonts 2009-12-05 18:26:41.000000000 +0100 ++++ file/magic/Magdir/fonts 2009-12-05 18:26:58.000000000 +0100 +@@ -58,7 +58,15 @@ + 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font + 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font + ++# TrueType/OpenType font collections (.ttc) ++# http://www.microsoft.com/typography/otspec/otff.htm + 0 string ttcf TrueType font collection data ++>4 belong 0x00010000 \b, 1.0 ++>>8 belong >0 \b, %d fonts ++>4 belong 0x00020000 \b, 2.0 ++>>8 belong >0 \b, %d fonts ++# 0x44454947 = 'DSIG' ++>>>16 belong 0x44534947 \b, digitally signed + + # Opentype font data from Avi Bercovich + 0 string OTTO OpenType font data --- file-5.04.orig/debian/patches/103-magic-update-reiserfs.patch +++ file-5.04/debian/patches/103-magic-update-reiserfs.patch @@ -0,0 +1,14 @@ +Author: Werner Fink +Description: Updating reiserfs magic to detect ReiserFS V3.6.19. + +diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig/magic/Magdir/filesystems 2008-05-04 14:12:49.000000000 +0000 ++++ file/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 --- file-5.04.orig/debian/patches/228-magic-add-mdmp.patch +++ file-5.04/debian/patches/228-magic-add-mdmp.patch @@ -0,0 +1,13 @@ +Author: Daniel Novotny +Description: Add new magic for MDMP crash report data files. + +diff -Naurp file.orig/magic/Magdir/misctools file/magic/Magdir/misctools +--- file.orig/magic/Magdir/misctools 2009-12-05 17:34:07.000000000 +0100 ++++ file/magic/Magdir/misctools 2009-12-05 17:35:01.000000000 +0100 +@@ -25,3 +25,6 @@ + # Extension: .lo + # Submitted by: Abel Cheung + 0 search/80 .lo\ -\ a\ libtool\ object\ file libtool object file ++ ++# From: Daniel Novotny ++0 string MDMP\x93\xA7 MDMP crash report data --- file-5.04.orig/debian/patches/202-magic-add-pmenu.patch +++ file-5.04/debian/patches/202-magic-add-pmenu.patch @@ -0,0 +1,15 @@ +Author: Edward Betts +Description: New magic for pmenu (Closes: #38543). + +diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands +--- file.orig/magic/Magdir/commands 2007-06-01 19:40:26.000000000 +0000 ++++ file/magic/Magdir/commands 2008-01-12 17:34:41.000000000 +0000 +@@ -55,3 +55,8 @@ + 0 string Zend\x00 PHP script Zend Optimizer data + + 0 string $! DCL command file ++ ++# Type: Pdmenu ++# URL: http://packages.debian.org/pdmenu ++# From: Edward Betts ++0 string #!/usr/bin/pdmenu Pdmenu configuration file text --- file-5.04.orig/debian/patches/215-magic-add-qdbm.patch +++ file-5.04/debian/patches/215-magic-add-qdbm.patch @@ -0,0 +1,15 @@ +Author: Benoit Sibaud +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 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 ++0 string \\[depot\\]\n\f Quick Database Manager, little endian ++0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian --- file-5.04.orig/debian/patches/905-doc-manpages-typo.patch +++ file-5.04/debian/patches/905-doc-manpages-typo.patch @@ -0,0 +1,17 @@ +Author: Adam Buchbinder +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 --- file-5.04.orig/debian/patches/132-magic-update-bio-rad.patch +++ file-5.04/debian/patches/132-magic-update-bio-rad.patch @@ -0,0 +1,28 @@ +Author: Adam Buchbinder +Description: Fix false positives in Bio-Rad PIC detection (Closes: #589056). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2010-07-14 10:21:47.000000000 -0400 ++++ file/magic/Magdir/images 2010-07-14 10:29:50.000000000 -0400 +@@ -551,11 +551,16 @@ + # Bio-Rad .PIC is an image format used by microscope control systems + # and related image processing software used by biologists. + # From: Vebjorn Ljosa +-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 ++>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 + # The description of *.mrw format can be found at --- file-5.04.orig/debian/patches/220-magic-add-bzr.patch +++ file-5.04/debian/patches/220-magic-add-bzr.patch @@ -0,0 +1,16 @@ +Author: Jelmer Vernooij +Description: Adds new magics for bzr (Closes: #488742). + +diff -Naurp file.orig/magic/Magdir/revision file/magic/Magdir/revision +--- file.orig/magic/Magdir/revision 2008-07-01 15:42:16.000000000 +0200 ++++ file/magic/Magdir/revision 2008-07-01 15:43:34.000000000 +0200 +@@ -22,3 +22,9 @@ + # From: Uwe Zeisberger + 0 string SVN-fs-dump-format-version: Subversion dumpfile + >28 string >\0 (version: %s) ++ ++# Type: Bazaar revision bundles and merge requests ++# URL: http://www.bazaar-vcs.org/ ++# From: Jelmer Vernooij ++0 string #\ Bazaar\ revision\ bundle\ v Bazaar Bundle ++0 string #\ Bazaar\ merge\ directive\ format Bazaar merge directive --- file-5.04.orig/debian/patches/226-magic-add-olympus.patch +++ file-5.04/debian/patches/226-magic-add-olympus.patch @@ -0,0 +1,20 @@ +Author: Adam Buchbinder +Description: Add Olympus ORF support (Closes: #519305). + +diff -Naurp file.orig/magic/Magdir/images file/magic/Magdir/images +--- file.orig/magic/Magdir/images 2009-11-18 19:44:34.000000000 +0000 ++++ file/magic/Magdir/images 2009-11-18 19:47:35.000000000 +0000 +@@ -624,3 +624,13 @@ + # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup + # From: Mathias Brodala + 0 string Xcur X11 cursor ++ ++# Type: Olympus ORF raw images. ++# URL: http://libopenraw.freedesktop.org/wiki/Olympus_ORF ++# From: Adam Buchbinder ++0 string MMOR Olympus ORF raw image data, big-endian ++!:mime image/x-olympus-orf ++0 string IIRO Olympus ORF raw image data, little-endian ++!:mime image/x-olympus-orf ++0 string IIRS Olympus ORF raw image data, little-endian ++!:mime image/x-olympus-orf --- file-5.04.orig/debian/patches/217-magic-add-cromfs.patch +++ file-5.04/debian/patches/217-magic-add-cromfs.patch @@ -0,0 +1,21 @@ +Author: Werner Fink +Description: Adds new magic for CROM filesystem. + +diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems +--- file.orig/magic/Magdir/filesystems 2010-02-01 12:11:02.000000000 +0000 ++++ file/magic/Magdir/filesystems 2010-02-01 12:12:16.000000000 +0000 +@@ -1500,3 +1500,14 @@ + 0 string XFSM + >0x200 string XFSB XFS filesystem metadump image + ++# Type: CROM filesystem ++# From: Werner Fink ++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 --- file-5.04.orig/debian/patches/129-magic-update-qemu.patch +++ file-5.04/debian/patches/129-magic-update-qemu.patch @@ -0,0 +1,91 @@ +Author: Adam Buchbinder +Description: + Update QEMU image magic, based on some reference docs and checked against + actual QEMU images (Closes: #451524). + +diff -Naurp file.orig//magic/Magdir/msdos file/magic/Magdir/msdos +--- file.orig//magic/Magdir/msdos 2010-07-13 17:00:52.246670740 +0200 ++++ file/magic/Magdir/msdos 2010-07-13 17:02:50.322699548 +0200 +@@ -639,43 +639,58 @@ + #-------------------------------------------------------------------- + # Qemu Emulator Images + # Lines written by Friedrich Schwittay (f.schwittay@yousable.de) +-# Made by reading sources and doing trial and error on existing +-# qcow files +-0 string QFI Qemu Image, Format: Qcow ++# Updated by Adam Buchbinder (adam.buchbinder@gmail.com) ++# Made by reading sources, reading documentation, and doing trial and error ++# on existing QCOW files ++0 string QFI\xFB QEMU QCOW Image + + # Uncomment the following line to display Magic (only used for debugging + # this magic number) + #>0 string x , Magic: %s + +-# There are currently 2 Versions: "1" and "2" +-# I do not use Version 2 and therefor branch here +-# but can assure: it works (tested on both versions) +-# Also my Qemu 0.9.0 which uses this Version 2 refuses +-# to start in its bios +->0x04 belong 2 , Version: 2 +->0x04 belong 1 , Version: 1 ++# There are currently 2 Versions: "1" and "2". ++# http://www.gnome.org/~markmc/qcow-image-format-version-1.html ++>4 belong 1 (v1) + +-# Using the existence of the Backing File Offset to Branch or not ++# Using the existence of the Backing File Offset to determine whether + # to read Backing File Information +->>0xc belong >0 , Backing File( Offset: %lu +->>>(0xc.L) string >\0 , Path: %s +- +-# Didn't get the trick here how qemu stores the "Size" at this Position +-# There is actually something stored but nothing makes sense +-# The header in the sources talks about it +-#>>>16 lelong x , Size: %lu ++>>12 belong >0 \b, has backing file ( ++# Note that this isn't a null-terminated string; the length is actually ++# (16.L). Assuming a null-terminated string happens to work usually, but it ++# may spew junk until it reaches a \0 in some cases. ++>>>(12.L) string >\0 \bpath %s + + # Modification time of the Backing File + # Really useful if you want to know if your backing + # file is still usable together with this image +->>>20 bedate x , Mtime: %s ) ++>>>>20 bedate >0 \b, mtime %s) ++>>>>20 default x \b) ++ ++# Size is stored in bytes in a big-endian u64. ++>>24 bequad x \b, %lld bytes ++ ++# 1 for AES encryption, 0 for none. ++>>36 belong 1 \b, AES-encrypted ++ ++# http://www.gnome.org/~markmc/qcow-image-format.html ++>4 belong 2 (v2) ++# Using the existence of the Backing File Offset to determine whether ++# to read Backing File Information ++>>8 bequad >0 \b, has backing file ++# Note that this isn't a null-terminated string; the length is actually ++# (16.L). Assuming a null-terminated string happens to work usually, but it ++# may spew junk until it reaches a \0 in some cases. Also, since there's no ++# .Q modifier, we just use the bottom four bytes as an offset. Note that if ++# the file is over 4G, and the backing file path is stored after the first 4G, ++# the wrong filename will be printed. (This should be (8.Q), when that syntax ++# is introduced.) ++>>>(12.L) string >\0 (path %s) ++>>24 bequad x \b, %lld bytes ++>>32 belong 1 \b, AES-encrypted + +-# Don't know how to calculate in Magicfiles +-# Also: this Information is not reliably +-# stored in image-files +->>24 lelong x , Disk Size could be: %d * 256 bytes ++>4 default x (unknown version) + +-0 string QEVM QEMU's suspend to disk image ++0 string QEVM QEMU suspend to disk image + + 0 string Bochs\ Virtual\ HD\ Image Bochs disk image, + >32 string x type %s, --- file-5.04.orig/debian/patches/130-magic-update-psf2.patch +++ file-5.04/debian/patches/130-magic-update-psf2.patch @@ -0,0 +1,42 @@ +Author: Adam Buchbinder +Description: + Adding detection of PSF2 fonts (Closes: #492035). + . + Linux console fonts come in two formats; PSF1 is already detected, but + PSF2, used for fonts which aren't 8-by-x shaped, was not. Add detection + of these fonts, and make the output look similar to the PSF1 output, + though with a different version number. + . + For more information, see: + http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html + +diff -Naurp file.orig/magic/Magdir/linux file/magic/Magdir/linux +--- file.orig/magic/Magdir/linux 2010-07-13 18:21:11.561672573 +0200 ++++ file/magic/Magdir/linux 2010-07-13 18:23:37.790780191 +0200 +@@ -46,12 +46,21 @@ + 2 string LILO Linux/i386 LILO boot/chain loader + # + # PSF fonts, from H. Peter Anvin +-0 leshort 0x0436 Linux/i386 PC Screen Font data, +->2 byte 0 256 characters, no directory, +->2 byte 1 512 characters, no directory, +->2 byte 2 256 characters, Unicode directory, +->2 byte 3 512 characters, Unicode directory, ++# Updated by Adam Buchbinder ++# See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html ++0 leshort 0x0436 Linux/i386 PC Screen Font v1 data, ++>2 byte&0x01 0 256 characters, ++>2 byte&0x01 !0 512 characters, ++>2 byte&0x02 0 no directory, ++>2 byte&0x02 !0 Unicode directory, + >3 byte >0 8x%d ++0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data, ++>16 lelong x %d characters, ++>12 lelong&0x01 0 no directory, ++>12 lelong&0x01 !0 Unicode directory, ++>24 lelong x %d ++>28 lelong x \bx%d ++ + # Linux swap file, from Daniel Quinlan + 4086 string SWAP-SPACE Linux/i386 swap file + # From: Jeff Bailey --- file-5.04.orig/debian/patches/242-magic-add-gdsii.patch +++ file-5.04/debian/patches/242-magic-add-gdsii.patch @@ -0,0 +1,17 @@ +Author: Євгеній Мещеряков +Description: Adding new magics for GDSII (Closes: #576462). + +diff -Naurp file.orig/magic/Magdir/scientific file/magic/Magdir/scientific +--- file.orig/magic/Magdir/scientific 2010-07-13 19:20:16.702717178 +0200 ++++ file/magic/Magdir/scientific 2010-07-13 19:19:47.037693749 +0200 +@@ -97,3 +97,10 @@ + >>>>&0 regex/1 [A-Z0-9]{4} Protein Data Bank data, ID Code %s + !:mime chemical/x-pdb + >>>>0 regex/1 [0-9]{2}-[A-Z]{3}-[0-9]{2} \b, %s ++ ++# Type: GDSII Stream file ++0 belong 0x00060002 GDSII Stream file ++>4 byte 0x00 ++>>5 byte x version %d.0 ++>4 byte >0x00 version %d ++>>5 byte x \b.%d --- file-5.04.orig/debian/patches/109-magic-update-mono.patch +++ file-5.04/debian/patches/109-magic-update-mono.patch @@ -0,0 +1,14 @@ +Author: n/a +Description: Updating Mono magic. + +diff -Naurp file.orig/magic/Magdir/msdos file/magic/Magdir/msdos +--- file.orig/magic/Magdir/msdos 2008-07-02 15:16:52.000000000 +0000 ++++ file/magic/Magdir/msdos 2008-07-15 13:33:43.000000000 +0000 +@@ -68,6 +68,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 --- file-5.04.orig/debian/patches/239-magic-add-datafork.patch +++ file-5.04/debian/patches/239-magic-add-datafork.patch @@ -0,0 +1,22 @@ +Author: Adam Buchbinder +Description: Add new magic for datafork fonts (Closes: #291908). + +diff -Naurp file.orig/magic/Magdir/macintosh file/magic/Magdir/macintosh +--- file.orig/magic/Magdir/macintosh 2010-07-11 00:17:48.692930622 +0200 ++++ file/magic/Magdir/macintosh 2010-07-13 17:26:21.169673589 +0200 +@@ -376,3 +376,15 @@ + + # From: Remi Mommsen + 0 string BOMStore Mac OS X bill of materials (BOM) file ++ ++# From: Adam Buchbinder ++# URL: http://en.wikipedia.org/wiki/Datafork_TrueType ++# Derived from the 'fondu' and 'ufond' source code (fondu.sf.net). 'sfnt' is ++# TrueType; 'POST' is PostScript. 'FONT' and 'NFNT' sometimes appear, but I ++# don't know what they mean. ++0 belong 0x100 ++>(0x4.L+24) beshort x ++>>&4 belong 0x73666e74 Mac OSX datafork font, TrueType ++>>&4 belong 0x464f4e54 Mac OSX datafork font, 'FONT' ++>>&4 belong 0x4e464e54 Mac OSX datafork font, 'NFNT' ++>>&4 belong 0x504f5354 Mac OSX datafork font, PostScript --- file-5.04.orig/debian/patches/211-magic-add-supercollider.patch +++ file-5.04/debian/patches/211-magic-add-supercollider.patch @@ -0,0 +1,15 @@ +Author: Mario Lang +Description: Adds new magic for SuperCollider 3 Synth Definition File Format (Closes: #284803). + +diff -Naurp file.orig/magic/Magdir/audio file/magic/Magdir/audio +--- file.orig/magic/Magdir/audio 2008-01-12 17:39:01.000000000 +0000 ++++ file/magic/Magdir/audio 2008-01-12 17:38:49.000000000 +0000 +@@ -576,3 +576,8 @@ + # URL: http://filext.com/detaillist.php?extdetail=AMR + # From: Russell Coker + 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony) ++ ++# Type: SuperCollider 3 Synth Definition File Format ++# From: Mario Lang ++0 string SCgf SuperCollider3 Synth Definition file, ++>4 belong x version %d --- file-5.04.orig/debian/patches/238-magic-add-dact.patch +++ file-5.04/debian/patches/238-magic-add-dact.patch @@ -0,0 +1,18 @@ +Author: n/a +Description: Adding new magics for DACT (Closes: #582945). + +diff -Naurp file.orig/magic/Magdir/compress file/magic/Magdir/compress +--- file.orig/magic/Magdir/compress 2010-06-21 00:50:12.608254012 +0200 ++++ file/magic/Magdir/compress 2010-06-21 00:53:13.743273541 +0200 +@@ -219,3 +219,11 @@ + # URL: http://tukaani.org/xz/ + 0 string \xfd\x37\x7a\x58\x5a\x00 XZ compressed data + !:mime application/x-xz ++ ++# Type: DACT compressed files ++0 long 0x444354C3 DACT compressed data ++>4 byte >-1 (version %i. ++>5 byte >-1 %i. ++>6 byte >-1 %i) ++>7 long >0 , original size: %i bytes ++>15 long >30 , block size: %i bytes --- file-5.04.orig/debian/patches/112-magic-update-linuxswap.patch +++ file-5.04/debian/patches/112-magic-update-linuxswap.patch @@ -0,0 +1,31 @@ +Author: Russell Coker +Description: Adding volume label and UUID support for linux swap (Closes: #489865). + +diff -Naurp file.orig/magic/Magdir/linux file/magic/Magdir/linux +--- file.orig/magic/Magdir/linux 2010-01-30 09:44:26.000000000 +0000 ++++ file/magic/Magdir/linux 2010-02-01 12:02:18.000000000 +0000 +@@ -58,11 +58,19 @@ + # Linux swap file with swsusp1 image, from Jeff Bailey + 4076 string SWAPSPACE2S1SUSPEND Linux/i386 swap file (new style) with SWSUSP1 image + # according to man page of mkswap (8) March 1999 +-4086 string SWAPSPACE2 Linux/i386 swap file (new style) +->0x400 long x %d (4K pages) +->0x404 long x size %d pages +->>4086 string SWAPSPACE2 +->>>1052 string >\0 Label %s ++# volume label and UUID Russell Coker ++# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/ ++4086 string SWAPSPACE2 Linux/i386 swap file (new style), ++>0x400 long x version %d (4K pages), ++>0x404 long x size %d pages, ++>1052 string \0 no label, ++>1052 string >\0 LABEL=%s, ++>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 + # From Daniel Novotny + # swap file for PowerPC + 65526 string SWAPSPACE2 Linux/ppc swap file --- file-5.04.orig/debian/patches/107-magic-update-os2.patch +++ file-5.04/debian/patches/107-magic-update-os2.patch @@ -0,0 +1,19 @@ +Author: n/a +Description: Updating OS/2 REXX magic. + +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 --- file-5.04.orig/debian/patches/205-magic-add-sgf.patch +++ file-5.04/debian/patches/205-magic-add-sgf.patch @@ -0,0 +1,21 @@ +Author: Eduardo Sabbatella +Description: New magic for SGF Smart Game Format + +diff -Naurp file.orig/magic/Magdir/games file/magic/Magdir/games +--- file.orig/magic/Magdir/games 2008-04-23 19:00:59.000000000 +0000 ++++ file/magic/Magdir/games 2008-07-15 13:41:19.000000000 +0000 +@@ -243,3 +243,14 @@ + >&0 string n\ NetImmerse game engine file + >>&0 regex [0-9a-z.]+ \b, version %s + ++# Type: SGF Smart Game Format ++# URL: http://www.red-bean.com/sgf/ ++# From: Eduardo Sabbatella ++2 regex/c \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format ++>2 regex/c GM\\[1\\] - Go Game ++>2 regex/c GM\\[6\\] - BackGammon Game ++>2 regex/c GM\\[11\\] - Hex Game ++>2 regex/c GM\\[18\\] - Amazons Game ++>2 regex/c GM\\[19\\] - Octi Game ++>2 regex/c GM\\[20\\] - Gess Game ++>2 regex/c GM\\[21\\] - twix Game --- file-5.04.orig/debian/patches/224-magic-add-lyx.patch +++ file-5.04/debian/patches/224-magic-add-lyx.patch @@ -0,0 +1,12 @@ +Author: Daniel Baumann +Description: Adding new magic for Lyx (Closes: #556194). + +diff -Naurp file.orig/magic/Magdir/tex file/magic/Magdir/tex +--- file.orig/magic/Magdir/tex 2009-10-02 14:14:27.000000000 +0200 ++++ file/magic/Magdir/tex 2009-11-15 11:02:53.000000000 +0100 +@@ -91,3 +91,5 @@ + 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file + + 0 search/1 @c\ @mapfile{ TeX font aliases text file ++ ++0 string \#LyX LyX document text --- file-5.04.orig/debian/patches/904-doc-manpages.patch +++ file-5.04/debian/patches/904-doc-manpages.patch @@ -0,0 +1,59 @@ +Author: Michael Piefel +Description: FIXME, and #417511. + +diff -Naurp file.orig/doc/file.man file/doc/file.man +--- file.orig/doc/file.man 2008-11-06 23:18:35.000000000 +0000 ++++ file/doc/file.man 2009-02-18 12:28:42.000000000 +0000 +@@ -51,7 +51,7 @@ meaning anything else (data is usually + or non-printable). + Exceptions are well-known file formats (core files, tar archives) + that are known to contain binary data. +-When modifying magic files or the program itself, make sure to ++When adding local definitions to /etc/magic, make sure to + .Em "preserve these keywords" . + Users depend on knowing that all the readable files in a directory + have the word +@@ -95,7 +95,8 @@ The concept of a + has been applied by extension to data files. + Any file with some invariant identifier at a small fixed + offset into the file can usually be described in this way. +-The information identifying these files is read from the compiled ++The information identifying these files is read from /etc/magic ++and the the compiled + magic file + .Pa __MAGIC__.mgc , + or the files in the directory +@@ -325,6 +326,11 @@ will not attempt to open + adds + .Sq .mgc + to the value of this variable as appropriate. ++However, ++.Pa file ++has to exist in order for ++.Pa file.mime ++to be considered. + The environment variable + .Dv POSIXLY_CORRECT + controls (on systems that support symbolic links), whether +@@ -400,12 +406,6 @@ will be distributed periodically. + The order of entries in the magic file is significant. + Depending on what system you are using, the order that + they are put together may be incorrect. +-If your old +-.Nm +-command uses a magic file, +-keep the old magic file around for comparison purposes +-(rename it to +-.Pa __MAGIC__.orig ). + .Sh EXAMPLES + .Bd -literal -offset indent + $ file file.c file /dev/{wd0a,hda} +@@ -547,3 +547,8 @@ on + .Dv ftp.astron.com + in the directory + .Dv /pub/file/file-X.YZ.tar.gz ++.Pp ++This Debian version adds a number of new magic entries. It can be ++obtained from every site carrying a Debian distribution (that is ++.Dv ftp.debian.org ++and mirrors). --- file-5.04.orig/debian/patches/227-magic-add-gstreamer.patch +++ file-5.04/debian/patches/227-magic-add-gstreamer.patch @@ -0,0 +1,20 @@ +Author: Josh Triplett +Description: + Add new magic for gstreamer binary registry files (Closes: #559117). + +diff -Naurp file.orig/magic/Magdir/misctools file/magic/Magdir/misctools +--- file.orig/magic/Magdir/misctools 2009-10-02 14:14:27.000000000 +0200 ++++ file/magic/Magdir/misctools 2009-12-05 17:28:02.000000000 +0100 +@@ -10,6 +10,12 @@ + 4 string gtktalog GNOME Catalogue (gtktalog) + >13 string >\0 version %s + ++# Summary: GStreamer binary registry ++# Extension: .bin ++# Submitted by: Josh Triplett ++0 belong 0xc0def00d GStreamer binary registry ++>4 string x \b, version %s ++ + # Summary: Libtool library file + # Extension: .la + # Submitted by: Tomasz Trojanowski --- file-5.04.orig/debian/patches/221-magic-add-git.patch +++ file-5.04/debian/patches/221-magic-add-git.patch @@ -0,0 +1,41 @@ +Author: Adam Buchbinder +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 + 0 string #\ v2\ git\ bundle\n Git bundle + ++# Type: Git pack ++# From: Adam Buchbinder ++# 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 ++0 string \377tOc Git pack index ++>4 belong =2 \b, version 2 ++ + # Type: Mercurial bundles + # From: Seo Sanghyeon + 0 string HG10 Mercurial bundle, --- file-5.04.orig/debian/patches/212-magic-add-xen.patch +++ file-5.04/debian/patches/212-magic-add-xen.patch @@ -0,0 +1,16 @@ +Author: Radek Vokal +Description: xen patch, recognizes Xen saved domain + +diff -Naurp file.orig/magic/Magdir/linux file/magic/Magdir/linux +--- file.orig/magic/Magdir/linux 2008-01-12 17:47:04.000000000 +0000 ++++ file/magic/Magdir/linux 2008-01-12 17:46:42.000000000 +0000 +@@ -248,3 +248,9 @@ + >72 string x %s] + >168 string x UUID: %s + ++# Type: Xen, the virtual machine monitor ++# From: Radek Vokal ++0 string LinuxGuestRecord Xen saved domain ++#>2 regex \(name\ [^)]*\) %s ++>20 search/256 (name (name ++>>&1 string x %s...) --- file-5.04.orig/debian/patches/219-magic-add-selinux.patch +++ file-5.04/debian/patches/219-magic-add-selinux.patch @@ -0,0 +1,53 @@ +Author: Russell Coker +Description: Adds new magics for SE Linux (Closes: #485886). + +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 ++ ++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 ##\ 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 \ --- file-5.04.orig/debian/patches/209-magic-add-ssl.patch +++ file-5.04/debian/patches/209-magic-add-ssl.patch @@ -0,0 +1,36 @@ +Author: Nicolas Collignon +Description: New magic for OpenSSL certificates/key files (Closes: #439537). + +diff -Naurp file.orig/magic/Magdir/ssl file/magic/Magdir/ssl +--- file.orig/magic/Magdir/ssl 1970-01-01 00:00:00.000000000 +0000 ++++ file/magic/Magdir/ssl 2009-02-18 11:53:12.000000000 +0000 +@@ -0,0 +1,7 @@ ++# Type: OpenSSL certificates/key files ++# From: Nicolas Collignon ++ ++0 string -----BEGIN\ CERTIFICATE----- PEM certificate ++0 string -----BEGIN\ CERTIFICATE\ REQ PEM certificate request ++0 string -----BEGIN\ RSA\ PRIVATE PEM RSA private key ++0 string -----BEGIN\ DSA\ PRIVATE PEM DSA private key +diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am +--- file.orig/magic/Makefile.am 2009-02-18 11:52:50.000000000 +0000 ++++ file/magic/Makefile.am 2009-02-18 11:53:27.000000000 +0000 +@@ -184,6 +184,7 @@ $(MAGIC_FRAGMENT_DIR)/spec \ + $(MAGIC_FRAGMENT_DIR)/spectrum \ + $(MAGIC_FRAGMENT_DIR)/sql \ + $(MAGIC_FRAGMENT_DIR)/ssh \ ++$(MAGIC_FRAGMENT_DIR)/ssl \ + $(MAGIC_FRAGMENT_DIR)/sun \ + $(MAGIC_FRAGMENT_DIR)/sysex \ + $(MAGIC_FRAGMENT_DIR)/teapot \ +diff -Naurp file.orig/magic/Makefile.in file/magic/Makefile.in +--- file.orig/magic/Makefile.in 2009-02-18 11:52:50.000000000 +0000 ++++ file/magic/Makefile.in 2009-02-18 11:53:31.000000000 +0000 +@@ -346,6 +346,7 @@ $(MAGIC_FRAGMENT_DIR)/spec \ + $(MAGIC_FRAGMENT_DIR)/spectrum \ + $(MAGIC_FRAGMENT_DIR)/sql \ + $(MAGIC_FRAGMENT_DIR)/ssh \ ++$(MAGIC_FRAGMENT_DIR)/ssl \ + $(MAGIC_FRAGMENT_DIR)/sun \ + $(MAGIC_FRAGMENT_DIR)/sysex \ + $(MAGIC_FRAGMENT_DIR)/teapot \ --- file-5.04.orig/debian/patches/102-magic-update-bash.patch +++ file-5.04/debian/patches/102-magic-update-bash.patch @@ -0,0 +1,17 @@ +Author: Daniel Baumann +Description: Adding another shebang path for bash. + +diff -Naurp file.orig/magic/Magdir/commands file/magic/Magdir/commands +--- file.orig/magic/Magdir/commands 2010-01-30 09:44:26.000000000 +0000 ++++ file/magic/Magdir/commands 2010-02-01 11:54:51.000000000 +0000 +@@ -57,6 +57,10 @@ + # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) + 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 +