Accepting request 110271 from home:dimstar:branches:GNOME:Factory

Update to 3.3.92.1 - systemd support enabled... I understand it falls back nicely to consolekit

OBS-URL: https://build.opensuse.org/request/show/110271
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=204
This commit is contained in:
Vincent Untz 2012-03-21 15:00:19 +00:00 committed by Git OBS Bridge
parent d93e5f74e8
commit 6854176c28
7 changed files with 387 additions and 423 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85a1383f93870fb5d47a938cc2e04b6f0d74cb611a2b5d94d9651b78a5ccffbd
size 1632116

3
gdm-3.3.92.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:957456fa8f3c5243c45d5f0be89931a515b79efd881a0423e8552a8f46c5379c
size 1604908

View File

@ -1,8 +1,8 @@
Index: gdm-3.1.90/daemon/gdm-session-worker.c
Index: gdm-3.3.92.1/daemon/gdm-session-worker.c
===================================================================
--- gdm-3.1.90.orig/daemon/gdm-session-worker.c
+++ gdm-3.1.90/daemon/gdm-session-worker.c
@@ -139,6 +139,8 @@ struct GdmSessionWorkerPrivate
--- gdm-3.3.92.1.orig/daemon/gdm-session-worker.c
+++ gdm-3.3.92.1/daemon/gdm-session-worker.c
@@ -148,6 +148,8 @@ struct GdmSessionWorkerPrivate
GdmSessionAuditor *auditor;
GdmSessionSettings *user_settings;
@ -11,10 +11,10 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
};
enum {
@@ -152,6 +154,11 @@ static void gdm_session_worker_final
@@ -166,6 +168,11 @@ static void gdm_session_worker_set_e
static void queue_state_change (GdmSessionWorker *worker);
+static void
+gdm_session_worker_set_environment_variable (GdmSessionWorker *worker,
+ const char *key,
@ -23,7 +23,7 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
typedef int (* GdmSessionWorkerPamNewMessagesFunc) (int,
const struct pam_message **,
struct pam_response **,
@@ -1166,6 +1173,9 @@ gdm_session_worker_initialize_pam (GdmSe
@@ -1196,6 +1203,9 @@ gdm_session_worker_initialize_pam (GdmSe
}
#endif
@ -33,7 +33,7 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
g_debug ("GdmSessionWorker: state SETUP_COMPLETE");
worker->priv->state = GDM_SESSION_WORKER_STATE_SETUP_COMPLETE;
@@ -2011,11 +2021,26 @@ static void
@@ -2051,11 +2061,26 @@ static void
gdm_session_worker_set_session_name (GdmSessionWorker *worker,
const char *session_name)
{
@ -60,7 +60,7 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
on_set_session_name (GdmSessionWorker *worker,
DBusMessage *message)
{
@@ -2068,6 +2093,28 @@ on_set_session_type (GdmSessionWorker *w
@@ -2108,6 +2133,28 @@ on_set_session_type (GdmSessionWorker *w
}
static void
@ -89,7 +89,7 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
gdm_session_worker_set_language_name (GdmSessionWorker *worker,
const char *language_name)
{
@@ -2774,6 +2821,8 @@ worker_dbus_handle_message (DBusConnecti
@@ -2830,6 +2877,8 @@ worker_dbus_handle_message (DBusConnecti
on_set_session_name (worker, message);
} else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "SetSessionType")) {
on_set_session_type (worker, message);
@ -98,7 +98,7 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
} else {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -2944,6 +2993,8 @@ gdm_session_worker_finalize (GObject *ob
@@ -3001,6 +3050,8 @@ gdm_session_worker_finalize (GObject *ob
g_free (worker->priv->server_address);
g_strfreev (worker->priv->arguments);
@ -107,11 +107,11 @@ Index: gdm-3.1.90/daemon/gdm-session-worker.c
G_OBJECT_CLASS (gdm_session_worker_parent_class)->finalize (object);
}
Index: gdm-3.1.90/daemon/gdm-session-direct.c
Index: gdm-3.3.92.1/daemon/gdm-session-direct.c
===================================================================
--- gdm-3.1.90.orig/daemon/gdm-session-direct.c
+++ gdm-3.1.90/daemon/gdm-session-direct.c
@@ -131,6 +131,8 @@ G_DEFINE_TYPE_WITH_CODE (GdmSessionDirec
--- gdm-3.3.92.1.orig/daemon/gdm-session-direct.c
+++ gdm-3.3.92.1/daemon/gdm-session-direct.c
@@ -135,6 +135,8 @@ G_DEFINE_TYPE_WITH_CODE (GdmSessionDirec
G_IMPLEMENT_INTERFACE (GDM_TYPE_SESSION,
gdm_session_iface_init))
@ -120,7 +120,7 @@ Index: gdm-3.1.90/daemon/gdm-session-direct.c
static gboolean
send_dbus_message (GdmSessionConversation *conversation,
DBusMessage *message)
@@ -770,10 +772,27 @@ get_default_session_name (GdmSessionDire
@@ -774,10 +776,27 @@ get_default_session_name (GdmSessionDire
static void
gdm_session_direct_defaults_changed (GdmSessionDirect *session)
{
@ -148,7 +148,7 @@ Index: gdm-3.1.90/daemon/gdm-session-direct.c
}
static void
@@ -1226,11 +1245,28 @@ gdm_session_direct_handle_saved_session_
@@ -1230,11 +1249,28 @@ gdm_session_direct_handle_saved_session_
if (strcmp (session_name,
get_default_session_name (session)) != 0) {
@ -177,7 +177,7 @@ Index: gdm-3.1.90/daemon/gdm-session-direct.c
}
out:
return DBUS_HANDLER_RESULT_HANDLED;
@@ -1425,6 +1461,9 @@ do_introspect (DBusConnection *connectio
@@ -1434,6 +1470,9 @@ do_introspect (DBusConnection *connectio
" <signal name=\"SetSessionType\">\n"
" <arg name=\"session_type\" type=\"s\"/>\n"
" </signal>\n"

View File

@ -1,11 +0,0 @@
Index: gdm-2.25.2/data/gconf.path
===================================================================
--- gdm-2.25.2.orig/data/gconf.path
+++ gdm-2.25.2/data/gconf.path
@@ -1,5 +1,5 @@
# treat system-wide settings as mandatory
-xml:readonly:/etc/gconf/gconf.xml.system
+xml:readonly:/etc/gconf/gconf.xml.defaults
# override some settings
# we treat settings in this location as

View File

@ -11,12 +11,101 @@ will give us a nice fade transition when g-s-d starts
daemon/gdm-slave.h | 1 +
3 files changed, 81 insertions(+), 0 deletions(-)
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index b9165fd..c091bdd 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -1212,6 +1212,14 @@ setup_server (GdmSimpleSlave *slave)
Index: gdm-3.3.92.1/daemon/gdm-simple-slave.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-simple-slave.c
+++ gdm-3.3.92.1/daemon/gdm-simple-slave.c
@@ -90,6 +90,7 @@ struct GdmSimpleSlavePrivate
guint start_session_when_ready : 1;
guint waiting_to_start_session : 1;
+ guint plymouth_is_running : 1;
#ifdef HAVE_LOGINDEVPERM
gboolean use_logindevperm;
#endif
@@ -97,6 +98,7 @@ struct GdmSimpleSlavePrivate
enum {
PROP_0,
+ FORCE_ACTIVE_VT
};
static void gdm_simple_slave_class_init (GdmSimpleSlaveClass *klass);
@@ -1204,6 +1206,72 @@ on_start_session_later (GdmGreeterServer
slave->priv->start_session_when_ready = FALSE;
}
+static gboolean
+plymouth_is_running (void)
+{
+ int status;
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth --ping",
+ NULL, NULL, &status, &error);
+ if (! res) {
+ g_debug ("Could not ping plymouth: %s", error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static void
+plymouth_prepare_for_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth deactivate",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not deactivate plymouth: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static void
+plymouth_quit_with_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth quit --retain-splash",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not quit plymouth: %s", error->message);
+ g_error_free (error);
+ }
+ slave->priv->plymouth_is_running = FALSE;
+}
+
+static void
+plymouth_quit_without_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth quit",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not quit plymouth: %s", error->message);
+ g_error_free (error);
+ }
+ slave->priv->plymouth_is_running = FALSE;
+}
+
static void
setup_server (GdmSimpleSlave *slave)
{
@@ -1215,6 +1283,19 @@ setup_server (GdmSimpleSlave *slave)
/* Set the initial keyboard layout to something reasonable */
gdm_slave_set_initial_keyboard_layout (GDM_SLAVE (slave));
+
@ -27,13 +116,100 @@ index b9165fd..c091bdd 100644
+ * so gnome-settings-daemon can get at it.
+ */
+ gdm_slave_save_root_windows (GDM_SLAVE (slave));
+
+ /* Plymouth is waiting for the go-ahead to exit */
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_with_transition (slave);
+ }
}
static void
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 787ef89..09df6de 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -1418,6 +1499,10 @@ on_server_exited (GdmServer *server
g_debug ("GdmSimpleSlave: server exited with code %d\n", exit_code);
gdm_slave_stopped (GDM_SLAVE (slave));
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
}
static void
@@ -1430,6 +1515,10 @@ on_server_died (GdmServer *server,
g_strsignal (signal_number));
gdm_slave_stopped (GDM_SLAVE (slave));
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
}
static gboolean
@@ -1439,12 +1528,14 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
char *auth_file;
char *seat_id;
gboolean display_is_local;
+ gboolean force_active_vt;
g_object_get (slave,
"display-is-local", &display_is_local,
"display-name", &display_name,
"display-seat-id", &seat_id,
"display-x11-authority-file", &auth_file,
+ "force-active-vt", &force_active_vt,
NULL);
/* if this is local display start a server if one doesn't
@@ -1476,7 +1567,17 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
G_CALLBACK (on_server_ready),
slave);
- res = gdm_server_start (slave->priv->server);
+ slave->priv->plymouth_is_running = plymouth_is_running ();
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_prepare_for_transition (slave);
+ res = gdm_server_start_on_active_vt (slave->priv->server);
+ } else {
+ if (force_active_vt)
+ res = gdm_server_start_on_active_vt (slave->priv->server);
+ else
+ res = gdm_server_start (slave->priv->server);
+ }
if (! res) {
g_warning (_("Could not start the X "
"server (your graphical environment) "
@@ -1486,6 +1587,9 @@ gdm_simple_slave_run (GdmSimpleSlave *sl
"In the meantime this display will be "
"disabled. Please restart GDM when "
"the problem is corrected."));
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
exit (1);
}
@@ -1642,12 +1746,14 @@ gdm_simple_slave_finalize (GObject *obje
}
GdmSlave *
-gdm_simple_slave_new (const char *id)
+gdm_simple_slave_new (const char *id,
+ gboolean force_active_vt)
{
GObject *object;
object = g_object_new (GDM_TYPE_SIMPLE_SLAVE,
"display-id", id,
+ "force-active-vt", force_active_vt,
NULL);
return GDM_SLAVE (object);
Index: gdm-3.3.92.1/daemon/gdm-slave.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-slave.c
+++ gdm-3.3.92.1/daemon/gdm-slave.c
@@ -43,6 +43,7 @@
#include <dbus/dbus-glib-lowlevel.h>
@ -42,7 +218,23 @@ index 787ef89..09df6de 100644
#include <X11/cursorfont.h> /* for watch cursor */
#include <X11/extensions/Xrandr.h>
#include <X11/Xatom.h>
@@ -483,6 +484,77 @@ gdm_slave_set_initial_cursor_position (GdmSlave *slave)
@@ -96,6 +97,7 @@ struct GdmSlavePrivate
char *display_hostname;
gboolean display_is_local;
gboolean display_is_parented;
+ gboolean force_active_vt;
char *display_seat_id;
char *display_x11_authority_file;
char *parent_display_name;
@@ -115,6 +117,7 @@ enum {
PROP_DISPLAY_NUMBER,
PROP_DISPLAY_HOSTNAME,
PROP_DISPLAY_IS_LOCAL,
+ PROP_FORCE_ACTIVE_VT,
PROP_DISPLAY_SEAT_ID,
PROP_DISPLAY_X11_AUTHORITY_FILE
};
@@ -488,6 +491,77 @@ gdm_slave_set_initial_cursor_position (G
}
}
@ -120,11 +312,60 @@ index 787ef89..09df6de 100644
void
gdm_slave_set_busy_cursor (GdmSlave *slave)
{
diff --git a/daemon/gdm-slave.h b/daemon/gdm-slave.h
index 7af20ed..aaaa8f2 100644
--- a/daemon/gdm-slave.h
+++ b/daemon/gdm-slave.h
@@ -78,6 +78,7 @@ void gdm_slave_set_initial_keyboard_layout (GdmSlave *slave);
@@ -1825,6 +1899,13 @@ _gdm_slave_set_display_is_local (GdmSlav
}
static void
+_gdm_slave_set_force_active_vt (GdmSlave *slave,
+ gboolean force_active_vt)
+{
+ slave->priv->force_active_vt = force_active_vt;
+}
+
+static void
gdm_slave_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -1856,6 +1937,9 @@ gdm_slave_set_property (GObject *ob
case PROP_DISPLAY_IS_LOCAL:
_gdm_slave_set_display_is_local (self, g_value_get_boolean (value));
break;
+ case PROP_FORCE_ACTIVE_VT:
+ _gdm_slave_set_force_active_vt (self, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1894,6 +1978,9 @@ gdm_slave_get_property (GObject *obje
case PROP_DISPLAY_IS_LOCAL:
g_value_set_boolean (value, self->priv->display_is_local);
break;
+ case PROP_FORCE_ACTIVE_VT:
+ g_value_set_boolean (value, self->priv->force_active_vt);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -2019,6 +2106,14 @@ gdm_slave_class_init (GdmSlaveClass *kla
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_FORCE_ACTIVE_VT,
+ g_param_spec_boolean ("force-active-vt",
+ "Force Active VT",
+ "Force display to active VT",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
signals [STOPPED] =
g_signal_new ("stopped",
G_TYPE_FROM_CLASS (object_class),
Index: gdm-3.3.92.1/daemon/gdm-slave.h
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-slave.h
+++ gdm-3.3.92.1/daemon/gdm-slave.h
@@ -78,6 +78,7 @@ void gdm_slave_set_initia
void gdm_slave_set_initial_cursor_position (GdmSlave *slave);
void gdm_slave_set_busy_cursor (GdmSlave *slave);
@ -132,38 +373,13 @@ index 7af20ed..aaaa8f2 100644
gboolean gdm_slave_run_script (GdmSlave *slave,
const char *dir,
const char *username);
--
1.7.6.2
From 70dae28439a2ce54441fa24b7dca4a2933f9a348 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 27 Nov 2009 18:52:54 -0500
Subject: [PATCH 2/2] Enable smooth transition between plymouth and X
This commit checks if plymouth is running, and if so,
turns on the smooth transition between plymouth and X.
---
configure.ac | 17 +++++++
daemon/Makefile.am | 1 +
daemon/gdm-display.c | 30 +++++++++++-
daemon/gdm-server.c | 56 +++++++++++++++++++++++
daemon/gdm-server.h | 1 +
daemon/gdm-simple-slave.c | 102 ++++++++++++++++++++++++++++++++++++++++++-
daemon/gdm-simple-slave.h | 3 +-
daemon/gdm-slave.c | 23 ++++++++++
daemon/gdm-static-display.c | 17 +++++++
daemon/simple-slave-main.c | 4 +-
data/Makefile.am | 8 +++
11 files changed, 255 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 10f6d60..bae6186 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1311,6 +1311,23 @@ GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR=${datadir}/gdm/simple-greeter/extensions
Index: gdm-3.3.92.1/configure.ac
===================================================================
--- gdm-3.3.92.1.orig/configure.ac
+++ gdm-3.3.92.1/configure.ac
@@ -1332,6 +1332,23 @@ GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR=$
AC_SUBST(GDM_SIMPLE_GREETER_EXTENSIONS_DATA_DIR)
dnl ---------------------------------------------------------------------------
+dnl - Directory to spool events from other processes
+dnl ---------------------------------------------------------------------------
@ -184,33 +400,33 @@ index 10f6d60..bae6186 100644
+dnl ---------------------------------------------------------------------------
dnl - Finish
dnl ---------------------------------------------------------------------------
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 65e82b8..9ec0f4a 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
Index: gdm-3.3.92.1/daemon/Makefile.am
===================================================================
--- gdm-3.3.92.1.orig/daemon/Makefile.am
+++ gdm-3.3.92.1/daemon/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
-DLOGDIR=\"$(logdir)\" \
-DSBINDIR=\"$(sbindir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DLOGDIR=\"$(logdir)\" \
-DSBINDIR=\"$(sbindir)\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
+ -DGDM_SPOOL_DIR=\"$(GDM_SPOOL_DIR)\" \
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
-DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 6ee675a..83ae445 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
-DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
Index: gdm-3.3.92.1/daemon/gdm-display.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-display.c
+++ gdm-3.3.92.1/daemon/gdm-display.c
@@ -65,7 +65,9 @@ struct GdmDisplayPrivate
gsize x11_cookie_size;
GdmDisplayAccessFile *access_file;
- gboolean is_local;
+ guint is_local : 1;
+ guint force_active_vt : 1;
+
guint finish_idle_id;
GdmSlaveProxy *slave_proxy;
@@ -84,6 +86,7 @@ enum {
PROP_X11_COOKIE,
@ -219,11 +435,11 @@ index 6ee675a..83ae445 100644
+ PROP_FORCE_ACTIVE_VT,
PROP_SLAVE_COMMAND,
};
@@ -574,9 +577,10 @@ gdm_display_real_prepare (GdmDisplay *display)
@@ -584,9 +587,10 @@ gdm_display_real_prepare (GdmDisplay *di
gdm_slave_proxy_set_log_path (display->priv->slave_proxy, log_path);
g_free (log_path);
- command = g_strdup_printf ("%s --display-id %s",
+ command = g_strdup_printf ("%s --display-id %s %s",
display->priv->slave_command,
@ -232,10 +448,10 @@ index 6ee675a..83ae445 100644
+ display->priv->force_active_vt? "--force-active-vt" : "");
gdm_slave_proxy_set_command (display->priv->slave_proxy, command);
g_free (command);
@@ -824,6 +828,13 @@ _gdm_display_set_is_local (GdmDisplay *display,
@@ -834,6 +838,13 @@ _gdm_display_set_is_local (GdmDisplay
}
static void
+_gdm_display_set_force_active_vt (GdmDisplay *display,
+ gboolean force_active_vt)
@ -247,7 +463,7 @@ index 6ee675a..83ae445 100644
_gdm_display_set_slave_command (GdmDisplay *display,
const char *command)
{
@@ -866,6 +877,9 @@ gdm_display_set_property (GObject *object,
@@ -876,6 +887,9 @@ gdm_display_set_property (GObject
case PROP_IS_LOCAL:
_gdm_display_set_is_local (self, g_value_get_boolean (value));
break;
@ -257,7 +473,7 @@ index 6ee675a..83ae445 100644
case PROP_SLAVE_COMMAND:
_gdm_display_set_slave_command (self, g_value_get_string (value));
break;
@@ -914,6 +928,9 @@ gdm_display_get_property (GObject *object,
@@ -924,6 +938,9 @@ gdm_display_get_property (GObject
case PROP_IS_LOCAL:
g_value_set_boolean (value, self->priv->is_local);
break;
@ -267,7 +483,7 @@ index 6ee675a..83ae445 100644
case PROP_SLAVE_COMMAND:
g_value_set_string (value, self->priv->slave_command);
break;
@@ -1084,6 +1101,13 @@ gdm_display_class_init (GdmDisplayClass *klass)
@@ -1094,6 +1111,13 @@ gdm_display_class_init (GdmDisplayClass
NULL,
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
@ -278,13 +494,13 @@ index 6ee675a..83ae445 100644
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_SLAVE_COMMAND,
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 62ffca1..8d270bb 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
Index: gdm-3.3.92.1/daemon/gdm-server.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-server.c
+++ gdm-3.3.92.1/daemon/gdm-server.c
@@ -32,8 +32,11 @@
#include <pwd.h>
#include <grp.h>
@ -297,7 +513,7 @@ index 62ffca1..8d270bb 100644
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
#endif
@@ -673,6 +676,44 @@ gdm_server_spawn (GdmServer *server,
@@ -751,6 +754,44 @@ gdm_server_spawn (GdmServer *server,
return ret;
}
@ -342,10 +558,11 @@ index 62ffca1..8d270bb 100644
/**
* gdm_server_start:
* @disp: Pointer to a GdmDisplay structure
@@ -691,6 +732,21 @@ gdm_server_start (GdmServer *server)
@@ -768,6 +809,21 @@ gdm_server_start (GdmServer *server)
return res;
}
+
+gboolean
+gdm_server_start_on_active_vt (GdmServer *server)
+{
@ -360,212 +577,25 @@ index 62ffca1..8d270bb 100644
+
+ return res;
+}
+
static void
server_died (GdmServer *server)
{
diff --git a/daemon/gdm-server.h b/daemon/gdm-server.h
index 535a69a..bd6c60a 100644
--- a/daemon/gdm-server.h
+++ b/daemon/gdm-server.h
@@ -56,6 +56,7 @@ GType gdm_server_get_type (void);
GdmServer * gdm_server_new (const char *display_id,
Index: gdm-3.3.92.1/daemon/gdm-server.h
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-server.h
+++ gdm-3.3.92.1/daemon/gdm-server.h
@@ -57,6 +57,7 @@ GdmServer * gdm_server_new
const char *seat_id,
const char *auth_file);
gboolean gdm_server_start (GdmServer *server);
+gboolean gdm_server_start_on_active_vt (GdmServer *server);
gboolean gdm_server_stop (GdmServer *server);
char * gdm_server_get_display_device (GdmServer *server);
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index c091bdd..f8dd56f 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -90,6 +90,7 @@ struct GdmSimpleSlavePrivate
guint start_session_when_ready : 1;
guint waiting_to_start_session : 1;
+ guint plymouth_is_running : 1;
#ifdef HAVE_LOGINDEVPERM
gboolean use_logindevperm;
#endif
@@ -97,6 +98,7 @@ struct GdmSimpleSlavePrivate
enum {
PROP_0,
+ FORCE_ACTIVE_VT
};
static void gdm_simple_slave_class_init (GdmSimpleSlaveClass *klass);
@@ -1201,6 +1203,72 @@ on_start_session_later (GdmGreeterServer *session,
slave->priv->start_session_when_ready = FALSE;
}
+static gboolean
+plymouth_is_running (void)
+{
+ int status;
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth --ping",
+ NULL, NULL, &status, &error);
+ if (! res) {
+ g_debug ("Could not ping plymouth: %s", error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+
+ return WIFEXITED (status) && WEXITSTATUS (status) == 0;
+}
+
+static void
+plymouth_prepare_for_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth deactivate",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not deactivate plymouth: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static void
+plymouth_quit_with_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth quit --retain-splash",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not quit plymouth: %s", error->message);
+ g_error_free (error);
+ }
+ slave->priv->plymouth_is_running = FALSE;
+}
+
+static void
+plymouth_quit_without_transition (GdmSimpleSlave *slave)
+{
+ gboolean res;
+ GError *error;
+
+ error = NULL;
+ res = g_spawn_command_line_sync ("/bin/plymouth quit",
+ NULL, NULL, NULL, &error);
+ if (! res) {
+ g_warning ("Could not quit plymouth: %s", error->message);
+ g_error_free (error);
+ }
+ slave->priv->plymouth_is_running = FALSE;
+}
+
static void
setup_server (GdmSimpleSlave *slave)
{
@@ -1220,6 +1288,11 @@ setup_server (GdmSimpleSlave *slave)
* so gnome-settings-daemon can get at it.
*/
gdm_slave_save_root_windows (GDM_SLAVE (slave));
+
+ /* Plymouth is waiting for the go-ahead to exit */
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_with_transition (slave);
+ }
}
static void
@@ -1423,6 +1496,10 @@ on_server_exited (GdmServer *server,
g_debug ("GdmSimpleSlave: server exited with code %d\n", exit_code);
gdm_slave_stopped (GDM_SLAVE (slave));
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
}
static void
@@ -1435,6 +1512,10 @@ on_server_died (GdmServer *server,
g_strsignal (signal_number));
gdm_slave_stopped (GDM_SLAVE (slave));
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
}
static gboolean
@@ -1443,11 +1524,13 @@ gdm_simple_slave_run (GdmSimpleSlave *slave)
char *display_name;
char *auth_file;
gboolean display_is_local;
+ gboolean force_active_vt;
g_object_get (slave,
"display-is-local", &display_is_local,
"display-name", &display_name,
"display-x11-authority-file", &auth_file,
+ "force-active-vt", &force_active_vt,
NULL);
/* if this is local display start a server if one doesn't
@@ -1479,7 +1562,17 @@ gdm_simple_slave_run (GdmSimpleSlave *slave)
G_CALLBACK (on_server_ready),
slave);
- res = gdm_server_start (slave->priv->server);
+ slave->priv->plymouth_is_running = plymouth_is_running ();
+
+ if (slave->priv->plymouth_is_running) {
+ plymouth_prepare_for_transition (slave);
+ res = gdm_server_start_on_active_vt (slave->priv->server);
+ } else {
+ if (force_active_vt)
+ res = gdm_server_start_on_active_vt (slave->priv->server);
+ else
+ res = gdm_server_start (slave->priv->server);
+ }
if (! res) {
g_warning (_("Could not start the X "
"server (your graphical environment) "
@@ -1489,6 +1582,9 @@ gdm_simple_slave_run (GdmSimpleSlave *slave)
"In the meantime this display will be "
"disabled. Please restart GDM when "
"the problem is corrected."));
+ if (slave->priv->plymouth_is_running) {
+ plymouth_quit_without_transition (slave);
+ }
exit (1);
}
@@ -1645,12 +1741,14 @@ gdm_simple_slave_finalize (GObject *object)
}
GdmSlave *
-gdm_simple_slave_new (const char *id)
+gdm_simple_slave_new (const char *id,
+ gboolean force_active_vt)
{
GObject *object;
object = g_object_new (GDM_TYPE_SIMPLE_SLAVE,
"display-id", id,
+ "force-active-vt", force_active_vt,
NULL);
return GDM_SLAVE (object);
diff --git a/daemon/gdm-simple-slave.h b/daemon/gdm-simple-slave.h
index 1f1aa1d..e9aa624 100644
--- a/daemon/gdm-simple-slave.h
+++ b/daemon/gdm-simple-slave.h
Index: gdm-3.3.92.1/daemon/gdm-simple-slave.h
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-simple-slave.h
+++ gdm-3.3.92.1/daemon/gdm-simple-slave.h
@@ -48,7 +48,8 @@ typedef struct
} GdmSimpleSlaveClass;
@ -576,80 +606,11 @@ index 1f1aa1d..e9aa624 100644
G_END_DECLS
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 09df6de..ce467b2 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -92,6 +92,7 @@ struct GdmSlavePrivate
char *display_hostname;
gboolean display_is_local;
gboolean display_is_parented;
+ gboolean force_active_vt;
char *display_seat_id;
char *display_x11_authority_file;
char *parent_display_name;
@@ -111,6 +112,7 @@ enum {
PROP_DISPLAY_NUMBER,
PROP_DISPLAY_HOSTNAME,
PROP_DISPLAY_IS_LOCAL,
+ PROP_FORCE_ACTIVE_VT,
PROP_DISPLAY_SEAT_ID,
PROP_DISPLAY_X11_AUTHORITY_FILE
};
@@ -1651,6 +1653,13 @@ _gdm_slave_set_display_is_local (GdmSlave *slave,
}
static void
+_gdm_slave_set_force_active_vt (GdmSlave *slave,
+ gboolean force_active_vt)
+{
+ slave->priv->force_active_vt = force_active_vt;
+}
+
+static void
gdm_slave_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -1682,6 +1691,9 @@ gdm_slave_set_property (GObject *object,
case PROP_DISPLAY_IS_LOCAL:
_gdm_slave_set_display_is_local (self, g_value_get_boolean (value));
break;
+ case PROP_FORCE_ACTIVE_VT:
+ _gdm_slave_set_force_active_vt (self, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1720,6 +1732,9 @@ gdm_slave_get_property (GObject *object,
case PROP_DISPLAY_IS_LOCAL:
g_value_set_boolean (value, self->priv->display_is_local);
break;
+ case PROP_FORCE_ACTIVE_VT:
+ g_value_set_boolean (value, self->priv->force_active_vt);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1845,6 +1860,14 @@ gdm_slave_class_init (GdmSlaveClass *klass)
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_FORCE_ACTIVE_VT,
+ g_param_spec_boolean ("force-active-vt",
+ "Force Active VT",
+ "Force display to active VT",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
signals [STOPPED] =
g_signal_new ("stopped",
G_TYPE_FROM_CLASS (object_class),
diff --git a/daemon/gdm-static-display.c b/daemon/gdm-static-display.c
index 16953f9..397f07e 100644
--- a/daemon/gdm-static-display.c
+++ b/daemon/gdm-static-display.c
@@ -81,10 +81,27 @@ gdm_static_display_remove_user_authorization (GdmDisplay *display,
Index: gdm-3.3.92.1/daemon/gdm-static-display.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/gdm-static-display.c
+++ gdm-3.3.92.1/daemon/gdm-static-display.c
@@ -81,10 +81,27 @@ gdm_static_display_remove_user_authoriza
}
static gboolean
@ -677,10 +638,10 @@ index 16953f9..397f07e 100644
GDM_DISPLAY_CLASS (gdm_static_display_parent_class)->manage (display);
return TRUE;
diff --git a/daemon/simple-slave-main.c b/daemon/simple-slave-main.c
index 057492b..afa60a4 100644
--- a/daemon/simple-slave-main.c
+++ b/daemon/simple-slave-main.c
Index: gdm-3.3.92.1/daemon/simple-slave-main.c
===================================================================
--- gdm-3.3.92.1.orig/daemon/simple-slave-main.c
+++ gdm-3.3.92.1/daemon/simple-slave-main.c
@@ -177,9 +177,11 @@ main (int argc,
DBusGConnection *connection;
GdmSlave *slave;
@ -702,10 +663,10 @@ index 057492b..afa60a4 100644
if (slave == NULL) {
goto out;
}
diff --git a/data/Makefile.am b/data/Makefile.am
index 3175436..5c11b03 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
Index: gdm-3.3.92.1/data/Makefile.am
===================================================================
--- gdm-3.3.92.1.orig/data/Makefile.am
+++ gdm-3.3.92.1/data/Makefile.am
@@ -12,6 +12,7 @@ predir = $(gdmconfdir)/PreSession
postlogindir = $(gdmconfdir)/PostLogin
workingdir = $(GDM_WORKING_DIR)
@ -714,16 +675,17 @@ index 3175436..5c11b03 100644
screenshotdir = $(GDM_SCREENSHOT_DIR)
cachedir = $(localstatedir)/cache/gdm
@@ -159,6 +160,7 @@ uninstall-hook:
$(DESTDIR)$(workingdir)/.config/dconf \
@@ -162,7 +163,8 @@ uninstall-hook:
$(DESTDIR)$(sysconfdir)/dconf/db/gdm.d \
$(DESTDIR)$(workingdir)/.config/dconf \
$(DESTDIR)$(screenshotdir) \
- $(DESTDIR)$(xauthdir)
+ $(DESTDIR)$(xauthdir) \
+ $(DESTDIR)$(spooldir)
-rmdir \
$(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks \
@@ -303,6 +305,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
-rmdir \
$(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks \
@@ -307,6 +309,13 @@ install-data-hook: gdm.conf-custom Xsess
chown root:gdm $(DESTDIR)$(cachedir) || : ; \
fi
@ -733,9 +695,7 @@ index 3175436..5c11b03 100644
+ chown root:gdm $(DESTDIR)$(spooldir) || : ; \
+ fi
+
$(INSTALL_DATA) $(srcdir)/gconf.path $(DESTDIR)$(workingdir)/.gconf.path
gconftool-2 --direct --config-source=xml:merged:$(DESTDIR)$(workingdir)/.gconf.mandatory --recursive-unset /
gconftool-2 --direct --config-source=xml:merged:$(DESTDIR)$(workingdir)/.gconf.mandatory --load $(srcdir)/session-setup.entries
--
1.7.6.2
+
$(INSTALL_DATA) $(srcdir)/dconf-profile $(DESTDIR)$(sysconfdir)/dconf/profile/gdm
$(INSTALL_DATA) $(srcdir)/00-upstream-settings $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d
$(INSTALL_DATA) $(srcdir)/00-upstream-settings-locks $(DESTDIR)$(sysconfdir)/dconf/db/gdm.d/locks

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Tue Mar 20 20:41:28 UTC 2012 - dimstar@opensuse.org
- Update to version 3.3.92.1:
+ ConsoleKit fixes.
- Changes from version 3.3.92:
+ Only start Xorg with high verbosity when debug is enabled.
+ Land support for systemd and multi-seat.
+ Switch from GConf to GSettings.
+ Auth fixes.
+ Miscellaneous fixes.
+ Updated translations.
- Drop gdm-gconf-path.patch: code converted to gsettings.
- Rebase patches: gdm-desktop-session-env-pam.patch and
gdm-plymouth.patch.
- Temporary disable gdm-greeter-greater-ui.patch: needs rebase.
- Drop gconf2-devel BuildRequires: ported to gsettings.
- Prepare for the switch to systemd:
+ Pass --with-systemd to configure
+ Add pkgconfig(libsystemd-login) and
pkgconfig(libsystemd-daemon) BuildRequires.
-------------------------------------------------------------------
Mon Feb 20 12:54:17 UTC 2012 - vuntz@opensuse.org

View File

@ -18,15 +18,16 @@
# FIXME: need to check what should be done to enable this (at least adapt the pam files). See bnc#699999
%define enable_split_authentication 0
%define with_systemd 1
Name: gdm
Version: 3.2.1.1
Version: 3.3.92.1
Release: 0
Summary: The GNOME Display Manager
License: GPL-2.0+
Group: System/GUI/GNOME
Url: http://projects.gnome.org/gdm/
Source: http://download.gnome.org/sources/gdm/3.2/%{name}-%{version}.tar.xz
Source: http://download.gnome.org/sources/gdm/3.3/%{name}-%{version}.tar.xz
Source1: gdm.pamd
Source2: gdm-autologin.pamd
Source3: gdm-welcome.pamd
@ -53,12 +54,10 @@ Patch8: gdm-sysconfig-settings.patch
Patch9: gdm-passwordless-login.patch
# PATCH-NEEDS-REBASE gdm-domain-logon.patch hpj@novell.com -- Add UI to log in a specific domain (was: PATCH_FEATURE-SLED bnc#627575)
Patch10: gdm-domain-logon.patch
# PATCH-FIX-UPSTREAM gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch)
# PATCH-NEEDS-REBASE gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch) (WAS: PATCH-FIX-UPSTREAM)
Patch15: gdm-greeter-greater-ui.patch
# PATCH-FIX-UPSTREAM gdm-always-reflect-keyboard-layout.patch bnc438159 bgo561771 hpj@novell.com -- Make keyboard selector not neglect to apply the selected keyboard in some situations.
Patch18: gdm-always-reflect-keyboard-layout.patch
# PATCH-FIX-OPENSUSE gdm-gconf-path.patch vuntz@novell.com -- Fix gconf paths to be consistent with the ones used in openSUSE
Patch31: gdm-gconf-path.patch
# PATCH-FIX-OPENSUSE gdm-default-wm.patch vuntz@novell.com -- Use sysconfig to know to which desktop to use by default
Patch34: gdm-default-wm.patch
# PATCH-FIX-OPENSUSE gdm-xauthlocalhostname.patch bgo555464 vuntz@novell.com -- Set XAUTHLOCALHOSTNAME to localhost for local logins to avoid issues in the session in case the hostname changes
@ -71,7 +70,6 @@ BuildRequires: check-devel
BuildRequires: dbus-1-glib-devel
# needed for directory ownership
BuildRequires: dconf
BuildRequires: gconf2-devel
BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-patch-translation
# needed for directory ownership
@ -85,9 +83,9 @@ BuildRequires: libXinerama-devel
BuildRequires: libattr-devel
BuildRequires: libcanberra-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
BuildRequires: libupower-glib-devel
BuildRequires: libxklavier-devel
BuildRequires: libtool
BuildRequires: pam-devel
BuildRequires: pwdutils
BuildRequires: tcpd-devel
@ -98,6 +96,8 @@ BuildRequires: xorg-x11-server-extra
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires: xz
BuildRequires: pkgconfig(accountsservice)
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(libsystemd-login)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
@ -133,7 +133,6 @@ Provides: gnome-applets-gdm = %{version}
Obsoletes: gnome-applets-gdm < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
DocDir: %{_defaultdocdir}
%gconf_schemas_prereq
%description
The GNOME Display Manager is a system service that is responsible for
@ -240,9 +239,8 @@ gnome-patch-translation-prepare
%patch9 -p1
#%%patch10 -p1
# needs rebase (bnc#689552)
%patch15 -p1
#patch15 -p1
%patch18 -p1
%patch31 -p1
%patch34 -p1
%patch35 -p0
%patch40 -p1
@ -261,6 +259,7 @@ autoreconf -f -i
--with-check-accelerated-directory=%{_libexecdir} \
--with-selinux \
--enable-ipv6 \
--with-systemd \
%if %{enable_split_authentication}
--enable-split-authentication \
%else
@ -275,7 +274,6 @@ autoreconf -f -i
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_gconf_schemas
%if ! %{enable_split_authentication}
# Create extensions directory if it's not there yet, so we can package it
test ! -d %{buildroot}%{_libdir}/gdm/simple-greeter/extensions
@ -318,7 +316,7 @@ ln -s ../sbin/gdm $RPM_BUILD_ROOT%{_bindir}/gdm
%clean
rm -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%pre
/usr/sbin/groupadd -r gdm 2> /dev/null || :
/usr/sbin/useradd -r -o -g gdm -G video -s /bin/false \
-c "Gnome Display Manager daemon" -d /var/lib/gdm gdm 2> /dev/null || :
@ -350,9 +348,7 @@ fi
%glib2_gsettings_schema_post
%icon_theme_cache_post
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%posttrans
# Create dconf database for gdm, to lockdown the gdm session
dconf update
@ -369,7 +365,7 @@ dconf update
%postun -n libgdmsimplegreeter1 -p /sbin/ldconfig
%files -f %{name}.schemas_list
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%dir %{_datadir}/gnome/
@ -396,9 +392,6 @@ dconf update
%attr(750,gdm,gdm) %dir %{_localstatedir}/lib/gdm
%ghost %attr(751,gdm,gdm) %dir %{_localstatedir}/run/gdm
%attr(750,gdm,gdm) %dir %{_localstatedir}/log/gdm
%attr(750,gdm,gdm) %dir %{_localstatedir}/lib/gdm/.gconf.mandatory
%attr(640,gdm,gdm) %{_localstatedir}/lib/gdm/.gconf.mandatory/%gconf-tree.xml
%attr(640,gdm,gdm) %{_localstatedir}/lib/gdm/.gconf.path
%dir %{_localstatedir}/cache/gdm
%config /etc/pam.d/gdm
%config /etc/pam.d/gdm-autologin