diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-04-04 14:13:17 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-04 13:28:02 +0100 |
commit | 210f9c0ae07cb645db305bcdcb89b443a9ba80a7 (patch) | |
tree | c5a625f2d63f74347e762ac66e9a9701f1d4e3f9 | |
parent | cb448f161a890d14e8429fb860cc6b30959d9699 (diff) | |
download | poky-210f9c0ae07cb645db305bcdcb89b443a9ba80a7.tar.gz |
btrfs-tools: update to 4.15.1
Drop upstreamed 0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch
Add ftw-subdir-walk.patch as it resolves the RECIPE_NO_UPDATE_REASON.
Add --disable-zstd as libzstd isn't provided in oe-core.
Fix wic testcase, as the minimal fs size is now bigger.
(From OE-Core rev: 94b645aa77a4193371e8c77ddc477ec00d858961)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch | 26 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch | 69 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb (renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb) | 6 |
4 files changed, 73 insertions, 30 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index b84466d9ae..055175212a 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -765,7 +765,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
765 | 'part emptyvfat --fstype vfat --size 1M\n', | 765 | 'part emptyvfat --fstype vfat --size 1M\n', |
766 | 'part emptymsdos --fstype msdos --size 1M\n', | 766 | 'part emptymsdos --fstype msdos --size 1M\n', |
767 | 'part emptyext2 --fstype ext2 --size 1M\n', | 767 | 'part emptyext2 --fstype ext2 --size 1M\n', |
768 | 'part emptybtrfs --fstype btrfs --size 100M\n']) | 768 | 'part emptybtrfs --fstype btrfs --size 150M\n']) |
769 | wks.flush() | 769 | wks.flush() |
770 | cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) | 770 | cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) |
771 | self.assertEqual(0, runCmd(cmd).status) | 771 | self.assertEqual(0, runCmd(cmd).status) |
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch deleted file mode 100644 index 790676b9cb..0000000000 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From bc35c4caebb57cc8b96c30c25432b12ca8dc18d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 6 Oct 2017 15:03:49 +0300 | ||
4 | Subject: [PATCH] Fix build with musl (missing header include for dev_t). | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | convert/source-fs.h | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/convert/source-fs.h b/convert/source-fs.h | ||
13 | index 23f3356..6fd770f 100644 | ||
14 | --- a/convert/source-fs.h | ||
15 | +++ b/convert/source-fs.h | ||
16 | @@ -20,6 +20,7 @@ | ||
17 | #include "kerncompat.h" | ||
18 | #include <linux/kdev_t.h> | ||
19 | #include <pthread.h> | ||
20 | +#include <sys/types.h> | ||
21 | |||
22 | #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID | ||
23 | |||
24 | -- | ||
25 | 2.14.1 | ||
26 | |||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch new file mode 100644 index 0000000000..fbe0c47849 --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From patchwork Wed Mar 28 06:39:09 2018 | ||
2 | Content-Type: text/plain; charset="utf-8" | ||
3 | MIME-Version: 1.0 | ||
4 | Content-Transfer-Encoding: 7bit | ||
5 | Subject: btrfs-progs: mkfs/rootdir: Don't follow symbolic link when calcuating | ||
6 | size | ||
7 | From: Qu Wenruo <wqu@suse.com> | ||
8 | X-Patchwork-Id: 10312225 | ||
9 | Message-Id: <20180328063909.937-1-wqu@suse.com> | ||
10 | To: linux-btrfs@vger.kernel.org | ||
11 | Date: Wed, 28 Mar 2018 14:39:09 +0800 | ||
12 | |||
13 | [BUG] | ||
14 | If we have a symbolic link in rootdir pointing to non-existing location, | ||
15 | mkfs.btrfs --rootdir will just fail: | ||
16 | ------ | ||
17 | $ mkfs.btrfs -f --rootdir /tmp/rootdir/ /dev/data/btrfs | ||
18 | btrfs-progs v4.15.1 | ||
19 | See http://btrfs.wiki.kernel.org for more information. | ||
20 | |||
21 | ERROR: ftw subdir walk of /tmp/rootdir/ failed: No such file or directory | ||
22 | ------ | ||
23 | |||
24 | [CAUSE] | ||
25 | Commit 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method | ||
26 | to make size estimate easier") add extra ftw walk to estimate the | ||
27 | filesystem size. | ||
28 | |||
29 | Such default ftw walk will follow symbolic link and gives ENOENT error. | ||
30 | |||
31 | [FIX] | ||
32 | Use nftw() to specify FTW_PHYS so we won't follow symbolic link for size | ||
33 | calculation. | ||
34 | |||
35 | Reported-by: Alexander Kanavin <alexander.kanavin@intel.com> | ||
36 | Fixes: 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method to make size estimate easier") | ||
37 | Signed-off-by: Qu Wenruo <wqu@suse.com> | ||
38 | Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10312225/] | ||
39 | --- | ||
40 | mkfs/rootdir.c | 9 +++++++-- | ||
41 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
42 | |||
43 | diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c | ||
44 | index a1d223a2408a..33c3ff1e18cf 100644 | ||
45 | --- a/mkfs/rootdir.c | ||
46 | +++ b/mkfs/rootdir.c | ||
47 | @@ -696,7 +696,7 @@ out: | ||
48 | } | ||
49 | |||
50 | static int ftw_add_entry_size(const char *fpath, const struct stat *st, | ||
51 | - int type) | ||
52 | + int type, struct FTW *ftwbuf) | ||
53 | { | ||
54 | /* | ||
55 | * Failed to read the directory, mostly due to EPERM. Abort ASAP, so | ||
56 | @@ -731,7 +731,12 @@ u64 btrfs_mkfs_size_dir(const char *dir_name, u32 sectorsize, u64 min_dev_size, | ||
57 | fs_block_size = sectorsize; | ||
58 | ftw_data_size = 0; | ||
59 | ftw_meta_nr_inode = 0; | ||
60 | - ret = ftw(dir_name, ftw_add_entry_size, 10); | ||
61 | + | ||
62 | + /* | ||
63 | + * Symbolic link is not followed when creating files, so no need to | ||
64 | + * follow them here. | ||
65 | + */ | ||
66 | + ret = nftw(dir_name, ftw_add_entry_size, 10, FTW_PHYS); | ||
67 | if (ret < 0) { | ||
68 | error("ftw subdir walk of %s failed: %s", dir_name, | ||
69 | strerror(errno)); | ||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb index bc157e2677..f7ea27321c 100644 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.13.3.bb +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb | |||
@@ -14,18 +14,18 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl" | |||
14 | DEPENDS_append_class-target = " udev" | 14 | DEPENDS_append_class-target = " udev" |
15 | RDEPENDS_${PN} = "libgcc" | 15 | RDEPENDS_${PN} = "libgcc" |
16 | 16 | ||
17 | SRCREV = "a7a1ea0f4f2a1d6eeeb3d106e062c7f1034f16d4" | 17 | SRCREV = "3097f02c948f69f520c565ff8f8ba476aa6edb88" |
18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ | 18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ |
19 | file://0001-Makefile-build-mktables-using-native-gcc.patch \ | 19 | file://0001-Makefile-build-mktables-using-native-gcc.patch \ |
20 | file://0001-Fix-build-with-musl-missing-header-include-for-dev_t.patch \ | 20 | file://ftw-subdir-walk.patch \ |
21 | " | 21 | " |
22 | 22 | ||
23 | RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://github.com/kdave/btrfs-progs/issues/109" | ||
24 | inherit autotools-brokensep pkgconfig manpages | 23 | inherit autotools-brokensep pkgconfig manpages |
25 | 24 | ||
26 | CLEANBROKEN = "1" | 25 | CLEANBROKEN = "1" |
27 | 26 | ||
28 | PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" | 27 | PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" |
28 | EXTRA_OECONF = " --disable-zstd" | ||
29 | EXTRA_OECONF_append_libc-musl = " --disable-backtrace " | 29 | EXTRA_OECONF_append_libc-musl = " --disable-backtrace " |
30 | 30 | ||
31 | do_configure_prepend() { | 31 | do_configure_prepend() { |