Plasma 6 RC 2. Still untested...

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks/sddm-kcm6?expand=0&rev=1
This commit is contained in:
Luca Beltrame 2024-02-07 18:01:46 +00:00 committed by Git OBS Bridge
commit 9170c5e76e
10 changed files with 326 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,45 @@
From 015348caa1e8dd7f9c3b1490c6457017ec1b134e 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] Support default.session symlink
Display it under a different name, otherwise it is indistinguishable from
a normal session. Use it as default when the combobox is disabled.
---
src/sessionmodel.cpp | 6 ++++++
src/ui/Advanced.qml | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
index ebcdb7e..9b00fa6 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -95,6 +95,12 @@ void SessionModel::loadDir(const QString &path, SessionType type)
isHidden = line.mid(7).toLower() == QLatin1String("true");
}
}
+
+ if (session == QLatin1String( "default.desktop" )) {
+ si->name = tr("(System Default)");
+ isHidden = false;
+ }
+
if (!isHidden) {
// add to sessions list
d->sessions.push_back(si);
diff --git a/src/ui/Advanced.qml b/src/ui/Advanced.qml
index 12bf59f..67ea310 100644
--- a/src/ui/Advanced.qml
+++ b/src/ui/Advanced.qml
@@ -79,7 +79,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
--
2.41.0

View File

@ -0,0 +1,91 @@
From faaff11bc4aaddc471bc3ee2d0a79d72f4a0cda7 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] 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 dea06ef..8f453a8 100644
--- a/sddmauthhelper.cpp
+++ b/sddmauthhelper.cpp
@@ -17,6 +17,8 @@
#include <QMimeDatabase>
#include <QMimeType>
#include <QSharedPointer>
+#include <QSaveFile>
+#include <QRegularExpression>
#include <KArchive>
#include <KConfig>
@@ -281,6 +283,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 a928823..74ab3c9 100644
--- a/src/sddmsettingsbase.cpp
+++ b/src/sddmsettingsbase.cpp
@@ -9,6 +9,7 @@
#include <QDebug>
#include <QDir>
+#include <QSettings>
#include <algorithm>
@@ -45,12 +46,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.41.0

View File

@ -0,0 +1,39 @@
From 5ac4a6e63e3dfb143f24f4ae9ca50b3295f4c0fa 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] Don't add a (Wayland) suffix to Wayland sessions
It got removed from sddm as well.
---
src/sessionmodel.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/sessionmodel.cpp b/src/sessionmodel.cpp
index 9b00fa6..a4dfee1 100644
--- a/src/sessionmodel.cpp
+++ b/src/sessionmodel.cpp
@@ -47,6 +47,7 @@ SessionModel::~SessionModel()
void SessionModel::loadDir(const QString &path, SessionType type)
{
+ Q_UNUSED(type);
QDir dir(path);
dir.setNameFilters(QStringList() << QStringLiteral("*.desktop"));
dir.setFilter(QDir::Files);
@@ -77,13 +78,6 @@ void SessionModel::loadDir(const QString &path, SessionType type)
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
- // with the exact same check
- if (!si->name.endsWith(QLatin1String(" (Wayland)"))) {
- si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name);
- }
- }
}
if (line.startsWith(QLatin1String("Exec="))) {
si->exec = line.mid(5);
--
2.41.0

BIN
plasma.keyring Normal file

Binary file not shown.

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

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

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4KPrIC+OV1KOE+cv11dEg7tXsY0FAmW6RzwACgkQ11dEg7tX
sY2cFRAAh6TYCTQlNMy9vufBO1XFo53ZyDHO2dPMTrYeGiIqOY969NmPceY1XcZV
nBd7sIA/RzBoTRjWeqowbDx94DvhFMCaIuSlbMBMX/g8ldmQLZv286dUN2r72xBO
16gOK9FZed1CssYNDHwSoXZ/yAZ1ZEgUnvW0gJgu7QUNah/7RrVFKlSQfnFfl5JT
Ko8dOoM51Wvt7+xwpZIvy87uRoOU5v1QL2LeqN0lyIjD5UPNWSsgUIdGYdoxfpR6
H++j9eQRMXn4rpJodn5i268Uz6N08+jabVODdKb3xC8o8tUZlYNfbbmTZgCIjzHD
OIBIMZAIZmvHHnjH2ADIA0T3bOyAq12lr9h7RqQ+3064bHfiTkgahaDA4zfUf7bO
ER3w7UH9s6AIPwREJWOkaJzBTTHrMXLfpapcfKcsbWuqifUznJQ7/HFi4w/qwvPG
8n/TFQDMlzIgiTp6o3PlzV4XkuRaWEosC3TA+5S2Yfs/lE7M08uKpbYG47msPpW8
TeU7UjsmuGWlU3aBP4De7x/vJPoNvjVxGiodZwj/m0FLrlU8UWbwdDU5ZOIw9D0Y
erA8d0La5ruO+4h2Fh9RZ/yuDDUgEaVptiOYpMsy3NCPwwpooprufdzWdWjBmLsN
cszxpLQe43ko7uPY1aorhRlgSt2+dTa7CSkbjSfRK36zPR7Mgg0=
=rZN3
-----END PGP SIGNATURE-----

19
sddm-kcm6.changes Normal file
View File

@ -0,0 +1,19 @@
-------------------------------------------------------------------
Wed Jan 31 17:38:30 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 5.93.0 (6.0 RC 2):
* New bugfix release
* See https://kde.org/announcements/megarelease/6/rc2/ for details
- No code changes since 5.92.0
-------------------------------------------------------------------
Mon Jan 15 21:09:17 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 5.92.0 (6.0 RC 1)
* For more details please see:
https://kde.org/announcements/megarelease/6/rc1/
-------------------------------------------------------------------
Fri Aug 25 08:27:48 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Init sddm-kcm6

89
sddm-kcm6.spec Normal file
View File

@ -0,0 +1,89 @@
#
# spec file for package sddm-kcm6
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define kf6_version 5.240.0
%define qt6_version 6.5.0
%define rname sddm-kcm
%bcond_without released
Name: sddm-kcm6
Version: 5.93.0
Release: 0
Summary: A sddm control module for KDE
License: GPL-2.0-only
URL: https://projects.kde.org/projects/kdereview/sddm-kcm/repository
Source: https://download.kde.org/unstable/plasma/%{version}/%{rname}-%{version}.tar.xz
%if %{with released}
Source1: https://download.kde.org/unstable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
# PATCH-FIX-OPENSUSE
Patch1: 0001-Support-default.session-symlink.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: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: pkgconfig
BuildRequires: cmake(KF6Archive) >= %{kf6_version}
BuildRequires: cmake(KF6Auth) >= %{kf6_version}
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires: cmake(KF6I18n) >= %{kf6_version}
BuildRequires: cmake(KF6KCMUtils) >= %{kf6_version}
BuildRequires: cmake(KF6KIO) >= %{kf6_version}
BuildRequires: cmake(KF6NewStuff) >= %{kf6_version}
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
BuildRequires: cmake(Qt6Gui) >= %{qt6_version}
BuildRequires: cmake(Qt6Quick) >= %{qt6_version}
BuildRequires: cmake(Qt6QuickWidgets) >= %{qt6_version}
BuildRequires: cmake(Qt6Widgets) >= %{qt6_version}
Supplements: (sddm and plasma6-workspace)
Conflicts: kcm_sddm
%description
SDDM control module for Plasma. It provides a graphical frontend for the SDDM.
%lang_package
%prep
%autosetup -p1 -n %{rname}-%{version}
%build
%cmake_kf6
%kf6_build
%install
%kf6_install
%find_lang kcm_sddm
%files
%doc README.md
%license LICENSES/*
%{_kf6_bindir}/sddmthemeinstaller
%{_kf6_applicationsdir}/kcm_sddm.desktop
%{_kf6_dbuspolicydir}/org.kde.kcontrol.kcmsddm.conf
%{_kf6_knsrcfilesdir}/sddmtheme.knsrc
%{_kf6_plugindir}/plasma/kcms/systemsettings/kcm_sddm.so
%{_kf6_sharedir}/dbus-1/system-services/org.kde.kcontrol.kcmsddm.service
%{_kf6_sharedir}/polkit-1/actions/org.kde.kcontrol.kcmsddm.policy
%{_kf6_libexecdir}/kauth/kcmsddm_authhelper
%files lang -f kcm_sddm.lang
%changelog