Artix Linux Forum

Init systems => runit => Topic started by: picokan on 24 August 2022, 21:38:24

Title: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: picokan on 24 August 2022, 21:38:24
I saw seatd-runit and elogind-runit were moved to gremlins recently, so I decided to create this topic instead of staying in the old thread.

As of now, the seatd-runit and elogind-runit packages won't let you "rsm enable/disable logind" or "rsm start/stop seatd/elogind". And if you try to disable or enable the logind service by doing it to seatd or elogind, you will start to get weird results. Instead of linking runsvdir/default/logind to sv/seatd (or elogind), it's better to create sv/logind for both packages and avoid these situations.

Both times I installed the new seatd-runit package I had this happen, and it's not very hard to do it either.

(https://i.ibb.co/qNLkn9w/a.png)
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: qontinuum on 25 August 2022, 07:53:57
I am not a big fan of this since I see this link as a "provides" feature.

What could be done to ensure compatibility with such tool is, instead of directly linking elogind or seatd to the runsvdir, first linking elogind or seatd to logind in the service pool and then linking this logind to the runsvdir.

Another point to defend this way of doing things is that if at some point we add a "standard" way of setting stuff in services, it could be backed up by pacman so you may mix different configurations from the different services. So it is a more flexible way of making it compaible.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: picokan on 25 August 2022, 09:47:24
Thank you, that is a nice compromise. On another end, I might look into the rsm source code and see if there is anything that can be changed to improve usage with situations like this with two packages providing the same service through a symlink.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: qontinuum on 25 August 2022, 18:44:36
The new versions just got pushed to gremlins, if there are no issues they will be pushed to world in a week.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: picokan on 27 August 2022, 18:29:00
Right now the package is creating broken symlinks. Use
Code: [Select]
ln -s /etc/runit/sv/seatd "${pkgdir}/etc/runit/sv/logind"
to create the symlink in the service pool (right now it's creating a symlink *inside* /etc/runit/sv/seatd pointing to /logind).

Also, a down file must be placed inside the seatd service, otherwise runit will try to automatically start it and ignore the check in lightdm's service file and bring back the race condition. This should really be done in the PKGBUILD and it even might not be a bad idea to mention this in the .install somehow.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: qontinuum on 28 August 2022, 10:34:29
There was effectively something broken but there is no link pointing at /logind, where do you have such thing?

Disabling the service wouldn't fix the race condition, it needs a reliable check.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: qontinuum on 28 August 2022, 10:50:48
Just pushed something (https://gitea.artixlinux.org/packagesS/seatd-runit/commit/3d441927118d43fdb30fc509a56792ee4eb65c30) for seatd, I guess it is enough to fix the race condition
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: picokan on 28 August 2022, 11:31:53
A better solution than my suggestion, and after testing I think it did fix the race condition. The symlinks are also fixed too.

Thank you!

Edit: I don't use it, but I checked elogind-runit and its symlinks are also broken.
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: Surf3r on 31 August 2022, 21:14:56
Yep symlink seems to be broken. Hope @qontinuum to manage to fix this  ::)

(https://i.postimg.cc/RZhYc63n/Screenshot-2022-08-31-22-08-47.png) (https://postimages.org/)
Title: Re: Gremlins: seatd-runit and elogind-runit symlink as logind
Post by: qontinuum on 31 August 2022, 21:17:11
Continue the discussions about this topic on the other topic please