[Merge] lp:~noskcaj/ubuntu/utopic/xfce4-session/merge into lp:ubuntu/xfce4-session
Sean Davis
smd.seandavis at gmail.com
Thu Jul 17 00:39:17 UTC 2014
Review: Needs Fixing
It looks like you might be dropping some still-needed xubuntu patches. Please review these patches and verify that they are no longer needed (the light-locker patch should certainly stay).
Diff comments:
> === removed directory '.pc/01_fix-xrdb-call.patch'
> === removed directory '.pc/01_fix-xrdb-call.patch/scripts'
> === removed file '.pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in'
> --- .pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
> +++ .pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in 1970-01-01 00:00:00 +0000
> @@ -1,192 +0,0 @@
> -#!/bin/sh
> -
> -# fix broken $UID on some system...
> -if test "x$UID" = "x"; then
> - if test -x /usr/xpg4/bin/id; then
> - UID=`/usr/xpg4/bin/id -u`;
> - else
> - UID=`id -u`;
> - fi
> -fi
> -
> -# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
> -# over "applications.menu" in all Xfce applications.
> -if test "x$XDG_MENU_PREFIX" = "x"; then
> - XDG_MENU_PREFIX="xfce-"
> - export XDG_MENU_PREFIX
> -fi
> -
> -# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
> -if test "x$DESKTOP_SESSION" = "x"; then
> - DESKTOP_SESSION="xfce"
> - export DESKTOP_SESSION
> -fi
> -
> -# $XDG_CONFIG_HOME defines the base directory relative to which user specific
> -# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
> -# or empty, a default equal to $HOME/.config should be used.
> -if test "x$XDG_CONFIG_HOME" = "x" ; then
> - XDG_CONFIG_HOME=$HOME/.config
> -fi
> -[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
> -
> -# $XDG_CACHE_HOME defines the base directory relative to which user specific
> -# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
> -# set or empty, a default equal to $HOME/.cache should be used.
> -if test "x$XDG_CACHE_HOME" = "x" ; then
> - XDG_CACHE_HOME=$HOME/.cache
> -fi
> -[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
> -
> -# set up XDG user directores. see
> -# http://freedesktop.org/wiki/Software/xdg-user-dirs
> -if which xdg-user-dirs-update >/dev/null 2>&1; then
> - xdg-user-dirs-update
> -fi
> -
> -# Modify libglade and glade environment variables so that
> -# it will find the files installed by Xfce
> -GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
> -GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:@XFCE_GLADE_PIXMAP_PATH@"
> -GLADE_MODULE_PATH="$GLADE_MODULE_PATH:@XFCE_GLADE_MODULE_PATH@"
> -export GLADE_CATALOG_PATH
> -export GLADE_PIXMAP_PATH
> -export GLADE_MODULE_PATH
> -
> -# For now, start with an empty list
> -XRESOURCES=""
> -
> -# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
> -test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
> -test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
> -
> -BASEDIR=$XDG_CONFIG_HOME/xfce4
> -if test -r "$BASEDIR/Xft.xrdb"; then
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -elif test -r "$XFCE4HOME/Xft.xrdb"; then
> - mkdir -p "$BASEDIR"
> - cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -fi
> -
> -# merge in X cursor settings
> -test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
> -
> -# ~/.Xresources contains overrides to the above
> -test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
> -
> -# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
> -cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
> -
> -# load local modmap
> -test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
> -
> -# run xfce4-session if installed
> -if which xfce4-session >/dev/null 2>&1; then
> -
> - # check if we start xfce4-session with ck-launch-session. this is only
> - # required for starting from a console, not a login manager
> - if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
> - if which ck-launch-session >/dev/null 2>&1; then
> - ck-launch-session xfce4-session
> - else
> - echo
> - echo "You have tried to start Xfce with consolekit support, but"
> - echo "ck-launch-session is not installed."
> - echo "Aborted startup..."
> - echo
> -
> - exit 1
> - fi
> - else
> - # start xfce4-session normally
> - xfce4-session
> - fi
> -
> - exit 0
> -fi
> -
> -##################
> -# IMPORTANT NOTE #
> -##################
> -
> -# Everything below here ONLY gets executed if you are NOT using xfce4-session
> -# (Xfce's session manager). If you are using the session manager, everything
> -# below is handled by it, and the code below is not executed at all. If you're
> -# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
> -# in a terminal while Xfce is running.
> -
> -##################
> -
> -# Use dbus-launch if installed.
> -if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
> - if which dbus-launch >/dev/null 2>&1; then
> - eval `dbus-launch --sh-syntax --exit-with-session`
> - # some older versions of dbus don't export the var properly
> - export DBUS_SESSION_BUS_ADDRESS
> - else
> - echo "Could not find dbus-launch; Xfce will not work properly" >&2
> - fi
> -fi
> -
> -# this is only necessary when running w/o xfce4-session
> -xsetroot -solid black -cursor_name watch
> -
> -# or use old-fashioned startup script otherwise
> -
> -xfsettingsd &
> -xfwm4 --daemon
> -
> -# start up stuff in $XDG_CONFIG_HOME/autostart/
> -if test -d "$XDG_CONFIG_HOME/autostart"; then
> - for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
> - grep -q -E "^Hidden=true" "$i" && continue
> - if grep -q -E "^OnlyShowIn=" "$i"; then
> - # need to test twice, as lack of the line entirely means we still run it
> - grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
> - fi
> - grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
> -
> - # check for TryExec
> - trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
> - if test "$trycmd"; then
> - which "$trycmd" >/dev/null 2>&1 || continue
> - fi
> -
> - cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
> - if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
> - $cmd &
> - fi
> - done
> -fi
> -
> -xfdesktop&
> -orage &
> -
> -panel=`which xfce4-panel`
> -case "x$panel" in
> - x|xno*)
> - ;;
> - *)
> - $panel
> - ret=$?
> - while test $ret -ne 0; do
> - xmessage -center -file - -timeout 20 -title Error <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - cat >&2 <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - $panel
> - ret=$?
> - done
> - ;;
> -esac
> -
> -xsetroot -bg white -fg red -solid black -cursor_name watch
>
> === removed file '.pc/applied-patches'
> --- .pc/applied-patches 2013-11-24 02:47:29 +0000
> +++ .pc/applied-patches 1970-01-01 00:00:00 +0000
> @@ -1,5 +0,0 @@
> -01_fix-xrdb-call.patch
> -xubuntu_ignore-gdm-lang.patch
> -xubuntu_set-xdg-current-desktop.patch
> -xubuntu_runtime-logind-support.patch
> -xflock4-light-locker-support.patch
>
> === removed directory '.pc/xflock4-light-locker-support.patch'
> === removed directory '.pc/xflock4-light-locker-support.patch/scripts'
> === removed file '.pc/xflock4-light-locker-support.patch/scripts/xflock4'
> --- .pc/xflock4-light-locker-support.patch/scripts/xflock4 2013-11-24 02:47:29 +0000
light-locker support has not been baked into xflock4, please do not remove this patch, or otherwise update it.
> +++ .pc/xflock4-light-locker-support.patch/scripts/xflock4 1970-01-01 00:00:00 +0000
> @@ -1,50 +0,0 @@
> -#!/bin/sh
> -#
> -# xfce4
> -#
> -# Copyright (C) 1999, 2003 Olivier Fourdan (fourdan at xfce.org)
> -# Copyright (C) 2011 Guido Berhoerster (guido+xfce.org at berhoerster.name)
> -# Copyright (C) 2011 Jarno Suni (8 at iki.fi)
> -#
> -# 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; either version 2 of the License, or
> -# (at your option) any later version.
> -#
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program; if not, write to the Free Software
> -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> -#
> -
> -PATH=/bin:/usr/bin
> -export PATH
> -
> -# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
> -for lock_cmd in \
> - "xscreensaver-command -lock" \
> - "gnome-screensaver-command --lock"
> -do
> - $lock_cmd >/dev/null 2>&1 && exit
> -done
> -
> -# else run another access locking utility, if installed
> -for lock_cmd in \
> - "xlock -mode blank" \
> - "slock"
> - do
> - set -- $lock_cmd
> - if command -v -- $1 >/dev/null 2>&1; then
> - $lock_cmd >/dev/null 2>&1 &
> - # turn off display backlight:
> - xset dpms force off
> - exit
> - fi
> -done
> -
> -# else access locking failed
> -exit 1
>
> === removed directory '.pc/xubuntu_ignore-gdm-lang.patch'
> === removed directory '.pc/xubuntu_ignore-gdm-lang.patch/xfce4-session'
> === removed file '.pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c'
> --- .pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c 1970-01-01 00:00:00 +0000
> @@ -1,334 +0,0 @@
> -/* $Id$ */
> -/*-
> - * Copyright (c) 2003-2006 Benedikt Meurer <benny at xfce.org>
> - * Copyright (c) 2008 Brian Tarricone <bjt23 at cornell.edu>
> - * All rights reserved.
> - *
> - * 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; either version 2, or (at your option)
> - * any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> - * MA 02110-1301 USA.
> - */
> -
> -#ifdef HAVE_CONFIG_H
> -#include <config.h>
> -#endif
> -
> -#ifdef HAVE_ERRNO_H
> -#include <errno.h>
> -#endif
> -#ifdef HAVE_FCNTL_H
> -#include <fcntl.h>
> -#endif
> -#ifdef HAVE_MEMORY_H
> -#include <memory.h>
> -#endif
> -#ifdef HAVE_SIGNAL_H
> -#include <signal.h>
> -#endif
> -#ifdef HAVE_STDLIB_H
> -#include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
> -#include <string.h>
> -#endif
> -#ifdef HAVE_UNISTD_H
> -#include <unistd.h>
> -#endif
> -
> -#include <dbus/dbus-glib.h>
> -#include <dbus/dbus-glib-lowlevel.h>
> -
> -#include <xfconf/xfconf.h>
> -
> -#include <gdk/gdkx.h>
> -#include <gtk/gtk.h>
> -
> -#include <libxfce4util/libxfce4util.h>
> -#include <libxfce4ui/libxfce4ui.h>
> -
> -#include <libxfsm/xfsm-util.h>
> -
> -#include <xfce4-session/ice-layer.h>
> -#include <xfce4-session/sm-layer.h>
> -#include <xfce4-session/xfsm-dns.h>
> -#include <xfce4-session/xfsm-global.h>
> -#include <xfce4-session/xfsm-manager.h>
> -#include <xfce4-session/xfsm-shutdown.h>
> -#include <xfce4-session/xfsm-startup.h>
> -#include <xfce4-session/xfsm-error.h>
> -
> -static gboolean opt_disable_tcp = FALSE;
> -static gboolean opt_version = FALSE;
> -
> -static GOptionEntry option_entries[] =
> -{
> - { "disable-tcp", '\0', 0, G_OPTION_ARG_NONE, &opt_disable_tcp, N_("Disable binding to TCP ports"), NULL },
> - { "version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL },
> - { NULL }
> -};
> -
> -static void
> -setup_environment (void)
> -{
> - const gchar *lang;
> - const gchar *sm;
> - gchar *authfile;
> - int fd;
> -
> - /* check that no other session manager is running */
> - sm = g_getenv ("SESSION_MANAGER");
> - if (sm != NULL && strlen (sm) > 0)
> - {
> - g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
> - exit (EXIT_FAILURE);
> - }
> -
> - /* check if running in verbose mode */
> - if (g_getenv ("XFSM_VERBOSE") != NULL)
> - xfsm_enable_verbose ();
> -
> - /* pass correct DISPLAY to children, in case of --display in argv */
> - g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE);
> -
> - /* this is for compatibility with the GNOME Display Manager */
> - lang = g_getenv ("GDM_LANG");
> - if (lang != NULL && strlen (lang) > 0)
> - {
> - g_setenv ("LANG", lang, TRUE);
> - g_unsetenv ("GDM_LANG");
> - }
> -
> - /* check access to $ICEAUTHORITY or $HOME/.ICEauthority if unset */
> - if (g_getenv ("ICEAUTHORITY"))
> - authfile = g_strdup (g_getenv ("ICEAUTHORITY"));
> - else
> - authfile = xfce_get_homefile (".ICEauthority", NULL);
> - fd = open (authfile, O_RDWR | O_CREAT, 0600);
> - if (fd < 0)
> - {
> - fprintf (stderr, "xfce4-session: Unable to access file %s: %s\n",
> - authfile, g_strerror (errno));
> - exit (EXIT_FAILURE);
> - }
> - g_free (authfile);
> - close (fd);
> -}
> -
> -static void
> -init_display (XfsmManager *manager,
> - GdkDisplay *dpy,
> - XfconfChannel *channel,
> - gboolean disable_tcp)
> -{
> - gchar *engine;
> -
> - engine = xfconf_channel_get_string (channel, "/splash/Engine", "mice");
> -
> - splash_screen = xfsm_splash_screen_new (dpy, engine);
> - g_free (engine);
> - xfsm_splash_screen_next (splash_screen, _("Loading desktop settings"));
> -
> - gdk_flush ();
> -
> - sm_init (channel, disable_tcp, manager);
> -
> - /* gtk resource files may have changed */
> - gtk_rc_reparse_all ();
> -}
> -
> -
> -static void
> -xfsm_dbus_init (void)
> -{
> - DBusGConnection *dbus_conn;
> - int ret;
> - GError *error = NULL;
> -
> - xfsm_error_dbus_init ();
> -
> - dbus_conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
> - if (G_UNLIKELY (!dbus_conn))
> - {
> - g_critical ("Unable to contact D-Bus session bus: %s", error ? error->message : "Unknown error");
> - if (error)
> - g_error_free (error);
> - return;
> - }
> -
> - ret = dbus_bus_request_name (dbus_g_connection_get_connection (dbus_conn),
> - "org.xfce.SessionManager",
> - DBUS_NAME_FLAG_DO_NOT_QUEUE,
> - NULL);
> - if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret)
> - {
> - g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
> - exit (EXIT_FAILURE);
> - }
> -}
> -
> -static void
> -xfsm_dbus_cleanup (void)
> -{
> - DBusGConnection *dbus_conn;
> -
> - /* this is all not really necessary, but... */
> -
> - dbus_conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
> - if (G_UNLIKELY (!dbus_conn))
> - return;
> -
> - dbus_bus_release_name (dbus_g_connection_get_connection (dbus_conn),
> - "org.xfce.SessionManager", NULL);
> -}
> -
> -static gboolean
> -xfsm_dbus_require_session (gint argc, gchar **argv)
> -{
> - gchar **new_argv;
> - gchar *path;
> - gint i;
> - guint m = 0;
> -
> - if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") != NULL)
> - return TRUE;
> -
> - path = g_find_program_in_path ("dbus-launch");
> - if (path == NULL)
> - {
> - g_critical ("dbus-launch not found, the desktop will not work properly!");
> - return TRUE;
> - }
> -
> - /* avoid rondtrips */
> - g_assert (!g_str_has_prefix (*argv, "dbus-launch"));
> -
> - new_argv = g_new0 (gchar *, argc + 4);
> - new_argv[m++] = path;
> - new_argv[m++] = "--sh-syntax";
> - new_argv[m++] = "--exit-with-session";
> -
> - for (i = 0; i < argc; i++)
> - new_argv[m++] = argv[i];
> -
> - if (!execvp ("dbus-launch", new_argv))
> - {
> - g_critical ("Could not spawn %s: %s", path, g_strerror (errno));
> - }
> -
> - g_free (path);
> - g_free (new_argv);
> -
> - return FALSE;
> -}
> -
> -int
> -main (int argc, char **argv)
> -{
> - XfsmManager *manager;
> - GError *error = NULL;
> - GdkDisplay *dpy;
> - XfconfChannel *channel;
> - XfsmShutdownType shutdown_type;
> - XfsmShutdown *shutdown_helper;
> - gboolean succeed = TRUE;
> -
> - if (!xfsm_dbus_require_session (argc, argv))
> - return EXIT_SUCCESS;
> -
> - xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
> -
> - /* install required signal handlers */
> - signal (SIGPIPE, SIG_IGN);
> -
> - if (!gtk_init_with_args (&argc, &argv, "", option_entries, GETTEXT_PACKAGE, &error))
> - {
> - g_print ("%s: %s.\n", G_LOG_DOMAIN, error->message);
> - g_print (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
> - g_print ("\n");
> - g_error_free (error);
> - return EXIT_FAILURE;
> - }
> -
> - if (opt_version)
> - {
> - g_print ("%s %s (Xfce %s)\n\n", G_LOG_DOMAIN, PACKAGE_VERSION, xfce_version_string ());
> - g_print ("%s\n", "Copyright (c) 2003-2012");
> - g_print ("\t%s\n\n", _("The Xfce development team. All rights reserved."));
> - g_print (_("Please report bugs to <%s>."), PACKAGE_BUGREPORT);
> - g_print ("\n");
> -
> - return EXIT_SUCCESS;
> - }
> -
> - if (!xfconf_init (&error))
> - {
> - xfce_dialog_show_error (NULL, error, _("Unable to contact settings server"));
> - g_error_free (error);
> - }
> -
> - /* fake a client id for the manager, so the legacy management does not
> - * recognize us to be a session client.
> - */
> - gdk_set_sm_client_id (xfsm_generate_client_id (NULL));
> -
> - xfsm_dbus_init ();
> -
> - manager = xfsm_manager_new ();
> - setup_environment ();
> -
> - channel = xfsm_open_config ();
> -
> - dpy = gdk_display_get_default ();
> - init_display (manager, dpy, channel, opt_disable_tcp);
> -
> - if (!opt_disable_tcp && xfconf_channel_get_bool (channel, "/security/EnableTcp", FALSE))
> - {
> - /* verify that the DNS settings are ok */
> - xfsm_splash_screen_next (splash_screen, _("Verifying DNS settings"));
> - xfsm_dns_check ();
> - }
> -
> - xfsm_splash_screen_next (splash_screen, _("Loading session data"));
> -
> - xfsm_startup_init (channel);
> - xfsm_manager_load (manager, channel);
> - xfsm_manager_restart (manager);
> -
> - gtk_main ();
> -
> - xfsm_startup_shutdown ();
> -
> - shutdown_type = xfsm_manager_get_shutdown_type (manager);
> -
> - /* take over the ref before we release the manager */
> - shutdown_helper = xfsm_shutdown_get ();
> -
> - g_object_unref (manager);
> - g_object_unref (channel);
> -
> - xfsm_dbus_cleanup ();
> - ice_cleanup ();
> -
> - if (shutdown_type == XFSM_SHUTDOWN_SHUTDOWN
> - || shutdown_type == XFSM_SHUTDOWN_RESTART)
> - {
> - succeed = xfsm_shutdown_try_type (shutdown_helper, shutdown_type, &error);
> - if (!succeed)
> - g_warning ("Failed to shutdown/restart: %s", ERROR_MSG (error));
> - }
> -
> - g_object_unref (shutdown_helper);
> -
> - return succeed ? EXIT_SUCCESS : EXIT_FAILURE;
> -}
>
> === removed directory '.pc/xubuntu_runtime-logind-support.patch'
> === removed file '.pc/xubuntu_runtime-logind-support.patch/configure.ac'
> --- .pc/xubuntu_runtime-logind-support.patch/configure.ac 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_runtime-logind-support.patch/configure.ac 1970-01-01 00:00:00 +0000
> @@ -1,216 +0,0 @@
> -dnl
> -dnl This file was autogenerated from "configure.ac.in".
> -dnl Edit that file instead!
> -dnl
> -
> -dnl
> -dnl Copyright (c) 2003-2009
> -dnl The Xfce development team. All rights reserved.
> -dnl
> -dnl Written for Xfce by Benedikt Meurer <benny at xfce.org>.
> -dnl
> -
> -dnl Version information
> -m4_define([xfsm_version_major], [4])
> -m4_define([xfsm_version_minor], [10])
> -m4_define([xfsm_version_micro], [1])
> -m4_define([xfsm_version_nano], []) dnl leave this empty to have no nano version
> -m4_define([xfsm_version_build], [c0409d7])
> -m4_define([xfsm_version_tag], [])
> -m4_define([xfsm_version], [xfsm_version_major().xfsm_version_minor().xfsm_version_micro()ifelse(xfsm_version_nano(), [], [], [.xfsm_version_nano()])ifelse(xfsm_version_tag(), [git], [xfsm_version_tag()-xfsm_version_build()], [xfsm_version_tag()])])
> -
> -m4_define([xfsm_debug_default], [ifelse(xfsm_version_tag(), [git], [full], [minimum])])
> -
> -dnl Initialize autoconf
> -AC_COPYRIGHT([Copyright (c) 2003-2011
> - The Xfce development team. All rights reserved.
> -
> -Written for Xfce by Benedikt Meurer <benny at xfce.org>.])
> -AC_INIT([xfce4-session], [xfsm_version], [http://bugs.xfce.org/])
> -AC_PREREQ([2.59c])
> -AC_REVISION([$Id$])
> -AC_PROG_MAKE_SET()
> -
> -dnl Initialize automake
> -AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip])
> -AC_CONFIG_HEADERS([config.h])
> -AM_MAINTAINER_MODE()
> -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
> -
> -dnl Set helper path prefix
> -AC_ARG_WITH([helper-path-prefix],
> - [AC_HELP_STRING([--with-helper-path-prefix=PATH],
> - [Path prefix under which helper executables will be installed (default: $libdir)])],
> - [HELPER_PATH_PREFIX="$withval"],
> - [HELPER_PATH_PREFIX="$libdir"])
> -AC_SUBST([HELPER_PATH_PREFIX])
> -
> -dnl check for UNIX variants
> -AC_USE_SYSTEM_EXTENSIONS
> -AM_CONDITIONAL([HAVE_OS_CYGWIN], [test x"`uname | grep \"CYGWIN\"`" != x""])
> -if test x"`uname | grep \"CYGWIN\"`" != x""; then
> - AC_DEFINE([HAVE_OS_CYGWIN], [1], [Compiling under cygwin])
> -fi
> -
> -dnl check for basic programs
> -AC_PROG_CC()
> -AM_PROG_CC_C_O()
> -AC_PROG_INSTALL()
> -AC_PROG_INTLTOOL()
> -m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
> -
> -dnl check for libtool
> -LT_PREREQ([2.2.6])
> -LT_INIT([disable-static])
> -
> -dnl check for standard header files
> -AC_HEADER_STDC
> -AC_CHECK_HEADERS([asm/unistd.h errno.h fcntl.h limits.h \
> - netdb.h pwd.h signal.h stdarg.h sys/param.h sys/resource.h \
> - sys/socket.h sys/time.h sys/wait.h sys/utsname.h time.h \
> - unistd.h sys/param.h sys/user.h sys/sysctl.h math.h sys/types.h])
> -AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname getpwuid setsid \
> - sigaction strdup sync vfork])
> -
> -dnl Check for required libraries
> -AC_CHECK_LIBM
> -AC_SUBST(LIBM)
> -
> -dnl Check for X11 installed
> -XDT_CHECK_LIBX11_REQUIRE()
> -
> -dnl Check for session management support
> -XDT_CHECK_LIBSM()
> -
> -dnl Check for _IceTransNoListen
> -ac_LIBS="$LIBS"
> -LIBS="$LIBS $LIBSM_LDFLAGS $LIBSM_LIBS"
> -AC_CHECK_FUNCS([_IceTransNoListen])
> -LIBS="$ac_LIBS"
> -
> -dnl Check for i18n support
> -XDT_I18N([am ar ast az be bg bn bn_IN ca cs da de dz el en_GB eo es es_MX et eu fa fi fr gl gu he hi hr hu id is it ja ka kk ko lt lv mk mr ms nb nl nn pa pl pt pt_BR ro ru si sk sq sr sv ta te tr ug uk ur ur_PK vi zh_CN zh_TW ])
> -
> -dnl Check for required packages
> -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
> -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0])
> -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
> -XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0])
> -XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.30])
> -XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0])
> -XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
> -XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
> -
> -dnl Check for polkit / systemd integration
> -XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
> - [systemd], [Systemd support (through polit)])
> -
> -dnl Check for debugging support
> -XDT_FEATURE_DEBUG([xfsm_debug_default])
> -
> -dnl Check for linker optimizations
> -XDT_FEATURE_LINKER_OPTS()
> -
> -dnl Check for iceauth
> -AC_PATH_PROG([ICEAUTH], [iceauth])
> -if test x"$ICEAUTH" != x""; then
> - AC_DEFINE_UNQUOTED([ICEAUTH_CMD], ["$ICEAUTH"], [path to iceauth])
> -else
> - AC_MSG_ERROR([iceauth missing, please check your X11 installation])
> -fi
> -
> -dnl Find a location for the session desktop file
> -AC_MSG_CHECKING([what xsession-prefix to use])
> -AC_ARG_WITH([xsession-prefix],
> - AC_HELP_STRING([--with-xsession-prefix=XSESSION_PREFIX], [What should be the prefix for the xsession .desktop file?]),
> - [], [with_xsession_prefix="/usr"])
> -XSESSION_PREFIX=$with_xsession_prefix
> -AC_SUBST([XSESSION_PREFIX])
> -AC_MSG_RESULT([$with_xsession_prefix])
> -
> -dnl Check for rm
> -AC_PATH_PROG([RM], [rm])
> -if test x"$RM" != x""; then
> - AC_DEFINE_UNQUOTED([RM_CMD], ["$RM"], [path to rm])
> -fi
> -
> -dnl Check for legacy session management
> -AC_ARG_ENABLE([legacy-sm],
> -AC_HELP_STRING([--enable-legacy-sm], [Enable X11R5 session management])
> -AC_HELP_STRING([--disable-legacy-sm], [Disable X11R5 session management]),
> - [], [enable_legacy_sm=yes])
> -AC_MSG_CHECKING([whether to enable X11R5 session management])
> -if test x"$enable_legacy_sm" != x"yes"; then
> - AC_MSG_RESULT([no])
> -else
> - AC_DEFINE([LEGACY_SESSION_MANAGEMENT], [1], [Define for X11R5 sm compat])
> - AC_MSG_RESULT([yes])
> -fi
> -
> -dnl check for linux/ioprio.h, and also check that the header actually
> -dnl works, as some kernels have bad headers. using AC_CHECK_HEADERS()
> -dnl prints a scary warning with a request to report a bug if it fails,
> -dnl but we do not want that.
> -AC_MSG_CHECKING([whether linux/ioprio.h exists and actually works])
> -AC_COMPILE_IFELSE([
> -AC_INCLUDES_DEFAULT
> -#include <linux/ioprio.h>
> - ], [linux_ioprio_works=yes], [linux_ioprio_works=no])
> -AC_MSG_RESULT([$linux_ioprio_works])
> -if test "x$linux_ioprio_works" = "xyes"; then
> - AC_DEFINE([HAVE_WORKING_LINUX_IOPRIO_H], [1],
> - [Defined if linux/ioprio.h not only exists, but works properly])
> -fi
> -
> -dnl check for location Xfce glade files were installed to
> -XFCE_GLADE_CATALOG_PATH="`pkg-config --variable glade_catalogdir libxfce4ui-1`"
> -XFCE_GLADE_PIXMAP_PATH="`pkg-config --variable glade_pixmapdir libxfce4ui-1`"
> -XFCE_GLADE_MODULE_PATH="`pkg-config --variable glade_moduledir libxfce4ui-1`"
> -AC_SUBST(XFCE_GLADE_CATALOG_PATH)
> -AC_SUBST(XFCE_GLADE_PIXMAP_PATH)
> -AC_SUBST(XFCE_GLADE_MODULE_PATH)
> -
> -AC_OUTPUT([
> -Makefile
> -doc/Makefile
> -engines/Makefile
> -engines/balou/Makefile
> -engines/balou/scripts/Makefile
> -engines/balou/themes/Makefile
> -engines/balou/themes/Default/Makefile
> -engines/mice/Makefile
> -engines/simple/Makefile
> -icons/Makefile
> -icons/48x48/Makefile
> -icons/128x128/Makefile
> -icons/scalable/Makefile
> -libxfsm/Makefile
> -libxfsm/xfce4-session-2.0.pc
> -po/Makefile.in
> -settings/Makefile
> -scripts/Makefile
> -scripts/xinitrc.in
> -xfce4-session/Makefile
> -xfce4-session-logout/Makefile
> -xfsm-shutdown-helper/Makefile
> -])
> -
> -dnl ***************************
> -dnl *** Print configuration ***
> -dnl ***************************
> -echo
> -echo "Build Configuration:"
> -echo
> -echo " * Debugging support: $enable_debug"
> -if test x"$enable_legacy_sm" = x"yes"; then
> -echo " * Legacy session management: yes"
> -else
> -echo " * Legacy session management: no"
> -fi
> -if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
> -echo " * Gnome Keyring support: yes"
> -else
> -echo " * Gnome Keyring support: no"
> -fi
> -
> -echo
>
> === removed directory '.pc/xubuntu_runtime-logind-support.patch/xfce4-session'
> === removed file '.pc/xubuntu_runtime-logind-support.patch/xfce4-session/Makefile.am'
> --- .pc/xubuntu_runtime-logind-support.patch/xfce4-session/Makefile.am 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_runtime-logind-support.patch/xfce4-session/Makefile.am 1970-01-01 00:00:00 +0000
> @@ -1,143 +0,0 @@
> -
> -AM_CPPFLAGS = \
> - -I$(top_builddir) \
> - -I$(top_srcdir) \
> - -DG_LOG_DOMAIN=\"xfce4-session\" \
> - -DLIBDIR=\"$(libdir)\" \
> - -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
> - -DSYSCONFDIR=\"$(sysconfdir)\" \
> - -DXFSM_SHUTDOWN_HELPER_CMD=\"$(HELPER_PATH_PREFIX)/xfce4/session/xfsm-shutdown-helper\" \
> - -DDBUS_API_SUBJECT_TO_CHANGE \
> - -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
> - $(PLATFORM_CPPFLAGS)
> -
> -man_MANS = xfce4-session.1
> -
> -bin_PROGRAMS = xfce4-session
> -
> -xfce4_session_built_sources = \
> - xfsm-chooser-icon.h \
> - xfsm-client-dbus.h \
> - xfsm-manager-dbus.h \
> - xfsm-marshal.c \
> - xfsm-marshal.h
> -
> -xfce4_session_SOURCES = \
> - $(xfce4_session_built_sources) \
> - ice-layer.c \
> - ice-layer.h \
> - main.c \
> - sm-layer.c \
> - sm-layer.h \
> - xfsm-chooser.c \
> - xfsm-chooser.h \
> - xfsm-client.c \
> - xfsm-client.h \
> - xfsm-client-dbus.h \
> - xfsm-compat-gnome.c \
> - xfsm-compat-gnome.h \
> - xfsm-compat-kde.c \
> - xfsm-compat-kde.h \
> - xfsm-dns.c \
> - xfsm-dns.h \
> - xfsm-error.c \
> - xfsm-error.h \
> - xfsm-fadeout.c \
> - xfsm-fadeout.h \
> - xfsm-global.c \
> - xfsm-global.h \
> - xfsm-legacy.c \
> - xfsm-legacy.h \
> - xfsm-logout-dialog.c \
> - xfsm-logout-dialog.h \
> - xfsm-manager.c \
> - xfsm-manager.h \
> - xfsm-properties.c \
> - xfsm-properties.h \
> - xfsm-shutdown.c \
> - xfsm-shutdown.h \
> - xfsm-splash-screen.c \
> - xfsm-splash-screen.h \
> - xfsm-startup.c \
> - xfsm-startup.h \
> - xfsm-upower.c \
> - xfsm-upower.h
> -
> -if HAVE_SYSTEMD
> -xfce4_session_SOURCES += \
> - xfsm-systemd.c \
> - xfsm-systemd.h
> -else
> -xfce4_session_SOURCES += \
> - xfsm-consolekit.c \
> - xfsm-consolekit.h
> -endif
> -
> -xfce4_session_CFLAGS = \
> - $(LIBSM_CFLAGS) \
> - $(LIBX11_CFLAGS) \
> - $(LIBXFCE4UI_CFLAGS) \
> - $(DBUS_CFLAGS) \
> - $(DBUS_GLIB_CFLAGS) \
> - $(LIBWNCK_CFLAGS) \
> - $(SYSTEMD_CFLAGS) \
> - $(XFCONF_CFLAGS) \
> - $(GMODULE_CFLAGS) \
> - $(PLATFORM_CFLAGS)
> -
> -xfce4_session_LDFLAGS = \
> - -no-undefined \
> - $(PLATFORM_LDFLAGS)
> -
> -xfce4_session_LDADD = \
> - $(top_builddir)/libxfsm/libxfsm-4.6.la \
> - $(LIBSM_LDFLAGS) \
> - $(LIBSM_LIBS) \
> - $(LIBX11_LDFLAGS) \
> - $(LIBX11_LIBS) \
> - $(LIBXFCE4UI_LIBS) \
> - $(GMODULE_LIBS) \
> - $(DBUS_LIBS) \
> - $(DBUS_GLIB_LIBS) \
> - $(LIBWNCK_LIBS) \
> - $(SYSTEMD_LIBS) \
> - $(XFCONF_LIBS) \
> - -lm
> -
> -xfce4_session_DEPENDENCIES = \
> - $(top_builddir)/libxfsm/libxfsm-4.6.la
> -
> -if MAINTAINER_MODE
> -
> -xfsm-chooser-icon.h: $(srcdir)/xfsm-chooser-icon.png
> - $(AM_V_GEN) gdk-pixbuf-csource --static --raw --stream --name=xfsm_chooser_icon_data $< > $@
> -
> -xfsm-marshal.h: $(srcdir)/xfsm-marshal.list Makefile
> - $(AM_V_GEN) glib-genmarshal --prefix=xfsm_marshal --internal --header $< > $@
> -
> -xfsm-marshal.c: $(srcdir)/xfsm-marshal.list Makefile
> - $(AM_V_GEN) echo "#include <xfce4-session/xfsm-marshal.h>" > $@ \
> - && glib-genmarshal --prefix=xfsm_marshal --body $< >> $@
> -
> -xfsm-manager-dbus.h: $(srcdir)/xfsm-manager-dbus.xml
> - $(AM_V_GEN) dbus-binding-tool --mode=glib-server --prefix=xfsm_manager $< > $@
> -
> -xfsm-client-dbus.h: $(srcdir)/xfsm-client-dbus.xml
> - $(AM_V_GEN) dbus-binding-tool --mode=glib-server --prefix=xfsm_client $< > $@
> -
> -DISTCLEANFILES = \
> - $(xfce4_session_built_sources)
> -
> -BUILT_SOURCES = \
> - $(xfce4_session_built_sources)
> -
> -endif
> -
> -EXTRA_DIST = \
> - $(man_MANS) \
> - xfsm-chooser-icon.png \
> - xfsm-marshal.list \
> - xfsm-client-dbus.xml \
> - xfsm-manager-dbus.xml
> -
> -# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
>
> === removed file '.pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c'
> --- .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c 1970-01-01 00:00:00 +0000
> @@ -1,818 +0,0 @@
> -/*-
> - * Copyright (c) 2003-2004 Benedikt Meurer <benny at xfce.org>
> - * Copyright (c) 2011 Nick Schermer <nick at xfce.org>
> - * All rights reserved.
> - *
> - * 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; either version 2, or (at your option)
> - * any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> - * MA 02110-1301 USA.
> - *
> - * Parts of this file where taken from gnome-session/logout.c, which
> - * was written by Owen Taylor <otaylor at redhat.com>.
> - */
> -
> -#ifdef HAVE_CONFIG_H
> -#include <config.h>
> -#endif
> -
> -#ifdef HAVE_SYS_TYPES_H
> -#include <sys/types.h>
> -#endif
> -#ifdef HAVE_SYS_WAIT_H
> -#include <sys/wait.h>
> -#endif
> -#ifdef HAVE_SYS_RESOURCE_H
> -#include <sys/resource.h>
> -#endif
> -
> -#ifdef HAVE_STDLIB_H
> -#include <stdlib.h>
> -#endif
> -#ifdef HAVE_STRING_H
> -#include <string.h>
> -#endif
> -#ifdef HAVE_UNISTD_H
> -#include <unistd.h>
> -#endif
> -#ifdef HAVE_ERRNO_H
> -#include <errno.h>
> -#endif
> -#ifdef HAVE_SIGNAL_H
> -#include <signal.h>
> -#endif
> -
> -
> -#include <dbus/dbus-glib.h>
> -#include <dbus/dbus-glib-lowlevel.h>
> -#include <libxfce4util/libxfce4util.h>
> -#include <gtk/gtk.h>
> -
> -#include <libxfsm/xfsm-util.h>
> -
> -#include <xfce4-session/xfsm-shutdown.h>
> -#include <xfce4-session/xfsm-compat-gnome.h>
> -#include <xfce4-session/xfsm-compat-kde.h>
> -#include <xfce4-session/xfsm-fadeout.h>
> -#include <xfce4-session/xfsm-global.h>
> -#include <xfce4-session/xfsm-legacy.h>
> -#include <xfce4-session/xfsm-upower.h>
> -
> -#ifdef HAVE_SYSTEMD
> -#include <xfce4-session/xfsm-systemd.h>
> -#else
> -#include <xfce4-session/xfsm-consolekit.h>
> -#endif
> -
> -static void xfsm_shutdown_finalize (GObject *object);
> -static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown);
> -
> -
> -
> -struct _XfsmShutdownClass
> -{
> - GObjectClass __parent__;
> -};
> -
> -typedef enum
> -{
> - SUDO_NOT_INITIAZED,
> - SUDO_AVAILABLE,
> - SUDO_FAILED
> -}
> -HelperState;
> -
> -struct _XfsmShutdown
> -{
> - GObject __parent__;
> -
> -#ifdef HAVE_SYSTEMD
> - XfsmSystemd *systemd;
> -#else
> - XfsmConsolekit *consolekit;
> -#endif
> - XfsmUPower *upower;
> -
> - /* kiosk settings */
> - gboolean kiosk_can_shutdown;
> - gboolean kiosk_can_save_session;
> -
> - /* sudo helper */
> - HelperState helper_state;
> - pid_t helper_pid;
> - FILE *helper_infile;
> - FILE *helper_outfile;
> - guint helper_watchid;
> - gboolean helper_require_password;
> -};
> -
> -
> -
> -G_DEFINE_TYPE (XfsmShutdown, xfsm_shutdown, G_TYPE_OBJECT)
> -
> -
> -
> -static void
> -xfsm_shutdown_class_init (XfsmShutdownClass *klass)
> -{
> - GObjectClass *gobject_class;
> -
> - gobject_class = G_OBJECT_CLASS (klass);
> - gobject_class->finalize = xfsm_shutdown_finalize;
> -}
> -
> -
> -
> -static void
> -xfsm_shutdown_init (XfsmShutdown *shutdown)
> -{
> - XfceKiosk *kiosk;
> -
> -#ifdef HAVE_SYSTEMD
> - shutdown->systemd = xfsm_systemd_get ();
> -#else
> - shutdown->consolekit = xfsm_consolekit_get ();
> -#endif
> - shutdown->upower = xfsm_upower_get ();
> - shutdown->helper_state = SUDO_NOT_INITIAZED;
> - shutdown->helper_require_password = FALSE;
> -
> - /* check kiosk */
> - kiosk = xfce_kiosk_new ("xfce4-session");
> - shutdown->kiosk_can_shutdown = xfce_kiosk_query (kiosk, "Shutdown");
> - shutdown->kiosk_can_save_session = xfce_kiosk_query (kiosk, "SaveSession");
> - xfce_kiosk_free (kiosk);
> -}
> -
> -
> -
> -static void
> -xfsm_shutdown_finalize (GObject *object)
> -{
> - XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
> -
> -#ifdef HAVE_SYSTEMD
> - g_object_unref (G_OBJECT (shutdown->systemd));
> -#else
> - g_object_unref (G_OBJECT (shutdown->consolekit));
> -#endif
> - g_object_unref (G_OBJECT (shutdown->upower));
> -
> - /* close down helper */
> - xfsm_shutdown_sudo_free (shutdown);
> -
> - (*G_OBJECT_CLASS (xfsm_shutdown_parent_class)->finalize) (object);
> -}
> -
> -
> -
> -static void
> -xfsm_shutdown_sudo_free (XfsmShutdown *shutdown)
> -{
> - gint status;
> -
> - /* close down helper */
> - if (shutdown->helper_infile != NULL)
> - {
> - fclose (shutdown->helper_infile);
> - shutdown->helper_infile = NULL;
> - }
> -
> - if (shutdown->helper_outfile != NULL)
> - {
> - fclose (shutdown->helper_outfile);
> - shutdown->helper_outfile = NULL;
> - }
> -
> - if (shutdown->helper_watchid > 0)
> - {
> - g_source_remove (shutdown->helper_watchid);
> - shutdown->helper_watchid = 0;
> - }
> -
> - if (shutdown->helper_pid > 0)
> - {
> - waitpid (shutdown->helper_pid, &status, 0);
> - shutdown->helper_pid = 0;
> - }
> -
> - /* reset state */
> - shutdown->helper_state = SUDO_NOT_INITIAZED;
> -}
> -
> -
> -
> -static void
> -xfsm_shutdown_sudo_childwatch (GPid pid,
> - gint status,
> - gpointer data)
> -{
> - /* close down sudo stuff */
> - xfsm_shutdown_sudo_free (XFSM_SHUTDOWN (data));
> -}
> -
> -
> -
> -static gboolean
> -xfsm_shutdown_sudo_init (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - gchar *cmd;
> - struct rlimit rlp;
> - gchar buf[15];
> - gint parent_pipe[2];
> - gint child_pipe[2];
> - gint n;
> -
> - /* return state if we succeeded */
> - if (shutdown->helper_state != SUDO_NOT_INITIAZED)
> - return shutdown->helper_state == SUDO_AVAILABLE;
> -
> - g_return_val_if_fail (shutdown->helper_infile == NULL, FALSE);
> - g_return_val_if_fail (shutdown->helper_outfile == NULL, FALSE);
> - g_return_val_if_fail (shutdown->helper_watchid == 0, FALSE);
> - g_return_val_if_fail (shutdown->helper_pid == 0, FALSE);
> -
> - /* assume it won't work for now */
> - shutdown->helper_state = SUDO_FAILED;
> -
> - cmd = g_find_program_in_path ("sudo");
> - if (G_UNLIKELY (cmd == NULL))
> - {
> - g_set_error_literal (error, 1, 0,
> - "The program \"sudo\" was not found");
> - return FALSE;
> - }
> -
> - if (pipe (parent_pipe) == -1)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to create parent pipe: %s",
> - strerror (errno));
> - goto err0;
> - }
> -
> - if (pipe (child_pipe) == -1)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to create child pipe: %s",
> - strerror (errno));
> - goto err1;
> - }
> -
> - shutdown->helper_pid = fork ();
> - if (shutdown->helper_pid < 0)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to fork sudo helper: %s",
> - strerror (errno));
> - goto err2;
> - }
> - else if (shutdown->helper_pid == 0)
> - {
> - /* setup signals */
> - signal (SIGPIPE, SIG_IGN);
> -
> - /* setup environment */
> - g_setenv ("LC_ALL", "C", TRUE);
> - g_setenv ("LANG", "C", TRUE);
> - g_setenv ("LANGUAGE", "C", TRUE);
> -
> - /* setup the 3 standard file handles */
> - dup2 (child_pipe[0], STDIN_FILENO);
> - dup2 (parent_pipe[1], STDOUT_FILENO);
> - dup2 (parent_pipe[1], STDERR_FILENO);
> -
> - /* close all other file handles */
> - getrlimit (RLIMIT_NOFILE, &rlp);
> - for (n = 0; n < (gint) rlp.rlim_cur; ++n)
> - {
> - if (n != STDIN_FILENO && n != STDOUT_FILENO && n != STDERR_FILENO)
> - close (n);
> - }
> -
> - /* execute sudo with the helper */
> - execl (cmd, "sudo", "-H", "-S", "-p",
> - "XFSM_SUDO_PASS ", "--",
> - XFSM_SHUTDOWN_HELPER_CMD, NULL);
> -
> - g_free (cmd);
> - cmd = NULL;
> -
> - _exit (127);
> - }
> - else
> - {
> - /* watch the sudo helper */
> - shutdown->helper_watchid = g_child_watch_add (shutdown->helper_pid,
> - xfsm_shutdown_sudo_childwatch,
> - shutdown);
> - }
> -
> - /* read sudo/helper answer */
> - n = read (parent_pipe[0], buf, sizeof (buf));
> - if (n < 15)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to read response from sudo helper: %s",
> - n < 0 ? strerror (errno) : "Unknown error");
> - goto err2;
> - }
> -
> - /* open pipe to receive replies from sudo */
> - shutdown->helper_infile = fdopen (parent_pipe[0], "r");
> - if (shutdown->helper_infile == NULL)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to open parent pipe: %s",
> - strerror (errno));
> - goto err2;
> - }
> - close (parent_pipe[1]);
> -
> - /* open pipe to send passwords to sudo */
> - shutdown->helper_outfile = fdopen (child_pipe[1], "w");
> - if (shutdown->helper_outfile == NULL)
> - {
> - g_set_error (error, 1, 0,
> - "Unable to open parent pipe: %s",
> - strerror (errno));
> - goto err2;
> - }
> - close (child_pipe[0]);
> -
> - /* check if NOPASSWD is set in /etc/sudoers */
> - if (memcmp (buf, "XFSM_SUDO_PASS ", 15) == 0)
> - {
> - shutdown->helper_require_password = TRUE;
> - }
> - else if (memcmp (buf, "XFSM_SUDO_DONE ", 15) == 0)
> - {
> - shutdown->helper_require_password = FALSE;
> - }
> - else
> - {
> - g_set_error (error, 1, 0,
> - "Got unexpected reply from sudo shutdown helper");
> - goto err2;
> - }
> -
> - /* if we try again */
> - shutdown->helper_state = SUDO_AVAILABLE;
> -
> - return TRUE;
> -
> -err2:
> - xfsm_shutdown_sudo_free (shutdown);
> -
> - close (child_pipe[0]);
> - close (child_pipe[1]);
> -
> -err1:
> - close (parent_pipe[0]);
> - close (parent_pipe[1]);
> -
> -err0:
> - g_free (cmd);
> -
> - shutdown->helper_pid = 0;
> -
> - return FALSE;
> -}
> -
> -
> -
> -static gboolean
> -xfsm_shutdown_sudo_try_action (XfsmShutdown *shutdown,
> - XfsmShutdownType type,
> - GError **error)
> -{
> - const gchar *action;
> - gchar reply[256];
> -
> - g_return_val_if_fail (shutdown->helper_state == SUDO_AVAILABLE, FALSE);
> - g_return_val_if_fail (shutdown->helper_outfile != NULL, FALSE);
> - g_return_val_if_fail (shutdown->helper_infile != NULL, FALSE);
> - g_return_val_if_fail (type == XFSM_SHUTDOWN_SHUTDOWN
> - || type == XFSM_SHUTDOWN_RESTART, FALSE);
> -
> - /* the command we send to sudo */
> - if (type == XFSM_SHUTDOWN_SHUTDOWN)
> - action = "POWEROFF";
> - else if (type == XFSM_SHUTDOWN_RESTART)
> - action = "REBOOT";
> - else
> - return FALSE;
> -
> - /* write action to sudo helper */
> - if (fprintf (shutdown->helper_outfile, "%s\n", action) > 0)
> - fflush (shutdown->helper_outfile);
> -
> - /* check if the write succeeded */
> - if (ferror (shutdown->helper_outfile) != 0)
> - {
> - /* probably succeeded but the helper got killed */
> - if (errno == EINTR)
> - return TRUE;
> -
> - g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
> - _("Error sending command to shutdown helper: %s"),
> - strerror (errno));
> - return FALSE;
> - }
> -
> - /* get responce from sudo helper */
> - if (fgets (reply, sizeof (reply), shutdown->helper_infile) == NULL)
> - {
> - /* probably succeeded but the helper got killed */
> - if (errno == EINTR)
> - return TRUE;
> -
> - g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
> - _("Error receiving response from shutdown helper: %s"),
> - strerror (errno));
> - return FALSE;
> - }
> -
> - if (strncmp (reply, "SUCCEED", 7) != 0)
> - {
> - g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
> - _("Shutdown command failed"));
> -
> - return FALSE;
> - }
> -
> - return TRUE;
> -}
> -
> -
> -
> -static XfsmPassState
> -xfsm_shutdown_sudo_send_password (XfsmShutdown *shutdown,
> - const gchar *password)
> -{
> - gchar buf[1024];
> - gsize len_buf, len_send;
> - gint fd;
> - gsize len;
> - gssize result;
> - gint attempts;
> - const gchar *errmsg = NULL;
> -
> - g_return_val_if_fail (shutdown->helper_state == SUDO_AVAILABLE, PASSWORD_FAILED);
> - g_return_val_if_fail (shutdown->helper_outfile != NULL, PASSWORD_FAILED);
> - g_return_val_if_fail (shutdown->helper_infile != NULL, PASSWORD_FAILED);
> - g_return_val_if_fail (shutdown->helper_require_password, PASSWORD_FAILED);
> - g_return_val_if_fail (password != NULL, PASSWORD_FAILED);
> -
> - /* write password to sudo helper */
> - g_snprintf (buf, sizeof (buf), "%s\n", password);
> - len_buf = strlen (buf);
> - len_send = fwrite (buf, 1, len_buf, shutdown->helper_outfile);
> - fflush (shutdown->helper_outfile);
> - bzero (buf, len_buf);
> -
> - if (len_send != len_buf
> - || ferror (shutdown->helper_outfile) != 0)
> - {
> - errmsg = "Failed to send password to sudo";
> - goto err1;
> - }
> -
> - fd = fileno (shutdown->helper_infile);
> -
> - for (len = 0, attempts = 0;;)
> - {
> - result = read (fd, buf + len, 256 - len);
> -
> - if (result < 0)
> - {
> - errmsg = "Failed to read data from sudo";
> - goto err1;
> - }
> - else if (result == 0)
> - {
> - /* don't try too often */
> - if (++attempts > 20)
> - {
> - errmsg = "Too many password attempts";
> - goto err1;
> - }
> -
> - continue;
> - }
> - else if (result + len >= sizeof (buf))
> - {
> - errmsg = "Received too much data from sudo";
> - goto err1;
> - }
> -
> - len += result;
> - buf[len] = '\0';
> -
> - if (len >= 15)
> - {
> - if (g_str_has_suffix (buf, "XFSM_SUDO_PASS "))
> - {
> - return PASSWORD_RETRY;
> - }
> - else if (g_str_has_suffix (buf, "XFSM_SUDO_DONE "))
> - {
> - /* sudo is unlocked, no further passwords required */
> - shutdown->helper_require_password = FALSE;
> -
> - return PASSWORD_SUCCEED;
> - }
> - }
> - }
> -
> - return PASSWORD_FAILED;
> -
> - err1:
> -
> - g_printerr (PACKAGE_NAME ": %s.\n\n", errmsg);
> - return PASSWORD_FAILED;
> -}
> -
> -
> -
> -static gboolean
> -xfsm_shutdown_kiosk_can_shutdown (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - if (!shutdown->kiosk_can_shutdown)
> - {
> - g_set_error_literal (error, 1, 0, _("Shutdown is blocked by the kiosk settings"));
> - return FALSE;
> - }
> -
> - return TRUE;
> -}
> -
> -
> -
> -XfsmShutdown *
> -xfsm_shutdown_get (void)
> -{
> - static XfsmShutdown *object = NULL;
> -
> - if (G_LIKELY (object != NULL))
> - {
> - g_object_ref (G_OBJECT (object));
> - }
> - else
> - {
> - object = g_object_new (XFSM_TYPE_SHUTDOWN, NULL);
> - g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object);
> - }
> -
> - return object;
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_password_require (XfsmShutdown *shutdown,
> - XfsmShutdownType type)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - /* the helper only handled shutdown and restart */
> - if (type == XFSM_SHUTDOWN_SHUTDOWN || type == XFSM_SHUTDOWN_RESTART)
> - return shutdown->helper_require_password;
> -
> - return FALSE;
> -}
> -
> -
> -
> -XfsmPassState
> -xfsm_shutdown_password_send (XfsmShutdown *shutdown,
> - XfsmShutdownType type,
> - const gchar *password)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), PASSWORD_FAILED);
> - g_return_val_if_fail (password != NULL, PASSWORD_FAILED);
> -
> - if ((type == XFSM_SHUTDOWN_SHUTDOWN || type == XFSM_SHUTDOWN_RESTART)
> - && shutdown->helper_state == SUDO_AVAILABLE)
> - return xfsm_shutdown_sudo_send_password (shutdown, password);
> -
> - return PASSWORD_FAILED;
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_try_type (XfsmShutdown *shutdown,
> - XfsmShutdownType type,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - switch (type)
> - {
> - case XFSM_SHUTDOWN_SHUTDOWN:
> - return xfsm_shutdown_try_shutdown (shutdown, error);
> -
> - case XFSM_SHUTDOWN_RESTART:
> - return xfsm_shutdown_try_restart (shutdown, error);
> -
> - case XFSM_SHUTDOWN_SUSPEND:
> - return xfsm_shutdown_try_suspend (shutdown, error);
> -
> - case XFSM_SHUTDOWN_HIBERNATE:
> - return xfsm_shutdown_try_hibernate (shutdown, error);
> -
> - default:
> - g_set_error (error, 1, 0, _("Unknown shutdown method %d"), type);
> - break;
> - }
> -
> - return FALSE;
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_try_restart (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, error))
> - return FALSE;
> -
> - if (shutdown->helper_state == SUDO_AVAILABLE)
> - return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
> - else
> -#ifdef HAVE_SYSTEMD
> - return xfsm_systemd_try_restart (shutdown->systemd, error);
> -#else
> - return xfsm_consolekit_try_restart (shutdown->consolekit, error);
> -#endif
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, error))
> - return FALSE;
> -
> - if (shutdown->helper_state == SUDO_AVAILABLE)
> - return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
> - else
> -#ifdef HAVE_SYSTEMD
> - return xfsm_systemd_try_shutdown (shutdown->systemd, error);
> -#else
> - return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
> -#endif
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_try_suspend (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - return xfsm_upower_try_suspend (shutdown->upower, error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_try_hibernate (XfsmShutdown *shutdown,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - return xfsm_upower_try_hibernate (shutdown->upower, error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_can_restart (XfsmShutdown *shutdown,
> - gboolean *can_restart,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
> - {
> - *can_restart = FALSE;
> - return TRUE;
> - }
> -
> -#ifdef HAVE_SYSTEMD
> - if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
> -#else
> - if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
> -#endif
> - return TRUE;
> -
> - if (xfsm_shutdown_sudo_init (shutdown, error))
> - {
> - *can_restart = TRUE;
> - return TRUE;
> - }
> -
> - return FALSE;
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown,
> - gboolean *can_shutdown,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
> - {
> - *can_shutdown = FALSE;
> - return TRUE;
> - }
> -
> -#ifdef HAVE_SYSTEMD
> - if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
> -#else
> - if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
> -#endif
> - return TRUE;
> -
> - if (xfsm_shutdown_sudo_init (shutdown, error))
> - {
> - *can_shutdown = TRUE;
> - return TRUE;
> - }
> -
> - return FALSE;
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_can_suspend (XfsmShutdown *shutdown,
> - gboolean *can_suspend,
> - gboolean *auth_suspend,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
> - {
> - *can_suspend = FALSE;
> - return TRUE;
> - }
> -
> - return xfsm_upower_can_suspend (shutdown->upower, can_suspend,
> - auth_suspend, error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_can_hibernate (XfsmShutdown *shutdown,
> - gboolean *can_hibernate,
> - gboolean *auth_hibernate,
> - GError **error)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> -
> - if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
> - {
> - *can_hibernate = FALSE;
> - return TRUE;
> - }
> -
> - return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
> - auth_hibernate, error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_shutdown_can_save_session (XfsmShutdown *shutdown)
> -{
> - g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
> - return shutdown->kiosk_can_save_session;
> -}
>
> === removed file '.pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c'
> --- .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c 1970-01-01 00:00:00 +0000
> @@ -1,229 +0,0 @@
> -/*-
> - * Copyright (C) 2012 Christian Hesse
> - *
> - * 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; either version 2, or (at your option)
> - * any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> - * MA 02110-1301 USA.
> - */
> -
> -#include <config.h>
> -
> -#include <gio/gio.h>
> -#include <polkit/polkit.h>
> -#include <dbus/dbus-glib.h>
> -#include <dbus/dbus-glib-lowlevel.h>
> -
> -#include <xfce4-session/xfsm-systemd.h>
> -
> -
> -
> -#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
> -#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
> -#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
> -#define SYSTEMD_REBOOT_ACTION "Reboot"
> -#define SYSTEMD_POWEROFF_ACTION "PowerOff"
> -#define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot"
> -#define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off"
> -
> -
> -
> -static void xfsm_systemd_finalize (GObject *object);
> -
> -
> -
> -struct _XfsmSystemdClass
> -{
> - GObjectClass __parent__;
> -};
> -
> -struct _XfsmSystemd
> -{
> - GObject __parent__;
> -
> - PolkitAuthority *authority;
> - PolkitSubject *subject;
> -};
> -
> -
> -
> -G_DEFINE_TYPE (XfsmSystemd, xfsm_systemd, G_TYPE_OBJECT)
> -
> -
> -
> -static void
> -xfsm_systemd_class_init (XfsmSystemdClass *klass)
> -{
> - GObjectClass *gobject_class;
> -
> - gobject_class = G_OBJECT_CLASS (klass);
> - gobject_class->finalize = xfsm_systemd_finalize;
> -}
> -
> -
> -
> -static void
> -xfsm_systemd_init (XfsmSystemd *systemd)
> -{
> - systemd->authority = polkit_authority_get_sync (NULL, NULL);
> - systemd->subject = polkit_unix_process_new (getpid());
> -}
> -
> -
> -
> -static void
> -xfsm_systemd_finalize (GObject *object)
> -{
> - XfsmSystemd *systemd = XFSM_SYSTEMD (object);
> -
> - g_object_unref (G_OBJECT (systemd->authority));
> - g_object_unref (G_OBJECT (systemd->subject));
> -
> - (*G_OBJECT_CLASS (xfsm_systemd_parent_class)->finalize) (object);
> -}
> -
> -
> -static gboolean
> -xfsm_systemd_can_method (XfsmSystemd *systemd,
> - gboolean *can_method,
> - const gchar *method,
> - GError **error)
> -{
> - PolkitAuthorizationResult *res;
> - GError *local_error = NULL;
> -
> - *can_method = FALSE;
> -
> - res = polkit_authority_check_authorization_sync (systemd->authority,
> - systemd->subject,
> - method,
> - NULL,
> - POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
> - NULL,
> - &local_error);
> -
> - if (res == NULL)
> - {
> - g_propagate_error (error, local_error);
> - return FALSE;
> - }
> -
> - *can_method = polkit_authorization_result_get_is_authorized (res)
> - || polkit_authorization_result_get_is_challenge (res);
> -
> - g_object_unref (G_OBJECT (res));
> -
> - return TRUE;
> -}
> -
> -
> -
> -static gboolean
> -xfsm_systemd_try_method (XfsmSystemd *systemd,
> - const gchar *method,
> - GError **error)
> -{
> - GDBusConnection *bus;
> - GError *local_error = NULL;
> -
> - bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, error);
> - if (G_UNLIKELY (bus == NULL))
> - return FALSE;
> -
> - g_dbus_connection_call_sync (bus,
> - SYSTEMD_DBUS_NAME,
> - SYSTEMD_DBUS_PATH,
> - SYSTEMD_DBUS_INTERFACE,
> - method,
> - g_variant_new ("(b)", TRUE),
> - NULL, 0, G_MAXINT, NULL,
> - &local_error);
> -
> - g_object_unref (G_OBJECT (bus));
> -
> - if (local_error != NULL)
> - {
> - g_propagate_error (error, local_error);
> - return FALSE;
> - }
> -
> - return TRUE;
> -}
> -
> -
> -
> -XfsmSystemd *
> -xfsm_systemd_get (void)
> -{
> - static XfsmSystemd *object = NULL;
> -
> - if (G_LIKELY (object != NULL))
> - {
> - g_object_ref (G_OBJECT (object));
> - }
> - else
> - {
> - object = g_object_new (XFSM_TYPE_SYSTEMD, NULL);
> - g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object);
> - }
> -
> - return object;
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_try_restart (XfsmSystemd *systemd,
> - GError **error)
> -{
> - return xfsm_systemd_try_method (systemd,
> - SYSTEMD_REBOOT_ACTION,
> - error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
> - GError **error)
> -{
> - return xfsm_systemd_try_method (systemd,
> - SYSTEMD_POWEROFF_ACTION,
> - error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_can_restart (XfsmSystemd *systemd,
> - gboolean *can_restart,
> - GError **error)
> -{
> - return xfsm_systemd_can_method (systemd,
> - can_restart,
> - SYSTEMD_REBOOT_TEST,
> - error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
> - gboolean *can_shutdown,
> - GError **error)
> -{
> - return xfsm_systemd_can_method (systemd,
> - can_shutdown,
> - SYSTEMD_POWEROFF_TEST,
> - error);
> -}
>
> === removed file '.pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h'
> --- .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h 2013-07-01 19:35:39 +0000
> +++ .pc/xubuntu_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h 1970-01-01 00:00:00 +0000
> @@ -1,55 +0,0 @@
> -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
> - *
> - * Copyright (C) 2012 Christian Hesse
> - *
> - * Licensed under the GNU General Public License Version 2
> - *
> - * 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; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> - */
> -
> -#ifndef __XFSM_SYSTEMD_H__
> -#define __XFSM_SYSTEMD_H__
> -
> -typedef struct _XfsmSystemdClass XfsmSystemdClass;
> -typedef struct _XfsmSystemd XfsmSystemd;
> -
> -#define XFSM_TYPE_SYSTEMD (xfsm_systemd_get_type ())
> -#define XFSM_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemd))
> -#define XFSM_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_SYSTEMD, XfsmSystemdClass))
> -#define XFSM_IS_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_SYSTEMD))
> -#define XFSM_IS_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_SYSTEMD))
> -#define XFSM_SYSTEMD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemdClass))
> -
> -GType xfsm_systemd_get_type (void) G_GNUC_CONST;
> -
> -XfsmSystemd *xfsm_systemd_get (void);
> -
> -gboolean xfsm_systemd_try_restart (XfsmSystemd *systemd,
> - GError **error);
> -
> -gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
> - GError **error);
> -
> -gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd,
> - gboolean *can_restart,
> - GError **error);
> -
> -gboolean xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
> - gboolean *can_shutdown,
> - GError **error);
> -
> -G_END_DECLS
> -
> -#endif /* __XFSM_SYSTEMD_H__ */
>
> === removed directory '.pc/xubuntu_set-xdg-current-desktop.patch'
> === removed directory '.pc/xubuntu_set-xdg-current-desktop.patch/scripts'
> === removed file '.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in'
> --- .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in 2012-05-18 20:21:52 +0000
> +++ .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in 1970-01-01 00:00:00 +0000
> @@ -1,192 +0,0 @@
> -#!/bin/sh
> -
> -# fix broken $UID on some system...
> -if test "x$UID" = "x"; then
> - if test -x /usr/xpg4/bin/id; then
> - UID=`/usr/xpg4/bin/id -u`;
> - else
> - UID=`id -u`;
> - fi
> -fi
> -
> -# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
> -# over "applications.menu" in all Xfce applications.
> -if test "x$XDG_MENU_PREFIX" = "x"; then
> - XDG_MENU_PREFIX="xfce-"
> - export XDG_MENU_PREFIX
> -fi
> -
> -# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
> -if test "x$DESKTOP_SESSION" = "x"; then
> - DESKTOP_SESSION="xfce"
> - export DESKTOP_SESSION
> -fi
> -
> -# $XDG_CONFIG_HOME defines the base directory relative to which user specific
> -# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
> -# or empty, a default equal to $HOME/.config should be used.
> -if test "x$XDG_CONFIG_HOME" = "x" ; then
> - XDG_CONFIG_HOME=$HOME/.config
> -fi
> -[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
> -
> -# $XDG_CACHE_HOME defines the base directory relative to which user specific
> -# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
> -# set or empty, a default equal to $HOME/.cache should be used.
> -if test "x$XDG_CACHE_HOME" = "x" ; then
> - XDG_CACHE_HOME=$HOME/.cache
> -fi
> -[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
> -
> -# set up XDG user directores. see
> -# http://freedesktop.org/wiki/Software/xdg-user-dirs
> -if which xdg-user-dirs-update >/dev/null 2>&1; then
> - xdg-user-dirs-update
> -fi
> -
> -# Modify libglade and glade environment variables so that
> -# it will find the files installed by Xfce
> -GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:/usr/share/glade3/catalogs"
> -GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:/usr/lib/glade3/modules"
> -GLADE_MODULE_PATH="$GLADE_MODULE_PATH:/usr/share/glade3/pixmaps"
> -export GLADE_CATALOG_PATH
> -export GLADE_PIXMAP_PATH
> -export GLADE_MODULE_PATH
> -
> -# For now, start with an empty list
> -XRESOURCES=""
> -
> -# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
> -test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
> -test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
> -
> -BASEDIR=$XDG_CONFIG_HOME/xfce4
> -if test -r "$BASEDIR/Xft.xrdb"; then
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -elif test -r "$XFCE4HOME/Xft.xrdb"; then
> - mkdir -p "$BASEDIR"
> - cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -fi
> -
> -# merge in X cursor settings
> -test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
> -
> -# ~/.Xresources contains overrides to the above
> -test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
> -
> -# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
> -cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
> -
> -# load local modmap
> -test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
> -
> -# run xfce4-session if installed
> -if which xfce4-session >/dev/null 2>&1; then
> -
> - # check if we start xfce4-session with ck-launch-session. this is only
> - # required for starting from a console, not a login manager
> - if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
> - if which ck-launch-session >/dev/null 2>&1; then
> - ck-launch-session xfce4-session
> - else
> - echo
> - echo "You have tried to start Xfce with consolekit support, but"
> - echo "ck-launch-session is not installed."
> - echo "Aborted startup..."
> - echo
> -
> - exit 1
> - fi
> - else
> - # start xfce4-session normally
> - xfce4-session
> - fi
> -
> - exit 0
> -fi
> -
> -##################
> -# IMPORTANT NOTE #
> -##################
> -
> -# Everything below here ONLY gets executed if you are NOT using xfce4-session
> -# (Xfce's session manager). If you are using the session manager, everything
> -# below is handled by it, and the code below is not executed at all. If you're
> -# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
> -# in a terminal while Xfce is running.
> -
> -##################
> -
> -# Use dbus-launch if installed.
> -if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
> - if which dbus-launch >/dev/null 2>&1; then
> - eval `dbus-launch --sh-syntax --exit-with-session`
> - # some older versions of dbus don't export the var properly
> - export DBUS_SESSION_BUS_ADDRESS
> - else
> - echo "Could not find dbus-launch; Xfce will not work properly" >&2
> - fi
> -fi
> -
> -# this is only necessary when running w/o xfce4-session
> -xsetroot -solid black -cursor_name watch
> -
> -# or use old-fashioned startup script otherwise
> -
> -xfsettingsd &
> -xfwm4 --daemon
> -
> -# start up stuff in $XDG_CONFIG_HOME/autostart/
> -if test -d "$XDG_CONFIG_HOME/autostart"; then
> - for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
> - grep -q -E "^Hidden=true" "$i" && continue
> - if grep -q -E "^OnlyShowIn=" "$i"; then
> - # need to test twice, as lack of the line entirely means we still run it
> - grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
> - fi
> - grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
> -
> - # check for TryExec
> - trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
> - if test "$trycmd"; then
> - which "$trycmd" >/dev/null 2>&1 || continue
> - fi
> -
> - cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
> - if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
> - $cmd &
> - fi
> - done
> -fi
> -
> -xfdesktop&
> -orage &
> -
> -panel=`which xfce4-panel`
> -case "x$panel" in
> - x|xno*)
> - ;;
> - *)
> - $panel
> - ret=$?
> - while test $ret -ne 0; do
> - xmessage -center -file - -timeout 20 -title Error <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - cat >&2 <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - $panel
> - ret=$?
> - done
> - ;;
> -esac
> -
> -xsetroot -bg white -fg red -solid black -cursor_name watch
>
> === removed file '.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in'
> --- .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
> +++ .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in 1970-01-01 00:00:00 +0000
> @@ -1,192 +0,0 @@
> -#!/bin/sh
> -
> -# fix broken $UID on some system...
> -if test "x$UID" = "x"; then
> - if test -x /usr/xpg4/bin/id; then
> - UID=`/usr/xpg4/bin/id -u`;
> - else
> - UID=`id -u`;
> - fi
> -fi
> -
> -# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
> -# over "applications.menu" in all Xfce applications.
> -if test "x$XDG_MENU_PREFIX" = "x"; then
> - XDG_MENU_PREFIX="xfce-"
> - export XDG_MENU_PREFIX
> -fi
> -
> -# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
> -if test "x$DESKTOP_SESSION" = "x"; then
> - DESKTOP_SESSION="xfce"
> - export DESKTOP_SESSION
> -fi
> -
> -# $XDG_CONFIG_HOME defines the base directory relative to which user specific
> -# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
> -# or empty, a default equal to $HOME/.config should be used.
> -if test "x$XDG_CONFIG_HOME" = "x" ; then
> - XDG_CONFIG_HOME=$HOME/.config
> -fi
> -[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
> -
> -# $XDG_CACHE_HOME defines the base directory relative to which user specific
> -# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
> -# set or empty, a default equal to $HOME/.cache should be used.
> -if test "x$XDG_CACHE_HOME" = "x" ; then
> - XDG_CACHE_HOME=$HOME/.cache
> -fi
> -[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
> -
> -# set up XDG user directores. see
> -# http://freedesktop.org/wiki/Software/xdg-user-dirs
> -if which xdg-user-dirs-update >/dev/null 2>&1; then
> - xdg-user-dirs-update
> -fi
> -
> -# Modify libglade and glade environment variables so that
> -# it will find the files installed by Xfce
> -GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
> -GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:@XFCE_GLADE_PIXMAP_PATH@"
> -GLADE_MODULE_PATH="$GLADE_MODULE_PATH:@XFCE_GLADE_MODULE_PATH@"
> -export GLADE_CATALOG_PATH
> -export GLADE_PIXMAP_PATH
> -export GLADE_MODULE_PATH
> -
> -# For now, start with an empty list
> -XRESOURCES=""
> -
> -# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
> -test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
> -test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
> -
> -BASEDIR=$XDG_CONFIG_HOME/xfce4
> -if test -r "$BASEDIR/Xft.xrdb"; then
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -elif test -r "$XFCE4HOME/Xft.xrdb"; then
> - mkdir -p "$BASEDIR"
> - cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
> - XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
> -fi
> -
> -# merge in X cursor settings
> -test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
> -
> -# ~/.Xresources contains overrides to the above
> -test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
> -
> -# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
> -cat /dev/null $XRESOURCES | xrdb -merge -
> -
> -# load local modmap
> -test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
> -
> -# run xfce4-session if installed
> -if which xfce4-session >/dev/null 2>&1; then
> -
> - # check if we start xfce4-session with ck-launch-session. this is only
> - # required for starting from a console, not a login manager
> - if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
> - if which ck-launch-session >/dev/null 2>&1; then
> - ck-launch-session xfce4-session
> - else
> - echo
> - echo "You have tried to start Xfce with consolekit support, but"
> - echo "ck-launch-session is not installed."
> - echo "Aborted startup..."
> - echo
> -
> - exit 1
> - fi
> - else
> - # start xfce4-session normally
> - xfce4-session
> - fi
> -
> - exit 0
> -fi
> -
> -##################
> -# IMPORTANT NOTE #
> -##################
> -
> -# Everything below here ONLY gets executed if you are NOT using xfce4-session
> -# (Xfce's session manager). If you are using the session manager, everything
> -# below is handled by it, and the code below is not executed at all. If you're
> -# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
> -# in a terminal while Xfce is running.
> -
> -##################
> -
> -# Use dbus-launch if installed.
> -if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
> - if which dbus-launch >/dev/null 2>&1; then
> - eval `dbus-launch --sh-syntax --exit-with-session`
> - # some older versions of dbus don't export the var properly
> - export DBUS_SESSION_BUS_ADDRESS
> - else
> - echo "Could not find dbus-launch; Xfce will not work properly" >&2
> - fi
> -fi
> -
> -# this is only necessary when running w/o xfce4-session
> -xsetroot -solid black -cursor_name watch
> -
> -# or use old-fashioned startup script otherwise
> -
> -xfsettingsd &
> -xfwm4 --daemon
> -
> -# start up stuff in $XDG_CONFIG_HOME/autostart/
> -if test -d "$XDG_CONFIG_HOME/autostart"; then
> - for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
> - grep -q -E "^Hidden=true" "$i" && continue
> - if grep -q -E "^OnlyShowIn=" "$i"; then
> - # need to test twice, as lack of the line entirely means we still run it
> - grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
> - fi
> - grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
> -
> - # check for TryExec
> - trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
> - if test "$trycmd"; then
> - which "$trycmd" >/dev/null 2>&1 || continue
> - fi
> -
> - cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
> - if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
> - $cmd &
> - fi
> - done
> -fi
> -
> -xfdesktop&
> -orage &
> -
> -panel=`which xfce4-panel`
> -case "x$panel" in
> - x|xno*)
> - ;;
> - *)
> - $panel
> - ret=$?
> - while test $ret -ne 0; do
> - xmessage -center -file - -timeout 20 -title Error <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - cat >&2 <<EOF
> -A crash occured in the panel
> -Please report this to the xfce4-dev at xfce.org list
> -or on http://bugs.xfce.org
> -Meanwhile the panel will be restarted
> -EOF
> - $panel
> - ret=$?
> - done
> - ;;
> -esac
> -
> -xsetroot -bg white -fg red -solid black -cursor_name watch
>
> === modified file 'configure.ac'
> --- configure.ac 2013-07-01 19:35:39 +0000
> +++ configure.ac 2014-06-25 08:23:16 +0000
> @@ -103,7 +103,7 @@
>
> dnl Check for polkit / systemd integration
> XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
> - [systemd], [Systemd support (through polkit)])
> + [systemd], [Systemd support (through polit)])
Typo... "polit" -> "polkit"
>
> dnl Check for debugging support
> XDT_FEATURE_DEBUG([xfsm_debug_default])
> @@ -207,10 +207,10 @@
> else
> echo " * Legacy session management: no"
> fi
> -if test x"$SYSTEMD_FOUND" = x"yes"; then
> -echo " * Systemd support (through polkit): yes"
> +if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
> +echo " * Gnome Keyring support: yes"
> else
> -echo " * Systemd support (through polkit): no"
> +echo " * Gnome Keyring support: no"
> fi
>
> echo
>
> === modified file 'debian/changelog'
> --- debian/changelog 2014-03-20 23:11:51 +0000
> +++ debian/changelog 2014-06-25 08:23:16 +0000
> @@ -1,3 +1,56 @@
> +xfce4-session (4.10.1-6ubuntu1) utopic; urgency=medium
> +
> + * Merge from Debian unstable, remaining Ubuntu changes:
> + - debian/patches:
> + + xubuntu_ignore-gdm-lang.patch: do not set $LANG to $GDM_LANG, there's
> + already an xsession script to do that, and $GDM_LANG might not contain
> + a valid locale code.
> + + xubuntu_set-xdg-current-desktop.patch: added. Taken from xfce4-utils,
> + export XDG_CURRENT_DESKTOP=XFCE, can be useful with alacarte and
> + gnome-menus.
> + + debian/patches/xubuntu_runtime-logind-support.patch:
> + Check for logind support at runtime
> + + xflock4-light-locker-support.patch.
> + - debian/rules:
> + + call xdt-autogen after patching
> + + clean up autogenerated files modified by xdt-autogen.
> + - debian/control:
> + + add build-dep on libpolkit-gobject-1-dev (>= 0.100).
> + + add build-dep on xfce4-dev-tools and libtool in order to run xdt-autogen
> + after patching.
> + - Add startxfce4.user-session.upstart
> +
> + -- Jackson Doak <noskcaj at ubuntu.com> Wed, 25 Jun 2014 17:48:25 +1000
> +
> +xfce4-session (4.10.1-6) unstable; urgency=medium
> +
> + * debian/rules:
> + - disable legacy session management. closes: #745676
> + * debian/control:
> + - replace consolekit recommends by libpam-systemd, and add alternate
> + recommends for systemd-shim | systemd-sysv in order to not force systemd
> + as init to users for now.
> +
> + -- Yves-Alexis Perez <corsac at debian.org> Wed, 11 Jun 2014 21:08:39 +0200
> +
> +xfce4-session (4.10.1-5) unstable; urgency=medium
> +
> + * debian/patches/series:
> + - disable 02_add-dm-tool-to-xflock4 for now until something actually looks
> + the desktop on the signal. closes: #735854
> +
> + -- Yves-Alexis Perez <corsac at debian.org> Sat, 18 Jan 2014 10:36:02 +0100
> +
> +xfce4-session (4.10.1-4) unstable; urgency=medium
> +
> + * debian/patches:
> + - 02_add-dm-tool-to-xflock4 added, add a call to dm-tool as locking
> + mechanism.
> + * debian/control:
> + - update standards version to 3.9.5.
> +
> + -- Yves-Alexis Perez <corsac at debian.org> Thu, 16 Jan 2014 22:09:59 +0100
> +
> xfce4-session (4.10.1-3ubuntu5) trusty; urgency=medium
>
> * debian/control: use xscreensaver or light-locker in recommends
>
> === modified file 'debian/control'
> --- debian/control 2014-03-20 23:11:51 +0000
> +++ debian/control 2014-06-25 08:23:16 +0000
> @@ -10,7 +10,7 @@
> libxfconf-0-dev (>= 4.10.0), libglade2-dev, intltool (>= 0.31),
> libpolkit-gobject-1-dev (>= 0.100), xfce4-dev-tools, libtool,
> dpkg-dev (>= 1.16.1)
> -Standards-Version: 3.9.4
> +Standards-Version: 3.9.5
> Homepage: http://www.xfce.org/
> Vcs-Svn: svn://anonscm.debian.org/pkg-xfce/desktop/trunk/xfce4-session/
> Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-xfce/desktop/trunk/xfce4-session/
> @@ -22,7 +22,7 @@
> Replaces: xfce4-utils
> Pre-Depends: ${misc:Pre-Depends}, multiarch-support
> Depends: ${shlibs:Depends}, ${misc:Depends}, xfce4-settings (>= 4.10.0), xfconf
> -Recommends: xfwm4, xfdesktop4, upower, dbus-x11, x11-xserver-utils,
> +Recommends: xfwm4, xfdesktop4, libpam-systemd [linux-any], systemd-shim | systemd-sysv [linux-any], upower, dbus-x11, x11-xserver-utils,
> xscreensaver | light-locker
> Suggests: sudo, fortunes-mod
> Provides: x-session-manager
>
> === added file 'debian/patches/02_add-dm-tool-to-xflock4.patch'
> --- debian/patches/02_add-dm-tool-to-xflock4.patch 1970-01-01 00:00:00 +0000
> +++ debian/patches/02_add-dm-tool-to-xflock4.patch 2014-06-25 08:23:16 +0000
> @@ -0,0 +1,10 @@
> +--- a/scripts/xflock4
> ++++ b/scripts/xflock4
> +@@ -27,6 +27,7 @@ export PATH
> + # Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
> + for lock_cmd in \
> + "xscreensaver-command -lock" \
> ++ "dm-tool lock" \
> + "gnome-screensaver-command --lock"
> + do
> + $lock_cmd >/dev/null 2>&1 && exit
>
> === modified file 'debian/rules'
> --- debian/rules 2013-10-23 21:17:38 +0000
> +++ debian/rules 2014-06-25 08:23:16 +0000
> @@ -18,7 +18,7 @@
>
> override_dh_auto_configure:
> NOCONFIGURE=1 xdt-autogen
> - dh_auto_configure -- --disable-silent-rules
> + dh_auto_configure -- --disable-silent-rules --disable-legacy-sm
>
> %:
> dh $@ --parallel
>
> === modified file 'scripts/xflock4'
> --- scripts/xflock4 2014-03-18 19:36:28 +0000
> +++ scripts/xflock4 2014-06-25 08:23:16 +0000
> @@ -24,9 +24,8 @@
> PATH=/bin:/usr/bin
> export PATH
>
> -# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
> +# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
> for lock_cmd in \
> - "light-locker-command -l" \
Please do not remove "light-locker-command -l", and be sure to leave it at the top of the list.
> "xscreensaver-command -lock" \
> "gnome-screensaver-command --lock"
> do
>
> === modified file 'scripts/xinitrc.in'
> --- scripts/xinitrc.in 2013-10-23 21:13:30 +0000
> +++ scripts/xinitrc.in 2014-06-25 08:23:16 +0000
> @@ -22,12 +22,6 @@
> export DESKTOP_SESSION
> fi
>
> -# set XDG_CURRENT_DESKTOP for alacarte
> -if test "x$XDG_CURRENT_DESKTOP" = "x"; then
> - XDG_CURRENT_DESKTOP="XFCE"
> - export XDG_CURRENT_DESKTOP
> -fi
> -
> # $XDG_CONFIG_HOME defines the base directory relative to which user specific
> # configuration files should be stored. If $XDG_CONFIG_HOME is either not set
> # or empty, a default equal to $HOME/.config should be used.
>
> === modified file 'scripts/xinitrc.in.in'
> --- scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
> +++ scripts/xinitrc.in.in 2014-06-25 08:23:16 +0000
> @@ -22,12 +22,6 @@
> export DESKTOP_SESSION
> fi
>
> -# set XDG_CURRENT_DESKTOP for alacarte
> -if test "x$XDG_CURRENT_DESKTOP" = "x"; then
> - XDG_CURRENT_DESKTOP="XFCE"
> - export XDG_CURRENT_DESKTOP
> -fi
> -
> # $XDG_CONFIG_HOME defines the base directory relative to which user specific
> # configuration files should be stored. If $XDG_CONFIG_HOME is either not set
> # or empty, a default equal to $HOME/.config should be used.
> @@ -82,7 +76,7 @@
> test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
>
> # load all X resources (adds /dev/null to avoid an empty list that would hang the process)
> -cat /dev/null $XRESOURCES | xrdb -merge -
> +cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
>
> # load local modmap
> test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
>
> === modified file 'xfce4-session/Makefile.am'
> --- xfce4-session/Makefile.am 2013-07-01 19:35:39 +0000
> +++ xfce4-session/Makefile.am 2014-06-25 08:23:16 +0000
> @@ -38,8 +38,6 @@
> xfsm-compat-gnome.h \
> xfsm-compat-kde.c \
> xfsm-compat-kde.h \
> - xfsm-consolekit.c \
> - xfsm-consolekit.h \
> xfsm-dns.c \
> xfsm-dns.h \
> xfsm-error.c \
> @@ -69,6 +67,10 @@
> xfce4_session_SOURCES += \
> xfsm-systemd.c \
> xfsm-systemd.h
> +else
> +xfce4_session_SOURCES += \
> + xfsm-consolekit.c \
> + xfsm-consolekit.h
> endif
>
> xfce4_session_CFLAGS = \
>
> === modified file 'xfce4-session/main.c'
> --- xfce4-session/main.c 2013-07-01 19:35:39 +0000
> +++ xfce4-session/main.c 2014-06-25 08:23:16 +0000
> @@ -101,6 +101,14 @@
> /* pass correct DISPLAY to children, in case of --display in argv */
> g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE);
>
> + /* this is for compatibility with the GNOME Display Manager */
> + lang = g_getenv ("GDM_LANG");
> + if (lang != NULL && strlen (lang) > 0)
> + {
> + g_setenv ("LANG", lang, TRUE);
> + g_unsetenv ("GDM_LANG");
> + }
> +
> /* check access to $ICEAUTHORITY or $HOME/.ICEauthority if unset */
> if (g_getenv ("ICEAUTHORITY"))
> authfile = g_strdup (g_getenv ("ICEAUTHORITY"));
>
> === modified file 'xfce4-session/xfsm-shutdown.c'
> --- xfce4-session/xfsm-shutdown.c 2013-07-01 19:35:39 +0000
> +++ xfce4-session/xfsm-shutdown.c 2014-06-25 08:23:16 +0000
> @@ -63,15 +63,15 @@
> #include <xfce4-session/xfsm-shutdown.h>
> #include <xfce4-session/xfsm-compat-gnome.h>
> #include <xfce4-session/xfsm-compat-kde.h>
> -#include <xfce4-session/xfsm-consolekit.h>
> #include <xfce4-session/xfsm-fadeout.h>
> #include <xfce4-session/xfsm-global.h>
> #include <xfce4-session/xfsm-legacy.h>
> #include <xfce4-session/xfsm-upower.h>
>
> #ifdef HAVE_SYSTEMD
> -#define LOGIND_RUNNING() (access ("/run/systemd/seats/", F_OK) >= 0)
> #include <xfce4-session/xfsm-systemd.h>
> +#else
> +#include <xfce4-session/xfsm-consolekit.h>
> #endif
>
> static void xfsm_shutdown_finalize (GObject *object);
> @@ -98,8 +98,9 @@
>
> #ifdef HAVE_SYSTEMD
> XfsmSystemd *systemd;
> -#endif
> +#else
> XfsmConsolekit *consolekit;
> +#endif
> XfsmUPower *upower;
>
> /* kiosk settings */
> @@ -137,15 +138,11 @@
> {
> XfceKiosk *kiosk;
>
> - shutdown->consolekit = NULL;
> -
> #ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - shutdown->systemd = xfsm_systemd_get ();
> - else
> -#endif
> + shutdown->systemd = xfsm_systemd_get ();
> +#else
> shutdown->consolekit = xfsm_consolekit_get ();
> -
> +#endif
> shutdown->upower = xfsm_upower_get ();
> shutdown->helper_state = SUDO_NOT_INITIAZED;
> shutdown->helper_require_password = FALSE;
> @@ -166,8 +163,9 @@
>
> #ifdef HAVE_SYSTEMD
> g_object_unref (G_OBJECT (shutdown->systemd));
> -#endif
> +#else
> g_object_unref (G_OBJECT (shutdown->consolekit));
> +#endif
> g_object_unref (G_OBJECT (shutdown->upower));
>
> /* close down helper */
> @@ -659,11 +657,10 @@
> return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
> else
> #ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_try_restart (shutdown->systemd, error);
> - else
> -#endif
> + return xfsm_systemd_try_restart (shutdown->systemd, error);
> +#else
> return xfsm_consolekit_try_restart (shutdown->consolekit, error);
> +#endif
> }
>
>
> @@ -681,11 +678,10 @@
> return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
> else
> #ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_try_shutdown (shutdown->systemd, error);
> - else
> -#endif
> + return xfsm_systemd_try_shutdown (shutdown->systemd, error);
> +#else
> return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
> +#endif
> }
>
>
> @@ -696,11 +692,6 @@
> {
> g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
>
> -#ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_try_suspend (shutdown->systemd, error);
> - else
> -#endif
> return xfsm_upower_try_suspend (shutdown->upower, error);
> }
>
> @@ -712,11 +703,6 @@
> {
> g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
>
> -#ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_try_hibernate (shutdown->systemd, error);
> - else
> -#endif
> return xfsm_upower_try_hibernate (shutdown->upower, error);
> }
>
> @@ -736,14 +722,10 @@
> }
>
> #ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - {
> - if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
> - return TRUE;
> - }
> - else
> -#endif
> + if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
> +#else
> if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
> +#endif
> return TRUE;
>
> if (xfsm_shutdown_sudo_init (shutdown, error))
> @@ -771,14 +753,10 @@
> }
>
> #ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - {
> - if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
> - return TRUE;
> - }
> - else
> -#endif
> + if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
> +#else
> if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
> +#endif
> return TRUE;
>
> if (xfsm_shutdown_sudo_init (shutdown, error))
> @@ -806,12 +784,6 @@
> return TRUE;
> }
>
> -#ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_can_suspend (shutdown->systemd, can_suspend,
> - auth_suspend, error);
> - else
> -#endif
> return xfsm_upower_can_suspend (shutdown->upower, can_suspend,
> auth_suspend, error);
> }
> @@ -832,12 +804,6 @@
> return TRUE;
> }
>
> -#ifdef HAVE_SYSTEMD
> - if (LOGIND_RUNNING())
> - return xfsm_systemd_can_hibernate (shutdown->systemd, can_hibernate,
> - auth_hibernate, error);
> - else
> -#endif
> return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
> auth_hibernate, error);
> }
>
> === modified file 'xfce4-session/xfsm-systemd.c'
> --- xfce4-session/xfsm-systemd.c 2013-07-01 19:35:39 +0000
> +++ xfce4-session/xfsm-systemd.c 2014-06-25 08:23:16 +0000
> @@ -24,7 +24,6 @@
> #include <dbus/dbus-glib.h>
> #include <dbus/dbus-glib-lowlevel.h>
>
> -#include <libxfsm/xfsm-util.h>
> #include <xfce4-session/xfsm-systemd.h>
>
>
> @@ -34,12 +33,8 @@
> #define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
> #define SYSTEMD_REBOOT_ACTION "Reboot"
> #define SYSTEMD_POWEROFF_ACTION "PowerOff"
> -#define SYSTEMD_SUSPEND_ACTION "Suspend"
> -#define SYSTEMD_HIBERNATE_ACTION "Hibernate"
> #define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot"
> #define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off"
> -#define SYSTEMD_SUSPEND_TEST "org.freedesktop.login1.suspend"
> -#define SYSTEMD_HIBERNATE_TEST "org.freedesktop.login1.hibernate"
>
>
>
> @@ -98,22 +93,6 @@
> }
>
>
> -
> -static gboolean
> -xfsm_systemd_lock_screen (GError **error)
> -{
> - XfconfChannel *channel;
> - gboolean ret = TRUE;
> -
> - channel = xfsm_open_config ();
> - if (xfconf_channel_get_bool (channel, "/shutdown/LockScreen", FALSE))
> - ret = g_spawn_command_line_async ("xflock4", error);
> -
> - return ret;
> -}
> -
> -
> -
> static gboolean
> xfsm_systemd_can_method (XfsmSystemd *systemd,
> gboolean *can_method,
> @@ -226,34 +205,6 @@
>
>
> gboolean
> -xfsm_systemd_try_suspend (XfsmSystemd *systemd,
> - GError **error)
> -{
> - if (!xfsm_systemd_lock_screen (error))
> - return FALSE;
> -
> - return xfsm_systemd_try_method (systemd,
> - SYSTEMD_SUSPEND_ACTION,
> - error);
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
> - GError **error)
> -{
> - if (!xfsm_systemd_lock_screen (error))
> - return FALSE;
> -
> - return xfsm_systemd_try_method (systemd,
> - SYSTEMD_HIBERNATE_ACTION,
> - error);
> -}
> -
> -
> -
> -gboolean
> xfsm_systemd_can_restart (XfsmSystemd *systemd,
> gboolean *can_restart,
> GError **error)
> @@ -276,39 +227,3 @@
> SYSTEMD_POWEROFF_TEST,
> error);
> }
> -
> -
> -
> -gboolean
> -xfsm_systemd_can_suspend (XfsmSystemd *systemd,
> - gboolean *can_suspend,
> - gboolean *auth_suspend,
> - GError **error)
> -{
> - gboolean ret = FALSE;
> -
> - ret = xfsm_systemd_can_method (systemd,
> - can_suspend,
> - SYSTEMD_SUSPEND_TEST,
> - error);
> - *auth_suspend = *can_suspend;
> - return ret;
> -}
> -
> -
> -
> -gboolean
> -xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
> - gboolean *can_hibernate,
> - gboolean *auth_hibernate,
> - GError **error)
> -{
> - gboolean ret = FALSE;
> -
> - ret = xfsm_systemd_can_method (systemd,
> - can_hibernate,
> - SYSTEMD_HIBERNATE_TEST,
> - error);
> - *auth_hibernate = *can_hibernate;
> - return ret;
> -}
>
> === modified file 'xfce4-session/xfsm-systemd.h'
> --- xfce4-session/xfsm-systemd.h 2013-07-01 19:35:39 +0000
> +++ xfce4-session/xfsm-systemd.h 2014-06-25 08:23:16 +0000
> @@ -42,12 +42,6 @@
> gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
> GError **error);
>
> -gboolean xfsm_systemd_try_suspend (XfsmSystemd *systemd,
> - GError **error);
> -
> -gboolean xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
> - GError **error);
> -
> gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd,
> gboolean *can_restart,
> GError **error);
> @@ -56,16 +50,6 @@
> gboolean *can_shutdown,
> GError **error);
>
> -gboolean xfsm_systemd_can_suspend (XfsmSystemd *systemd,
> - gboolean *can_suspend,
> - gboolean *auth_suspend,
> - GError **error);
> -
> -gboolean xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
> - gboolean *can_hibernate,
> - gboolean *auth_hibernate,
> - GError **error);
> -
> G_END_DECLS
>
> #endif /* __XFSM_SYSTEMD_H__ */
>
--
https://code.launchpad.net/~noskcaj/ubuntu/utopic/xfce4-session/merge/+merge/224396
Your team Ubuntu branches is requested to review the proposed merge of lp:~noskcaj/ubuntu/utopic/xfce4-session/merge into lp:ubuntu/xfce4-session.
More information about the Ubuntu-reviews
mailing list