All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Burton, Ross" <ross.burton@intel.com>
To: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 06/10] btrfs-tools: upgrade 4.15.1 -> 4.16.1
Date: Wed, 23 May 2018 15:01:25 +0100	[thread overview]
Message-ID: <CAJTo0LbBbLrwrDCegxwLknxCPV1JzP97OAoKQM6a1Q2BXEJRrA@mail.gmail.com> (raw)
In-Reply-To: <20180517113837.24240-6-alexander.kanavin@linux.intel.com>

Breaks with multilib and other setups with odd $libdir.

ERROR: btrfs-tools-4.16.1-r0 do_package: QA Issue: btrfs-tools:
Files/directories were installed but not shipped in any package:
  /usr/lib/python3.5/site-packages/btrfsutil.cpython-35m-x86_64-linux-gnu.so
  /usr/lib/python3.5/site-packages/btrfsutil-1.0.0-py3.5.egg-info
  /usr/lib/python3.5/site-packages/btrfsutil-1.0.0-py3.5.egg-info/dependency_links.txt
  /usr/lib/python3.5/site-packages/btrfsutil-1.0.0-py3.5.egg-info/top_level.txt
  /usr/lib/python3.5/site-packages/btrfsutil-1.0.0-py3.5.egg-info/PKG-INFO
  /usr/lib/python3.5/site-packages/btrfsutil-1.0.0-py3.5.egg-info/SOURCES.txt

Ross

On 17 May 2018 at 12:38, Alexander Kanavin
<alexander.kanavin@linux.intel.com> wrote:
> 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.
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
>  ...DFLAGS-when-building-libbtrfsutil.so.patch | 35 ++++++++++
>  .../btrfs-tools/ftw-subdir-walk.patch         | 69 -------------------
>  ...-tools_4.15.1.bb => btrfs-tools_4.16.1.bb} | 12 ++--
>  3 files changed, 43 insertions(+), 73 deletions(-)
>  create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
>  delete mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch
>  rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_4.15.1.bb => btrfs-tools_4.16.1.bb} (78%)
>
> 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 00000000000..a8fcfc0f73c
> --- /dev/null
> +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch
> @@ -0,0 +1,35 @@
> +From eecc48ecad359cd4fab650ce49cfe57e99d1859d Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Thu, 17 May 2018 12:21:31 +0300
> +Subject: [PATCH] Add LDFLAGS when building libbtrfsutil.so and python
> + bindings.
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +
> +---
> + Makefile | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 10f0e3b0..1697794c 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -402,7 +402,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c
> +
> + libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
> +       @echo "    [LD]     $@"
> +-      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) \
> ++      $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(LDFLAGS) $(libbtrfsutil_objects) \
> +               -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@
> +
> + libbtrfsutil.a: $(libbtrfsutil_objects)
> +@@ -417,7 +417,7 @@ ifeq ($(PYTHON_BINDINGS),1)
> + libbtrfsutil_python: libbtrfsutil.so.$(libbtrfsutil_major) libbtrfsutil.so libbtrfsutil/btrfsutil.h
> +       @echo "    [PY]     libbtrfsutil"
> +       $(Q)cd libbtrfsutil/python; \
> +-              CFLAGS= LDFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
> ++              CFLAGS= $(PYTHON) setup.py $(SETUP_PY_Q) build_ext -i build
> +
> + .PHONY: libbtrfsutil_python
> + 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 fbe0c47849f..00000000000
> --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/ftw-subdir-walk.patch
> +++ /dev/null
> @@ -1,69 +0,0 @@
> -From patchwork Wed Mar 28 06:39:09 2018
> -Content-Type: text/plain; charset="utf-8"
> -MIME-Version: 1.0
> -Content-Transfer-Encoding: 7bit
> -Subject: btrfs-progs: mkfs/rootdir: Don't follow symbolic link when calcuating
> - size
> -From: Qu Wenruo <wqu@suse.com>
> -X-Patchwork-Id: 10312225
> -Message-Id: <20180328063909.937-1-wqu@suse.com>
> -To: linux-btrfs@vger.kernel.org
> -Date: Wed, 28 Mar 2018 14:39:09 +0800
> -
> -[BUG]
> -If we have a symbolic link in rootdir pointing to non-existing location,
> -mkfs.btrfs --rootdir will just fail:
> -------
> -$ mkfs.btrfs  -f --rootdir /tmp/rootdir/ /dev/data/btrfs
> -btrfs-progs v4.15.1
> -See http://btrfs.wiki.kernel.org for more information.
> -
> -ERROR: ftw subdir walk of /tmp/rootdir/ failed: No such file or directory
> -------
> -
> -[CAUSE]
> -Commit 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method
> -to make size estimate easier") add extra ftw walk to estimate the
> -filesystem size.
> -
> -Such default ftw walk will follow symbolic link and gives ENOENT error.
> -
> -[FIX]
> -Use nftw() to specify FTW_PHYS so we won't follow symbolic link for size
> -calculation.
> -
> -Reported-by: Alexander Kanavin <alexander.kanavin@intel.com>
> -Fixes: 599a0abed564 ("btrfs-progs: mkfs/rootdir: Use over-reserve method to make size estimate easier")
> -Signed-off-by: Qu Wenruo <wqu@suse.com>
> -Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10312225/]
> ----
> - mkfs/rootdir.c | 9 +++++++--
> - 1 file changed, 7 insertions(+), 2 deletions(-)
> -
> -diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c
> -index a1d223a2408a..33c3ff1e18cf 100644
> ---- a/mkfs/rootdir.c
> -+++ b/mkfs/rootdir.c
> -@@ -696,7 +696,7 @@ out:
> - }
> -
> - static int ftw_add_entry_size(const char *fpath, const struct stat *st,
> --                            int type)
> -+                            int type, struct FTW *ftwbuf)
> - {
> -       /*
> -        * Failed to read the directory, mostly due to EPERM.  Abort ASAP, so
> -@@ -731,7 +731,12 @@ u64 btrfs_mkfs_size_dir(const char *dir_name, u32 sectorsize, u64 min_dev_size,
> -       fs_block_size = sectorsize;
> -       ftw_data_size = 0;
> -       ftw_meta_nr_inode = 0;
> --      ret = ftw(dir_name, ftw_add_entry_size, 10);
> -+
> -+      /*
> -+       * Symbolic link is not followed when creating files, so no need to
> -+       * follow them here.
> -+       */
> -+      ret = nftw(dir_name, ftw_add_entry_size, 10, FTW_PHYS);
> -       if (ret < 0) {
> -               error("ftw subdir walk of %s failed: %s", dir_name,
> -                       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
> similarity index 78%
> rename from meta/recipes-devtools/btrfs-tools/btrfs-tools_4.15.1.bb
> rename to meta/recipes-devtools/btrfs-tools/btrfs-tools_4.16.1.bb
> index f7ea27321cf..18f11ba89e3 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,17 @@ HOMEPAGE = "https://btrfs.wiki.kernel.org"
>  LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
>  SECTION = "base"
> -DEPENDS = "util-linux attr e2fsprogs lzo acl"
> +DEPENDS = "util-linux attr e2fsprogs lzo acl python3-setuptools-native"
>  DEPENDS_append_class-target = " udev"
>  RDEPENDS_${PN} = "libgcc"
>
> -SRCREV = "3097f02c948f69f520c565ff8f8ba476aa6edb88"
> +SRCREV = "f7fc27cb20924cc340a2a522655969253dd97ae9"
>  SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
>             file://0001-Makefile-build-mktables-using-native-gcc.patch \
> -           file://ftw-subdir-walk.patch \
> +           file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
>             "
>
> -inherit autotools-brokensep pkgconfig manpages
> +inherit autotools-brokensep pkgconfig manpages distutils3-base
>
>  CLEANBROKEN = "1"
>
> @@ -36,4 +36,8 @@ do_configure_prepend() {
>
>  S = "${WORKDIR}/git"
>
> +do_install_append() {
> +    oe_runmake 'DESTDIR=${D}' install_python
> +}
> +
>  BBCLASSEXTEND = "native"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2018-05-23 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 11:38 [PATCH 01/10] dtc: upgrade to 1.4.6 Alexander Kanavin
2018-05-17 11:38 ` [PATCH 02/10] xz: fix upstream version check Alexander Kanavin
2018-05-17 11:38 ` [PATCH 03/10] babeltrace: " Alexander Kanavin
2018-05-17 11:38 ` [PATCH 04/10] gnome-desktop3: remove the recipe Alexander Kanavin
2018-05-17 11:38 ` [PATCH 05/10] libidn: upgrade 1.34 -> 1.35 Alexander Kanavin
2018-05-17 11:38 ` [PATCH 06/10] btrfs-tools: upgrade 4.15.1 -> 4.16.1 Alexander Kanavin
2018-05-23 14:01   ` Burton, Ross [this message]
2018-05-17 11:38 ` [PATCH 07/10] rt-tests: fix upstream version check Alexander Kanavin
2018-05-17 11:38 ` [PATCH 08/10] openssl: fix upstream version check for 1.0 version Alexander Kanavin
2018-05-17 11:38 ` [PATCH 09/10] meson: update to 0.46.1 Alexander Kanavin
2018-05-17 11:38 ` [PATCH 10/10] qemuwrapper-cross: always fall back to x86_64 and i386 variants of qemu Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJTo0LbBbLrwrDCegxwLknxCPV1JzP97OAoKQM6a1Q2BXEJRrA@mail.gmail.com \
    --to=ross.burton@intel.com \
    --cc=alexander.kanavin@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.