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
This commit is contained in:
Stephan Kulow 2014-04-09 16:17:26 +00:00 committed by Git OBS Bridge
commit 9444a05ac7
9 changed files with 82 additions and 250 deletions

View File

@ -1,80 +0,0 @@
From fa69bc83f210e7940adf1051709178e493f58002 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
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 <dsterba@suse.cz>
---
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;
}

View File

@ -1,49 +0,0 @@
From 0c26634f696f3ced9636de0ca2fa5b7b9d732bc3 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
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 <dsterba@suse.cz>
---
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 ] <device>\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);

View File

@ -1,47 +0,0 @@
From 3d75a27a857ae81f7cd64de886a293208be15af6 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
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 <josef@redhat.com>
---
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,

View File

@ -8,11 +8,11 @@ Signed-off-by: David Marcin <djmarcin@google.com>
btrfs-find-root.c | 13 ++++++++++++- btrfs-find-root.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-) 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/btrfs-find-root.c b/btrfs-find-root.c Index: btrfs-progs-v3.14/btrfs-find-root.c
index 7f7b64f..ffbdde1 100644 ===================================================================
--- a/btrfs-find-root.c --- btrfs-progs-v3.14.orig/btrfs-find-root.c
+++ b/btrfs-find-root.c +++ btrfs-progs-v3.14/btrfs-find-root.c
@@ -236,6 +236,8 @@ static int find_root(struct btrfs_root *root) @@ -230,6 +230,8 @@ static int find_root(struct btrfs_root *
while (1) { while (1) {
u64 map_length = 4096; u64 map_length = 4096;
u64 type; u64 type;
@ -21,9 +21,9 @@ index 7f7b64f..ffbdde1 100644
if (offset > if (offset >
btrfs_super_total_bytes(root->fs_info->super_copy)) { btrfs_super_total_bytes(root->fs_info->super_copy)) {
@@ -257,9 +259,11 @@ static int find_root(struct btrfs_root *root) @@ -246,9 +248,11 @@ static int find_root(struct btrfs_root *
printf("Checking metadata chunk %Lu, size %Lu" }
"\n", metadata_offset, metadata_size); offset = metadata_offset;
} }
+ mirror_num = 1; + mirror_num = 1;
+ again: + again:
@ -34,7 +34,7 @@ index 7f7b64f..ffbdde1 100644
if (err) { if (err) {
offset += map_length; offset += map_length;
continue; 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); err = read_physical(root, fd, offset, bytenr, map_length);
if (!err) { if (!err) {
@ -51,6 +51,3 @@ index 7f7b64f..ffbdde1 100644
ret = err; ret = err;
break; break;
} }
--
1.8.3.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db4e7d64f3b0f3c9faf37cbd5a00b93f44c37f2853ed82ec3ffad9ca620daed4
size 274256

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5680d1ae0a88f6f07350e1dd8e81a1d6933bf7eccd4233c9d24f5a7b8f482bd
size 281254

View File

@ -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 Mon Nov 25 14:10:55 CET 2013 - dsterba@suse.cz

View File

@ -1,7 +1,7 @@
# #
# spec file for package btrfsprogs # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,34 +16,27 @@
# #
%define tar_version v3.14
Name: btrfsprogs Name: btrfsprogs
Url: http://btrfs.wiki.kernel.org/index.php/Main_Page Version: 3.14
Version: 3.12
Release: 0 Release: 0
%define tar_version v3.12
Summary: Utilities for the Btrfs filesystem Summary: Utilities for the Btrfs filesystem
License: GPL-2.0 License: GPL-2.0
Group: System/Filesystems 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-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-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 # 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 Source: btrfs-progs-%{tar_version}.tar.bz2
Source1: boot-btrfs.sh Source1: boot-btrfs.sh
Source4: setup-btrfs.sh Source4: setup-btrfs.sh
Patch162: 0162-btrfs-progs-fix-loop-device-mount-checks.patch
Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch
Patch164: 0164-btrfs-progs-convert-set-label-or-copy-from-origin.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 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 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 Patch169: 0169-btrfs-progs-Check-metadata-mirrors-in-find-root.patch
Patch170: 0170-btrfs-progs-In-find-root-dump-bytenr-for-every-slot.patch Patch170: 0170-btrfs-progs-In-find-root-dump-bytenr-for-every-slot.patch
Patch1000: local-version-override.patch Patch1000: local-version-override.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libattr-devel BuildRequires: libattr-devel
BuildRequires: libblkid-devel BuildRequires: libblkid-devel
@ -55,6 +48,7 @@ BuildRequires: zlib-devel
# for /bin/true # for /bin/true
Requires: coreutils Requires: coreutils
Supplements: filesystem(btrfs) Supplements: filesystem(btrfs)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
Utilities needed to create and maintain btrfs file systems under Linux. Utilities needed to create and maintain btrfs file systems under Linux.
@ -70,7 +64,7 @@ applications to interface with btrfs.
%package -n libbtrfs-devel %package -n libbtrfs-devel
Summary: Include Files and Libraries for developing with Btrfs Summary: Include Files and Libraries for developing with Btrfs
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release} Requires: libbtrfs0
%description -n libbtrfs-devel %description -n libbtrfs-devel
This package contains the libraries and headers files for developers to This package contains the libraries and headers files for developers to
@ -78,11 +72,8 @@ build applications to interface with btrfs.
%prep %prep
%setup -q -n btrfs-progs-%{tar_version} %setup -q -n btrfs-progs-%{tar_version}
%patch162 -p1
%patch163 -p1 %patch163 -p1
%patch164 -p1 %patch164 -p1
%patch165 -p1
%patch166 -p1
%patch167 -p1 %patch167 -p1
%patch168 -p1 %patch168 -p1
%patch169 -p1 %patch169 -p1
@ -95,43 +86,40 @@ make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
btrfs-find-root btrfs-find-root
%install %install
make install DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} make install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir}
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 -d %{buildroot}/%{_sbindir}
install -m 0755 -d ${RPM_BUILD_ROOT}/%{_bindir} install -m 0755 -d %{buildroot}/%{_bindir}
# move some utilities out of /usr/sbin # 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 # mkinitrd rescue utilities
install -m 0755 btrfs-zero-log ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 btrfs-zero-log %{buildroot}/%{_sbindir}
install -m 0755 btrfs-select-super ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 btrfs-select-super %{buildroot}/%{_sbindir}
install -m 0755 btrfs-image ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 btrfs-image %{buildroot}/%{_sbindir}
install -m 0755 btrfstune ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 btrfstune %{buildroot}/%{_sbindir}
install -m 0755 btrfs-find-root ${RPM_BUILD_ROOT}/%{_sbindir} install -m 0755 btrfs-find-root %{buildroot}/%{_sbindir}
#UsrMerge #UsrMerge
install -m 0755 -d ${RPM_BUILD_ROOT}/sbin install -m 0755 -d %{buildroot}/sbin
ln -s %{_sbindir}/btrfs ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-zero-log ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-zero-log %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-convert ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-convert %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-select-super ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-select-super %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-image ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-image %{buildroot}/sbin
ln -s %{_sbindir}/btrfstune ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfstune %{buildroot}/sbin
ln -s %{_sbindir}/btrfsck ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfsck %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-find-root ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-find-root %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-debug-tree ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-debug-tree %{buildroot}/sbin
ln -s %{_sbindir}/btrfs-show-super ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/btrfs-show-super %{buildroot}/sbin
ln -s %{_sbindir}/mkfs.btrfs ${RPM_BUILD_ROOT}/sbin ln -s %{_sbindir}/mkfs.btrfs %{buildroot}/sbin
ln -s %{_sbindir}/fsck.btrfs %{buildroot}/sbin
#EndUsrMerge #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 #UsrMerge
ln -s %{_sbindir}/fsck.btrfs ${RPM_BUILD_ROOT}/sbin
#EndUsrMerge #EndUsrMerge
install -d -m0755 ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ install -d -m0755 %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{S:1} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE1} %{buildroot}/lib/mkinitrd/scripts/
install -m 0755 %{S:4} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/ install -m 0755 %{SOURCE4} %{buildroot}/lib/mkinitrd/scripts/
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.la find %{buildroot} -type f -name "*.la" -delete -print
# don't install .a for now # don't install .a for now
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a rm -f %{buildroot}/%{_libdir}/*.a
%post -n libbtrfs0 -p /sbin/ldconfig %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/boot-btrfs.sh
/lib/mkinitrd/scripts/setup-btrfs.sh /lib/mkinitrd/scripts/setup-btrfs.sh
# other # other
/usr/bin/btrfs-map-logical %{_bindir}/btrfs-map-logical
%_mandir/man8/btrfs-image.8.gz %{_mandir}/man8/btrfs-image.8.gz
%_mandir/man8/btrfsck.8.gz %{_mandir}/man8/btrfsck.8.gz
%_mandir/man8/mkfs.btrfs.8.gz %{_mandir}/man8/fsck.btrfs.8.gz
%_mandir/man8/btrfs.8.gz %{_mandir}/man8/mkfs.btrfs.8.gz
%_mandir/man8/btrfs-convert.8.gz %{_mandir}/man8/btrfs.8.gz
%_mandir/man8/btrfs-debug-tree.8.gz %{_mandir}/man8/btrfs-convert.8.gz
%_mandir/man8/btrfs-find-root.8.gz %{_mandir}/man8/btrfs-debug-tree.8.gz
%_mandir/man8/btrfs-map-logical.8.gz %{_mandir}/man8/btrfs-find-root.8.gz
%_mandir/man8/btrfs-show-super.8.gz %{_mandir}/man8/btrfs-map-logical.8.gz
%_mandir/man8/btrfs-zero-log.8.gz %{_mandir}/man8/btrfs-show-super.8.gz
%_mandir/man8/btrfstune.8.gz %{_mandir}/man8/btrfs-zero-log.8.gz
%{_mandir}/man8/btrfstune.8.gz
%files -n libbtrfs0 %files -n libbtrfs0
%defattr(-, root, root) %defattr(-, root, root)

View File

@ -6,8 +6,8 @@ Index: btrfs-progs-v0.19-116-g13eced9/version.sh
# Copyright 2008, Oracle # Copyright 2008, Oracle
# Released under the GNU GPLv2 # Released under the GNU GPLv2
-v="v3.12" -v="v3.14"
+v="v3.12+20131125" +v="v3.14+20140408"
which git &> /dev/null which git &> /dev/null
if [ $? == 0 -a -d .git ]; then if [ $? == 0 -a -d .git ]; then