[systemd-devel] systemd v257.5: Issue with systemd-sysupdate, no targets and components listed

Nils Kattenbeck nilskemail at gmail.com
Tue Jul 1 21:11:18 UTC 2025


Hi, that seems like a bug. I would expect them to lookup the same paths, i.e.

          /etc/sysupdate.d/*.transfer
          /run/sysupdate.d/*.transfer
          /usr/local/lib/sysupdate.d/*.transfer
          /usr/lib/sysupdate.d/*.transfer

as written on the man page. Maybe open a report on GitHub with a
minimal reproduction.

Cheers, Nils


On Tue, Jul 1, 2025 at 11:15 AM Simao Gomes Viana | Toowoxx IT GmbH
<Simao.Gomes at toowoxx.de> wrote:
>
> It turns out, the solution is simple:
>
> systemd-sysupdated expects the transfer files to be in /usr/lib/sysupdate.d while systemd-sysupdate expects them in /etc/sysupdate.d
>
> At least that is the case on NixOS. I don't know about other distributions.
>
> I didn't find this crucial piece of information anywhere – not sure if that's due to me simply failing to find it or if it's actually missing.
>
> I copied the files to /usr/lib/sysupdate.d and that just worked, now I get the proper response:
>
> ([('host', 'host', objectpath '/org/freedesktop/sysupdate1/target/host')],)
> ________________________________
> From: systemd-devel <systemd-devel-bounces at lists.freedesktop.org> on behalf of Simao Gomes Viana | Toowoxx IT GmbH <Simao.Gomes at toowoxx.de>
> Sent: Monday, June 30, 2025 15:15
> To: systemd-devel at lists.freedesktop.org <systemd-devel at lists.freedesktop.org>
> Subject: [systemd-devel] systemd v257.5: Issue with systemd-sysupdate, no targets and components listed
>
> Hi,
>
> I have been struggling with an issue regarding systemd-sysupdate and the D-Bus interface and I can't seem to find a way to make it work. My ultimate goal is to use the D-Bus interface to get info about available updates and start the update. This is because the user will be able to start the update from a GUI. I'd be really grateful if someone knows what can be done to fix the issue.
>
> I have two transfers for systemd-sysupdate, one for UKI and one for an image file.
> If I run systemd-sysupdate list, I get the following output:
>
> # systemd-sysupdate list
> As of v257, transfer definitions should have the '.transfer' extension.
> Discovering installed instances…
> Discovering available instances…
> Determining installed update sets…
> Determining available update sets…
>   VERSION INSTALLED AVAILABLE ASSESSMENT
> ↻ 30                    ✓     candidate
> ● 29          ✓         ✓     current
>
> I am able to install this update just fine and rebooting the system causes the new slot to be booted.
> So all that works as expected.
>
> Where this starts to fall apart is when I try to use the org.freedesktop.sysupdate1 D-Bus interface via systemd-sysupdated.service.
> The service runs just fine, and I can use gdbus introspection. Here's an example:
>
> # gdbus introspect --system --dest org.freedesktop.sysupdate1 --object-path /org/freedesktop/sysupdate1
> node /org/freedesktop/sysupdate1 {
>   interface org.freedesktop.DBus.Peer {
>     methods:
>       Ping();
>       GetMachineId(out s machine_uuid);
>     signals:
>     properties:
>   };
>   interface org.freedesktop.DBus.Introspectable {
>     methods:
>       Introspect(out s xml_data);
>     signals:
>     properties:
>   };
>   interface org.freedesktop.DBus.Properties {
>     methods:
>       Get(in  s interface_name,
>           in  s property_name,
>           out v value);
>       GetAll(in  s interface_name,
>              out a{sv} props);
>       Set(in  s interface_name,
>           in  s property_name,
>           in  v value);
>     signals:
>       PropertiesChanged(s interface_name,
>                         a{sv} changed_properties,
>                         as invalidated_properties);
>     properties:
>   };
>   interface org.freedesktop.sysupdate1.Manager {
>     methods:
>       ListTargets(out a(sso) targets);
>       ListJobs(out a(tsuo) jobs);
>       ListAppStream(out as urls);
>     signals:
>       JobRemoved(t id,
>                  o path,
>                  i status);
>     properties:
>   };
>   node target {
>   };
>   node job {
>   };
> };
>
> Calling ListTargets yields an empty array. I also tried doing this from Kotlin using a dbus library but it also just returns an empty array.
>
> # gdbus call --system \
>   --dest org.freedesktop.sysupdate1 \
>   --object-path /org/freedesktop/sysupdate1 \
>   --method org.freedesktop.sysupdate1.Manager.ListTargets
> (@a(sso) [],)
>
> I have also tried renaming the configs to use the .transfer extension but that has not changed anything, even after a service restart.
>
> I added some logging to help with debugging:
>
> (supdated)[1388]: systemd-sysupdated.service: Executing: /nix/store/i844w5h24i11ccknvzzl6xc9805p0w68-systemd-sysupdated-257.5/lib/systemd/systemd-sysupdated
> systemd-sysupdated[1388]: Found container virtualization none.
> systemd[1]: systemd-sysupdated.service: Got notification message from PID 1388: WATCHDOG=1
> systemd-sysupdated[1388]: Bus n/a: changing state UNSET → OPENING
> systemd-sysupdated[1388]: sd-bus: starting bus by connecting to /run/dbus/system_bus_socket...
> systemd-sysupdated[1388]: Bus n/a: changing state OPENING → AUTHENTICATING
> systemd-sysupdated[1388]: Registering bus object implementation for path=/org/freedesktop/sysupdate1 iface=org.freedesktop.sysupdate1.Manager
> systemd-sysupdated[1388]: Registering bus object implementation for path=/org/freedesktop/sysupdate1/job iface=org.freedesktop.sysupdate1.Job
> systemd-sysupdated[1388]: Registering bus object implementation for path=/org/freedesktop/sysupdate1/target iface=org.freedesktop.sysupdate1.Target
> systemd-sysupdated[1388]: Registering bus object implementation for path=/org/freedesktop/LogControl1 iface=org.freedesktop.LogControl1
> systemd-sysupdated[1388]: Bus n/a: changing state AUTHENTICATING → HELLO
> systemd-sysupdated[1388]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName cookie=2 reply_cookie=0 signature=su error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.32 path=n/a interface=n/a member=n/a  cookie=1 reply_cookie=1 signature=s error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: Bus n/a: changing state HELLO → RUNNING
> systemd-sysupdated[1388]: Got message type=signal sender=org.freedesktop.DBus destination=:1.32 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired  cookie=2 reply_cookie=0 signature=s error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: Got message type=signal sender=org.freedesktop.DBus destination=:1.32 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired  cookie=3 reply_cookie=0 signature=s error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: Got message type=method_call sender=:1.31 destination=org.freedesktop.sysupdate1 path=/org/freedesktop/sysupdate1/target interface=org.freedesktop.DBus.Introspectable member=Introspect  cookie=2 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
> systemd-sysupdated[1388]: manager_ensure_targets
> systemd-sysupdated[1388]: manager_enumerate_targets
> systemd-sysupdated[1388]: for each discoverable_classes
> systemd-sysupdated[1388]: manager_enumerate_image_class
> systemd[1]: systemd-sysupdated.service: D-Bus name org.freedesktop.sysupdate1 now owned by :1.32
> systemd[1]: systemd-sysupdated.service: Changed start -> running
> systemd[1]: systemd-sysupdated.service: Job 1514 systemd-sysupdated.service/start finished, result=done
> systemd[1]: Started systemd-sysupdated.service.
> systemd-sysupdated[1388]: image_discover done, got images
> systemd-sysupdated[1388]: image name .host, image path /
> systemd-sysupdated[1388]: for each discoverable_classes
> systemd-sysupdated[1388]: manager_enumerate_image_class
> systemd-sysupdated[1388]: image_discover done, got images
> systemd-sysupdated[1388]: for each discoverable_classes
> systemd-sysupdated[1388]: manager_enumerate_image_class
> systemd-sysupdated[1388]: image_discover done, got images
> systemd-sysupdated[1388]: for each discoverable_classes
> systemd-sysupdated[1388]: manager_enumerate_image_class
> systemd-sysupdated[1388]: image_discover done, got images
> systemd-sysupdated[1388]: manager_enumerate_components
> systemd-sysupdated[1388]: Successfully forked off '(sd-sysupdate)' as PID 1389.
> (sd-sysupdate)[1389]: Skipping PR_SET_MM, as we don't have privileges.
> (sd-sysupdate)[1389]: Spawning sysupdate: systemd-sysupdate --json=short components
>
> Here are my transfer definitions:
> 10-uki.conf
> [Source]
> MatchPattern=zivios_ at v.efi.xz zivios_ at v.efi.gz zivios_ at v.efi
> Path=/var/updates/
> Type=regular-file
>
> [Target]
> InstancesMax=2
> MatchPattern=zivios_ at v.efi
> Mode=0444
> Path=/EFI/Linux
> PathRelativeTo=esp
> Type=regular-file
>
> [Transfer]
> ProtectVersion=%A
>
> 20-store.conf
> [Source]
> MatchPattern=store_ at v.img.xz store_ at v.img.gz store_ at v.img
> Path=/var/updates/
> Type=regular-file
>
> [Target]
> InstancesMax=2
> MatchPattern=store_ at v
> Path=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001
> ReadOnly=yes
> Type=partition
>
> [Transfer]
> ProtectVersion=%A
>
> Some more context:
> # systemd-sysupdate components --json=short
> {"default":false,"components":[]}
>
> # systemctl --version
> systemd 257 (257.5)
> +PAM +AUDIT -SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -BTF -XKBCOMMON +UTMP -SYSVINIT +LIBARCHIVE
> # uname -a
> Linux zivios 6.15.3 #1-NixOS SMP PREEMPT_DYNAMIC Thu Jun 19 13:41:08 UTC 2025 x86_64 GNU/Linux
>
> I'm using NixOS 25.05 and I'm building an immutable, A/B-updatable, secure boot enabled system. Systemd-sysupdate is used for updating the system from the store image and UKI.
>
> This is how I integrated systemd-sysupdated since NixOS does not have it included in nixpkgs, so I had to build a separate package with sysupdated enabled:
> https://github.com/NixOS/nixpkgs/issues/420485#issuecomment-3013608309
>
> Best,
> Simao
>
>
> Mit freundlichen Grüßen /
> best regards,
>
> Simao Gomes Viana | Toowoxx IT GmbH Toowoxx IT GmbH
> Senior Developer Krumbacher Straße 1
> DE-86489 Deisenhausen
>
>
> E: simao.gomes at toowoxx.de
> T: +49 8282 881299-22
> W: toowoxx.de
> Teams: Simao Gomes Viana | Toowoxx IT GmbH
> Standort Ulm
> Münchner Straße 15
> DE-89073 Ulm
> FOLGE UNS:
> Firmensitz:               Toowoxx IT GmbH, Krumbacher Straße 1, 86489 Deisenhausen
> Geschäftsführer:       Christian Thoma, Oliver Wiemer, Jürgen Mayer
> Handelsregister:       Amtsgericht Memmingen HRB 13224
> Umsatzsteuer ID:      DE258706918
>
>
> Mit freundlichen Grüßen /
> best regards,
>
> Simao Gomes Viana | Toowoxx IT GmbH Toowoxx IT GmbH
> Senior Developer Krumbacher Straße 1
> DE-86489 Deisenhausen
>
>
> E: simao.gomes at toowoxx.de
> T: +49 8282 881299-22
> W: toowoxx.de
> Teams: Simao Gomes Viana | Toowoxx IT GmbH
> Standort Ulm
> Münchner Straße 15
> DE-89073 Ulm
> FOLGE UNS:
> Firmensitz:               Toowoxx IT GmbH, Krumbacher Straße 1, 86489 Deisenhausen
> Geschäftsführer:       Christian Thoma, Oliver Wiemer, Jürgen Mayer
> Handelsregister:       Amtsgericht Memmingen HRB 13224
> Umsatzsteuer ID:      DE258706918
>


More information about the systemd-devel mailing list