commit sddm for openSUSE:Factory
Hello community, here is the log from the commit of package sddm for openSUSE:Factory checked in at 2016-11-25 12:28:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sddm (Old) and /work/SRC/openSUSE:Factory/.sddm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "sddm" Changes: -------- --- /work/SRC/openSUSE:Factory/sddm/sddm.changes 2016-11-24 21:18:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.sddm.new/sddm.changes 2016-11-25 12:28:58.000000000 +0100 @@ -2,16 +1,0 @@ -Mon Nov 21 20:55:27 UTC 2016 - fabian@ritter-vogt.de - -- Add various bugfixes from develop branch: - * 0001-Fix-display-of-user-avatars.-684.patch - * 0002-Add-a-config-option-to-enable-high-DPI-scaling-701.patch - * 0003-elarun-Update-date-and-time.patch - * 0004-Support-Non-Latin-characters-in-theme-settings-708.patch - * 0005-Cleanup-dangling-pointer-in-SocketServer-725.patch - -------------------------------------------------------------------- -Wed Oct 5 07:23:51 UTC 2016 - fabian@ritter-vogt.de - -- Sync with KDE:Frameworks5:LTS, sort sddm.changes -- Remove 0001-Fall-back-to-regular-login-when-autologin-fails.patch - -------------------------------------------------------------------- @@ -39,51 +22,0 @@ - -------------------------------------------------------------------- -Mon Aug 29 07:03:56 UTC 2016 - fabian@ritter-vogt.de - -- Update to 0.14.0: - - http://hawaiios.org/news/2016/08/28/sddm-0.14.0 - + New sddm.conf option EnableAvatars (useful for slow filesystems) - + New sddm.conf option UserAuthFile on the XDisplay section - to change the default Xauthority file name and path. - + New sddm.conf option SessionLogFile on XDisplay and WaylandDisplay - sections to change the default user session log location. - + ComboBox now exposes the arrow background color as - "arrowColor" property. - + New "style" theme configuration for QtQuick Controls 2.0. - + Require Qt 5.6 or better. - + Enable HiDPI support. - + Refresh sessions list. - + Always fallback to an embedded theme if no suitable theme is found. - - Actually change Qt platform theme. - - Switch to Wayland session vt only when authentication - succeeds. - - Close PAM session. - - Delete PAM credentials after closing the session. - * More theme-neutral default user and root avatars - * REMOVED the "circles" theme. Remember to change it if you had it set! - * REMOVED the "maui" theme as a standalone theme as it is now - embedded in the greeter. Remember to change the theme to empty - if you had it set to "maui". - * Update Estonian translation. - * Add Catalan translation from Robert Antoni Buj Gelonch. - * Add Dutch translation from Eric Hameleers. - * Add Slovak translation from Martin Minka. - * Add Swedish translation from Kristoffer Grundström. - * Add Ukrainian translation from Cherevan Andriy. - * Add Indian flag from Sanjeev Premi. -- Refresh patches: - - sddm-relaxed-auth.diff - - sddm-service-handle-plymouth.patch - - sysconfig-support.patch -- Remove upstream patches: - - 0001-Add-a-config-option-to-enable-avatars.patch - - 0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch - - root.face.icon.png - - default.face.icon.png -- Remove upstreamed patches: - - add-count-property-to-UserModel.patch - - add-threshold-to-disable-avatars.patch - - specify-default-config-entries.patch -- Revert upstream config section name change (gh#sddm/sddm#680): - - 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch -- Use "Current=" instead of "Current=maui" Old: ---- 0001-Fix-display-of-user-avatars.-684.patch 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch 0002-Add-a-config-option-to-enable-high-DPI-scaling-701.patch 0003-elarun-Update-date-and-time.patch 0004-Support-Non-Latin-characters-in-theme-settings-708.patch 0005-Cleanup-dangling-pointer-in-SocketServer-725.patch sddm-0.14.0.tar.xz New: ---- 0001-Add-a-config-option-to-enable-avatars.patch 0001-Fall-back-to-regular-login-when-autologin-fails.patch 0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch add-count-property-to-UserModel.patch add-threshold-to-disable-avatars.patch default.face.icon.png root.face.icon.png sddm-0.13.0.tar.xz specify-default-config-entries.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sddm.spec ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -20,7 +20,7 @@ %{!?_unitdir: %global _unitdir /usr/lib/systemd/system} Name: sddm -Version: 0.14.0 +Version: 0.13.0 Release: 0 Summary: Lightweight QML-based display manager License: GPL-2.0+ @@ -29,33 +29,39 @@ Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz Source1: %{name}.conf Source2: X11-displaymanagers-%{name} -# PATCH-FIX-UPSTREAM 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch -- Revert to 0.13.0 config syntax -Patch0: 0001-Revert-Rename-XDisplay-and-WaylandDisplay-config-sec.patch +# default.face.icon.png and root.face.icon.png were part of Patch7 (0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch), but used as sources since binary patches are not supported +Source3: default.face.icon.png +Source4: root.face.icon.png # PATCH-FIX-OPENSUSE proper_pam.diff -- Use openSUSE pam config -Patch1: proper_pam.diff +Patch0: proper_pam.diff # PATCH-FIX-OPENSUSE create_pid_file.patch -- openSUSE's generic display-manager service doesn't know what to do without a pid file. drop the patch as soon as that sick dinosaur is killed -Patch2: create_pid_file.patch +Patch1: create_pid_file.patch # PATCH-FIX-OPENSUSE sddm-relaxed-auth.diff -- Insert XAUTHLOCALHOSTNAME into users enviroment, so the session handles hostname changes with a single X instance/run # related patches: libxcb/bug-262309_xcb-xauthlocalhostname.diff, xauth/xauth-tolerant-hostname-changes.diff, kdebase4-workspace/kdm-relaxed-auth.diff -Patch3: sddm-relaxed-auth.diff +Patch2: sddm-relaxed-auth.diff # PATCH-FIX-OPENSUSE sysconfig-support.patch -- Support DISPLAYMANAGER_AUTOLOGIN entry from /etc/sysconfig/displaymanager, the value overwrites # any entry in sddm.conf/[Autologin]/User. Patch also defaults to plasma5.desktop as default autologin session. This is controlled only by sddm.conf file. -Patch4: sysconfig-support.patch +Patch3: sysconfig-support.patch # PATCH-FIX-OPENSUSE sddm-service-handle-plymouth.patch -- sddm has some rudimentary support for plymouth handling, which only works with plymouth-quit.service # (the servce is not enabled on openSUSE). For users of sddm.service, we need to issue plymouth quit command by hand in this case -Patch5: sddm-service-handle-plymouth.patch +Patch4: sddm-service-handle-plymouth.patch # PATCH-FIX-OPENSUSE boo949903.patch -- Let sddm also default to plasma5 for last used session (boo#949903) -Patch6: boo949903.patch +Patch5: boo949903.patch +# PATCH-FIX-UPSTREAM 0001-Add-a-config-option-to-enable-avatars.patch -- Add EnableAvatars config option +Patch6: 0001-Add-a-config-option-to-enable-avatars.patch +# PATCH-FIX-UPSTREAM 0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch -- Use new face icons +Patch7: 0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch +# PATCH-FIX-UPSTREAM add-count-property-to-UserModel.patch -- Adds a new property so themes can use it +Patch8: add-count-property-to-UserModel.patch +# PATCH-FIX-UPSTREAM specify-default-config-entries.patch -- Specify which config entries are a default and which come from the config file +Patch9: specify-default-config-entries.patch +# PATCH-FIX-UPSTREAM add-threshold-to-disable-avatars.patch -- Add a config option/property to define a thershold above which avatars are disabled automatically +Patch10: add-threshold-to-disable-avatars.patch # PATCH-FIX-UPSTREAM 0001-Make-the-default-cursor-themed.patch -- Make the default cursor themed -Patch7: 0001-Make-the-default-cursor-themed.patch -# Bugfixes from upstream develop branch -Patch10: 0001-Fix-display-of-user-avatars.-684.patch -Patch11: 0002-Add-a-config-option-to-enable-high-DPI-scaling-701.patch -Patch12: 0003-elarun-Update-date-and-time.patch -Patch13: 0004-Support-Non-Latin-characters-in-theme-settings-708.patch -Patch14: 0005-Cleanup-dangling-pointer-in-SocketServer-725.patch +Patch11: 0001-Make-the-default-cursor-themed.patch +# PATCH-FIX-UPSTREAM 0001-Fall-back-to-regular-login-when-autologin-fails.patch -- Fall back to regular login when autologin fails +Patch12: 0001-Fall-back-to-regular-login-when-autologin-fails.patch BuildRequires: cmake -BuildRequires: extra-cmake-modules >= 1.4.0 BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: libqt5-linguist-devel @@ -64,7 +70,7 @@ BuildRequires: python-docutils # Autodetect UID_MIN and UID_MAX from /etc/login.defs BuildRequires: shadow -BuildRequires: pkgconfig(Qt5Core) >= 5.6.0 +BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Quick) @@ -121,11 +127,13 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 +cp %{SOURCE3} data/faces/default.face.icon.png +cp %{SOURCE4} data/faces/root.face.icon.png %build %cmake \ @@ -159,11 +167,6 @@ /usr/sbin/useradd -r -g sddm -s /bin/false -c "SDDM daemon" \ -d /var/lib/sddm sddm 2> /dev/null || : -%post -if [ $1 -eq 2 -a -f /etc/sddm.conf ]; then - sed -i -e 's/^Current=maui$/Current=/g' /etc/sddm.conf -fi - %post branding-openSUSE if [ $1 -ge 1 -a -f /etc/sddm.conf ]; then # Upgrade from previous theme name @@ -178,12 +181,13 @@ %files %defattr(-,root,root) -%doc LICENSE* README* +%doc COPYING* README* %config(noreplace) %{_sysconfdir}/%{name}.conf %config %{_sysconfdir}/pam.d/sddm %config %{_sysconfdir}/pam.d/sddm-autologin %config %{_sysconfdir}/pam.d/sddm-greeter %config(noreplace) %{_sysconfdir}/dbus-1/system.d/sddm_org.freedesktop.DisplayManager.conf +%{_sysconfdir}/pam.d/sddm* %{_libexecdir}/sddm/ %dir %{_libexecdir}/X11/displaymanagers/ %{_libexecdir}/X11/displaymanagers/%{name} @@ -203,10 +207,10 @@ %files branding-openSUSE %defattr(-,root,root) -%doc LICENSE* README* +%doc COPYING* README* %files branding-upstream %defattr(-,root,root) -%doc LICENSE* README* +%doc COPYING* README* %changelog ++++++ 0001-Add-a-config-option-to-enable-avatars.patch ++++++
From 17b3db31d9c75a197b3509f786bc646ab6dce17d Mon Sep 17 00:00:00 2001 From: Jerome Leclanche <jerome@leclan.ch> Date: Thu, 5 Nov 2015 17:18:46 +0200 Subject: [PATCH] Add a config option to enable avatars
Closes #281 --- data/man/sddm.conf.rst.in | 7 +++++++ src/common/Configuration.h | 1 + src/greeter/UserModel.cpp | 25 +++++++++++++++++-------- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/data/man/sddm.conf.rst.in b/data/man/sddm.conf.rst.in index a916e27..18aedf4 100644 --- a/data/man/sddm.conf.rst.in +++ b/data/man/sddm.conf.rst.in @@ -60,6 +60,13 @@ OPTIONS Name of the cursor theme to be set before starting the display server. +`EnableAvatars=` + When enabled, home directories are searched for ".face.icon" images to + display as their avatars. This can be slow on some file systems. + When disabled, all avatars will be default. Themes may choose to hide + them altogether. + Default value is true. + [XDisplay] section: `ServerPath=` diff --git a/src/common/Configuration.h b/src/common/Configuration.h index 069fc16..763b74f 100644 --- a/src/common/Configuration.h +++ b/src/common/Configuration.h @@ -49,6 +49,7 @@ namespace SDDM { Entry(FacesDir, QString, _S(DATA_INSTALL_DIR "/faces"), _S("Face icon directory\n" "The files should be in username.face.icon format")); Entry(CursorTheme, QString, QString(), _S("Cursor theme")); + Entry(EnableAvatars, bool, true, _S("Enable display of custom user avatars")); ); // TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal Section(XDisplay, diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp index 5041fab..5c807bc 100644 --- a/src/greeter/UserModel.cpp +++ b/src/greeter/UserModel.cpp @@ -81,14 +81,23 @@ namespace SDDM { user->needsPassword = strcmp(current_pw->pw_passwd, "") != 0; // search for face icon - QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir); - QString systemFace = QStringLiteral("%1/%2.face.icon").arg(mainConfig.Theme.FacesDir.get()).arg(user->name); - if (QFile::exists(userFace)) - user->icon = userFace; - else if (QFile::exists(systemFace)) - user->icon = systemFace; - else - user->icon = QStringLiteral("%1/default.face.icon").arg(mainConfig.Theme.FacesDir.get()); + QString facesDir = mainConfig.Theme.FacesDir.get(); + QString defaultFace = QStringLiteral("%1/default.face.icon").arg(facesDir); + bool avatarsEnabled = mainConfig.Theme.EnableAvatars.get(); + + if (avatarsEnabled) { + QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir); + QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name); + + if (QFile::exists(userFace)) + user->icon = userFace; + else if (QFile::exists(systemFace)) + user->icon = systemFace; + else + user->icon = defaultFace; + } else { + user->icon = defaultFace; + } // add user d->users << user; -- 2.6.2 ++++++ 0001-Fall-back-to-regular-login-when-autologin-fails.patch ++++++
From 5f43cbf23a9ec9e3547dfe0f59928d0ac5324db9 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche <jerome@leclan.ch> Date: Thu, 5 Nov 2015 21:28:22 +0200 Subject: [PATCH] Fall back to regular login when autologin fails
From 58b794bb2a2fd407a08b6c4d9eb4f156823b34f1 Mon Sep 17 00:00:00 2001 From: Jerome Leclanche <jerome@leclan.ch> Date: Thu, 5 Nov 2015 17:37:35 +0200 Subject: [PATCH 1/4] Use .face.icon instead of default.face.icon, and rename
Fixes #316 --- src/daemon/Display.cpp | 42 +++++++++++++++++++++++++----------------- src/daemon/Display.h | 1 + 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index 8de59e5..6bc9965 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -103,6 +103,29 @@ namespace SDDM { m_displayServer->start(); } + bool Display::attemptAutologin() { + Session::Type sessionType = Session::X11Session; + + // determine session type + const QString &autologinSession = mainConfig.Autologin.Session.get(); + if (findSessionEntry(mainConfig.XDisplay.SessionDir.get(), autologinSession)) { + sessionType = Session::X11Session; + } else if (findSessionEntry(mainConfig.WaylandDisplay.SessionDir.get(), autologinSession)) { + sessionType = Session::WaylandSession; + } else { + qCritical() << "Unable to find autologin session entry" << autologinSession; + return false; + } + + Session session; + session.setTo(sessionType, autologinSession); + + m_auth->setAutologin(true); + startAuth(mainConfig.Autologin.User.get(), QString(), session); + + return true; + } + void Display::displayServerStarted() { // check flag if (m_started) @@ -122,25 +145,10 @@ namespace SDDM { // set flags m_started = true; - // determine session type - const QString &autologinSession = mainConfig.Autologin.Session.get(); - Session session; - if (findSessionEntry(mainConfig.XDisplay.SessionDir.get(), autologinSession)) { - session.setTo(Session::X11Session, autologinSession); - } else if (findSessionEntry(mainConfig.WaylandDisplay.SessionDir.get(), autologinSession)) { - session.setTo(Session::WaylandSession, autologinSession); - } else { - qCritical() << "Unable to find autologin session entry" << autologinSession; - emit loginFailed(m_socket); + bool success = attemptAutologin(); + if (success) { return; } - - // start session - m_auth->setAutologin(true); - startAuth(mainConfig.Autologin.User.get(), QString(), session); - - // return - return; } // start socket server diff --git a/src/daemon/Display.h b/src/daemon/Display.h index dc46463..3d6d6a5 100644 --- a/src/daemon/Display.h +++ b/src/daemon/Display.h @@ -60,6 +60,7 @@ namespace SDDM { void login(QLocalSocket *socket, const QString &user, const QString &password, const Session &session); + bool attemptAutologin(); void displayServerStarted(); signals: -- 2.10.0 ++++++ 0001-Make-the-default-cursor-themed.patch ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -14,10 +14,10 @@ src/greeter/GreeterApp.cpp | 5 +++++ 1 file changed, 5 insertions(+) -Index: sddm-0.14.0/src/greeter/GreeterApp.cpp -=================================================================== ---- sddm-0.14.0.orig/src/greeter/GreeterApp.cpp -+++ sddm-0.14.0/src/greeter/GreeterApp.cpp +diff --git a/src/greeter/GreeterApp.cpp b/src/greeter/GreeterApp.cpp +index 06d13c5..dfe321f 100644 +--- a/src/greeter/GreeterApp.cpp ++++ b/src/greeter/GreeterApp.cpp @@ -32,6 +32,7 @@ #include "MessageHandler.h" @@ -26,9 +26,9 @@ #include <QQuickView> #include <QQmlContext> #include <QQmlEngine> -@@ -211,6 +212,10 @@ namespace SDDM { - qInfo("Loading %s...", qPrintable(mainScriptUrl.toString())); - view->setSource(mainScriptUrl); +@@ -198,6 +199,10 @@ namespace SDDM { + // set main script as source + view->setSource(QUrl::fromLocalFile(mainScript)); + // set default cursor + QCursor cursor(Qt::ArrowCursor); @@ -37,3 +37,6 @@ // show qDebug() << "Adding view for" << screen->name() << screen->geometry(); view->show(); +-- +2.10.0 + ++++++ 0002-Use-.face.icon-instead-of-default.face.icon-and-rena.patch ++++++ the sources to .png Touches #174 --- data/CMakeLists.txt | 13 ++++++++++++- data/faces/README | 3 ++- data/faces/default.face.icon | Bin 4920 -> 0 bytes data/faces/default.face.icon.png | Bin 0 -> 4920 bytes data/faces/root.face.icon | Bin 5111 -> 0 bytes data/faces/root.face.icon.png | Bin 0 -> 5111 bytes src/greeter/UserModel.cpp | 2 +- 7 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 data/faces/default.face.icon create mode 100644 data/faces/default.face.icon.png delete mode 100644 data/faces/root.face.icon create mode 100644 data/faces/root.face.icon.png diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 51f37ab..f3b5781 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,4 +1,3 @@ -install(DIRECTORY "faces" DESTINATION "${DATA_INSTALL_DIR}") install(DIRECTORY "flags" DESTINATION "${DATA_INSTALL_DIR}") install(FILES @@ -8,6 +7,18 @@ install(FILES ) install(FILES + "faces/root.face.icon.png" + DESTINATION "${DATA_INSTALL_DIR}/faces" + RENAME "root.face.icon" +) + +install(FILES + "faces/default.face.icon.png" + DESTINATION "${DATA_INSTALL_DIR}/faces" + RENAME ".face.icon" +) + +install(FILES "scripts/Xsession" "scripts/Xsetup" "scripts/Xstop" diff --git a/data/faces/README b/data/faces/README index be871e1..85479ad 100644 --- a/data/faces/README +++ b/data/faces/README @@ -1 +1,2 @@ -This files are directly copied from a KDE installation. \ No newline at end of file +These are the default avatars. +They are installed to `.face.icon` and `root.face.icon`. See ../CMakeLists.txt. diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp index 5c807bc..66ab6fb 100644 --- a/src/greeter/UserModel.cpp +++ b/src/greeter/UserModel.cpp @@ -82,7 +82,7 @@ namespace SDDM { // search for face icon QString facesDir = mainConfig.Theme.FacesDir.get(); - QString defaultFace = QStringLiteral("%1/default.face.icon").arg(facesDir); + QString defaultFace = QStringLiteral("%1/.face.icon").arg(facesDir); bool avatarsEnabled = mainConfig.Theme.EnableAvatars.get(); if (avatarsEnabled) { -- 2.6.2 ++++++ add-count-property-to-UserModel.patch ++++++ Index: sddm-0.13.0/src/greeter/UserModel.h =================================================================== --- sddm-0.13.0.orig/src/greeter/UserModel.h +++ sddm-0.13.0/src/greeter/UserModel.h @@ -32,6 +32,7 @@ namespace SDDM { Q_DISABLE_COPY(UserModel) Q_PROPERTY(int lastIndex READ lastIndex CONSTANT) Q_PROPERTY(QString lastUser READ lastUser CONSTANT) + Q_PROPERTY(int count READ rowCount CONSTANT) public: enum UserRoles { NameRole = Qt::UserRole + 1, ++++++ add-threshold-to-disable-avatars.patch ++++++ Index: sddm-0.13.0/src/greeter/UserModel.cpp =================================================================== --- sddm-0.13.0.orig/src/greeter/UserModel.cpp +++ sddm-0.13.0/src/greeter/UserModel.cpp @@ -51,6 +51,9 @@ namespace SDDM { }; UserModel::UserModel(QObject *parent) : QAbstractListModel(parent), d(new UserModelPrivate()) { + const QString facesDir = mainConfig.Theme.FacesDir.get(); + const QString defaultFace = QStringLiteral("%1/.face.icon").arg(facesDir); + struct passwd *current_pw; while ((current_pw = getpwent()) != nullptr) { @@ -81,23 +84,7 @@ namespace SDDM { user->needsPassword = strcmp(current_pw->pw_passwd, "") != 0; // search for face icon - QString facesDir = mainConfig.Theme.FacesDir.get(); - QString defaultFace = QStringLiteral("%1/.face.icon").arg(facesDir); - bool avatarsEnabled = mainConfig.Theme.EnableAvatars.get(); - - if (avatarsEnabled) { - QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir); - QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name); - - if (QFile::exists(userFace)) - user->icon = userFace; - else if (QFile::exists(systemFace)) - user->icon = systemFace; - else - user->icon = defaultFace; - } else { - user->icon = defaultFace; - } + user->icon = defaultFace; // add user d->users << user; @@ -108,10 +95,26 @@ namespace SDDM { // sort users by username std::sort(d->users.begin(), d->users.end(), [&](const UserPtr &u1, const UserPtr &u2) { return u1->name < u2->name; }); + bool avatarsEnabled = mainConfig.Theme.EnableAvatars.get(); + if (avatarsEnabled && mainConfig.Theme.EnableAvatars.isDefault()) { + if (d->users.count() > mainConfig.Theme.DisableAvatarsThreshold.get()) avatarsEnabled=false; + } + // find out index of the last user for (int i = 0; i < d->users.size(); ++i) { - if (d->users.at(i)->name == stateConfig.Last.User.get()) + UserPtr user { d->users.at(i) }; + if (user->name == stateConfig.Last.User.get()) d->lastIndex = i; + + if (avatarsEnabled) { + 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; + else if (QFile::exists(systemFace)) + user->icon = systemFace; + } } } @@ -165,4 +168,8 @@ namespace SDDM { // return empty value return QVariant(); } + + int UserModel::disableAvatarsThreshold() const { + return mainConfig.Theme.DisableAvatarsThreshold.get(); + } } Index: sddm-0.13.0/src/common/Configuration.h =================================================================== --- sddm-0.13.0.orig/src/common/Configuration.h +++ sddm-0.13.0/src/common/Configuration.h @@ -50,6 +50,9 @@ namespace SDDM { "The files should be in username.face.icon format")); Entry(CursorTheme, QString, QString(), _S("Cursor theme")); Entry(EnableAvatars, bool, true, _S("Enable display of custom user avatars")); + Entry(DisableAvatarsThreshold,int, 7, _S("Number of users to use as threshold\n" + "above which avatars are disabled\n" + "unless explicitly enabled with EnableAvatars")); ); // TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal Section(XDisplay, Index: sddm-0.13.0/src/greeter/UserModel.h =================================================================== --- sddm-0.13.0.orig/src/greeter/UserModel.h +++ sddm-0.13.0/src/greeter/UserModel.h @@ -33,6 +33,7 @@ namespace SDDM { Q_PROPERTY(int lastIndex READ lastIndex CONSTANT) Q_PROPERTY(QString lastUser READ lastUser CONSTANT) Q_PROPERTY(int count READ rowCount CONSTANT) + Q_PROPERTY(int disableAvatarsThreshold READ disableAvatarsThreshold CONSTANT) public: enum UserRoles { NameRole = Qt::UserRole + 1, @@ -53,6 +54,7 @@ namespace SDDM { int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + int disableAvatarsThreshold() const; private: UserModelPrivate *d { nullptr }; }; ++++++ boo949903.patch ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -1,16 +1,11 @@ -Index: sddm-0.14.0/src/common/Configuration.h -=================================================================== ---- sddm-0.14.0.orig/src/common/Configuration.h -+++ sddm-0.14.0/src/common/Configuration.h -@@ -97,8 +97,9 @@ namespace SDDM { +--- sddm-0.12.0.orig/src/common/Configuration.h 2015-10-11 14:03:22.510105030 +0200 ++++ sddm-0.12.0/src/common/Configuration.h 2015-10-11 14:06:02.148109280 +0200 +@@ -90,7 +90,7 @@ namespace SDDM { Config(StateConfig, []()->QString{auto tmp = getpwnam("sddm"); return tmp ? QString::fromLocal8Bit(tmp->pw_dir) : QStringLiteral(STATE_DIR);}().append(QStringLiteral("/state.conf")), Section(Last, -- Entry(Session, QString, QString(), _S("Name of the session for the last logged-in user.\n" -- "This session will be preselected when the login screen appears.")); -+ Entry(Session, QString, _S("/usr/share/xsessions/plasma5.desktop"), _S("Name of the session for the last logged-in user.\n" -+ "This session will be preselected when the login screen appears.\n" -+ "This is Plasma 5 by default")); - Entry(User, QString, QString(), _S("Name of the last logged-in user.\n" - "This user will be preselected when the login screen appears")); +- Entry(Session, QString, QString(), _S("Name of the session file of the last session selected. This session will be preselected when the login screen shows up.")); ++ Entry(Session, QString, _S("/usr/share/xsessions/plasma5.desktop"), _S("Name of the session file of the last session selected. This session will be preselected when the login screen shows up.")); + Entry(User, QString, QString(), _S("Name of the last logged-in user. This username will be preselected/shown when the login screen shows up")); ); + ); ++++++ sddm-0.14.0.tar.xz -> sddm-0.13.0.tar.xz ++++++ ++++ 6197 lines of diff (skipped) ++++++ sddm-relaxed-auth.diff ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -1,7 +1,7 @@ -Index: sddm-0.14.0/src/daemon/XorgDisplayServer.cpp -=================================================================== ---- sddm-0.14.0.orig/src/daemon/XorgDisplayServer.cpp -+++ sddm-0.14.0/src/daemon/XorgDisplayServer.cpp +diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp +index b40f718..e060928 100644 +--- a/src/daemon/XorgDisplayServer.cpp ++++ b/src/daemon/XorgDisplayServer.cpp @@ -281,6 +281,7 @@ namespace SDDM { // set process environment QProcessEnvironment env; @@ -10,11 +10,11 @@ env.insert(QStringLiteral("HOME"), QStringLiteral("/")); env.insert(QStringLiteral("PATH"), mainConfig.Users.DefaultPath.get()); env.insert(QStringLiteral("XAUTHORITY"), m_authPath); -Index: sddm-0.14.0/src/helper/Backend.cpp -=================================================================== ---- sddm-0.14.0.orig/src/helper/Backend.cpp -+++ sddm-0.14.0/src/helper/Backend.cpp -@@ -27,6 +27,7 @@ +diff --git a/src/helper/Backend.cpp b/src/helper/Backend.cpp +index 12facb9..a90cfb3 100644 +--- a/src/helper/Backend.cpp ++++ b/src/helper/Backend.cpp +@@ -26,6 +26,7 @@ #include "UserSession.h" #include <QtCore/QProcessEnvironment> @@ -22,11 +22,11 @@ #include <pwd.h> -@@ -69,6 +70,7 @@ namespace SDDM { - .arg(QString::fromLocal8Bit(pw->pw_dir)) - .arg(mainConfig.XDisplay.UserAuthFile.get()); - env.insert(QStringLiteral("XAUTHORITY"), value); -+ env.insert(QStringLiteral("XAUTHLOCALHOSTNAME"), QHostInfo::localHostName()); - } +@@ -64,6 +65,7 @@ namespace SDDM { + env.insert(QStringLiteral("LOGNAME"), QString::fromLocal8Bit(pw->pw_name)); + if (env.contains(QStringLiteral("DISPLAY")) && !env.contains(QStringLiteral("XAUTHORITY"))) + env.insert(QStringLiteral("XAUTHORITY"), QStringLiteral("%1/.Xauthority").arg(QString::fromLocal8Bit(pw->pw_dir))); ++ env.insert(QStringLiteral("XAUTHLOCALHOSTNAME"), QHostInfo::localHostName()); // TODO: I'm fairly sure this shouldn't be done for PAM sessions, investigate! m_app->session()->setProcessEnvironment(env); + } ++++++ sddm-service-handle-plymouth.patch ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -1,12 +1,12 @@ -Index: sddm-0.14.0/services/sddm.service.in -=================================================================== ---- sddm-0.14.0.orig/services/sddm.service.in -+++ sddm-0.14.0/services/sddm.service.in -@@ -6,6 +6,7 @@ After=systemd-user-sessions.service gett +diff --git a/services/sddm.service.in b/services/sddm.service.in +index b0cea02128f949ceeadae2ecca61faf668ea8728..fffa5c2dfc37acafe1cab2528e3323fca665e699 100644 +--- a/services/sddm.service.in ++++ b/services/sddm.service.in +@@ -6,6 +6,7 @@ After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service [Service] ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/sddm +ExecStartPre=-@CMAKE_INSTALL_FULL_BINDIR@/plymouth quit --retain-splash Restart=always + #PrivateTmp=yes - [Install] ++++++ sddm.conf ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -1,5 +1,5 @@ [Theme] -Current= +Current=maui CursorTheme=breeze_cursors [XDisplay] ++++++ specify-default-config-entries.patch ++++++ Index: sddm-0.13.0/src/common/ConfigReader.cpp =================================================================== --- sddm-0.13.0.orig/src/common/ConfigReader.cpp +++ sddm-0.13.0/src/common/ConfigReader.cpp @@ -186,17 +186,17 @@ namespace SDDM { * Initialization of the map of nondefault values to be saved */ if (section) { - if (entry && !entry->isDefault()) + if (entry && !entry->matchesDefault()) remainingEntries.insert(section, entry); else for (const ConfigEntryBase *b : section->entries().values()) - if (!b->isDefault()) + if (!b->matchesDefault()) remainingEntries.insert(section, b); } else { for (const ConfigSection *s : m_sections) for (const ConfigEntryBase *b : s->entries().values()) - if (!b->isDefault()) + if (!b->matchesDefault()) remainingEntries.insert(s, b); } Index: sddm-0.13.0/src/common/ConfigReader.h =================================================================== --- sddm-0.13.0.orig/src/common/ConfigReader.h +++ sddm-0.13.0/src/common/ConfigReader.h @@ -77,6 +77,7 @@ namespace SDDM { virtual void setValue(const QString &str) = 0; virtual QString toConfigShort() const = 0; virtual QString toConfigFull() const = 0; + virtual bool matchesDefault() const = 0; virtual bool isDefault() const = 0; }; @@ -107,6 +108,7 @@ namespace SDDM { m_description(description), m_default(value), m_value(value), + m_isDefault(true), m_parent(parent) { m_parent->m_entries[name] = this; } @@ -117,13 +119,19 @@ namespace SDDM { void set(const T val) { m_value = val; + m_isDefault = false; } - bool isDefault() const { + bool matchesDefault() const { return m_value == m_default; } + bool isDefault() const { + return m_isDefault; + } + bool setDefault() { + m_isDefault = true; if (m_value == m_default) return false; m_value = m_default; @@ -147,6 +155,7 @@ namespace SDDM { // specialised for QString void setValue(const QString &str) { + m_isDefault = false; QTextStream in(qPrintable(str)); in >> m_value; } @@ -167,6 +176,7 @@ namespace SDDM { const QString m_description; T m_default; T m_value; + bool m_isDefault; ConfigSection *m_parent; }; ++++++ sysconfig-support.patch ++++++ --- /var/tmp/diff_new_pack.ImKTDk/_old 2016-11-25 12:29:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ImKTDk/_new 2016-11-25 12:29:00.000000000 +0100 @@ -1,8 +1,8 @@ -Index: sddm-0.14.0/CMakeLists.txt -=================================================================== ---- sddm-0.14.0.orig/CMakeLists.txt -+++ sddm-0.14.0/CMakeLists.txt -@@ -160,6 +160,7 @@ set(SESSION_COMMAND "${DATA_ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 43796954d519fda27133dbaed6db50141b8ecf04..3071ea79ebaf9e5c20851f2c2512339f0f06f25c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -156,6 +156,7 @@ set(SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/Xsession" set(WAYLAND_SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/wayland-session" CACHE PATH "Script to execute when starting the Wayland desktop session") set(CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sddm.conf" CACHE PATH "Path of the sddm config file") @@ -10,23 +10,23 @@ set(LOG_FILE "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/sddm.log" CACHE PATH "Path of the sddm log file") set(DBUS_CONFIG_FILENAME "org.freedesktop.DisplayManager.conf" CACHE STRING "Name of the sddm config file") set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations" CACHE PATH "Components translations directory") -Index: sddm-0.14.0/src/common/Configuration.h -=================================================================== ---- sddm-0.14.0.orig/src/common/Configuration.h -+++ sddm-0.14.0/src/common/Configuration.h -@@ -90,7 +90,7 @@ namespace SDDM { - +diff --git a/src/common/Configuration.h b/src/common/Configuration.h +index c9af1b72cd0faee069264719ff26cc7d7cba204c..076e856e5ca592bf1b3dcd48a6511fc2395159a8 100644 +--- a/src/common/Configuration.h ++++ b/src/common/Configuration.h +@@ -83,7 +83,7 @@ namespace SDDM { + ); Section(Autologin, - Entry(User, QString, QString(), _S("Username for autologin session")); -- Entry(Session, QString, QString(), _S("Name of session file for autologin session")); -+ Entry(Session, QString, _S("plasma5.desktop"), _S("Name of session file for autologin session")); - Entry(Relogin, bool, false, _S("Whether sddm should automatically log back into sessions when they exit")); + Entry(User, QString, QString(), _S("Autologin user")); +- Entry(Session, QString, QString(), _S("Autologin session")); ++ Entry(Session, QString, _S("plasma5.desktop"), _S("Autologin session")); + Entry(Relogin, bool, false, _S("Autologin again on session exit")); ); ); -Index: sddm-0.14.0/src/common/Constants.h.in -=================================================================== ---- sddm-0.14.0.orig/src/common/Constants.h.in -+++ sddm-0.14.0/src/common/Constants.h.in +diff --git a/src/common/Constants.h.in b/src/common/Constants.h.in +index 2be895e730da5affb2cd4f6052918a8ab4b2672a..bb935503c08e8ad617f83f9df73d5c7703737686 100644 +--- a/src/common/Constants.h.in ++++ b/src/common/Constants.h.in @@ -33,6 +33,7 @@ #define WAYLAND_SESSION_COMMAND "@WAYLAND_SESSION_COMMAND@" @@ -35,10 +35,10 @@ #define LOG_FILE "@LOG_FILE@" #define PID_FILE "@PID_FILE@" #define MINIMUM_VT @MINIMUM_VT@ -Index: sddm-0.14.0/src/daemon/Display.cpp -=================================================================== ---- sddm-0.14.0.orig/src/daemon/Display.cpp -+++ sddm-0.14.0/src/daemon/Display.cpp +diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp +index 2b76c6dbe64b3d35a0e6b1849cf10c250ead5f53..0d62358dc515826d18d9eb825a83149cf268ee9d 100644 +--- a/src/daemon/Display.cpp ++++ b/src/daemon/Display.cpp @@ -35,6 +35,7 @@ #include <QDebug> #include <QFile> @@ -47,7 +47,7 @@ #include <pwd.h> #include <unistd.h> -@@ -139,8 +140,19 @@ namespace SDDM { +@@ -114,8 +115,19 @@ namespace SDDM { // log message qDebug() << "Display server started.";
participants (1)
-
root@hilbert.suse.de