From 18e35543012e0285a1193e4d566cb56dc9975be4 Mon Sep 17 00:00:00 2001 From: wangmy Date: Wed, 19 Jan 2022 09:07:09 +0800 Subject: btrfs-tools: upgrade 5.15.1 -> 5.16 0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch removed since it is included in 5.16 Add 0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch to fix "undefined reference to `__ALIGN_KERNEL'". Changelog: ========= - rescue: new subcommand clear-uuid-tree to fix failed mount due to bad uuid subvolume keys, caught by tree-checker - fi du: skip inaccessible files - prop: properly resolve to symlink targets - send, receive: fix crash after parent subvolume lookup errors - build: fix build on 5.12+ kernels due to changes in linux/kernel.h fix build on musl with old kernel headers - other: error handling fixes, cleanups, refactoring extent tree v2 preparatory work lots of RST documentation updates (last release with asciidoc sources), https://btrfs.readthedocs.io (From OE-Core rev: 420191dc951f04b36645ffae2d946b50150feab0) Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- ...-kerncompat-add-local-definition-for-alig.patch | 46 ++++++++++++++ ...-include-linux-const.h-to-fix-build-with-.patch | 42 ------------- .../btrfs-tools/btrfs-tools_5.15.1.bb | 72 ---------------------- .../btrfs-tools/btrfs-tools_5.16.bb | 72 ++++++++++++++++++++++ 4 files changed, 118 insertions(+), 114 deletions(-) create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch delete mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch delete mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch new file mode 100644 index 0000000000..b0fe67922d --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch @@ -0,0 +1,46 @@ +From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Thu, 13 Jan 2022 14:47:08 +0100 +Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment + macros + +There's still problem left with compilation on musl and kernel < 5.11, +because __ALIGN_KERNEL is not defined anymore: + +../bin/ld: kernel-shared/volumes.o: in function `create_chunk': +volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL' + +Due to the entangled includes and unconditional definition of +__ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it +eventually (as kerncompat.h is the first include). Instead add local +definitions of the macros and rename them to avoid name clashes. + +Pull-request: #433 + +Upstream-Status: Backport [https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58] + +Signed-off-by: Wang Mingyu +--- + kerncompat.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/kerncompat.h b/kerncompat.h +index 6ca1526e2..f0a6e196e 100644 +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -359,7 +359,14 @@ do { \ + + /* Alignment check */ + #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) +-#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ++ ++/* ++ * Alignment, copied and renamed from /usr/include/linux/const.h to work around ++ * issues caused by moving the definition in 5.12 ++ */ ++#define __ALIGN_KERNEL__(x, a) __ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1) ++#define __ALIGN_KERNEL_MASK__(x, mask) (((x) + (mask)) & ~(mask)) ++#define ALIGN(x, a) __ALIGN_KERNEL__((x), (a)) + + static inline int is_power_of_2(unsigned long n) + { diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch deleted file mode 100644 index be942388a5..0000000000 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 3d19b0fb882c5e195362a9f0909c474e60070ca0 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Fri, 18 Jun 2021 11:10:36 -0400 -Subject: [PATCH] btrfs-progs: include linux/const.h to fix build with 5.12+ - headers - -btrfs-tools compile fails with mips, musl and 5.12+ headers. - -The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we -add an explicit include of const.h to pickup the macro: - - | make: *** [Makefile:595: mkfs.btrfs] Error 1 - | make: *** Waiting for unfinished jobs.... - | libbtrfs.a(volumes.o): in function `dev_extent_search_start': - | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL' - | collect2: error: ld returned 1 exit status - -This is safe for older kernel's as well, since the header still -exists, and is valid to include. - -Upstream-Status: Inappropriate [mips64 + musl + libc-headers] - -Signed-off-by: Bruce Ashfield ---- - kerncompat.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/kerncompat.h b/kerncompat.h -index df167fe6..254235bd 100644 ---- a/kerncompat.h -+++ b/kerncompat.h -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - --- -2.25.1 - diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb deleted file mode 100644 index 3cf216724e..0000000000 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Checksumming Copy on Write Filesystem utilities" -DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ -implementing advanced features while focusing on fault tolerance, repair and \ -easy administration. \ -This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ -btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." - -HOMEPAGE = "https://btrfs.wiki.kernel.org" - -LICENSE = "GPLv2 & LGPLv2.1+" -LIC_FILES_CHKSUM = " \ - file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067 \ - file://libbtrfsutil/COPYING;md5=4fbd65380cdd255951079008b364516c \ -" -SECTION = "base" -DEPENDS = "lzo util-linux zlib" - -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ - file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ - file://0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch \ - " -SRCREV = "c0ad9bde429196db7e8710ea1abfab7a2bca2e43" -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= " \ - programs \ - convert \ - python \ - crypto-builtin \ -" -PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" -PACKAGECONFIG[programs] = "--enable-programs,--disable-programs" -PACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs" -PACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned" -PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native" -PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd" -PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev" - -# Pick only one crypto provider -PACKAGECONFIG[crypto-builtin] = "--with-crypto=builtin" -PACKAGECONFIG[crypto-libgcrypt] = "--with-crypto=libgcrypt,,libgcrypt" -PACKAGECONFIG[crypto-libsodium] = "--with-crypto=libsodium,,libsodium" -PACKAGECONFIG[crypto-libkcapi] = "--with-crypto=libkcapi,,libkcapi" - -inherit autotools-brokensep pkgconfig manpages -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3-base', '', d)} - -CLEANBROKEN = "1" - -EXTRA_OECONF = "--enable-largefile" -EXTRA_OECONF:append:libc-musl = " --disable-backtrace " -EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}" -EXTRA_PYTHON_CFLAGS:class-native = "" -EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}" -EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'" - -do_configure:prepend() { - # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. - mkdir -p ${S}/config - cp -f $(automake --print-libdir)/install-sh ${S}/config/ -} - - -do_install:append() { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python - fi -} - -RDEPENDS:${PN} = "libgcc" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb new file mode 100644 index 0000000000..fa7abcf2ba --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb @@ -0,0 +1,72 @@ +SUMMARY = "Checksumming Copy on Write Filesystem utilities" +DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \ +implementing advanced features while focusing on fault tolerance, repair and \ +easy administration. \ +This package contains utilities (mkfs, fsck, btrfsctl) used to work with \ +btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3." + +HOMEPAGE = "https://btrfs.wiki.kernel.org" + +LICENSE = "GPLv2 & LGPLv2.1+" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067 \ + file://libbtrfsutil/COPYING;md5=4fbd65380cdd255951079008b364516c \ +" +SECTION = "base" +DEPENDS = "lzo util-linux zlib" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ + file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ + file://0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch \ + " +SRCREV = "8ad326b2f28c044cb6ed9016d7c3285e23b673c8" +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= " \ + programs \ + convert \ + python \ + crypto-builtin \ +" +PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" +PACKAGECONFIG[programs] = "--enable-programs,--disable-programs" +PACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs" +PACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned" +PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native" +PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd" +PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev" + +# Pick only one crypto provider +PACKAGECONFIG[crypto-builtin] = "--with-crypto=builtin" +PACKAGECONFIG[crypto-libgcrypt] = "--with-crypto=libgcrypt,,libgcrypt" +PACKAGECONFIG[crypto-libsodium] = "--with-crypto=libsodium,,libsodium" +PACKAGECONFIG[crypto-libkcapi] = "--with-crypto=libkcapi,,libkcapi" + +inherit autotools-brokensep pkgconfig manpages +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'setuptools3-base', '', d)} + +CLEANBROKEN = "1" + +EXTRA_OECONF = "--enable-largefile" +EXTRA_OECONF:append:libc-musl = " --disable-backtrace " +EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}" +EXTRA_PYTHON_CFLAGS:class-native = "" +EXTRA_PYTHON_LDFLAGS = "${LDFLAGS}" +EXTRA_OEMAKE = "V=1 'EXTRA_PYTHON_CFLAGS=${EXTRA_PYTHON_CFLAGS}' 'EXTRA_PYTHON_LDFLAGS=${EXTRA_PYTHON_LDFLAGS}'" + +do_configure:prepend() { + # Upstream doesn't ship this and autoreconf won't install it as automake isn't used. + mkdir -p ${S}/config + cp -f $(automake --print-libdir)/install-sh ${S}/config/ +} + + +do_install:append() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python + fi +} + +RDEPENDS:${PN} = "libgcc" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf