The service unit "fwupd-refresh.service" requires a user that was not created during installation. × fwupd-refresh.service - Refresh fwupd metadata and update motd Loaded: loaded (/usr/lib/systemd/system/fwupd-refresh.service; static) Active: failed (Result: exit-code) since Fri 2023-12-08 08:21:17 CET; 41min ago TriggeredBy: ● fwupd-refresh.timer Docs: man:fwupdmgr(1) Process: 229632 ExecStart=/usr/bin/fwupdmgr refresh (code=exited, status=217/USER) Main PID: 229632 (code=exited, status=217/USER) CPU: 1ms Dez 08 08:21:17 hq10pc150 systemd[1]: Starting fwupd-refresh.service... Dez 08 08:21:17 hq10pc150 (fwupdmgr)[229632]: fwupd-refresh.service: Failed to determine user credentials: No such process Dez 08 08:21:17 hq10pc150 (fwupdmgr)[229632]: fwupd-refresh.service: Failed at step USER spawning /usr/bin/fwupdmgr: No such process Dez 08 08:21:17 hq10pc150 systemd[1]: fwupd-refresh.service: Main process exited, code=exited, status=217/USER Dez 08 08:21:17 hq10pc150 systemd[1]: fwupd-refresh.service: Failed with result 'exit-code'. Dez 08 08:21:17 hq10pc150 systemd[1]: Failed to start fwupd-refresh.service. Reproducible: Always
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17ca9be110af7ca14a4982efd71addd200c9499f commit 17ca9be110af7ca14a4982efd71addd200c9499f Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2023-12-13 22:48:09 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2023-12-13 22:49:40 +0000 sys-apps/fwupd: enable DynamicUser mode in fwupd-refresh.service Closes: https://bugs.gentoo.org/919428 Signed-off-by: Marek Szuba <marecki@gentoo.org> sys-apps/fwupd/{fwupd-1.9.10.ebuild => fwupd-1.9.10-r1.ebuild} | 1 + 1 file changed, 1 insertion(+)
(In reply to Larry the Git Cow from comment #1) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=17ca9be110af7ca14a4982efd71addd200c9499f I do not think this fixes it for me. It sets systemd_unit_user to the empty string. Is that intended? I was running 1.9.6 and hit a problem with fwupd-refresh.service: https://github.com/fwupd/fwupd/issues/6630 Updating to 1.9.10-r1 did not fix things for me.
(In reply to Erik Quaeghebeur from comment #2) > (In reply to Larry the Git Cow from comment #1) > > The bug has been closed via the following commit(s): > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > ?id=17ca9be110af7ca14a4982efd71addd200c9499f > > I do not think this fixes it for me. It sets systemd_unit_user to the empty > string. Is that intended? > > I was running 1.9.6 and hit a problem with fwupd-refresh.service: > https://github.com/fwupd/fwupd/issues/6630 > > Updating to 1.9.10-r1 did not fix things for me. Since this commit, the service unit is installed with the DynamicUser option. https://0pointer.net/blog/dynamic-users-with-systemd.html And it solved the problem for me. -- Boot 281c28e578cb471a96274b27850b5ac3 -- Jan 06 15:03:33 shs-pulse systemd[1]: Starting fwupd.service... Jan 06 15:03:34 shs-pulse fwupd[2381]: 14:03:34.996 FuMain Daemon ready for requests (locale de_DE.utf8) Jan 06 15:03:34 shs-pulse systemd[1]: Started fwupd.service. Jan 06 15:03:35 shs-pulse fwupd[2381]: 14:03:35.012 FuEngine HSI attribute org.fwupd.hsi.Kernel.Lockdown (from linux_lockdown) had unknown result Jan 06 16:33:58 shs-pulse fwupd[2381]: 15:33:58.552 FuMain Received SIGTERM Jan 06 16:33:58 shs-pulse systemd[1]: Stopping fwupd.service... Jan 06 16:33:59 shs-pulse systemd[1]: fwupd.service: Deactivated successfully. Jan 06 16:33:59 shs-pulse systemd[1]: Stopped fwupd.service. Thanks for the quick fix.
(In reply to Stefan Schmid from comment #3) > Jan 06 16:33:59 shs-pulse systemd[1]: fwupd.service: Deactivated > successfully. Is that the same as fwupd-refresh.service?
It was a typo, here is the correct service unit: ○ fwupd-refresh.service - Refresh fwupd metadata and update motd Loaded: loaded (/usr/lib/systemd/system/fwupd-refresh.service; static) Active: inactive (dead) TriggeredBy: ● fwupd-refresh.timer Docs: man:fwupdmgr(1) [Unit] Description=Refresh fwupd metadata and update motd Documentation=man:fwupdmgr(1) Wants=network-online.target After=network-online.target [Service] Type=oneshot CacheDirectory=fwupdmgr StandardError=null DynamicUser=yes RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_INET AF_INET6 SystemCallFilter=~@mount ProtectKernelModules=yes ProtectControlGroups=yes RestrictRealtime=yes SuccessExitStatus=2 ExecStart=/usr/bin/fwupdmgr refresh -- Boot 710554dc14ad40d2ad88fe2a7d129381 -- Jan 06 09:06:54 shs-pulse systemd[1]: Starting fwupd-refresh.service... Jan 06 09:06:56 shs-pulse fwupdmgr[92706]: Wird aktualisiert lvfs Jan 06 09:06:57 shs-pulse fwupdmgr[92706]: Neue Metadaten wurden erfolgreich heruntergeladen: 1 lokales Gerät unterstützt Jan 06 09:06:57 shs-pulse systemd[1]: fwupd-refresh.service: Deactivated successfully. Jan 06 09:06:57 shs-pulse systemd[1]: Finished fwupd-refresh.service. -- Boot 281c28e578cb471a96274b27850b5ac3 -- Jan 06 15:03:33 shs-pulse systemd[1]: Starting fwupd-refresh.service... Jan 06 15:03:35 shs-pulse systemd[1]: fwupd-refresh.service: Deactivated successfully. Jan 06 15:03:35 shs-pulse systemd[1]: Finished fwupd-refresh.service. The "DynamicUser" option works.