diff options
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.patch | 35 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-a-possibility-to-specify-where-python-modules-ar.patch | 25 | ||||
-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.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 @@ | |||
1 | From eecc48ecad359cd4fab650ce49cfe57e99d1859d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 17 May 2018 12:21:31 +0300 | ||
4 | Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python | ||
5 | bindings. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
9 | |||
10 | --- | ||
11 | Makefile | 4 ++-- | ||
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/Makefile b/Makefile | ||
15 | index 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 @@ | |||
1 | From d3adfc21c9cc264bd191722f102963cbc4794259 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 23 May 2018 21:20:35 +0300 | ||
4 | Subject: [PATCH] Add a possibility to specify where python modules are | ||
5 | installed | ||
6 | |||
7 | Upstream-Status: Inappropriate [oe-core specific to solve multilib use case] | ||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
9 | --- | ||
10 | Makefile | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/Makefile b/Makefile | ||
14 | index 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 @@ | |||
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.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" | |||
10 | LICENSE = "GPLv2" | 10 | LICENSE = "GPLv2" |
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067" |
12 | SECTION = "base" | 12 | SECTION = "base" |
13 | DEPENDS = "util-linux attr e2fsprogs lzo acl" | 13 | DEPENDS = "util-linux attr e2fsprogs lzo acl python3-setuptools-native" |
14 | DEPENDS_append_class-target = " udev" | 14 | DEPENDS_append_class-target = " udev" |
15 | RDEPENDS_${PN} = "libgcc" | 15 | RDEPENDS_${PN} = "libgcc" |
16 | 16 | ||
17 | SRCREV = "3097f02c948f69f520c565ff8f8ba476aa6edb88" | 17 | SRCREV = "f7fc27cb20924cc340a2a522655969253dd97ae9" |
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://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 | ||
23 | inherit autotools-brokensep pkgconfig manpages | 24 | inherit autotools-brokensep pkgconfig manpages distutils3-base |
24 | 25 | ||
25 | CLEANBROKEN = "1" | 26 | CLEANBROKEN = "1" |
26 | 27 | ||
@@ -36,4 +37,8 @@ do_configure_prepend() { | |||
36 | 37 | ||
37 | S = "${WORKDIR}/git" | 38 | S = "${WORKDIR}/git" |
38 | 39 | ||
40 | do_install_append() { | ||
41 | oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python | ||
42 | } | ||
43 | |||
39 | BBCLASSEXTEND = "native" | 44 | BBCLASSEXTEND = "native" |