Plasma 5.21 Beta - this time tested! kwin doesn't use libqaccessibilityclient yet and qqc2-breeze-style is not packaged, but only needed for Plasma Mobile.

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcm_sddm?expand=0&rev=264
This commit is contained in:
Fabian Vogt 2021-01-24 21:11:02 +00:00 committed by Git OBS Bridge
parent 04bfe90d69
commit 04f2fc03a4
10 changed files with 177 additions and 150 deletions

View File

@ -1,21 +1,35 @@
From 63f7e6b7b0ce899f9dcc8e4b7fc8aba071175ffb Mon Sep 17 00:00:00 2001
From a869e0e4066b13d8d27e4fceeb022e899de6b822 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 11 Jul 2017 13:13:13 +0200
Subject: [PATCH 1/3] Support default.session symlink
Display it under a different name, otherwise it is indistinguishable from
a normal session.
a normal session. Use it as default when the combobox is disabled.
---
src/sessionmodel.cpp | 6 ++++++
1 file changed, 6 insertions(+)
src/package/contents/ui/Advanced.qml | 2 +-
src/sessionmodel.cpp | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/package/contents/ui/Advanced.qml b/src/package/contents/ui/Advanced.qml
index f4da579..847b023 100644
--- a/src/package/contents/ui/Advanced.qml
+++ b/src/package/contents/ui/Advanced.qml
@@ -71,7 +71,7 @@ Kirigami.Page {
textRole: "name"
valueRole: "file"
onActivated: kcm.sddmSettings.session = currentValue
- onEnabledChanged: enabled ? kcm.sddmSettings.session = currentValue : kcm.sddmSettings.session = ""
+ onEnabledChanged: enabled ? kcm.sddmSettings.session = currentValue : kcm.sddmSettings.session = "default.desktop"
KCM.SettingStateBinding {
visible: autologinBox.checked
configObject: kcm.sddmSettings
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
index 0bbe217..429d664 100644
index 16999dd..50e22d4 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -96,6 +96,12 @@ void SessionModel::loadDir(const QString &path, SessionType type)
if (line.startsWith(QLatin1String("Hidden=")))
@@ -109,6 +109,12 @@ void SessionModel::loadDir(const QString &path, SessionType type)
isHidden = line.mid(7).toLower() == QLatin1String("true");
}
}
+
+ if (session == QLatin1String( "default.desktop" )) {
@ -27,5 +41,5 @@ index 0bbe217..429d664 100644
// add to sessions list
d->sessions.push_back(si);
--
2.21.0
2.25.1

View File

@ -0,0 +1,91 @@
From 338984a86f06022241ee2d34cfad2bcac672dde1 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 19 Jan 2021 20:45:33 +0100
Subject: [PATCH 2/3] Read and write autologin user to
/etc/sysconfig/displaymanager
That's where SDDM reads from.
---
sddmauthhelper.cpp | 30 ++++++++++++++++++++++++++++++
src/sddmsettingsbase.cpp | 6 ++++--
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/sddmauthhelper.cpp b/sddmauthhelper.cpp
index 8a67635..fcb72fd 100644
--- a/sddmauthhelper.cpp
+++ b/sddmauthhelper.cpp
@@ -28,6 +28,8 @@
#include <QMimeDatabase>
#include <QMimeType>
#include <QSharedPointer>
+#include <QSaveFile>
+#include <QRegularExpression>
#include <KArchive>
#include <KConfig>
@@ -252,6 +254,34 @@ ActionReply SddmAuthHelper::save(const QVariantMap &args)
QString groupName = configFields[1];
QString keyName = configFields[2];
+ if (groupName == QLatin1String("Autologin") && keyName == QLatin1String("User")) {
+ QString sysconfFileName = QStringLiteral("/etc/sysconfig/displaymanager");
+ QFile sysconf(sysconfFileName);
+ QSaveFile newconf(sysconfFileName);
+ if (!sysconf.open(QIODevice::ReadOnly) || !newconf.open(QIODevice::WriteOnly)) {
+ return ActionReply::HelperErrorReply();
+ }
+
+ QString sysconfData = QString::fromUtf8(sysconf.readAll());
+ if (sysconfData.isEmpty()) {
+ return ActionReply::HelperErrorReply();
+ }
+
+ QRegularExpression re(QStringLiteral("^DISPLAYMANAGER_AUTOLOGIN=.*$"), QRegularExpression::MultilineOption);
+ auto match = re.match(sysconfData);
+ if (!match.hasMatch()) {
+ return ActionReply::HelperErrorReply();
+ }
+
+ sysconfData.replace(match.capturedStart(), match.capturedLength(),
+ QStringLiteral("DISPLAYMANAGER_AUTOLOGIN=\"%0\"").arg(iterator.value().toString()));
+
+ QByteArray newData = sysconfData.toUtf8();
+ if (newconf.write(newData) != newData.length() || !newconf.commit()) {
+ return ActionReply::HelperErrorReply();
+ }
+ }
+
// if there is an identical keyName in "sddm.conf" we want to delete it so SDDM doesn't read from the old file
// hierarchically SDDM prefers "etc/sddm.conf" to "/etc/sddm.conf.d/some_file.conf"
diff --git a/src/sddmsettingsbase.cpp b/src/sddmsettingsbase.cpp
index e8aa915..1e3e52d 100644
--- a/src/sddmsettingsbase.cpp
+++ b/src/sddmsettingsbase.cpp
@@ -21,6 +21,7 @@
#include <QDebug>
#include <QDir>
+#include <QSettings>
#include <algorithm>
@@ -57,12 +58,13 @@ unsigned int SddmSettingsBase::defaultMaximumUid() const
QString SddmSettingsBase::defaultUser() const
{
- return m_defaultConfig->group("AutoLogin").readEntry("User");
+ QSettings sysconfSettings(QStringLiteral("/etc/sysconfig/displaymanager"), QSettings::IniFormat);
+ return sysconfSettings.value(QStringLiteral("DISPLAYMANAGER_AUTOLOGIN")).toString();
}
QString SddmSettingsBase::defaultSession() const
{
- return m_defaultConfig->group("AutoLogin").readEntry("Session");
+ return m_defaultConfig->group("AutoLogin").readEntry("Session", "default.desktop");
}
bool SddmSettingsBase::defaultRelogin() const
--
2.25.1

View File

@ -1,104 +0,0 @@
From 0e638de390c1629feba3ebd165e4c2a9d872b4f9 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Wed, 27 Dec 2017 18:54:36 +0100
Subject: [PATCH 2/3] Replace autologin configuration with a note to use YaST
instead
sddm looks at sysconfig for autologin and ignores other configuration files.
Also change the default value for the autologin session to "default.desktop",
which is what sddm uses as well.
---
src/advancedconfig.cpp | 4 ++--
src/ui/advancedconfig.ui | 21 +++++++++++++++++----
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/advancedconfig.cpp b/src/advancedconfig.cpp
index ac1acfd..e5ff047 100644
--- a/src/advancedconfig.cpp
+++ b/src/advancedconfig.cpp
@@ -84,7 +84,7 @@ void AdvancedConfig::load()
const QString currentUser = mConfig->group("Autologin").readEntry("User", "");
configUi->userList->setCurrentIndex(userModel->indexOf(currentUser));
- const QString autologinSession = mConfig->group("Autologin").readEntry("Session", "");
+ const QString autologinSession = mConfig->group("Autologin").readEntry("Session", "default.desktop");
configUi->sessionList->setCurrentIndex(sessionModel->indexOf(autologinSession));
configUi->autoLogin->setChecked(!currentUser.isEmpty());
@@ -106,7 +106,7 @@ void AdvancedConfig::load()
void AdvancedConfig::save(QVariantMap &args)
{
args[QStringLiteral("kde_settings.conf/Autologin/User")] = ( configUi->autoLogin->isChecked() ) ? configUi->userList->currentText() : QString();
- args[QStringLiteral("kde_settings.conf/Autologin/Session")] = ( configUi->autoLogin->isChecked() ) ? configUi->sessionList->currentData() : QString();
+ args[QStringLiteral("kde_settings.conf/Autologin/Session")] = configUi->sessionList->currentData();
args[QStringLiteral("kde_settings.conf/Autologin/Relogin")] = configUi->reloginAfterQuit->isChecked();
//TODO session
diff --git a/src/ui/advancedconfig.ui b/src/ui/advancedconfig.ui
index b4824e5..6941024 100644
--- a/src/ui/advancedconfig.ui
+++ b/src/ui/advancedconfig.ui
@@ -19,7 +19,14 @@
<property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
- <item row="1" column="0">
+ <item row="0" column="1">
+ <widget class="QLabel" name="yastlabel">
+ <property name="text">
+ <string>The user for autologin needs to be configured using YaST or by&#10;setting DISPLAYMANAGER_AUTOLOGIN in /etc/sysconfig/displaymanager.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Automatically log in:</string>
@@ -33,6 +40,9 @@
<property name="text">
<string>as user:</string>
</property>
+ <property name="visible">
+ <bool>false</bool>
+ </property>
</widget>
</item>
<item>
@@ -40,12 +50,15 @@
<property name="enabled">
<bool>false</bool>
</property>
+ <property name="visible">
+ <bool>false</bool>
+ </property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="text">
<string>with session:</string>
@@ -55,7 +68,7 @@
<item>
<widget class="QComboBox" name="sessionList">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
</widget>
</item>
@@ -64,7 +77,7 @@
<item row="2" column="1">
<widget class="QCheckBox" name="reloginAfterQuit">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
--
2.25.1

View File

@ -1,18 +1,18 @@
From 59515b3c6046e1c432836262fd8dc16acf6bcb11 Mon Sep 17 00:00:00 2001
From bb0c90b0a7c9f0a1a76b3f71fa802ae2050a87b2 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sat, 7 Jul 2018 20:34:44 +0200
Subject: [PATCH 3/3] Don't add a (Wayland) suffix to Wayland sessions
It got removed from sddm as well.
---
src/sessionmodel.cpp | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
src/sessionmodel.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
index e1d337f..8af214a 100644
index 50e22d4..e756a9b 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -55,6 +55,7 @@ SessionModel::~SessionModel() {
@@ -61,6 +61,7 @@ SessionModel::~SessionModel()
void SessionModel::loadDir(const QString &path, SessionType type)
{
@ -20,12 +20,9 @@ index e1d337f..8af214a 100644
QDir dir(path);
dir.setNameFilters(QStringList() << QStringLiteral("*.desktop"));
dir.setFilter(QDir::Files);
@@ -80,16 +81,8 @@ void SessionModel::loadDir(const QString &path, SessionType type)
if (current_section != QLatin1String("Desktop Entry"))
continue; // We are only interested in the "Desktop Entry" section
@@ -91,13 +92,6 @@ void SessionModel::loadDir(const QString &path, SessionType type)
- if (line.startsWith(QLatin1String("Name="))) {
+ if (line.startsWith(QLatin1String("Name=")))
if (line.startsWith(QLatin1String("Name="))) {
si->name = line.mid(5);
- if (type == SessionTypeWayland) {
- // we want to exactly match the SDDM prompt which is formatted in this way
@ -34,10 +31,9 @@ index e1d337f..8af214a 100644
- si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name);
- }
- }
- }
if (line.startsWith(QLatin1String("Exec=")))
}
if (line.startsWith(QLatin1String("Exec="))) {
si->exec = line.mid(5);
if (line.startsWith(QLatin1String("Comment=")))
--
2.23.0
2.25.1

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Thu Jan 21 21:31:33 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 5.20.90
* New feature release
* For more details please see:
* https://kde.org/announcements/plasma/5/20.90/
- Changes since 5.20.5:
* Update .gitignore file
* Add pre-commit hook for clang-format
* Add .git-blame-ignore-revs file
* clang-tidy: Force braces around statements
* Run clang-format
* Fix i18n (found by Alexander Yavorsky)
* Simplify Messages.sh
* Restore old SDDM KCM name
* Port to ManagedConfigModule (kde#403530,kde#407689,kde#411004,kde#411504,kde#419327,kde#424639)
* Load all themes
* Do not explicitely define Exec line for KCM
- New patchset for the QML code changes:
* Refresh 0001-Support-default.session-symlink.patch
* Drop 0002-Replace-autologin-configuration-with-a-note-to-use-Y.patch
* Add 0002-Read-and-write-autologin-user-to-etc-sysconfig-displ.patch
* Refresh 0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch
-------------------------------------------------------------------
Tue Jan 5 14:40:01 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -18,20 +18,20 @@
%bcond_without lang
Name: kcm_sddm
Version: 5.20.5
Version: 5.20.90
Release: 0
Summary: A sddm control module for KDE
License: GPL-2.0-only
Group: System/GUI/KDE
URL: https://projects.kde.org/projects/kdereview/sddm-kcm/repository
Source: https://download.kde.org/stable/plasma/%{version}/sddm-kcm-%{version}.tar.xz
Source: https://download.kde.org/unstable/plasma/%{version}/sddm-kcm-%{version}.tar.xz
%if %{with lang}
Source1: https://download.kde.org/stable/plasma/%{version}/sddm-kcm-%{version}.tar.xz.sig
Source1: https://download.kde.org/unstable/plasma/%{version}/sddm-kcm-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
# PATCH-FIX-OPENSUSE
Patch1: 0001-Support-default.session-symlink.patch
Patch2: 0002-Replace-autologin-configuration-with-a-note-to-use-Y.patch
Patch2: 0002-Read-and-write-autologin-user-to-etc-sysconfig-displ.patch
Patch3: 0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch
BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem
@ -40,7 +40,9 @@ BuildRequires: cmake(KF5Archive)
BuildRequires: cmake(KF5Auth)
BuildRequires: cmake(KF5ConfigWidgets)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5Declarative)
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5KCMUtils)
BuildRequires: cmake(KF5KIO)
BuildRequires: cmake(KF5NewStuff)
BuildRequires: cmake(KF5XmlGui)
@ -79,14 +81,17 @@ sddm.
%files
%doc README.md
%license COPYING
%{_kf5_knsrcfilesdir}/sddmtheme.knsrc
%{_bindir}/sddmthemeinstaller
%{_kf5_servicesdir}/
%{_kf5_servicesdir}/kcm_sddm.desktop
%{_kf5_sharedir}/polkit-1/actions/org.kde.kcontrol.kcmsddm.policy
%{_kf5_dbuspolicydir}/org.kde.kcontrol.kcmsddm.conf
%{_kf5_sharedir}/dbus-1/system-services/org.kde.kcontrol.kcmsddm.service
%{_kf5_libdir}/libexec/
%{_kf5_plugindir}/
%{_kf5_sharedir}/sddm-kcm/
%{_kf5_libdir}/libexec/kauth/kcmsddm_authhelper
%{_bindir}/sddmthemeinstaller
%{_kf5_knsrcfilesdir}/sddmtheme.knsrc
%dir %{_kf5_sharedir}/kpackage/
%dir %{_kf5_sharedir}/kpackage/kcms/
%{_kf5_sharedir}/kpackage/kcms/kcm_sddm/
%dir %{_kf5_plugindir}/kcms/
%{_kf5_plugindir}/kcms/kcm_sddm.so
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5f850e3e3e7dc85f5b13444c6669caf47690bf8e85d4248a4304f56ca7f189ff
size 64796

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAl/0X+cACgkQ7JTRj38F
mX47Dgf8Cd9gx+6Y2ojGkOz5V3oRGJkDnadYmaB2pxxgVJBt8tQ4EQXkOqydg4Tc
sgnUBph+yqgyHZe0dS0AYHhU1UX3p3gQX5v05RSYLCfgr9sctwHM/58h046J2zKc
AlIKrmG5hrbiPVJclj9l9yvYtPu64UqSLfEguKgEx2e3FUzuQh4HtP271O4Vlg0K
fyprWGdYKhFvzKapLGuRjRMY7yJe3dzebTu+RaruZS+YZODuAtJAze+GC0s9NmuF
CIi/3MP6w4DsbTkibedyS0E2VPuh9Q64zOF0NNstSjRct+5YBd0RbtoGn5ksPmIo
FqzHOBzCOACtoNRCyLVAhMEzmiBDeA==
=iH3i
-----END PGP SIGNATURE-----

3
sddm-kcm-5.20.90.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9478de46840e4d588859c29e02172729a03f682ee7523d75ed522ced5349511
size 62416

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmAJfNoACgkQ7JTRj38F
mX4atwf+KQRkMQ/OaH0x37Sw+xRsdxg5jb5bOqVL5S7qYC4LZJpDye4H2BliLZWO
v7VSsa1fVI4B8sTUpG9mBsBYocxY2xmIwhfOzfF/4Gi0GySejKvwUDgyhoiTsZXJ
4sQG7aG2QfCnAJ8olP0DxFejjMRG9Hg5lwEaKvSYwPjZPSPdQQ4PXYSNfcPsozQ9
pqOHcnW5si4x3hxmL5+ZQaYbiQIQvhIEuKmyEgG2gMTm1NKRw9njMpO8HDSDecAn
Gn2BwylE9CMdKEKcGXCfH2iAaxxW5lYM2nr0gVJEUgmj4k0rY6yaPw0gJnT7QyoK
wTuTMbIVX5TU7mL/hQ8pAAlbLImePw==
=NFr0
-----END PGP SIGNATURE-----