systemd: enable zstd support in journald

Also for mariner 2, force journald to not use zstd compression, to
retain backwards compatibility.

Fixes: #6424
This commit is contained in:
Dan Streetman 2023-10-19 15:24:51 -04:00
parent 8cce7d7dc0
commit 89a59542e5
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff -urpN a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
--- a/src/libsystemd/sd-journal/journal-file.c 2022-01-18 11:35:43.000000000 +0000
+++ b/src/libsystemd/sd-journal/journal-file.c 2023-10-19 19:15:42.093295820 +0000
@@ -3254,7 +3254,7 @@ int journal_file_open(
.flags = flags,
.writable = (flags & O_ACCMODE) != O_RDONLY,
-#if HAVE_ZSTD
+#if HAVE_ZSTD && 0 /* For Mariner 2, disable journal compression with zstd for backwards compatibility */
.compress_zstd = compress,
#elif HAVE_LZ4
.compress_lz4 = compress,

View File

@ -1,7 +1,7 @@
Summary: Systemd-250
Name: systemd
Version: 250.3
Release: 17%{?dist}
Release: 18%{?dist}
License: LGPLv2+ AND GPLv2+ AND MIT
Vendor: Microsoft Corporation
Distribution: Mariner
@ -27,6 +27,8 @@ Patch5: backport-helper-util-macros.patch
Patch6: CVE-2022-4415.patch
Patch7: serve-stale-0001-resolved-added-serve-stale-feature-implementation-of.patch
Patch8: serve-stale-0002-resolved-Initialize-until_valid-while-storing-negati.patch
# Patch9 should be dropped for mariner 3
Patch9: mariner-2-do-not-default-zstd-journal-files-for-backwards-compatibility.patch
BuildRequires: audit-devel
BuildRequires: cryptsetup-devel
BuildRequires: docbook-dtd-xml
@ -49,6 +51,7 @@ BuildRequires: python3-jinja2
BuildRequires: tpm2-tss-devel
BuildRequires: util-linux-devel
BuildRequires: xz-devel
BuildRequires: zstd-devel
Requires: %{name}-rpm-macros = %{version}-%{release}
Requires: glib
Requires: kmod
@ -134,7 +137,7 @@ meson --prefix %{_prefix} \
-Dlibcryptsetup=true \
-Dgcrypt=true \
-Dlz4=true \
-Dzstd=false \
-Dzstd=true \
-Ddbuspolicydir=%{_sysconfdir}/dbus-1/system.d \
-Ddbussessionservicedir=%{_datadir}/dbus-1/services \
-Ddbussystemservicedir=%{_datadir}/dbus-1/system-services \
@ -283,6 +286,9 @@ fi
%files lang -f %{name}.lang
%changelog
* Thu Oct 19 2023 Dan Streetman <ddstreet@ieee.org> - 250.3-18
- Enable zstd support for journalctl, but force journald to not use zstd to keep backwards compatibility
* Fri Jul 07 2023 Dan Streetman <ddstreet@ieee.org> - 250.3-17
- Add support to systemd-resolved to serve stale dns data