Dear Maintainer,
(I would have filed this upstream but their bug tracker was down.)
In developing diffoscope we've come across many cases of file(1) misdetecting
other things as DOS/MBR boot sector. I've been dismissing these as corner cases
but now there are just too many to ignore. One example is attached.
$ file control.tar.gz
control.tar.gz: DOS/MBR boot sector; partition 1 : ID=0xd8, [..]
I git cloned https://github.com/file/file and ran my tests:
| (master)$ git clean -fdx && git reset --hard && autoreconf -i && ./configure && make && src/file -m magic/magic:magic/magic.mgc ../control.tar.gz
| [..]
| ../control.tar.gz: DOS/MBR boot sector; partition 1 : [..]
After some experimenting I found a good commit:
| $ git checkout FILE5_00
| $ git clean -fdx && git reset --hard && autoreconf -i && ./configure && make && src/file -m magic/magic:magic/magic.mgc ../control.tar.gz
| [..]
| ../control.tar.gz: gzip compressed data, from Unix, max compression
So we have a good and a bad revision, let's run a git-bisect then.
$ git bisect start
$ git bisect good FILE5_00
$ git bisect bad origin/master
$ git bisect run sh -c 'git clean -fdx && git reset --hard && autoreconf -i && ./configure && make && src/file -m magic/magic:magic/magic.mgc ../control.tar.gz | grep -i gzip; x=$?; git reset --hard; git clean -fdx; exit $x'
[..]
51ceb2bd7a728fb307f190ee68fe53cd0392fb28 is the first bad commit
commit 51ceb2bd7a728fb307f190ee68fe53cd0392fb28
Author: Christos Zoulas <christos@zoulas.com>
Date: Fri Oct 12 16:10:39 2012 +0000
from Joerg Jenderek
Hi,
2 files (TDSK-5120x32b.img and TDSK-5120x64b.img ) in directory bootsector
are characterized wrong ( see output bootsector-5.11.txt) .
[..]
:040000 040000 b0a083f5b8453b812de42749e612aff7673b42f3 ef0015db2bdd886d15d6993c66d6562fed5572e6 M magic
bisect run success
X