In the light of trying to compile the latest sddm from git I do run into:
$ sddm/build> cmake …
– Release build
– Building Qt 5 version
CMake Error at CMakeLists.txt:218 (message):
Could not find login.defs at /etc/login.defs. Try -DLOGIN_DEFS_PATH.
Interesting, normally libraries etc. are missing, for example I did already solve a problem using “sudo zypper in -t pattern devel_kde_frameworks” but this one is more puzzling.
I did some digging on the forum and it looks like this file has been present in the past but I do not have /etc/login.defs and the /etc/login.defs.d/ directory is empty so likely something has changed making this file not needed anymore.
I did expect /etc/login.defs to be part of the shadow package but “rpm -ql shadow” does not show it.
Anybody an idea how to solve this?
rpm -q --whatprovides login.defs shows no files that are installed that way. The file basically tells the system what UID’s to use and how. This file is probably built at install time. On my Leap 15.5 freshly updated from 15.4 the file is present. Maybe using the Yast Users & Groups might create the file.
Thanks @Sauerland, so yes, something has changed.
$ rpm -q --whatprovides /usr/etc/login.defs
So it seems you have to give the command the full path.
But problem solved:
$ cmake … -DLOGIN_DEFS_PATH=/usr/etc/
SUSE tries to move default configuration files into
SUSE build sidesteps this by hardcoding path to
/usr/etc/login.defs. Strictly speaking this is wrong because it means SDDM ignores local modifications in
/etc (at least I do not see any patches to access both locations). Someone needs to implement and submit a patch to actually use
/usr/etc as default and
/etc for local settings.