[Spice-commits] meson.build src/spice-client-glib-usb-acl-helper.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 9 06:40:10 UTC 2020


 meson.build                            |    7 ------
 src/spice-client-glib-usb-acl-helper.c |   34 ---------------------------------
 2 files changed, 1 insertion(+), 40 deletions(-)

New commits:
commit 94a3375beff5df8c8add33cf2f1b74350185dce2
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Thu Apr 9 01:05:00 2020 +0200

    build-sys: bump polkit requirement to 0.101
    
    It was released on 2011-03-03, and is available in old debian stable
    and all distros we care about.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/meson.build b/meson.build
index 4f2fcba..01755be 100644
--- a/meson.build
+++ b/meson.build
@@ -193,14 +193,9 @@ endif
 
 # polkit
 spice_gtk_has_polkit = false
-d = dependency('polkit-gobject-1', version : '>= 0.96', required : get_option('polkit'))
+d = dependency('polkit-gobject-1', version : '>= 0.101', required : get_option('polkit'))
 if d.found()
   spice_gtk_policy_dir = d.get_pkgconfig_variable('policydir')
-  foreach func : ['polkit_authority_get_sync', 'polkit_authorization_result_get_dismissed']
-    if compiler.has_function(func, dependencies : d)
-      spice_gtk_config_data.set('HAVE_ at 0@'.format(func.to_upper()), '1')
-    endif
-  endforeach
 
   # TODO:  With 'auto', we should just disable polkit support if this is missing.
   if not compiler.has_function('acl_get_file')
diff --git a/src/spice-client-glib-usb-acl-helper.c b/src/spice-client-glib-usb-acl-helper.c
index 4ff914c..4bfe96e 100644
--- a/src/spice-client-glib-usb-acl-helper.c
+++ b/src/spice-client-glib-usb-acl-helper.c
@@ -155,25 +155,6 @@ static void cleanup(void)
         g_main_loop_quit(loop);
 }
 
-/* Not available in polkit < 0.101 */
-#ifndef HAVE_POLKIT_AUTHORIZATION_RESULT_GET_DISMISSED
-static gboolean
-polkit_authorization_result_get_dismissed(PolkitAuthorizationResult *result)
-{
-    gboolean ret;
-    PolkitDetails *details;
-
-    g_return_val_if_fail(POLKIT_IS_AUTHORIZATION_RESULT(result), FALSE);
-
-    ret = FALSE;
-    details = polkit_authorization_result_get_details(result);
-    if (details != NULL && polkit_details_lookup(details, "polkit.dismissed"))
-        ret = TRUE;
-
-    return ret;
-}
-#endif
-
 static void check_authorization_cb(PolkitAuthority *authority,
                                    GAsyncResult *res, gpointer data)
 {
@@ -290,21 +271,6 @@ static void stdin_read_complete(GObject *src, GAsyncResult *res, gpointer data)
     g_free(s);
 }
 
-/* Fix for polkit 0.97 and later */
-#ifndef HAVE_POLKIT_AUTHORITY_GET_SYNC
-static 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
-
 #ifndef HAVE_CLEARENV
 extern char **environ;
 


More information about the Spice-commits mailing list