barebox: use lz4 instead of lz4c
PATCH v2 1/2 barebox: use lz4 instead of lz4c
lz4c has been considered deprecated by upstream since at least 2018 [1] and has been disabled by default recently [2]. openSUSE Tumbleweed is no longer packaging the deprecated version and others will likely follow.
Going back as far as Ubuntu 16.04/Fedora 25, both lz4 and lz4c are installed as part of the same package so switching should be safe.
1. https://github.com/lz4/lz4/pull/553
2. https://github.com/lz4/lz4/pull/1479
Upstream-Status: Submitted [http://lists.infradead.org/pipermail/barebox/2024-November/048491.html]
--- ...0001-lib-lz4-use-lz4-instead-of-lz4c.patch | 35 +++++++++++++++++++ meta/recipes-bsp/barebox/barebox_2024.09.0.bb | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-bsp/barebox/barebox/0001-lib-lz4-use-lz4-instead-of-lz4c.patch
meta/recipes-bsp/barebox/barebox/0001-lib-lz4-use-lz4-instead-of-lz4c.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 24839df617aef8099e4d1ba3fc47a04c52c0cf75 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <[email protected]> +Date: Wed, 6 Nov 2024 11:59:40 -0500 +Subject: [PATCH] lib: lz4: use lz4 instead of lz4c + +lz4c has been considered deprecated by upstream since at least 2018 [1] +and has been disabled by default recently [2]. openSUSE Tumbleweed is +no longer packaging the deprecated version and others will likely +follow. + +Going back as far as Ubuntu 16.04/Fedora 25, both lz4 and lz4c are +installed as part of the same package so switching should be safe. + +1. https://github.com/lz4/lz4/pull/553 +2. https://github.com/lz4/lz4/pull/1479 + +Upstream-Status: Submitted [http://lists.infradead.org/pipermail/barebox/2024-November/048491.html] +Signed-off-by: Justin Bronder <[email protected]> +--- + scripts/Makefile.lib | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 1881e3c1..1052bcee 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -492,7 +492,7 @@ cmd_lzo = (cat $(filter-out FORCE,$^) | \ + + quiet_cmd_lz4 = LZ4 $@ + cmd_lz4 = (cat $(filter-out FORCE,$^) | \ +- lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ ++ lz4 -l --best stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false) + + %.lz4: %
meta/recipes-bsp/barebox/barebox_2024.09.0.bb +3 -1
@@ -11,5 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f5125d13e000b9ca1f0d3364286c4192" inherit barebox -SRC_URI = "https://barebox.org/download/barebox-${PV}.tar.bz2" +SRC_URI = "https://barebox.org/download/barebox-${PV}.tar.bz2 \ + file://0001-lib-lz4-use-lz4-instead-of-lz4c.patch \ + " SRC_URI[sha256sum] = "4d4ea7e232aeba2b3cb9ccf0dbf8cd8e01c65b6c615f64c3bd0c4f24f23a47da"
Signature · 1 line
2.46.1
PATCH v2 2/2 bitbake.conf: require lz4 instead of lz4c
With bitbake commit 'bb: compress: use lz4 instead of lz4c' we require lz4, not lz4c [1]. Going as far back as Ubuntu 16.04/Fedora 25, they are packaged together so it should be safe to simply adjust the requirement from lz4c to lz4.
Note that the two are largely the same, but upstream has considered lz4c deprecated since at least 2018 [2].
1. https://git.openembedded.org/bitbake/commit/?id=907472034b344e4eb73cfd43059a413469f52e1c
2. https://github.com/lz4/lz4/pull/553
--- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
@@ -517,7 +517,7 @@ HOSTTOOLS += " \ [ ar as awk basename bash bunzip2 bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \ cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \ fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \ - head hostname iconv id install ld ldd ln ls lz4c make md5sum mkdir mkfifo mknod \ + head hostname iconv id install ld ldd ln ls lz4 make md5sum mkdir mkfifo mknod \ mktemp mv nm objcopy objdump od patch perl pr printf pwd \ python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \ sha1sum sha224sum sha256sum sha384sum sha512sum \
Signature · 1 line
2.46.1