diff -Nru gdm-3.10.0.1/debian/changelog gdm-3.10.0.1/debian/changelog --- gdm-3.10.0.1/debian/changelog 2014-10-04 09:19:43.000000000 +0000 +++ gdm-3.10.0.1/debian/changelog 2015-01-07 23:22:26.000000000 +0000 @@ -1,3 +1,13 @@ +gdm (3.10.0.1-0ubuntu7.1) utopic; urgency=medium + + * debian/patches/ubuntu_config_error_dialog.patch: + - Show warning dialog in case of error in ~/.profile etc. and + don't let a syntax error make the login fail (LP: #678421). + * debian/control.in: + - Add bash to Depends. + + -- Gunnar Hjalmarsson Sun, 14 Dec 2014 17:43:00 +0100 + gdm (3.10.0.1-0ubuntu7) utopic; urgency=medium * debian/patches/ubuntu_upstart_event.patch: Don't emit upstart events diff -Nru gdm-3.10.0.1/debian/control gdm-3.10.0.1/debian/control --- gdm-3.10.0.1/debian/control 2014-10-04 09:20:42.000000000 +0000 +++ gdm-3.10.0.1/debian/control 2015-01-07 23:22:44.000000000 +0000 @@ -72,7 +72,8 @@ dconf-cli (>= 0.12.1-2), dconf-gsettings-backend (>= 0.12.1-2), x11-common (>= 1:7.6+11), - x11-xserver-utils + x11-xserver-utils, + bash (>= 4.3) Recommends: zenity, xserver-xephyr, x11-xkb-utils, diff -Nru gdm-3.10.0.1/debian/control.in gdm-3.10.0.1/debian/control.in --- gdm-3.10.0.1/debian/control.in 2014-04-29 01:21:30.000000000 +0000 +++ gdm-3.10.0.1/debian/control.in 2015-01-07 23:19:04.000000000 +0000 @@ -68,7 +68,8 @@ dconf-cli (>= 0.12.1-2), dconf-gsettings-backend (>= 0.12.1-2), x11-common (>= 1:7.6+11), - x11-xserver-utils + x11-xserver-utils, + bash (>= 4.3) Recommends: zenity, xserver-xephyr, x11-xkb-utils, diff -Nru gdm-3.10.0.1/debian/patches/series gdm-3.10.0.1/debian/patches/series --- gdm-3.10.0.1/debian/patches/series 2014-10-04 09:20:38.000000000 +0000 +++ gdm-3.10.0.1/debian/patches/series 2015-01-07 23:19:04.000000000 +0000 @@ -15,3 +15,4 @@ ubuntu_no_LANG_setting_in_Xsession.patch ubuntu_export_XDG_CURRENT_DESKTOP.patch ubuntu_nvidia_prime.patch +ubuntu_config_error_dialog.patch diff -Nru gdm-3.10.0.1/debian/patches/ubuntu_config_error_dialog.patch gdm-3.10.0.1/debian/patches/ubuntu_config_error_dialog.patch --- gdm-3.10.0.1/debian/patches/ubuntu_config_error_dialog.patch 1970-01-01 00:00:00.000000000 +0000 +++ gdm-3.10.0.1/debian/patches/ubuntu_config_error_dialog.patch 2015-01-07 23:19:04.000000000 +0000 @@ -0,0 +1,124 @@ +Description: Show warning dialog in case of error in ~/.profile etc. + By using bash instead of sh, a syntax error in a sourced file does + not cause a fatal error, but the user is alerted via a dialog in the + same way as for other types of errors. +Bug-Ubuntu: https://launchpad.net/bugs/678421 +Forwarded: https://bugzilla.gnome.org/738970 +Author: Gunnar Hjalmarsson + +diff -Nru gdm.orig/configure.ac gdm/configure.ac +--- gdm.orig/configure.ac 2013-10-16 16:45:57.000000000 +0200 ++++ gdm/configure.ac 2014-12-14 16:38:53.644691802 +0100 +@@ -1498,7 +1498,7 @@ + if test x$os_solaris = xyes ; then + XSESSION_SHELL=/bin/ksh + else +- XSESSION_SHELL=/bin/sh ++ XSESSION_SHELL=/bin/bash + fi + + # +diff -Nru gdm.orig/data/config-error-dialog.sh gdm/data/config-error-dialog.sh +--- gdm.orig/data/config-error-dialog.sh 1970-01-01 01:00:00.000000000 +0100 ++++ gdm/data/config-error-dialog.sh 2014-12-14 16:39:28.071542834 +0100 +@@ -0,0 +1,29 @@ ++# Copyright (C) 2014 Canonical Ltd ++# Author: Gunnar Hjalmarsson ++# ++# This program is free software: you can redistribute it and/or modify it under ++# the terms of the GNU General Public License as published by the Free Software ++# Foundation, version 3 of the License. ++# ++# See http://www.gnu.org/copyleft/gpl.html the full text of the license. ++ ++# This file may be sourced by the function source_with_error_check() in ++# /etc/gdm/Xsession ++ ++export TEXTDOMAIN=gdm ++. /usr/bin/gettext.sh ++ ++PARA1=$(eval_gettext 'Error found when loading $CONFIG_FILE:') ++PARA2=$(gettext 'As a result the session will not be configured correctly. ++You should fix the problem as soon as feasible.') ++ ++TEXT="$PARA1\n\n$(fold -s $ERR)\n\n$PARA2" ++ ++if [ -x /usr/bin/kdialog ]; then ++ TEXT_FILE=$(mktemp --tmpdir config-err-kdialog-XXXXXX) ++ echo -n "$TEXT" > "$TEXT_FILE" ++ kdialog --textbox "$TEXT_FILE" 500 300 ++ rm -f "$TEXT_FILE" ++elif [ -x /usr/bin/zenity ]; then ++ zenity --warning --no-wrap --text="$TEXT" ++fi +diff -Nru gdm.orig/data/Makefile.am gdm/data/Makefile.am +--- gdm.orig/data/Makefile.am 2013-09-17 23:33:48.000000000 +0200 ++++ gdm/data/Makefile.am 2014-12-14 16:39:55.030649729 +0100 +@@ -197,6 +197,7 @@ + rm -f \ + $(DESTDIR)$(GDM_CUSTOM_CONF) \ + $(DESTDIR)$(gdmconfdir)/Xsession \ ++ $(DESTDIR)$(gdmconfdir)/config-error-dialog.sh \ + $(DESTDIR)$(initdir)/Default \ + $(DESTDIR)$(postlogindir)/Default.sample \ + $(DESTDIR)$(predir)/Default \ +@@ -234,6 +235,8 @@ + + $(INSTALL_SCRIPT) Xsession $(DESTDIR)$(gdmconfdir)/Xsession + ++ $(INSTALL_DATA) $(srcdir)/config-error-dialog.sh $(DESTDIR)$(gdmconfdir)/config-error-dialog.sh ++ + if test '!' -d $(DESTDIR)$(initdir); then \ + $(mkinstalldirs) $(DESTDIR)$(initdir); \ + chmod 755 $(DESTDIR)$(initdir); \ +diff -Nru gdm.orig/data/Xsession.in gdm/data/Xsession.in +--- gdm.orig/data/Xsession.in 2013-09-11 15:06:17.000000000 +0200 ++++ gdm/data/Xsession.in 2014-12-14 16:40:07.350243443 +0100 +@@ -29,12 +29,32 @@ + # good for debugging where things went wrong + echo "$0: Beginning session setup..." + ++# temporary storage of error messages ++ERR=$(mktemp --tmpdir config-err-XXXXXX) ++ ++source_with_error_check () { ++ CONFIG_FILE="$1" ++ . "$CONFIG_FILE" 2>"$ERR" ++ if [ -s "$ERR" ]; then ++ . /etc/gdm/config-error-dialog.sh ++ fi ++ cat "$ERR" >>/dev/stderr ++ truncate -s 0 "$ERR" ++} ++ + # First read /etc/profile and .profile +-test -f /etc/profile && . /etc/profile +-test -f "$HOME/.profile" && . "$HOME/.profile" ++for file in /etc/profile "$HOME/.profile"; do ++ if [ -f "$file" ]; then ++ source_with_error_check "$file" ++ fi ++done ++ + # Second read /etc/xprofile and .xprofile for X specific setup +-test -f /etc/xprofile && . /etc/xprofile +-test -f "$HOME/.xprofile" && . "$HOME/.xprofile" ++for file in /etc/xprofile "$HOME/.xprofile"; do ++ if [ -f "$file" ]; then ++ source_with_error_check "$file" ++ fi ++done + + # Translation stuff + if [ -x "@libexecdir@/gdmtranslate" ] ; then +diff -Nru gdm.orig/po/POTFILES.in gdm/po/POTFILES.in +--- gdm.orig/po/POTFILES.in 2013-09-20 18:00:48.000000000 +0200 ++++ gdm/po/POTFILES.in 2014-12-14 16:40:43.457059053 +0100 +@@ -37,6 +37,7 @@ + daemon/xdmcp-chooser-slave-main.c + data/applications/gdm-simple-greeter.desktop.in.in + data/applications/gnome-shell.desktop.in ++data/config-error-dialog.sh + data/gdm.schemas.in.in + data/org.gnome.login-screen.gschema.xml.in + gui/libgdm/gdm-user-switching.c