Version 249.6

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-04 14:17:10 +01:00
parent 6a6e2b723e
commit ebeb76453a
9 changed files with 52 additions and 528 deletions

View File

@ -1,7 +1,7 @@
From d4bd8777a483ea834e687c1ee35dee32efe6e49f Mon Sep 17 00:00:00 2001 From 7d9ee15d0fc2af87481ee371b278dbe7e68165ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 7 Jul 2021 14:02:36 +0200 Date: Wed, 7 Jul 2021 14:02:36 +0200
Subject: [PATCH 1/5] rpm: don't specify the full path for systemctl and other Subject: [PATCH] rpm: don't specify the full path for systemctl and other
commands commands
We can make things a bit simpler and more readable by not specifying the path. We can make things a bit simpler and more readable by not specifying the path.
@ -10,8 +10,6 @@ recursively by anythign we invoke), this didn't really privide any security or
robustness benefits. I guess that full paths were used because this style of robustness benefits. I guess that full paths were used because this style of
rpm packagnig was popular in the past, with macros used for everything rpm packagnig was popular in the past, with macros used for everything
possible, with special macros for common commands like %{__ln} and %{__mkdir}. possible, with special macros for common commands like %{__ln} and %{__mkdir}.
(cherry picked from commit 7d9ee15d0fc2af87481ee371b278dbe7e68165ef)
--- ---
src/rpm/macros.systemd.in | 24 ++++++++++++------------ src/rpm/macros.systemd.in | 24 ++++++++++++------------
src/rpm/triggers.systemd.in | 18 +++++++++--------- src/rpm/triggers.systemd.in | 18 +++++++++---------
@ -252,6 +250,3 @@ index 22abad9812..1631be18c9 100644
fi fi
%transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}} %transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}}
--
2.31.1

View File

@ -1,7 +1,7 @@
From 09e8c6aa71ee4b5ff3ee85fc4855e2c1a246a079 Mon Sep 17 00:00:00 2001 From 6d825ab2d42d3219e49a192bf99f9c09134a0df4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 22 Jul 2021 11:22:33 +0200 Date: Thu, 22 Jul 2021 11:22:33 +0200
Subject: [PATCH 2/5] rpm: use a helper script to actually invoke systemctl Subject: [PATCH] rpm: use a helper script to actually invoke systemctl
commands commands
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@ -27,8 +27,6 @@ implementation in bash to do the more complex stuff.
The meson version is raised to 0.47 because that's needed for install_mode. The meson version is raised to 0.47 because that's needed for install_mode.
We were planning to raise the required version anyway… We were planning to raise the required version anyway…
(cherry picked from commit 6d825ab2d42d3219e49a192bf99f9c09134a0df4)
--- ---
README | 2 +- README | 2 +-
meson.build | 3 +- meson.build | 3 +-
@ -54,7 +52,7 @@ index 0e5c326deb..a8f23a0d5b 100644
gcc, awk, sed, grep, and similar tools gcc, awk, sed, grep, and similar tools
clang >= 10.0, llvm >= 10.0 (optional, required to build BPF programs clang >= 10.0, llvm >= 10.0 (optional, required to build BPF programs
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index 738879eb21..fb986e84f7 100644 index a2ee15bf32..c6b3e72d23 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -10,7 +10,7 @@ project('systemd', 'c', @@ -10,7 +10,7 @@ project('systemd', 'c',
@ -332,6 +330,3 @@ index 1631be18c9..83cd7617f8 100644
%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}} %transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}}
# This script will process files installed in {{SYSUSERS_DIR}} to create # This script will process files installed in {{SYSUSERS_DIR}} to create
--
2.31.1

View File

@ -1,7 +1,7 @@
From 0a2e691b6b1fdceb4b7504870c4b792a66b5080f Mon Sep 17 00:00:00 2001 From 3598aff4d963b2e51ac74d206161da47bfde785c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 22 Jul 2021 11:28:36 +0200 Date: Thu, 22 Jul 2021 11:28:36 +0200
Subject: [PATCH 3/5] rpm: call +needs-restart in parallel Subject: [PATCH] rpm: call +needs-restart in parallel
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@ -9,8 +9,6 @@ Content-Transfer-Encoding: 8bit
Some rpms install a bunch of units… It seems nicer to invoke them all in Some rpms install a bunch of units… It seems nicer to invoke them all in
parallel. In particular, timeouts in systemctl also run in parallel, so if parallel. In particular, timeouts in systemctl also run in parallel, so if
there's some communication mishap, we will wait less. there's some communication mishap, we will wait less.
(cherry picked from commit 3598aff4d963b2e51ac74d206161da47bfde785c)
--- ---
src/rpm/systemd-update-helper.in | 3 ++- src/rpm/systemd-update-helper.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
@ -30,6 +28,3 @@ index 9fa49fa131..f3c75b75fa 100755
;; ;;
system-reload-restart|system-reload|system-restart) system-reload-restart|system-reload|system-restart)
--
2.31.1

View File

@ -1,7 +1,7 @@
From a63d5d320f81c1cbae07897a401ed5cc5374e0bf Mon Sep 17 00:00:00 2001 From 36d55958ccc75fa3c91bdd7354d74c910f2f6cc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 7 Jul 2021 14:37:57 +0200 Date: Wed, 7 Jul 2021 14:37:57 +0200
Subject: [PATCH 4/5] rpm: restart user services at the end of the transaction Subject: [PATCH] rpm: restart user services at the end of the transaction
This closes an important gap: so far we would reexecute the system manager and This closes an important gap: so far we would reexecute the system manager and
restart system services that were configured to do so, but we wouldn't do the restart system services that were configured to do so, but we wouldn't do the
@ -41,8 +41,6 @@ service manually.
A follow-up for https://bugzilla.redhat.com/show_bug.cgi?id=1792468 and A follow-up for https://bugzilla.redhat.com/show_bug.cgi?id=1792468 and
fa97d2fcf64e0558054bee673f734f523373b146. fa97d2fcf64e0558054bee673f734f523373b146.
(cherry picked from commit 36d55958ccc75fa3c91bdd7354d74c910f2f6cc7)
--- ---
meson.build | 1 + meson.build | 1 +
meson_options.txt | 2 ++ meson_options.txt | 2 ++
@ -53,7 +51,7 @@ fa97d2fcf64e0558054bee673f734f523373b146.
6 files changed, 94 insertions(+), 3 deletions(-) 6 files changed, 94 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
index fb986e84f7..d898d9ccd0 100644 index c6b3e72d23..cafce977c2 100644
--- a/meson.build --- a/meson.build
+++ b/meson.build +++ b/meson.build
@@ -270,6 +270,7 @@ conf.set_quoted('TMPFILES_DIR', tmpfilesdir) @@ -270,6 +270,7 @@ conf.set_quoted('TMPFILES_DIR', tmpfilesdir)
@ -65,7 +63,7 @@ index fb986e84f7..d898d9ccd0 100644
conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir) conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir)
conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir) conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir)
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
index 163c8df87d..9383c7da6a 100644 index b60261ac24..50f2b7b5e9 100644
--- a/meson_options.txt --- a/meson_options.txt
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -182,6 +182,8 @@ option('xinitrcdir', type : 'string', value : '', @@ -182,6 +182,8 @@ option('xinitrcdir', type : 'string', value : '',
@ -254,6 +252,3 @@ index 83cd7617f8..694cd94e8d 100644
%transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}} %transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}}
# This script will process files installed in {{SYSUSERS_DIR}} to create # This script will process files installed in {{SYSUSERS_DIR}} to create
# specified users automatically. The priority is set such that it # specified users automatically. The priority is set such that it
--
2.31.1

View File

@ -1,15 +1,13 @@
From 37cd6c0fad847e5fffd9d107358a36e767c7ca42 Mon Sep 17 00:00:00 2001 From 1262e824a4d638e347ae0d39c973f1f750962533 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 23 Jul 2021 15:35:23 +0200 Date: Fri, 23 Jul 2021 15:35:23 +0200
Subject: [PATCH 5/5] update-helper: also add "user-reexec" verb Subject: [PATCH] update-helper: also add "user-reexec" verb
This is not called from the systemd.triggers or systemd.macros files. Instead, This is not called from the systemd.triggers or systemd.macros files. Instead,
it would be called from the scriptlets in systemd rpm package itself, at the it would be called from the scriptlets in systemd rpm package itself, at the
place where we call systemctl daemon-reexec. place where we call systemctl daemon-reexec.
See https://github.com/systemd/systemd/pull/20289#issuecomment-885622200 . See https://github.com/systemd/systemd/pull/20289#issuecomment-885622200 .
(cherry picked from commit 1262e824a4d638e347ae0d39c973f1f750962533)
--- ---
src/rpm/systemd-update-helper.in | 10 +++++++++- src/rpm/systemd-update-helper.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-) 1 file changed, 9 insertions(+), 1 deletion(-)
@ -42,6 +40,3 @@ index f3466ab3c0..0c6675a9db 100755
if [[ "$command" =~ reload ]]; then if [[ "$command" =~ reload ]]; then
for user in $users; do for user in $users; do
SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
--
2.31.1

View File

@ -1,486 +0,0 @@
From 4fa9d8f14523982482386d398d2b2669902f2098 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Mon, 18 Oct 2021 14:11:53 +0900
Subject: [PATCH] Revert "core: Check unit start rate limiting earlier"
This reverts commit ed8fbbf1745c6a2dc0b8cd560ac8a3353f72e979.
This was causing problems during boot, see
https://bodhi.fedoraproject.org/updates/FEDORA-2021-a1a52487e6,
https://bugzilla.redhat.com/show_bug.cgi?id=2013386.
https://github.com/systemd/systemd/issues/21025
---
src/core/automount.c | 23 ++++++-----------------
src/core/mount.c | 23 ++++++-----------------
src/core/path.c | 23 ++++++-----------------
src/core/service.c | 25 +++++++------------------
src/core/socket.c | 23 ++++++-----------------
src/core/swap.c | 23 ++++++-----------------
src/core/timer.c | 23 ++++++-----------------
src/core/unit.c | 7 -------
src/core/unit.h | 4 ----
test/TEST-63-ISSUE-17433/Makefile | 1 -
test/TEST-63-ISSUE-17433/test.sh | 9 ---------
test/meson.build | 2 --
test/testsuite-10.units/test10.service | 3 ---
test/testsuite-63.units/test63.path | 2 --
test/testsuite-63.units/test63.service | 5 -----
test/units/testsuite-63.service | 16 ----------------
16 files changed, 43 insertions(+), 169 deletions(-)
delete mode 120000 test/TEST-63-ISSUE-17433/Makefile
delete mode 100755 test/TEST-63-ISSUE-17433/test.sh
delete mode 100644 test/testsuite-63.units/test63.path
delete mode 100644 test/testsuite-63.units/test63.service
delete mode 100644 test/units/testsuite-63.service
diff --git a/src/core/automount.c b/src/core/automount.c
index 0722abef23..edc9588165 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -814,6 +814,12 @@ static int automount_start(Unit *u) {
if (r < 0)
return r;
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ automount_enter_dead(a, AUTOMOUNT_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -1059,21 +1065,6 @@ static bool automount_supported(void) {
return supported;
}
-static int automount_test_start_limit(Unit *u) {
- Automount *a = AUTOMOUNT(u);
- int r;
-
- assert(a);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- automount_enter_dead(a, AUTOMOUNT_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const automount_result_table[_AUTOMOUNT_RESULT_MAX] = {
[AUTOMOUNT_SUCCESS] = "success",
[AUTOMOUNT_FAILURE_RESOURCES] = "resources",
@@ -1136,6 +1127,4 @@ const UnitVTable automount_vtable = {
[JOB_FAILED] = "Failed to unset automount %s.",
},
},
-
- .test_start_limit = automount_test_start_limit,
};
diff --git a/src/core/mount.c b/src/core/mount.c
index 9bec190cb6..af39db214b 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1168,6 +1168,12 @@ static int mount_start(Unit *u) {
assert(IN_SET(m->state, MOUNT_DEAD, MOUNT_FAILED));
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ mount_enter_dead(m, MOUNT_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -2137,21 +2143,6 @@ static int mount_can_clean(Unit *u, ExecCleanMask *ret) {
return exec_context_get_clean_mask(&m->exec_context, ret);
}
-static int mount_test_start_limit(Unit *u) {
- Mount *m = MOUNT(u);
- int r;
-
- assert(m);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- mount_enter_dead(m, MOUNT_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const mount_exec_command_table[_MOUNT_EXEC_COMMAND_MAX] = {
[MOUNT_EXEC_MOUNT] = "ExecMount",
[MOUNT_EXEC_UNMOUNT] = "ExecUnmount",
@@ -2249,6 +2240,4 @@ const UnitVTable mount_vtable = {
[JOB_TIMEOUT] = "Timed out unmounting %s.",
},
},
-
- .test_start_limit = mount_test_start_limit,
};
diff --git a/src/core/path.c b/src/core/path.c
index 2b659696a4..e098e83a31 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -590,6 +590,12 @@ static int path_start(Unit *u) {
if (r < 0)
return r;
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ path_enter_dead(p, PATH_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -805,21 +811,6 @@ static void path_reset_failed(Unit *u) {
p->result = PATH_SUCCESS;
}
-static int path_test_start_limit(Unit *u) {
- Path *p = PATH(u);
- int r;
-
- assert(p);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- path_enter_dead(p, PATH_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const path_type_table[_PATH_TYPE_MAX] = {
[PATH_EXISTS] = "PathExists",
[PATH_EXISTS_GLOB] = "PathExistsGlob",
@@ -874,6 +865,4 @@ const UnitVTable path_vtable = {
.reset_failed = path_reset_failed,
.bus_set_property = bus_path_set_property,
-
- .test_start_limit = path_test_start_limit,
};
diff --git a/src/core/service.c b/src/core/service.c
index 701c145565..7b90822f68 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2456,6 +2456,13 @@ static int service_start(Unit *u) {
assert(IN_SET(s->state, SERVICE_DEAD, SERVICE_FAILED));
+ /* Make sure we don't enter a busy loop of some kind. */
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ service_enter_dead(s, SERVICE_FAILURE_START_LIMIT_HIT, false);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -4451,22 +4458,6 @@ static const char *service_finished_job(Unit *u, JobType t, JobResult result) {
return NULL;
}
-static int service_test_start_limit(Unit *u) {
- Service *s = SERVICE(u);
- int r;
-
- assert(s);
-
- /* Make sure we don't enter a busy loop of some kind. */
- r = unit_test_start_limit(u);
- if (r < 0) {
- service_enter_dead(s, SERVICE_FAILURE_START_LIMIT_HIT, false);
- return r;
- }
-
- return 0;
-}
-
static const char* const service_restart_table[_SERVICE_RESTART_MAX] = {
[SERVICE_RESTART_NO] = "no",
[SERVICE_RESTART_ON_SUCCESS] = "on-success",
@@ -4629,6 +4620,4 @@ const UnitVTable service_vtable = {
},
.finished_job = service_finished_job,
},
-
- .test_start_limit = service_test_start_limit,
};
diff --git a/src/core/socket.c b/src/core/socket.c
index 31d88b71ff..f362a5baa8 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -2515,6 +2515,12 @@ static int socket_start(Unit *u) {
assert(IN_SET(s->state, SOCKET_DEAD, SOCKET_FAILED));
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ socket_enter_dead(s, SOCKET_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -3423,21 +3429,6 @@ static int socket_can_clean(Unit *u, ExecCleanMask *ret) {
return exec_context_get_clean_mask(&s->exec_context, ret);
}
-static int socket_test_start_limit(Unit *u) {
- Socket *s = SOCKET(u);
- int r;
-
- assert(s);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- socket_enter_dead(s, SOCKET_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const socket_exec_command_table[_SOCKET_EXEC_COMMAND_MAX] = {
[SOCKET_EXEC_START_PRE] = "ExecStartPre",
[SOCKET_EXEC_START_CHOWN] = "ExecStartChown",
@@ -3564,6 +3555,4 @@ const UnitVTable socket_vtable = {
[JOB_TIMEOUT] = "Timed out stopping %s.",
},
},
-
- .test_start_limit = socket_test_start_limit,
};
diff --git a/src/core/swap.c b/src/core/swap.c
index b25f68fb7d..3843b19500 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -933,6 +933,12 @@ static int swap_start(Unit *u) {
if (UNIT(other)->job && UNIT(other)->job->state == JOB_RUNNING)
return -EAGAIN;
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ swap_enter_dead(s, SWAP_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -1582,21 +1588,6 @@ static int swap_can_clean(Unit *u, ExecCleanMask *ret) {
return exec_context_get_clean_mask(&s->exec_context, ret);
}
-static int swap_test_start_limit(Unit *u) {
- Swap *s = SWAP(u);
- int r;
-
- assert(s);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- swap_enter_dead(s, SWAP_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const swap_exec_command_table[_SWAP_EXEC_COMMAND_MAX] = {
[SWAP_EXEC_ACTIVATE] = "ExecActivate",
[SWAP_EXEC_DEACTIVATE] = "ExecDeactivate",
@@ -1692,6 +1683,4 @@ const UnitVTable swap_vtable = {
[JOB_TIMEOUT] = "Timed out deactivating swap %s.",
},
},
-
- .test_start_limit = swap_test_start_limit,
};
diff --git a/src/core/timer.c b/src/core/timer.c
index 5ecc9f35cf..e064ad9a2d 100644
--- a/src/core/timer.c
+++ b/src/core/timer.c
@@ -635,6 +635,12 @@ static int timer_start(Unit *u) {
if (r < 0)
return r;
+ r = unit_test_start_limit(u);
+ if (r < 0) {
+ timer_enter_dead(t, TIMER_FAILURE_START_LIMIT_HIT);
+ return r;
+ }
+
r = unit_acquire_invocation_id(u);
if (r < 0)
return r;
@@ -895,21 +901,6 @@ static int timer_can_clean(Unit *u, ExecCleanMask *ret) {
return 0;
}
-static int timer_test_start_limit(Unit *u) {
- Timer *t = TIMER(u);
- int r;
-
- assert(t);
-
- r = unit_test_start_limit(u);
- if (r < 0) {
- timer_enter_dead(t, TIMER_FAILURE_START_LIMIT_HIT);
- return r;
- }
-
- return 0;
-}
-
static const char* const timer_base_table[_TIMER_BASE_MAX] = {
[TIMER_ACTIVE] = "OnActiveSec",
[TIMER_BOOT] = "OnBootSec",
@@ -969,6 +960,4 @@ const UnitVTable timer_vtable = {
.timezone_change = timer_timezone_change,
.bus_set_property = bus_timer_set_property,
-
- .test_start_limit = timer_test_start_limit,
};
diff --git a/src/core/unit.c b/src/core/unit.c
index 69ed43578e..38d3eb703f 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1851,13 +1851,6 @@ int unit_start(Unit *u) {
assert(u);
- /* Check start rate limiting early so that failure conditions don't cause us to enter a busy loop. */
- if (UNIT_VTABLE(u)->test_start_limit) {
- int r = UNIT_VTABLE(u)->test_start_limit(u);
- if (r < 0)
- return r;
- }
-
/* If this is already started, then this will succeed. Note that this will even succeed if this unit
* is not startable by the user. This is relied on to detect when we need to wait for units and when
* waiting is finished. */
diff --git a/src/core/unit.h b/src/core/unit.h
index 9babd07188..759104ffa7 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -649,10 +649,6 @@ typedef struct UnitVTable {
* of this type will immediately fail. */
bool (*supported)(void);
- /* If this function is set, it's invoked first as part of starting a unit to allow start rate
- * limiting checks to occur before we do anything else. */
- int (*test_start_limit)(Unit *u);
-
/* The strings to print in status messages */
UnitStatusMessageFormats status_message_formats;
diff --git a/test/TEST-63-ISSUE-17433/Makefile b/test/TEST-63-ISSUE-17433/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-63-ISSUE-17433/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile
\ No newline at end of file
diff --git a/test/TEST-63-ISSUE-17433/test.sh b/test/TEST-63-ISSUE-17433/test.sh
deleted file mode 100755
index c595a9f2de..0000000000
--- a/test/TEST-63-ISSUE-17433/test.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/17433"
-
-# shellcheck source=test/test-functions
-. "${TEST_BASE_DIR:?}/test-functions"
-
-do_test "$@"
diff --git a/test/meson.build b/test/meson.build
index 6f8f257c2d..47c7f4d49a 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -33,8 +33,6 @@ if install_tests
install_dir : testdata_dir)
install_subdir('testsuite-52.units',
install_dir : testdata_dir)
- install_subdir('testsuite-63.units',
- install_dir : testdata_dir)
testsuite08_dir = testdata_dir + '/testsuite-08.units'
install_data('testsuite-08.units/-.mount',
diff --git a/test/testsuite-10.units/test10.service b/test/testsuite-10.units/test10.service
index 2fb476b986..d0be786b01 100644
--- a/test/testsuite-10.units/test10.service
+++ b/test/testsuite-10.units/test10.service
@@ -1,9 +1,6 @@
[Unit]
Requires=test10.socket
ConditionPathExistsGlob=/tmp/nonexistent
-# Make sure we hit the socket trigger limit in the test and not the service start limit.
-StartLimitInterval=1000
-StartLimitBurst=1000
[Service]
ExecStart=true
diff --git a/test/testsuite-63.units/test63.path b/test/testsuite-63.units/test63.path
deleted file mode 100644
index a6573bda0a..0000000000
--- a/test/testsuite-63.units/test63.path
+++ /dev/null
@@ -1,2 +0,0 @@
-[Path]
-PathExists=/tmp/test63
diff --git a/test/testsuite-63.units/test63.service b/test/testsuite-63.units/test63.service
deleted file mode 100644
index c83801874d..0000000000
--- a/test/testsuite-63.units/test63.service
+++ /dev/null
@@ -1,5 +0,0 @@
-[Unit]
-ConditionPathExists=!/tmp/nonexistent
-
-[Service]
-ExecStart=true
diff --git a/test/units/testsuite-63.service b/test/units/testsuite-63.service
deleted file mode 100644
index 04122723d4..0000000000
--- a/test/units/testsuite-63.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=TEST-63-ISSUE-17433
-
-[Service]
-ExecStartPre=rm -f /failed /testok
-Type=oneshot
-ExecStart=rm -f /tmp/nonexistent
-ExecStart=systemctl start test63.path
-ExecStart=touch /tmp/test63
-# Make sure systemd has sufficient time to hit the start limit for test63.service.
-ExecStart=sleep 2
-ExecStart=sh -x -c 'test "$(systemctl show test63.service -P ActiveState)" = failed'
-ExecStart=sh -x -c 'test "$(systemctl show test63.service -P Result)" = start-limit-hit'
-ExecStart=sh -x -c 'test "$(systemctl show test63.path -P ActiveState)" = failed'
-ExecStart=sh -x -c 'test "$(systemctl show test63.path -P Result)" = unit-start-limit-hit'
-ExecStart=sh -x -c 'echo OK >/testok'
--
2.33.1

View File

@ -0,0 +1,30 @@
From a4eba5d8cfaabbd87687c651fcdd06df9e267931 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 4 Nov 2021 09:49:18 +0100
Subject: [PATCH] update-helper: add missing loop over user units
Noticed by Luca.
shellcheck doens't catch this, and somehow it was missed in review
and testing ;(
---
src/rpm/systemd-update-helper.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index fa35e7ba90..7e007d4806 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -52,8 +52,10 @@ case "$command" in
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
- SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
- systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+ for unit in "$@"; do
+ SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
+ systemctl --user -M "$user@" set-property "$unit" Markers=+needs-restart &
+ done
done
wait
;;

View File

@ -1 +1 @@
SHA512 (systemd-249.5.tar.gz) = d6f1a5a6f03f0ed05b111aee75da509c5868c523af6209f33e630724dd0c7e0d0abf16920795d587e6c31a5915d247ebc613cf26d4aecf39f82ebb0690fab75f SHA512 (systemd-249.6.tar.gz) = 7149cb807cac05a590545a9155ecacdf230f09cac70585fa8e7ddd1f03e86205cb1c91b51885b65d2f2cf921e6fdad5ca182047d290f31631c8eb362fe87e4a5

View File

@ -30,7 +30,7 @@
Name: systemd Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd Url: https://www.freedesktop.org/wiki/Software/systemd
%if %{without inplace} %if %{without inplace}
Version: 249.5 Version: 249.6
Release: 2%{?dist} Release: 2%{?dist}
%else %else
# determine the build information from local checkout # determine the build information from local checkout
@ -96,8 +96,7 @@ Patch0002: 0002-rpm-use-a-helper-script-to-actually-invoke-systemctl.patch
Patch0003: 0003-rpm-call-needs-restart-in-parallel.patch Patch0003: 0003-rpm-call-needs-restart-in-parallel.patch
Patch0004: 0004-rpm-restart-user-services-at-the-end-of-the-transact.patch Patch0004: 0004-rpm-restart-user-services-at-the-end-of-the-transact.patch
Patch0005: 0005-update-helper-also-add-user-reexec-verb.patch Patch0005: 0005-update-helper-also-add-user-reexec-verb.patch
# Backport https://github.com/systemd/systemd-stable/pull/133 to fix boot Patch0006: 0006-update-helper-add-missing-loop-over-user-units.patch
Patch0006: 0006-Revert-core-Check-unit-start-rate-limiting-earlier.patch
# Downstream-only patches (50009999) # Downstream-only patches (50009999)
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828 # https://bugzilla.redhat.com/show_bug.cgi?id=1738828
@ -1001,6 +1000,12 @@ fi
%files standalone-sysusers -f .file-list-standalone-sysusers %files standalone-sysusers -f .file-list-standalone-sysusers
%changelog %changelog
* Thu Nov 4 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 249.6-2
- Latest bugfix release (networkd, coredumpctl, varlink, udev,
systemctl, systemd itself, better detection of Hyper-V and
Virtualbox virtualization, documentation updates)
- Fix helper to restart user units
* Fri Oct 29 2021 Adam Williamson <awilliam@redhat.com> - 249.5-2 * Fri Oct 29 2021 Adam Williamson <awilliam@redhat.com> - 249.5-2
- Backport PR #133 to fix boot - Backport PR #133 to fix boot