From cd45d803c3519fedcf80eeb7e55e0ba0c61baeeb Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 9 Feb 2026 19:19:27 +0000 Subject: [PATCH 1/2] discover-image: restore compatibility with C9S and overlayfs directories 5817c73391b5f3599c50df2c0873b26ea426f848 broke compatibility with CentOS 9 and overlayfs directories, the following fails with -EOPTNOTSUPP: mount -t overlay overlay -o lowerdir=/tmp/app1:/tmp/rootdir /tmp/overlay portablectl attach --copy=symlink --now --runtime /tmp/overlay app1 name_to_handle_at() fails both with and without AT_HANDLE_MNT_ID_UNIQUE. Restore the fallback to path_get_mnt_id_at() that was removed. Fixes TEST-29-PORTABLE.directory Follow-up for 5817c73391b5f3599c50df2c0873b26ea426f848 --- src/shared/discover-image.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/shared/discover-image.c b/src/shared/discover-image.c index 885b896de4..5bb5474608 100644 --- a/src/shared/discover-image.c +++ b/src/shared/discover-image.c @@ -455,10 +455,26 @@ static int image_make( uint64_t on_mount_id; int _mnt_id; + /* The fallback is required for CentOS 9 compatibility when working on a directory located on an + * overlayfs. */ r = name_to_handle_at_try_fid(fd, /* path= */ NULL, &fh, &_mnt_id, &on_mount_id, AT_EMPTY_PATH); - if (r < 0) - return r; - if (r == 0) + if (r < 0) { + if (is_name_to_handle_at_fatal_error(r)) + return r; + + r = path_get_unique_mnt_id_at(fd, /* path= */ NULL, &on_mount_id); + if (r < 0) { + if (!ERRNO_IS_NEG_NOT_SUPPORTED(r) && r != -EUNATCH) + return r; + + int on_mount_id_fallback = -1; + r = path_get_mnt_id_at(fd, /* path= */ NULL, &on_mount_id_fallback); + if (r < 0) + return r; + + on_mount_id = on_mount_id_fallback; + } + } else if (r == 0) on_mount_id = _mnt_id; if (S_ISDIR(st->st_mode)) { From 7755127ca5398359f6b94f7b8203232ff5ef539e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 9 Feb 2026 20:03:38 +0000 Subject: [PATCH 2/2] mkosi: isc-dhcp-server was dropped from debian testing/unstable --- mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf | 1 - .../debian-ubuntu/mkosi.conf.d/isc-dhcp.conf | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf.d/isc-dhcp.conf diff --git a/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf index 64850af0c0..fe4eeb04fc 100644 --- a/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf +++ b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf @@ -48,7 +48,6 @@ Packages= hostname iproute2 iputils-ping - isc-dhcp-server knot libcap-ng-utils libdw-dev diff --git a/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf.d/isc-dhcp.conf b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf.d/isc-dhcp.conf new file mode 100644 index 0000000000..2977041fd9 --- /dev/null +++ b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf.d/isc-dhcp.conf @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[TriggerMatch] +Distribution=debian +Release=bullseye +Release=bookworm +Release=trixie + +[TriggerMatch] +Distribution=ubuntu +Release=jammy +Release=noble +Release=questing + +[Content] +Packages=isc-dhcp-server