diff --git a/0001-Support-default.session-symlink.patch b/0001-Support-default.session-symlink.patch index 15d5e8b..c0067ea 100644 --- a/0001-Support-default.session-symlink.patch +++ b/0001-Support-default.session-symlink.patch @@ -1,21 +1,35 @@ -From 63f7e6b7b0ce899f9dcc8e4b7fc8aba071175ffb Mon Sep 17 00:00:00 2001 +From 6e280bcc5cac94a409c2c28bc07068b4f3a95060 Mon Sep 17 00:00:00 2001 From: Fabian Vogt 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 88bd73e..0b10c6c 100644 +--- a/src/package/contents/ui/Advanced.qml ++++ b/src/package/contents/ui/Advanced.qml +@@ -70,7 +70,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" + Component.onCompleted: currentIndex = Math.max(indexOfValue(kcm.sddmSettings.session), 0) + KCM.SettingStateBinding { + visible: autologinBox.checked 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 diff --git a/0002-Read-and-write-autologin-user-to-etc-sysconfig-displ.patch b/0002-Read-and-write-autologin-user-to-etc-sysconfig-displ.patch new file mode 100644 index 0000000..3ee6a31 --- /dev/null +++ b/0002-Read-and-write-autologin-user-to-etc-sysconfig-displ.patch @@ -0,0 +1,91 @@ +From 338984a86f06022241ee2d34cfad2bcac672dde1 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +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 + #include + #include ++#include ++#include + + #include + #include +@@ -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 + #include ++#include + + #include + +@@ -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 + diff --git a/0002-Replace-autologin-configuration-with-a-note-to-use-Y.patch b/0002-Replace-autologin-configuration-with-a-note-to-use-Y.patch deleted file mode 100644 index 00d89f5..0000000 --- a/0002-Replace-autologin-configuration-with-a-note-to-use-Y.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 0e638de390c1629feba3ebd165e4c2a9d872b4f9 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -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 @@ - - Qt::AlignHCenter|Qt::AlignTop - -- -+ -+ -+ -+ The user for autologin needs to be configured using YaST or by setting DISPLAYMANAGER_AUTOLOGIN in /etc/sysconfig/displaymanager. -+ -+ -+ -+ - - - Automatically log in: -@@ -33,6 +40,9 @@ - - as user: - -+ -+ false -+ - - - -@@ -40,12 +50,15 @@ - - false - -+ -+ false -+ - - - - - -- false -+ true - - - with session: -@@ -55,7 +68,7 @@ - - - -- false -+ true - - - -@@ -64,7 +77,7 @@ - - - -- false -+ true - - - --- -2.25.1 - diff --git a/0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch b/0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch index dd19240..08d30a4 100644 --- a/0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch +++ b/0003-Don-t-add-a-Wayland-suffix-to-Wayland-sessions.patch @@ -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 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 diff --git a/kcm_sddm.changes b/kcm_sddm.changes index 70a2d0e..48b5c7a 100644 --- a/kcm_sddm.changes +++ b/kcm_sddm.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Thu Feb 11 18:23:10 UTC 2021 - Fabian Vogt + +- Update to 5.21.0 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/plasma/5/5.21.0 +- Changes since 5.20.90: + * Set index on completion instead of binding (kde#432018) + * Indicate that we need saving when background changes (kde#432112) +- Refresh 0001-Support-default.session-symlink.patch + +------------------------------------------------------------------- +Sun Jan 31 12:48:05 UTC 2021 - Fabian Vogt + +- Add support for qml-autoreqprov + +------------------------------------------------------------------- +Thu Jan 21 21:31:33 UTC 2021 - Fabian Vogt + +- 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 diff --git a/kcm_sddm.spec b/kcm_sddm.spec index 08facd1..24a99ff 100644 --- a/kcm_sddm.spec +++ b/kcm_sddm.spec @@ -16,22 +16,25 @@ # +# Internal QML import +%global __requires_exclude qmlimport\\(org\\.kde\\.private\\.kcms\\.sddm + %bcond_without lang Name: kcm_sddm -Version: 5.20.5 +Version: 5.21.0 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: sddm-kcm-%{version}.tar.xz %if %{with lang} -Source1: https://download.kde.org/stable/plasma/%{version}/sddm-kcm-%{version}.tar.xz.sig +Source1: 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 +43,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 +84,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 diff --git a/sddm-kcm-5.20.5.tar.xz b/sddm-kcm-5.20.5.tar.xz deleted file mode 100644 index e42377c..0000000 --- a/sddm-kcm-5.20.5.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f850e3e3e7dc85f5b13444c6669caf47690bf8e85d4248a4304f56ca7f189ff -size 64796 diff --git a/sddm-kcm-5.20.5.tar.xz.sig b/sddm-kcm-5.20.5.tar.xz.sig deleted file mode 100644 index 0fd048c..0000000 --- a/sddm-kcm-5.20.5.tar.xz.sig +++ /dev/null @@ -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----- diff --git a/sddm-kcm-5.21.0.tar.xz b/sddm-kcm-5.21.0.tar.xz new file mode 100644 index 0000000..de9d99a --- /dev/null +++ b/sddm-kcm-5.21.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:892698c874662c0df1e99fb458c4962836f5c3b7de01934d5f21ee2f12f41e8a +size 62868 diff --git a/sddm-kcm-5.21.0.tar.xz.sig b/sddm-kcm-5.21.0.tar.xz.sig new file mode 100644 index 0000000..f349199 --- /dev/null +++ b/sddm-kcm-5.21.0.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmAlIiMACgkQ7JTRj38F +mX4v5wf8COleCPMSaeiI3j3Fj4qe6PWr+78+HBqq/Ba/O8a060evu2n579MfB0/u +hRSXLshXwA+Kuyqo8eLTrLc9VWAeV5NZG3zJQRufX8w0uzctQdmPizF65XaRsjMa +g8ottOgnJOoXTENItrvmHFCp0R99K6kxrRIdjJjH7LH2iops+G+HYl7L2ANCLOg7 +QAENJFbL1pRrN0aJj3Dtvn47J5H+35gBu7+NKCegrrisc8kstkcMNkUHxsmTU/vK +9t7jaNa95hs06KYw4YJbNuUdF3iz115uG2aVyEDhg6O4V/MB4seiBVAMeMW/b0jh +MQz26czzGTMGjqygwg60W9zcEBNXjw== +=J2lw +-----END PGP SIGNATURE-----