Skip to contentSkip to conversation

systemd: add PACKAGECONFIG to select default compression format

PATCH New [email protected] 1 participant 1 message Jan 19, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: add PACKAGECONFIG to select default compression format

From: Luca Boccassi <[email protected]>

If multiple compression libraries are enabled, the format to use for compression is chosen implicitly, so if you want to compress with e.g. lz4 you cannot enable zstd, so you cannot read zstd-compressed journal files. This PACKAGECONFIGs allow to enable all compression formats for reading, but to choose a specific one for writing.

---
 meta/recipes-core/systemd/systemd_252.4.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-core/systemd/systemd_252.4.bb +6 -0
index 7c3c78a364..d291a2a9a1 100644
@@ -129,6 +129,12 @@ PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybri
 PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
 PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup"
 PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device"
+# If multiple compression libraries are enabled, the format to use for compression is chosen implicitly,
+# so if you want to compress with e.g. lz4 you cannot enable zstd, so you cannot read zstd-compressed journal files.
+# This option allows to enable all compression formats for reading, but choosing a specific one for writing.
+PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true -Ddefault-compression=lz4,,lz4"
+PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz"
+PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd"
 PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
 PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
 PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
Signature · 1 line
2.34.1