diff --git a/file-4.23-ext4.patch b/file-4.23-ext4.patch new file mode 100644 index 0000000..276c1de --- /dev/null +++ b/file-4.23-ext4.patch @@ -0,0 +1,59 @@ +diff -up file-4.23/magic/Magdir/filesystems.ext4 file-4.23/magic/Magdir/filesystems +--- file-4.23/magic/Magdir/filesystems.ext4 2008-02-01 09:45:02.000000000 +0100 ++++ file-4.23/magic/Magdir/filesystems 2008-02-01 09:46:23.000000000 +0100 +@@ -1025,19 +1025,42 @@ + >&-1248 belong 0 TIME optimization + >&-1248 belong 1 SPACE optimization + +-# ext2/ext3 filesystems - Andreas Dilger +-0x438 leshort 0xEF53 Linux +->0x44c lelong x rev %d +->0x43e leshort x \b.%d +->0x45c lelong ^0x0000004 ext2 filesystem data +->>0x43a leshort ^0x0000001 (mounted or unclean) +->0x45c lelong &0x0000004 ext3 filesystem data +->>0x460 lelong &0x0000004 (needs journal recovery) +->0x43a leshort &0x0000002 (errors) +->0x460 lelong &0x0000001 (compressed) +-#>0x460 lelong &0x0000002 (filetype) +-#>0x464 lelong &0x0000001 (sparse_super) +->0x464 lelong &0x0000002 (large files) ++# ext2/ext3 filesystems - Andreas Dilger ++# ext4 filesystem - Eric Sandeen ++0x438 leshort 0xEF53 Linux ++>0x44c lelong x rev %d ++>0x43e leshort x \b.%d ++# No journal? ext2 ++>0x45c lelong ^0x0000004 ext2 filesystem data ++>>0x43a leshort ^0x0000001 (mounted or unclean) ++# Has a journal? ext3 or ext4 ++>0x45c lelong &0x0000004 ++# and small INCOMPAT? ++>>0x460 lelong <0x0000040 ++# and small RO_COMPAT? ++>>>0x464 lelong <0x0000008 ext3 filesystem data ++# else large RO_COMPAT? ++>>>0x464 lelong >0x0000007 ext4 filesystem data ++# else large INCOMPAT? ++>>0x460 lelong >0x000003f ext4 filesystem data ++# General flags for any ext* fs ++>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) ++# 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) + + # SGI disk labels - Nathan Scott + 0 belong 0x0BE5A941 SGI disk label (volume header) diff --git a/file.spec b/file.spec index 6e9c016..18700f4 100644 --- a/file.spec +++ b/file.spec @@ -5,7 +5,7 @@ Summary: A utility for determining file types Name: file Version: 4.23 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -25,6 +25,7 @@ patch12: file-4.23-msoffice.patch patch13: file-4.21-efi.patch patch14: file-4.21-pybuild.patch patch15: file-4.23-tryelf.patch +patch15: file-4.23-ext4.patch Requires: file-libs = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -156,6 +157,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Fri Feb 01 2008 Tomas Smetana - 4.23-3 +- fix #430927 - detect ext4 filesystems + * Thu Jan 31 2008 Tomas Smetana - 4.23-2 - fix #430952 - wrong handling of ELF binaries