summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-29 21:38:43 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-10-29 21:38:43 -0500
commit486ab2f7d07a4c7c71c4381c1c21024c62c4ab68 (patch)
tree8c765cdf48d80ca48df5a074ae2483cefdfbad19
parent8987be6fd7db8eb01d8bff69e947e12527e8d943 (diff)
downloadpackages-486ab2f7d07a4c7c71c4381c1c21024c62c4ab68.tar.gz
packages-486ab2f7d07a4c7c71c4381c1c21024c62c4ab68.tar.bz2
packages-486ab2f7d07a4c7c71c4381c1c21024c62c4ab68.tar.xz
packages-486ab2f7d07a4c7c71c4381c1c21024c62c4ab68.zip
user/sddm: proper ConsoleKit2 support
-rw-r--r--user/sddm/APKBUILD4
-rw-r--r--user/sddm/ck2-support.patch85
2 files changed, 74 insertions, 15 deletions
diff --git a/user/sddm/APKBUILD b/user/sddm/APKBUILD
index baed1af68..4f3b13cb7 100644
--- a/user/sddm/APKBUILD
+++ b/user/sddm/APKBUILD
@@ -29,7 +29,7 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
- -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DENABLE_JOURNALD=OFF \
@@ -56,6 +56,6 @@ xdm() {
}
sha512sums="114848909d3910e686f1cd0e0059a6804f7fdb45d391cdb63ce9fc319b395399bf3971534072e351fdcf525a9d2c0ed042e2b8d07679a72fa98bece9685652ca sddm-0.16.0.tar.xz
-4a0b0414c875dd499032318c134d470ed69596fa0c62e09d2265c1fd2dd4fa147bd58da835a4bf95ec597b5305bcab21bc4a94fa91ea060264ba53be6157c0d5 ck2-support.patch
+2ca671e662150083f5ad26f83aab9fab7f0da064a237c303e921f95638ff46c41e200ba08ae9cbdbb11f3c62539a30b977f3c3f65a04b2dcf27006f305618492 ck2-support.patch
f0b4eb7ef0581701157f9decc637629156f36f6711b9a4bae517f94d7a1df614c81bbd891c918f07ac50e2a3d1519c43ccb9eefd80282c95dd79eca0e8d90904 pam-path-fix.patch
5a03b3211e9d84ee762523631859a26b869aee2189f6845dc780c7a1e60a6658e2240e9ef9be05858708d2552ae77b594509dabe49794538f88d2ad6578d1fdf xdm.confd"
diff --git a/user/sddm/ck2-support.patch b/user/sddm/ck2-support.patch
index 5dafe02b3..8a9e6ee85 100644
--- a/user/sddm/ck2-support.patch
+++ b/user/sddm/ck2-support.patch
@@ -1,6 +1,26 @@
---- sddm-0.16.0/src/daemon/LogindDBusTypes.cpp.old 2017-10-04 12:13:38.000000000 -0500
-+++ sddm-0.16.0/src/daemon/LogindDBusTypes.cpp 2017-10-22 17:09:43.693222846 -0500
-@@ -63,7 +63,7 @@
+diff --git a/src/daemon/LogindDBusTypes.cpp b/src/daemon/LogindDBusTypes.cpp
+index 79c7031..4ccfeb5 100644
+--- a/src/daemon/LogindDBusTypes.cpp
++++ b/src/daemon/LogindDBusTypes.cpp
+@@ -18,6 +18,7 @@ public:
+ QString sessionIfaceName;
+ QString seatIfaceName;
+ QString userIfaceName;
++ QString newSeatSignalName;
+ };
+
+ LogindPathInternal::LogindPathInternal()
+@@ -55,18 +56,20 @@ LogindPathInternal::LogindPathInternal()
+ seatIfaceName = QStringLiteral("org.freedesktop.login1.Seat");
+ sessionIfaceName = QStringLiteral("org.freedesktop.login1.Session");
+ userIfaceName = QStringLiteral("org.freedesktop.login1.User");
++ newSeatSignalName = QStringLiteral("SeatNew");
+ return;
+ }
+
+ if (QDBusConnection::systemBus().interface()->isServiceRegistered(QStringLiteral("org.freedesktop.ConsoleKit"))) {
+- qDebug() << "Console kit interface found";
++ qDebug() << "ConsoleKit interface found";
available = true;
serviceName = QStringLiteral("org.freedesktop.ConsoleKit");
managerPath = QStringLiteral("/org/freedesktop/ConsoleKit/Manager");
@@ -9,23 +29,62 @@
seatIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.Seat");
sessionIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.Session");
userIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.User");
---- sddm-0.16.0/src/daemon/SeatManager.cpp.old 2017-10-04 12:13:38.000000000 -0500
-+++ sddm-0.16.0/src/daemon/SeatManager.cpp 2017-10-22 17:09:17.619956307 -0500
-@@ -102,7 +102,7 @@
- }
++ newSeatSignalName = QStringLiteral("SeatAdded");
+ return;
+ }
+ qDebug() << "No session manager found";
+@@ -109,3 +112,8 @@ QString Logind::userIfaceName()
+ {
+ return s_instance->userIfaceName;
+ }
++
++QString Logind::newSeatSignalName()
++{
++ return s_instance->newSeatSignalName;
++}
+diff --git a/src/daemon/LogindDBusTypes.h b/src/daemon/LogindDBusTypes.h
+index f1e8dd4..028879a 100644
+--- a/src/daemon/LogindDBusTypes.h
++++ b/src/daemon/LogindDBusTypes.h
+@@ -13,6 +13,7 @@ struct Logind
+ static QString sessionIfaceName();
+ static QString seatIfaceName();
+ static QString userIfaceName();
++ static QString newSeatSignalName();
+ };
- //fetch seats
-- auto listSeatsMsg = QDBusMessage::createMethodCall(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("ListSeats"));
-+ auto listSeatsMsg = QDBusMessage::createMethodCall(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("GetSeats"));
- QDBusPendingReply<NamedSeatPathList> reply = QDBusConnection::systemBus().asyncCall(listSeatsMsg);
+diff --git a/src/daemon/SeatManager.cpp b/src/daemon/SeatManager.cpp
+index c5afc57..6281ea8 100644
+--- a/src/daemon/SeatManager.cpp
++++ b/src/daemon/SeatManager.cpp
+@@ -26,6 +26,7 @@
+ #include <QDBusMessage>
+ #include <QDBusPendingReply>
+ #include <QDBusContext>
++#include <QDebug>
+
+ #include "LogindDBusTypes.h"
+
+@@ -59,6 +60,12 @@ namespace SDDM {
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply);
-@@ -113,7 +113,7 @@
+ connect(watcher, &QDBusPendingCallWatcher::finished, this, [=]() {
+ watcher->deleteLater();
++ if (Logind::serviceName().contains(QStringLiteral("ConsoleKit"))) {
++ m_canGraphical = true;
++ emit canGraphicalChanged(m_canGraphical);
++ return;
++ }
++
+ if (!reply.isValid())
+ return;
+
+@@ -113,7 +120,7 @@ namespace SDDM {
}
});
- QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatNew"), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
-+ QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatAdded"), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
++ QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), Logind::newSeatSignalName(), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatRemoved"), this, SLOT(logindSeatRemoved(QString,QDBusObjectPath)));
}