mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 02:28:05 +00:00
debian/patches: Drop, they're all applied upstream
This commit is contained in:
@@ -1,178 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 14:42:35 +0100
|
|
||||||
Subject: Drop version from libfprint hwdb
|
|
||||||
|
|
||||||
As we are shipping a hwdb file now, we cannot have a collision with the
|
|
||||||
old libfprint version. Also, we are going to pull these rules into
|
|
||||||
systemd and they will not be installed via libfprint in the future. As
|
|
||||||
such, collisions will not happen again and it makes more sense like this
|
|
||||||
for systemd.
|
|
||||||
---
|
|
||||||
.gitlab-ci.yml | 144 --------------------------------------------------
|
|
||||||
libfprint/meson.build | 2 +-
|
|
||||||
2 files changed, 1 insertion(+), 145 deletions(-)
|
|
||||||
delete mode 100644 .gitlab-ci.yml
|
|
||||||
|
|
||||||
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
|
|
||||||
deleted file mode 100644
|
|
||||||
index 3f0925b..0000000
|
|
||||||
--- a/.gitlab-ci.yml
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,144 +0,0 @@
|
|
||||||
-include:
|
|
||||||
- - local: '.gitlab-ci/libfprint-templates.yaml'
|
|
||||||
- - project: 'wayland/ci-templates'
|
|
||||||
- ref: master
|
|
||||||
- file: '/templates/fedora.yml'
|
|
||||||
- - remote: 'https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml'
|
|
||||||
-
|
|
||||||
-variables:
|
|
||||||
- extends: .libfprint_common_variables
|
|
||||||
- FDO_DISTRIBUTION_TAG: latest
|
|
||||||
- FDO_DISTRIBUTION_VERSION: rawhide
|
|
||||||
- FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
|
||||||
- BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
|
|
||||||
- LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
|
|
||||||
-
|
|
||||||
-stages:
|
|
||||||
- - check-source
|
|
||||||
- - build
|
|
||||||
- - test
|
|
||||||
- - flatpak
|
|
||||||
-
|
|
||||||
-image: "$FEDORA_IMAGE"
|
|
||||||
-
|
|
||||||
-.build_one_driver_template: &build_one_driver
|
|
||||||
- script:
|
|
||||||
- # Build with a driver that doesn't need imaging, or nss
|
|
||||||
- - meson --werror -Ddrivers=$driver . _build
|
|
||||||
- - ninja -C _build
|
|
||||||
- - rm -rf _build/
|
|
||||||
-
|
|
||||||
-.build_template: &build
|
|
||||||
- script:
|
|
||||||
- # And build with everything
|
|
||||||
- - meson --werror -Ddrivers=all . _build
|
|
||||||
- - ninja -C _build
|
|
||||||
- - ninja -C _build install
|
|
||||||
-
|
|
||||||
-.build_template: &check_abi
|
|
||||||
- script:
|
|
||||||
- - ./.ci/check-abi ${LAST_ABI_BREAK} $(git rev-parse HEAD)
|
|
||||||
-
|
|
||||||
-build:
|
|
||||||
- stage: build
|
|
||||||
- except:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
- variables:
|
|
||||||
- driver: virtual_image
|
|
||||||
- <<: *build_one_driver
|
|
||||||
- <<: *build
|
|
||||||
-# <<: *check_abi
|
|
||||||
- artifacts:
|
|
||||||
- expose_as: "HTML Documentation"
|
|
||||||
- paths:
|
|
||||||
- - _build/doc/html/
|
|
||||||
- expire_in: 1 week
|
|
||||||
-
|
|
||||||
-test:
|
|
||||||
- stage: test
|
|
||||||
- except:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
- script:
|
|
||||||
- - meson --werror -Ddrivers=all -Db_coverage=true . _build
|
|
||||||
- - ninja -C _build
|
|
||||||
- - meson test -C _build --verbose --no-stdsplit --timeout-multiplier 3
|
|
||||||
- - ninja -C _build coverage
|
|
||||||
- - cat _build/meson-logs/coverage.txt
|
|
||||||
- artifacts:
|
|
||||||
- paths:
|
|
||||||
- - _build/meson-logs
|
|
||||||
- expire_in: 1 week
|
|
||||||
- coverage: '/^TOTAL.*\s+(\d+\%)$/'
|
|
||||||
-
|
|
||||||
-test_valgrind:
|
|
||||||
- stage: test
|
|
||||||
- except:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
- script:
|
|
||||||
- - meson -Ddrivers=all . _build
|
|
||||||
- - ninja -C _build
|
|
||||||
- - meson test -C _build --verbose --no-stdsplit --setup=valgrind
|
|
||||||
-
|
|
||||||
-test_scan_build:
|
|
||||||
- stage: test
|
|
||||||
- except:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
- allow_failure: true
|
|
||||||
- script:
|
|
||||||
- - meson -Ddrivers=all . _build
|
|
||||||
- # This is ugly, the wrapper disables the malloc checker
|
|
||||||
- - SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build ninja -C _build scan-build
|
|
||||||
- # Check that the directory is empty
|
|
||||||
- - "! ls -A _build/meson-logs/scanbuild | grep -q ."
|
|
||||||
- artifacts:
|
|
||||||
- paths:
|
|
||||||
- - _build/meson-logs
|
|
||||||
- expire_in: 1 week
|
|
||||||
-
|
|
||||||
-test_indent:
|
|
||||||
- stage: check-source
|
|
||||||
- except:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
- script:
|
|
||||||
- - scripts/uncrustify.sh
|
|
||||||
- - git diff
|
|
||||||
- - "! git status -s | grep -q ."
|
|
||||||
-
|
|
||||||
-flatpak:
|
|
||||||
- stage: flatpak
|
|
||||||
- extends: .flatpak
|
|
||||||
- image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
|
|
||||||
- variables:
|
|
||||||
- MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
|
|
||||||
- FLATPAK_MODULE: "libfprint"
|
|
||||||
- APP_ID: "org.freedesktop.libfprint.Demo"
|
|
||||||
- rules:
|
|
||||||
- - if: '$CI_PROJECT_PATH != "libfprint/libfprint"'
|
|
||||||
- when: never
|
|
||||||
- - if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
||||||
- when: never
|
|
||||||
- - if: '$CI_COMMIT_BRANCH == "master"'
|
|
||||||
- when: always
|
|
||||||
- - if: '$CI_COMMIT_TAG'
|
|
||||||
- when: always
|
|
||||||
- # For any other (commit), allow manual run.
|
|
||||||
- # This excludes MRs which would create a duplicate pipeline
|
|
||||||
- - if: '$CI_COMMIT_BRANCH'
|
|
||||||
- when: manual
|
|
||||||
- allow_failure: true
|
|
||||||
-
|
|
||||||
-# CONTAINERS creation stage
|
|
||||||
-container_fedora_build:
|
|
||||||
- extends: .fdo.container-build@fedora
|
|
||||||
- only:
|
|
||||||
- variables:
|
|
||||||
- - $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
|
|
||||||
- variables:
|
|
||||||
- GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
||||||
- # a list of packages to install
|
|
||||||
- FDO_DISTRIBUTION_PACKAGES: $LIBFPRINT_DEPENDENCIES
|
|
||||||
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
||||||
index 3464bf3..abf2fb9 100644
|
|
||||||
--- a/libfprint/meson.build
|
|
||||||
+++ b/libfprint/meson.build
|
|
||||||
@@ -304,7 +304,7 @@ udev_hwdb = executable('fprint-list-udev-hwdb',
|
|
||||||
# We always build this file; primarily so that systemd can pull it
|
|
||||||
# from the artefacts!
|
|
||||||
custom_target('udev-rules',
|
|
||||||
- output: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
+ output: '60-autosuspend-@0@.hwdb'.format(meson.project_name()),
|
|
||||||
capture: true,
|
|
||||||
command: [ udev_hwdb ],
|
|
||||||
install: get_option('udev_rules'),
|
|
||||||
@@ -1,491 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 14:13:03 +0100
|
|
||||||
Subject: Generate a hwdb instead of udev rules
|
|
||||||
|
|
||||||
We only use the rules/hwdb to enable auto-suspend. So, instead of
|
|
||||||
shipping our own rules, we can just use the existing autosuspend rules
|
|
||||||
and ship a hwdb that sets the appropriate flag.
|
|
||||||
|
|
||||||
Closes: #336
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/55a2bb55
|
|
||||||
---
|
|
||||||
libfprint/fprint-list-udev-hwdb.c | 191 +++++++++++++++++++++++++++++++++++++
|
|
||||||
libfprint/fprint-list-udev-rules.c | 188 ------------------------------------
|
|
||||||
libfprint/meson.build | 10 +-
|
|
||||||
meson.build | 6 +-
|
|
||||||
meson_options.txt | 4 +-
|
|
||||||
tests/meson.build | 4 +-
|
|
||||||
6 files changed, 203 insertions(+), 200 deletions(-)
|
|
||||||
create mode 100644 libfprint/fprint-list-udev-hwdb.c
|
|
||||||
delete mode 100644 libfprint/fprint-list-udev-rules.c
|
|
||||||
|
|
||||||
diff --git a/libfprint/fprint-list-udev-hwdb.c b/libfprint/fprint-list-udev-hwdb.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..b687085
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/libfprint/fprint-list-udev-hwdb.c
|
|
||||||
@@ -0,0 +1,191 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright (C) 2009 Red Hat <mjg@redhat.com>
|
|
||||||
+ * Copyright (C) 2008 Bastien Nocera <hadess@hadess.net>
|
|
||||||
+ * Copyright (C) 2008 Timo Hoenig <thoenig@suse.de>, <thoenig@nouse.net>
|
|
||||||
+ * Copyright (C) 2019 Benjamin Berg <bberg@redhat.com>
|
|
||||||
+ *
|
|
||||||
+ * This library is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU Lesser General Public
|
|
||||||
+ * License as published by the Free Software Foundation; either
|
|
||||||
+ * version 2.1 of the License, or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This library is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+ * Lesser General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU Lesser General Public
|
|
||||||
+ * License along with this library; if not, write to the Free Software
|
|
||||||
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <config.h>
|
|
||||||
+
|
|
||||||
+#include "fpi-context.h"
|
|
||||||
+#include "fpi-device.h"
|
|
||||||
+
|
|
||||||
+static const FpIdEntry whitelist_id_table[] = {
|
|
||||||
+ /* Currently known and unsupported devices.
|
|
||||||
+ * You can generate this list from the wiki page using e.g.:
|
|
||||||
+ * gio cat https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices.md | sed -n 's!|.*\([0-9a-fA-F]\{4\}\):\([0-9a-fA-F]\{4\}\).*|.*! { .vid = 0x\1, .pid = 0x\2 },!p'
|
|
||||||
+ */
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x036b },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x0c00 },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x0c4b },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x0c4c },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x0c4f },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x0c57 },
|
|
||||||
+ { .vid = 0x04f3, .pid = 0x2706 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x0081 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x0088 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x008a },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x009a },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x009b },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00a2 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00b7 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00bb },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00be },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00cb },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00d8 },
|
|
||||||
+ { .vid = 0x06cb, .pid = 0x00da },
|
|
||||||
+ { .vid = 0x0a5c, .pid = 0x5801 },
|
|
||||||
+ { .vid = 0x0a5c, .pid = 0x5805 },
|
|
||||||
+ { .vid = 0x0a5c, .pid = 0x5834 },
|
|
||||||
+ { .vid = 0x0a5c, .pid = 0x5843 },
|
|
||||||
+ { .vid = 0x10a5, .pid = 0x0007 },
|
|
||||||
+ { .vid = 0x1188, .pid = 0x9545 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0007 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x003a },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x003c },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x003d },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x003f },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0090 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0091 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0092 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0094 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x0097 },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x009d },
|
|
||||||
+ { .vid = 0x138a, .pid = 0x00ab },
|
|
||||||
+ { .vid = 0x147e, .pid = 0x1002 },
|
|
||||||
+ { .vid = 0x1491, .pid = 0x0088 },
|
|
||||||
+ { .vid = 0x16d1, .pid = 0x1027 },
|
|
||||||
+ { .vid = 0x1c7a, .pid = 0x0300 },
|
|
||||||
+ { .vid = 0x1c7a, .pid = 0x0570 },
|
|
||||||
+ { .vid = 0x1c7a, .pid = 0x0575 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5042 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5110 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5117 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5201 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x521d },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5301 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x530c },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x532d },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x533c },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5381 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5385 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x538c },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x538d },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5395 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5584 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x55a2 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x55a4 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x55b4 },
|
|
||||||
+ { .vid = 0x27c6, .pid = 0x5740 },
|
|
||||||
+ { .vid = 0x2808, .pid = 0x9338 },
|
|
||||||
+ { .vid = 0x298d, .pid = 0x2033 },
|
|
||||||
+ { .vid = 0x3538, .pid = 0x0930 },
|
|
||||||
+ { .vid = 0 },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const FpIdEntry blacklist_id_table[] = {
|
|
||||||
+ { .vid = 0x0483, .pid = 0x2016 },
|
|
||||||
+ /* https://bugs.freedesktop.org/show_bug.cgi?id=66659 */
|
|
||||||
+ { .vid = 0x045e, .pid = 0x00bb },
|
|
||||||
+ { .vid = 0 },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const FpDeviceClass whitelist = {
|
|
||||||
+ .type = FP_DEVICE_TYPE_USB,
|
|
||||||
+ .id_table = whitelist_id_table,
|
|
||||||
+ .id = "whitelist",
|
|
||||||
+ .full_name = "Hardcoded whitelist"
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+GHashTable *printed = NULL;
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+print_driver (const FpDeviceClass *cls)
|
|
||||||
+{
|
|
||||||
+ const FpIdEntry *entry;
|
|
||||||
+ gint num_printed = 0;
|
|
||||||
+
|
|
||||||
+ if (cls->type != FP_DEVICE_TYPE_USB)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ for (entry = cls->id_table; entry->vid != 0; entry++)
|
|
||||||
+ {
|
|
||||||
+ const FpIdEntry *bl_entry;
|
|
||||||
+ char *key;
|
|
||||||
+
|
|
||||||
+ for (bl_entry = blacklist_id_table; bl_entry->vid != 0; bl_entry++)
|
|
||||||
+ if (entry->vid == bl_entry->vid && entry->pid == bl_entry->pid)
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ if (bl_entry->vid != 0)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
||||||
+
|
|
||||||
+ if (g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
+ {
|
|
||||||
+ if (cls == &whitelist)
|
|
||||||
+ g_warning ("%s implemented by driver %s",
|
|
||||||
+ key, (const char *) g_hash_table_lookup (printed, key));
|
|
||||||
+ g_free (key);
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_hash_table_insert (printed, key, (void *) cls->id);
|
|
||||||
+
|
|
||||||
+ if (num_printed == 0)
|
|
||||||
+ {
|
|
||||||
+ if (cls != &whitelist)
|
|
||||||
+ g_print ("\n# Supported by libfprint driver %s\n", cls->id);
|
|
||||||
+ else
|
|
||||||
+ g_print ("\n# Known unsupported devices\n");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_print ("usb:v%04Xp%04X*\n",
|
|
||||||
+ entry->vid, entry->pid);
|
|
||||||
+ num_printed++;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (num_printed > 0)
|
|
||||||
+ g_print (" ID_AUTOSUSPEND=1\n");
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (int argc, char **argv)
|
|
||||||
+{
|
|
||||||
+ g_autoptr(GArray) drivers = fpi_get_driver_types ();
|
|
||||||
+ guint i;
|
|
||||||
+
|
|
||||||
+ printed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < drivers->len; i++)
|
|
||||||
+ {
|
|
||||||
+ GType driver = g_array_index (drivers, GType, i);
|
|
||||||
+ g_autoptr(FpDeviceClass) cls = g_type_class_ref (driver);
|
|
||||||
+
|
|
||||||
+ if (cls->type != FP_DEVICE_TYPE_USB)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ print_driver (cls);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ print_driver (&whitelist);
|
|
||||||
+
|
|
||||||
+ g_hash_table_destroy (printed);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
||||||
deleted file mode 100644
|
|
||||||
index 050a450..0000000
|
|
||||||
--- a/libfprint/fprint-list-udev-rules.c
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,188 +0,0 @@
|
|
||||||
-/*
|
|
||||||
- * Copyright (C) 2009 Red Hat <mjg@redhat.com>
|
|
||||||
- * Copyright (C) 2008 Bastien Nocera <hadess@hadess.net>
|
|
||||||
- * Copyright (C) 2008 Timo Hoenig <thoenig@suse.de>, <thoenig@nouse.net>
|
|
||||||
- * Copyright (C) 2019 Benjamin Berg <bberg@redhat.com>
|
|
||||||
- *
|
|
||||||
- * This library is free software; you can redistribute it and/or
|
|
||||||
- * modify it under the terms of the GNU Lesser General Public
|
|
||||||
- * License as published by the Free Software Foundation; either
|
|
||||||
- * version 2.1 of the License, or (at your option) any later version.
|
|
||||||
- *
|
|
||||||
- * This library is distributed in the hope that it will be useful,
|
|
||||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
- * Lesser General Public License for more details.
|
|
||||||
- *
|
|
||||||
- * You should have received a copy of the GNU Lesser General Public
|
|
||||||
- * License along with this library; if not, write to the Free Software
|
|
||||||
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-#include <config.h>
|
|
||||||
-
|
|
||||||
-#include "fpi-context.h"
|
|
||||||
-#include "fpi-device.h"
|
|
||||||
-
|
|
||||||
-static const FpIdEntry whitelist_id_table[] = {
|
|
||||||
- /* Currently known and unsupported devices.
|
|
||||||
- * You can generate this list from the wiki page using e.g.:
|
|
||||||
- * gio cat https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices.md | sed -n 's!|.*\([0-9a-fA-F]\{4\}\):\([0-9a-fA-F]\{4\}\).*|.*! { .vid = 0x\1, .pid = 0x\2 },!p'
|
|
||||||
- */
|
|
||||||
- { .vid = 0x04f3, .pid = 0x036b },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x0c00 },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x0c4b },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x0c4c },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x0c4f },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x0c57 },
|
|
||||||
- { .vid = 0x04f3, .pid = 0x2706 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x0081 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x0088 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x008a },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x009a },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x009b },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00a2 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00b7 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00bb },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00be },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00cb },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00d8 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00da },
|
|
||||||
- { .vid = 0x0a5c, .pid = 0x5801 },
|
|
||||||
- { .vid = 0x0a5c, .pid = 0x5805 },
|
|
||||||
- { .vid = 0x0a5c, .pid = 0x5834 },
|
|
||||||
- { .vid = 0x0a5c, .pid = 0x5843 },
|
|
||||||
- { .vid = 0x10a5, .pid = 0x0007 },
|
|
||||||
- { .vid = 0x1188, .pid = 0x9545 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0007 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x003a },
|
|
||||||
- { .vid = 0x138a, .pid = 0x003c },
|
|
||||||
- { .vid = 0x138a, .pid = 0x003d },
|
|
||||||
- { .vid = 0x138a, .pid = 0x003f },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0090 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0091 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0092 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0094 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x0097 },
|
|
||||||
- { .vid = 0x138a, .pid = 0x009d },
|
|
||||||
- { .vid = 0x138a, .pid = 0x00ab },
|
|
||||||
- { .vid = 0x147e, .pid = 0x1002 },
|
|
||||||
- { .vid = 0x1491, .pid = 0x0088 },
|
|
||||||
- { .vid = 0x16d1, .pid = 0x1027 },
|
|
||||||
- { .vid = 0x1c7a, .pid = 0x0300 },
|
|
||||||
- { .vid = 0x1c7a, .pid = 0x0570 },
|
|
||||||
- { .vid = 0x1c7a, .pid = 0x0575 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5042 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5110 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5117 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5201 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x521d },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5301 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x530c },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x532d },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x533c },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5381 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5385 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x538c },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x538d },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5395 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5584 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x55a2 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x55a4 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x55b4 },
|
|
||||||
- { .vid = 0x27c6, .pid = 0x5740 },
|
|
||||||
- { .vid = 0x2808, .pid = 0x9338 },
|
|
||||||
- { .vid = 0x298d, .pid = 0x2033 },
|
|
||||||
- { .vid = 0x3538, .pid = 0x0930 },
|
|
||||||
- { .vid = 0 },
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-static const FpIdEntry blacklist_id_table[] = {
|
|
||||||
- { .vid = 0x0483, .pid = 0x2016 },
|
|
||||||
- /* https://bugs.freedesktop.org/show_bug.cgi?id=66659 */
|
|
||||||
- { .vid = 0x045e, .pid = 0x00bb },
|
|
||||||
- { .vid = 0 },
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-static const FpDeviceClass whitelist = {
|
|
||||||
- .type = FP_DEVICE_TYPE_USB,
|
|
||||||
- .id_table = whitelist_id_table,
|
|
||||||
- .id = "whitelist",
|
|
||||||
- .full_name = "Hardcoded whitelist"
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-GHashTable *printed = NULL;
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-print_driver (const FpDeviceClass *cls)
|
|
||||||
-{
|
|
||||||
- const FpIdEntry *entry;
|
|
||||||
- gint num_printed = 0;
|
|
||||||
-
|
|
||||||
- if (cls->type != FP_DEVICE_TYPE_USB)
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
- for (entry = cls->id_table; entry->vid != 0; entry++)
|
|
||||||
- {
|
|
||||||
- const FpIdEntry *bl_entry;
|
|
||||||
- char *key;
|
|
||||||
-
|
|
||||||
- for (bl_entry = blacklist_id_table; bl_entry->vid != 0; bl_entry++)
|
|
||||||
- if (entry->vid == bl_entry->vid && entry->pid == bl_entry->pid)
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
- if (bl_entry->vid != 0)
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
- key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
||||||
-
|
|
||||||
- if (g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
- {
|
|
||||||
- if (cls == &whitelist)
|
|
||||||
- g_warning ("%s implemented by driver %s",
|
|
||||||
- key, (const char *) g_hash_table_lookup (printed, key));
|
|
||||||
- g_free (key);
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- g_hash_table_insert (printed, key, (void *) cls->id);
|
|
||||||
-
|
|
||||||
- if (num_printed == 0)
|
|
||||||
- g_print ("# %s\n", cls->full_name);
|
|
||||||
-
|
|
||||||
- g_print ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"\n",
|
|
||||||
- entry->vid, entry->pid);
|
|
||||||
- g_print ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{LIBFPRINT_DRIVER}=\"%s\"\n",
|
|
||||||
- entry->vid, entry->pid, cls->full_name);
|
|
||||||
- num_printed++;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (num_printed > 0)
|
|
||||||
- g_print ("\n");
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-int
|
|
||||||
-main (int argc, char **argv)
|
|
||||||
-{
|
|
||||||
- g_autoptr(GArray) drivers = fpi_get_driver_types ();
|
|
||||||
- guint i;
|
|
||||||
-
|
|
||||||
- printed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
|
||||||
-
|
|
||||||
- for (i = 0; i < drivers->len; i++)
|
|
||||||
- {
|
|
||||||
- GType driver = g_array_index (drivers, GType, i);
|
|
||||||
- g_autoptr(FpDeviceClass) cls = g_type_class_ref (driver);
|
|
||||||
-
|
|
||||||
- if (cls->type != FP_DEVICE_TYPE_USB)
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
- print_driver (cls);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- print_driver (&whitelist);
|
|
||||||
-
|
|
||||||
- g_hash_table_destroy (printed);
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
||||||
index 4d1d30c..e385ce8 100644
|
|
||||||
--- a/libfprint/meson.build
|
|
||||||
+++ b/libfprint/meson.build
|
|
||||||
@@ -295,19 +295,19 @@ libfprint_private_dep = declare_dependency(
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
-udev_rules = executable('fprint-list-udev-rules',
|
|
||||||
- 'fprint-list-udev-rules.c',
|
|
||||||
+udev_hwdb = executable('fprint-list-udev-hwdb',
|
|
||||||
+ 'fprint-list-udev-hwdb.c',
|
|
||||||
dependencies: libfprint_private_dep,
|
|
||||||
link_with: libfprint_drivers,
|
|
||||||
install: false)
|
|
||||||
|
|
||||||
if get_option('udev_rules')
|
|
||||||
custom_target('udev-rules',
|
|
||||||
- output: '60-@0@-autosuspend.rules'.format(versioned_libname),
|
|
||||||
+ output: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
capture: true,
|
|
||||||
- command: [ udev_rules ],
|
|
||||||
+ command: [ udev_hwdb ],
|
|
||||||
install: true,
|
|
||||||
- install_dir: udev_rules_dir)
|
|
||||||
+ install_dir: udev_hwdb_dir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
supported_devices = executable('fprint-list-supported-devices',
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 483f1ec..ab4ac72 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -194,11 +194,11 @@ drivers_type_func += '}'
|
|
||||||
root_inc = include_directories('.')
|
|
||||||
|
|
||||||
if get_option('udev_rules')
|
|
||||||
- udev_rules_dir = get_option('udev_rules_dir')
|
|
||||||
+ udev_hwdb_dir = get_option('udev_hwdb_dir')
|
|
||||||
|
|
||||||
- if udev_rules_dir == 'auto'
|
|
||||||
+ if udev_hwdb_dir == 'auto'
|
|
||||||
udev_dep = dependency('udev')
|
|
||||||
- udev_rules_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/rules.d'
|
|
||||||
+ udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
diff --git a/meson_options.txt b/meson_options.txt
|
|
||||||
index 746efdc..414695f 100644
|
|
||||||
--- a/meson_options.txt
|
|
||||||
+++ b/meson_options.txt
|
|
||||||
@@ -10,8 +10,8 @@ option('udev_rules',
|
|
||||||
description: 'Whether to create a udev rules file',
|
|
||||||
type: 'boolean',
|
|
||||||
value: true)
|
|
||||||
-option('udev_rules_dir',
|
|
||||||
- description: 'Installation path for udev rules',
|
|
||||||
+option('udev_hwdb_dir',
|
|
||||||
+ description: 'Installation path for udev hwdb',
|
|
||||||
type: 'string',
|
|
||||||
value: 'auto')
|
|
||||||
option('gtk-examples',
|
|
||||||
diff --git a/tests/meson.build b/tests/meson.build
|
|
||||||
index 27bdd9f..4ebf3b7 100644
|
|
||||||
--- a/tests/meson.build
|
|
||||||
+++ b/tests/meson.build
|
|
||||||
@@ -170,8 +170,8 @@ foreach test_name: unit_tests
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
# Run udev rule generator with fatal warnings
|
|
||||||
-test('udev-rules',
|
|
||||||
- udev_rules,
|
|
||||||
+test('udev-hwdb',
|
|
||||||
+ udev_hwdb,
|
|
||||||
env: envs)
|
|
||||||
|
|
||||||
gdb = find_program('gdb', required: false)
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
|
||||||
Date: Thu, 21 Jan 2021 00:57:43 +0100
|
|
||||||
Subject: build: Ensure we process the data dir
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/018641ad
|
|
||||||
---
|
|
||||||
meson.build | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 415f27e..9494ebb 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -237,6 +237,7 @@ if get_option('gtk-examples')
|
|
||||||
subdir('demo')
|
|
||||||
endif
|
|
||||||
|
|
||||||
+subdir('data')
|
|
||||||
subdir('tests')
|
|
||||||
|
|
||||||
pkgconfig = import('pkgconfig')
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Thu, 21 Jan 2021 17:36:41 +0100
|
|
||||||
Subject: build: Explicitly mark libfprint as a shared library
|
|
||||||
|
|
||||||
While meson suggests to always use 'library' this leads to some unwanted
|
|
||||||
behaviors when it comes to generate pkg-config files for it, as they
|
|
||||||
will include `Libs.Private` / `Required.private` fields that should not
|
|
||||||
be really part of a shared library as libfprint is meant to be used.
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/89890dbd
|
|
||||||
---
|
|
||||||
libfprint/meson.build | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
||||||
index 110c458..9425e09 100644
|
|
||||||
--- a/libfprint/meson.build
|
|
||||||
+++ b/libfprint/meson.build
|
|
||||||
@@ -258,7 +258,7 @@ libfprint_drivers = static_library('fprint-drivers',
|
|
||||||
mapfile = files('libfprint.ver')
|
|
||||||
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0])
|
|
||||||
|
|
||||||
-libfprint = library(versioned_libname.split('lib')[1],
|
|
||||||
+libfprint = shared_library(versioned_libname.split('lib')[1],
|
|
||||||
sources: [
|
|
||||||
fp_enums,
|
|
||||||
libfprint_sources,
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
|
||||||
Date: Thu, 21 Jan 2021 15:34:36 +0100
|
|
||||||
Subject: build: Skip the hwdb test if not all drivers are really enabled
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/3b83157e9
|
|
||||||
---
|
|
||||||
meson.build | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 4c73c00..d5081c9 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -181,6 +181,10 @@ foreach driver: drivers
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
+if default_drivers_are_enabled and supported_drivers != drivers
|
|
||||||
+ default_drivers_are_enabled = false
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
# Export the drivers' types to the core code
|
|
||||||
drivers_type_list = []
|
|
||||||
drivers_type_func = []
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
|
||||||
Date: Thu, 21 Jan 2021 01:17:02 +0100
|
|
||||||
Subject: data: Keep using versioned libname for hwdb file
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2f6adce2
|
|
||||||
---
|
|
||||||
data/meson.build | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
|
||||||
index 975c1c3..99adf5d 100644
|
|
||||||
--- a/data/meson.build
|
|
||||||
+++ b/data/meson.build
|
|
||||||
@@ -3,7 +3,7 @@ if get_option('udev_rules')
|
|
||||||
# ninja -C <builddir> libfprint/sync-udev-hwdb
|
|
||||||
|
|
||||||
install_data('autosuspend.hwdb',
|
|
||||||
- rename: '60-autosuspend-@0@.hwdb'.format(meson.project_name()),
|
|
||||||
+ rename: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
install_dir: udev_hwdb_dir,
|
|
||||||
)
|
|
||||||
endif
|
|
||||||
-437
@@ -1,437 +0,0 @@
|
|||||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
|
||||||
Date: Wed, 20 Jan 2021 20:02:05 +0100
|
|
||||||
Subject: data: Use auto-generated but hardcoded autosuspend hwdb file
|
|
||||||
|
|
||||||
This solves various problems:
|
|
||||||
1. It stays the same also if some drivers have been disabled
|
|
||||||
2. It uses a stable path for being imported by systemd
|
|
||||||
3. It is still checked for its validity by tests
|
|
||||||
4. It can be auto-generated using a simple command
|
|
||||||
---
|
|
||||||
data/autosuspend.hwdb | 262 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
data/meson.build | 9 ++
|
|
||||||
libfprint/fprint-list-udev-hwdb.c | 5 +
|
|
||||||
libfprint/meson.build | 24 ++--
|
|
||||||
meson.build | 12 ++
|
|
||||||
tests/meson.build | 5 +-
|
|
||||||
tests/test-generated-hwdb.sh | 24 ++++
|
|
||||||
7 files changed, 332 insertions(+), 9 deletions(-)
|
|
||||||
create mode 100644 data/autosuspend.hwdb
|
|
||||||
create mode 100644 data/meson.build
|
|
||||||
create mode 100755 tests/test-generated-hwdb.sh
|
|
||||||
|
|
||||||
diff --git a/data/autosuspend.hwdb b/data/autosuspend.hwdb
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f22d16a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/autosuspend.hwdb
|
|
||||||
@@ -0,0 +1,262 @@
|
|
||||||
+# This file has been generated using fprint-list-udev-hwdb with all drivers enabled
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver upektc_img
|
|
||||||
+usb:v147Ep2016*
|
|
||||||
+usb:v147Ep2020*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver vfs5011
|
|
||||||
+usb:v138Ap0010*
|
|
||||||
+usb:v138Ap0011*
|
|
||||||
+usb:v138Ap0015*
|
|
||||||
+usb:v138Ap0017*
|
|
||||||
+usb:v138Ap0018*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes3500
|
|
||||||
+usb:v08FFp5731*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes4000
|
|
||||||
+usb:v5501p08FF*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes1610
|
|
||||||
+usb:v08FFp1600*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes1660
|
|
||||||
+usb:v08FFp1660*
|
|
||||||
+usb:v08FFp1680*
|
|
||||||
+usb:v08FFp1681*
|
|
||||||
+usb:v08FFp1682*
|
|
||||||
+usb:v08FFp1683*
|
|
||||||
+usb:v08FFp1684*
|
|
||||||
+usb:v08FFp1685*
|
|
||||||
+usb:v08FFp1686*
|
|
||||||
+usb:v08FFp1687*
|
|
||||||
+usb:v08FFp1688*
|
|
||||||
+usb:v08FFp1689*
|
|
||||||
+usb:v08FFp168A*
|
|
||||||
+usb:v08FFp168B*
|
|
||||||
+usb:v08FFp168C*
|
|
||||||
+usb:v08FFp168D*
|
|
||||||
+usb:v08FFp168E*
|
|
||||||
+usb:v08FFp168F*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes2660
|
|
||||||
+usb:v08FFp2660*
|
|
||||||
+usb:v08FFp2680*
|
|
||||||
+usb:v08FFp2681*
|
|
||||||
+usb:v08FFp2682*
|
|
||||||
+usb:v08FFp2683*
|
|
||||||
+usb:v08FFp2684*
|
|
||||||
+usb:v08FFp2685*
|
|
||||||
+usb:v08FFp2686*
|
|
||||||
+usb:v08FFp2687*
|
|
||||||
+usb:v08FFp2688*
|
|
||||||
+usb:v08FFp2689*
|
|
||||||
+usb:v08FFp268A*
|
|
||||||
+usb:v08FFp268B*
|
|
||||||
+usb:v08FFp268C*
|
|
||||||
+usb:v08FFp268D*
|
|
||||||
+usb:v08FFp268E*
|
|
||||||
+usb:v08FFp268F*
|
|
||||||
+usb:v08FFp2691*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes2501
|
|
||||||
+usb:v08FFp2500*
|
|
||||||
+usb:v08FFp2580*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver aes2550
|
|
||||||
+usb:v08FFp2550*
|
|
||||||
+usb:v08FFp2810*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver vfs101
|
|
||||||
+usb:v138Ap0001*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver vfs301
|
|
||||||
+usb:v138Ap0005*
|
|
||||||
+usb:v138Ap0008*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver vfs0050
|
|
||||||
+usb:v138Ap0050*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver etes603
|
|
||||||
+usb:v1C7Ap0603*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver vcom5s
|
|
||||||
+usb:v061Ap0110*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver synaptics
|
|
||||||
+usb:v06CBp00BD*
|
|
||||||
+usb:v06CBp00E9*
|
|
||||||
+usb:v06CBp00DF*
|
|
||||||
+usb:v06CBp00F9*
|
|
||||||
+usb:v06CBp00FC*
|
|
||||||
+usb:v06CBp00C2*
|
|
||||||
+usb:v06CBp00C9*
|
|
||||||
+usb:v06CBp00E7*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver elan
|
|
||||||
+usb:v04F3p0903*
|
|
||||||
+usb:v04F3p0907*
|
|
||||||
+usb:v04F3p0C01*
|
|
||||||
+usb:v04F3p0C02*
|
|
||||||
+usb:v04F3p0C03*
|
|
||||||
+usb:v04F3p0C04*
|
|
||||||
+usb:v04F3p0C05*
|
|
||||||
+usb:v04F3p0C06*
|
|
||||||
+usb:v04F3p0C07*
|
|
||||||
+usb:v04F3p0C08*
|
|
||||||
+usb:v04F3p0C09*
|
|
||||||
+usb:v04F3p0C0A*
|
|
||||||
+usb:v04F3p0C0B*
|
|
||||||
+usb:v04F3p0C0C*
|
|
||||||
+usb:v04F3p0C0D*
|
|
||||||
+usb:v04F3p0C0E*
|
|
||||||
+usb:v04F3p0C0F*
|
|
||||||
+usb:v04F3p0C10*
|
|
||||||
+usb:v04F3p0C11*
|
|
||||||
+usb:v04F3p0C12*
|
|
||||||
+usb:v04F3p0C13*
|
|
||||||
+usb:v04F3p0C14*
|
|
||||||
+usb:v04F3p0C15*
|
|
||||||
+usb:v04F3p0C16*
|
|
||||||
+usb:v04F3p0C17*
|
|
||||||
+usb:v04F3p0C18*
|
|
||||||
+usb:v04F3p0C19*
|
|
||||||
+usb:v04F3p0C1A*
|
|
||||||
+usb:v04F3p0C1B*
|
|
||||||
+usb:v04F3p0C1C*
|
|
||||||
+usb:v04F3p0C1D*
|
|
||||||
+usb:v04F3p0C1E*
|
|
||||||
+usb:v04F3p0C1F*
|
|
||||||
+usb:v04F3p0C20*
|
|
||||||
+usb:v04F3p0C21*
|
|
||||||
+usb:v04F3p0C22*
|
|
||||||
+usb:v04F3p0C23*
|
|
||||||
+usb:v04F3p0C24*
|
|
||||||
+usb:v04F3p0C25*
|
|
||||||
+usb:v04F3p0C26*
|
|
||||||
+usb:v04F3p0C27*
|
|
||||||
+usb:v04F3p0C28*
|
|
||||||
+usb:v04F3p0C29*
|
|
||||||
+usb:v04F3p0C2A*
|
|
||||||
+usb:v04F3p0C2B*
|
|
||||||
+usb:v04F3p0C2C*
|
|
||||||
+usb:v04F3p0C2D*
|
|
||||||
+usb:v04F3p0C2E*
|
|
||||||
+usb:v04F3p0C2F*
|
|
||||||
+usb:v04F3p0C30*
|
|
||||||
+usb:v04F3p0C31*
|
|
||||||
+usb:v04F3p0C32*
|
|
||||||
+usb:v04F3p0C33*
|
|
||||||
+usb:v04F3p0C42*
|
|
||||||
+usb:v04F3p0C4D*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver uru4000
|
|
||||||
+usb:v045Ep00BC*
|
|
||||||
+usb:v045Ep00BD*
|
|
||||||
+usb:v045Ep00CA*
|
|
||||||
+usb:v05BAp0007*
|
|
||||||
+usb:v05BAp0008*
|
|
||||||
+usb:v05BAp000A*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver upektc
|
|
||||||
+usb:v0483p2015*
|
|
||||||
+usb:v147Ep3001*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver upeksonly
|
|
||||||
+usb:v147Ep1000*
|
|
||||||
+usb:v147Ep1001*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Supported by libfprint driver goodixmoc
|
|
||||||
+usb:v27C6p5840*
|
|
||||||
+usb:v27C6p6496*
|
|
||||||
+usb:v27C6p60A2*
|
|
||||||
+usb:v27C6p63AC*
|
|
||||||
+usb:v27C6p639C*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
+
|
|
||||||
+# Known unsupported devices
|
|
||||||
+usb:v04F3p036B*
|
|
||||||
+usb:v04F3p0C00*
|
|
||||||
+usb:v04F3p0C4B*
|
|
||||||
+usb:v04F3p0C4C*
|
|
||||||
+usb:v04F3p0C4F*
|
|
||||||
+usb:v04F3p0C57*
|
|
||||||
+usb:v04F3p2706*
|
|
||||||
+usb:v06CBp0081*
|
|
||||||
+usb:v06CBp0088*
|
|
||||||
+usb:v06CBp008A*
|
|
||||||
+usb:v06CBp009A*
|
|
||||||
+usb:v06CBp009B*
|
|
||||||
+usb:v06CBp00A2*
|
|
||||||
+usb:v06CBp00B7*
|
|
||||||
+usb:v06CBp00BB*
|
|
||||||
+usb:v06CBp00BE*
|
|
||||||
+usb:v06CBp00CB*
|
|
||||||
+usb:v06CBp00D8*
|
|
||||||
+usb:v06CBp00DA*
|
|
||||||
+usb:v0A5Cp5801*
|
|
||||||
+usb:v0A5Cp5805*
|
|
||||||
+usb:v0A5Cp5834*
|
|
||||||
+usb:v0A5Cp5843*
|
|
||||||
+usb:v10A5p0007*
|
|
||||||
+usb:v1188p9545*
|
|
||||||
+usb:v138Ap0007*
|
|
||||||
+usb:v138Ap003A*
|
|
||||||
+usb:v138Ap003C*
|
|
||||||
+usb:v138Ap003D*
|
|
||||||
+usb:v138Ap003F*
|
|
||||||
+usb:v138Ap0090*
|
|
||||||
+usb:v138Ap0091*
|
|
||||||
+usb:v138Ap0092*
|
|
||||||
+usb:v138Ap0094*
|
|
||||||
+usb:v138Ap0097*
|
|
||||||
+usb:v138Ap009D*
|
|
||||||
+usb:v138Ap00AB*
|
|
||||||
+usb:v147Ep1002*
|
|
||||||
+usb:v1491p0088*
|
|
||||||
+usb:v16D1p1027*
|
|
||||||
+usb:v1C7Ap0300*
|
|
||||||
+usb:v1C7Ap0570*
|
|
||||||
+usb:v1C7Ap0575*
|
|
||||||
+usb:v27C6p5042*
|
|
||||||
+usb:v27C6p5110*
|
|
||||||
+usb:v27C6p5117*
|
|
||||||
+usb:v27C6p5201*
|
|
||||||
+usb:v27C6p521D*
|
|
||||||
+usb:v27C6p5301*
|
|
||||||
+usb:v27C6p530C*
|
|
||||||
+usb:v27C6p532D*
|
|
||||||
+usb:v27C6p533C*
|
|
||||||
+usb:v27C6p5381*
|
|
||||||
+usb:v27C6p5385*
|
|
||||||
+usb:v27C6p538C*
|
|
||||||
+usb:v27C6p538D*
|
|
||||||
+usb:v27C6p5395*
|
|
||||||
+usb:v27C6p5584*
|
|
||||||
+usb:v27C6p55A2*
|
|
||||||
+usb:v27C6p55A4*
|
|
||||||
+usb:v27C6p55B4*
|
|
||||||
+usb:v27C6p5740*
|
|
||||||
+usb:v2808p9338*
|
|
||||||
+usb:v298Dp2033*
|
|
||||||
+usb:v3538p0930*
|
|
||||||
+ ID_AUTOSUSPEND=1
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..975c1c3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/meson.build
|
|
||||||
@@ -0,0 +1,9 @@
|
|
||||||
+if get_option('udev_rules')
|
|
||||||
+ # This file has to be updated using
|
|
||||||
+ # ninja -C <builddir> libfprint/sync-udev-hwdb
|
|
||||||
+
|
|
||||||
+ install_data('autosuspend.hwdb',
|
|
||||||
+ rename: '60-autosuspend-@0@.hwdb'.format(meson.project_name()),
|
|
||||||
+ install_dir: udev_hwdb_dir,
|
|
||||||
+ )
|
|
||||||
+endif
|
|
||||||
diff --git a/libfprint/fprint-list-udev-hwdb.c b/libfprint/fprint-list-udev-hwdb.c
|
|
||||||
index b687085..630be0f 100644
|
|
||||||
--- a/libfprint/fprint-list-udev-hwdb.c
|
|
||||||
+++ b/libfprint/fprint-list-udev-hwdb.c
|
|
||||||
@@ -168,8 +168,13 @@ int
|
|
||||||
main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
g_autoptr(GArray) drivers = fpi_get_driver_types ();
|
|
||||||
+ g_autofree char *program_name = NULL;
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
+ program_name = g_path_get_basename (argv[0]);
|
|
||||||
+ g_print ("# This file has been generated using %s with all drivers enabled\n",
|
|
||||||
+ program_name);
|
|
||||||
+
|
|
||||||
printed = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
|
||||||
|
|
||||||
for (i = 0; i < drivers->len; i++)
|
|
||||||
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
||||||
index abf2fb9..110c458 100644
|
|
||||||
--- a/libfprint/meson.build
|
|
||||||
+++ b/libfprint/meson.build
|
|
||||||
@@ -301,16 +301,24 @@ udev_hwdb = executable('fprint-list-udev-hwdb',
|
|
||||||
link_with: libfprint_drivers,
|
|
||||||
install: false)
|
|
||||||
|
|
||||||
-# We always build this file; primarily so that systemd can pull it
|
|
||||||
-# from the artefacts!
|
|
||||||
-custom_target('udev-rules',
|
|
||||||
- output: '60-autosuspend-@0@.hwdb'.format(meson.project_name()),
|
|
||||||
+udev_hwdb_generator = custom_target('udev-hwdb',
|
|
||||||
+ output: 'autosuspend.hwdb',
|
|
||||||
+ depend_files: drivers_sources,
|
|
||||||
capture: true,
|
|
||||||
command: [ udev_hwdb ],
|
|
||||||
- install: get_option('udev_rules'),
|
|
||||||
- install_dir: udev_hwdb_dir,
|
|
||||||
- build_by_default: true
|
|
||||||
- )
|
|
||||||
+ install: false,
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
+custom_target('sync-udev-hwdb',
|
|
||||||
+ depends: udev_hwdb_generator,
|
|
||||||
+ output: 'sync-udev-hwdb',
|
|
||||||
+ install: false,
|
|
||||||
+ command: [
|
|
||||||
+ 'cp', '-v',
|
|
||||||
+ udev_hwdb_generator.full_path(),
|
|
||||||
+ meson.source_root() / 'data'
|
|
||||||
+ ]
|
|
||||||
+)
|
|
||||||
|
|
||||||
supported_devices = executable('fprint-list-supported-devices',
|
|
||||||
'fprint-list-supported-devices.c',
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index db619d7..415f27e 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -136,6 +136,18 @@ if drivers.length() == 0 or drivers[0] == ''
|
|
||||||
error('Cannot build libfprint without drivers, please specify a valid value for the drivers option')
|
|
||||||
endif
|
|
||||||
|
|
||||||
+if drivers == all_drivers or drivers == default_drivers
|
|
||||||
+ default_drivers_are_enabled = true
|
|
||||||
+else
|
|
||||||
+ default_drivers_are_enabled = true
|
|
||||||
+ foreach driver: default_drivers
|
|
||||||
+ if driver not in drivers
|
|
||||||
+ default_drivers_are_enabled = false
|
|
||||||
+ break
|
|
||||||
+ endif
|
|
||||||
+ endforeach
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
nss_dep = dependency('', required: false)
|
|
||||||
imaging_dep = dependency('', required: false)
|
|
||||||
libfprint_conf.set10('HAVE_PIXMAN', false)
|
|
||||||
diff --git a/tests/meson.build b/tests/meson.build
|
|
||||||
index 4ebf3b7..8e24980 100644
|
|
||||||
--- a/tests/meson.build
|
|
||||||
+++ b/tests/meson.build
|
|
||||||
@@ -5,6 +5,7 @@ envs.set('G_MESSAGES_DEBUG', 'all')
|
|
||||||
|
|
||||||
# Setup paths
|
|
||||||
envs.set('MESON_SOURCE_ROOT', meson.source_root())
|
|
||||||
+envs.set('MESON_BUILD_ROOT', meson.build_root())
|
|
||||||
envs.prepend('LD_LIBRARY_PATH', join_paths(meson.build_root(), 'libfprint'))
|
|
||||||
|
|
||||||
# Set FP_DEVICE_EMULATION so that drivers can adapt (e.g. to use fixed
|
|
||||||
@@ -170,8 +171,10 @@ foreach test_name: unit_tests
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
# Run udev rule generator with fatal warnings
|
|
||||||
+envs.set('UDEV_HWDB', udev_hwdb.full_path())
|
|
||||||
+envs.set('UDEV_HWDB_CHECK_CONTENTS', default_drivers_are_enabled ? '1' : '0')
|
|
||||||
test('udev-hwdb',
|
|
||||||
- udev_hwdb,
|
|
||||||
+ find_program('test-generated-hwdb.sh'),
|
|
||||||
env: envs)
|
|
||||||
|
|
||||||
gdb = find_program('gdb', required: false)
|
|
||||||
diff --git a/tests/test-generated-hwdb.sh b/tests/test-generated-hwdb.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 0000000..34209cb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tests/test-generated-hwdb.sh
|
|
||||||
@@ -0,0 +1,24 @@
|
|
||||||
+#!/usr/bin/env bash
|
|
||||||
+set -e
|
|
||||||
+
|
|
||||||
+[ -x "$UDEV_HWDB" ] || exit 1
|
|
||||||
+
|
|
||||||
+if [ "$UDEV_HWDB_CHECK_CONTENTS" == 1 ]; then
|
|
||||||
+ generated_rules=$(mktemp "${TMPDIR:-/tmp}/libfprint-XXXXXX.hwdb")
|
|
||||||
+else
|
|
||||||
+ generated_rules=/dev/null
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+$UDEV_HWDB > "$generated_rules"
|
|
||||||
+
|
|
||||||
+if [ "$UDEV_HWDB_CHECK_CONTENTS" != 1 ]; then
|
|
||||||
+ exit 77
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+if ! cmp "$MESON_SOURCE_ROOT/data/autosuspend.hwdb" "$generated_rules"; then
|
|
||||||
+ echo "E: Autosuspend file needs to be re-generated!"
|
|
||||||
+ echo " ninja -C $MESON_BUILD_ROOT libfprint/sync-udev-hwdb"
|
|
||||||
+ exit 1
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+rm "$generated_rules"
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
From: Didier Raboud <odyx@debian.org>
|
|
||||||
Date: Wed, 2 Dec 2020 04:57:32 +0100
|
|
||||||
Subject: Tweak the udev rules creator for Debian usage
|
|
||||||
|
|
||||||
List all devices; automatic power/control only for the non-blacklisted
|
|
||||||
ones; mode and group to all.
|
|
||||||
|
|
||||||
Author: Didier Raboud <odyx@debian.org>
|
|
||||||
Author: Sebastien Bacher <seb128@ubuntu.com>
|
|
||||||
Origin: vendor
|
|
||||||
Last-Update: 2020-01-10
|
|
||||||
---
|
|
||||||
libfprint/fprint-list-udev-rules.c | 9 ++++-----
|
|
||||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
||||||
index d6c884c..3b6f572 100644
|
|
||||||
--- a/libfprint/fprint-list-udev-rules.c
|
|
||||||
+++ b/libfprint/fprint-list-udev-rules.c
|
|
||||||
@@ -133,9 +133,6 @@ print_driver (const FpDeviceClass *cls)
|
|
||||||
if (entry->vid == bl_entry->vid && entry->pid == bl_entry->pid)
|
|
||||||
break;
|
|
||||||
|
|
||||||
- if (bl_entry->vid != 0)
|
|
||||||
- continue;
|
|
||||||
-
|
|
||||||
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
||||||
|
|
||||||
if (g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
@@ -149,8 +146,10 @@ print_driver (const FpDeviceClass *cls)
|
|
||||||
if (num_printed == 0)
|
|
||||||
g_print ("# %s\n", cls->full_name);
|
|
||||||
|
|
||||||
- g_print ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"\n",
|
|
||||||
- entry->vid, entry->pid);
|
|
||||||
+ g_print ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", ", entry->vid, entry->pid);
|
|
||||||
+ if (bl_entry->vid == 0)
|
|
||||||
+ g_print ("TEST==\"power/control\", ATTR{power/control}=\"auto\", ");
|
|
||||||
+ g_print ("MODE=\"0660\", GROUP=\"plugdev\"\n");
|
|
||||||
g_print ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{LIBFPRINT_DRIVER}=\"%s\"\n",
|
|
||||||
entry->vid, entry->pid, cls->full_name);
|
|
||||||
num_printed++;
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 14:19:10 +0100
|
|
||||||
Subject: meson: Always build hwdb file
|
|
||||||
|
|
||||||
We want systemd to pull our hwdb. In order to ease this, always build
|
|
||||||
the hwdb file, even if it is disabled.
|
|
||||||
|
|
||||||
Once systemd has merged the rules, downstream should turn off the rules
|
|
||||||
in libfprint. The default in libfprint will also be changed to not build
|
|
||||||
the hwdb (udev_rules option) eventually.
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/cbce56c1
|
|
||||||
---
|
|
||||||
libfprint/meson.build | 18 ++++++++++--------
|
|
||||||
meson.build | 2 ++
|
|
||||||
2 files changed, 12 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
||||||
index e385ce8..3464bf3 100644
|
|
||||||
--- a/libfprint/meson.build
|
|
||||||
+++ b/libfprint/meson.build
|
|
||||||
@@ -301,14 +301,16 @@ udev_hwdb = executable('fprint-list-udev-hwdb',
|
|
||||||
link_with: libfprint_drivers,
|
|
||||||
install: false)
|
|
||||||
|
|
||||||
-if get_option('udev_rules')
|
|
||||||
- custom_target('udev-rules',
|
|
||||||
- output: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
- capture: true,
|
|
||||||
- command: [ udev_hwdb ],
|
|
||||||
- install: true,
|
|
||||||
- install_dir: udev_hwdb_dir)
|
|
||||||
-endif
|
|
||||||
+# We always build this file; primarily so that systemd can pull it
|
|
||||||
+# from the artefacts!
|
|
||||||
+custom_target('udev-rules',
|
|
||||||
+ output: '60-autosuspend-@0@.hwdb'.format(versioned_libname),
|
|
||||||
+ capture: true,
|
|
||||||
+ command: [ udev_hwdb ],
|
|
||||||
+ install: get_option('udev_rules'),
|
|
||||||
+ install_dir: udev_hwdb_dir,
|
|
||||||
+ build_by_default: true
|
|
||||||
+ )
|
|
||||||
|
|
||||||
supported_devices = executable('fprint-list-supported-devices',
|
|
||||||
'fprint-list-supported-devices.c',
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index ab4ac72..db619d7 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -200,6 +200,8 @@ if get_option('udev_rules')
|
|
||||||
udev_dep = dependency('udev')
|
|
||||||
udev_hwdb_dir = udev_dep.get_pkgconfig_variable('udevdir') + '/hwdb.d'
|
|
||||||
endif
|
|
||||||
+else
|
|
||||||
+ udev_hwdb_dir = false
|
|
||||||
endif
|
|
||||||
|
|
||||||
if get_option('gtk-examples')
|
|
||||||
-94
@@ -1,94 +0,0 @@
|
|||||||
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
|
|
||||||
Date: Thu, 10 Dec 2020 20:22:54 +0100
|
|
||||||
Subject: meson: Do not support drivers known to fail in Big Endian archs
|
|
||||||
|
|
||||||
When building in big endian architectures some device tests will fail,
|
|
||||||
as per this we're pretty sure that most of the drivers are not ready
|
|
||||||
to work in big-endian architectures.
|
|
||||||
Since we're aware of this, better to just stop supporting those drivers
|
|
||||||
instead of having each distribution to handle the problem.
|
|
||||||
|
|
||||||
So, add a list of supported drivers that is filled depending the
|
|
||||||
architecture type we're building on. Keep continue building those
|
|
||||||
drivers since we want to at least test-build them, but do not expose
|
|
||||||
them as libfprint drivers, so if a device in the system uses any of them
|
|
||||||
will be ignored.
|
|
||||||
|
|
||||||
At the same time, we keep track of the problem, so that we can fix the
|
|
||||||
drivers.
|
|
||||||
|
|
||||||
Related to #236
|
|
||||||
|
|
||||||
Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/216
|
|
||||||
---
|
|
||||||
meson.build | 21 ++++++++++++++++++++-
|
|
||||||
tests/meson.build | 3 ++-
|
|
||||||
2 files changed, 22 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index 4c52e2e..115ff49 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -89,6 +89,7 @@ cairo_dep = dependency('cairo', required: false)
|
|
||||||
# Drivers
|
|
||||||
drivers = get_option('drivers').split(',')
|
|
||||||
virtual_drivers = [ 'virtual_image' ]
|
|
||||||
+
|
|
||||||
default_drivers = [
|
|
||||||
'upektc_img',
|
|
||||||
'vfs5011',
|
|
||||||
@@ -113,6 +114,14 @@ default_drivers = [
|
|
||||||
'goodixmoc',
|
|
||||||
]
|
|
||||||
|
|
||||||
+# FIXME: All the drivers should be fixed by adjusting the byte order.
|
|
||||||
+# See https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/236
|
|
||||||
+endian_independent_drivers = virtual_drivers
|
|
||||||
+endian_independent_drivers + [
|
|
||||||
+ 'aes3500',
|
|
||||||
+ 'synaptics',
|
|
||||||
+]
|
|
||||||
+
|
|
||||||
all_drivers = default_drivers + virtual_drivers
|
|
||||||
|
|
||||||
if drivers == [ 'all' ]
|
|
||||||
@@ -150,6 +159,16 @@ foreach driver: drivers
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
+supported_drivers = []
|
|
||||||
+foreach driver: drivers
|
|
||||||
+ if build_machine.endian() == 'little' or driver in endian_independent_drivers
|
|
||||||
+ supported_drivers += driver
|
|
||||||
+ else
|
|
||||||
+ warning('Driver @0@ is not supported by big endian cpu @1@. Please, fix it!'.format(
|
|
||||||
+ driver, build_machine.cpu()))
|
|
||||||
+ endif
|
|
||||||
+endforeach
|
|
||||||
+
|
|
||||||
# Export the drivers' types to the core code
|
|
||||||
drivers_type_list = []
|
|
||||||
drivers_type_func = []
|
|
||||||
@@ -162,7 +181,7 @@ drivers_type_func += '{'
|
|
||||||
drivers_type_func += ' GArray *drivers = g_array_new (TRUE, FALSE, sizeof (GType));'
|
|
||||||
drivers_type_func += ' GType t;'
|
|
||||||
drivers_type_func += ''
|
|
||||||
-foreach driver: drivers
|
|
||||||
+foreach driver: supported_drivers
|
|
||||||
drivers_type_list += 'extern GType (fpi_device_' + driver + '_get_type) (void);'
|
|
||||||
drivers_type_func += ' t = fpi_device_' + driver + '_get_type ();'
|
|
||||||
drivers_type_func += ' g_array_append_val (drivers, t);'
|
|
||||||
diff --git a/tests/meson.build b/tests/meson.build
|
|
||||||
index b8d1c8a..4cee075 100644
|
|
||||||
--- a/tests/meson.build
|
|
||||||
+++ b/tests/meson.build
|
|
||||||
@@ -70,7 +70,8 @@ if get_option('introspection')
|
|
||||||
driver_envs = envs
|
|
||||||
driver_envs.set('FP_DRIVERS_WHITELIST', driver_test)
|
|
||||||
|
|
||||||
- if driver_test in drivers and gusb_dep.version().version_compare('>= 0.3.0')
|
|
||||||
+ if (driver_test in supported_drivers and
|
|
||||||
+ gusb_dep.version().version_compare('>= 0.3.0'))
|
|
||||||
test(driver_test,
|
|
||||||
find_program('umockdev-test.py'),
|
|
||||||
args: join_paths(meson.current_source_dir(), driver_test),
|
|
||||||
Vendored
-14
@@ -1,14 +0,0 @@
|
|||||||
meson-Do-not-support-drivers-known-to-fail-in-Big-Endian-.patch
|
|
||||||
udev-rules-Print-warning-if-an-ID-is-supported.patch
|
|
||||||
udev-rules-Remove-supported-synaptics-devices.patch
|
|
||||||
tests-Add-check-that-no-supported-device-is-whitelisted.patch
|
|
||||||
udev-hwdb-Prevent-devices-from-being-listed-twice.patch
|
|
||||||
Generate-a-hwdb-instead-of-udev-rules.patch
|
|
||||||
meson-Always-build-hwdb-file.patch
|
|
||||||
Drop-version-from-libfprint-hwdb.patch
|
|
||||||
data-Use-auto-generated-but-hardcoded-autosuspend-hwdb-fi.patch
|
|
||||||
build-Ensure-we-process-the-data-dir.patch
|
|
||||||
data-Keep-using-versioned-libname-for-hwdb-file.patch
|
|
||||||
tests-Add-trailing-newline-to-busname-devname-sysfs-attri.patch
|
|
||||||
build-Skip-the-hwdb-test-if-not-all-drivers-are-really-en.patch
|
|
||||||
build-Explicitly-mark-libfprint-as-a-shared-library.patch
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 13:38:08 +0100
|
|
||||||
Subject: tests: Add check that no supported device is whitelisted
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/meson.build | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/meson.build b/tests/meson.build
|
|
||||||
index 8fcae69..27bdd9f 100644
|
|
||||||
--- a/tests/meson.build
|
|
||||||
+++ b/tests/meson.build
|
|
||||||
@@ -169,6 +169,11 @@ foreach test_name: unit_tests
|
|
||||||
)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
+# Run udev rule generator with fatal warnings
|
|
||||||
+test('udev-rules',
|
|
||||||
+ udev_rules,
|
|
||||||
+ env: envs)
|
|
||||||
+
|
|
||||||
gdb = find_program('gdb', required: false)
|
|
||||||
if gdb.found()
|
|
||||||
add_test_setup('gdb',
|
|
||||||
-256
@@ -1,256 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Thu, 21 Jan 2021 12:22:08 +0100
|
|
||||||
Subject: tests: Add trailing newline to busname/devname sysfs attributes
|
|
||||||
|
|
||||||
libusb 1.0.24 now expects busnum/devnum to be \n terminated. Update the
|
|
||||||
device descriptions accordingly.
|
|
||||||
|
|
||||||
https://github.com/martinpitt/umockdev/issues/115
|
|
||||||
---
|
|
||||||
tests/aes3500/device | 16 ++++++++--------
|
|
||||||
tests/elan/device | 12 ++++++------
|
|
||||||
tests/goodixmoc/device | 8 ++++----
|
|
||||||
tests/synaptics/device | 4 ++--
|
|
||||||
tests/vfs0050/device | 4 ++--
|
|
||||||
tests/vfs301/device | 12 ++++++------
|
|
||||||
tests/vfs5011/device | 4 ++--
|
|
||||||
7 files changed, 30 insertions(+), 30 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/aes3500/device b/tests/aes3500/device
|
|
||||||
index 4a2a903..c662cc8 100644
|
|
||||||
--- a/tests/aes3500/device
|
|
||||||
+++ b/tests/aes3500/device
|
|
||||||
@@ -35,11 +35,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0000
|
|
||||||
A: bmAttributes=80
|
|
||||||
-A: busnum=3
|
|
||||||
+A: busnum=3\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011001FFFFFF08FF0831570000000100010902200001010080320904000002FFFFFF000705810240000007050202080000
|
|
||||||
A: dev=189:259
|
|
||||||
-A: devnum=4
|
|
||||||
+A: devnum=4\n
|
|
||||||
A: devpath=1.1.3
|
|
||||||
L: driver=../../../../../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=5731
|
|
||||||
@@ -106,11 +106,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=9100
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=3
|
|
||||||
+A: busnum=3\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
|
|
||||||
A: dev=189:258
|
|
||||||
-A: devnum=3
|
|
||||||
+A: devnum=3\n
|
|
||||||
A: devpath=1.1
|
|
||||||
L: driver=../../../../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0006
|
|
||||||
@@ -186,11 +186,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=9100
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=3
|
|
||||||
+A: busnum=3\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011002090001403022060000910102000109021900010100E0000904000001090000000705810301000C
|
|
||||||
A: dev=189:257
|
|
||||||
-A: devnum=2
|
|
||||||
+A: devnum=2\n
|
|
||||||
A: devpath=1
|
|
||||||
L: driver=../../../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0006
|
|
||||||
@@ -270,11 +270,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0415
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=3
|
|
||||||
+A: busnum=3\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002090001406B1D020015040302010109021900010100E0000904000001090000000705810304000C
|
|
||||||
A: dev=189:256
|
|
||||||
-A: devnum=1
|
|
||||||
+A: devnum=1\n
|
|
||||||
A: devpath=0
|
|
||||||
L: driver=../../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0002
|
|
||||||
diff --git a/tests/elan/device b/tests/elan/device
|
|
||||||
index 7374dc2..6e1e421 100644
|
|
||||||
--- a/tests/elan/device
|
|
||||||
+++ b/tests/elan/device
|
|
||||||
@@ -36,11 +36,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0140
|
|
||||||
A: bmAttributes=80
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=1201000200000008F304260C40010102000109023E0001010080320904000005FF0000000921100100012215000705810240000107050102400001070582024000010705830240000107050302400001
|
|
||||||
A: dev=189:93
|
|
||||||
-A: devnum=94
|
|
||||||
+A: devnum=94\n
|
|
||||||
A: devpath=4.4
|
|
||||||
L: driver=../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0c26
|
|
||||||
@@ -107,11 +107,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=5284
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=1201100209000140EF17181084520102000109021900010100E0000904000001090000000705810301000C
|
|
||||||
A: dev=189:82
|
|
||||||
-A: devnum=83
|
|
||||||
+A: devnum=83\n
|
|
||||||
A: devpath=4
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=1018
|
|
||||||
@@ -189,11 +189,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0503
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002090001406B1D020003050302010109021900010100E0000904000001090000000705810304000C
|
|
||||||
A: dev=189:0
|
|
||||||
-A: devnum=1
|
|
||||||
+A: devnum=1\n
|
|
||||||
A: devpath=0
|
|
||||||
L: driver=../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0002
|
|
||||||
diff --git a/tests/goodixmoc/device b/tests/goodixmoc/device
|
|
||||||
index 627c9dc..b008eb2 100644
|
|
||||||
--- a/tests/goodixmoc/device
|
|
||||||
+++ b/tests/goodixmoc/device
|
|
||||||
@@ -37,11 +37,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0100
|
|
||||||
A: bmAttributes=a0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=UIDCBEE4D7B_XXXX_MOC_B0
|
|
||||||
H: descriptors=12010002EF000040C627A26000010102030109022000010103A0320904000002FF0000040705830240000007050102400000
|
|
||||||
A: dev=189:2
|
|
||||||
-A: devnum=3
|
|
||||||
+A: devnum=3\n
|
|
||||||
A: devpath=8
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=60a2
|
|
||||||
@@ -125,11 +125,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0504
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002090001406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
|
||||||
A: dev=189:0
|
|
||||||
-A: devnum=1
|
|
||||||
+A: devnum=1\n
|
|
||||||
A: devpath=0
|
|
||||||
L: driver=../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0002
|
|
||||||
diff --git a/tests/synaptics/device b/tests/synaptics/device
|
|
||||||
index 6da3eea..87c4bed 100644
|
|
||||||
--- a/tests/synaptics/device
|
|
||||||
+++ b/tests/synaptics/device
|
|
||||||
@@ -34,11 +34,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0000
|
|
||||||
A: bmAttributes=a0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002FF10FF08CB06BD0000000000010109022700010100A0320904000003FF000000070501024000000705810240000007058303080004
|
|
||||||
A: dev=189:69
|
|
||||||
-A: devnum=70
|
|
||||||
+A: devnum=70\n
|
|
||||||
A: devpath=1
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=00bd
|
|
||||||
diff --git a/tests/vfs0050/device b/tests/vfs0050/device
|
|
||||||
index 1bea50a..b66be4b 100644
|
|
||||||
--- a/tests/vfs0050/device
|
|
||||||
+++ b/tests/vfs0050/device
|
|
||||||
@@ -38,11 +38,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0060
|
|
||||||
A: bmAttributes=a0
|
|
||||||
-A: busnum=1
|
|
||||||
+A: busnum=1\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011001FF10FF088A13500060000000010109022E00010100A0320904000004FF00000007050102400000070581024000000705820240000007058303080004
|
|
||||||
A: dev=189:3
|
|
||||||
-A: devnum=4
|
|
||||||
+A: devnum=4\n
|
|
||||||
A: devpath=9
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0050
|
|
||||||
diff --git a/tests/vfs301/device b/tests/vfs301/device
|
|
||||||
index 635f795..26d3b57 100644
|
|
||||||
--- a/tests/vfs301/device
|
|
||||||
+++ b/tests/vfs301/device
|
|
||||||
@@ -37,11 +37,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0c90
|
|
||||||
A: bmAttributes=a0
|
|
||||||
-A: busnum=2
|
|
||||||
+A: busnum=2\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011001FF10FF088A130500900C0000000109022700010100A0320904000003FF000000070501024000000705810240000007058202400000
|
|
||||||
A: dev=189:132
|
|
||||||
-A: devnum=5
|
|
||||||
+A: devnum=5\n
|
|
||||||
A: devpath=1.3
|
|
||||||
L: driver=../../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0005
|
|
||||||
@@ -120,11 +120,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0000
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=2
|
|
||||||
+A: busnum=2\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002090001408780200000000000000109021900010100E0000904000001090000000705810302000C
|
|
||||||
A: dev=189:129
|
|
||||||
-A: devnum=2
|
|
||||||
+A: devnum=2\n
|
|
||||||
A: devpath=1
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0020
|
|
||||||
@@ -204,11 +204,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0504
|
|
||||||
A: bmAttributes=e0
|
|
||||||
-A: busnum=2
|
|
||||||
+A: busnum=2\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12010002090000406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
|
||||||
A: dev=189:128
|
|
||||||
-A: devnum=1
|
|
||||||
+A: devnum=1\n
|
|
||||||
A: devpath=0
|
|
||||||
L: driver=../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0002
|
|
||||||
diff --git a/tests/vfs5011/device b/tests/vfs5011/device
|
|
||||||
index 4c75e59..e39a74f 100644
|
|
||||||
--- a/tests/vfs5011/device
|
|
||||||
+++ b/tests/vfs5011/device
|
|
||||||
@@ -35,11 +35,11 @@ A: bNumConfigurations=1
|
|
||||||
A: bNumInterfaces= 1
|
|
||||||
A: bcdDevice=0078
|
|
||||||
A: bmAttributes=a0
|
|
||||||
-A: busnum=2
|
|
||||||
+A: busnum=2\n
|
|
||||||
A: configuration=
|
|
||||||
H: descriptors=12011001FF11FF088A13170078000000010109022E00010100A0320904000004FF00000007050102400000070581024000000705820240000007058303080004
|
|
||||||
A: dev=189:144
|
|
||||||
-A: devnum=17
|
|
||||||
+A: devnum=17\n
|
|
||||||
A: devpath=6
|
|
||||||
L: driver=../../../../../bus/usb/drivers/usb
|
|
||||||
A: idProduct=0017
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Wed, 20 Jan 2021 18:02:31 +0100
|
|
||||||
Subject: udev-hwdb: Prevent devices from being listed twice
|
|
||||||
|
|
||||||
The change to print a warning (for testing purposes) from commit
|
|
||||||
944e0d03837 (udev-rules: Print warning if an ID is supported) was
|
|
||||||
incorrect because it prevented duplicated to be suppressed if a device
|
|
||||||
is listed by two independent drivers.
|
|
||||||
---
|
|
||||||
libfprint/fprint-list-udev-rules.c | 7 ++++---
|
|
||||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
||||||
index e574cac..050a450 100644
|
|
||||||
--- a/libfprint/fprint-list-udev-rules.c
|
|
||||||
+++ b/libfprint/fprint-list-udev-rules.c
|
|
||||||
@@ -136,10 +136,11 @@ print_driver (const FpDeviceClass *cls)
|
|
||||||
|
|
||||||
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
||||||
|
|
||||||
- if (cls == &whitelist && g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
+ if (g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
{
|
|
||||||
- g_warning ("%s implemented by driver %s",
|
|
||||||
- key, (const char *) g_hash_table_lookup (printed, key));
|
|
||||||
+ if (cls == &whitelist)
|
|
||||||
+ g_warning ("%s implemented by driver %s",
|
|
||||||
+ key, (const char *) g_hash_table_lookup (printed, key));
|
|
||||||
g_free (key);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 13:29:17 +0100
|
|
||||||
Subject: udev-rules: Print warning if an ID is supported
|
|
||||||
|
|
||||||
---
|
|
||||||
libfprint/fprint-list-udev-rules.c | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
||||||
index d6c884c..5f80fe1 100644
|
|
||||||
--- a/libfprint/fprint-list-udev-rules.c
|
|
||||||
+++ b/libfprint/fprint-list-udev-rules.c
|
|
||||||
@@ -110,6 +110,7 @@ static const FpIdEntry blacklist_id_table[] = {
|
|
||||||
static const FpDeviceClass whitelist = {
|
|
||||||
.type = FP_DEVICE_TYPE_USB,
|
|
||||||
.id_table = whitelist_id_table,
|
|
||||||
+ .id = "whitelist",
|
|
||||||
.full_name = "Hardcoded whitelist"
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -138,13 +139,15 @@ print_driver (const FpDeviceClass *cls)
|
|
||||||
|
|
||||||
key = g_strdup_printf ("%04x:%04x", entry->vid, entry->pid);
|
|
||||||
|
|
||||||
- if (g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
+ if (cls == &whitelist && g_hash_table_lookup (printed, key) != NULL)
|
|
||||||
{
|
|
||||||
+ g_warning ("%s implemented by driver %s",
|
|
||||||
+ key, (const char *) g_hash_table_lookup (printed, key));
|
|
||||||
g_free (key);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- g_hash_table_insert (printed, key, GINT_TO_POINTER (1));
|
|
||||||
+ g_hash_table_insert (printed, key, (void *) cls->id);
|
|
||||||
|
|
||||||
if (num_printed == 0)
|
|
||||||
g_print ("# %s\n", cls->full_name);
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From: Benjamin Berg <bberg@redhat.com>
|
|
||||||
Date: Tue, 19 Jan 2021 13:37:51 +0100
|
|
||||||
Subject: udev-rules: Remove supported synaptics devices
|
|
||||||
|
|
||||||
---
|
|
||||||
libfprint/fprint-list-udev-rules.c | 3 ---
|
|
||||||
1 file changed, 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c
|
|
||||||
index 5f80fe1..e574cac 100644
|
|
||||||
--- a/libfprint/fprint-list-udev-rules.c
|
|
||||||
+++ b/libfprint/fprint-list-udev-rules.c
|
|
||||||
@@ -45,12 +45,9 @@ static const FpIdEntry whitelist_id_table[] = {
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00b7 },
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00bb },
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00be },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00c2 },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00c9 },
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00cb },
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00d8 },
|
|
||||||
{ .vid = 0x06cb, .pid = 0x00da },
|
|
||||||
- { .vid = 0x06cb, .pid = 0x00e7 },
|
|
||||||
{ .vid = 0x0a5c, .pid = 0x5801 },
|
|
||||||
{ .vid = 0x0a5c, .pid = 0x5805 },
|
|
||||||
{ .vid = 0x0a5c, .pid = 0x5834 },
|
|
||||||
Reference in New Issue
Block a user