Skip to contentSkip to conversation

lzlib: add a recipe

PATCH Superseded Alexander Kanavin 2 participants 5 messages Feb 5, 2024 – Feb 6, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lzlib: add a recipe

This is needed for rpm reproducibility, as otherwise libmagic will call an external lzip executable, which is both non-threadsafe, and non-deterministic w.r.t sysroot presence.

---
 meta/conf/distro/include/maintainers.inc |  1 +
 meta/recipes-extended/lzip/lzlib_1.14.bb | 37 ++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-extended/lzip/lzlib_1.14.bb
meta/conf/distro/include/maintainers.inc +1 -0
index f0e27b8380e..277e3b16363 100644
@@ -485,6 +485,7 @@ RECIPE_MAINTAINER:pn-lua = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER:pn-lz4 = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzo = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzip = "Denys Dmytriyenko <[email protected]>"
+RECIPE_MAINTAINER:pn-lzlib = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-m4 = "Robert Yang <[email protected]>"
 RECIPE_MAINTAINER:pn-m4-native = "Robert Yang <[email protected]>"
 RECIPE_MAINTAINER:pn-make = "Robert Yang <[email protected]>"
meta/recipes-extended/lzip/lzlib_1.14.bb new file +37 -0
new file mode 100644
index 00000000000..0fac508869f
@@ -0,0 +1,37 @@
+SUMMARY = "Data compression library providing in-memory LZMA compression and decompression functions"
+HOMEPAGE = "https://www.nongnu.org/lzip/lzlib.html"
+DESCRIPTION = "Lzlib is a data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data. The compressed data format used by the library is the lzip format. Lzlib is written in C. "
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=04d943636aa1482e0a97d924d9f4f68f \
+                    "
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/lzip/lzlib/lzlib-${PV}.tar.gz"
+SRC_URI[sha256sum] = "5acac8714ed4f306020bae660dddce706e5f8a795863679037da9fe6bf4dcf6f"
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+CONFIGUREOPTS = "\
+    '--srcdir=${S}' \
+    '--prefix=${prefix}' \
+    '--exec-prefix=${exec_prefix}' \
+    '--bindir=${bindir}' \
+    '--datadir=${datadir}' \
+    '--infodir=${infodir}' \
+    '--sysconfdir=${sysconfdir}' \
+    '--enable-shared' \
+    'CC=${CC}' \
+    'CPPFLAGS=${CPPFLAGS}' \
+    'CXXFLAGS=${CXXFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+"
+
+do_configure () {
+    ${S}/configure ${CONFIGUREOPTS}
+}
+
+do_install () {
+    oe_runmake 'DESTDIR=${D}' install
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 file: enable additional internal compressor support

This is an extension of
https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/file?h=master&id=52a31bd5ba90713af82822047c3813afc31421f8
and the rationale is the same.

The issue was exposed by recent ptest support in xz, which packages .lz files into the xz-ptest package which resulted in reproducibility fails:
http://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20240203-fdpg888c/packages/diff-html/

---
 meta/recipes-devtools/file/file_5.45.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/file/file_5.45.bb +2 -2
index 8477668658d..fa8dc576dcc 100644
@@ -20,12 +20,12 @@ S = "${WORKDIR}/git"
 
 inherit autotools update-alternatives
 
-PACKAGECONFIG ??= "bz2 lzma zlib"
+PACKAGECONFIG ??= "bz2 lzma zlib zstdlib lzlib"
 PACKAGECONFIG[bz2] = "--enable-bzlib, --disable-bzlib, bzip2"
 PACKAGECONFIG[lzma] = "--enable-xzlib, --disable-xzlib, xz"
 PACKAGECONFIG[zlib] = "--enable-zlib, --disable-zlib, zlib"
 PACKAGECONFIG[zstdlib] = "--enable-zstdlib, --disable-zstdlib, zstd"
-PACKAGECONFIG[lzlib] = "--enable-lzlib, --disable-lzlib, lzip"
+PACKAGECONFIG[lzlib] = "--enable-lzlib, --disable-lzlib, lzlib"
 PACKAGECONFIG[seccomp] = "--enable-libseccomp, --disable-libseccomp, libseccomp"
 
 ALTERNATIVE:${PN} = "file"
Signature · 1 line
2.39.2
#2 lore raw
In reply to Alexander Kanavin
Quoted 56 lines · Alexander Kanavin

This is needed for rpm reproducibility, as otherwise libmagic will call an external lzip executable, which is both non-threadsafe, and non-deterministic w.r.t sysroot presence.

---
 meta/conf/distro/include/maintainers.inc |  1 +
 meta/recipes-extended/lzip/lzlib_1.14.bb | 37 ++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-extended/lzip/lzlib_1.14.bb
meta/conf/distro/include/maintainers.inc +1 -0
index f0e27b8380e..277e3b16363 100644
@@ -485,6 +485,7 @@ RECIPE_MAINTAINER:pn-lua = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER:pn-lz4 = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzo = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzip = "Denys Dmytriyenko <[email protected]>"
+RECIPE_MAINTAINER:pn-lzlib = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-m4 = "Robert Yang <[email protected]>"
 RECIPE_MAINTAINER:pn-m4-native = "Robert Yang <[email protected]>"
 RECIPE_MAINTAINER:pn-make = "Robert Yang <[email protected]>"
meta/recipes-extended/lzip/lzlib_1.14.bb new file +27 -0
new file mode 100644
index 00000000000..0fac508869f
@@ -0,0 +1,37 @@
+SUMMARY = "Data compression library providing in-memory LZMA compression and decompression functions"
+HOMEPAGE = "https://www.nongnu.org/lzip/lzlib.html"
+DESCRIPTION = "Lzlib is a data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data. The compressed data format used by the library is the lzip format. Lzlib is written in C. "
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=04d943636aa1482e0a97d924d9f4f68f \
+                    "
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/lzip/lzlib/lzlib-${PV}.tar.gz"
+SRC_URI[sha256sum] = "5acac8714ed4f306020bae660dddce706e5f8a795863679037da9fe6bf4dcf6f"
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+CONFIGUREOPTS = "\
+    '--srcdir=${S}' \
+    '--prefix=${prefix}' \
+    '--exec-prefix=${exec_prefix}' \
+    '--bindir=${bindir}' \
+    '--datadir=${datadir}' \
+    '--infodir=${infodir}' \
+    '--sysconfdir=${sysconfdir}' \
+    '--enable-shared' \
+    'CC=${CC}' \
+    'CPPFLAGS=${CPPFLAGS}' \
+    'CXXFLAGS=${CXXFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+"

meta/recipes-extended/lzip/lzlib_1.14.bb line 37

Quoted 10 lines
meta/recipes-extended/lzip/lzlib_1.14.bb new file +10 -0
+
+do_configure () {
+    ${S}/configure ${CONFIGUREOPTS}
+}
+
+do_install () {
+    oe_runmake 'DESTDIR=${D}' install
+}
+
+BBCLASSEXTEND = "native nativesdk"

There looks to be a multilib issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8577/steps/17/logs/stdio

and a reproducibility issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/4338/steps/12/logs/stdio

Cheers,

Richard