diff --git a/.abf.yml b/.abf.yml index fe9a329..97c4b38 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,2 @@ sources: - btrfs-progs-0.19-20120328.tar.xz: cdc8c1303f7e7d37fcdcf6b970435618e201ccf2 - btrfs-progs-v3.12.tar.xz: a9067bf56680937f9cea77a15a0e06500f94a935 + btrfs-progs-v3.17.2.tar.xz: d0195470430ce361b0a94ebc31f2699a4ddfb05a diff --git a/btrfs-init-dev-list.patch b/btrfs-init-dev-list.patch new file mode 100644 index 0000000..2dd40fc --- /dev/null +++ b/btrfs-init-dev-list.patch @@ -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); diff --git a/btrfs-progs-0.19-20120328.tar.xz b/btrfs-progs-0.19-20120328.tar.xz deleted file mode 100644 index fa2b818..0000000 Binary files a/btrfs-progs-0.19-20120328.tar.xz and /dev/null differ diff --git a/btrfs-progs-recognize-fsck.btrfs-like-btrfsck.patch b/btrfs-progs-recognize-fsck.btrfs-like-btrfsck.patch deleted file mode 100644 index 6f40e05..0000000 --- a/btrfs-progs-recognize-fsck.btrfs-like-btrfsck.patch +++ /dev/null @@ -1,58 +0,0 @@ - -Many systems expect a fsck. -a -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] [...] [] - -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 - -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--; diff --git a/btrfs-progs.spec b/btrfs-progs.spec index 19d5266..4702e71 100644 --- a/btrfs-progs.spec +++ b/btrfs-progs.spec @@ -1,20 +1,25 @@ +%define _root_sbindir /sbin +%define _root_libdir /%{_lib} %define libname_orig libbtrfs %define major 0 %define libname %mklibname btrfs %{major} %define develname %mklibname btrfs -d Name: btrfs-progs -Version: 3.12 +Version: 3.17.2 Release: 1 Summary: Userspace programs for btrfs Group: System/Kernel and hardware License: GPLv2 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 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(uuid) BuildRequires: pkgconfig(zlib) @@ -58,41 +63,44 @@ applications which will use btrfs %make CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %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 cp %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/btrfs -ln -sv %{_sbindir}/btrfsck %{buildroot}%{_sbindir}/fsck.btrfs -rm -f %{buildroot}%{_libdir}/*.a %files %doc COPYING INSTALL -%{_sbindir}/btrfs -%{_sbindir}/btrfs-convert -%{_sbindir}/btrfs-debug-tree -%{_sbindir}/btrfs-find-root -%{_sbindir}/btrfs-image -%{_sbindir}/btrfs-map-logical -%{_sbindir}/btrfs-zero-log -%{_sbindir}/btrfsck -%{_sbindir}/btrfstune -%{_sbindir}/btrfs-show-super -%{_sbindir}/fsck.btrfs -%{_sbindir}/mkfs.btrfs +%{_root_sbindir}/btrfs +%{_root_sbindir}/btrfs-convert +%{_root_sbindir}/btrfs-debug-tree +%{_root_sbindir}/btrfs-find-root +%{_root_sbindir}/btrfs-image +%{_root_sbindir}/btrfs-map-logical +%{_root_sbindir}/btrfs-zero-log +%{_root_sbindir}/btrfsck +%{_root_sbindir}/btrfstune +%{_root_sbindir}/btrfs-show-super +%{_root_sbindir}/fsck.btrfs +%{_root_sbindir}/mkfs.btrfs +%{_mandir}/man5/btrfs.5.* %{_mandir}/man8/btrfs.8.* -%{_mandir}/man8/btrfs-image.8* +%{_mandir}/man8/btrfs-*.8* %{_mandir}/man8/btrfsck.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/fsck.btrfs.8* %{_datadir}/bash-completion/completions/btrfs %files -n %{libname} -%{_libdir}/libbtrfs.so.%{major}* +%{_root_libdir}/libbtrfs.so.%{major}* %files -n %{develname} %{_includedir}/btrfs/*