1 |
commit: 8e892dae48e6e695e7e809748a94d67e70be6c2f |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 5 15:53:03 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 5 15:54:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e892dae |
7 |
|
8 |
x11-misc/sddm: Fix SwitchToGreeter error |
9 |
|
10 |
Thanks-to: Alexander Miller <alex.miller <AT> gmx.de> |
11 |
Bug: https://bugs.gentoo.org/644718 |
12 |
Package-Manager: Portage-2.3.28, Repoman-2.3.9 |
13 |
|
14 |
.../sddm/files/sddm-0.17.0-switchtogreeter.patch | 54 ++++++++++++++ |
15 |
x11-misc/sddm/sddm-0.17.0-r2.ebuild | 83 ++++++++++++++++++++++ |
16 |
2 files changed, 137 insertions(+) |
17 |
|
18 |
diff --git a/x11-misc/sddm/files/sddm-0.17.0-switchtogreeter.patch b/x11-misc/sddm/files/sddm-0.17.0-switchtogreeter.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..22d2fa4ae9b |
21 |
--- /dev/null |
22 |
+++ b/x11-misc/sddm/files/sddm-0.17.0-switchtogreeter.patch |
23 |
@@ -0,0 +1,54 @@ |
24 |
+Subject: [PATCH] Fix switchToGreeter not available without logind |
25 |
+From: Alexander Miller <alex.miller@×××.de> |
26 |
+ |
27 |
+Seats can't be created until SeatManager's signals are |
28 |
+connected to the DisplayManager, or the latter won't see |
29 |
+them and switchToGreeter doesn't work. So split SeatManager |
30 |
+initialization from its constructor and call initialize it |
31 |
+only after all connections have been set up in DaemonApp's |
32 |
+constructor. |
33 |
+ |
34 |
+With logind there may have been enough delay before seats |
35 |
+got actually added so things would work, but it's still |
36 |
+cleaner to fix the order. |
37 |
+ |
38 |
+Fixes: https://bugs.gentoo.org/644718 |
39 |
+Fixes: https://github.com/sddm/sddm/issues/824 |
40 |
+ |
41 |
+--- a/src/daemon/SeatManager.h |
42 |
++++ b/src/daemon/SeatManager.h |
43 |
+@@ -31,8 +31,9 @@ namespace SDDM { |
44 |
+ class SeatManager : public QObject { |
45 |
+ Q_OBJECT |
46 |
+ public: |
47 |
+- explicit SeatManager(QObject *parent = 0); |
48 |
++ explicit SeatManager(QObject *parent = 0) {} |
49 |
+ |
50 |
++ void initialize(); |
51 |
+ void createSeat(const QString &name); |
52 |
+ void removeSeat(const QString &name); |
53 |
+ void switchToGreeter(const QString &seat); |
54 |
+--- a/src/daemon/SeatManager.cpp |
55 |
++++ b/src/daemon/SeatManager.cpp |
56 |
+@@ -93,8 +93,7 @@ namespace SDDM { |
57 |
+ } |
58 |
+ } |
59 |
+ |
60 |
+- SeatManager::SeatManager(QObject *parent) : QObject(parent) { |
61 |
+- |
62 |
++ void SeatManager::initialize() { |
63 |
+ if (DaemonApp::instance()->testing() || !Logind::isAvailable()) { |
64 |
+ //if we don't have logind/CK2, just create a single seat immediately and don't do any other connections |
65 |
+ createSeat(QStringLiteral("seat0")); |
66 |
+--- a/src/daemon/DaemonApp.cpp |
67 |
++++ b/src/daemon/DaemonApp.cpp |
68 |
+@@ -75,6 +75,9 @@ namespace SDDM { |
69 |
+ |
70 |
+ // log message |
71 |
+ qDebug() << "Starting..."; |
72 |
++ |
73 |
++ // initialize seats only after signals are connected |
74 |
++ m_seatManager->initialize(); |
75 |
+ } |
76 |
+ |
77 |
+ bool DaemonApp::testing() const { |
78 |
|
79 |
diff --git a/x11-misc/sddm/sddm-0.17.0-r2.ebuild b/x11-misc/sddm/sddm-0.17.0-r2.ebuild |
80 |
new file mode 100644 |
81 |
index 00000000000..0baf9364f5e |
82 |
--- /dev/null |
83 |
+++ b/x11-misc/sddm/sddm-0.17.0-r2.ebuild |
84 |
@@ -0,0 +1,83 @@ |
85 |
+# Copyright 1999-2018 Gentoo Foundation |
86 |
+# Distributed under the terms of the GNU General Public License v2 |
87 |
+ |
88 |
+EAPI=6 |
89 |
+ |
90 |
+PLOCALES="ar ca cs da de es et fi fr hi_IN hu it ja kk ko lt lv nb nl nn pl pt_BR pt_PT ro ru sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv tr uk zh_CN zh_TW" |
91 |
+inherit cmake-utils l10n systemd user |
92 |
+ |
93 |
+DESCRIPTION="Simple Desktop Display Manager" |
94 |
+HOMEPAGE="https://github.com/sddm/sddm" |
95 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" |
96 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
97 |
+ |
98 |
+LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain" |
99 |
+SLOT="0" |
100 |
+IUSE="consolekit elogind +pam systemd test" |
101 |
+ |
102 |
+REQUIRED_USE="?? ( elogind systemd )" |
103 |
+ |
104 |
+RDEPEND=" |
105 |
+ >=dev-qt/qtcore-5.6:5 |
106 |
+ >=dev-qt/qtdbus-5.6:5 |
107 |
+ >=dev-qt/qtdeclarative-5.6:5 |
108 |
+ >=dev-qt/qtgui-5.6:5 |
109 |
+ >=dev-qt/qtnetwork-5.6:5 |
110 |
+ >=x11-base/xorg-server-1.15.1 |
111 |
+ x11-libs/libXau |
112 |
+ x11-libs/libxcb[xkb] |
113 |
+ consolekit? ( >=sys-auth/consolekit-0.9.4 ) |
114 |
+ elogind? ( sys-auth/elogind ) |
115 |
+ pam? ( sys-libs/pam ) |
116 |
+ systemd? ( sys-apps/systemd:= ) |
117 |
+ !systemd? ( sys-power/upower )" |
118 |
+ |
119 |
+DEPEND="${RDEPEND} |
120 |
+ dev-python/docutils |
121 |
+ >=dev-qt/linguist-tools-5.6:5 |
122 |
+ kde-frameworks/extra-cmake-modules |
123 |
+ virtual/pkgconfig |
124 |
+ test? ( >=dev-qt/qttest-5.6:5 )" |
125 |
+ |
126 |
+PATCHES=( |
127 |
+ "${FILESDIR}/${PN}-0.12.0-respect-user-flags.patch" # fix for flags handling and bug 563108 |
128 |
+ "${FILESDIR}/${PN}-0.16.0-Xsession.patch" # bug 611210 |
129 |
+ "${FILESDIR}/${PN}-0.16.0-ck2-revert.patch" # bug 633920 |
130 |
+ # not yet upstream, fixing issues caused by hostname changes |
131 |
+ "${FILESDIR}/${P}-switchtogreeter.patch" # bugs 644718, 649888 |
132 |
+) |
133 |
+ |
134 |
+src_prepare() { |
135 |
+ cmake-utils_src_prepare |
136 |
+ |
137 |
+ disable_locale() { |
138 |
+ sed -e "/${1}\.ts/d" -i data/translations/CMakeLists.txt || die |
139 |
+ } |
140 |
+ l10n_find_plocales_changes "data/translations" "" ".ts" |
141 |
+ l10n_for_each_disabled_locale_do disable_locale |
142 |
+ |
143 |
+ use test || cmake_comment_add_subdirectory test |
144 |
+} |
145 |
+ |
146 |
+src_configure() { |
147 |
+ local mycmakeargs=( |
148 |
+ -DENABLE_PAM=$(usex pam) |
149 |
+ -DNO_SYSTEMD=$(usex '!systemd') |
150 |
+ -DUSE_ELOGIND=$(usex 'elogind') |
151 |
+ -DBUILD_MAN_PAGES=ON |
152 |
+ -DDBUS_CONFIG_FILENAME="org.freedesktop.sddm.conf" |
153 |
+ ) |
154 |
+ cmake-utils_src_configure |
155 |
+} |
156 |
+ |
157 |
+src_install() { |
158 |
+ cmake-utils_src_install |
159 |
+ sed -i -e "/^InputMethod/s/qtvirtualkeyboard//" "${D}"/etc/sddm.conf || die |
160 |
+} |
161 |
+ |
162 |
+pkg_postinst() { |
163 |
+ enewgroup ${PN} |
164 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN},video |
165 |
+ |
166 |
+ systemd_reenable sddm.service |
167 |
+} |