mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2026-05-05 00:37:58 +02:00
Bump minimum glib dependency version to 2.64
As per this apply the patch that applied on the generated code
This commit is contained in:
parent
5680b85eb5
commit
84023f525a
7 changed files with 60 additions and 153 deletions
|
|
@ -62,8 +62,7 @@ common_cflags = cc.get_supported_arguments([
|
|||
add_project_arguments(common_cflags, language: 'c')
|
||||
|
||||
host_system = host_machine.system()
|
||||
# NOTE: Bump gdbus-codegen min version once we can depend on 2.64!
|
||||
glib_min_version = '2.56'
|
||||
glib_min_version = '2.64'
|
||||
libfprint_min_version = '1.94.0'
|
||||
|
||||
glib_version_def = 'GLIB_VERSION_@0@_@1@'.format(
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
--- a/src/fprintd-dbus.c 2020-12-04 16:38:28.527712626 +0100
|
||||
+++ b/src/fprintd-dbus.c 2020-12-04 16:40:03.561692619 +0100
|
||||
@@ -1149,7 +1149,7 @@
|
||||
"ListEnrolledFingers",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1213,7 +1213,7 @@
|
||||
"ListEnrolledFingers",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
@@ -1253,7 +1253,7 @@
|
||||
"DeleteEnrolledFingers",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1312,7 +1312,7 @@
|
||||
"DeleteEnrolledFingers",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
@@ -1348,7 +1348,7 @@
|
||||
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
|
||||
"DeleteEnrolledFingers2",
|
||||
g_variant_new ("()"),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1404,7 +1404,7 @@
|
||||
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
|
||||
"DeleteEnrolledFingers2",
|
||||
g_variant_new ("()"),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
@@ -1443,7 +1443,7 @@
|
||||
"Claim",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1502,7 +1502,7 @@
|
||||
"Claim",
|
||||
g_variant_new ("(s)",
|
||||
arg_username),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
@@ -1633,7 +1633,7 @@
|
||||
"VerifyStart",
|
||||
g_variant_new ("(s)",
|
||||
arg_finger_name),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1692,7 +1692,7 @@
|
||||
"VerifyStart",
|
||||
g_variant_new ("(s)",
|
||||
arg_finger_name),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
@@ -1823,7 +1823,7 @@
|
||||
"EnrollStart",
|
||||
g_variant_new ("(s)",
|
||||
arg_finger_name),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
callback,
|
||||
@@ -1882,7 +1882,7 @@
|
||||
"EnrollStart",
|
||||
g_variant_new ("(s)",
|
||||
arg_finger_name),
|
||||
- G_DBUS_CALL_FLAGS_NONE,
|
||||
+ G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
cancellable,
|
||||
error);
|
||||
|
|
@ -6,31 +6,15 @@ dbus_interfaces = files(
|
|||
|
||||
install_data(dbus_interfaces, install_dir: dbus_interfaces_dir)
|
||||
|
||||
# NOTE: We should pass "--glib-min-required 2.64" but cannot
|
||||
fprintd_dbus_sources_base = gnome.gdbus_codegen('fprintd-dbus',
|
||||
fprintd_dbus_sources = gnome.gdbus_codegen('fprintd-dbus',
|
||||
sources: dbus_interfaces,
|
||||
autocleanup: 'all',
|
||||
interface_prefix: 'net.reactivated.Fprint.',
|
||||
namespace: 'FprintDBus',
|
||||
object_manager: true,
|
||||
extra_args: ['--glib-min-required', glib_min_version]
|
||||
)
|
||||
|
||||
# FIXME: remove this and just use fprintd_dbus_sources when we're on glib 2.64
|
||||
fprintd_dbus_sources = [
|
||||
fprintd_dbus_sources_base[1] # header file
|
||||
]
|
||||
|
||||
fprintd_dbus_sources += custom_target('fprintd-dbus-interactive',
|
||||
input: fprintd_dbus_sources_base[0], # c file,
|
||||
output: 'fprintd-dbus-interactive.c',
|
||||
command: [
|
||||
find_program('patch'),
|
||||
'-p1',
|
||||
'@INPUT@',
|
||||
files('dbus-interactive-auth.patch'),
|
||||
'-o', '@OUTPUT@',
|
||||
])
|
||||
|
||||
fprintd_enum_files = gnome.mkenums_simple('fprintd-enums',
|
||||
sources: 'fprintd.h',
|
||||
)
|
||||
|
|
|
|||
|
|
@ -57,10 +57,12 @@ delete_user_prints (FprintDBusDevice *dev,
|
|||
{
|
||||
if (fingername)
|
||||
return fprint_dbus_device_call_delete_enrolled_finger_sync (dev, fingername,
|
||||
NULL, error);
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, error);
|
||||
else
|
||||
return fprint_dbus_device_call_delete_enrolled_fingers2_sync (dev, NULL,
|
||||
error);
|
||||
return fprint_dbus_device_call_delete_enrolled_fingers2_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, error);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -70,7 +72,9 @@ delete_fingerprints (FprintDBusDevice *dev,
|
|||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username, NULL, &error))
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("failed to claim device: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -115,7 +119,9 @@ delete_fingerprints (FprintDBusDevice *dev,
|
|||
}
|
||||
g_clear_error (&error);
|
||||
|
||||
if (!fprint_dbus_device_call_release_sync (dev, NULL, &error))
|
||||
if (!fprint_dbus_device_call_release_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("ReleaseDevice failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -133,8 +139,9 @@ process_devices (guint argc, char **argv)
|
|||
guint num_devices;
|
||||
guint i;
|
||||
|
||||
if (!fprint_dbus_manager_call_get_devices_sync (manager, &devices,
|
||||
NULL, &error))
|
||||
if (!fprint_dbus_manager_call_get_devices_sync (manager,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, &devices, NULL, &error))
|
||||
{
|
||||
g_print ("Impossible to get devices: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ open_device (const char *username)
|
|||
g_autoptr(GError) error = NULL;
|
||||
g_autofree char *path = NULL;
|
||||
|
||||
if (!fprint_dbus_manager_call_get_default_device_sync (manager, &path,
|
||||
NULL, &error))
|
||||
if (!fprint_dbus_manager_call_get_default_device_sync (manager,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, &path, NULL, &error))
|
||||
{
|
||||
g_print ("Impossible to enroll: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -90,7 +91,9 @@ open_device (const char *username)
|
|||
exit (1);
|
||||
}
|
||||
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username, NULL, &error))
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("failed to claim device: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -167,8 +170,10 @@ do_enroll (FprintDBusDevice *dev)
|
|||
}
|
||||
|
||||
g_print ("Enrolling %s finger.\n", finger_name);
|
||||
if (!fprint_dbus_device_call_enroll_start_sync (dev, finger_name, NULL,
|
||||
&error))
|
||||
if (!fprint_dbus_device_call_enroll_start_sync (dev, finger_name,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
NULL, &error))
|
||||
{
|
||||
g_print ("EnrollStart failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -179,7 +184,9 @@ do_enroll (FprintDBusDevice *dev)
|
|||
|
||||
g_signal_handlers_disconnect_by_func (dev, proxy_signal_cb, &enroll_status);
|
||||
|
||||
if (!fprint_dbus_device_call_enroll_stop_sync (dev, NULL, &error))
|
||||
if (!fprint_dbus_device_call_enroll_stop_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("EnrollStop failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -192,7 +199,9 @@ static void
|
|||
release_device (FprintDBusDevice *dev)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
if (!fprint_dbus_device_call_release_sync (dev, NULL, &error))
|
||||
if (!fprint_dbus_device_call_release_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("ReleaseDevice failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ list_fingerprints (FprintDBusDevice *dev, const char *username)
|
|||
guint i;
|
||||
|
||||
if (!fprint_dbus_device_call_list_enrolled_fingers_sync (dev, username,
|
||||
&fingers, NULL,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, &fingers, NULL,
|
||||
&error))
|
||||
{
|
||||
gboolean ignore_error = FALSE;
|
||||
|
|
@ -103,8 +104,10 @@ process_devices (char **argv)
|
|||
guint num_devices;
|
||||
guint i;
|
||||
|
||||
if (!fprint_dbus_manager_call_get_devices_sync (manager, &devices, NULL,
|
||||
&error))
|
||||
if (!fprint_dbus_manager_call_get_devices_sync (manager,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
&devices, NULL, &error))
|
||||
{
|
||||
g_print ("Impossible to get devices: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
|
|||
|
|
@ -62,8 +62,10 @@ open_device (const char *username)
|
|||
g_autoptr(GError) error = NULL;
|
||||
g_autofree char *path = NULL;
|
||||
|
||||
if (!fprint_dbus_manager_call_get_default_device_sync (manager, &path,
|
||||
NULL, &error))
|
||||
if (!fprint_dbus_manager_call_get_default_device_sync (manager,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
&path, NULL, &error))
|
||||
{
|
||||
g_print ("Impossible to verify: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -82,7 +84,9 @@ open_device (const char *username)
|
|||
exit (1);
|
||||
}
|
||||
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username, NULL, &error))
|
||||
if (!fprint_dbus_device_call_claim_sync (dev, username,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1, NULL, &error))
|
||||
{
|
||||
g_print ("failed to claim device: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -99,6 +103,8 @@ find_finger (FprintDBusDevice *dev, const char *username)
|
|||
guint i;
|
||||
|
||||
if (!fprint_dbus_device_call_list_enrolled_fingers_sync (dev, username,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
&fingers,
|
||||
NULL, &error))
|
||||
{
|
||||
|
|
@ -218,7 +224,10 @@ do_verify (FprintDBusDevice *dev)
|
|||
g_signal_connect (dev, "g-signal", G_CALLBACK (proxy_signal_cb),
|
||||
&verify_state);
|
||||
|
||||
fprint_dbus_device_call_verify_start (dev, finger_name, NULL,
|
||||
fprint_dbus_device_call_verify_start (dev, finger_name,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
NULL,
|
||||
verify_started_cb,
|
||||
&verify_state);
|
||||
|
||||
|
|
@ -241,7 +250,10 @@ do_verify (FprintDBusDevice *dev)
|
|||
g_signal_handlers_disconnect_by_func (dev, proxy_signal_cb,
|
||||
&verify_state);
|
||||
|
||||
if (!fprint_dbus_device_call_verify_stop_sync (dev, NULL, &error))
|
||||
if (!fprint_dbus_device_call_verify_stop_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
NULL, &error))
|
||||
{
|
||||
g_print ("VerifyStop failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
@ -254,7 +266,10 @@ static void
|
|||
release_device (FprintDBusDevice *dev)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
if (!fprint_dbus_device_call_release_sync (dev, NULL, &error))
|
||||
if (!fprint_dbus_device_call_release_sync (dev,
|
||||
G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION,
|
||||
-1,
|
||||
NULL, &error))
|
||||
{
|
||||
g_print ("ReleaseDevice failed: %s\n", error->message);
|
||||
exit (1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue