1 |
commit: 9eab4843656a9d806f902602ccb19584f8863792 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 3 00:27:58 2019 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 3 02:09:37 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eab4843 |
7 |
|
8 |
x11-apps/xdm: Version bump to 1.1.2 |
9 |
|
10 |
Various changes, addressing multiple bugs (in some cases partially): |
11 |
- Depend on x11-apps/xsm (bug 329833) |
12 |
- Drop IUSE=xdm-auth (bug 445662) |
13 |
- Add IUSE=xinerama (bug 384371) |
14 |
- Add IUSE=truetype (bug 608840) |
15 |
- Add IUSE=xpm |
16 |
- Add IUSE=systemd |
17 |
- Port to EAPI=7 and xorg-3.eclass |
18 |
|
19 |
Bug: https://bugs.gentoo.org/329833 |
20 |
Bug: https://bugs.gentoo.org/445662 |
21 |
Closes: https://bugs.gentoo.org/384371 |
22 |
Closes: https://bugs.gentoo.org/608840 |
23 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
24 |
|
25 |
x11-apps/xdm/Manifest | 1 + |
26 |
x11-apps/xdm/files/xdm-1.1.12-consolekit.patch | 269 +++++++++++++++++++++ |
27 |
.../files/xdm-1.1.12-make-xinerama-optional.patch | 34 +++ |
28 |
x11-apps/xdm/xdm-1.1.12.ebuild | 84 +++++++ |
29 |
4 files changed, 388 insertions(+) |
30 |
|
31 |
diff --git a/x11-apps/xdm/Manifest b/x11-apps/xdm/Manifest |
32 |
index 0911b632ce9..ae11f03d02d 100644 |
33 |
--- a/x11-apps/xdm/Manifest |
34 |
+++ b/x11-apps/xdm/Manifest |
35 |
@@ -1 +1,2 @@ |
36 |
DIST xdm-1.1.11.tar.bz2 446612 BLAKE2B ce9bed568e036a882ecc56d75f7ce8646d14ae00c754d6e5542ea5b186c3ef1ce8499e2d70190b4fbc4b344e0c70fd36deab5aacc5f1f55501db709300aee520 SHA512 fe6f2b7817c0f7f07a1f5f497edcdfa15b93986fd87f314daa472dac8625327ef46ebbf40d27fe8d4a8a2f8d5af8a01c4438a29356740e0eb350f2bd0c7ec0d5 |
37 |
+DIST xdm-1.1.12.tar.bz2 512074 BLAKE2B a82d124f4b7ce3185d703fca3aade92e86094602aec5343566ba8c91c54b70cdedbaea2fa6fee330d7ed48d9138b04a998aa2dae06db2683bfcce6c7693edc82 SHA512 1a4be0a070ced5db8fda6fc74794c9f9ed0cb37fa440fda6a3a7652aff62dfc3d7ba68b9facf054671ebf0f4db2a0eec29d0aa3716e3407ccd5529bac3553bdb |
38 |
|
39 |
diff --git a/x11-apps/xdm/files/xdm-1.1.12-consolekit.patch b/x11-apps/xdm/files/xdm-1.1.12-consolekit.patch |
40 |
new file mode 100644 |
41 |
index 00000000000..232d10d94db |
42 |
--- /dev/null |
43 |
+++ b/x11-apps/xdm/files/xdm-1.1.12-consolekit.patch |
44 |
@@ -0,0 +1,269 @@ |
45 |
+http://bugs.gentoo.org/360987 |
46 |
+http://projects.archlinux.org/svntogit/packages.git/plain/trunk/xdm-consolekit.patch?h=packages/xorg-xdm |
47 |
+http://lists.x.org/archives/xorg-devel/2011-February/019615.html |
48 |
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615020 |
49 |
+--- |
50 |
+ configure.ac | 20 ++++++++-- |
51 |
+ include/dm.h | 3 ++ |
52 |
+ man/xdm.man | 6 +++ |
53 |
+ xdm/resource.c | 13 ++++++- |
54 |
+ xdm/session.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ |
55 |
+ 5 files changed, 140 insertions(+), 4 deletions(-) |
56 |
+ |
57 |
+diff --git a/configure.ac b/configure.ac |
58 |
+index d110809..db973f7 100644 |
59 |
+--- a/configure.ac |
60 |
++++ b/configure.ac |
61 |
+@@ -168,15 +168,15 @@ AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ |
62 |
+ AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"]) |
63 |
+ |
64 |
+ # Check whether to enable systemd startup notification. |
65 |
+-# This requires libsystemd-daemon. |
66 |
++# This requires libsystemd. |
67 |
+ AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon], |
68 |
+ [Add support for systemd startup notification (default is autodetected)]), |
69 |
+ [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto]) |
70 |
+ AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [ |
71 |
+- PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon], |
72 |
++ PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd], |
73 |
+ [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])], |
74 |
+ [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"], |
75 |
+- [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])] |
76 |
++ [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd not found.])] |
77 |
+ )] |
78 |
+ ) |
79 |
+ ]) |
80 |
+@@ -395,6 +395,20 @@ PKG_CHECK_MODULES(DMCP, xdmcp) |
81 |
+ PKG_CHECK_MODULES(XLIB, x11) |
82 |
+ PKG_CHECK_MODULES(AUTH, xau) |
83 |
+ |
84 |
++# ConsoleKit support |
85 |
++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]), |
86 |
++ [USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes]) |
87 |
++if test x"$USE_CONSOLEKIT" != xno; then |
88 |
++ PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector, |
89 |
++ [USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no]) |
90 |
++ if test x"$USE_CONSOLEKIT" = xyes; then |
91 |
++ AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit]) |
92 |
++ XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT" |
93 |
++ XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS" |
94 |
++ fi |
95 |
++fi |
96 |
++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes) |
97 |
++ |
98 |
+ # |
99 |
+ # Greeter |
100 |
+ # |
101 |
+diff --git a/include/dm.h b/include/dm.h |
102 |
+index 9116d6f..27fdd71 100644 |
103 |
+--- a/include/dm.h |
104 |
++++ b/include/dm.h |
105 |
+@@ -327,6 +327,9 @@ extern char *randomFile; |
106 |
+ extern char *prngdSocket; |
107 |
+ extern int prngdPort; |
108 |
+ # endif |
109 |
++#ifdef USE_CONSOLEKIT |
110 |
++extern int use_consolekit; |
111 |
++#endif |
112 |
+ |
113 |
+ extern char *greeterLib; |
114 |
+ extern char *willing; |
115 |
+diff --git a/man/xdm.man b/man/xdm.man |
116 |
+index ef57d8c..de99d25 100644 |
117 |
+--- a/man/xdm.man |
118 |
++++ b/man/xdm.man |
119 |
+@@ -48,6 +48,8 @@ xdm \- X Display Manager with support for XDMCP, host chooser |
120 |
+ ] [ |
121 |
+ .B \-session |
122 |
+ .I session_program |
123 |
++] [ |
124 |
++.B \-noconsolekit |
125 |
+ ] |
126 |
+ .SH DESCRIPTION |
127 |
+ .I Xdm |
128 |
+@@ -215,6 +217,10 @@ indicates the program to run as the session after the user has logged in. |
129 |
+ .IP "\fB\-xrm\fP \fIresource_specification\fP" |
130 |
+ Allows an arbitrary resource to be specified, as in most |
131 |
+ X Toolkit applications. |
132 |
++.IP "\fB\-noconsolekit\fP" |
133 |
++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP |
134 |
++resource. |
135 |
++This suppresses the session management using ConsoleKit. |
136 |
+ .SH RESOURCES |
137 |
+ At many stages the actions of |
138 |
+ .I xdm |
139 |
+diff --git a/xdm/resource.c b/xdm/resource.c |
140 |
+index 316ace4..725351e 100644 |
141 |
+--- a/xdm/resource.c |
142 |
++++ b/xdm/resource.c |
143 |
+@@ -65,6 +65,9 @@ char *randomDevice; |
144 |
+ char *prngdSocket; |
145 |
+ int prngdPort; |
146 |
+ #endif |
147 |
++#ifdef USE_CONSOLEKIT |
148 |
++int use_consolekit; |
149 |
++#endif |
150 |
+ |
151 |
+ char *greeterLib; |
152 |
+ char *willing; |
153 |
+@@ -192,6 +195,10 @@ struct dmResources { |
154 |
+ "false"} , |
155 |
+ { "willing", "Willing", DM_STRING, &willing, |
156 |
+ ""} , |
157 |
++#ifdef USE_CONSOLEKIT |
158 |
++{ "consoleKit", "ConsoleKit", DM_BOOL, (char **) &use_consolekit, |
159 |
++ "true"} , |
160 |
++#endif |
161 |
+ }; |
162 |
+ |
163 |
+ #define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) |
164 |
+@@ -377,7 +384,11 @@ XrmOptionDescRec optionTable [] = { |
165 |
+ {"-debug", "*debugLevel", XrmoptionSepArg, (caddr_t) NULL }, |
166 |
+ {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL }, |
167 |
+ {"-daemon", ".daemonMode", XrmoptionNoArg, "true" }, |
168 |
+-{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" } |
169 |
++{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" }, |
170 |
++#ifdef USE_CONSOLEKIT |
171 |
++{"-consolekit", ".consoleKit", XrmoptionNoArg, "true" }, |
172 |
++{"-noconsolekit", ".consoleKit", XrmoptionNoArg, "false" } |
173 |
++#endif |
174 |
+ }; |
175 |
+ |
176 |
+ static int originalArgc; |
177 |
+diff --git a/xdm/session.c b/xdm/session.c |
178 |
+index 4fd7d0a..c16978d 100644 |
179 |
+--- a/xdm/session.c |
180 |
++++ b/xdm/session.c |
181 |
+@@ -73,6 +73,11 @@ extern int key_setnet(struct key_netstarg *arg); |
182 |
+ # endif |
183 |
+ #endif /* USE_PAM */ |
184 |
+ |
185 |
++#ifdef USE_CONSOLEKIT |
186 |
++#include <ck-connector.h> |
187 |
++#include <dbus/dbus.h> |
188 |
++#endif |
189 |
++ |
190 |
+ #ifdef USE_SELINUX |
191 |
+ #include <selinux/selinux.h> |
192 |
+ #include <selinux/get_context_list.h> |
193 |
+@@ -523,6 +528,97 @@ UnsecureDisplay (struct display *d, Display *dpy) |
194 |
+ } |
195 |
+ } |
196 |
+ |
197 |
++#ifdef USE_CONSOLEKIT |
198 |
++ |
199 |
++static CkConnector *connector; |
200 |
++ |
201 |
++static int openCKSession(struct verify_info *verify, struct display *d) |
202 |
++{ |
203 |
++ int ret; |
204 |
++ DBusError error; |
205 |
++ char *remote_host_name = ""; |
206 |
++ dbus_bool_t is_local; |
207 |
++ char *display_name = ""; |
208 |
++ char *display_device = ""; |
209 |
++ char devtmp[16]; |
210 |
++ |
211 |
++ if (!use_consolekit) |
212 |
++ return 1; |
213 |
++ |
214 |
++ is_local = d->displayType.location == Local; |
215 |
++ if (d->peerlen > 0 && d->peer) |
216 |
++ remote_host_name = d->peer; |
217 |
++ if (d->name) |
218 |
++ display_name = d->name; |
219 |
++ /* how can we get the corresponding tty at best...? */ |
220 |
++ if (d->windowPath) { |
221 |
++ display_device = strchr(d->windowPath, ':'); |
222 |
++ if (display_device && display_device[1]) |
223 |
++ display_device++; |
224 |
++ else |
225 |
++ display_device = d->windowPath; |
226 |
++ snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device); |
227 |
++ display_device = devtmp; |
228 |
++ } |
229 |
++ |
230 |
++ connector = ck_connector_new(); |
231 |
++ if (!connector) { |
232 |
++ LogOutOfMem("ck_connector"); |
233 |
++ return 0; |
234 |
++ } |
235 |
++ |
236 |
++ dbus_error_init(&error); |
237 |
++ ret = ck_connector_open_session_with_parameters( |
238 |
++ connector, &error, |
239 |
++ "unix-user", &verify->uid, |
240 |
++ "x11-display", &display_name, |
241 |
++ "x11-display-device", &display_device, |
242 |
++ "remote-host-name", &remote_host_name, |
243 |
++ "is-local", &is_local, |
244 |
++ NULL); |
245 |
++ if (!ret) { |
246 |
++ if (dbus_error_is_set(&error)) { |
247 |
++ LogError("Dbus error: %s\n", error.message); |
248 |
++ dbus_error_free(&error); |
249 |
++ } else { |
250 |
++ LogError("ConsoleKit error\n"); |
251 |
++ } |
252 |
++ LogError("console-kit-daemon not running?\n"); |
253 |
++ ck_connector_unref(connector); |
254 |
++ connector = NULL; |
255 |
++ return 0; |
256 |
++ } |
257 |
++ |
258 |
++ verify->userEnviron = setEnv(verify->userEnviron, |
259 |
++ "XDG_SESSION_COOKIE", ck_connector_get_cookie(connector)); |
260 |
++ return 1; |
261 |
++} |
262 |
++ |
263 |
++static void closeCKSession(void) |
264 |
++{ |
265 |
++ DBusError error; |
266 |
++ |
267 |
++ if (!connector) |
268 |
++ return; |
269 |
++ |
270 |
++ dbus_error_init(&error); |
271 |
++ if (!ck_connector_close_session(connector, &error)) { |
272 |
++ if (dbus_error_is_set(&error)) { |
273 |
++ LogError("Dbus error: %s\n", error.message); |
274 |
++ dbus_error_free(&error); |
275 |
++ } else { |
276 |
++ LogError("ConsoleKit close error\n"); |
277 |
++ } |
278 |
++ LogError("console-kit-daemon not running?\n"); |
279 |
++ } |
280 |
++ ck_connector_unref(connector); |
281 |
++ connector = NULL; |
282 |
++} |
283 |
++#else |
284 |
++#define openCKSession(v,d) 1 |
285 |
++#define closeCKSession() |
286 |
++#endif |
287 |
++ |
288 |
+ void |
289 |
+ SessionExit (struct display *d, int status, int removeAuth) |
290 |
+ { |
291 |
+@@ -537,6 +633,8 @@ SessionExit (struct display *d, int status, int removeAuth) |
292 |
+ } |
293 |
+ #endif |
294 |
+ |
295 |
++ closeCKSession(); |
296 |
++ |
297 |
+ /* make sure the server gets reset after the session is over */ |
298 |
+ if (d->serverPid >= 2 && d->resetSignal) |
299 |
+ kill (d->serverPid, d->resetSignal); |
300 |
+@@ -614,6 +712,10 @@ StartClient ( |
301 |
+ #ifdef USE_PAM |
302 |
+ if (pamh) pam_open_session(pamh, 0); |
303 |
+ #endif |
304 |
++ |
305 |
++ if (!openCKSession(verify, d)) |
306 |
++ return 0; |
307 |
++ |
308 |
+ switch (pid = fork ()) { |
309 |
+ case 0: |
310 |
+ CleanUpChild (); |
311 |
+-- |
312 |
+2.19.2 |
313 |
+ |
314 |
|
315 |
diff --git a/x11-apps/xdm/files/xdm-1.1.12-make-xinerama-optional.patch b/x11-apps/xdm/files/xdm-1.1.12-make-xinerama-optional.patch |
316 |
new file mode 100644 |
317 |
index 00000000000..bc953ff0f31 |
318 |
--- /dev/null |
319 |
+++ b/x11-apps/xdm/files/xdm-1.1.12-make-xinerama-optional.patch |
320 |
@@ -0,0 +1,34 @@ |
321 |
+ configure.ac | 10 ++++++++-- |
322 |
+ 1 file changed, 8 insertions(+), 2 deletions(-) |
323 |
+ |
324 |
+diff --git a/configure.ac b/configure.ac |
325 |
+index db973f7..64a0e37 100644 |
326 |
+--- a/configure.ac |
327 |
++++ b/configure.ac |
328 |
+@@ -330,7 +330,13 @@ AC_SUBST(SHELL_CMD) |
329 |
+ |
330 |
+ PKG_CHECK_MODULES(XDM, [xmu x11 xau xproto >= 7.0.17]) |
331 |
+ |
332 |
+-PKG_CHECK_EXISTS(xinerama, [ |
333 |
++AC_ARG_WITH(xinerama, |
334 |
++ AS_HELP_STRING([--with-xinerama], |
335 |
++ [Use Xinerama (default is YES if installed)]), |
336 |
++ [USE_XINERAMA="$withval"], |
337 |
++ PKG_CHECK_EXISTS(xinerama, [USE_XINERAMA="yes"], [USE_XINERAMA="no"])) |
338 |
++ |
339 |
++if test "x$USE_XINERAMA" = "xyes" ; then |
340 |
+ AC_DEFINE([USE_XINERAMA], 1, |
341 |
+ [Define to 1 to use XINERAMA in greeter & chooser]) |
342 |
+ PKG_CHECK_MODULES(XINERAMA, xinerama) |
343 |
+@@ -338,7 +344,7 @@ PKG_CHECK_EXISTS(xinerama, [ |
344 |
+ CHOOSER_LIBS="$CHOOSER_LIBS $XINERAMA_LIBS" |
345 |
+ GREETER_CFLAGS="$GREETER_CFLAGS $XINERAMA_CFLAGS" |
346 |
+ GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" |
347 |
+-]) |
348 |
++fi |
349 |
+ |
350 |
+ # Xft text drawing for the greeter screen |
351 |
+ AC_ARG_WITH(xft, |
352 |
+-- |
353 |
+2.19.2 |
354 |
+ |
355 |
|
356 |
diff --git a/x11-apps/xdm/xdm-1.1.12.ebuild b/x11-apps/xdm/xdm-1.1.12.ebuild |
357 |
new file mode 100644 |
358 |
index 00000000000..e7d6bd75652 |
359 |
--- /dev/null |
360 |
+++ b/x11-apps/xdm/xdm-1.1.12.ebuild |
361 |
@@ -0,0 +1,84 @@ |
362 |
+# Copyright 1999-2019 Gentoo Authors |
363 |
+# Distributed under the terms of the GNU General Public License v2 |
364 |
+ |
365 |
+EAPI=7 |
366 |
+ |
367 |
+XORG_EAUTORECONF=yes |
368 |
+ |
369 |
+inherit multilib xorg-3 pam systemd |
370 |
+ |
371 |
+DEFAULTVT=vt7 |
372 |
+ |
373 |
+DESCRIPTION="X.Org xdm application" |
374 |
+ |
375 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
376 |
+IUSE="consolekit ipv6 pam systemd truetype xinerama xpm" |
377 |
+ |
378 |
+RDEPEND=" |
379 |
+ x11-apps/sessreg |
380 |
+ x11-apps/xconsole |
381 |
+ x11-apps/xinit |
382 |
+ x11-apps/xrdb |
383 |
+ x11-apps/xsm |
384 |
+ x11-libs/libX11 |
385 |
+ x11-libs/libXaw |
386 |
+ x11-libs/libXdmcp |
387 |
+ x11-libs/libXmu |
388 |
+ x11-libs/libXt |
389 |
+ consolekit? ( sys-auth/consolekit ) |
390 |
+ pam? ( virtual/pam ) |
391 |
+ systemd? ( >=sys-apps/systemd-209 ) |
392 |
+ truetype? ( |
393 |
+ x11-libs/libXrender |
394 |
+ x11-libs/libXft |
395 |
+ ) |
396 |
+ xinerama? ( x11-libs/libXinerama ) |
397 |
+ xpm? ( x11-libs/libXpm ) |
398 |
+ elibc_glibc? ( dev-libs/libbsd )" |
399 |
+DEPEND="${RDEPEND} |
400 |
+ x11-base/xorg-proto |
401 |
+ consolekit? ( !=sys-auth/pambase-20101024-r1 )" |
402 |
+ |
403 |
+pkg_setup() { |
404 |
+ PATCHES=( |
405 |
+ "${FILESDIR}"/${P}-consolekit.patch |
406 |
+ "${FILESDIR}"/${P}-make-xinerama-optional.patch |
407 |
+ ) |
408 |
+ |
409 |
+ XORG_CONFIGURE_OPTIONS=( |
410 |
+ $(use_enable ipv6) |
411 |
+ $(use_with consolekit) |
412 |
+ $(use_with pam) |
413 |
+ $(use_with systemd systemd-daemon) |
414 |
+ $(use_with truetype xft) |
415 |
+ $(use_with xinerama) |
416 |
+ $(use_enable xpm xpm-logos) |
417 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
418 |
+ --with-default-vt=${DEFAULTVT} |
419 |
+ --with-xdmconfigdir=/etc/X11/xdm |
420 |
+ ) |
421 |
+} |
422 |
+ |
423 |
+src_prepare() { |
424 |
+ sed -i -e 's:^Alias=.*$:Alias=display-manager.service:' \ |
425 |
+ xdm.service.in || die |
426 |
+ |
427 |
+ # Disable XDM-AUTHORIZATION-1 (bug #445662). |
428 |
+ # it causes issue with libreoffice and SDL games (bug #306223). |
429 |
+ sed -i -e '/authorize/a DisplayManager*authName: MIT-MAGIC-COOKIE-1' \ |
430 |
+ config/xdm-config.in || die |
431 |
+ |
432 |
+ xorg-3_src_prepare |
433 |
+} |
434 |
+ |
435 |
+src_install() { |
436 |
+ xorg-3_src_install |
437 |
+ |
438 |
+ exeinto /usr/$(get_libdir)/X11/xdm |
439 |
+ doexe "${FILESDIR}"/Xsession |
440 |
+ |
441 |
+ use pam && pamd_mimic system-local-login xdm auth account session |
442 |
+ |
443 |
+ # Keep /var/lib/xdm. This is where authfiles are stored. See #286350. |
444 |
+ keepdir /var/lib/xdm |
445 |
+} |