From 58804afd2934f146d9226f1f4baf0b9d3c66847cbf7dc223b11cd428c8145182 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 25 Oct 2016 07:03:35 +0000 Subject: [PATCH] Accepting request 436555 from home:jeff_mahoney:branches:Base:System - Add patch file-5.28-btrfs-image.dif to add support for files output by btrfs-image. OBS-URL: https://build.opensuse.org/request/show/436555 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=148 --- file-5.28-btrfs-image.dif | 62 +++++++++++++++++++++++++++++++++++++++ file.changes | 6 ++++ file.spec | 2 ++ 3 files changed, 70 insertions(+) create mode 100644 file-5.28-btrfs-image.dif diff --git a/file-5.28-btrfs-image.dif b/file-5.28-btrfs-image.dif new file mode 100644 index 0000000..457e457 --- /dev/null +++ b/file-5.28-btrfs-image.dif @@ -0,0 +1,62 @@ +From 27ec95a88943d858433a492940c694bac4bc54d0 Mon Sep 17 00:00:00 2001 +From: Jeff Mahoney +Date: Thu, 20 Oct 2016 11:29:21 -0400 +Subject: [PATCH] Add BTRFS Filesystem Metadata Image +Patch-mainline: Submitted to file@mx.gw.com, 20 Oct 2016 + +The btrfs-image in its uncompressed form contains a directly usable +superblock. Rather than duplicate the superblock printer, split +that out and use it with both the on-disk superblock and the ones +contained within the image. +--- + magic/Magdir/filesystems | 37 +++++++++++++++++++++++-------------- + 1 file changed, 23 insertions(+), 14 deletions(-) + +diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems +index 1e8e8a8..2579f48 100644 +--- a/magic/Magdir/filesystems ++++ b/magic/Magdir/filesystems +@@ -2210,20 +2210,29 @@ + >>0x10060 string >\0 lockproto %s) + + # Russell Coker +-0x10040 string _BHRfS_M BTRFS Filesystem +->0x1012b string >\0 label "%s", +->0x10090 lelong x sectorsize %d, +->0x10094 lelong x nodesize %d, +->0x10098 lelong x leafsize %d, +->0x10020 belong x UUID=%08x- +->0x10024 beshort x \b%04x- +->0x10026 beshort x \b%04x- +->0x10028 beshort x \b%04x- +->0x1002a beshort x \b%04x +->0x1002c belong x \b%08x, +->0x10078 lequad x %lld/ +->0x10070 lequad x \b%lld bytes used, +->0x10088 lequad x %lld devices ++0x10040 string _BHRfS_M ++>0x10000 use btrfs_super_block ++0 name btrfs_super_block ++>0x40 string _BHRfS_M BTRFS Filesystem ++>0x12b string >\0 label "%s", ++>0x90 lelong x sectorsize %d, ++>0x94 lelong x nodesize %d, ++>0x98 lelong x leafsize %d, ++>0x20 belong x UUID=%08x- ++>0x24 beshort x \b%04x- ++>0x26 beshort x \b%04x- ++>0x28 beshort x \b%04x- ++>0x2a beshort x \b%04x ++>0x2c belong x \b%08x, ++>0x78 lequad x %lld/ ++>0x70 lequad x \b%lld bytes used, ++>0x88 lequad x %lld devices ++ ++0 lequad 0xbd5c25e27295668b BTRFS Filesystem Metadata Image ++>20 byte 1 \b, zlib compressed ++>20 byte 0 \b, uncompressed ++>>0x440 string _BHRfS_M \b, contains ++>>>0x400 use btrfs_super_block + + # dvdisaster's .ecc + # From: "Nelson A. de Oliveira" diff --git a/file.changes b/file.changes index f8b9fec..c64e329 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 20 15:54:20 UTC 2016 - jeffm@suse.com + +- Add patch file-5.28-btrfs-image.dif + to add support for files output by btrfs-image. + ------------------------------------------------------------------- Wed Aug 24 14:16:09 UTC 2016 - dimstar@opensuse.org diff --git a/file.spec b/file.spec index 36eee69..948a8c8 100644 --- a/file.spec +++ b/file.spec @@ -64,6 +64,7 @@ Patch35: file-5.24-nitpick.dif Patch36: file-5.15-clear-invalid.patch Patch37: file-secure_getenv.patch Patch38: file-5.28-compress.patch +Patch39: file-5.28-btrfs-image.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _miscdir %{_datadir}/misc @@ -133,6 +134,7 @@ to develop applications that require the magic "file" interface. %patch37 -p1 -b .getenv # PATCH-FIX-UPSTREAM -- fix crash as found in build system %patch38 -p0 -b .rpmbuild +%patch39 -p1 -b .rpmbuild %patch -b .0 test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in rm -fv src/magic.h