Closed ryanabx closed 4 months ago
Ah, I was about to mention that this doesn't create the group, but actually it does :)
https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html#
u: Create a system user and group of the specified name should they not exist yet. The user's primary group will be set to the group bearing the same name unless the ID field specifies it.
Note that systemd-sysusers
needs to be executed to cause /etc/passwd, etc to be updated
On my system, there's a systemd unit that does this if it detects that files have been changed (the detection seems sort of brittle to me), but you may need to manually execute it yourself
Note that
systemd-sysusers
needs to be executed to cause /etc/passwd, etc to be updatedOn my system, there's a systemd unit that does this if it detects that files have been changed (the detection seems sort of brittle to me), but you may need to manually execute it yourself
Yeah, I have to anyways because I'm on an atomic image right now and unless I want to recompile I need to instead create a temporary /usr overlay, copy the files to test it, and then run systemd-sysusers
and systemd-tmpfiles
. I will update soon with the results.
I was able to load into cosmic-greeter just fine! I had a PAM issue when logging in, but I assume that's a separate issue. This should be ready for review
I wonder if it would be acceptable to also update the just
file so that it installs these in the correct place in the cosmic-sysext directory?
I did something similar when I added a file to xdg-desktop-portal-cosmic ( https://github.com/pop-os/xdg-desktop-portal-cosmic/pull/16/files ), and the system extension directory is specifically for systemd, so I assume this wouldn't be out-of-scope for the repository
I wonder if it would be acceptable to also update the
just
file so that it installs these in the correct place in the cosmic-sysext directory?I did something similar when I added a file to xdg-desktop-portal-cosmic ( https://github.com/pop-os/xdg-desktop-portal-cosmic/pull/16/files ), and the system extension directory is specifically for systemd, so I assume this wouldn't be out-of-scope for the repository
Good idea, feel free to check my work with my latest commit, since I haven't used justfiles before. It should copy the configuration files at debian/cosmic-greeter-sysusers.conf
and debian/cosmic-greeter-tmpfiles.conf
to usr/lib/sysusers.d/cosmic-greeter.conf
and usr/lib/tmpfiles.d/cosmic-greeter.conf
LGTM :)
I've updated my ostree image (https://github.com/ryanabx/fedora-cosmic-atomic/pkgs/container/fedora-cosmic-atomic) to test the commit from a just sysext
run, and I'm happy to report that it "just works"! I didn't have to do any more tinkering to get cosmic-greeter to show up.
I tested this out, however with the defaults as is I'm getting a "RuntimeDirNotSet" issue when trying to load up cosmic-greeter
I tested this out, however with the defaults as is I'm getting a "RuntimeDirNotSet" issue when trying to load up cosmic-greeter
I'm having a separate issue but I think mine is a new permissions issue with my GitHub actions build. I'll keep you posted if I get mine to work.
Can you send the output of journalctl --unit=cosmic-greeter ?
sorry for the late reply journalctl --unit=cosmic-greeter
didn't print anything useful so I ran journalctl --boot -g cosmic
instead. I realized the issues with the runtimedir stuff are from me deactivating the service and running sudo greetd --config /etc/greetd/cosmic-greeter.toml
so the malconformed config files are probably my issue, Ill rebuild my packaging script since I found the issue, when I get a chance to
EDIT: yeah it was a packaging issue
Note that there's a possible gotcha here if you install cosmic-greeter
as part of the systemd system extension (e.g. from cosmic-epoch): https://github.com/pop-os/cosmic-greeter/issues/25#issuecomment-2050932968
But, if you aren't using system extensions, then what we have here is fine
This is currently a draft while I test to make sure this file works as intended.it works as intended Fixes https://github.com/pop-os/cosmic-greeter/issues/11This PR creates a
systemd-sysusers
configuration file and asystemd-tmpfiles
configuration file. The sysusers configuration file will tell systemd-sysusers to automatically create and clear acosmic-greeter
user on boot. This file must be placed in/usr/lib/sysusers.d/
The tmpfiles configuration file will tell systemd-tmpfiles to automatically create a specified directory (in this case cosmic-greeter's home directory). This file must be placed in/usr/lib/tmpfiles.d/
This will allow immutable/atomic distributions to make better use of
cosmic-greeter
.References: https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html# https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html# I used https://github.com/sddm/sddm/blob/develop/services/sddm-sysuser.conf.in and https://github.com/sddm/sddm/blob/develop/services/sddm-tmpfiles.conf.in as a reference to make these files, also see the conversation in #11 for why this is needed on other distros.
CC @jokeyrhyme