Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions build_library/build_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,30 @@ EOF
if [[ $(sudo find "${root_fs_dir}/usr/share/flatcar/etc" -size +0 ! -type d 2>/dev/null | wc -l) -gt 0 ]]; then
die "Unexpected non-empty files in ${root_fs_dir}/usr/share/flatcar/etc"
fi
# Some backwards-compat symlinks still use this folder as target,
# we can't remove it yet
sudo rm -rf "${root_fs_dir}/usr/share/flatcar/etc"
sudo cp -a "${root_fs_dir}/etc" "${root_fs_dir}/usr/share/flatcar/etc"
# Now set up a default confext and enable it.
# It's important to use dm-verity not only for stricter image policies
# but also because it allows us the refresh to identify this image and
# skip setting it up again in the final boot, which not only saves us
# a daemon-reload during boot but also from /etc contents shortly
# disappearing until systemd-sysext uses mount beneath for an atomic
# remount. Instead of a temporary directory we first prepare it as
# folder and then convert it to a DDI and remove the folder.
sudo rm -rf "${root_fs_dir}/usr/lib/confexts/00-flatcar-default"
sudo mkdir -p "${root_fs_dir}/usr/lib/confexts/00-flatcar-default"
sudo cp -a "${root_fs_dir}/etc" "${root_fs_dir}/usr/lib/confexts/00-flatcar-default/etc"
sudo mkdir -p "${root_fs_dir}/usr/lib/confexts/00-flatcar-default/etc/extension-release.d/"
echo ID=_any | sudo tee "${root_fs_dir}/usr/lib/confexts/00-flatcar-default/etc/extension-release.d/extension-release.00-flatcar-default" > /dev/null
sudo systemd-repart \
--private-key="${SYSEXT_SIGNING_KEY_DIR}/sysexts.key" \
--certificate="${SYSEXT_SIGNING_KEY_DIR}/sysexts.crt" \
--make-ddi=confext \
--copy-source="${root_fs_dir}/usr/lib/confexts/00-flatcar-default" \
"${root_fs_dir}/usr/lib/confexts/00-flatcar-default.raw"
sudo rm -rf "${root_fs_dir}/usr/lib/confexts/00-flatcar-default"

# Remove the rootfs state as it should be recreated through the
# tmpfiles and may not be present on updating machines. This
Expand Down
2 changes: 2 additions & 0 deletions changelog/changes/2025-12-12-default-systemd-confext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Switched `/etc/` from a custom overlayfs for A/B updates to using a systemd-confext extension providing the default contents by using systemd-confext in the mutable mode where `/etc/` gets used as upperdir [scripts#3555](https://github.com/flatcar/scripts/pull/3555)
- Moved systemd-sysext image mounting into the initrd, so that system extensions can better define the behavior of the final system at boot without workarounds to apply settings late at boot. This means `.wants` symlinks for systemd units work as expected now and, therefore, we dropped the `ensure-sysext.service` workaround. We still recommend extensions to keep their workarounds, e.g., using `.upholds` instead of `.wants`, to better support live reloading. A skipping logic prevents an extension refresh late at boot but only if no changes were found. For extensions that are not stored on a custom filesystem, such as a separate `/var` partition, the new extension mounting from the initrd won't be able to load them early but they will be picked up late at boot through the extension refresh. This is another case where it's good if extensions keep workarounds for late loading.
1 change: 1 addition & 0 deletions changelog/updates/2025-12-08-update-systemd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- systemd (258.2)
2 changes: 1 addition & 1 deletion sdk_container/.repo/manifests/mantle-container
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/flatcar/mantle:git-bed79eb716792cbd6f79301f515bafcdb59ee93d
ghcr.io/flatcar/mantle:pr-720
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ EGIT_REPO_URI="https://github.com/flatcar/init.git"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
EGIT_COMMIT="8bd8a82fb22bc46ea2cf7da94d58655e102ca26d" # flatcar-master
#EGIT_COMMIT="8bd8a82fb22bc46ea2cf7da94d58655e102ca26d" # flatcar-master
EGIT_BRANCH="kai/default-confext"
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,6 @@ EOF
-e '/^C!* \/etc\/pam\.d/d' \
-e '/^C!* \/etc\/issue/d' || die

(
# Some OEMs prefer chronyd, so allow them to replace
# systemd-timesyncd with it.
insinto "$(systemd_get_systemunitdir)/systemd-timesyncd.service.d"
newins - flatcar.conf <<'EOF'
# Allow sysexts to ship timesyncd replacements which can have
# a Conflicts=systemd-timesyncd directive that would result
# in systemd-timesyncd not being started.
[Unit]
After=ensure-sysext.service
EOF
)

(
# Allow @mount syscalls for systemd-udevd.service
insinto "$(systemd_get_systemunitdir)/systemd-udevd.service.d"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 6f4b065b626edd8a06ff0c8028173e060b5e444b Mon Sep 17 00:00:00 2001
From: Kai Lueke <kailuke@microsoft.com>
Date: Thu, 20 Nov 2025 23:43:55 +0900
Subject: [PATCH 03/10] vpick: Don't use openat directly but resolve symlinks
in given root

With systemd-sysext --root= all symlinks should be followed relative to
the given root and direct openat usage doesn't work.
Change the openat call to use the chase helper function to resolve the
symlink in the given root.
---
src/shared/vpick.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/vpick.c b/src/shared/vpick.c
index b1b2d93054..dfe58cafa5 100644
--- a/src/shared/vpick.c
+++ b/src/shared/vpick.c
@@ -471,9 +471,9 @@ static int make_choice(
if (!p)
return log_oom_debug();

- object_fd = openat(dir_fd, best_filename, O_CLOEXEC|O_PATH);
+ object_fd = chase_and_openat(toplevel_fd, p, CHASE_AT_RESOLVE_IN_ROOT, O_PATH|O_CLOEXEC, NULL);
if (object_fd < 0)
- return log_debug_errno(errno, "Failed to open '%s/%s': %m",
+ return log_debug_errno(object_fd, "Failed to open '%s/%s': %m",
empty_to_root(toplevel_path), skip_leading_slash(inode_path));

return pin_choice(
--
2.52.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 83043596b6cc74b6f049999fa660afd983dc493a Mon Sep 17 00:00:00 2001
From 61ae07bbf1d7032eef32137b1fe299647602e3de Mon Sep 17 00:00:00 2001
From: David Michael <dm0@redhat.com>
Date: Tue, 16 Apr 2019 02:44:51 +0000
Subject: [PATCH 1/8] wait-online: set --any by default
Subject: [PATCH] wait-online: set --any by default

The systemd-networkd-wait-online command would normally continue
waiting after a network interface is usable if other interfaces are
Expand All @@ -11,22 +11,22 @@ Preserve previous Container Linux behavior for compatibility by
setting the --any flag by default. See patches from v241 (or
earlier) for the original implementation.
---
src/network/wait-online/wait-online.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
src/network/wait-online/wait-online.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/network/wait-online/wait-online.c b/src/network/wait-online/wait-online.c
index 6f5aef903a..0acb3e76b9 100644
index b1d0b9cde2..e07c11d807 100644
--- a/src/network/wait-online/wait-online.c
+++ b/src/network/wait-online/wait-online.c
@@ -21,7 +21,7 @@ static Hashmap *arg_interfaces = NULL;
@@ -24,7 +24,7 @@ static Hashmap *arg_interfaces = NULL;
static char **arg_ignore = NULL;
static LinkOperationalStateRange arg_required_operstate = LINK_OPERSTATE_RANGE_INVALID;
static AddressFamily arg_required_family = ADDRESS_FAMILY_NO;
-static bool arg_any = false;
+static bool arg_any = true;
static bool arg_requires_dns = false;

STATIC_DESTRUCTOR_REGISTER(arg_interfaces, hashmap_free_free_freep);
STATIC_DESTRUCTOR_REGISTER(arg_ignore, strv_freep);
STATIC_DESTRUCTOR_REGISTER(arg_interfaces, hashmap_freep);
--
2.51.0

Loading
Loading