On Mon, May 6, 2024 at 2:06 AM Niels Thykier <ni...@thykier.net> wrote:
>
> Jeremy Bícha:
> > Source: debhelper
> > Version: 13.15.3
> > Control: affects -1 src:gnome-remote-desktop
> > X-Debbugs: syst...@packages.debian.org
> >
> > gnome-remote-desktop 46 upstream has decided to implement both
> > tmpfiles.d and sysusers.d to create a system user and its home
> > directory. systemd-tmpfiles needs to run before systemd-sysusers. If
> > not, on a new install, this command hangs for about 90 seconds:
> >
> > Creating user 'gnome-remote-desktop' (GNOME Remote Desktop) with UID
> > *** and GID ***.
> >
> > Then this error:
> > Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.
> >
> > Then the installation completes successfully.
> >
> > Therefore, I recommend that debhelper automatically runs
> > dh_installtmpfiles before running dh_installsysusers in case any other
> > projects want to do what gnome-remote-desktop does.
> >
> > I was able to workaround this issue:
> > https://salsa.debian.org/gnome-team/gnome-remote-desktop/-/commit/8490919
> >
> > Thank you,
> > Jeremy Bícha
> >
>
> Hi Michael and Luca
>
> What is the correct order for tmpfiles vs. sysusers?
>
> I thought the order was sysusers (to create the user) and then tmpfiles
> (to create files/directories and set ownership accordingly). In this bug
> report, the request is to have the directories first before the user is
> created.
>
> Could you please assert what the correct order is for the default case?

There is a circular dependency here.

$ cat /usr/lib/tmpfiles.d/gnome-remote-desktop-tmpfiles.conf
# tmpfiles.d file to ensure the existence of the home directory for
gnome-remote-desktop user
d /var/lib/gnome-remote-desktop 0700 gnome-remote-desktop gnome-remote-desktop
d /etc/gnome-remote-desktop 0755 gnome-remote-desktop gnome-remote-desktop

$ cat /usr/lib/sysusers.d/gnome-remote-desktop-sysusers.conf
# sysusers.d file to ensure the existence of the gnome-remote-desktop user
u gnome-remote-desktop - "GNOME Remote Desktop" /var/lib/gnome-remote-desktop

The 90 second hang if systemd-sysusers is run before
/var/lib/gnome-remote-desktop exists is annoying, but systemd-tmpfiles
errors if the gnome-remote-desktop user doesn't exist yet.

Running tmpfiles, then sysusers, then tmpfiles again works except for
that 90 second hang.

I had to remove the gnome-remote-desktop package, then remove the
gnome-remote-desktop user and the directories and then reboot to test
changes properly.

Thank you,
Jeremy Bícha

Reply via email to