- Update to 2.27.4

This commit is contained in:
Ray Strode 2009-07-20 17:20:51 +00:00
parent 2be0a006d1
commit e044c109ac
6 changed files with 637 additions and 970 deletions

View File

@ -1,22 +0,0 @@
commit 74cdbc6d71120f2d9c91965ead989f68cadb4bac
Author: Ray Strode <rstrode@redhat.com>
Date: Wed Jun 3 23:52:06 2009 -0400
Fix language name parsing regex
It didn't properly escape the "." character so it was allowing
any character to be matched instead of just periods.
diff --git a/gui/simple-greeter/gdm-languages.c b/gui/simple-greeter/gdm-languages.c
index 2d862b2..429ba28 100644
--- a/gui/simple-greeter/gdm-languages.c
+++ b/gui/simple-greeter/gdm-languages.c
@@ -123,7 +123,7 @@ gdm_parse_language_name (const char *name,
error = NULL;
re = g_regex_new ("^(?P<language>[^_.@[:space:]]+)"
"(_(?P<territory>[[:upper:]]+))?"
- "(.(?P<codeset>[-_0-9a-zA-Z]+))?"
+ "(\\.(?P<codeset>[-_0-9a-zA-Z]+))?"
"(@(?P<modifier>[[:ascii:]]+))?$",
0, 0, &error);
if (re == NULL) {

File diff suppressed because it is too large Load Diff

View File

@ -60,8 +60,8 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
+ "input.xkb.layout",
+ NULL);
+ }
+ result = g_strdup (layout);
+ libhal_free_string (layout);
+ result = g_strdup (layout);
+ libhal_free_string (layout);
+ }
+
+ libhal_free_string_array (devices);
@ -82,7 +82,7 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
{
- if (session->priv->saved_layout != NULL) {
- return session->priv->saved_layout;
+ if (!session->priv->saved_layout) {
+ if (session->priv->saved_layout == NULL) {
+ session->priv->saved_layout = get_system_default_layout (session);
}
@ -91,20 +91,6 @@ diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemo
}
static char *
@@ -1971,9 +2025,10 @@ setup_session_environment (GdmSessionDir
"GDM_LANG",
get_language_name (session));
- gdm_session_direct_set_environment_variable (session,
- "GDM_KEYBOARD_LAYOUT",
- get_layout_name (session));
+ if (g_strcmp0 (get_layout_name (session), get_system_default_layout (session)) != 0)
+ gdm_session_direct_set_environment_variable (session,
+ "GDM_KEYBOARD_LAYOUT",
+ get_layout_name (session));
gdm_session_direct_set_environment_variable (session,
"DISPLAY",
diff -up gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard gdm-2.25.2/daemon/gdm-session-settings.c
--- gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.25.2/daemon/gdm-session-settings.c 2009-02-24 22:51:00.158815919 -0500

View File

@ -15,8 +15,8 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.26.1
Release: 13%{?dist}
Version: 2.27.4
Release: 1%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@ -31,6 +31,7 @@ Source6: gdm-smartcard-16.png
Source7: gdm-smartcard-48.png
Source8: gdm-fingerprint-16.png
Source9: gdm-fingerprint-48.png
Source10: polkit-gnome-authentication-agent-1.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Prereq: /usr/sbin/useradd
@ -49,6 +50,7 @@ Requires: ConsoleKit >= %{consolekit_version}
Requires: gnome-settings-daemon >= 2.21.92
Requires: iso-codes
Requires: gnome-session
Requires: polkit-gnome
# since we use it, and pam spams the log if the module is missing
Requires: gnome-keyring-pam
Requires: plymouth-gdm-hooks
@ -94,15 +96,7 @@ Patch3: gdm-2.23.92-save-root-window.patch
# should probably be changed to get the system layout from the X server
Patch13: gdm-system-keyboard.patch
Patch19: gdm-2.26.1-multistack.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=498361
Patch20: polkit1.patch
# fixed upstream, rh 502778
Patch22: gdm-2.26.0-fix-lang-regex.patch
Patch35: xklavier4.patch
Patch19: gdm-2.27.4-multistack.patch
# Fedora-specific
Patch99: gdm-2.23.1-fedora-logo.patch
@ -147,9 +141,6 @@ The GDM fingerprint plugin provides functionality necessary to use a fingerprint
%patch13 -p1 -b .system-keyboard
%patch19 -p1 -b .multistack
%patch20 -p1 -b .polkit1
%patch22 -p1 -b .fix-lang-regex
%patch35 -p1 -b .xklavier4
%patch99 -p1 -b .fedora-logo
@ -211,6 +202,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.la
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdm/autostart/LoginWindow
# temporarily manually copy this
cp -f %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/gdm/autostart/LoginWindow/polkit-gnome-authentication-agent-1.desktop
rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
find $RPM_BUILD_ROOT -name '*.a' -delete
@ -391,6 +385,9 @@ fi
%{_libdir}/gdm/simple-greeter/plugins/fingerprint.so
%changelog
* Mon Jul 20 2009 Ray Strode <rstrode@redhat.com> 1:2.27.4-1
- Update to 2.27.4
* Thu Jul 02 2009 Adam Jackson <ajax@redhat.com> 1:2.26.1-13
- Requires: xorg-x11-xkb-utils -> Requires: setxkbmap

View File

@ -1,361 +0,0 @@
diff -up gdm-2.26.1/configure.ac.polkit1 gdm-2.26.1/configure.ac
--- gdm-2.26.1/configure.ac.polkit1 2009-05-13 18:15:11.618938539 -0400
+++ gdm-2.26.1/configure.ac 2009-05-13 18:15:58.034936628 -0400
@@ -62,7 +62,6 @@ PANGO_REQUIRED_VERSION=1.3.0
LIBGLADE_REQUIRED_VERSION=1.99.2
SCROLLKEEPER_REQUIRED_VERSION=0.1.4
GCONF_REQUIRED_VERSION=2.6.1
-POLICYKIT_REQUIRED_VERSION=0.8
GNOME_PANEL_REQUIRED_VERSION=2.0.0
LIBXKLAVIER_REQUIRED_VERSION=3.5
#FONTCONFIG_REQUIRED_VERSION=2.6.0
@@ -142,30 +141,6 @@ AC_SUBST(HAVE_LIBXKLAVIER)
AC_SUBST(LIBXKLAVIER_CFLAGS)
AC_SUBST(LIBXKLAVIER_LIBS)
-PKG_CHECK_MODULES(POLKIT_GNOME,
- polkit-gnome >= $POLICYKIT_REQUIRED_VERSION,
- have_polkit=yes,
- have_polkit=no)
-
-AC_ARG_ENABLE([polkit],
- AS_HELP_STRING([--enable-polkit],
- [Enable PolicyKit support @<:@default=auto@:>@]),
- enable_polkit=$enableval, enable_polkit=auto)
-
-if test "x$enable_polkit" != "xno"; then
- if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then
- AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
- fi
-
- if test "x$have_polkit" = "xyes" ; then
- AC_DEFINE(HAVE_POLKIT_GNOME, [], [Define if we have polkit])
- fi
-fi
-AM_CONDITIONAL(HAVE_POLKIT_GNOME, test x$have_polkit = xyes)
-AC_SUBST(HAVE_POLKIT_GNOME)
-AC_SUBST(POLKIT_GNOME_CFLAGS)
-AC_SUBST(POLKIT_GNOME_LIBS)
-
PKG_CHECK_MODULES(SIMPLE_CHOOSER,
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
gtk+-2.0 >= $GTK_REQUIRED_VERSION
diff -up gdm-2.26.1/gui/simple-greeter/gdm-greeter-login-window.c.polkit1 gdm-2.26.1/gui/simple-greeter/gdm-greeter-login-window.c
--- gdm-2.26.1/gui/simple-greeter/gdm-greeter-login-window.c.polkit1 2009-05-13 18:15:11.730937911 -0400
+++ gdm-2.26.1/gui/simple-greeter/gdm-greeter-login-window.c 2009-05-13 18:15:11.811971897 -0400
@@ -59,10 +59,6 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#ifdef HAVE_POLKIT_GNOME
-#include <polkit-gnome/polkit-gnome.h>
-#endif
-
#include "gdm-marshal.h"
#include "gdm-settings-client.h"
@@ -1292,119 +1288,6 @@ try_system_restart (DBusGConnection *con
return res;
}
-#ifdef HAVE_POLKIT_GNOME
-static void
-system_restart_auth_cb (PolKitAction *action,
- gboolean gained_privilege,
- GError *error,
- GdmGreeterLoginWindow *login_window)
-{
- GError *local_error;
- DBusGConnection *connection;
- gboolean res;
-
- g_debug ("GdmGreeterLoginWindow: system restart auth callback gained=%s", gained_privilege ? "yes" : "no");
-
- if (! gained_privilege) {
- if (error != NULL) {
- g_warning ("GdmGreeterLoginWindow: system restart error: %s", error->message);
- }
- return;
- }
-
- local_error = NULL;
- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &local_error);
- if (connection == NULL) {
- g_warning ("Unable to get system bus connection: %s", local_error->message);
- g_error_free (local_error);
- return;
- }
-
- res = try_system_restart (connection, &local_error);
- if (! res) {
- g_warning ("Unable to restart system: %s", local_error->message);
- g_error_free (local_error);
- return;
- }
-}
-
-static void
-system_stop_auth_cb (PolKitAction *action,
- gboolean gained_privilege,
- GError *error,
- GdmGreeterLoginWindow *login_window)
-{
- GError *local_error;
- DBusGConnection *connection;
- gboolean res;
-
- g_debug ("GdmGreeterLoginWindow: system stop auth callback gained=%s", gained_privilege ? "yes" : "no");
-
- if (! gained_privilege) {
- if (error != NULL) {
- g_warning ("GdmGreeterLoginWindow: system stop error: %s", error->message);
- }
- return;
- }
-
- local_error = NULL;
- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &local_error);
- if (connection == NULL) {
- g_warning ("Unable to get system bus connection: %s", local_error->message);
- g_error_free (local_error);
- return;
- }
-
- res = try_system_stop (connection, &local_error);
- if (! res) {
- g_warning ("Unable to stop system: %s", local_error->message);
- g_error_free (local_error);
- return;
- }
-}
-
-static PolKitAction *
-get_action_from_error (GError *error)
-{
- PolKitAction *action;
- char *paction;
- char *p;
-
- action = polkit_action_new ();
-
- paction = NULL;
- if (g_str_has_prefix (error->message, "Not privileged for action: ")) {
- paction = g_strdup (error->message + strlen ("Not privileged for action: "));
- p = strchr (paction, ' ');
- if (p != NULL) {
- *p = '\0';
- }
- }
- g_debug ("GdmGreeterLoginWindow: Requesting priv for '%s'", paction);
-
- polkit_action_set_action_id (action, paction);
-
- g_free (paction);
-
- return action;
-}
-
-static PolKitResult
-get_result_from_error (GError *error)
-{
- PolKitResult result = POLKIT_RESULT_UNKNOWN;
- const char *p;
-
- p = strrchr (error->message, ' ');
- if (p != NULL) {
- p++;
- polkit_result_from_string_representation (p, &result);
- }
-
- return result;
-}
-#endif
-
static void
do_system_restart (GdmGreeterLoginWindow *login_window)
{
@@ -1421,69 +1304,12 @@ do_system_restart (GdmGreeterLoginWindow
}
res = try_system_restart (connection, &error);
-#ifdef HAVE_POLKIT_GNOME
- if (! res) {
+ if (!res) {
g_debug ("GdmGreeterLoginWindow: unable to restart system: %s: %s",
dbus_g_error_get_name (error),
error->message);
-
- if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) {
- PolKitAction *action;
- PolKitAction *action2;
- PolKitResult result;
- GtkWidget *dialog;
- guint xid;
- pid_t pid;
-
- result = get_result_from_error (error);
- action = get_action_from_error (error);
-
- if (result == POLKIT_RESULT_NO) {
- action2 = polkit_action_new ();
- polkit_action_set_action_id (action2,
- "org.freedesktop.consolekit.system.restart-multiple-users");
- dialog = gtk_message_dialog_new (GTK_WINDOW (login_window),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Failed to restart computer"));
- if (polkit_action_equal (action, action2)) {
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("You are not allowed to restart the computer "
- "because multiple users are logged in"));
- }
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- polkit_action_unref (action);
- polkit_action_unref (action2);
-
- g_error_free (error);
-
- return;
- }
-
- xid = 0;
- pid = getpid ();
-
- g_error_free (error);
- error = NULL;
- res = polkit_gnome_auth_obtain (action,
- xid,
- pid,
- (PolKitGnomeAuthCB) system_restart_auth_cb,
- login_window,
- &error);
- polkit_action_unref (action);
-
- if (! res) {
- g_warning ("Unable to request privilege for action: %s", error->message);
- g_error_free (error);
- }
-
- }
+ g_error_free (error);
}
-#endif
}
static void
@@ -1502,67 +1328,12 @@ do_system_stop (GdmGreeterLoginWindow *l
}
res = try_system_stop (connection, &error);
-#ifdef HAVE_POLKIT_GNOME
- if (! res) {
+ if (!res) {
g_debug ("GdmGreeterLoginWindow: unable to stop system: %s: %s",
dbus_g_error_get_name (error),
error->message);
-
- if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) {
- PolKitAction *action;
- PolKitAction *action2;
- PolKitResult result;
- GtkWidget *dialog;
- guint xid;
- pid_t pid;
-
- xid = 0;
- pid = getpid ();
-
- result = get_result_from_error (error);
- action = get_action_from_error (error);
-
- if (result == POLKIT_RESULT_NO) {
- action2 = polkit_action_new ();
- polkit_action_set_action_id (action2,
- "org.freedesktop.consolekit.system.stop-multiple-users");
- dialog = gtk_message_dialog_new (GTK_WINDOW (login_window),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Failed to stop computer"));
- if (polkit_action_equal (action, action2)) {
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("You are not allowed to stop the computer "
- "because multiple users are logged in"));
- }
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- polkit_action_unref (action);
- polkit_action_unref (action2);
-
- return;
- }
-
- g_error_free (error);
- error = NULL;
- res = polkit_gnome_auth_obtain (action,
- xid,
- pid,
- (PolKitGnomeAuthCB) system_stop_auth_cb,
- login_window,
- &error);
- polkit_action_unref (action);
-
- if (! res) {
- g_warning ("Unable to request privilege for action: %s", error->message);
- g_error_free (error);
- }
-
- }
+ g_error_free (error);
}
-#endif
}
static void
diff -up gdm-2.26.1/gui/simple-greeter/Makefile.am.polkit1 gdm-2.26.1/gui/simple-greeter/Makefile.am
--- gdm-2.26.1/gui/simple-greeter/Makefile.am.polkit1 2009-05-13 18:15:11.512938382 -0400
+++ gdm-2.26.1/gui/simple-greeter/Makefile.am 2009-05-13 18:15:11.814939276 -0400
@@ -24,7 +24,6 @@ AM_CPPFLAGS = \
$(DISABLE_DEPRECATED_CFLAGS) \
$(GTK_CFLAGS) \
$(SIMPLE_GREETER_CFLAGS) \
- $(POLKIT_GNOME_CFLAGS) \
$(NULL)
@INTLTOOL_SCHEMAS_RULE@
@@ -101,7 +100,6 @@ test_greeter_login_window_LDADD = \
libgdmuser.la \
$(COMMON_LIBS) \
$(SIMPLE_GREETER_LIBS) \
- $(POLKIT_GNOME_LIBS) \
$(RBAC_LIBS) \
$(NULL)
@@ -262,7 +260,6 @@ test_user_chooser_LDADD = \
libgdmuser.la \
$(COMMON_LIBS) \
$(SIMPLE_GREETER_LIBS) \
- $(POLKIT_GNOME_LIBS) \
$(NULL)
test_user_manager_SOURCES = \
@@ -273,7 +270,6 @@ test_user_manager_LDADD = \
libgdmuser.la \
$(COMMON_LIBS) \
$(SIMPLE_GREETER_LIBS) \
- $(POLKIT_GNOME_LIBS) \
$(NULL)
libexec_PROGRAMS = \
@@ -344,7 +340,6 @@ gdm_simple_greeter_LDADD = \
$(COMMON_LIBS) \
$(EXTRA_GREETER_LIBS) \
$(SIMPLE_GREETER_LIBS) \
- $(POLKIT_GNOME_LIBS) \
$(RBAC_LIBS) \
$(LIBXKLAVIER_LIBS) \
$(NULL)

View File

@ -1,12 +0,0 @@
diff -up gdm-2.26.1/gui/simple-greeter/gdm-layouts.c.xklavier4 gdm-2.26.1/gui/simple-greeter/gdm-layouts.c
--- gdm-2.26.1/gui/simple-greeter/gdm-layouts.c.xklavier4 2009-07-01 09:47:32.546576916 -0400
+++ gdm-2.26.1/gui/simple-greeter/gdm-layouts.c 2009-07-01 09:47:50.848564055 -0400
@@ -52,7 +52,7 @@ init_xkl (void)
engine = xkl_engine_get_instance (GDK_DISPLAY ());
xkl_engine_backup_names_prop (engine);
config_registry = xkl_config_registry_get_instance (engine);
- xkl_config_registry_load (config_registry);
+ xkl_config_registry_load (config_registry, FALSE);
initial_config = xkl_config_rec_new ();
if (!xkl_config_rec_get_from_backup (initial_config, engine)) {