From 867d7628dfe4510fa983a7af667b489ba85ef669 Mon Sep 17 00:00:00 2001 From: Tomas Smetana Date: Fri, 6 Jun 2008 11:32:05 +0000 Subject: [PATCH] - add GFS2 filesystem magic; thanks to Eric Sandeen - add LVM snapshots magic (#449755); thanks to Jason Farrell --- file-4.24-gfs2.patch | 13 +++++++++++++ file-4.24-lvm.patch | 18 ++++++++++++++++++ file.spec | 12 +++++++++--- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 file-4.24-gfs2.patch create mode 100644 file-4.24-lvm.patch diff --git a/file-4.24-gfs2.patch b/file-4.24-gfs2.patch new file mode 100644 index 0000000..88a3300 --- /dev/null +++ b/file-4.24-gfs2.patch @@ -0,0 +1,13 @@ +diff -up file-4.24/magic/Magdir/filesystems.orig file-4.24/magic/Magdir/filesystems +--- file-4.24/magic/Magdir/filesystems.orig 2008-06-04 08:16:57.000000000 +0200 ++++ file-4.24/magic/Magdir/filesystems 2008-06-04 08:19:34.000000000 +0200 +@@ -1302,3 +1302,9 @@ + # really le32 operation,destination,payloadsize (but quite predictable) + # 01 00 00 00 00 00 00 c0 00 02 00 00 + 0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware ++ ++# From Eric Sandeen ++# GFS2 ++0x10000 belong 0x01161970 GFS2 Filesystem ++>0x10024 belong x (blocksize %d, ++>0x10060 string >\0 lockproto %s) diff --git a/file-4.24-lvm.patch b/file-4.24-lvm.patch new file mode 100644 index 0000000..7799199 --- /dev/null +++ b/file-4.24-lvm.patch @@ -0,0 +1,18 @@ +diff -up file-4.24/magic/Magdir/linux.orig file-4.24/magic/Magdir/linux +--- file-4.24/magic/Magdir/linux.orig 2008-06-04 08:21:06.000000000 +0200 ++++ file-4.24/magic/Magdir/linux 2008-06-04 08:23:04.000000000 +0200 +@@ -231,6 +231,14 @@ + 0x618 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) + >(0x614.l+0x600) string >\0 , UUID: %s + ++# LVM snapshot ++# from Jason Farrel ++0 string SnAp LVM Snapshot (CopyOnWrite store) ++>4 lelong !0 - valid, ++>4 lelong 0 - invalid, ++>8 lelong x version = %d, ++>12 lelong x chunk_size = %d ++ + # SE Linux policy database + 0 lelong 0xf97cff8c SE Linux policy + >16 lelong x v%d diff --git a/file.spec b/file.spec index 860459b..1674296 100644 --- a/file.spec +++ b/file.spec @@ -5,17 +5,18 @@ Summary: A utility for determining file types Name: file Version: 4.24 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD Group: Applications/File Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz URL: http://www.darwinsys.com/file/ -Patch1: file-4.24-selinux.patch +Patch1: file-4.24-lvm.patch Patch2: file-4.24-oracle.patch Patch3: file-4.24-ELF.patch patch4: file-4.24-efi.patch patch5: file-4.21-pybuild.patch patch6: file-4.24-flc.patch +patch7: file-4.24-gfs2.patch Requires: file-libs = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -67,6 +68,7 @@ file(1) command. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ touch -r doc/libmagic.man doc/libmagic.man_ @@ -136,10 +138,14 @@ rm -rf $RPM_BUILD_ROOT %doc python/README COPYING python/example.py %{python_sitearch}/magic.so %if 0%{?fedora} >= 9 -%{python_sitearch}/*egg-info +#%{python_sitearch}/*egg-info %endif %changelog +* Fri Jun 06 2008 Tomas Smetana - 4.24-4 +- add GFS2 filesystem magic; thanks to Eric Sandeen +- add LVM snapshots magic (#449755); thanks to Jason Farrell + * Wed Jun 04 2008 Tomas Smetana - 4.24-3 - drop patches that do nothing in recent build system - create the text magic file during installation