packages: gnome-control-center/gnome-control-center.spec, gnome-control-cen...

kiesiu kiesiu at pld-linux.org
Sun Apr 1 13:35:05 CEST 2012


Author: kiesiu                       Date: Sun Apr  1 11:35:04 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added patch for runtime fallback to ConsoleKit session tracking
- rel. 2

---- Files affected:
packages/gnome-control-center:
   gnome-control-center.spec (1.62 -> 1.63) , systemd-fallback.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gnome-control-center/gnome-control-center.spec
diff -u packages/gnome-control-center/gnome-control-center.spec:1.62 packages/gnome-control-center/gnome-control-center.spec:1.63
--- packages/gnome-control-center/gnome-control-center.spec:1.62	Sat Mar 31 18:52:25 2012
+++ packages/gnome-control-center/gnome-control-center.spec	Sun Apr  1 13:34:59 2012
@@ -1,7 +1,7 @@
 # $Revision$, $Date$
 #
 # Conditional build:
-%bcond_with	systemd # rely on systemd for session tracking instead of ConsoleKit
+%bcond_without	systemd # use systemd for session tracking instead of ConsoleKit (fallback to ConsoleKit on runtime)
 #
 Summary:	GNOME Control Center
 Summary(es.UTF-8):	El centro de controle del GNOME
@@ -11,7 +11,7 @@
 Summary(uk.UTF-8):	Центр керування GNOME
 Name:		gnome-control-center
 Version:	3.4.0
-Release:	1
+Release:	2
 Epoch:		1
 License:	GPL v2+
 Group:		X11/Applications
@@ -20,6 +20,7 @@
 # PLD-specific patches
 Patch0:		system-locale-archive-path.patch
 Patch1:		configure-gettext.patch
+%{?with_systemd:Patch2: systemd-fallback.patch}
 URL:		http://www.gnome.org/
 # use libnm-gtk - will use correct NM version
 BuildRequires:	NetworkManager-gtk-lib-devel >= 0.9.1.90-2
@@ -44,9 +45,9 @@
 BuildRequires:	gstreamer-devel
 BuildRequires:	gtk+3-devel >= 3.3.5
 BuildRequires:	gtk-doc >= 1.9
-BuildRequires:	lcms2-devel
 BuildRequires:	intltool >= 0.40.1
 BuildRequires:	iso-codes
+BuildRequires:	lcms2-devel
 BuildRequires:	libcanberra-gtk3-devel >= 0.26
 BuildRequires:	libgnomekbd-devel >= 3.0.0
 BuildRequires:	libgtop-devel
@@ -139,6 +140,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%{?with_systemd:%patch2 -p1}
 
 %build
 %{__gnome_doc_prepare}
@@ -228,6 +230,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.63  2012/04/01 11:34:59  kiesiu
+- added patch for runtime fallback to ConsoleKit session tracking
+- rel. 2
+
 Revision 1.62  2012/03/31 16:52:25  rotom
 - commitlog fixed
 

================================================================
Index: packages/gnome-control-center/systemd-fallback.patch
diff -u /dev/null packages/gnome-control-center/systemd-fallback.patch:1.1
--- /dev/null	Sun Apr  1 13:35:05 2012
+++ packages/gnome-control-center/systemd-fallback.patch	Sun Apr  1 13:34:59 2012
@@ -0,0 +1,81 @@
+commit 9873a7536844f5c38c2a123be58175c2774e5dcc
+Author: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+Date:   Mon Mar 12 01:12:11 2012 +0100
+
+    Fallback to CK if systemd is not available
+    
+    Be nice to distributions where systemd is optional. This will select
+    the code path at runtime depending on whether the system was booted
+    using systemd.
+
+diff --git a/configure.ac b/configure.ac
+index aee97ac..867f061 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,7 +56,7 @@ AC_ARG_ENABLE([systemd],
+               [with_systemd=$enableval],
+               [with_systemd=no])
+ if test "$with_systemd" = "yes" ; then
+-  SYSTEMD=libsystemd-login
++  SYSTEMD="libsystemd-login libsystemd-daemon"
+   AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd is available])
+ else
+   SYSTEMD=
+diff --git a/panels/user-accounts/um-user.c b/panels/user-accounts/um-user.c
+index f027754..5ebbe29 100644
+--- a/panels/user-accounts/um-user.c
++++ b/panels/user-accounts/um-user.c
+@@ -37,6 +37,11 @@
+ 
+ #include <gio/gunixoutputstream.h>
+ 
++#ifdef HAVE_SYSTEMD
++#  include <systemd/sd-login.h>
++#  include <systemd/sd-daemon.h>
++#endif
++
+ #include "um-user.h"
+ #include "um-account-type.h"
+ #include "um-utils.h"
+@@ -1003,25 +1008,18 @@ um_user_set_password (UmUser      *user,
+         }
+ }
+ 
+-#ifdef HAVE_SYSTEMD
+-
+-#include <systemd/sd-login.h>
+-
+ gboolean
+ um_user_is_logged_in (UmUser *user)
+ {
+-  int n_sessions;
+-
+-  n_sessions = sd_uid_get_sessions (um_user_get_uid (user), 0, NULL) > 0;
+-
+-  return n_sessions > 0;
+-}
++#ifdef HAVE_SYSTEMD
++        if (sd_booted () > 0) {
++                int n_sessions;
+ 
+-#else
++                n_sessions = sd_uid_get_sessions (um_user_get_uid (user), 0, NULL);
+ 
+-gboolean
+-um_user_is_logged_in (UmUser *user)
+-{
++                return n_sessions > 0;
++        }
++#endif
+         GVariant *result;
+         GVariantIter *iter;
+         gint n_sessions;
+@@ -1052,8 +1050,6 @@ um_user_is_logged_in (UmUser *user)
+         return n_sessions > 0;
+ }
+ 
+-#endif
+-
+ void
+ um_user_set_automatic_login (UmUser   *user,
+                              gboolean  enabled)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/gnome-control-center/gnome-control-center.spec?r1=1.62&r2=1.63



More information about the pld-cvs-commit mailing list