Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-base/gdm/files: gdm-2.32.0-selinux-remove-attr.patch gdm-2.32.0-xinitrc-ssh-agent.patch gdm-2.32.0-broken-VT-detection.patch gdm-2.32.0-automagic-libxklavier-support.patch gdm-2.32.0-custom-session.patch gdm-2.32.0-fix-daemonize-regression.patch
Date: Thu, 04 Nov 2010 23:22:34
Message-Id: 20101104232229.4B64520051@flycatcher.gentoo.org
1 eva 10/11/04 23:22:29
2
3 Added: gdm-2.32.0-selinux-remove-attr.patch
4 gdm-2.32.0-xinitrc-ssh-agent.patch
5 gdm-2.32.0-broken-VT-detection.patch
6 gdm-2.32.0-automagic-libxklavier-support.patch
7 gdm-2.32.0-custom-session.patch
8 gdm-2.32.0-fix-daemonize-regression.patch
9 Log:
10 Version bump. Update all patches against master and stop shipping them in a separate tarball, their size does not justify it.
11
12 (Portage version: 2.2.0_alpha3/cvs/Linux x86_64)
13
14 Revision Changes Path
15 1.1 gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch?rev=1.1&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch?rev=1.1&content-type=text/plain
19
20 Index: gdm-2.32.0-selinux-remove-attr.patch
21 ===================================================================
22 From 41badd6d2ca652a875fec3eea420ae876023076d Mon Sep 17 00:00:00 2001
23 From: Gilles Dartiguelongue <eva@g.o>
24 Date: Tue, 2 Nov 2010 23:15:54 +0100
25 Subject: [PATCH 1/6] remove unneeded linker directive for selinux
26
27 Gentoo bug: #41022
28
29 ---
30 configure.ac | 2 +-
31 1 files changed, 1 insertions(+), 1 deletions(-)
32
33 diff --git a/configure.ac b/configure.ac
34 index ed07dce..71d0247 100644
35 --- a/configure.ac
36 +++ b/configure.ac
37 @@ -873,7 +873,7 @@ if test "x$with_selinux" = "xyes" ; then
38 AC_CHECK_LIB(selinux,setexeccon,/bin/true)
39 AC_CHECK_LIB(selinux,is_selinux_enabled,/bin/true)
40 AC_DEFINE(HAVE_SELINUX, 1, [Define if have selinux])
41 - EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lselinux -lattr"
42 + EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lselinux"
43 fi
44
45 dnl ---------------------------------------------------------------------------
46 --
47 1.7.3.1
48
49
50
51
52 1.1 gnome-base/gdm/files/gdm-2.32.0-xinitrc-ssh-agent.patch
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-xinitrc-ssh-agent.patch?rev=1.1&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-xinitrc-ssh-agent.patch?rev=1.1&content-type=text/plain
56
57 Index: gdm-2.32.0-xinitrc-ssh-agent.patch
58 ===================================================================
59 From 1cb1841da3a8fedc1671637e2828d5e361af21fa Mon Sep 17 00:00:00 2001
60 From: Gilles Dartiguelongue <eva@g.o>
61 Date: Tue, 2 Nov 2010 23:19:31 +0100
62 Subject: [PATCH 5/6] ssh-agent handling must be done at xinitrc.d
63
64 Gentoo bug: #220603
65 ---
66 data/Xsession.in | 8 --------
67 1 files changed, 0 insertions(+), 8 deletions(-)
68
69 diff --git a/data/Xsession.in b/data/Xsession.in
70 index 0da187d..aa49b90 100755
71 --- a/data/Xsession.in
72 +++ b/data/Xsession.in
73 @@ -189,14 +189,6 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
74 done
75 fi
76
77 -# add ssh-agent if found
78 -sshagent="`gdmwhich ssh-agent`"
79 -if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
80 - command="$sshagent -- $command"
81 -elif [ -z "$sshagent" ] ; then
82 - echo "$0: ssh-agent not found!"
83 -fi
84 -
85 echo "$0: Setup done, will execute: $command"
86
87 eval exec $command
88 --
89 1.7.3.1
90
91
92
93
94 1.1 gnome-base/gdm/files/gdm-2.32.0-broken-VT-detection.patch
95
96 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-broken-VT-detection.patch?rev=1.1&view=markup
97 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-broken-VT-detection.patch?rev=1.1&content-type=text/plain
98
99 Index: gdm-2.32.0-broken-VT-detection.patch
100 ===================================================================
101 From 75b80587960b4cee6bd849a34d9e84dd46b91abc Mon Sep 17 00:00:00 2001
102 From: Gilles Dartiguelongue <eva@g.o>
103 Date: Tue, 2 Nov 2010 23:18:21 +0100
104 Subject: [PATCH 3/6] Fix VT grab problem causing GDM to grab VT2 instead of 7
105
106 Gentoo bug: #261339
107
108 ---
109 common/gdm-settings-keys.h | 1 +
110 daemon/gdm-server.c | 15 ++++++++++++---
111 data/gdm.schemas.in.in | 5 +++++
112 3 files changed, 18 insertions(+), 3 deletions(-)
113
114 diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
115 index 65a1628..e64eba0 100644
116 --- a/common/gdm-settings-keys.h
117 +++ b/common/gdm-settings-keys.h
118 @@ -27,6 +27,7 @@ G_BEGIN_DECLS
119
120 #define GDM_KEY_USER "daemon/User"
121 #define GDM_KEY_GROUP "daemon/Group"
122 +#define GDM_KEY_VT "daemon/VT"
123 #define GDM_KEY_AUTO_LOGIN_ENABLE "daemon/AutomaticLoginEnable"
124 #define GDM_KEY_AUTO_LOGIN_USER "daemon/AutomaticLogin"
125 #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
126 diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
127 index 339f3cc..f25d6f1 100644
128 --- a/daemon/gdm-server.c
129 +++ b/daemon/gdm-server.c
130 @@ -47,7 +47,9 @@
131
132 #include "gdm-common.h"
133 #include "gdm-signal-handler.h"
134 -
135 +#include "gdm-settings.h"
136 +#include "gdm-settings-direct.h"
137 +#include "gdm-settings-keys.h"
138 #include "gdm-server.h"
139
140 extern char **environ;
141 @@ -83,7 +85,7 @@ struct GdmServerPrivate
142 char *parent_display_name;
143 char *parent_auth_file;
144 char *chosen_hostname;
145 -
146 + char *vt;
147 guint child_watch_id;
148 };
149
150 @@ -686,7 +688,7 @@ gdm_server_start (GdmServer *server)
151 gboolean res;
152
153 /* fork X server process */
154 - res = gdm_server_spawn (server, NULL);
155 + res = gdm_server_spawn (server, server->priv->vt);
156
157 return res;
158 }
159 @@ -937,6 +939,8 @@ gdm_server_class_init (GdmServerClass *klass)
160 static void
161 gdm_server_init (GdmServer *server)
162 {
163 + int vt;
164 + gboolean has_vt;
165
166 server->priv = GDM_SERVER_GET_PRIVATE (server);
167
168 @@ -944,6 +948,11 @@ gdm_server_init (GdmServer *server)
169 server->priv->command = g_strdup (X_SERVER " -br -verbose");
170 server->priv->log_dir = g_strdup (LOGDIR);
171
172 + has_vt = gdm_settings_direct_get_int (GDM_KEY_VT, &vt);
173 + if (has_vt) {
174 + server->priv->vt = g_strdup_printf ("vt %d", vt);
175 + }
176 +
177 add_ready_handler (server);
178 }
179
180 diff --git a/data/gdm.schemas.in.in b/data/gdm.schemas.in.in
181 index 514117d..948e403 100644
182 --- a/data/gdm.schemas.in.in
183 +++ b/data/gdm.schemas.in.in
184 @@ -23,6 +23,11 @@
185 <default>@GDM_GROUPNAME@</default>
186 </schema>
187 <schema>
188 + <key>daemon/VT</key>
189 + <signature>i</signature>
190 + <default>7</default>
191 + </schema>
192 + <schema>
193 <key>daemon/AutomaticLoginEnable</key>
194 <signature>b</signature>
195 <default>false</default>
196 --
197 1.7.3.1
198
199
200
201
202 1.1 gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch
203
204 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch?rev=1.1&view=markup
205 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch?rev=1.1&content-type=text/plain
206
207 Index: gdm-2.32.0-automagic-libxklavier-support.patch
208 ===================================================================
209 From 481fe43b653b443ecfa8d4f3aa88d734d17cccd5 Mon Sep 17 00:00:00 2001
210 From: Gilles Dartiguelongue <eva@g.o>
211 Date: Tue, 2 Nov 2010 23:21:27 +0100
212 Subject: [PATCH 6/6] fix libxklavier automagic support
213
214 libxklavier support is optional, make that fact explicit.
215 ---
216 configure.ac | 28 +++++++++++++++++++---------
217 1 files changed, 19 insertions(+), 9 deletions(-)
218
219 diff --git a/configure.ac b/configure.ac
220 index 71d0247..10dbb72 100644
221 --- a/configure.ac
222 +++ b/configure.ac
223 @@ -129,17 +129,26 @@ SIMPLE_GREETER_LIBS="$SIMPLE_GREETER_LIBS -lm"
224 AC_SUBST(SIMPLE_GREETER_CFLAGS)
225 AC_SUBST(SIMPLE_GREETER_LIBS)
226
227 -PKG_CHECK_MODULES(LIBXKLAVIER,
228 - libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
229 - have_libxklavier=yes,
230 - have_libxklavier=no)
231 -if test "x$have_libxklavier" = "xyes" ; then
232 - AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
233 +AC_ARG_ENABLE([libxklavier],
234 + AS_HELP_STRING([--enable-libxklavier],
235 + [Enable libxklavier support @<:@default=yes@:>@]),
236 + enable_libxklavier=$enableval,
237 + enable_libxklavier=yes)
238 +have_libxklavier=no
239 +if test "x$enable_libxklavier" = "xyes"; then
240 + PKG_CHECK_MODULES(LIBXKLAVIER,
241 + libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
242 + have_libxklavier=yes,
243 + have_libxklavier=no)
244 + if test "x$have_libxklavier" = "xyes" ; then
245 + AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
246 + fi
247 + AC_SUBST(HAVE_LIBXKLAVIER)
248 + AC_SUBST(LIBXKLAVIER_CFLAGS)
249 + AC_SUBST(LIBXKLAVIER_LIBS)
250 fi
251 +
252 AM_CONDITIONAL(HAVE_LIBXKLAVIER, test x$have_libxklavier = xyes)
253 -AC_SUBST(HAVE_LIBXKLAVIER)
254 -AC_SUBST(LIBXKLAVIER_CFLAGS)
255 -AC_SUBST(LIBXKLAVIER_LIBS)
256
257 PKG_CHECK_MODULES(SIMPLE_CHOOSER,
258 dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
259 @@ -1467,5 +1476,6 @@ echo \
260 SELinux support: ${with_selinux}
261 ConsoleKit support: ${use_console_kit}
262 UPower support: ${have_upower}
263 + Libxklavier support: ${have_libxklavier}
264 Build with RBAC: ${msg_rbac_shutdown}
265 "
266 --
267 1.7.3.1
268
269
270
271
272 1.1 gnome-base/gdm/files/gdm-2.32.0-custom-session.patch
273
274 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-custom-session.patch?rev=1.1&view=markup
275 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-custom-session.patch?rev=1.1&content-type=text/plain
276
277 Index: gdm-2.32.0-custom-session.patch
278 ===================================================================
279 From 2dc0d268c7cc5d6133a9594adcd67dc543288b8f Mon Sep 17 00:00:00 2001
280 From: Gilles Dartiguelongue <eva@g.o>
281 Date: Tue, 2 Nov 2010 23:19:07 +0100
282 Subject: [PATCH 4/6] make custom session work
283
284 Gentoo bug: #216984
285
286 fix custom sessions not doing sourcing in the proper order.
287 ---
288 data/Xsession.in | 18 +++++++++---------
289 1 files changed, 9 insertions(+), 9 deletions(-)
290
291 diff --git a/data/Xsession.in b/data/Xsession.in
292 index b2d98f2..0da187d 100755
293 --- a/data/Xsession.in
294 +++ b/data/Xsession.in
295 @@ -153,15 +153,6 @@ if [ -n "$GDM_LANG" ]; then
296 export LANG
297 fi
298
299 -# run all system xinitrc shell scripts.
300 -if [ -d /etc/X11/xinit/xinitrc.d ]; then
301 - for i in /etc/X11/xinit/xinitrc.d/* ; do
302 - if [ -x "$i" -a ! -d "$i" ]; then
303 - . "$i"
304 - fi
305 - done
306 -fi
307 -
308 if [ "x$command" = "xcustom" ] ; then
309 if [ -x "$HOME/.xsession" ]; then
310 command="$HOME/.xsession"
311 @@ -189,6 +180,15 @@ if [ "x$command" = "xdefault" ] ; then
312 fi
313 fi
314
315 +# run all system xinitrc shell scripts.
316 +if [ -d /etc/X11/xinit/xinitrc.d ]; then
317 + for i in /etc/X11/xinit/xinitrc.d/* ; do
318 + if [ -x "$i" ]; then
319 + . "$i"
320 + fi
321 + done
322 +fi
323 +
324 # add ssh-agent if found
325 sshagent="`gdmwhich ssh-agent`"
326 if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
327 --
328 1.7.3.1
329
330
331
332
333 1.1 gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch
334
335 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch?rev=1.1&view=markup
336 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch?rev=1.1&content-type=text/plain
337
338 Index: gdm-2.32.0-fix-daemonize-regression.patch
339 ===================================================================
340 From 7f5104b242e6b36e6143183b14582d362763ff2a Mon Sep 17 00:00:00 2001
341 From: Gilles Dartiguelongue <eva@g.o>
342 Date: Tue, 2 Nov 2010 23:16:51 +0100
343 Subject: [PATCH 2/6] daemonize so that the boot process can continue
344
345 Gentoo bug: #236701
346
347 Originally from: Dan Nicholson <dbn.lists@×××××.com>
348
349 Fork gdm-binary, except when -nodaemon is used
350
351 gdm-binary now forks and the parent terminates, except when the
352 -nodaemon or --nodaemon options are used. This provides compatibility
353 with xdm. Fixes bug #550170.
354
355 ---
356 daemon/main.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
357 1 files changed, 64 insertions(+), 0 deletions(-)
358
359 diff --git a/daemon/main.c b/daemon/main.c
360 index 5b8d66b..191b6e3 100644
361 --- a/daemon/main.c
362 +++ b/daemon/main.c
363 @@ -513,6 +513,56 @@ is_debug_set (void)
364 return debug;
365 }
366
367 +static void
368 +dup_dev_null (int fd, int flags)
369 +{
370 + int nullfd;
371 + int dupfd;
372 +
373 + VE_IGNORE_EINTR (nullfd = open ("/dev/null", flags));
374 + if (G_UNLIKELY (nullfd < 0)) {
375 + gdm_fail (_("Cannot open /dev/null: %s!"),
376 + strerror (errno));
377 + exit (EXIT_FAILURE);
378 + }
379 +
380 + VE_IGNORE_EINTR (dupfd = dup2 (nullfd, fd));
381 + if (G_UNLIKELY (dupfd < 0)) {
382 + gdm_fail (_("Cannot duplicate /dev/null: %s!"),
383 + strerror (errno));
384 + exit (EXIT_FAILURE);
385 + }
386 +
387 + VE_IGNORE_EINTR (close (nullfd));
388 +}
389 +
390 +static void
391 +daemonify (void)
392 +{
393 + pid_t pid;
394 +
395 + pid = fork ();
396 +
397 + /* terminate the parent */
398 + if (pid > 0)
399 + exit (EXIT_SUCCESS);
400 +
401 + if (G_UNLIKELY (pid < 0)) {
402 + gdm_fail (_("fork () failed: %s!"), strerror (errno));
403 + exit (EXIT_FAILURE);
404 + }
405 +
406 + if (G_UNLIKELY (setsid () < 0)) {
407 + gdm_fail (_("setsid () failed: %s!"), strerror (errno));
408 + exit (EXIT_FAILURE);
409 + }
410 +
411 + /* reopen stdin, stdout, stderr with /dev/null */
412 + dup_dev_null (STDIN_FILENO, O_RDONLY);
413 + dup_dev_null (STDOUT_FILENO, O_RDWR);
414 + dup_dev_null (STDERR_FILENO, O_RDWR);
415 +}
416 +
417 int
418 main (int argc,
419 char **argv)
420 @@ -523,14 +573,17 @@ main (int argc,
421 DBusGConnection *connection;
422 GError *error;
423 int ret;
424 + int i;
425 gboolean res;
426 gboolean xdmcp_enabled;
427 GdmSignalHandler *signal_handler;
428 static gboolean do_timed_exit = FALSE;
429 static gboolean print_version = FALSE;
430 static gboolean fatal_warnings = FALSE;
431 + static gboolean no_daemon = FALSE;
432 static GOptionEntry entries [] = {
433 { "fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &fatal_warnings, N_("Make all warnings fatal"), NULL },
434 + { "nodaemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Do not fork into the background"), NULL },
435 { "timed-exit", 0, 0, G_OPTION_ARG_NONE, &do_timed_exit, N_("Exit after a time (for debugging)"), NULL },
436 { "version", 0, 0, G_OPTION_ARG_NONE, &print_version, N_("Print GDM version"), NULL },
437
438 @@ -547,6 +600,14 @@ main (int argc,
439
440 g_type_init ();
441
442 + /* preprocess the arguments to support the xdm style
443 + * -nodaemon option
444 + */
445 + for (i = 0; i < argc; i++) {
446 + if (strcmp (argv[i], "-nodaemon") == 0)
447 + argv[i] = "--nodaemon";
448 + }
449 +
450 context = g_option_context_new (_("GNOME Display Manager"));
451 g_option_context_add_main_entries (context, entries, NULL);
452 g_option_context_set_ignore_unknown_options (context, TRUE);
453 @@ -617,6 +678,9 @@ main (int argc,
454 exit (-1);
455 }
456
457 + if (no_daemon == FALSE)
458 + daemonify ();
459 +
460 /* pid file */
461 delete_pid ();
462 write_pid ();
463 --
464 1.7.3.1