You are not logged in.

#1 2022-02-27 04:39:54

abrattic
Member
Registered: 2021-11-05
Posts: 17

[SOLVED] Issues with flatpak Automatic updates via systemd

I wanted to setup flatpak automatic updates via systemd and used the archwiki guide.
But it showed me this error:

archlinux systemd[1]: Starting Update Flatpak...
archlinux systemd[2335]: flatpak-update.service: Failed to set up mount namespacing: /run/systemd/unit-root/root/.local/share/flatpak: No such file or directory
archlinux systemd[2335]: flatpak-update.service: Failed at step NAMESPACE spawning /usr/bin/flatpak: No such file or directory
archlinux systemd[1]: flatpak-update.service: Main process exited, code=exited, status=226/NAMESPACE
archlinux systemd[1]: flatpak-update.service: Failed with result 'exit-code'.
archlinux systemd[1]: Failed to start Update Flatpak.

What am I doing wrong?

Thanks

Last edited by abrattic (2022-02-27 11:54:47)

Offline

#2 2022-02-27 11:54:33

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Issues with flatpak Automatic updates via systemd

Change the second ReadWriteDirectories line in flatpak-update.service to reflect the actual location of the flatpaks.

So if your user is called "user" and you've installed the flatpaks without root privileges the line should be changed to

ReadWriteDirectories=/home/user/.local/share/flatpak/

Mutatis mutandis :-)


Jin, Jîyan, Azadî

Offline

#3 2022-02-27 12:00:58

abrattic
Member
Registered: 2021-11-05
Posts: 17

Re: [SOLVED] Issues with flatpak Automatic updates via systemd

As per this reddit comment.

u/tinywrkb wrote:

That's because the wiki is wrong.
I don't know why someone thought that it's a good idea to run unattended Flatpak updates with systemd, when applications can get new permissions without the user aware of the changes.
If it were me, I would throw this out the wiki page, that's not a good practice.

Anyway, if you're running Flatpak with root, then use the --system option.
The person that added that to the wiki should have mentioned that this can only work with a system Flatpak installation.
For a user Flatpak installation update, you'll need a systemd user service.

Last edited by abrattic (2022-02-28 03:16:49)

Offline

Board footer

Powered by FluxBB