fix #463809: rpmbuild rpmfcClassify: Assertion fails on some binary files

This commit is contained in:
Daniel Novotny 2008-10-07 14:57:51 +00:00
parent adf51588f4
commit 8b1b06a030
2 changed files with 56 additions and 1 deletions

47
file-4.26-devdrv.patch Normal file
View File

@ -0,0 +1,47 @@
diff -up file-4.26/magic/Magdir/msdos.devdrv file-4.26/magic/Magdir/msdos
--- file-4.26/magic/Magdir/msdos.devdrv 2008-10-07 16:00:29.000000000 +0200
+++ file-4.26/magic/Magdir/msdos 2008-10-07 16:02:01.000000000 +0200
@@ -293,22 +293,37 @@
>10 string >\x23
>>10 string !\x2e
>>>17 string <\x5B
->>>>10 string x \b, name: %.8s
-#UDMA.SYS KEYB.SYS CMD640X2.SYS
+>>>>10 string CMD640X2.SYS \b, name: %.8s
+#UDMA.SYS
>10 string <\x41
>>12 string >\x40
>>>10 string !$
->>>>12 string x \b, name: %.8s
-#BTCDROM.SYS ASPICD.SYS
+>>>>12 string UDMA.SYS \b, name: %.8s
+#CMD640X2.SYS
+>10 string <\x41
+>>12 string >\x40
+>>>10 string !$
+>>>>12 string CMD640X2.SYS \b, name: %.8s
+#KEYB.SYS
+>10 string <\x41
+>>12 string >\x40
+>>>10 string !$
+>>>>12 string KEYB.SYS \b, name: %.8s
+#BTCDROM.SYS
+>22 string >\x40
+>>22 string <\x5B
+>>>23 string <\x5B
+>>>>22 string BTCDROM.SYS \b, name: %.8s
+#ASPICD.SYS
>22 string >\x40
>>22 string <\x5B
>>>23 string <\x5B
->>>>22 string x \b, name: %.8s
+>>>>22 string ASPICD.SYS \b, name: %.8s
#ATAPICD.SYS
>76 string \0
>>77 string >\x40
>>>77 string <\x5B
->>>>77 string x \b, name: %.8s
+>>>>77 string ATAPICD.SYS \b, name: %.8s
#0 byte 0x8c DOS executable (COM)
# 0xeb conflicts with "sequent" magic
#0 byte 0xeb DOS executable (COM)

View File

@ -5,12 +5,13 @@
Summary: A utility for determining file types
Name: file
Version: 4.26
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
URL: http://www.darwinsys.com/file/
patch0: file-4.21-pybuild.patch
patch1: file-4.26-devdrv.patch
Requires: file-libs = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -57,6 +58,8 @@ file(1) command.
# Don't use -b -- it will lead to poblems when compiling magic file
%setup -q
%patch0 -p1
#fixes #463809
%patch1 -p1
iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
touch -r doc/libmagic.man doc/libmagic.man_
@ -130,6 +133,11 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Tue Oct 07 2008 Daniel Novotny <dnovotny@redhat.com> 4.26-2
- fix #463809: rpmbuild rpmfcClassify: Assertion fails on some binary files
(false positive test on "DOS device driver" crashed file(1)
and rpmbuild(8) failed)
* Mon Sep 15 2008 Daniel Novotny <dnovotny@redhat.com> 4.26-1
- new upstream version: fixes #462064