SHA256
1
0
forked from pool/gdm
OBS User unknown 2008-11-04 16:37:03 +00:00 committed by Git OBS Bridge
parent 83b92ce2a2
commit f6ce548f53
6 changed files with 509 additions and 22 deletions

View File

@ -0,0 +1,39 @@
--- gdm/gui/simple-greeter/gdm-languages.c (revision 6468)
+++ gdm/gui/simple-greeter/gdm-languages.c (working copy)
@@ -216,6 +216,25 @@ construct_language_name (const char *lan
return name;
}
+static void
+make_codeset_canonical_for_locale (const *name,
+ const char **codeset)
+{
+ char *old_locale;
+ char *canonical_codeset;
+
+ old_locale = setlocale (LC_CTYPE, name);
+
+ if (old_locale == NULL) {
+ return;
+ }
+
+ g_free (*codeset);
+ *codeset = g_strdup (nl_langinfo (CODESET));
+
+ setlocale (LC_CTYPE, old_locale);
+}
+
char *
gdm_normalize_language_name (const char *name)
{
@@ -234,6 +253,10 @@ gdm_normalize_language_name (const char
&territory_code,
&codeset, &modifier);
+ if (codeset != NULL) {
+ make_codeset_canonical_for_locale (name, &codeset);
+ }
+
normalized_name = construct_language_name (language_code,
territory_code,
codeset, modifier);

View File

@ -0,0 +1,138 @@
diff -up gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c 2008-09-17 11:07:51.000000000 -0400
@@ -173,7 +173,7 @@ gdm_language_option_widget_class_init (G
g_type_class_add_private (klass, sizeof (GdmLanguageOptionWidgetPrivate));
}
-static gboolean
+static char *
gdm_language_option_widget_lookup_item (GdmRecentOptionWidget *widget,
const char *locale,
char **name,
@@ -182,11 +182,15 @@ gdm_language_option_widget_lookup_item (
char *language;
char *readable_language;
char *lang_tag;
+ char *normalized_locale;
- language = gdm_get_language_from_name (locale, locale);
+ normalized_locale = gdm_normalize_language_name (locale);
+
+ language = gdm_get_language_from_name (locale, normalized_locale);
if (language == NULL) {
- return FALSE;
+ g_free (normalized_locale);
+ return NULL;
}
readable_language = gdm_get_language_from_name (locale, NULL);
@@ -197,7 +201,7 @@ gdm_language_option_widget_lookup_item (
g_free (language);
g_free (lang_tag);
- return TRUE;
+ return normalized_locale;
}
static void
@@ -294,7 +298,7 @@ gdm_language_option_widget_set_current_l
if (normalized_language_name != NULL &&
!gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget),
- normalized_language_name, NULL, NULL, NULL)) {
+ &normalized_language_name, NULL, NULL, NULL)) {
gdm_recent_option_widget_add_item (GDM_RECENT_OPTION_WIDGET (widget),
normalized_language_name);
}
diff -up gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c.filter-dupes-from-lang-list 2008-09-17 10:55:20.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c 2008-09-17 11:08:07.000000000 -0400
@@ -176,24 +176,24 @@ gdm_layout_option_widget_class_init (Gdm
g_type_class_add_private (klass, sizeof (GdmLayoutOptionWidgetPrivate));
}
-static gboolean
+static char *
gdm_layout_option_widget_lookup_item (GdmRecentOptionWidget *widget,
- const char *id,
+ const char *key,
char **name,
char **comment)
{
char *layout;
- layout = gdm_get_layout_from_name (id);
+ layout = gdm_get_layout_from_name (key);
if (layout == NULL) {
- return FALSE;
+ return NULL;
}
*name = layout;
*comment = NULL;
- return TRUE;
+ return g_strdup (key);
}
static void
diff -up gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c 2008-09-17 11:06:34.000000000 -0400
@@ -159,13 +159,24 @@ gdm_recent_option_widget_sync_items_from
default_is_set = FALSE;
for (tmp = list; tmp != NULL; tmp = tmp->next) {
- const char *id;
+ const char *key;
+ char *id;
char *name;
char *comment;
- id = (char *) tmp->data;
+ key = (char *) tmp->data;
+
+ id = widget->priv->lookup_item_func (widget, key, &name, &comment);
+
+ if (id != NULL) {
+ gboolean item_exists;
+
+ item_exists = gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget), id, NULL, NULL, NULL);
+
+ if (item_exists) {
+ continue;
+ }
- if (widget->priv->lookup_item_func (widget, id, &name, &comment)) {
gdm_option_widget_add_item (GDM_OPTION_WIDGET (widget),
id, name, comment,
GDM_OPTION_WIDGET_POSITION_MIDDLE);
@@ -177,6 +188,7 @@ gdm_recent_option_widget_sync_items_from
g_free (name);
g_free (comment);
+ g_free (id);
}
}
diff -up gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h
--- gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h 2008-09-17 11:07:40.000000000 -0400
@@ -48,10 +48,10 @@ typedef struct
GdmOptionWidgetClass parent_class;
} GdmRecentOptionWidgetClass;
-typedef gboolean (* GdmRecentOptionLookupItemFunc) (GdmRecentOptionWidget *widget,
- const char *id,
- char **name,
- char **comment);
+typedef char * (* GdmRecentOptionLookupItemFunc) (GdmRecentOptionWidget *widget,
+ const char *key,
+ char **name,
+ char **comment);
GType gdm_recent_option_widget_get_type (void);

View File

@ -0,0 +1,12 @@
--- gdm-2.23.92/gui/simple-greeter/gdm-option-widget.c 2008-08-26 15:03:59.000000000 -0400
+++ foo/gui/simple-greeter/gdm-option-widget.c 2008-09-19 09:57:30.000000000 -0400
@@ -148,7 +148,8 @@
model = GTK_TREE_MODEL (widget->priv->list_store);
item_id = NULL;
- if (widget->priv->active_row == NULL) {
+ if (widget->priv->active_row == NULL ||
+ !gtk_tree_row_reference_valid (widget->priv->active_row)) {
return NULL;
}

View File

@ -1,7 +1,7 @@
Index: gdm-2.23.92/data/Init.in
Index: gdm-2.24.0/data/Init.in
===================================================================
--- gdm-2.23.92.orig/data/Init.in
+++ gdm-2.23.92/data/Init.in
--- gdm-2.24.0.orig/data/Init.in
+++ gdm-2.24.0/data/Init.in
@@ -1,4 +1,9 @@
#!/bin/sh
+
@ -12,10 +12,10 @@ Index: gdm-2.23.92/data/Init.in
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
# -George
Index: gdm-2.23.92/data/PostSession.in
Index: gdm-2.24.0/data/PostSession.in
===================================================================
--- gdm-2.23.92.orig/data/PostSession.in
+++ gdm-2.23.92/data/PostSession.in
--- gdm-2.24.0.orig/data/PostSession.in
+++ gdm-2.24.0/data/PostSession.in
@@ -1,5 +1,9 @@
#!/bin/sh
@ -26,18 +26,265 @@ Index: gdm-2.23.92/data/PostSession.in
PATH="@X_PATH@:$PATH:/bin:/usr/bin"
OLD_IFS=$IFS
Index: gdm-2.23.92/data/Xsession.in
Index: gdm-2.24.0/data/Xsession.in
===================================================================
--- gdm-2.23.92.orig/data/Xsession.in
+++ gdm-2.23.92/data/Xsession.in
@@ -1,4 +1,10 @@
#!@XSESSION_SHELL@
+
--- gdm-2.24.0.orig/data/Xsession.in
+++ gdm-2.24.0/data/Xsession.in
@@ -1,253 +1,6 @@
-#!@XSESSION_SHELL@
-#
-# This is SORT OF LIKE an X session, but not quite. You get a command as the
-# first argument (it could be multiple words, so run it with "eval"). As a
-# special case, the command can be:
-# default - Run the appropriate Xclients startup (see the code below)
-# custom - Run ~/.xsession and if that's not available run 'default'
-#
-# (Note that other arguments could also follow, but only the command one is
-# right now relevant and supported)
-#
-# The output is ALREADY redirected to .xsession-errors in GDM. This way
-# .xsession-errors actually gets more output such as if the PreSession script
-# is failing. This also prevents DoS attacks if some app in the users session
-# can be prodded to dump lots of stuff on the stdout/stderr. We wish to be
-# robust don't we? In case you wish to use an existing script for other DM's,
-# you can just not redirect when GDMSESSION is set. GDMSESSION will always
-# be set from gdm.
-#
-# Also note that this is not run as a login shell, this is just executed.
-# This is why we source the profile files below.
-#
-# based on:
-# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
+#!/bin/sh
-command="$@"
-
-# this will go into the .xsession-errors along with all other echo's
-# good for debugging where things went wrong
-echo "$0: Beginning session setup..."
-
-# First read /etc/profile and .profile
-test -f /etc/profile && . /etc/profile
-test -f "$HOME/.profile" && . "$HOME/.profile"
-# Second read /etc/xprofile and .xprofile for X specific setup
-test -f /etc/xprofile && . /etc/xprofile
-test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
-
-# Translation stuff
-if [ -x "@libexecdir@/gdmtranslate" ] ; then
- gdmtranslate="@libexecdir@/gdmtranslate"
-else
- gdmtranslate=
-fi
-
-# Note that this should only go to zenity dialogs which always expect utf8
-gettextfunc () {
- if [ "x$gdmtranslate" != "x" ] ; then
- "$gdmtranslate" --utf8 "$1"
- else
- echo "$1"
- fi
-}
-
-OLD_IFS=$IFS
-
-gdmwhich () {
- COMMAND="$1"
- OUTPUT=
- IFS=:
- for dir in $PATH
- do
- if test -x "$dir/$COMMAND" ; then
- if test "x$OUTPUT" = "x" ; then
- OUTPUT="$dir/$COMMAND"
- fi
- fi
- done
- IFS=$OLD_IFS
- echo "$OUTPUT"
-}
-
-zenity=`gdmwhich zenity`
-
-# Note: ~/.xsession-errors is now done in the daemon so that it
-# works for ALL sessions (except ones named 'Failsafe')
-
-# clean up after xbanner
-freetemp=`gdmwhich freetemp`
-if [ -n "$freetemp" ] ; then
- "$freetemp"
+if test -f /etc/X11/xdm/Xstartup -a -x /etc/X11/xdm/Xsession; then
+ /bin/bash /etc/X11/xdm/Xstartup
+ exec /etc/X11/xdm/Xsession $1 $GDM_LANG
+fi
+
#
# This is SORT OF LIKE an X session, but not quite. You get a command as the
# first argument (it could be multiple words, so run it with "eval"). As a
fi
-
-userresources="$HOME/.Xresources"
-usermodmap="$HOME/.Xmodmap"
-userxkbmap="$HOME/.Xkbmap"
-
-sysresources=/etc/X11/Xresources
-sysmodmap=/etc/X11/Xmodmap
-sysxkbmap=/etc/X11/Xkbmap
-
-rh6sysresources=/etc/X11/xinit/Xresources
-rh6sysmodmap=/etc/X11/xinit/Xmodmap
-
-# merge in defaults
-if [ -f "$rh6sysresources" ]; then
- xrdb -merge "$rh6sysresources"
-fi
-
-if [ -f "$sysresources" ]; then
- xrdb -merge "$sysresources"
-fi
-
-if [ -f "$userresources" ]; then
- xrdb -merge "$userresources"
-fi
-
-# merge in keymaps
-if [ -f "$sysxkbmap" ]; then
- setxkbmap `cat "$sysxkbmap"`
- XKB_IN_USE=yes
-fi
-
-if [ -f "$userxkbmap" ]; then
- setxkbmap `cat "$userxkbmap"`
- XKB_IN_USE=yes
-fi
-
-#
-# Eeek, this seems like too much magic here
-#
-if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
- if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
- xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
- if [ -n "$xkbsymbols" ]; then
- setxkbmap -symbols "$xkbsymbols"
- XKB_IN_USE=yes
- fi
- fi
-fi
-
-# xkb and xmodmap don't play nice together
-if [ -z "$XKB_IN_USE" ]; then
- if [ -f "$rh6sysmodmap" ]; then
- xmodmap "$rh6sysmodmap"
- fi
-
- if [ -f "$sysmodmap" ]; then
- xmodmap "$sysmodmap"
- fi
-
- if [ -f "$usermodmap" ]; then
- xmodmap "$usermodmap"
- fi
-fi
-
-unset XKB_IN_USE
-
-# Normalize languages, some places/distros screw us up in /etc/profile,
-# so in case the user did select a language
-if [ -n "$GDM_LANG" ]; then
- LANG="$GDM_LANG"
- export LANG
-
- if [ -n "$LC_ALL" ]; then
- if [ "$LC_ALL" != "$LANG" ]; then
- LC_ALL="$LANG"
- fi
- else
- unset LC_ALL
- fi
-
- if [ -n "$LANGUAGE" ]; then
- if [ "$LANGUAGE" != "$LANG" ]; then
- LANGUAGE="$LANG"
- fi
- else
- unset LANGUAGE
- fi
-
- if [ -n "$LINGUAS" ]; then
- if [ "$LINGUAS" != "$LANG" ]; then
- LINGUAS="$LANG"
- fi
- else
- unset LINGUAS
- fi
-fi
-
-# run all system xinitrc shell scripts.
-if [ -d /etc/X11/xinit/xinitrc.d ]; then
- for i in /etc/X11/xinit/xinitrc.d/* ; do
- if [ -x "$i" ]; then
- . "$i"
- fi
- done
-fi
-
-# @DISTRO_XSESSION@
-#
-# End of Distribution configuration section.
-#
-
-#Startup Input methods (IIIM->XIM)
-if [ -f /etc/iiim/xsession ]; then
- . /etc/iiim/xsession
-fi
-#Startup XIM stuff
-if [ "x$XMODIFIERS" = "x" ]; then
- if [ -f "$HOME/.xim" ]; then
- . $HOME/.xim
- elif [ -f "/etc/skel/.xim" ]; then
- . /etc/skel/.xim
- fi
-fi
-
-if [ "x$command" = "xcustom" ] ; then
- if [ -x "$HOME/.xsession" ]; then
- command="$HOME/.xsession"
- else
- echo "$0: Cannot find ~/.xsession will try the default session"
- command="default"
- fi
-fi
-
-if [ "x$command" = "xdefault" ] ; then
- if [ -x "$HOME/.Xclients" ]; then
- command="$HOME/.Xclients"
- elif [ -x /etc/X11/xinit/Xclients ]; then
- command="/etc/X11/xinit/Xclients"
- elif [ -x /etc/X11/Xclients ]; then
- command="/etc/X11/Xclients"
- else
- if [ -n "$zenity" ] ; then
- disptext=`gettextfunc "System has no Xclients file, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
- "$zenity" --info --text "$disptext"
- else
- echo "$0: Cannot find Xclients"
- fi
- exec xterm -geometry 80x24+0+0
- fi
-fi
-
-# add ssh-agent if found
-sshagent="`gdmwhich ssh-agent`"
-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
- command="$sshagent -- $command"
-elif [ -z "$sshagent" ] ; then
- echo "$0: ssh-agent not found!"
-fi
-
-echo "$0: Setup done, will execute: $command"
-
-eval exec $command
-
-echo "$0: Executing $command failed, will run xterm"
-
-if [ -n "$zenity" ] ; then
- disptext=`gettextfunc "Failed to start the session, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
- "$zenity" --info --text "$disptext"
-fi
-
-exec xterm -geometry 80x24+0+0

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Tue Nov 4 04:12:03 EST 2008 - jpr@novell.com
- Add requires for ConsoleKit-x11, gnome-session
(bnc#441105, bnc#428294)
- Add recommends for gnome-settings-daemon, its very useful to have
-------------------------------------------------------------------
Mon Nov 3 12:24:11 EST 2008 - jpr@novell.com
- Add iso-codes-devel to the build requires so the languages can
be found (bnc #435157)
- Add gdm-2.23.92-filter-dupes-from-lang-list.patch to prevent
listing languages more that once in the selector
- Add gdm-2.23.92-fix-crash.patch to prevent crash when selecting
drop down items like language
- Add gdm-2.23.92-another-locale-fixup.patch to use canonical system
locale info
- Refresh gdm-suse-xsession.patch to have a shell to run with and
don't call anything else after our the xorg Xsession runs.
-------------------------------------------------------------------
Sun Nov 2 00:28:51 CST 2008 - hpj@novell.com

View File

@ -29,6 +29,7 @@ BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-panel-devel
BuildRequires: gnome-patch-translation
BuildRequires: intltool
BuildRequires: iso-codes-devel
BuildRequires: libglade2-devel
BuildRequires: libgnomeprintui-devel
BuildRequires: libgnomeui-devel
@ -56,7 +57,7 @@ PreReq: %insserv_prereq
License: GPL v2 or later
Group: System/GUI/GNOME
Version: 2.24.0
Release: 3
Release: 5
Summary: The GNOME 2.x Display Manager
Source: %{name}-%{version}.tar.bz2
Source1: gdm.pamd
@ -74,6 +75,12 @@ Patch6: gdm-desktop-session-env-pam.patch
# PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts
Patch7: gdm-suse-xsession.patch
Patch8: gdm-domain-logon.patch
# PATCH-FIX-UPSTREAM gdm-2.23.92-another-locale-fixup.patch jpr@novell.com -- From upstream/Fedora, canonicalize LANG variable
Patch9: gdm-2.23.92-another-locale-fixup.patch
# PATCH-FIX-UPSTREAM gdm-2.23.92-filter-dupes-from-lang-list.patch jpr@novell.com -- From upstream/Fedora, don't show the same language multiple times
Patch10: gdm-2.23.92-filter-dupes-from-lang-list.patch
# PATCH-FIX-UPSTREAM gdm-2.23.92-fix-crash.patch jpr@novell.com -- From upstream/Fedora, don't crash in the option widgets
Patch11: gdm-2.23.92-fix-crash.patch
Patch28: gdm-X_SERVER.patch
# PATCH-SUSE: enable SELinux
Patch60: gdm-selinux.patch
@ -83,9 +90,14 @@ DocDir: %{_defaultdocdir}
Provides: gdm2
Obsoletes: gdm2
Obsoletes: fast-user-switch-applet <= 2.22.0
Requires: gnome-themes klogd xorg-x11-server-extra
Requires: ConsoleKit-x11
Requires: gnome-session
Requires: gnome-themes
Requires: klogd
Requires: xorg-x11-server-extra
Requires: %{name}-branding
Requires: %{name}-lang = %{version}
Recommends: gnome-settings-daemon
%gconf_schemas_prereq
%description
@ -139,6 +151,9 @@ Authors:
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch28
%patch60
@ -213,7 +228,7 @@ fi
%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%doc AUTHORS COPYING ChangeLog NEWS README
%dir %config %{_sysconfdir}/gdm
%config %{_sysconfdir}/gdm/[IPXl]*
%ghost %{_sysconfdir}/gdm/gdm_sysconfig.conf
@ -246,6 +261,21 @@ fi
%files lang -f %{name}.lang
%changelog
* Tue Nov 04 2008 jpr@novell.com
- Add requires for ConsoleKit-x11, gnome-session
(bnc#441105, bnc#428294)
- Add recommends for gnome-settings-daemon, its very useful to have
* Mon Nov 03 2008 jpr@novell.com
- Add iso-codes-devel to the build requires so the languages can
be found (bnc #435157)
- Add gdm-2.23.92-filter-dupes-from-lang-list.patch to prevent
listing languages more that once in the selector
- Add gdm-2.23.92-fix-crash.patch to prevent crash when selecting
drop down items like language
- Add gdm-2.23.92-another-locale-fixup.patch to use canonical system
locale info
- Refresh gdm-suse-xsession.patch to have a shell to run with and
don't call anything else after our the xorg Xsession runs.
* Sun Nov 02 2008 hpj@novell.com
- Update gdm-domain-logon.patch again, fixing bnc#439892.
* Thu Oct 16 2008 hpj@novell.com
@ -258,7 +288,7 @@ fi
family to FamilyWild.
* Mon Oct 06 2008 sbrabec@suse.cz
- Conflict with other branding providers (FATE#304881).
* Thu Oct 02 2008 mboman@suse.de
* Fri Oct 03 2008 mboman@suse.de
- Update to version 2.24.0:
+ Allow the build to succeed without a gdm user
+ Use Bourne shell syntax in Xsession.solaris
@ -1026,7 +1056,7 @@ fi
for timed login user.
* Fri Jul 30 2004 ro@suse.de
- fix spec file, list gdm-session-startkde.diff as patch
* Thu Jul 29 2004 shprasad@suse.de
* Fri Jul 30 2004 shprasad@suse.de
- Fixes bug #60867.
Shows the 'KDE' option when the user clicks on 'Session' at the
time of login.