[packages/xfce4-session] - up to 4.12.1

baggins baggins at pld-linux.org
Sun Mar 29 19:13:08 CEST 2015


commit 0afaf3f717bf125e443474a0c8bcfaf1a25cbb7c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Mar 29 19:13:42 2015 +0200

    - up to 4.12.1

 ...session-systemd-suspend-hibernate-support.patch | 390 ---------------------
 xfce4-session.spec                                 |  22 +-
 2 files changed, 9 insertions(+), 403 deletions(-)
---
diff --git a/xfce4-session.spec b/xfce4-session.spec
index 09dd4d7..14af127 100644
--- a/xfce4-session.spec
+++ b/xfce4-session.spec
@@ -2,31 +2,29 @@
 # Conditional build:
 %bcond_with	static_libs	# don't build static library
 #
-%define		xfce_version	4.11.0
+%define		xfce_version	4.12.0
 Summary:	Xfce session manager
 Summary(pl.UTF-8):	Zarządca sesji Xfce
 Name:		xfce4-session
-Version:	4.11.0
-Release:	2
+Version:	4.12.1
+Release:	1
 License:	GPL v2
 Group:		X11/Applications
-Source0:	http://archive.xfce.org/src/xfce/%{name}/4.11/%{name}-%{version}.tar.bz2
-# Source0-md5:	8ec8bcedcb9cc28afd345a907a0612c7
+Source0:	http://archive.xfce.org/src/xfce/%{name}/4.12/%{name}-%{version}.tar.bz2
+# Source0-md5:	f4921fb2e606e74643daf1212263076c
 Source1:	http://www.blues.gda.pl/SOURCES/%{name}-ubuntu_icons.tar.bz2
 # Source1-md5:	bf19add3364c0b0d804a7490c1a1fcbe
 # taken from mate-polkit (GTK+2), license is LGPLv2+, requires because of
 # http://lists.fedoraproject.org/pipermail/devel-announce/2011-February/000758.html
 Source2:        polkit-mate-authentication-agent-1.desktop
 Patch0:		%{name}-ubuntu_icons.patch
-# be really, really carefull with this, it also makes systemd optional instead of default mandatory
-Patch1:		%{name}-systemd-suspend-hibernate-support.patch
 URL:		http://www.xfce.org/projects/xfce4-session
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
 BuildRequires:	dbus-devel >= 1.0.0
 BuildRequires:	dbus-glib-devel >= 0.74
 BuildRequires:	gettext-tools
-BuildRequires:	gtk+2-devel >= 2:2.14.0
+BuildRequires:	gtk+2-devel >= 2:2.24.0
 BuildRequires:	intltool >= 0.35.0
 BuildRequires:	libtool
 BuildRequires:	libwnck2-devel >= 2.22.0
@@ -37,8 +35,7 @@ BuildRequires:	polkit-devel
 BuildRequires:	rpmbuild(macros) >= 1.601
 BuildRequires:	systemd-devel
 BuildRequires:	xfce4-dev-tools >= %{xfce_version}
-#BuildRequires:	xfconf-devel >= %{xfce_version}
-BuildRequires:	xfconf-devel >= 4.10.0
+BuildRequires:	xfconf-devel >= %{xfce_version}
 BuildRequires:	xorg-lib-libSM-devel
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	gtk-update-icon-cache
@@ -74,8 +71,7 @@ Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki zarządcy sesji dla środowiska
 Group:		X11/Development/Libraries
 Requires:	%{name}-libs = %{version}-%{release}
 Requires:	libxfce4ui-devel >= %{xfce_version}
-#Requires:	xfconf-devel >= %{xfce_version}
-Requires:	xfconf-devel >= 4.10.0
+Requires:	xfconf-devel >= %{xfce_version}
 
 %description devel
 Header files for Xfce Session Manager library.
@@ -98,7 +94,6 @@ Statyczna biblioteka zarządcy sesji dla środowiska Xfce.
 %prep
 %setup -q -a1
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__intltoolize}
@@ -161,6 +156,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/xdg/xfce4/Xft.xrdb
 %{_sysconfdir}/xdg/xfce4/xinitrc
 
+%{_datadir}/polkit-1/actions/org.xfce.session.policy
 %{_datadir}/xsessions/xfce.desktop
 %{_datadir}/themes/Default/balou
 %{_desktopdir}/*.desktop
diff --git a/xfce4-session-systemd-suspend-hibernate-support.patch b/xfce4-session-systemd-suspend-hibernate-support.patch
deleted file mode 100644
index 08ea4c6..0000000
--- a/xfce4-session-systemd-suspend-hibernate-support.patch
+++ /dev/null
@@ -1,390 +0,0 @@
-Index: xfce4-session-4.10.1/configure.ac
-===================================================================
---- xfce4-session-4.10.1.orig/configure.ac
-+++ xfce4-session-4.10.1/configure.ac
-@@ -103,7 +103,7 @@ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0
- 
- dnl Check for polkit / systemd integration
- XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
--                           [systemd], [Systemd support (through polit)])
-+                           [systemd], [Systemd support (through polkit)])
- 
- dnl Check for debugging support
- XDT_FEATURE_DEBUG([xfsm_debug_default])
-@@ -207,10 +207,10 @@ echo " * Legacy session management:
- else
- echo " * Legacy session management:      no"
- fi
--if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
--echo " * Gnome Keyring support:          yes"
-+if test x"$SYSTEMD_FOUND" = x"yes"; then
-+echo " * Systemd support (through polkit):          yes"
- else
--echo " * Gnome Keyring support:          no"
-+echo " * Systemd support (through polkit):          no"
- fi
- 
- echo
-Index: xfce4-session-4.10.1/xfce4-session/Makefile.am
-===================================================================
---- xfce4-session-4.10.1.orig/xfce4-session/Makefile.am
-+++ xfce4-session-4.10.1/xfce4-session/Makefile.am
-@@ -38,6 +38,8 @@ xfce4_session_SOURCES =							\
- 	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							\
-@@ -67,10 +69,6 @@ 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 =							\
-Index: xfce4-session-4.10.1/xfce4-session/xfsm-systemd.c
-===================================================================
---- xfce4-session-4.10.1.orig/xfce4-session/xfsm-systemd.c
-+++ xfce4-session-4.10.1/xfce4-session/xfsm-systemd.c
-@@ -24,6 +24,7 @@
- #include <dbus/dbus-glib.h>
- #include <dbus/dbus-glib-lowlevel.h>
- 
-+#include <libxfsm/xfsm-util.h>
- #include <xfce4-session/xfsm-systemd.h>
- 
- 
-@@ -33,8 +34,12 @@
- #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"
- 
- 
- 
-@@ -93,6 +98,22 @@ xfsm_systemd_finalize (GObject *object)
- }
- 
- 
-+
-+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,
-@@ -205,6 +226,34 @@ xfsm_systemd_try_shutdown (XfsmSystemd
- 
- 
- 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)
-@@ -227,3 +276,39 @@ xfsm_systemd_can_shutdown (XfsmSystemd
-                                   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;
-+}
-Index: xfce4-session-4.10.1/xfce4-session/xfsm-systemd.h
-===================================================================
---- xfce4-session-4.10.1.orig/xfce4-session/xfsm-systemd.h
-+++ xfce4-session-4.10.1/xfce4-session/xfsm-systemd.h
-@@ -42,6 +42,12 @@ gboolean     xfsm_systemd_try_restart  (
- 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);
-@@ -50,6 +56,16 @@ gboolean     xfsm_systemd_can_shutdown (
-                                         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__ */
-Index: xfce4-session-4.10.1/xfce4-session/xfsm-shutdown.c
-===================================================================
---- xfce4-session-4.10.1.orig/xfce4-session/xfsm-shutdown.c
-+++ xfce4-session-4.10.1/xfce4-session/xfsm-shutdown.c
-@@ -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,9 +98,8 @@ struct _XfsmShutdown
- 
- #ifdef HAVE_SYSTEMD
-   XfsmSystemd    *systemd;
--#else
--  XfsmConsolekit *consolekit;
- #endif
-+  XfsmConsolekit *consolekit;
-   XfsmUPower     *upower;
- 
-   /* kiosk settings */
-@@ -139,10 +138,14 @@ xfsm_shutdown_init (XfsmShutdown *shutdo
-   XfceKiosk *kiosk;
- 
- #ifdef HAVE_SYSTEMD
--  shutdown->systemd = xfsm_systemd_get ();
--#else
--  shutdown->consolekit = xfsm_consolekit_get ();
-+  shutdown->consolekit = NULL;
-+  shutdown->systemd = NULL;
-+  if (LOGIND_RUNNING())
-+    shutdown->systemd = xfsm_systemd_get ();
-+  else
- #endif
-+  shutdown->consolekit = xfsm_consolekit_get ();
-+
-   shutdown->upower = xfsm_upower_get ();
-   shutdown->helper_state = SUDO_NOT_INITIAZED;
-   shutdown->helper_require_password = FALSE;
-@@ -162,10 +165,11 @@ 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));
-+  if (shutdown->systemd != NULL)
-+    g_object_unref (G_OBJECT (shutdown->systemd));
- #endif
-+  if (shutdown->consolekit != NULL)
-+    g_object_unref (G_OBJECT (shutdown->consolekit));
-   g_object_unref (G_OBJECT (shutdown->upower));
- 
-   /* close down helper */
-@@ -657,10 +661,11 @@ xfsm_shutdown_try_restart (XfsmShutdown
-     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);
-+    if (LOGIND_RUNNING())
-+      return xfsm_systemd_try_restart (shutdown->systemd, error);
-+    else
- #endif
-+    return xfsm_consolekit_try_restart (shutdown->consolekit, error);
- }
- 
- 
-@@ -678,10 +683,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown
-     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);
-+    if (LOGIND_RUNNING())
-+      return xfsm_systemd_try_shutdown (shutdown->systemd, error);
-+    else
- #endif
-+    return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
- }
- 
- 
-@@ -692,6 +698,11 @@ xfsm_shutdown_try_suspend (XfsmShutdown
- {
-   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);
- }
- 
-@@ -703,6 +714,11 @@ xfsm_shutdown_try_hibernate (XfsmShutdow
- {
-   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);
- }
- 
-@@ -722,10 +738,14 @@ xfsm_shutdown_can_restart (XfsmShutdown
-     }
- 
- #ifdef HAVE_SYSTEMD
--  if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
--#else
--  if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
-+  if (LOGIND_RUNNING())
-+    {
-+      if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
-+        return TRUE;
-+    }
-+  else
- #endif
-+  if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
-     return TRUE;
- 
-   if (xfsm_shutdown_sudo_init (shutdown, error))
-@@ -753,10 +773,14 @@ xfsm_shutdown_can_shutdown (XfsmShutdown
-     }
- 
- #ifdef HAVE_SYSTEMD
--  if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
--#else
--  if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
-+  if (LOGIND_RUNNING())
-+    {
-+      if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
-+        return TRUE;
-+    }
-+  else
- #endif
-+  if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
-     return TRUE;
- 
-   if (xfsm_shutdown_sudo_init (shutdown, error))
-@@ -784,6 +808,12 @@ xfsm_shutdown_can_suspend (XfsmShutdown
-       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);
- }
-@@ -804,6 +834,12 @@ xfsm_shutdown_can_hibernate (XfsmShutdow
-       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);
- }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xfce4-session.git/commitdiff/0afaf3f717bf125e443474a0c8bcfaf1a25cbb7c



More information about the pld-cvs-commit mailing list