mirror of
https://abf.rosa.ru/djam/btrfs-progs.git
synced 2025-02-24 10:22:49 +00:00
New version 3.17.2 (sync with Current)
This commit is contained in:
parent
59617663b4
commit
6f1f5865ad
5 changed files with 47 additions and 86 deletions
3
.abf.yml
3
.abf.yml
|
@ -1,3 +1,2 @@
|
||||||
sources:
|
sources:
|
||||||
btrfs-progs-0.19-20120328.tar.xz: cdc8c1303f7e7d37fcdcf6b970435618e201ccf2
|
btrfs-progs-v3.17.2.tar.xz: d0195470430ce361b0a94ebc31f2699a4ddfb05a
|
||||||
btrfs-progs-v3.12.tar.xz: a9067bf56680937f9cea77a15a0e06500f94a935
|
|
||||||
|
|
12
btrfs-init-dev-list.patch
Normal file
12
btrfs-init-dev-list.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/utils.c b/utils.c
|
||||||
|
index a5ffb62..f6686c6 100644
|
||||||
|
--- a/utils.c
|
||||||
|
+++ b/utils.c
|
||||||
|
@@ -502,6 +502,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
|
||||||
|
device->bytes_used = 0;
|
||||||
|
device->total_ios = 0;
|
||||||
|
device->dev_root = root->fs_info->dev_root;
|
||||||
|
+ INIT_LIST_HEAD(&device->dev_list);
|
||||||
|
|
||||||
|
ret = btrfs_add_device(trans, root, device);
|
||||||
|
BUG_ON(ret);
|
Binary file not shown.
|
@ -1,58 +0,0 @@
|
||||||
|
|
||||||
Many systems expect a fsck.<filesystem> -a <device>
|
|
||||||
command to be accepted.
|
|
||||||
|
|
||||||
commit: 6cd836d7d95ae61edfca2406f48eeca47b8cfd81
|
|
||||||
(btrfs-progs: ignore -a option in mkfs)
|
|
||||||
|
|
||||||
added this 'support' to btrfsck so one could symlink fsck.btrfs
|
|
||||||
to btrfsck and get the desired result.
|
|
||||||
|
|
||||||
But then it got broken by:
|
|
||||||
commit 5956f752c66d5259bbb17a2dd47ee8c8cc0e5f4f
|
|
||||||
(Btrfs-progs: add btrfsck functionality to btrfs)
|
|
||||||
|
|
||||||
like this:
|
|
||||||
# fsck.btrfs -a /dev/loop0
|
|
||||||
Unknown option: -a
|
|
||||||
usage: btrfs [--help] [--version] <group> [<group>...] <command> [<args>]
|
|
||||||
|
|
||||||
Fix this breakage by doing the same name detection for fsck.btrfs as we do
|
|
||||||
for btrfsck as added in commit: d5d2046ae3b216af22a8a37c940f2412ba519b6e
|
|
||||||
(Btrfs-progs: add btrfsck name detection to btrfs)
|
|
||||||
|
|
||||||
and we get the expected result:
|
|
||||||
|
|
||||||
# fsck.btrfs -a /dev/loop0
|
|
||||||
Checking filesystem on /dev/loop0
|
|
||||||
UUID: afe796c5-9e06-43d2-a5f4-a2beca58e82a
|
|
||||||
checking extents
|
|
||||||
checking free space cache
|
|
||||||
cache and super generation don't match, space cache will be invalidated
|
|
||||||
checking fs roots
|
|
||||||
checking csums
|
|
||||||
checking root refs
|
|
||||||
found 28672 bytes used err is 0
|
|
||||||
total csum bytes: 0
|
|
||||||
total tree bytes: 28672
|
|
||||||
total fs tree bytes: 8192
|
|
||||||
total extent tree bytes: 4096
|
|
||||||
btree space waste bytes: 23766
|
|
||||||
file data blocks allocated: 0
|
|
||||||
referenced 0
|
|
||||||
Btrfs v3.12
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
|
||||||
|
|
||||||
diff -Nurp btrfs-progs-v3.12.orig/btrfs.c btrfs-progs-v3.12/btrfs.c
|
|
||||||
--- btrfs-progs-v3.12.orig/btrfs.c 2013-11-25 22:48:32.000000000 +0200
|
|
||||||
+++ btrfs-progs-v3.12/btrfs.c 2013-12-26 18:29:31.382400701 +0200
|
|
||||||
@@ -271,7 +271,7 @@ int main(int argc, char **argv)
|
|
||||||
else
|
|
||||||
bname = argv[0];
|
|
||||||
|
|
||||||
- if (!strcmp(bname, "btrfsck")) {
|
|
||||||
+ if (!strcmp(bname, "btrfsck") || !strcmp(bname, "fsck.btrfs")) {
|
|
||||||
argv[0] = "check";
|
|
||||||
} else {
|
|
||||||
argc--;
|
|
|
@ -1,20 +1,25 @@
|
||||||
|
%define _root_sbindir /sbin
|
||||||
|
%define _root_libdir /%{_lib}
|
||||||
%define libname_orig libbtrfs
|
%define libname_orig libbtrfs
|
||||||
%define major 0
|
%define major 0
|
||||||
%define libname %mklibname btrfs %{major}
|
%define libname %mklibname btrfs %{major}
|
||||||
%define develname %mklibname btrfs -d
|
%define develname %mklibname btrfs -d
|
||||||
|
|
||||||
Name: btrfs-progs
|
Name: btrfs-progs
|
||||||
Version: 3.12
|
Version: 3.17.2
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Userspace programs for btrfs
|
Summary: Userspace programs for btrfs
|
||||||
|
|
||||||
Group: System/Kernel and hardware
|
Group: System/Kernel and hardware
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://btrfs.wiki.kernel.org/
|
URL: http://btrfs.wiki.kernel.org/
|
||||||
Source0: http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/%{name}-v%{version}.tar.xz
|
# Git: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
|
||||||
|
Source0: http://www.kernel.org/pub/linux/kernel/people/mason/btrfs-progs/%{name}-v%{version}.tar.xz
|
||||||
# From http://www.spinics.net/lists/linux-btrfs/msg15899.html
|
# From http://www.spinics.net/lists/linux-btrfs/msg15899.html
|
||||||
Source1: btrfs-completion.sh
|
Source1: btrfs-completion.sh
|
||||||
Patch0: btrfs-progs-recognize-fsck.btrfs-like-btrfsck.patch
|
# From Fedora
|
||||||
|
Patch0: btrfs-init-dev-list.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig(ext2fs)
|
BuildRequires: pkgconfig(ext2fs)
|
||||||
BuildRequires: pkgconfig(uuid)
|
BuildRequires: pkgconfig(uuid)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
@ -58,41 +63,44 @@ applications which will use btrfs
|
||||||
%make CFLAGS="%{optflags}" LDFLAGS="%{ldflags}"
|
%make CFLAGS="%{optflags}" LDFLAGS="%{ldflags}"
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall bindir=%{buildroot}%{_sbindir}
|
%makeinstall_std \
|
||||||
|
bindir=%{_root_sbindir} \
|
||||||
|
libdir=%{_root_libdir} \
|
||||||
|
incdir=%{_includedir}/btrfs \
|
||||||
|
mandir=%{_mandir}
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_root_libdir}/*.a
|
||||||
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
|
mv %{buildroot}%{_root_libdir}/libbtrfs.so %{buildroot}%{_libdir}/
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs
|
cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs
|
||||||
ln -sv %{_sbindir}/btrfsck %{buildroot}%{_sbindir}/fsck.btrfs
|
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING INSTALL
|
%doc COPYING INSTALL
|
||||||
%{_sbindir}/btrfs
|
%{_root_sbindir}/btrfs
|
||||||
%{_sbindir}/btrfs-convert
|
%{_root_sbindir}/btrfs-convert
|
||||||
%{_sbindir}/btrfs-debug-tree
|
%{_root_sbindir}/btrfs-debug-tree
|
||||||
%{_sbindir}/btrfs-find-root
|
%{_root_sbindir}/btrfs-find-root
|
||||||
%{_sbindir}/btrfs-image
|
%{_root_sbindir}/btrfs-image
|
||||||
%{_sbindir}/btrfs-map-logical
|
%{_root_sbindir}/btrfs-map-logical
|
||||||
%{_sbindir}/btrfs-zero-log
|
%{_root_sbindir}/btrfs-zero-log
|
||||||
%{_sbindir}/btrfsck
|
%{_root_sbindir}/btrfsck
|
||||||
%{_sbindir}/btrfstune
|
%{_root_sbindir}/btrfstune
|
||||||
%{_sbindir}/btrfs-show-super
|
%{_root_sbindir}/btrfs-show-super
|
||||||
%{_sbindir}/fsck.btrfs
|
%{_root_sbindir}/fsck.btrfs
|
||||||
%{_sbindir}/mkfs.btrfs
|
%{_root_sbindir}/mkfs.btrfs
|
||||||
|
%{_mandir}/man5/btrfs.5.*
|
||||||
%{_mandir}/man8/btrfs.8.*
|
%{_mandir}/man8/btrfs.8.*
|
||||||
%{_mandir}/man8/btrfs-image.8*
|
%{_mandir}/man8/btrfs-*.8*
|
||||||
%{_mandir}/man8/btrfsck.8*
|
%{_mandir}/man8/btrfsck.8*
|
||||||
%{_mandir}/man8/mkfs.btrfs.8*
|
%{_mandir}/man8/mkfs.btrfs.8*
|
||||||
%{_mandir}/man8/btrfs-convert.8.*
|
|
||||||
%{_mandir}/man8/btrfs-debug-tree.8.*
|
|
||||||
%{_mandir}/man8/btrfs-find-root.8.*
|
|
||||||
%{_mandir}/man8/btrfs-map-logical.8.*
|
|
||||||
%{_mandir}/man8/btrfs-show-super.8.*
|
|
||||||
%{_mandir}/man8/btrfs-zero-log.8.*
|
|
||||||
%{_mandir}/man8/btrfstune.8.*
|
%{_mandir}/man8/btrfstune.8.*
|
||||||
|
%{_mandir}/man8/fsck.btrfs.8*
|
||||||
%{_datadir}/bash-completion/completions/btrfs
|
%{_datadir}/bash-completion/completions/btrfs
|
||||||
|
|
||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%{_libdir}/libbtrfs.so.%{major}*
|
%{_root_libdir}/libbtrfs.so.%{major}*
|
||||||
|
|
||||||
%files -n %{develname}
|
%files -n %{develname}
|
||||||
%{_includedir}/btrfs/*
|
%{_includedir}/btrfs/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue