Add patch to disable systemd-coredumpd.service

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2026-09-05 16:24:50 +02:00
commit 8562fe5ae2
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,51 @@
From aa3743d5b815a010bf4835c504d764bbeb4b312a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@amutable.com>
Date: Sat, 5 Sep 2026 16:19:21 +0200
Subject: [PATCH] units: allow disabling systemd-coredumpd.service
The new unit is nice, but it might not be desired in all scenarios. It
requires a new kernel, which might be known to not be available, and also
changes sysctl kernel.core_pattern at runtime, which might not be desired.
Replace static enablement by a normal [Install] section and add the unit
to presets to enable it by default.
---
presets/90-systemd.preset | 1 +
units/meson.build | 1 -
units/systemd-coredumpd.service.in | 3 +++
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/presets/90-systemd.preset b/presets/90-systemd.preset
index bf6006c35c..563f4d831f 100644
--- a/presets/90-systemd.preset
+++ b/presets/90-systemd.preset
@@ -22,6 +22,7 @@ enable getty@.service
enable systemd-boot-clear-sysfail.service
enable systemd-boot-update.service
enable systemd-confext.service
+enable systemd-coredumpd.service
enable systemd-homed.service
enable systemd-homed-activate.service
enable systemd-journalctl-metrics.socket
diff --git a/units/meson.build b/units/meson.build
index 0d60b4e006..9f8f8d0e41 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -349,7 +349,6 @@ units = [
{
'file' : 'systemd-coredumpd.service.in',
'conditions' : ['ENABLE_COREDUMP'],
- 'symlinks' : ['sysinit.target.wants/'],
},
{
'file' : 'systemd-creds.socket',
diff --git a/units/systemd-coredumpd.service.in b/units/systemd-coredumpd.service.in
index 01eecb173a..eb8c7a68f6 100644
--- a/units/systemd-coredumpd.service.in
+++ b/units/systemd-coredumpd.service.in
@@ -57,3 +57,6 @@ SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service @mount
TimeoutStopSec=6min
{{SERVICE_WATCHDOG}}
+
+[Install]
+WantedBy=sysinit.target

View file

@ -162,6 +162,12 @@ Patch: 0001-core-create-userdb-root-directory-with-correct-label.patch
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2415701
Patch: 0002-machined-continue-without-resolve.hook-socket.patch
# Disable systemd-coredumpd.service until the selinux policy is patched
# (https://github.com/fedora-selinux/selinux-policy/pull/3397,
# https://src.fedoraproject.org/rpms/selinux-policy/pull-request/675)
Patch: 0001-units-allow-disabling-systemd-coredumpd.service.patch
%endif
%ifarch %{ix86} x86_64 aarch64 riscv64