From 95e5e17fe7ed55d0fe248b9451b8dddc3173f5bb Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 15 Nov 2016 09:11:47 +0100 Subject: SDDM: new version 0.14.0 required some patching. --- kde/patch/sddm-qt5.patch | 9 +++++++++ kde/patch/sddm-qt5/sddm_avatars.patch | 33 +++++++++++++++++++++++++++++++ kde/patch/sddm-qt5/sddm_consolekit.diff | 22 +++++++++------------ kde/patch/sddm-qt5/sddm_userxsession.diff | 13 ++++++++++++ kde/post-install/sddm-qt5.post-install | 3 +++ 5 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 kde/patch/sddm-qt5/sddm_avatars.patch create mode 100644 kde/patch/sddm-qt5/sddm_userxsession.diff diff --git a/kde/patch/sddm-qt5.patch b/kde/patch/sddm-qt5.patch index fa4e1b3..23c3cc4 100644 --- a/kde/patch/sddm-qt5.patch +++ b/kde/patch/sddm-qt5.patch @@ -2,6 +2,15 @@ # (brings back the switch_user functionality in KDE): cat $CWD/patch/sddm-qt5/sddm_consolekit.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } +# SDDM 0.14 sources $HOME/.xsession which in Slackware will override the +# session selection you make in SDDM. We fix that unwanted side effect by +# reverting the change: +cat $CWD/patch/sddm-qt5/sddm_userxsession.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + +# Fix display of user avatars ($HOME/.face.icon file) +# (fixed in sddm-0.15.0). +cat $CWD//patch/sddm-qt5/sddm_avatars.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + # Fix a compilation error on passwd backend: #cat $CWD/patch/sddm-qt5/sddm_auth.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } diff --git a/kde/patch/sddm-qt5/sddm_avatars.patch b/kde/patch/sddm-qt5/sddm_avatars.patch new file mode 100644 index 0000000..d40f68c --- /dev/null +++ b/kde/patch/sddm-qt5/sddm_avatars.patch @@ -0,0 +1,33 @@ +From ecb903e48822bd90650bdd64fe80754e3e9664cb Mon Sep 17 00:00:00 2001 +From: Bastian Beischer +Date: Fri, 2 Sep 2016 13:05:18 +0200 +Subject: [PATCH] Fix display of user avatars. (#684) + +QFile::exists("...") does not understand file:// URLs, at least in Qt +5.7.0 and Qt 4.8.7. +--- + src/greeter/UserModel.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp +index 41a9f10..94c492d 100644 +--- a/src/greeter/UserModel.cpp ++++ b/src/greeter/UserModel.cpp +@@ -107,13 +107,13 @@ namespace SDDM { + d->lastIndex = i; + + if (avatarsEnabled) { +- const QString userFace = QStringLiteral("file://%1/.face.icon").arg(user->homeDir); +- const QString systemFace = QStringLiteral("file://%1/%2.face.icon").arg(facesDir).arg(user->name); ++ const QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir); ++ const QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name); + + if (QFile::exists(userFace)) +- user->icon = userFace; ++ user->icon = QStringLiteral("file://%1").arg(userFace); + else if (QFile::exists(systemFace)) +- user->icon = systemFace; ++ user->icon = QStringLiteral("file://%1").arg(systemFace); + } + } + } diff --git a/kde/patch/sddm-qt5/sddm_consolekit.diff b/kde/patch/sddm-qt5/sddm_consolekit.diff index af79f75..9b535bf 100644 --- a/kde/patch/sddm-qt5/sddm_consolekit.diff +++ b/kde/patch/sddm-qt5/sddm_consolekit.diff @@ -1,13 +1,9 @@ -diff --git a/data/scripts/Xsession b/data/scripts/Xsession -index a5d270d..4b48524 100755 ---- a/data/scripts/Xsession -+++ b/data/scripts/Xsession -@@ -74,7 +74,7 @@ case $session in - exec xterm -geometry 80x24-0-0 - ;; - *) -- eval exec "$session" -+ eval exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$session" - ;; - esac - exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop." +--- sddm-0.14.0/data/scripts/Xsession.orig 2016-08-28 13:54:03.000000000 +0200 ++++ sddm-0.14.0/data/scripts/Xsession 2016-11-05 21:47:28.502096600 +0100 +@@ -91,5 +91,5 @@ + if [ -z "$@" ]; then + exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session." + else +- exec $@ ++ exec ck-launch-session dbus-launch --sh-syntax --exit-with-session $@ + fi diff --git a/kde/patch/sddm-qt5/sddm_userxsession.diff b/kde/patch/sddm-qt5/sddm_userxsession.diff new file mode 100644 index 0000000..cbfa1ef --- /dev/null +++ b/kde/patch/sddm-qt5/sddm_userxsession.diff @@ -0,0 +1,13 @@ +--- sddm-0.14.0/data/scripts/Xsession.orig 2016-08-28 13:54:03.000000000 +0200 ++++ sddm-0.14.0/data/scripts/Xsession 2016-11-06 21:35:43.183138893 +0100 +@@ -84,10 +84,6 @@ + fi + [ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources + +-if [ -f "$USERXSESSION" ]; then +- . "$USERXSESSION" +-fi +- + if [ -z "$@" ]; then + exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session." + else diff --git a/kde/post-install/sddm-qt5.post-install b/kde/post-install/sddm-qt5.post-install index d1486c1..15a6a1a 100644 --- a/kde/post-install/sddm-qt5.post-install +++ b/kde/post-install/sddm-qt5.post-install @@ -1,3 +1,6 @@ # Remove PAM related stuff: rm -rf $PKG/etc/pam.d +# Remove the sddm.conf file because we will generate our own in doinst.sh: +rm -f $PKG/etc/sddm.conf + -- cgit v1.2.3