]> git.pld-linux.org Git - packages/ModemManager.git/commitdiff
- added fixes for compiling with new glib and polkit (from MM git repo)
authorSzymon Siwek <sls@pld-linux.org>
Fri, 3 Dec 2010 22:43:49 +0000 (22:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    67d936e46cedfa3f9621946ac02156e8c15990e3.patch -> 1.1
    ModemManager.spec -> 1.7
    be28089dc4c1b07d9def45a3c763f432ae8322c4.patch -> 1.1

67d936e46cedfa3f9621946ac02156e8c15990e3.patch [new file with mode: 0644]
ModemManager.spec
be28089dc4c1b07d9def45a3c763f432ae8322c4.patch [new file with mode: 0644]

diff --git a/67d936e46cedfa3f9621946ac02156e8c15990e3.patch b/67d936e46cedfa3f9621946ac02156e8c15990e3.patch
new file mode 100644 (file)
index 0000000..f77110a
--- /dev/null
@@ -0,0 +1,78 @@
+From 67d936e46cedfa3f9621946ac02156e8c15990e3 Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Wed, 01 Sep 2010 22:20:57 +0000
+Subject: polkit: fix for polkit >= 0.97 (bgo #628105)
+
+---
+diff --git a/configure.ac b/configure.ac
+index a0c65e7..af4bd09 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,10 @@ case $with_polkit in
+       AC_DEFINE(WITH_POLKIT, 1, [Define if you want to use PolicyKit])
+       AC_SUBST(POLKIT_CFLAGS)
+       AC_SUBST(POLKIT_LIBS)
++
++      # Check for polkit_authority_get_sync()
++      AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync], ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0")
++      AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC, $ac_have_pk_auth_get_sync, [Define if you have a polkit with polkit_authority_get_sync()])
+         ;;
+     *)
+         with_polkit=no
+diff --git a/src/mm-auth-provider-polkit.c b/src/mm-auth-provider-polkit.c
+index c457eaf..2cd4a8a 100644
+--- a/src/mm-auth-provider-polkit.c
++++ b/src/mm-auth-provider-polkit.c
+@@ -15,6 +15,7 @@
+ #include <polkit/polkit.h>
++#include <config.h>
+ #include "mm-auth-request-polkit.h"
+ #include "mm-auth-provider-polkit.h"
+@@ -72,19 +73,39 @@ real_create_request (MMAuthProvider *provider,
+ /*****************************************************************************/
++/* Fix for polkit 0.97 and later */
++#if !HAVE_POLKIT_AUTHORITY_GET_SYNC
++static inline PolkitAuthority *
++polkit_authority_get_sync (GCancellable *cancellable, GError **error)
++{
++      PolkitAuthority *authority;
++
++      authority = polkit_authority_get ();
++      if (!authority)
++              g_set_error (error, 0, 0, "failed to get the PolicyKit authority");
++      return authority;
++}
++#endif
++
+ static void
+ mm_auth_provider_polkit_init (MMAuthProviderPolkit *self)
+ {
+     MMAuthProviderPolkitPrivate *priv = MM_AUTH_PROVIDER_POLKIT_GET_PRIVATE (self);
++    GError *error = NULL;
+-    priv->authority = polkit_authority_get ();
++    priv->authority = polkit_authority_get_sync (NULL, &error);
+     if (priv->authority) {
+         priv->auth_changed_id = g_signal_connect (priv->authority,
+                                                   "changed",
+                                                   G_CALLBACK (pk_authority_changed_cb),
+                                                   self);
+-    } else
+-        g_warning ("%s: failed to create PolicyKit authority.", __func__);
++    } else {
++              g_warning ("%s: failed to create PolicyKit authority: (%d) %s",
++                   __func__,
++                         error ? error->code : -1,
++                         error && error->message ? error->message : "(unknown)");
++              g_clear_error (&error);
++    }
+ }
+ static void
+--
+cgit v0.8.3-6-g21f6
index 6e33a62d77b78a8601db6135968db4b058e4cb51..9a5ef91805d8f3b2dc16608a6771609f2829b5ea 100644 (file)
@@ -7,6 +7,8 @@ License:        GPL v2
 Group:         Networking
 Source0:       http://ftp.gnome.org/pub/GNOME/sources/ModemManager/0.4/%{name}-%{version}.tar.bz2
 # Source0-md5: d4681f08e76cbb766522256144267ced
+Patch0:                67d936e46cedfa3f9621946ac02156e8c15990e3.patch
+Patch1:                be28089dc4c1b07d9def45a3c763f432ae8322c4.patch
 URL:           http://www.gnome.org/projects/NetworkManager/
 BuildRequires: autoconf >= 2.52
 BuildRequires: automake >= 1:1.9
@@ -26,6 +28,8 @@ different modems, including mobile broadband (3G) devices.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/be28089dc4c1b07d9def45a3c763f432ae8322c4.patch b/be28089dc4c1b07d9def45a3c763f432ae8322c4.patch
new file mode 100644 (file)
index 0000000..6f48bb3
--- /dev/null
@@ -0,0 +1,41 @@
+From be28089dc4c1b07d9def45a3c763f432ae8322c4 Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz@gnome.org>
+Date: Mon, 09 Aug 2010 15:31:45 +0000
+Subject: build: fix build with glib >= 2.25.12 (bgo #626421)
+
+Work around an API break in glib.
+---
+diff --git a/libqcdm/tests/test-qcdm.c b/libqcdm/tests/test-qcdm.c
+index 8685080..4e6f0cf 100644
+--- a/libqcdm/tests/test-qcdm.c
++++ b/libqcdm/tests/test-qcdm.c
+@@ -28,7 +28,11 @@ typedef struct {
+     gpointer com_data;
+ } TestData;
++#if GLIB_CHECK_VERSION(2,25,12)
++typedef GTestFixtureFunc TCFunc;
++#else
+ typedef void (*TCFunc)(void);
++#endif
+ #define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (TCFunc) t, NULL)
+diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
+index 92a7af8..74d2d94 100644
+--- a/src/tests/test-modem-helpers.c
++++ b/src/tests/test-modem-helpers.c
+@@ -791,7 +791,11 @@ test_data_free (TestData *data)
+ }
++#if GLIB_CHECK_VERSION(2,25,12)
++typedef GTestFixtureFunc TCFunc;
++#else
+ typedef void (*TCFunc)(void);
++#endif
+ #define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (TCFunc) t, NULL)
+--
+cgit v0.8.3-6-g21f6
This page took 0.098173 seconds and 4 git commands to generate.