fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
122 stars 3 forks source link

LightDM doesn't properly install within a container #452

Closed jerbmega closed 1 year ago

jerbmega commented 1 year ago

Describe the bug LightDM is not properly installed when added within a Containerfile. Adding lightdm in a Containerfile results in a build that succeeds, but cannot properly run LightDM, as the user is not made due to an error. I also get a dbus-daemon error within the container. I've reproduced this on both Fedora 37 and 38.

I get the following error during build:

error: Found argument '-M' which wasn't expected, or isn't valid in this context

    If you tried to supply `-M` as a value rather than a flag, use `-- -M`

USAGE:
    useradd [OPTIONS] <username>

For more information try --help
Installing: lightdm-1.32.0-2.fc37.x86_64 (fedora)
dbus-daemon: no process found

When running lightdm --debug in the resulting install, the following relevant debug output is noted:

...
[+0.10s] WARNING: Could not enumerate user data directory /var/lib/lightdm-data: Error opening directory `/var/lib/lightdm-data`: No such file or directory
-snip-
[+1.42s] DEBUG: Session pid=1225: Started with service `lightdm-greeter`, username `lightdm`
Failed to get information on user lightdm: Success
[+1.46s] DEBUG: Session pid=1225: Authentication complete with return value 10: User not known to the underlying authentication module
...

The package works properly when layering it over an existing installation, implying this is solely a container issue.

To Reproduce

juhp commented 1 year ago

You have an rpm-ostree based container?

This may not be the best place to solve this problem.

jerbmega commented 1 year ago

Yes, it's a custom image I intend to boot off of. There are similar issues on this repo (#413 and #430) and I was advised this is the right place to file a bug for this workflow.

travier commented 1 year ago

The package works properly when layering it over an existing installation, implying this is solely a container issue.

Then this is an rpm-ostree issue. Please file the issue there.

I'm closing this here as we don't ship ligthdm in Silverblue.

travier commented 1 year ago
Error opening directory `/var/lib/lightdm-data`: No such file or directory

This should be converted to a tmpfiles.d config file instead of being manually created in the package.

travier commented 1 year ago

https://src.fedoraproject.org/rpms/lightdm/blob/rawhide/f/lightdm.spec#_166

jerbmega commented 1 year ago

I'll file an issue with rpm-ostree, thanks.

juhp commented 1 year ago

(I am still curious: are there any examples of rpm-ostree based containers generally available?)

travier commented 1 year ago

@juhp You should checkout the great work from the https://ublue.it/ team :)