From 8a0ec8852ccc5674420ae72483dc4f5b2a4fb752 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 6 Feb 2024 17:48:34 +0100 Subject: [PATCH 1/2] packit: temporarily build systemd without BPF stuff The kernel-tools meta-package was retired in Rawhide, but its replacement has not landed, yet. Until that happens, let's build without the bpf-framework stuff. --- .packit.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.packit.yml b/.packit.yml index 2dcc9e86ca4..fa86c5fa05e 100644 --- a/.packit.yml +++ b/.packit.yml @@ -44,6 +44,10 @@ actions: # Temporarily add libarchive-devel build dep and libarchive runtime dep # until the change propagates to Rawhide's specfile - "sed -ri '0,/^BuildRequires: .+$/s//&\\nBuildRequires: libarchive-devel\\nRequires: libarchive/' .packit_rpm/systemd.spec" + # FIXME: temporarily build without BPF stuff, since there's currently no + # bpftool package in Rawhide (at least not until [0] lands) + # [0] https://bodhi.fedoraproject.org/updates/FEDORA-2024-bb73636f1d + - "sed -nri '1N;2N;/\\nBuildRequires:\\s+bpftool$/{N;N;d};P;N;D' .packit_rpm/systemd.spec" jobs: - job: copr_build From e7a52b1b33cf6bfb1ea6a471490997af3d15bf39 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 9 Feb 2024 12:40:29 +0100 Subject: [PATCH 2/2] test: adjust test-path to fail gracefully with the new pidfd_spawn stuff Since 2e106312e2 the test unit fails with 'resources' result instead of 'exit-code', which the test didn't account for when running unprivileged. Before 2e106312e2: $ /root/systemd/build/test-path Failed to start transient scope unit: Interactive authentication required. Couldn't allocate a scope unit for this test, proceeding without. ... -.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied -.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied ... line 151: path-exists.path: state = running; result = success (left: 29986250) line 151: path-exists.service: state = start; result = success path-exists.service: Main process exited, code=exited, status=219/CGROUP path-exists.service: Failed with result 'exit-code'. line 151: path-exists.path: state = running; result = success (left: 29985948) line 151: path-exists.service: state = failed; result = exit-code Failed to start service path-exists.service, aborting test: failed/exit-code After 2e106312e2: $ /root/systemd/build/test-path Failed to start transient scope unit: Interactive authentication required. Couldn't allocate a scope unit for this test, proceeding without. ... -.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied -.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied path-exists.service: Failed to spawn executor: No such file or directory path-exists.service: Failed to spawn 'start' task: No such file or directory path-exists.service: Failed with result 'resources'. --- src/test/test-path.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/test-path.c b/src/test/test-path.c index 22ed88f7e71..e49653a2404 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -100,7 +100,8 @@ static int _check_states(unsigned line, service_state_to_string(service->state), service_result_to_string(service->result)); - if (service->state == SERVICE_FAILED && service->main_exec_status.status == EXIT_CGROUP) { + if (service->state == SERVICE_FAILED && + (service->main_exec_status.status == EXIT_CGROUP || service->result == SERVICE_FAILURE_RESOURCES)) { const char *ci = ci_environment(); /* On a general purpose system we may fail to start the service for reasons which are