[PATCH v2 1/2] libarchive: enable zstd support

Subsystems: the rest

STALE1939d

2 messages, 1 author, 2021-05-25 · open the first message on its own page

[PATCH v2 1/2] libarchive: enable zstd support

From: Samuli Piippo <hidden>
Date: 2021-05-25 12:41:01

Now that zstd is in oe-core, add PACKAGECONFIG for it and enabled
it by default in libarchive.

zstd support is expected by CMake, which in nativesdk depends on
libarchive. CMake depends on having all formats supported and build
issues can arise when zstd is not available:
https://gitlab.kitware.com/cmake/cmake/-/issues/21552

Quote from a CMake dev:
"As far as CMake's design is concerned, we have no optional formats.
All should be supported. That's why we bundle sufficiently new versions
of libarchive and libzstd. If a distro builds with an older libarchive
that doesn't have zstd support, then that is not a proper packaging of CMake."

Signed-off-by: Samuli Piippo <redacted>
---
 meta/recipes-extended/libarchive/libarchive_3.5.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/libarchive/libarchive_3.5.1.bb b/meta/recipes-extended/libarchive/libarchive_3.5.1.bb
index c9e30f468f..ebecee1f3e 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.5.1.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.5.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d499814247adaee08d88080841cb5665"
 
 DEPENDS = "e2fsprogs-native"
 
-PACKAGECONFIG ?= "zlib bz2 xz lzo"
+PACKAGECONFIG ?= "zlib bz2 xz lzo zstd"
 
 PACKAGECONFIG_append_class-target = "\
 	${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
@@ -28,6 +28,7 @@ PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
 PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
 PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
 PACKAGECONFIG[mbedtls] = "--with-mbedtls,--without-mbedtls,mbedtls,"
+PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd,"
 
 EXTRA_OECONF += "--enable-largefile"
 
-- 
2.25.1

[PATCH v2 2/2] cmake-native: enabled zstd support

From: Samuli Piippo <hidden>
Date: 2021-05-25 12:41:04

CMake depends on having all formats supported and build issues can
arise when zstd is not available:
https://gitlab.kitware.com/cmake/cmake/-/issues/21552

Quote from a CMake dev:
"As far as CMake's design is concerned, we have no optional formats.
All should be supported. That's why we bundle sufficiently new versions
of libarchive and libzstd. If a distro builds with an older libarchive
that doesn't have zstd support, then that is not a proper packaging of CMake."

Signed-off-by: Samuli Piippo <redacted>
---
 meta/recipes-devtools/cmake/cmake-native_3.20.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.20.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.20.1.bb
index d91e42ef9a..335097d387 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.20.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.20.1.bb
@@ -1,7 +1,7 @@
 require cmake.inc
 inherit native
 
-DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native"
+DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
 
 SRC_URI += "file://OEToolchainConfig.cmake \
             file://environment.d-cmake.sh \
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help