diff --git a/gnome-session.spec b/gnome-session.spec index f321e82..b28238d 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -81,8 +81,7 @@ Desktop file to add GNOME to display manager session menu. %setup -q %patch0 -p1 -b .polkit1 -#workaround broken perl-XML-Parser on 64bit arches -export PERL5LIB=/usr/lib64/perl5/vendor_perl/5.8.2 perl +echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am autoreconf -i -f @@ -157,11 +156,11 @@ fi %doc %{_mandir}/man*/* %{_datadir}/applications/gnome-session-properties.desktop %dir %{_datadir}/gnome-session -%{_datadir}/gnome-session/session-properties.glade -%{_datadir}/gnome-session/gsm-inhibit-dialog.glade %{_datadir}/gnome/autostart %{_bindir}/* %{_sysconfdir}/gconf/schemas/*.schemas +%{_datadir}/gnome-session/gsm-inhibit-dialog.ui +%{_datadir}/gnome-session/session-properties.ui %{_datadir}/icons/hicolor/*/apps/session-properties.png %{_datadir}/icons/hicolor/scalable/apps/session-properties.svg %dir %{_libdir}/gnome-session diff --git a/polkit1.patch b/polkit1.patch index c24665c..0eec491 100644 --- a/polkit1.patch +++ b/polkit1.patch @@ -1,7 +1,7 @@ -diff -up gnome-session-2.26.1/configure.in.polkit1 gnome-session-2.26.1/configure.in ---- gnome-session-2.26.1/configure.in.polkit1 2009-04-14 11:31:47.000000000 -0400 -+++ gnome-session-2.26.1/configure.in 2009-06-12 19:51:49.223577026 -0400 -@@ -31,7 +31,7 @@ AC_ARG_WITH(at-spi-registryd-directory, +diff -up gnome-session-2.27.4/configure.in.polkit1 gnome-session-2.27.4/configure.in +--- gnome-session-2.27.4/configure.in.polkit1 2009-07-15 10:53:06.000000000 -0400 ++++ gnome-session-2.27.4/configure.in 2009-07-15 19:52:55.779086207 -0400 +@@ -32,7 +32,7 @@ AC_ARG_WITH(at-spi-registryd-directory, AT_SPI_REGISTRYD_DIR=$with_at_spi_registryd_directory AC_SUBST(AT_SPI_REGISTRYD_DIR) @@ -10,15 +10,15 @@ diff -up gnome-session-2.26.1/configure.in.polkit1 gnome-session-2.26.1/configur AC_ARG_ENABLE(deprecations, [AC_HELP_STRING([--enable-deprecations], -@@ -48,7 +48,6 @@ LIBGNOMEUI_REQUIRED=2.2.0 - GTK_REQUIRED=2.11.1 - GLADE_REQUIRED=2.3.6 +@@ -48,7 +48,6 @@ GLIB_REQUIRED=2.16.0 + LIBGNOMEUI_REQUIRED=2.2.0 + GTK_REQUIRED=2.12.0 DBUS_GLIB_REQUIRED=0.76 -POLKIT_GNOME_REQUIRED=0.7 dnl ==================================================================== dnl Dependency Checks -@@ -88,21 +87,6 @@ PKG_CHECK_MODULES(GCONF, gconf-2.0) +@@ -86,21 +85,6 @@ PKG_CHECK_MODULES(GCONF, gconf-2.0) PKG_CHECK_MODULES(EGG_SMCLIENT, gtk+-2.0) @@ -40,9 +40,9 @@ diff -up gnome-session-2.26.1/configure.in.polkit1 gnome-session-2.26.1/configur dnl ==================================================================== dnl GConf Checks -diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-session-2.26.1/gnome-session/gsm-consolekit.c ---- gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 2009-04-14 11:31:45.000000000 -0400 -+++ gnome-session-2.26.1/gnome-session/gsm-consolekit.c 2009-06-12 19:57:53.643580353 -0400 +diff -up gnome-session-2.27.4/gnome-session/gsm-consolekit.c.polkit1 gnome-session-2.27.4/gnome-session/gsm-consolekit.c +--- gnome-session-2.27.4/gnome-session/gsm-consolekit.c.polkit1 2009-07-01 08:45:30.000000000 -0400 ++++ gnome-session-2.27.4/gnome-session/gsm-consolekit.c 2009-07-15 19:57:50.969319136 -0400 @@ -31,10 +31,6 @@ #include #include @@ -54,75 +54,7 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi #include "gsm-marshal.h" #include "gsm-consolekit.h" -@@ -321,64 +317,18 @@ gsm_consolekit_new (void) - return manager; - } - --static gboolean --try_system_stop (DBusGConnection *connection, -- GError **error) --{ -- DBusGProxy *proxy; -- gboolean res; -- -- proxy = dbus_g_proxy_new_for_name (connection, -- CK_NAME, -- CK_MANAGER_PATH, -- CK_MANAGER_INTERFACE); -- -- res = dbus_g_proxy_call_with_timeout (proxy, -- "Stop", -- INT_MAX, -- error, -- /* parameters: */ -- G_TYPE_INVALID, -- /* return values: */ -- G_TYPE_INVALID); -- return res; --} -- --static gboolean --try_system_restart (DBusGConnection *connection, -- GError **error) --{ -- DBusGProxy *proxy; -- gboolean res; -- -- proxy = dbus_g_proxy_new_for_name (connection, -- CK_NAME, -- CK_MANAGER_PATH, -- CK_MANAGER_INTERFACE); -- -- res = dbus_g_proxy_call_with_timeout (proxy, -- "Restart", -- INT_MAX, -- error, -- /* parameters: */ -- G_TYPE_INVALID, -- /* return values: */ -- G_TYPE_INVALID); -- return res; --} -- - static void - emit_restart_complete (GsmConsolekit *manager, -- const char *error_message) -+ GError *error) - { - GError *call_error; - - call_error = NULL; - -- if (error_message != NULL) { -+ if (error != NULL) { - call_error = g_error_new_literal (GSM_CONSOLEKIT_ERROR, - GSM_CONSOLEKIT_ERROR_RESTARTING, -- error_message); -+ error->message); - } - - g_signal_emit (G_OBJECT (manager), -@@ -413,178 +363,6 @@ emit_stop_complete (GsmConsolekit *manag +@@ -413,177 +409,6 @@ emit_stop_complete (GsmConsolekit *manag } } @@ -138,7 +70,7 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - - if (!gained_privilege) { - if (error != NULL) { -- emit_restart_complete (manager, error->message); +- emit_restart_complete (manager, error); - } - - return; @@ -150,10 +82,10 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - - if (!res) { - g_warning ("Unable to restart system: %s", local_error->message); -- emit_restart_complete (manager, local_error->message); +- emit_restart_complete (manager, local_error); - g_error_free (local_error); -- -- return; +- } else { +- emit_restart_complete (manager, NULL); - } -} - @@ -182,8 +114,8 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - g_warning ("Unable to stop system: %s", local_error->message); - emit_stop_complete (manager, local_error); - g_error_free (local_error); -- -- return; +- } else { +- emit_stop_complete (manager, NULL); - } -} - @@ -224,7 +156,6 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi -#ifdef HAVE_POLKIT_GNOME - PolKitAction *action; - pid_t pid; -- char *error_message = NULL; - gboolean res = FALSE; - guint xid; - GError *local_error; @@ -244,14 +175,14 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - - polkit_action_unref (action); - -- if (local_error != NULL) { -- error_message = g_strdup (local_error->message); -- g_error_free (local_error); -- } -- - if (!res) { -- emit_restart_complete (manager, error_message); -- g_free (error_message); +- if (local_error != NULL) { +- g_warning ("Unable to obtain auth to restart system: %s", +- local_error->message); +- +- emit_restart_complete (manager, local_error); +- g_error_free (local_error); +- } - } -#else - g_assert_not_reached (); @@ -301,7 +232,7 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi void gsm_consolekit_attempt_restart (GsmConsolekit *manager) { -@@ -600,15 +378,16 @@ gsm_consolekit_attempt_restart (GsmConso +@@ -600,16 +425,16 @@ gsm_consolekit_attempt_restart (GsmConso return; } @@ -317,15 +248,16 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) { - request_restart_priv (manager, error); - } else { -- emit_restart_complete (manager, error->message); +- g_warning ("Unable to restart system: %s", error->message); +- emit_restart_complete (manager, error); - } - + g_warning ("Unable to restart system: %s", error->message); + emit_restart_complete (manager, error); g_error_free (error); - } - } -@@ -628,16 +407,16 @@ gsm_consolekit_attempt_stop (GsmConsolek + } else { + emit_restart_complete (manager, NULL); +@@ -632,16 +457,16 @@ gsm_consolekit_attempt_stop (GsmConsolek return; } @@ -338,18 +270,19 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi + G_TYPE_INVALID); if (!res) { - g_warning ("Unable to stop system: %s", error->message); - if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) { - request_stop_priv (manager, error); - } else { +- g_warning ("Unable to stop system: %s", error->message); - emit_stop_complete (manager, error); - } - ++ g_warning ("Unable to stop system: %s", error->message); + emit_stop_complete (manager, error); g_error_free (error); - } - } -@@ -901,347 +680,78 @@ gsm_consolekit_can_switch_user (GsmConso + } else { + emit_stop_complete (manager, NULL); +@@ -907,347 +732,78 @@ gsm_consolekit_can_switch_user (GsmConso return ret; } @@ -572,10 +505,10 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi - - g_ptr_array_foreach (array, (GFunc) g_free, NULL); - g_ptr_array_free (array, TRUE); - +- - return single; -} -- + -static void -obtain_privileges_cb (PolKitAction *action, - gboolean gained_privilege, @@ -740,10 +673,10 @@ diff -up gnome-session-2.26.1/gnome-session/gsm-consolekit.c.polkit1 gnome-sessi } gchar * -diff -up gnome-session-2.26.1/gnome-session/Makefile.am.polkit1 gnome-session-2.26.1/gnome-session/Makefile.am ---- gnome-session-2.26.1/gnome-session/Makefile.am.polkit1 2009-04-14 11:31:45.000000000 -0400 -+++ gnome-session-2.26.1/gnome-session/Makefile.am 2009-06-12 19:51:49.228578549 -0400 -@@ -16,7 +16,6 @@ INCLUDES = \ +diff -up gnome-session-2.27.4/gnome-session/Makefile.am.polkit1 gnome-session-2.27.4/gnome-session/Makefile.am +--- gnome-session-2.27.4/gnome-session/Makefile.am.polkit1 2009-07-01 08:45:30.000000000 -0400 ++++ gnome-session-2.27.4/gnome-session/Makefile.am 2009-07-15 19:53:08.955071147 -0400 +@@ -17,7 +17,6 @@ INCLUDES = \ $(ICE_CFLAGS) \ $(GNOME_SESSION_CFLAGS) \ $(GCONF_CFLAGS) \ @@ -751,11 +684,11 @@ diff -up gnome-session-2.26.1/gnome-session/Makefile.am.polkit1 gnome-session-2. -I$(top_srcdir)/egg \ -DLOCALE_DIR=\""$(datadir)/locale"\" \ -DDATA_DIR=\""$(datadir)/gnome-session"\" \ -@@ -49,7 +48,6 @@ gnome_session_LDADD = \ +@@ -50,7 +49,6 @@ gnome_session_LDADD = \ $(ICE_LIBS) \ $(GNOME_SESSION_LIBS) \ $(GCONF_LIBS) \ - $(POLKIT_GNOME_LIBS) \ $(XRENDER_LIBS) \ $(XTEST_LIBS) \ - $(NULL) + $(EXECINFO_LIBS) \