sys-apps/systemd-utils: fix assert in kernel-install

Bug: https://bugs.gentoo.org/971388
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
Mike Gilbert
2026-03-20 23:26:25 -04:00
parent eea6cb0159
commit 7ce46b701a
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
https://bugs.gentoo.org/971388
https://github.com/systemd/systemd/pull/41225
From 54db03334813a16721fa96c59b884f1591c758b5 Mon Sep 17 00:00:00 2001
From: Robin Ebert <ebertrobin2002@gmail.com>
Date: Fri, 20 Mar 2026 13:32:04 +0100
Subject: [PATCH] kernel-install: fix assert in context_copy
(cherry picked from commit 55e7dc5ce4999ba9f01499dccdeba0235a86aaa4)
---
src/kernel-install/kernel-install.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kernel-install/kernel-install.c b/src/kernel-install/kernel-install.c
index a38dcaab8b556..618fa746c9bed 100644
--- a/src/kernel-install/kernel-install.c
+++ b/src/kernel-install/kernel-install.c
@@ -152,10 +152,10 @@ static int context_copy(const Context *source, Context *ret) {
assert(source);
assert(ret);
- assert(source->rfd >= 0 || source->rfd == AT_FDCWD);
+ assert(source->rfd >= 0 || source->rfd == AT_FDCWD || source->rfd == XAT_FDROOT);
_cleanup_(context_done) Context copy = (Context) {
- .rfd = AT_FDCWD,
+ .rfd = source->rfd,
.action = source->action,
.machine_id = source->machine_id,
.machine_id_is_random = source->machine_id_is_random,

View File

@@ -107,6 +107,7 @@ CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED
PATCHES=(
"${FILESDIR}/systemd-260-mips.patch"
"${FILESDIR}/systemd-260-kernel-install.patch"
)
pkg_setup() {