diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-06-06 14:01:13 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-07 21:21:54 +0100 |
| commit | 13c857651b1cd9dd8a5cbb6a1aa34691734f6dc9 (patch) | |
| tree | f395b56c6938b1ca0113ea7e6940714e09a709f0 /meta/recipes-devtools | |
| parent | 53042d6e2f4b2e44356f7f943938530879526513 (diff) | |
| download | poky-13c857651b1cd9dd8a5cbb6a1aa34691734f6dc9.tar.gz | |
btrfs-tools: update 5.16.2 -> 5.18
(From OE-Core rev: f458cdf52f27ece56f96408bbfa2eca8e5e2143c)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/lzo-option.patch | 126 | ||||
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools_5.18.bb (renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.2.bb) | 5 |
2 files changed, 2 insertions, 129 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/lzo-option.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/lzo-option.patch deleted file mode 100644 index f4278a5c5d..0000000000 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/lzo-option.patch +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | Upstream-Status: Backport [https://github.com/kdave/btrfs-progs/commit/73545c1fe6304f08ab306b76d2bcacaf22a5e99a] | ||
| 2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 3 | |||
| 4 | From 4f4eafe8ebcc86f84f6c85a5c5814c430d8f190c Mon Sep 17 00:00:00 2001 | ||
| 5 | From: Ross Burton <ross.burton@arm.com> | ||
| 6 | Date: Tue, 24 May 2022 13:44:29 +0100 | ||
| 7 | Subject: [PATCH] btrfs-progs: add option to disable LZO support | ||
| 8 | |||
| 9 | LZO as a compression format is pretty archaic these days, there are | ||
| 10 | better algorithsm in all metrics for compression and decompression, and | ||
| 11 | lzo hasn't had a new release since 2017. | ||
| 12 | |||
| 13 | Add an option to disable LZO (defaulting to enabled), and respect it in | ||
| 14 | cmds/restore.c. | ||
| 15 | |||
| 16 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 17 | --- | ||
| 18 | Makefile | 2 +- | ||
| 19 | Makefile.inc.in | 1 + | ||
| 20 | cmds/restore.c | 7 +++++++ | ||
| 21 | configure.ac | 30 ++++++++++++++++++++---------- | ||
| 22 | 4 files changed, 29 insertions(+), 11 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/Makefile b/Makefile | ||
| 25 | index af4908f9..0e8e05f3 100644 | ||
| 26 | --- a/Makefile | ||
| 27 | +++ b/Makefile | ||
| 28 | @@ -335,7 +335,7 @@ endif | ||
| 29 | btrfs_convert_cflags = -DBTRFSCONVERT_EXT2=$(BTRFSCONVERT_EXT2) | ||
| 30 | btrfs_convert_cflags += -DBTRFSCONVERT_REISERFS=$(BTRFSCONVERT_REISERFS) | ||
| 31 | btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype | ||
| 32 | -cmds_restore_cflags = -DBTRFSRESTORE_ZSTD=$(BTRFSRESTORE_ZSTD) | ||
| 33 | +cmds_restore_cflags = -DBTRFSRESTORE_LZO=$(BTRFSRESTORE_LZO) -DBTRFSRESTORE_ZSTD=$(BTRFSRESTORE_ZSTD) | ||
| 34 | |||
| 35 | ifeq ($(CRYPTOPROVIDER_BUILTIN),1) | ||
| 36 | CRYPTO_OBJECTS = crypto/sha224-256.o crypto/blake2b-ref.o | ||
| 37 | diff --git a/Makefile.inc.in b/Makefile.inc.in | ||
| 38 | index c995aef9..385b7ae1 100644 | ||
| 39 | --- a/Makefile.inc.in | ||
| 40 | +++ b/Makefile.inc.in | ||
| 41 | @@ -16,6 +16,7 @@ BUILD_PROGRAMS = @BUILD_PROGRAMS@ | ||
| 42 | BUILD_SHARED_LIBRARIES = @BUILD_SHARED_LIBRARIES@ | ||
| 43 | BUILD_STATIC_LIBRARIES = @BUILD_STATIC_LIBRARIES@ | ||
| 44 | BTRFSCONVERT_EXT2 = @BTRFSCONVERT_EXT2@ | ||
| 45 | +BTRFSRESTORE_LZO = @BTRFSRESTORE_LZO@ | ||
| 46 | BTRFSCONVERT_REISERFS = @BTRFSCONVERT_REISERFS@ | ||
| 47 | BTRFSRESTORE_ZSTD = @BTRFSRESTORE_ZSTD@ | ||
| 48 | PYTHON_BINDINGS = @PYTHON_BINDINGS@ | ||
| 49 | diff --git a/cmds/restore.c b/cmds/restore.c | ||
| 50 | index 5923d571..4dd79fce 100644 | ||
| 51 | --- a/cmds/restore.c | ||
| 52 | +++ b/cmds/restore.c | ||
| 53 | @@ -25,8 +25,10 @@ | ||
| 54 | #include <fcntl.h> | ||
| 55 | #include <sys/stat.h> | ||
| 56 | #include <sys/types.h> | ||
| 57 | +#if BTRFSRESTORE_LZO | ||
| 58 | #include <lzo/lzoconf.h> | ||
| 59 | #include <lzo/lzo1x.h> | ||
| 60 | +#endif | ||
| 61 | #include <zlib.h> | ||
| 62 | #if BTRFSRESTORE_ZSTD | ||
| 63 | #include <zstd.h> | ||
| 64 | @@ -98,6 +100,10 @@ static inline size_t read_compress_length(unsigned char *buf) | ||
| 65 | static int decompress_lzo(struct btrfs_root *root, unsigned char *inbuf, | ||
| 66 | char *outbuf, u64 compress_len, u64 *decompress_len) | ||
| 67 | { | ||
| 68 | +#if !BTRFSRESTORE_LZO | ||
| 69 | + error("btrfs not compiled with lzo support"); | ||
| 70 | + return -1; | ||
| 71 | +#else | ||
| 72 | size_t new_len; | ||
| 73 | size_t in_len; | ||
| 74 | size_t out_len = 0; | ||
| 75 | @@ -156,6 +162,7 @@ static int decompress_lzo(struct btrfs_root *root, unsigned char *inbuf, | ||
| 76 | *decompress_len = out_len; | ||
| 77 | |||
| 78 | return 0; | ||
| 79 | +#endif | ||
| 80 | } | ||
| 81 | |||
| 82 | static int decompress_zstd(const char *inbuf, char *outbuf, u64 compress_len, | ||
| 83 | diff --git a/configure.ac b/configure.ac | ||
| 84 | index d907636b..c1ad2c22 100644 | ||
| 85 | --- a/configure.ac | ||
| 86 | +++ b/configure.ac | ||
| 87 | @@ -372,16 +372,26 @@ if ${PKG_CONFIG} udev --atleast-version 190; then | ||
| 88 | fi | ||
| 89 | AC_SUBST(UDEVDIR) | ||
| 90 | |||
| 91 | -dnl lzo library does not provide pkg-config, let use classic way | ||
| 92 | -AC_CHECK_LIB([lzo2], [lzo_version], [ | ||
| 93 | - LZO2_LIBS="-llzo2" | ||
| 94 | - LZO2_CFLAGS="" | ||
| 95 | - LZO2_LIBS_STATIC="-llzo2"],[ | ||
| 96 | - AC_MSG_ERROR([cannot find lzo2 library]) | ||
| 97 | -]) | ||
| 98 | -AC_SUBST([LZO2_LIBS]) | ||
| 99 | -AC_SUBST([LZO2_LIBS_STATIC]) | ||
| 100 | -AC_SUBST([LZO2_CFLAGS]) | ||
| 101 | +AC_ARG_ENABLE([lzo], | ||
| 102 | + AS_HELP_STRING([--disable-lzo], [build without lzo support]), | ||
| 103 | + [], [enable_lzo=yes] | ||
| 104 | +) | ||
| 105 | + | ||
| 106 | +if test "x$enable_lzo" = xyes; then | ||
| 107 | + dnl lzo library does not provide pkg-config, let use classic way | ||
| 108 | + AC_CHECK_LIB([lzo2], [lzo_version], [ | ||
| 109 | + LZO2_LIBS="-llzo2" | ||
| 110 | + LZO2_CFLAGS="" | ||
| 111 | + LZO2_LIBS_STATIC="-llzo2"],[ | ||
| 112 | + AC_MSG_ERROR([cannot find lzo2 library]) | ||
| 113 | + ]) | ||
| 114 | + AC_SUBST([LZO2_LIBS]) | ||
| 115 | + AC_SUBST([LZO2_LIBS_STATIC]) | ||
| 116 | + AC_SUBST([LZO2_CFLAGS]) | ||
| 117 | +fi | ||
| 118 | + | ||
| 119 | +AS_IF([test "x$enable_lzo" = xyes], [BTRFSRESTORE_LZO=1], [BTRFSRESTORE_LZO=0]) | ||
| 120 | +AC_SUBST(BTRFSRESTORE_LZO) | ||
| 121 | |||
| 122 | dnl call PKG_INSTALLDIR from pkg.m4 to set pkgconfigdir | ||
| 123 | m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_MSG_ERROR([please install pkgconf])]) | ||
| 124 | -- | ||
| 125 | 2.25.1 | ||
| 126 | |||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.2.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.18.bb index 88b5c6259c..f5120d3980 100644 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.2.bb +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.18.bb | |||
| @@ -17,9 +17,8 @@ DEPENDS = "util-linux zlib" | |||
| 17 | 17 | ||
| 18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ | 18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ |
| 19 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ | 19 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ |
| 20 | file://lzo-option.patch \ | ||
| 21 | " | 20 | " |
| 22 | SRCREV = "31458c9c81935abbed010221261897273a98d2c1" | 21 | SRCREV = "f9e303584272b81b05b926a0cc9010f43af12a03" |
| 23 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
| 24 | 23 | ||
| 25 | PACKAGECONFIG ??= " \ | 24 | PACKAGECONFIG ??= " \ |
| @@ -28,7 +27,7 @@ PACKAGECONFIG ??= " \ | |||
| 28 | python \ | 27 | python \ |
| 29 | crypto-builtin \ | 28 | crypto-builtin \ |
| 30 | " | 29 | " |
| 31 | PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native" | 30 | PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, python3-sphinx-native" |
| 32 | PACKAGECONFIG[programs] = "--enable-programs,--disable-programs" | 31 | PACKAGECONFIG[programs] = "--enable-programs,--disable-programs" |
| 33 | PACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs" | 32 | PACKAGECONFIG[convert] = "--enable-convert --with-convert=ext2,--disable-convert --without-convert,e2fsprogs" |
| 34 | PACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned" | 33 | PACKAGECONFIG[zoned] = "--enable-zoned,--disable-zoned" |
