From 562a052d0933fc84f4c08f7eeb964a643ea89e72d91c7453377e9360f927f111 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 9 Apr 2014 16:17:26 +0000 Subject: [PATCH] Accepting request 229461 from filesystems Fixed the changelog, otherwise same as the previous submitreq. OBS-URL: https://build.opensuse.org/request/show/229461 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsprogs?expand=0&rev=37 --- ...s-progs-fix-loop-device-mount-checks.patch | 80 -------------- ...-progs-update-options-in-find-root.c.patch | 49 --------- ...add-some-verbose-output-to-find-root.patch | 47 -------- ...-Check-metadata-mirrors-in-find-root.patch | 21 ++-- btrfs-progs-v3.12.tar.bz2 | 3 - btrfs-progs-v3.14.tar.bz2 | 3 + btrfsprogs.changes | 22 ++++ btrfsprogs.spec | 103 ++++++++---------- local-version-override.patch | 4 +- 9 files changed, 82 insertions(+), 250 deletions(-) delete mode 100644 0162-btrfs-progs-fix-loop-device-mount-checks.patch delete mode 100644 0165-Revert-btrfs-progs-update-options-in-find-root.c.patch delete mode 100644 0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch delete mode 100644 btrfs-progs-v3.12.tar.bz2 create mode 100644 btrfs-progs-v3.14.tar.bz2 diff --git a/0162-btrfs-progs-fix-loop-device-mount-checks.patch b/0162-btrfs-progs-fix-loop-device-mount-checks.patch deleted file mode 100644 index 7118c2e..0000000 --- a/0162-btrfs-progs-fix-loop-device-mount-checks.patch +++ /dev/null @@ -1,80 +0,0 @@ -From fa69bc83f210e7940adf1051709178e493f58002 Mon Sep 17 00:00:00 2001 -From: David Sterba -Date: Thu, 27 Oct 2011 16:23:14 -0400 -Subject: [PATCH 162/170] btrfs-progs: fix loop device mount checks - -When creating a fs on a loop device, mkfs checks whether the same file -is not already mounted, but the backing file of another loop dev may not -exist and mkfs fails. - -Signed-off-by: David Sterba ---- - utils.c | 34 +++++++++++++++++++--------------- - 1 file changed, 19 insertions(+), 15 deletions(-) - -Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/utils.c -=================================================================== ---- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/utils.c -+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/utils.c -@@ -831,11 +831,11 @@ static int is_same_blk_file(const char* - char real_a[PATH_MAX]; - char real_b[PATH_MAX]; - -- if(!realpath(a, real_a) || -- !realpath(b, real_b)) -- { -- return -errno; -- } -+ if(!realpath(a, real_a)) -+ strcpy(real_a, a); -+ -+ if (!realpath(b, real_b)) -+ strcpy(real_b, b); - - /* Identical path? */ - if(strcmp(real_a, real_b) == 0) -@@ -876,8 +876,8 @@ static int is_same_loop_file(const char* - { - char res_a[PATH_MAX]; - char res_b[PATH_MAX]; -- const char* final_a; -- const char* final_b; -+ const char* final_a = NULL; -+ const char* final_b = NULL; - int ret; - - /* Resolve a if it is a loop device */ -@@ -886,10 +886,12 @@ static int is_same_loop_file(const char* - return 0; - return ret; - } else if (ret) { -- if ((ret = resolve_loop_device(a, res_a, sizeof(res_a))) < 0) -- return ret; -- -- final_a = res_a; -+ if ((ret = resolve_loop_device(a, res_a, sizeof(res_a))) < 0) { -+ if (errno != EPERM) -+ return ret; -+ } -+ else -+ final_a = res_a; - } else { - final_a = a; - } -@@ -900,10 +902,12 @@ static int is_same_loop_file(const char* - return 0; - return ret; - } else if (ret) { -- if((ret = resolve_loop_device(b, res_b, sizeof(res_b))) < 0) -- return ret; -- -- final_b = res_b; -+ if ((ret = resolve_loop_device(b, res_b, sizeof(res_b))) < 0) { -+ if (errno != EPERM) -+ return ret; -+ } -+ else -+ final_b = res_b; - } else { - final_b = b; - } diff --git a/0165-Revert-btrfs-progs-update-options-in-find-root.c.patch b/0165-Revert-btrfs-progs-update-options-in-find-root.c.patch deleted file mode 100644 index 0378a07..0000000 --- a/0165-Revert-btrfs-progs-update-options-in-find-root.c.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0c26634f696f3ced9636de0ca2fa5b7b9d732bc3 Mon Sep 17 00:00:00 2001 -From: David Sterba -Date: Thu, 7 Feb 2013 18:00:23 +0100 -Subject: [PATCH 165/170] Revert "btrfs-progs: update options in find-root.c" - -This reverts commit 7f04a61b6da5a1231454b07e3e37cc24601a76e4. - -Reintroduce the 'verbose' option. - -Signed-off-by: David Sterba ---- - btrfs-find-root.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c -=================================================================== ---- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/btrfs-find-root.c -+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c -@@ -35,6 +35,7 @@ - #include "utils.h" - #include "crc32c.h" - -+static int verbose = 0; - static u16 csum_size = 0; - static u64 search_objectid = BTRFS_ROOT_TREE_OBJECTID; - static u64 search_generation = 0; -@@ -42,7 +43,7 @@ static unsigned long search_level = 0; - - static void usage(void) - { -- fprintf(stderr, "Usage: find-roots [-o search_objectid] " -+ fprintf(stderr, "Usage: find-roots [-v] " - "[ -g search_generation ] [ -l search_level ] \n"); - } - -@@ -286,9 +287,12 @@ int main(int argc, char **argv) - int opt; - int ret; - -- while ((opt = getopt(argc, argv, "l:o:g:")) != -1) { -+ while ((opt = getopt(argc, argv, "l:o:g:v")) != -1) { - switch(opt) { - errno = 0; -+ case 'v': -+ verbose++; -+ break; - case 'o': - search_objectid = (u64)strtoll(optarg, NULL, - 10); diff --git a/0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch b/0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch deleted file mode 100644 index e5d25ed..0000000 --- a/0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3d75a27a857ae81f7cd64de886a293208be15af6 Mon Sep 17 00:00:00 2001 -From: Josef Bacik -Date: Wed, 4 Jan 2012 10:03:33 -0500 -Subject: [PATCH 166/170] Btrfs-progs: add some verbose output to find-root - -Trying to track down why we can't find roots, add some verbose output so we know -what chunks we're scanning and when we move to new chunks. Thanks, - -Signed-off-by: Josef Bacik ---- - btrfs-find-root.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c -=================================================================== ---- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/btrfs-find-root.c -+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/btrfs-find-root.c -@@ -229,6 +229,10 @@ static int find_root(struct btrfs_root * - return ret; - - offset = metadata_offset; -+ if (verbose) -+ printf("Checking metadata chunk %Lu, size %Lu\n", -+ metadata_offset, metadata_size); -+ - while (1) { - u64 map_length = 4096; - u64 type; -@@ -239,6 +243,8 @@ static int find_root(struct btrfs_root * - break; - } - if (offset >= (metadata_offset + metadata_size)) { -+ if (verbose) -+ printf("Moving to the next metadata chunk\n"); - err = btrfs_next_metadata(&root->fs_info->mapping_tree, - &metadata_offset, - &metadata_size); -@@ -247,6 +253,9 @@ static int find_root(struct btrfs_root * - break; - } - offset = metadata_offset; -+ if (verbose) -+ printf("Checking metadata chunk %Lu, size %Lu" -+ "\n", metadata_offset, metadata_size); - } - err = __btrfs_map_block(&root->fs_info->mapping_tree, READ, - offset, &map_length, &type, diff --git a/0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch b/0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch index eb84c32..e03fe55 100644 --- a/0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch +++ b/0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch @@ -8,11 +8,11 @@ Signed-off-by: David Marcin btrfs-find-root.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -diff --git a/btrfs-find-root.c b/btrfs-find-root.c -index 7f7b64f..ffbdde1 100644 ---- a/btrfs-find-root.c -+++ b/btrfs-find-root.c -@@ -236,6 +236,8 @@ static int find_root(struct btrfs_root *root) +Index: btrfs-progs-v3.14/btrfs-find-root.c +=================================================================== +--- btrfs-progs-v3.14.orig/btrfs-find-root.c ++++ btrfs-progs-v3.14/btrfs-find-root.c +@@ -230,6 +230,8 @@ static int find_root(struct btrfs_root * while (1) { u64 map_length = 4096; u64 type; @@ -21,9 +21,9 @@ index 7f7b64f..ffbdde1 100644 if (offset > btrfs_super_total_bytes(root->fs_info->super_copy)) { -@@ -257,9 +259,11 @@ static int find_root(struct btrfs_root *root) - printf("Checking metadata chunk %Lu, size %Lu" - "\n", metadata_offset, metadata_size); +@@ -246,9 +248,11 @@ static int find_root(struct btrfs_root * + } + offset = metadata_offset; } + mirror_num = 1; + again: @@ -34,7 +34,7 @@ index 7f7b64f..ffbdde1 100644 if (err) { offset += map_length; continue; -@@ -278,9 +282,16 @@ static int find_root(struct btrfs_root *root) +@@ -267,9 +271,16 @@ static int find_root(struct btrfs_root * err = read_physical(root, fd, offset, bytenr, map_length); if (!err) { @@ -51,6 +51,3 @@ index 7f7b64f..ffbdde1 100644 ret = err; break; } --- -1.8.3.1 - diff --git a/btrfs-progs-v3.12.tar.bz2 b/btrfs-progs-v3.12.tar.bz2 deleted file mode 100644 index 8b011fc..0000000 --- a/btrfs-progs-v3.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db4e7d64f3b0f3c9faf37cbd5a00b93f44c37f2853ed82ec3ffad9ca620daed4 -size 274256 diff --git a/btrfs-progs-v3.14.tar.bz2 b/btrfs-progs-v3.14.tar.bz2 new file mode 100644 index 0000000..c95d2df --- /dev/null +++ b/btrfs-progs-v3.14.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5680d1ae0a88f6f07350e1dd8e81a1d6933bf7eccd4233c9d24f5a7b8f482bd +size 281254 diff --git a/btrfsprogs.changes b/btrfsprogs.changes index 13d3b9a..a6ab385 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Tue Apr 8 11:42:43 UTC 2014 - dsterba@suse.cz + +- fsck: fixes and enahancements to --init-extent-tree mode +- fsck: chunk-recover updates +- scrub: add force option -f +- send: check if subvolumes are read-only +- subvol snapshot: add options to affect commit behaviour +- btrfs: add properties command group +- restore: add dry-run option +- restore: fix restoring of compressed files +- mkfs: support for no-holes feature +- mkfs: option -r deals with hardlinks and relative paths +- mkfs: discard phase is interruptible +- documentation updates + +- cleaned spec file +- Removed patches: + * 0162-btrfs-progs-fix-loop-device-mount-checks.patch + * 0165-Revert-btrfs-progs-update-options-in-find-root.c.patch + * 0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch + ------------------------------------------------------------------- Mon Nov 25 14:10:55 CET 2013 - dsterba@suse.cz diff --git a/btrfsprogs.spec b/btrfsprogs.spec index da7e8da..0bd54b9 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -1,7 +1,7 @@ # # spec file for package btrfsprogs # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,34 +16,27 @@ # +%define tar_version v3.14 Name: btrfsprogs -Url: http://btrfs.wiki.kernel.org/index.php/Main_Page -Version: 3.12 +Version: 3.14 Release: 0 -%define tar_version v3.12 Summary: Utilities for the Btrfs filesystem License: GPL-2.0 Group: System/Filesystems +Url: http://btrfs.wiki.kernel.org/index.php/Main_Page #Git-Web: http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git #Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs # git archive --format=tar --prefix=btrfs-progs-`git describe --tags --match "v*"`/ HEAD > %D/btrfs-progs-`git describe --tags --match "v*"`.tar Source: btrfs-progs-%{tar_version}.tar.bz2 Source1: boot-btrfs.sh Source4: setup-btrfs.sh - -Patch162: 0162-btrfs-progs-fix-loop-device-mount-checks.patch Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch Patch164: 0164-btrfs-progs-convert-set-label-or-copy-from-origin.patch -Patch165: 0165-Revert-btrfs-progs-update-options-in-find-root.c.patch -Patch166: 0166-Btrfs-progs-add-some-verbose-output-to-find-root.patch Patch167: 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch Patch168: 0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch Patch169: 0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch Patch170: 0170-btrfs-progs-In-find-root-dump-bytenr-for-every-slot.patch - Patch1000: local-version-override.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: libblkid-devel @@ -55,6 +48,7 @@ BuildRequires: zlib-devel # for /bin/true Requires: coreutils Supplements: filesystem(btrfs) +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Utilities needed to create and maintain btrfs file systems under Linux. @@ -70,7 +64,7 @@ applications to interface with btrfs. %package -n libbtrfs-devel Summary: Include Files and Libraries for developing with Btrfs Group: Development/Libraries/C and C++ -Requires: %{name} = %{version}-%{release} +Requires: libbtrfs0 %description -n libbtrfs-devel This package contains the libraries and headers files for developers to @@ -78,11 +72,8 @@ build applications to interface with btrfs. %prep %setup -q -n btrfs-progs-%{tar_version} -%patch162 -p1 %patch163 -p1 %patch164 -p1 -%patch165 -p1 -%patch166 -p1 %patch167 -p1 %patch168 -p1 %patch169 -p1 @@ -95,43 +86,40 @@ make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \ btrfs-find-root %install -make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} -install -m 0755 -d ${RPM_BUILD_ROOT}/%{_sbindir} -install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir} +make install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} +install -m 0755 -d %{buildroot}/%{_sbindir} +install -m 0755 -d %{buildroot}/%{_bindir} # move some utilities out of /usr/sbin -mv ${RPM_BUILD_ROOT}/%{_sbindir}/btrfs-map-logical ${RPM_BUILD_ROOT}/%{_bindir} +mv %{buildroot}/%{_sbindir}/btrfs-map-logical %{buildroot}/%{_bindir} # mkinitrd rescue utilities -install -m 0755 btrfs-zero-log ${RPM_BUILD_ROOT}/%{_sbindir} -install -m 0755 btrfs-select-super ${RPM_BUILD_ROOT}/%{_sbindir} -install -m 0755 btrfs-image ${RPM_BUILD_ROOT}/%{_sbindir} -install -m 0755 btrfstune ${RPM_BUILD_ROOT}/%{_sbindir} -install -m 0755 btrfs-find-root ${RPM_BUILD_ROOT}/%{_sbindir} +install -m 0755 btrfs-zero-log %{buildroot}/%{_sbindir} +install -m 0755 btrfs-select-super %{buildroot}/%{_sbindir} +install -m 0755 btrfs-image %{buildroot}/%{_sbindir} +install -m 0755 btrfstune %{buildroot}/%{_sbindir} +install -m 0755 btrfs-find-root %{buildroot}/%{_sbindir} #UsrMerge -install -m 0755 -d ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-zero-log ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-convert ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-select-super ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-image ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfstune ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfsck ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-find-root ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-debug-tree ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/btrfs-show-super ${RPM_BUILD_ROOT}/sbin -ln -s %{_sbindir}/mkfs.btrfs ${RPM_BUILD_ROOT}/sbin +install -m 0755 -d %{buildroot}/sbin +ln -s %{_sbindir}/btrfs %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-zero-log %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-convert %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-select-super %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-image %{buildroot}/sbin +ln -s %{_sbindir}/btrfstune %{buildroot}/sbin +ln -s %{_sbindir}/btrfsck %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-find-root %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-debug-tree %{buildroot}/sbin +ln -s %{_sbindir}/btrfs-show-super %{buildroot}/sbin +ln -s %{_sbindir}/mkfs.btrfs %{buildroot}/sbin +ln -s %{_sbindir}/fsck.btrfs %{buildroot}/sbin #EndUsrMerge -# command line options are not compatible (bnc#599224) -echo -e '#!/bin/sh\nexit 0' > ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs -chmod +x ${RPM_BUILD_ROOT}/%{_sbindir}/fsck.btrfs #UsrMerge -ln -s %{_sbindir}/fsck.btrfs ${RPM_BUILD_ROOT}/sbin #EndUsrMerge -install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ -install -m 0755 %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ -install -m 0755 %{S:4} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ -rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la +install -d -m0755 %{buildroot}/lib/mkinitrd/scripts/ +install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/ +install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/ +find %{buildroot} -type f -name "*.la" -delete -print # don't install .a for now -rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a +rm -f %{buildroot}/%{_libdir}/*.a %post -n libbtrfs0 -p /sbin/ldconfig @@ -169,18 +157,19 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a /lib/mkinitrd/scripts/boot-btrfs.sh /lib/mkinitrd/scripts/setup-btrfs.sh # other -/usr/bin/btrfs-map-logical -%_mandir/man8/btrfs-image.8.gz -%_mandir/man8/btrfsck.8.gz -%_mandir/man8/mkfs.btrfs.8.gz -%_mandir/man8/btrfs.8.gz -%_mandir/man8/btrfs-convert.8.gz -%_mandir/man8/btrfs-debug-tree.8.gz -%_mandir/man8/btrfs-find-root.8.gz -%_mandir/man8/btrfs-map-logical.8.gz -%_mandir/man8/btrfs-show-super.8.gz -%_mandir/man8/btrfs-zero-log.8.gz -%_mandir/man8/btrfstune.8.gz +%{_bindir}/btrfs-map-logical +%{_mandir}/man8/btrfs-image.8.gz +%{_mandir}/man8/btrfsck.8.gz +%{_mandir}/man8/fsck.btrfs.8.gz +%{_mandir}/man8/mkfs.btrfs.8.gz +%{_mandir}/man8/btrfs.8.gz +%{_mandir}/man8/btrfs-convert.8.gz +%{_mandir}/man8/btrfs-debug-tree.8.gz +%{_mandir}/man8/btrfs-find-root.8.gz +%{_mandir}/man8/btrfs-map-logical.8.gz +%{_mandir}/man8/btrfs-show-super.8.gz +%{_mandir}/man8/btrfs-zero-log.8.gz +%{_mandir}/man8/btrfstune.8.gz %files -n libbtrfs0 %defattr(-, root, root) diff --git a/local-version-override.patch b/local-version-override.patch index 9815f59..ac87eb2 100644 --- a/local-version-override.patch +++ b/local-version-override.patch @@ -6,8 +6,8 @@ Index: btrfs-progs-v0.19-116-g13eced9/version.sh # Copyright 2008, Oracle # Released under the GNU GPLv2 --v="v3.12" -+v="v3.12+20131125" +-v="v3.14" ++v="v3.14+20140408" which git &> /dev/null if [ $? == 0 -a -d .git ]; then