Files
libfprint/debian
Marco Trevisan (Treviño) 3ccd267ad2 debian/patches: Use hwdb to store device autosuspend rules and drop debian specifics
Upstream will use an hwdb to store the device autosuspend (that will be
included in systemd also, so libfprint packagin may stop shipping it at
later point), so use it earlier.

Drop the debian specific rules to set the devices part of the `plugdev`
group as such devices should not be ever readable by an user, but the
access should be managed through a libfprint-based service (frpintd at
the date).
2021-01-21 17:24:34 +01:00
..
2021-01-21 17:10:57 +01:00
2019-08-23 17:24:14 +02:00
2019-08-23 17:24:14 +02:00
2020-12-02 20:58:21 +01:00

The libfprint0 postinst script calls udevadmin trigger for all the supported
USB readers. The list of readers used in that file is generated by calling the
following awk script:

  /plugdev/ {
          printf ("\tudevadm trigger --action=add " )
          for (i=1;i<=NF; i++){
                  if (match($i,/idVendor/)>0) {
                          match($i, /"[^"]*"/); printf ("--attr-match=idVendor=%s ",substr($i,RSTART+1,RLENGTH-2))
                  }
                  if (match($i,/idProduct/)>0) {
                          match($i, /"[^"]*"/); printf ("--attr-match=idProduct=%s",substr($i,RSTART+1,RLENGTH-2))
                  }
          };
          printf("\n")
  }

When preparing a new upstream release, this script should be called against the
udev .rules file generated during the build of the package