$ git diff --patch-with-stat --summary 7d289c33a517af2fe446c749e3a93c3cbded6ab5..e718e652f4632c6b68eded86d5d52e9c9699a27c
.abf.yml | 2 +-
0001-Port-from-xauth-to-libXau.patch | 79 +++++++++++-------------
sddm-0.14.0-call-retain-splash-on-plymouth.patch | 10 +--
sddm-0.18.0-environment_file.patch | 11 ++++
sddm-autologin.pam | 30 ++++-----
sddm.conf | 2 +-
sddm.pam | 34 +++++-----
sddm.spec | 13 ++--
sddm.sysconfig | 3 +
9 files changed, 98 insertions(+), 86 deletions(-)
create mode 100644 sddm-0.18.0-environment_file.patch
create mode 100644 sddm.sysconfig
diff --git a/.abf.yml b/.abf.yml
index 21688d9..eadd7ef 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- sddm-0.18.1.tar.xz: ca4f453fd32e68faca437d66d9fbad59258c505c
+ sddm-0.18.1-20191216.tar.xz: 3e36f954156d060545ffa01ccf52f6115aeb9ffd
diff --git a/0001-Port-from-xauth-to-libXau.patch b/0001-Port-from-xauth-to-libXau.patch
index e648b41..622e741 100644
--- a/0001-Port-from-xauth-to-libXau.patch
+++ b/0001-Port-from-xauth-to-libXau.patch
@@ -19,11 +19,10 @@ and make sddm more resilient to hostname changes
6 files changed, 150 insertions(+), 30 deletions(-)
create mode 100644 cmake/FindXAU.cmake
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8500c65..4e62a4d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -94,6 +94,9 @@ find_package(XCB REQUIRED)
+diff -Naur sddm-0.18.1-20191216/CMakeLists.txt sddm-0.18.1-20191216.tpg/CMakeLists.txt
+--- sddm-0.18.1-20191216/CMakeLists.txt 2019-12-12 18:06:59.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/CMakeLists.txt 2019-12-16 12:21:52.501034501 +0000
+@@ -94,6 +94,9 @@
# XKB
find_package(XKB REQUIRED)
@@ -33,11 +32,9 @@ index 8500c65..4e62a4d 100644
# Qt 5
find_package(Qt5 5.8.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test)
-diff --git a/cmake/FindXAU.cmake b/cmake/FindXAU.cmake
-new file mode 100644
-index 0000000..03cafb7
---- /dev/null
-+++ b/cmake/FindXAU.cmake
+diff -Naur sddm-0.18.1-20191216/cmake/FindXAU.cmake sddm-0.18.1-20191216.tpg/cmake/FindXAU.cmake
+--- sddm-0.18.1-20191216/cmake/FindXAU.cmake 1970-01-01 00:00:00.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/cmake/FindXAU.cmake 2019-12-16 12:23:05.887034934 +0000
@@ -0,0 +1,54 @@
+# - Try to find libXau
+# Once done this will define
@@ -93,11 +90,10 @@ index 0000000..03cafb7
+
+ MARK_AS_ADVANCED(LIBXAU_INCLUDE_DIR LIBXAU_LIBRARIES)
+ENDIF (NOT WIN32)
-diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
-index 5d767c8..befc13d 100644
---- a/src/daemon/CMakeLists.txt
-+++ b/src/daemon/CMakeLists.txt
-@@ -57,7 +57,9 @@ target_link_libraries(sddm
+diff -Naur sddm-0.18.1-20191216/src/daemon/CMakeLists.txt sddm-0.18.1-20191216.tpg/src/daemon/CMakeLists.txt
+--- sddm-0.18.1-20191216/src/daemon/CMakeLists.txt 2019-12-12 18:06:59.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/src/daemon/CMakeLists.txt 2019-12-16 12:24:11.596035321 +0000
+@@ -64,7 +64,9 @@
Qt5::DBus
Qt5::Network
Qt5::Qml
@@ -108,11 +104,10 @@ index 5d767c8..befc13d 100644
if(PAM_FOUND)
target_link_libraries(sddm ${PAM_LIBRARIES})
else()
-diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
-index 28ce524..13faf03 100644
---- a/src/daemon/XorgDisplayServer.cpp
-+++ b/src/daemon/XorgDisplayServer.cpp
-@@ -34,6 +34,7 @@
+diff -Naur sddm-0.18.1-20191216/src/daemon/XorgDisplayServer.cpp sddm-0.18.1-20191216.tpg/src/daemon/XorgDisplayServer.cpp
+--- sddm-0.18.1-20191216/src/daemon/XorgDisplayServer.cpp 2019-12-12 18:06:59.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/src/daemon/XorgDisplayServer.cpp 2019-12-16 12:29:58.998037369 +0000
+@@ -35,6 +35,7 @@
#include <random>
#include <xcb/xcb.h>
@@ -120,7 +115,7 @@ index 28ce524..13faf03 100644
#include <pwd.h>
#include <unistd.h>
-@@ -88,28 +89,59 @@ namespace SDDM {
+@@ -89,28 +90,59 @@
}
void XorgDisplayServer::addCookie(const QString &file) {
@@ -137,8 +132,7 @@ index 28ce524..13faf03 100644
+ if (gethostname(localhost, HOST_NAME_MAX) < 0) {
+ strcpy(localhost, "localhost");
+ }
-
-- QString cmd = QStringLiteral("%1 -f %2 -q").arg(mainConfig.X11.XauthPath.get()).arg(file);
++
+ // libXau expects binary data, not a string
+ QByteArray cookieBinary = QByteArray::fromHex(m_cookie.toLatin1());
+
@@ -167,8 +161,7 @@ index 28ce524..13faf03 100644
+ return;
+ }
-- // execute xauth
-- FILE *fp = popen(qPrintable(cmd), "w");
+- QString cmd = QStringLiteral("%1 -f %2 -q").arg(mainConfig.X11.XauthPath.get()).arg(file);
+ // write the Xauth data
+ if (!XauWriteAuth (fp, &auth) || fflush (fp) == EOF) {
+ qWarning() << "Writing the FamilyLocal information to" << file << "failed";
@@ -176,10 +169,12 @@ index 28ce524..13faf03 100644
+ return;
+ }
+- // execute xauth
+- FILE *fp = popen(qPrintable(cmd), "w");
++ auth.family = FamilyWild;
+
- // check file
- if (!fp)
-+ auth.family = FamilyWild;
-+
+ if (!XauWriteAuth (fp, &auth) || fflush (fp) == EOF) {
+ qWarning() << "Writing the FamilyWild information to" << file << "failed";
+ fclose(fp);
@@ -195,34 +190,31 @@ index 28ce524..13faf03 100644
}
bool XorgDisplayServer::start() {
-diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt
-index ebf4a6e..51d47ef 100644
---- a/src/helper/CMakeLists.txt
-+++ b/src/helper/CMakeLists.txt
-@@ -31,7 +31,7 @@ else()
+diff -Naur sddm-0.18.1-20191216/src/helper/CMakeLists.txt sddm-0.18.1-20191216.tpg/src/helper/CMakeLists.txt
+--- sddm-0.18.1-20191216/src/helper/CMakeLists.txt 2019-12-12 18:06:59.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/src/helper/CMakeLists.txt 2019-12-16 12:31:04.990037758 +0000
+@@ -33,7 +33,7 @@
endif()
add_executable(sddm-helper ${HELPER_SOURCES})
-target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml)
+target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml ${LIBXAU_LIBRARIES})
- if(PAM_FOUND)
- target_link_libraries(sddm-helper ${PAM_LIBRARIES})
- else()
-diff --git a/src/helper/UserSession.cpp b/src/helper/UserSession.cpp
-index d4fd2cf..d597935 100644
---- a/src/helper/UserSession.cpp
-+++ b/src/helper/UserSession.cpp
-@@ -34,6 +34,9 @@
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+ # On FreeBSD (possibly other BSDs as well), we want to use
+ # setusercontext() to set up the login configuration from login.conf
+diff -Naur sddm-0.18.1-20191216/src/helper/UserSession.cpp sddm-0.18.1-20191216.tpg/src/helper/UserSession.cpp
+--- sddm-0.18.1-20191216/src/helper/UserSession.cpp 2019-12-12 18:06:59.000000000 +0000
++++ sddm-0.18.1-20191216.tpg/src/helper/UserSession.cpp 2019-12-16 12:36:51.093039798 +0000
+@@ -34,6 +34,8 @@
#include <fcntl.h>
#include <sched.h>
+#include <X11/Xauth.h>
-+
+
namespace SDDM {
UserSession::UserSession(HelperApp *parent)
: QProcess(parent) {
-@@ -270,31 +273,57 @@ namespace SDDM {
+@@ -263,31 +265,57 @@
if (!cookie.isEmpty()) {
QString file = processEnvironment().value(QStringLiteral("XAUTHORITY"));
QString display = processEnvironment().value(QStringLiteral("DISPLAY"));
@@ -293,6 +285,5 @@ index d4fd2cf..d597935 100644
}
}
---
+--
2.17.1
-
diff --git a/sddm-0.14.0-call-retain-splash-on-plymouth.patch b/sddm-0.14.0-call-retain-splash-on-plymouth.patch
index 47b4e04..c96ce19 100644
--- a/sddm-0.14.0-call-retain-splash-on-plymouth.patch
+++ b/sddm-0.14.0-call-retain-splash-on-plymouth.patch
@@ -1,8 +1,8 @@
-diff -Naur sddm-0.18.0/services/sddm.service.in sddm-0.18.0.tpg/services/sddm.service.in
---- sddm-0.18.0/services/sddm.service.in 2018-07-18 10:31:40.000000000 +0000
-+++ sddm-0.18.0.tpg/services/sddm.service.in 2018-07-19 09:17:54.752220767 +0000
-@@ -5,6 +5,7 @@
- After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service systemd-logind.service
+diff -Naur sddm-0.18.1-20191216/services/sddm.service.in sddm-0.18.1-20191216.tpg/services/sddm.service.in
+--- sddm-0.18.1-20191216/services/sddm.service.in 2019-12-16 12:16:35.901032635 +0000
++++ sddm-0.18.1-20191216.tpg/services/sddm.service.in 2019-12-16 12:16:17.934032529 +0000
+@@ -7,6 +7,7 @@
+ StartLimitBurst=2
[Service]
+ExecStartPre=-/bin/plymouth quit --retain-splash
diff --git a/sddm-0.18.0-environment_file.patch b/sddm-0.18.0-environment_file.patch
new file mode 100644
index 0000000..d398cdf
--- /dev/null
+++ b/sddm-0.18.0-environment_file.patch
@@ -0,0 +1,11 @@
+diff -Naur sddm-0.18.1-20191216/services/sddm.service.in sddm-0.18.1-20191216.tpg/services/sddm.service.in
+--- sddm-0.18.1-20191216/services/sddm.service.in 2019-12-16 12:53:36.334045723 +0000
++++ sddm-0.18.1-20191216.tpg/services/sddm.service.in 2019-12-16 12:54:34.891046069 +0000
+@@ -10,6 +10,7 @@
+ ExecStartPre=-/bin/plymouth quit --retain-splash
+ ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/sddm
+ Restart=always
++EnvironmentFile=-/etc/sysconfig/sddm
+
+ [Install]
+ Alias=display-manager.service
diff --git a/sddm-autologin.pam b/sddm-autologin.pam
index 4de8cc3..bbe7993 100644
--- a/sddm-autologin.pam
+++ b/sddm-autologin.pam
@@ -1,15 +1,17 @@
#%PAM-1.0
-auth required pam_env.so
-auth required pam_permit.so
-account required pam_nologin.so
--auth optional pam_gnome_keyring.so
--auth optional pam_kwallet5.so
-account include system-auth
-password include system-auth
-session required pam_loginuid.so
-session optional pam_console.so
-session optional pam_keyinit.so force revoke
-session required pam_namespace.so
-session include system-auth
--session optional pam_gnome_keyring.so auto_start
--session optional pam_kwallet5.so auto_start
+auth required pam_env.so
+auth required pam_shells.so
+auth required pam_nologin.so
+auth required pam_permit.so
+-auth optional pam_gnome_keyring.so
+-auth optional pam_kwallet5.so
+account include system-auth
+password include system-auth
+session required pam_loginuid.so
+session optional pam_console.so
+session optional pam_keyinit.so force revoke
+session required pam_namespace.so
+session include system-auth
+-session optional pam_gnome_keyring.so auto_start
+-session optional pam_kwallet5.so auto_start
+session include postlogin
diff --git a/sddm.conf b/sddm.conf
index 7a24b56..f1a6c40 100644
--- a/sddm.conf
+++ b/sddm.conf
@@ -70,7 +70,7 @@ RememberLastUser=true
# When logging in as the same user twice, restore the original session, rather than create a new one
# (tpg) do not set it to "true" as it does not work yet https://github.com/sddm/sddm/issues/917
-ReuseSession=false
+ReuseSession=true
[X11]
# Xsetup script path
diff --git a/sddm.pam b/sddm.pam
index 4aaa01b..1cb75a8 100644
--- a/sddm.pam
+++ b/sddm.pam
@@ -1,17 +1,19 @@
#%PAM-1.0
-auth required pam_env.so
-auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
-auth substack system-auth
--auth optional pam_kwallet5.so
--auth optional pam_kwallet.so
--auth optional pam_gnome_keyring.so
-account include system-auth
-password include system-auth
-session optional pam_keyinit.so force revoke
-session required pam_namespace.so
-session include system-auth
-session required pam_loginuid.so
--session optional pam_kwallet5.so auto_start
--session optional pam_kwallet.so auto_start
--session optional pam_gnome_keyring.so auto_start
-session optional pam_console.so
+auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
+auth substack system-auth
+-auth optional pam_gnome_keyring.so
+-auth optional pam_kwallet5.so
+-auth optional pam_kwallet.so
+auth include postlogin
+account required pam_nologin.so
+account include system-auth
+password include system-auth
+session required pam_loginuid.so
+session optional pam_console.so
+session optional pam_keyinit.so force revoke
+session required pam_namespace.so
+session include system-auth
+-session optional pam_gnome_keyring.so auto_start
+-session optional pam_kwallet5.so auto_start
+-session optional pam_kwallet.so auto_start
+session include postlogin
diff --git a/sddm.spec b/sddm.spec
index adf45b8..f824d00 100644
--- a/sddm.spec
+++ b/sddm.spec
@@ -1,15 +1,15 @@
-%define date 0
+%define date 20191216
Name: sddm
Summary: Lightweight display manager
Version: 0.18.1
%if %{date}
-Release: 0.%{date}.1
+Release: 5.%{date}.1
# Packaged from git for the time being -- no download URL available
# git archive --format=tar --prefix sddm-0.11.0-$(date +%Y%m%d)/ HEAD | xz -vf > sddm-0.11.0-$(date +%Y%m%d).tar.xz
-Source0: sddm-%{version}-%{date}.tar.xz
+Source0: %{name}-%{version}-%{date}.tar.xz
%else
-Release: 3
+Release: 1
Source0: https://github.com/sddm/sddm/releases/download/v%{version}/%{name}-%{version}.tar.xz
%endif
URL: https://github.com/sddm
@@ -22,6 +22,7 @@ Source3: sddm.pam
Source4: sddm-autologin.pam
Source5: tmpfiles-sddm.conf
Source6: sddm.sysusers
+Source7: sddm.sysconfig
## UH that is wrong wrong .. it means waits forever
## which again means we can deadlock on a displayscript.
## (rxu) wait until script exits
@@ -42,7 +43,7 @@ Patch6: 0001-Execute-etc-X11-Xsession.patch
# https://github.com/sddm/sddm/issues/733
Patch7: https://src.fedoraproject.org/cgit/rpms/sddm.git/plain/0001-Port-from-xauth-to-libXau.patch
Patch8: sddm-0.17.0-clang.patch
-
+Patch9: https://src.fedoraproject.org/rpms/sddm/raw/master/f/sddm-0.18.0-environment_file.patch
BuildRequires: cmake(ECM)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
@@ -116,6 +117,7 @@ install -Dpm 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/sddm
install -Dpm 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/sddm-autologin
install -Dpm 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/sddm.conf
install -Dpm 644 %{SOURCE6} %{buildroot}%{_sysusersdir}/sddm.conf
+install -Dpm 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/sddm
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
@@ -134,6 +136,7 @@ sed -i -e 's,\(^background=\).*,\1%{_datadir}/mdk/backgrounds/OpenMandriva-splas
%{_bindir}/%{name}-greeter
%{_datadir}/%{name}
%config(noreplace) %{_sysconfdir}/sddm.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/sddm
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.DisplayManager.conf
%{_sysconfdir}/pam.d/%{name}
%{_sysconfdir}/pam.d/%{name}-greeter
diff --git a/sddm.sysconfig b/sddm.sysconfig
new file mode 100644
index 0000000..b704082
--- /dev/null
+++ b/sddm.sysconfig
@@ -0,0 +1,3 @@
+# workaround https://bugzilla.redhat.com/1686675
+# see also https://bugreports.qt.io/browse/QTBUG-58508
+QML_DISABLE_DISK_CACHE=1