diff --git a/1065-core-only-activate-transaction-that-contain-useful-j.patch b/1065-core-only-activate-transaction-that-contain-useful-j.patch new file mode 100644 index 0000000..f6cb81f --- /dev/null +++ b/1065-core-only-activate-transaction-that-contain-useful-j.patch @@ -0,0 +1,33 @@ +From 63899267ba57ab4b0b11c039f5c6b03a78528aa7 Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Fri, 9 Jan 2026 17:18:41 +0100 +Subject: [PATCH] core: only activate transaction that contain useful jobs + +If no real jobs were added to the transaction, do not activate it. +The JOB_NOP anchor does not perform any useful work and activating +such transaction only wastes resources. + +Fixes #9751 + +(cherry picked from commit bcbf80c43d107ad233edc990a60bdc40f517085a) +Resolves: RHEL-138710 +--- + src/core/manager.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 5212650fec..d95a6db77c 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1810,6 +1810,11 @@ int manager_propagate_reload(Manager *m, Unit *unit, JobMode mode, sd_bus_error + /* Failure in adding individual dependencies is ignored, so this always succeeds. */ + transaction_add_propagate_reload_jobs(tr, unit, tr->anchor_job, mode == JOB_IGNORE_DEPENDENCIES, e); + ++ /* Only activate the transaction if it contains jobs other than NOP anchor. ++ * Short-circuiting here avoids unnecessary processing, such as emitting D-Bus signals. */ ++ if (hashmap_size(tr->jobs) <= 1) ++ return 0; ++ + r = transaction_activate(tr, m, mode, NULL, e); + if (r < 0) + goto tr_abort; diff --git a/systemd.spec b/systemd.spec index 4c34539..4060bde 100644 --- a/systemd.spec +++ b/systemd.spec @@ -13,7 +13,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 82%{?dist}.13 +Release: 82%{?dist}.14 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -1114,6 +1114,7 @@ Patch1061: 1061-core-transaction-do-not-log-null.patch Patch1062: 1062-run-update-checks-to-allow-running-with-a-user-s-bus.patch Patch1063: 1063-Revert-run-update-checks-to-allow-running-with-a-use.patch Patch1064: 1064-logind-fix-crash-in-logind-on-user-specified-message.patch +Patch1065: 1065-core-only-activate-transaction-that-contain-useful-j.patch %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 @@ -1740,6 +1741,9 @@ fi %files tests -f .file-list-tests %changelog +* Wed Jan 21 2026 systemd maintenance team - 239-82.14 +- core: only activate transaction that contain useful jobs (RHEL-138710) + * Mon Dec 08 2025 systemd maintenance team - 239-82.13 - logind: fix crash in logind on user-specified message string (RHEL-132317)