From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagrant Cascadian Subject: bug#31337: Unable to use gnuk usb smartcard token on GuixSD Date: Tue, 01 May 2018 15:29:04 -0700 Message-ID: <87r2mvui1b.fsf@aikidev.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDdmf-0001wo-Gr for bug-guix@gnu.org; Tue, 01 May 2018 18:30:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDdmc-0001sk-CV for bug-guix@gnu.org; Tue, 01 May 2018 18:30:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38273) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDdmc-0001se-9u for bug-guix@gnu.org; Tue, 01 May 2018 18:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fDdmc-0002aE-2r for bug-guix@gnu.org; Tue, 01 May 2018 18:30:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDdmS-0001wJ-9m for bug-guix@gnu.org; Tue, 01 May 2018 18:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDdmP-0001o5-5x for bug-guix@gnu.org; Tue, 01 May 2018 18:29:52 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:40447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDdmO-0001nn-VJ for bug-guix@gnu.org; Tue, 01 May 2018 18:29:49 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 7A18D1B6D9 for ; Tue, 1 May 2018 15:29:15 -0700 (PDT) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 31337@debbugs.gnu.org --=-=-= Content-Type: text/plain I've been unable to use my gnuk usb smartcard token with gnupg on GuixSD, and it appears this is because scdaemon is built without libusb support: $ gpg --card-status gpg: selecting openpgp failed: No such device gpg: OpenPGP card not available: No such device Attached is a patch that gets scdaemon working for me and a gnuk... Unfortunately, enabling libusb causes one of the tets to hang indefinitely: PASS: tests/openpgp/decrypt-session-key.scm Checking unwrapping the encryption. > encsig-2-keys-3 encsig-2-keys-4 < PASS: tests/openpgp/decrypt-unwrap-verify.scm Checking signing with the default hash algorithm > So far, I've only been able to get it to work by disabling the tests... so it's obviously not a good idea to enable without further troubleshooting. Another option might be to use pcsc-lite and ccid, but I had even less luck getting that to work. live well, vagrant diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index f397482ab..0e9e72784 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -39,6 +39,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages crypto) #:use-module (gnu packages emacs) + #:use-module (gnu packages libusb) #:use-module (gnu packages openldap) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) @@ -232,6 +233,7 @@ compatible to GNU Pth.") ("libgcrypt" ,libgcrypt) ("libgpg-error" ,libgpg-error) ("libksba" ,libksba) + ("libusb" ,libusb) ("npth" ,npth) ("openldap" ,openldap) ("pcsc-lite" ,pcsc-lite) @@ -246,12 +248,17 @@ compatible to GNU Pth.") "--enable-all-tests") #:phases (modify-phases %standard-phases + ;; (delete 'check) (add-before 'configure 'patch-paths (lambda* (#:key inputs #:allow-other-keys) (substitute* "scd/scdaemon.c" (("\"(libpcsclite\\.so[^\"]*)\"" _ name) (string-append "\"" (assoc-ref inputs "pcsc-lite") "/lib/" name "\""))) + (substitute* "configure" + (("/usr/include/libusb-1.0") + (string-append (assoc-ref inputs "libusb") + "/include/libusb-1.0"))) #t)) (add-after 'build 'patch-scheme-tests (lambda _ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcDardHbDotegGFCHt4uC1IFLkbYFAlro6jAACgkQt4uC1IFL kbYVgQ/+JinOMHnfeUUUIy3nyjMsikXQ6FpcM9oM4aOL4OsemP6RENrZA4Pg7pUF bWCfxI6F6rkYasaUjRY7uqfnrhhRi+UOCUSVWnGZ5uO6ohw4MlofQdon1pbDAf9T Sqt+z3yaoHPHdAjTaYL1LVQYx0vK1+eB1Dd3fWBDSLioedZMFZqlPO0WH4PwcG3W Bm2m1XCHFM+xPwYYdb7JutZIctkYy2EDwFohN5NmTsTJtyqiUBGSz/tdY2mOiE3e cB0nPCo8rAHW7/VP7UtMhdA40Q3MtbqUDXbEhneE6aFNn1k/3eyYDGD+rxwb9htc Azab1+MGPHNiV7sABlWL4a7JEyVrlV7YRGfpzwAzY02YelUSxBqYv/lDPCGS84hk nQHq28gU1n+PU1uwxTJyuF3DxXkpHyP6bU4K/dOeWArnbc7J1RyeSU+9F6HzYp9X VWp6yGR8oATCnRjtUUnXP9sPcI6VnJ4Z60zO+kRcqMCbsqWKIKD5vx2eV4XD2JyW SjYoILqEIumqcAMrPa3CkkQUR0s4FYx4Y5p+DoPNqHwasa+YEnKW6zBH69u5hypY RpO3eJ2tFNCXJIvqTim9+2kVpqaXsLppWshDXSGZnnBLcKlVNGJ48TVrhYySFWNe z0i2bFqKe/Ohh5VIccphN64DjrFYcl27Cct6Cl0Smjm7+8LmekY= =flRI -----END PGP SIGNATURE----- --=-=-=--