Accepting request 21619 from home:vuntz:branches:GNOME:Factory
Copy from home:vuntz:branches:GNOME:Factory/gdm via accept of submit request 21619 revision 3. OBS-URL: https://build.opensuse.org/request/show/21619 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=102
This commit is contained in:
parent
b6a44adcc8
commit
efcb544327
186
gdm-devkit-power.patch
Normal file
186
gdm-devkit-power.patch
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
From aa132a553b871a19a8d23fe8e9d93f736f2a4faf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Mon, 28 Sep 2009 09:14:33 +0100
|
||||||
|
Subject: [PATCH] Convert gdm from using gnome-power-manager to DeviceKit-power
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.ac | 7 ++
|
||||||
|
gui/simple-greeter/Makefile.am | 4 +
|
||||||
|
gui/simple-greeter/gdm-greeter-login-window.c | 84 ++++++-------------------
|
||||||
|
3 files changed, 31 insertions(+), 64 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 756890a..2cae1cf 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -51,6 +51,7 @@ LIBXKLAVIER_REQUIRED_VERSION=4.0
|
||||||
|
LIBCANBERRA_GTK_REQUIRED_VERSION=0.4
|
||||||
|
#FONTCONFIG_REQUIRED_VERSION=2.6.0
|
||||||
|
FONTCONFIG_REQUIRED_VERSION=2.5.0
|
||||||
|
+DEVKIT_POWER_REQUIRED_VERSION=008
|
||||||
|
|
||||||
|
EXTRA_COMPILE_WARNINGS(yes)
|
||||||
|
|
||||||
|
@@ -103,6 +104,12 @@ PKG_CHECK_MODULES(GCONF,
|
||||||
|
AC_SUBST(GCONF_CFLAGS)
|
||||||
|
AC_SUBST(GCONF_LIBS)
|
||||||
|
|
||||||
|
+PKG_CHECK_MODULES(DEVKIT_POWER,
|
||||||
|
+ devkit-power-gobject >= $DEVKIT_POWER_REQUIRED_VERSION
|
||||||
|
+)
|
||||||
|
+AC_SUBST(DEVKIT_POWER_CFLAGS)
|
||||||
|
+AC_SUBST(DEVKIT_POWER_LIBS)
|
||||||
|
+
|
||||||
|
PKG_CHECK_MODULES(SIMPLE_GREETER,
|
||||||
|
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
|
||||||
|
gtk+-2.0 >= $GTK_REQUIRED_VERSION
|
||||||
|
diff --git a/gui/simple-greeter/Makefile.am b/gui/simple-greeter/Makefile.am
|
||||||
|
index 8c9ae46..4c06bc3 100644
|
||||||
|
--- a/gui/simple-greeter/Makefile.am
|
||||||
|
+++ b/gui/simple-greeter/Makefile.am
|
||||||
|
@@ -18,6 +18,8 @@ AM_CPPFLAGS = \
|
||||||
|
-DSBINDIR=\""$(sbindir)"\" \
|
||||||
|
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
|
||||||
|
-DAT_SPI_REGISTRYD_DIR="\"$(AT_SPI_REGISTRYD_DIR)\"" \
|
||||||
|
+ $(DEVKIT_POWER_CFLAGS) \
|
||||||
|
+ -DI_KNOW_THE_DEVICEKIT_POWER_API_IS_SUBJECT_TO_CHANGE \
|
||||||
|
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||||
|
$(GTK_CFLAGS) \
|
||||||
|
$(SIMPLE_GREETER_CFLAGS) \
|
||||||
|
@@ -90,6 +92,7 @@ test_greeter_login_window_LDADD = \
|
||||||
|
libgdmuser.la \
|
||||||
|
$(COMMON_LIBS) \
|
||||||
|
$(SIMPLE_GREETER_LIBS) \
|
||||||
|
+ $(DEVKIT_POWER_LIBS) \
|
||||||
|
$(RBAC_LIBS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
@@ -324,6 +327,7 @@ gdm_simple_greeter_LDADD = \
|
||||||
|
$(SIMPLE_GREETER_LIBS) \
|
||||||
|
$(RBAC_LIBS) \
|
||||||
|
$(LIBXKLAVIER_LIBS) \
|
||||||
|
+ $(DEVKIT_POWER_LIBS) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
gladedir = $(pkgdatadir)
|
||||||
|
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||||
|
index c7ea5d6..7d4ef83 100644
|
||||||
|
--- a/gui/simple-greeter/gdm-greeter-login-window.c
|
||||||
|
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
|
||||||
|
@@ -56,6 +56,8 @@
|
||||||
|
#include <dbus/dbus-glib.h>
|
||||||
|
#include <dbus/dbus-glib-lowlevel.h>
|
||||||
|
|
||||||
|
+#include <devkit-power-gobject/devicekit-power.h>
|
||||||
|
+
|
||||||
|
#include "gdm-settings-client.h"
|
||||||
|
#include "gdm-settings-keys.h"
|
||||||
|
#include "gdm-profile.h"
|
||||||
|
@@ -79,10 +81,6 @@
|
||||||
|
#define CK_SEAT_INTERFACE "org.freedesktop.ConsoleKit.Seat"
|
||||||
|
#define CK_SESSION_INTERFACE "org.freedesktop.ConsoleKit.Session"
|
||||||
|
|
||||||
|
-#define GPM_DBUS_NAME "org.freedesktop.PowerManagement"
|
||||||
|
-#define GPM_DBUS_PATH "/org/freedesktop/PowerManagement"
|
||||||
|
-#define GPM_DBUS_INTERFACE "org.freedesktop.PowerManagement"
|
||||||
|
-
|
||||||
|
#define GLADE_XML_FILE "gdm-greeter-login-window.glade"
|
||||||
|
|
||||||
|
#define KEY_GREETER_DIR "/apps/gdm/simple-greeter"
|
||||||
|
@@ -480,40 +478,15 @@ adjust_other_login_visibility(GdmGreeterLoginWindow *login_window)
|
||||||
|
static gboolean
|
||||||
|
can_suspend (GdmGreeterLoginWindow *login_window)
|
||||||
|
{
|
||||||
|
- DBusGConnection *connection;
|
||||||
|
- DBusGProxy *proxy;
|
||||||
|
- GError *error;
|
||||||
|
- gboolean ret;
|
||||||
|
- gboolean res;
|
||||||
|
-
|
||||||
|
- error = NULL;
|
||||||
|
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||||
|
- if (error != NULL) {
|
||||||
|
- g_warning ("Couldn't connect to power manager: %s", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- return FALSE;
|
||||||
|
- }
|
||||||
|
- proxy = dbus_g_proxy_new_for_name (connection,
|
||||||
|
- GPM_DBUS_NAME,
|
||||||
|
- GPM_DBUS_PATH,
|
||||||
|
- GPM_DBUS_INTERFACE);
|
||||||
|
- ret = FALSE;
|
||||||
|
-
|
||||||
|
- res = dbus_g_proxy_call (proxy, "CanSuspend",
|
||||||
|
- &error,
|
||||||
|
- G_TYPE_INVALID,
|
||||||
|
- G_TYPE_BOOLEAN,
|
||||||
|
- &ret,
|
||||||
|
- G_TYPE_INVALID);
|
||||||
|
- if (! res) {
|
||||||
|
- if (error != NULL) {
|
||||||
|
- g_warning ("Could not ask power manager if user can suspend: %s",
|
||||||
|
- error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- }
|
||||||
|
- ret = FALSE;
|
||||||
|
- }
|
||||||
|
+ gboolean ret;
|
||||||
|
+ DkpClient *dkp_client;
|
||||||
|
|
||||||
|
+ /* use DeviceKit-power to get data */
|
||||||
|
+ dkp_client = dkp_client_new ();
|
||||||
|
+ g_object_get (dkp_client,
|
||||||
|
+ "can-suspend", &ret,
|
||||||
|
+ NULL);
|
||||||
|
+ g_object_unref (dkp_client);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -655,36 +628,19 @@ do_disconnect (GdmGreeterLoginWindow *login_window)
|
||||||
|
static void
|
||||||
|
do_suspend (GdmGreeterLoginWindow *login_window)
|
||||||
|
{
|
||||||
|
- GError *error;
|
||||||
|
- DBusGConnection *connection;
|
||||||
|
- DBusGProxy *proxy;
|
||||||
|
+ gboolean ret;
|
||||||
|
+ DkpClient *dkp_client;
|
||||||
|
+ GError *error = NULL;
|
||||||
|
|
||||||
|
- g_debug ("GdmGreeterLoginWindow: Suspend button clicked");
|
||||||
|
-
|
||||||
|
- error = NULL;
|
||||||
|
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||||
|
- if (error != NULL) {
|
||||||
|
+ /* use DeviceKit-power to get data */
|
||||||
|
+ dkp_client = dkp_client_new ();
|
||||||
|
+ ret = dkp_client_suspend (dkp_client, &error);
|
||||||
|
+ if (!ret) {
|
||||||
|
g_warning ("Couldn't suspend: %s", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- proxy = dbus_g_proxy_new_for_name (connection,
|
||||||
|
- GPM_DBUS_NAME,
|
||||||
|
- GPM_DBUS_PATH,
|
||||||
|
- GPM_DBUS_INTERFACE);
|
||||||
|
- error = NULL;
|
||||||
|
- dbus_g_proxy_call (proxy,
|
||||||
|
- "Suspend",
|
||||||
|
- &error,
|
||||||
|
- G_TYPE_INVALID,
|
||||||
|
- G_TYPE_INVALID);
|
||||||
|
- if (error != NULL) {
|
||||||
|
- g_warning ("Couldn't suspend: %s", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- g_object_unref (proxy);
|
||||||
|
+ g_object_unref (dkp_client);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
--
|
||||||
|
1.6.4.4
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
11
gdm-polkit-gnome-path.patch
Normal file
11
gdm-polkit-gnome-path.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
Index: gdm-2.28.0/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in
|
||||||
|
===================================================================
|
||||||
|
--- gdm-2.28.0.orig/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in
|
||||||
|
+++ gdm-2.28.0/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
_Name=PolicyKit Authentication Agent
|
||||||
|
-Exec=/usr/libexec/polkit-gnome-authentication-agent-1
|
||||||
|
+Exec=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
OnlyShowIn=GNOME;
|
11
gdm.changes
11
gdm.changes
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 2 19:33:46 CEST 2009 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
- Add gdm-devkit-power.patch: gdm was using a dbus API which
|
||||||
|
doesn't exist anymore, and the right way to handle this is to use
|
||||||
|
DeviceKit-power.
|
||||||
|
- Add DeviceKit-power-devel BuildRequires for the patch.
|
||||||
|
- Add gdm-polkit-gnome-path.patch to use the correct path for the
|
||||||
|
polkit agent.
|
||||||
|
- Rebase gdm-greeter-greater-ui.patch. Fix bnc#533597.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 2 17:25:38 CEST 2009 - vuntz@opensuse.org
|
Fri Oct 2 17:25:38 CEST 2009 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
11
gdm.spec
11
gdm.spec
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: gdm
|
Name: gdm
|
||||||
|
BuildRequires: DeviceKit-power-devel
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gconf2-devel
|
BuildRequires: gconf2-devel
|
||||||
@ -64,7 +65,7 @@ Patch7: gdm-suse-xsession.patch
|
|||||||
Patch8: gdm-domain-logon.patch
|
Patch8: gdm-domain-logon.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager
|
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager
|
||||||
Patch13: gdm-sysconfig-settings.patch
|
Patch13: gdm-sysconfig-settings.patch
|
||||||
# PATCH-NEEDS-REBASE gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch) (was PATCH-FIX-UPSTREAM)
|
# PATCH-FIX-UPSTREAM gdm-greeter-greater-ui.patch bnc436431 bgo560508 vuntz@novell.com -- Improve the layout of the greeter. Note: the patch contains a patched glade file *and* the result glade file (for reference only, in case we need to rebase the patch)
|
||||||
Patch15: gdm-greeter-greater-ui.patch
|
Patch15: gdm-greeter-greater-ui.patch
|
||||||
# PATCH-FIX-UPSTREAM gdm-always-reflect-keyboard-layout.patch bnc438159 bgo561771 hpj@novell.com -- Make keyboard selector not neglect to apply the selected keyboard in some situations.
|
# PATCH-FIX-UPSTREAM gdm-always-reflect-keyboard-layout.patch bnc438159 bgo561771 hpj@novell.com -- Make keyboard selector not neglect to apply the selected keyboard in some situations.
|
||||||
Patch18: gdm-always-reflect-keyboard-layout.patch
|
Patch18: gdm-always-reflect-keyboard-layout.patch
|
||||||
@ -86,6 +87,10 @@ Patch35: gdm-xauthlocalhostname.patch
|
|||||||
Patch36: gdm-build-fixes.patch
|
Patch36: gdm-build-fixes.patch
|
||||||
# PATCH-FIX-UPSTREAM gdm-autologin-once.patch bgo587606 vuntz@novell.com -- Make autologin work only once
|
# PATCH-FIX-UPSTREAM gdm-autologin-once.patch bgo587606 vuntz@novell.com -- Make autologin work only once
|
||||||
Patch37: gdm-autologin-once.patch
|
Patch37: gdm-autologin-once.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gdm-devkit-power.patch bgo596569 vuntz@opensuse.org -- Use devkit-power instead of non-existing dbus API, patch from upstream
|
||||||
|
Patch38: gdm-devkit-power.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gdm-polkit-gnome-path.patch bgo597050 vuntz@opensuse.org -- Use the right patch for the polkit agent. The current patch is a quick workaround for now, until we know how upstream wants to fix this.
|
||||||
|
Patch39: gdm-polkit-gnome-path.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
|
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
|
||||||
Patch60: gdm-selinux.patch
|
Patch60: gdm-selinux.patch
|
||||||
Url: http://www.gnome.org/
|
Url: http://www.gnome.org/
|
||||||
@ -144,7 +149,7 @@ gnome-patch-translation-prepare
|
|||||||
# NEEDS-REBASE - also re-enable gnome-patch-translation-update after patch rebase
|
# NEEDS-REBASE - also re-enable gnome-patch-translation-update after patch rebase
|
||||||
# %%patch8 -p1
|
# %%patch8 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
# %%patch15 -p1
|
%patch15 -p1
|
||||||
%patch18 -p1
|
%patch18 -p1
|
||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
@ -158,6 +163,8 @@ gnome-patch-translation-prepare
|
|||||||
%patch35 -p1
|
%patch35 -p1
|
||||||
%patch36 -p1
|
%patch36 -p1
|
||||||
%patch37 -p1
|
%patch37 -p1
|
||||||
|
%patch38 -p1
|
||||||
|
%patch39 -p1
|
||||||
%patch60
|
%patch60
|
||||||
# gnome-patch-translation-update
|
# gnome-patch-translation-update
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user