From 1cc0906015a2fa8b4bfa0475cd182bec9c406d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Wed, 13 Jul 2022 16:28:51 +0200 Subject: [PATCH] gnupg: add smartcard udev rules and INSTALL.msg --- srcpkgs/gnupg/files/60-scdaemon.rules | 37 +++++++++++++++++++ .../files/gnupg2-scdaemon-README.voidlinux | 1 + srcpkgs/gnupg/gnupg2-scdaemon.INSTALL.msg | 5 +++ srcpkgs/gnupg/template | 4 +- 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/gnupg/files/60-scdaemon.rules create mode 120000 srcpkgs/gnupg/files/gnupg2-scdaemon-README.voidlinux create mode 100644 srcpkgs/gnupg/gnupg2-scdaemon.INSTALL.msg diff --git a/srcpkgs/gnupg/files/60-scdaemon.rules b/srcpkgs/gnupg/files/60-scdaemon.rules new file mode 100644 index 00000000000..fa3698e7d6a --- /dev/null +++ b/srcpkgs/gnupg/files/60-scdaemon.rules @@ -0,0 +1,37 @@ +SUBSYSTEM!="usb", GOTO="gnupg_rules_end" +ACTION!="add", GOTO="gnupg_rules_end" + +# USB SmartCard Readers +## Cherry GmbH (XX33, ST2000) +ATTRS{idVendor}=="046a", ATTRS{idProduct}=="0005|0010|003e", GROUP="plugdev", TAG+="uaccess" +## SCM Microsystems, Inc (SCR331-DI, SCR335, SCR3320, SCR331, SCR3310 and SPR532) +ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5111|5115|5116|5117|e001|e003", GROUP="plugdev", TAG+="uaccess" +## Omnikey AG (CardMan 3821, CardMan 6121) +ATTRS{idVendor}=="076b", ATTRS{idProduct}=="3821|6622", GROUP="plugdev", TAG+="uaccess" +## Gemalto +ATTRS{idVendor}=="08e6", ATTRS{idProduct}=="3437|3438|3478|34c2|34ec", GROUP="plugdev", TAG+="uaccess" +## Reiner (SCT cyberJack) +ATTRS{idVendor}=="0c4b", ATTRS{idProduct}=="0500", GROUP="plugdev", TAG+="uaccess" +## Kobil (KAAN) +ATTRS{idVendor}=="0d46", ATTRS{idProduct}=="2012", GROUP="plugdev", TAG+="uaccess" +## VASCO (DIGIPASS 920) +ATTRS{idVendor}=="1a44", ATTRS{idProduct}=="0920", GROUP="plugdev", TAG+="uaccess" +## Crypto Stick +ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4107", GROUP="plugdev", TAG+="uaccess" +## Nitrokey +ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4108|4109|4211", GROUP="plugdev", TAG+="uaccess" +## Librem Key +ATTRS{idVendor}=="316d", ATTRS{idProduct}=="4c4b", GROUP="plugdev", TAG+="uaccess" +## Gnuk Token +ATTRS{product}=="Gnuk Token", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="234b", ATTRS{idProduct}=="0000|2440", GROUP="plugdev", TAG+="uaccess" +## Alcor Micro Corp cardreader (in ThinkPad X250) +ATTRS{idVendor}=="058f", ATTRS{idProduct}=="9540", GROUP="plugdev", TAG+="uaccess" +## Fujitsu Siemens +ATTRS{idVendor}=="0bf8", ATTRS{idProduct}=="1006", GROUP="plugdev", TAG+="uaccess" +## Yubico (YubiKey Neo/4/5) +ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0111|0112|0115|0116|0404|0405|0406|0407", GROUP="plugdev", TAG+="uaccess" +## Trustica Cryptoucan +ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="81e6", GROUP="plugdev", TAG+="uaccess" + +LABEL="gnupg_rules_end" diff --git a/srcpkgs/gnupg/files/gnupg2-scdaemon-README.voidlinux b/srcpkgs/gnupg/files/gnupg2-scdaemon-README.voidlinux new file mode 120000 index 00000000000..7375d334069 --- /dev/null +++ b/srcpkgs/gnupg/files/gnupg2-scdaemon-README.voidlinux @@ -0,0 +1 @@ +../gnupg2-scdaemon.INSTALL.msg \ No newline at end of file diff --git a/srcpkgs/gnupg/gnupg2-scdaemon.INSTALL.msg b/srcpkgs/gnupg/gnupg2-scdaemon.INSTALL.msg new file mode 100644 index 00000000000..f23483eeafd --- /dev/null +++ b/srcpkgs/gnupg/gnupg2-scdaemon.INSTALL.msg @@ -0,0 +1,5 @@ +GnuPG 2.3 changes the behaviour of scdaemon. While GnuPG 2.2 had a fallback to +PC/SC when the internal CCID driver didn't work, the fallback now has to be +explicitly configured by disabling the internal CCID driver. If you've not +explicitly enabled pcscd, you shouldn't need to do anything. For more details, +see https://docs.voidlinux.org/config/gnupg.html diff --git a/srcpkgs/gnupg/template b/srcpkgs/gnupg/template index f16d68e0c54..79a37000021 100644 --- a/srcpkgs/gnupg/template +++ b/srcpkgs/gnupg/template @@ -1,7 +1,7 @@ # Template file for 'gnupg' pkgname=gnupg version=2.3.7 -revision=1 +revision=2 build_style=gnu-configure configure_args="$(vopt_enable ldap) --with-libgcrypt-prefix=${XBPS_CROSS_BASE}/usr @@ -49,5 +49,7 @@ gnupg2-scdaemon_package() { pkg_install() { vmove usr/libexec/scdaemon vmove usr/share/man/man1/scdaemon.1 + vinstall ${FILESDIR}/60-scdaemon.rules 644 /usr/lib/udev/rules.d + vdoc ${FILESDIR}/gnupg2-scdaemon-README.voidlinux README.voidlinux } }