Merge pull request #239389 from K900/sddm-0.20.0

sddm: 0.19.0 -> 0.20.0
This commit is contained in:
K900 2023-07-08 11:52:02 +03:00 committed by GitHub
commit 400aafbdc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 61 deletions

View file

@ -268,6 +268,17 @@ in
environment.systemPackages = [ sddm ];
services.dbus.packages = [ sddm ];
# We're not using the upstream unit, so copy these: https://github.com/sddm/sddm/blob/develop/services/sddm.service.in
systemd.services.display-manager.after = [
"systemd-user-sessions.service"
"getty@tty7.service"
"plymouth-quit.service"
"systemd-logind.service"
];
systemd.services.display-manager.conflicts = [
"getty@tty7.service"
];
# To enable user switching, allow sddm to allocate TTYs/displays dynamically.
services.xserver.tty = null;
services.xserver.display = null;

View file

@ -23,14 +23,14 @@ let
enableOCR = true;
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
user = nodes.machine.users.users.alice;
in ''
start_all()
machine.wait_for_text("(?i)select your user")
machine.screenshot("sddm")
machine.send_chars("${user.password}\n")
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge /tmp/xauth_*")
machine.wait_for_window("^IceWM ")
'';
};
@ -55,12 +55,10 @@ let
services.xserver.windowManager.icewm.enable = true;
};
testScript = { nodes, ... }: let
user = nodes.machine.config.users.users.alice;
in ''
testScript = { nodes, ... }: ''
start_all()
machine.wait_for_file("${user.home}/.Xauthority")
machine.succeed("xauth merge ${user.home}/.Xauthority")
machine.wait_for_file("/tmp/xauth_*")
machine.succeed("xauth merge /tmp/xauth_*")
machine.wait_for_window("^IceWM ")
'';
};

View file

@ -1,59 +1,44 @@
{ mkDerivation, lib, fetchFromGitHub, fetchpatch
, cmake, extra-cmake-modules, pkg-config, libxcb, libpthreadstubs
, libXdmcp, libXau, qtbase, qtdeclarative, qtquickcontrols2, qttools, pam, systemd
{ mkDerivation, lib, fetchFromGitHub
, cmake, extra-cmake-modules, pkg-config, qttools
, libxcb, libXau, pam, qtbase, qtdeclarative, qtquickcontrols2, systemd, xkeyboardconfig
}:
let
version = "0.19.0";
in mkDerivation {
mkDerivation rec {
pname = "sddm";
inherit version;
version = "0.20.0";
src = fetchFromGitHub {
owner = "sddm";
repo = "sddm";
rev = "v${version}";
sha256 = "1s6icb5r1n6grfs137gdzfrcvwsb3hvlhib2zh6931x8pkl1qvxa";
hash = "sha256-ctZln1yQov+p/outkQhcWZp46IKITC04e22RfePwEM4=";
};
patches = [
./sddm-ignore-config-mtime.patch
./sddm-default-session.patch
# Load `/etc/profile` for `environment.variables` with zsh default shell.
# See: https://github.com/sddm/sddm/pull/1382
(fetchpatch {
url = "https://github.com/sddm/sddm/commit/e1dedeeab6de565e043f26ac16033e613c222ef9.patch";
sha256 = "sha256-OPyrUI3bbH+PGDBfoL4Ohb4wIvmy9TeYZhE0JxR/D58=";
})
# Fix build with Qt 5.15.3
# See: https://github.com/sddm/sddm/pull/1325
(fetchpatch {
url = "https://github.com/sddm/sddm/commit/e93bf95c54ad8c2a1604f8d7be05339164b19308.patch";
sha256 = "sha256:1rh6sdvzivjcl5b05fczarvxhgpjhi7019hvf2gadnwgwdg104r4";
})
# Fix fails to start while starting X server
# See: https://github.com/sddm/sddm/pull/1324
(fetchpatch {
url = "https://github.com/sddm/sddm/commit/adfaa222fdfa6115ea2b320b0bbc2126db9270a5.patch";
sha256 = "sha256-q/YLlAjxluzHMKUUQglLo3RyyhERQGPHXGr56+4R9VU=";
})
];
postPatch =
# Fix missing include for gettimeofday()
''
sed -e '1i#include <sys/time.h>' -i src/helper/HelperApp.cpp
'';
postPatch = ''
substituteInPlace src/greeter/waylandkeyboardbackend.cpp \
--replace "/usr/share/X11/xkb/rules/evdev.xml" "${xkeyboardconfig}/share/X11/xkb/rules/evdev.xml"
'';
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config qttools ];
buildInputs = [
libxcb libpthreadstubs libXdmcp libXau pam qtbase qtdeclarative qtquickcontrols2 systemd
libxcb
libXau
pam
qtbase
qtdeclarative
qtquickcontrols2
systemd
];
cmakeFlags = [
"-DCONFIG_FILE=/etc/sddm.conf"
"-DCONFIG_DIR=/etc/sddm.conf.d"
# Set UID_MIN and UID_MAX so that the build script won't try
# to read them from /etc/login.defs (fails in chroot).
# The values come from NixOS; they may not be appropriate
@ -62,9 +47,15 @@ in mkDerivation {
"-DUID_MIN=1000"
"-DUID_MAX=29999"
# we still want to run the DM on VT 7 for the time being, as 1-6 are
# occupied by getties by default
"-DSDDM_INITIAL_VT=7"
"-DQT_IMPORTS_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
"-DSYSTEMD_SYSTEM_UNIT_DIR=${placeholder "out"}/lib/systemd/system"
"-DSYSTEMD_SYSUSERS_DIR=${placeholder "out"}/lib/sysusers.d"
"-DSYSTEMD_TMPFILES_DIR=${placeholder "out"}/lib/tmpfiles.d"
"-DDBUS_CONFIG_DIR=${placeholder "out"}/share/dbus-1/system.d"
];

View file

@ -1,38 +1,39 @@
diff --git a/src/common/Configuration.h b/src/common/Configuration.h
index cf44a62..7bb9c03 100644
index 54bcace..49cf5cb 100644
--- a/src/common/Configuration.h
+++ b/src/common/Configuration.h
@@ -44,6 +44,7 @@ namespace SDDM {
"NOTE: Currently ignored if autologin is enabled."));
@@ -48,6 +48,8 @@ namespace SDDM {
Entry(InputMethod, QString, QStringLiteral("qtvirtualkeyboard"), _S("Input method module"));
Entry(Namespaces, QStringList, QStringList(), _S("Comma-separated list of Linux namespaces for user session to enter"));
Entry(GreeterEnvironment, QStringList, QStringList(), _S("Comma-separated list of environment variables to be set"));
+ Entry(DefaultSession, QString, QString(), _S("System-wide default session"));
+
// Name Entries (but it's a regular class again)
Section(Theme,
Entry(ThemeDir, QString, _S(DATA_INSTALL_DIR "/themes"), _S("Theme directory path"));
diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp
index 1953c76..54fe2f2 100644
index d8698b7..df3e3c4 100644
--- a/src/greeter/SessionModel.cpp
+++ b/src/greeter/SessionModel.cpp
@@ -43,6 +43,7 @@ namespace SDDM {
beginResetModel();
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
@@ -49,6 +49,7 @@ namespace SDDM {
if (dri_active)
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
populate(Session::X11Session, mainConfig.X11.SessionDir.get());
+ selectDefaultSession();
endResetModel();
// refresh everytime a file is changed, added or removed
@@ -52,6 +53,7 @@ namespace SDDM {
d->sessions.clear();
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
@@ -62,6 +63,7 @@ namespace SDDM {
if (dri_active)
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
populate(Session::X11Session, mainConfig.X11.SessionDir.get());
+ selectDefaultSession();
endResetModel();
});
watcher->addPath(mainConfig.Wayland.SessionDir.get());
@@ -149,11 +151,25 @@ namespace SDDM {
else
watcher->addPaths(mainConfig.Wayland.SessionDir.get());
@@ -164,11 +166,25 @@ namespace SDDM {
delete si;
}
}
+ }
+
@ -58,14 +59,13 @@ index 1953c76..54fe2f2 100644
}
}
diff --git a/src/greeter/SessionModel.h b/src/greeter/SessionModel.h
index 2e2efa9..a93315c 100644
index 8f4d539..02f77ce 100644
--- a/src/greeter/SessionModel.h
+++ b/src/greeter/SessionModel.h
@@ -58,6 +58,7 @@ namespace SDDM {
@@ -59,6 +59,7 @@ namespace SDDM {
SessionModelPrivate *d { nullptr };
void populate(Session::Type type, const QString &path);
void populate(Session::Type type, const QStringList &dirPaths);
+ void selectDefaultSession();
};
}