summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/btrfs-tools
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-05-23 21:24:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-29 21:07:16 +0100
commit67e74b25d822c1d73045415f7dbbcb8ebe135d65 (patch)
tree0bcf0d3a363f31067944d38df681f253d4b15e21 /meta/recipes-devtools/btrfs-tools
parent13b461c4f80dcd1543e48f815aceae05b0b71048 (diff)
downloadpoky-67e74b25d822c1d73045415f7dbbcb8ebe135d65.tar.gz
btrfs-tools: upgrade 4.15.1 -> 4.16.1
Drop upstreamed patch. Add a patch to correctly set LDFLAGS for one of the libraries and Python bindings. Add dependencies to build Python bindings (directly inheriting setuptools3 class does not work, as the build is Makefile-managed) and a snippet to install them. Also add a patch to allow specifying where they are installed (to avoid hardcoded /usr/lib default). (From OE-Core rev: a2b9834ec9b817e32772ddc27bc6b55fab33670c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/btrfs-tools')
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch35
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch25
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch69
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_4.16.1.bb (renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb)13
4 files changed, 69 insertions, 73 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
new file mode 100644
index 0000000000..a8fcfc0f73
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
@@ -0,0 +1,35 @@
1From eecc48ecad359cd4fab650ce49cfe57e99d1859d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 17 May 2018 12:21:31 +0300
4Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python
5 bindings.
6
7Upstream-Status: Pending
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9
10---
11 Makefile | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/Makefile b/Makefile
15index 10f0e3b0..1697794c 100644
16--- a/Makefile
17+++ b/Makefile
18@@ -402,7 +402,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c
19
20 libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
21 @echo " [LD] $@"
22- $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) \
23+ $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(LDFLAGS) $(libbtrfsutil_objects) \
24 -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@
25
26 libbtrfsutil.a: $(libbtrfsutil_objects)
27@@ -417,7 +417,7 @@ ifeq ($(PYTHON_BINDINGS),1)
28 libbtrfsutil_python: libbtrfsutil.so.$(libbtrfsutil_major) libbtrfsutil.so libbtrfsutil/btrfsutil.h
29 @echo " [PY] libbtrfsutil"
30 $(Q)cd libbtrfsutil/python; \
31- CFLAGS= LDFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
32+ CFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
33
34 .PHONY: libbtrfsutil_python
35 endif
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch
new file mode 100644
index 0000000000..5846f04d1a
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch
@@ -0,0 +1,25 @@
1From d3adfc21c9cc264bd191722f102963cbc4794259 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 23 May 2018 21:20:35 +0300
4Subject: [PATCH] Add a possibility to specify where python modules are
5 installed
6
7Upstream-Status: Inappropriate [oe-core specific to solve multilib use case]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 Makefile | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/Makefile b/Makefile
14index 1697794c..8ab38818 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -651,7 +651,7 @@ endif
18 ifeq ($(PYTHON_BINDINGS),1)
19 install_python: libbtrfsutil_python
20 $(Q)cd libbtrfsutil/python; \
21- $(PYTHON) setup.py install --skip-build $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix)
22+ $(PYTHON) setup.py install --skip-build $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) --install-lib=$(PYTHON_SITEPACKAGES_DIR)
23
24 .PHONY: install_python
25 endif
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
deleted file mode 100644
index fbe0c47849..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From patchwork Wed Mar 28 06:39:09 2018
2Content-Type: text/plain; charset="utf-8"
3MIME-Version: 1.0
4Content-Transfer-Encoding: 7bit
5Subject: btrfs-progs: mkfs/rootdir: Don't follow symbolic link when calcuating
6 size
7From: Qu Wenruo <wqu@suse.com>
8X-Patchwork-Id: 10312225
9Message-Id: <20180328063909.937-1-wqu@suse.com>
10To: linux-btrfs@vger.kernel.org
11Date: Wed, 28 Mar 2018 14:39:09 +0800
12
13[BUG]
14If we have a symbolic link in rootdir pointing to non-existing location,
15mkfs.btrfs --rootdir will just fail:
16------
17$ mkfs.btrfs -f --rootdir /tmp/rootdir/ /dev/data/btrfs
18btrfs-progs v4.15.1
19See http://btrfs.wiki.kernel.org for more information.
20
21ERROR: ftw subdir walk of /tmp/rootdir/ failed: No such file or directory
22------
23
24[CAUSE]
25Commit 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method
26to make size estimate easier") add extra ftw walk to estimate the
27filesystem size.
28
29Such default ftw walk will follow symbolic link and gives ENOENT error.
30
31[FIX]
32Use nftw() to specify FTW_PHYS so we won't follow symbolic link for size
33calculation.
34
35Reported-by: Alexander Kanavin <alexander.kanavin@intel.com>
36Fixes: 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method to make size estimate easier")
37Signed-off-by: Qu Wenruo <wqu@suse.com>
38Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10312225/]
39---
40 mkfs/rootdir.c | 9 +++++++--
41 1 file changed, 7 insertions(+), 2 deletions(-)
42
43diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c
44index 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.15.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.16.1.bb
index f7ea27321c..d175959309 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.16.1.bb
@@ -10,17 +10,18 @@ HOMEPAGE = "https://btrfs.wiki.kernel.org"
10LICENSE = "GPLv2" 10LICENSE = "GPLv2"
11LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" 11LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
12SECTION = "base" 12SECTION = "base"
13DEPENDS = "util-linux attr e2fsprogs lzo acl" 13DEPENDS = "util-linux attr e2fsprogs lzo acl python3-setuptools-native"
14DEPENDS_append_class-target = " udev" 14DEPENDS_append_class-target = " udev"
15RDEPENDS_${PN} = "libgcc" 15RDEPENDS_${PN} = "libgcc"
16 16
17SRCREV = "3097f02c948f69f520c565ff8f8ba476aa6edb88" 17SRCREV = "f7fc27cb20924cc340a2a522655969253dd97ae9"
18SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ 18SRC_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://ftw-subdir-walk.patch \ 20 file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
21 file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
21 " 22 "
22 23
23inherit autotools-brokensep pkgconfig manpages 24inherit autotools-brokensep pkgconfig manpages distutils3-base
24 25
25CLEANBROKEN = "1" 26CLEANBROKEN = "1"
26 27
@@ -36,4 +37,8 @@ do_configure_prepend() {
36 37
37S = "${WORKDIR}/git" 38S = "${WORKDIR}/git"
38 39
40do_install_append() {
41 oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python
42}
43
39BBCLASSEXTEND = "native" 44BBCLASSEXTEND = "native"