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
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From 7eecfffbf7642d6c4c2d33243225ff6e6047bd59 Mon Sep 17 00:00:00 2001
From: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Date: Tue, 23 Jun 2026 18:26:28 +0200
Subject: [PATCH] Revert "systemd: Add noop sysupdate transfer config"

This reverts commit de81605b7c10de0c547edc5b919fc163560f9844.
---
Makefile | 2 --
sysupdate.d/noop.transfer | 8 --------
2 files changed, 10 deletions(-)
delete mode 100644 sysupdate.d/noop.transfer

diff --git a/Makefile b/Makefile
index 90d2a14..1b1495b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,6 @@ install:
$(DESTDIR)/usr/bin \
$(DESTDIR)/usr/sbin \
$(DESTDIR)/usr/lib/flatcar \
- $(DESTDIR)/usr/lib/sysupdate.d \
$(DESTDIR)/usr/lib/systemd/system \
$(DESTDIR)/usr/lib/systemd/network \
$(DESTDIR)/usr/lib/systemd/system-generators \
@@ -34,7 +33,6 @@ install:
install -m 644 configs/modules-load.d/* $(DESTDIR)/usr/lib/modules-load.d/
install -m 644 configs/tmpfiles.d/* $(DESTDIR)/usr/lib/tmpfiles.d/
cp -a systemd/* $(DESTDIR)/usr/lib/systemd/
- cp -a sysupdate.d/* $(DESTDIR)/usr/lib/sysupdate.d/
chmod 755 $(DESTDIR)/usr/lib/systemd/system-generators/*
ln -sf ../run/issue $(DESTDIR)/etc/issue
ln -sfT flatcar $(DESTDIR)/usr/lib/coreos
diff --git a/sysupdate.d/noop.transfer b/sysupdate.d/noop.transfer
deleted file mode 100644
index a591a2e..0000000
--- a/sysupdate.d/noop.transfer
+++ /dev/null
@@ -1,8 +0,0 @@
-[Source]
-Type=regular-file
-Path=/
-MatchPattern=invalid@v.raw
-[Target]
-Type=regular-file
-Path=/
-MatchPattern=invalid@v.raw
--
2.53.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From 948a3c664050d9f74b98e2b016cb810aaf4e9651 Mon Sep 17 00:00:00 2001
From: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Date: Tue, 23 Jun 2026 14:44:49 +0200
Subject: [PATCH] sysupdate: do not fail when no transfers are defined
Comment on lines +1 to +4

`sysupdate` operations like 'list', 'reboot', etc. should not fail when
no transfers are defined.

We can still warn but this should not fail (i.e return an exit code
different from zero).
Comment on lines +9 to +10
Comment on lines +9 to +10

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Comment on lines +4 to +12
---
src/sysupdate/sysupdate.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c
index 69848c3fcb..638dc21c1e 100644
--- a/src/sysupdate/sysupdate.c
+++ b/src/sysupdate/sysupdate.c
@@ -249,13 +249,12 @@ static int context_read_definitions(Context *c, const char* node, bool requires_
}

if (c->n_transfers + (requires_enabled_transfers ? 0 : c->n_disabled_transfers) == 0) {
- if (arg_component)
- return log_error_errno(SYNTHETIC_ERRNO(ENOENT),
- "No transfer definitions for component '%s' found.",
- arg_component);
+ if (arg_component) {
+ log_warning("No transfer definitions for component '%s' found.", arg_component);
+ return 0;
+ }
Comment on lines +29 to +32

- return log_error_errno(SYNTHETIC_ERRNO(ENOENT),
- "No transfer definitions found.");
+ log_warning("No transfer definitions found.");
}

return 0;
@@ -1648,8 +1647,10 @@ static int verb_pending_or_reboot(int argc, char **argv, void *userdata) {
r = context_discover_update_sets_by_flag(context, UPDATE_INSTALLED);
if (r < 0)
return r;
- if (!context->newest_installed)
- return log_error_errno(SYNTHETIC_ERRNO(ENODATA), "Couldn't find any suitable installed versions.");
+ if (!context->newest_installed)
+ return context->n_transfers == 0
+ ? (log_warning("Couldn't find any suitable installed versions."), 0)
+ : log_error_errno(SYNTHETIC_ERRNO(ENODATA), "Couldn't find any suitable installed versions.");

r = parse_os_release(arg_root, "IMAGE_VERSION", &booted_version);
if (r < 0) /* yes, arg_root is NULL here, but we have to pass something, and it's a lot more readable
--
2.53.0