GNU bug report logs - #31337
Unable to use gnuk usb smartcard token on GuixSD

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Vagrant Cascadian <vagrant@HIDDEN>; dated Tue, 1 May 2018 22:30:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 31337 <at> debbugs.gnu.org:


Received: (at 31337) by debbugs.gnu.org; 2 Jun 2018 21:33:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 02 17:33:49 2018
Received: from localhost ([127.0.0.1]:59607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fPE9k-0006BK-SL
	for submit <at> debbugs.gnu.org; Sat, 02 Jun 2018 17:33:49 -0400
Received: from cascadia.aikidev.net ([173.255.214.101]:33683)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1fPE9i-0006B5-9a
 for 31337 <at> debbugs.gnu.org; Sat, 02 Jun 2018 17:33:47 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id 4B3B41AA2E;
 Sat,  2 Jun 2018 14:33:40 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: bug#31337: Unable to use gnuk usb smartcard token on GuixSD
In-Reply-To: <87efimpuam.fsf@HIDDEN>
References: <87r2mvui1b.fsf@HIDDEN> <87efimpuam.fsf@HIDDEN>
Date: Sat, 02 Jun 2018 14:33:28 -0700
Message-ID: <877engrhzr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31337
Cc: 31337 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

On 2018-05-07, Chris Marusich wrote:
> Vagrant Cascadian <vagrant@HIDDEN> writes:
>
>> Another option might be to use pcsc-lite and ccid, but I had even less
>> luck getting that to work.
>
> When you tried that, did you enable the USB drivers by creating a
> symlink as described here?
>
> https://lists.gnu.org/archive/html/guix-devel/2016-10/msg01433.html

With the symlink:

  lrwxrwxrwx 1 root root 41 Jun  2 06:31 /var/lib/pcsc/drivers -> /home/vagrant/.guix-profile/pcsc/drivers/

Then I tried to run:

  pcscd --debug --foreground
  00000000 pcscdaemon.c:347:main() pcscd set to foreground with debug send to stdout
  00000077 pcscdaemon.c:623:main() cannot create /var/run/pcscd: Permission denied

Running as root appears to have worked:

  sudo -E --debug --foreground pcscd

Then as a user, "gpg --card-status" works. Haven't tried any other
functionality yet, but that's a good start.


So this seems like a somewhat complicated workaround, and making a
proper pcscd service would reduce the complication significantly.  It
would obviously be slightly preferable to me for gnupg to support
smartcards out of the box. :)


live well,
  vagrant

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEcDardHbDotegGFCHt4uC1IFLkbYFAlsTDSgACgkQt4uC1IFL
kbb1gA//YVdiKmjIMvA8AyUvkNW+E7ZCIHAdctOZtJ5dVCWRLMxYrDfBbDCEnb0h
VUKluYcX7+FIdPyddhw1G99zPclPkrXmeGKM9MH3gHydskULmTAMVsfoTbE+4MYk
nCEhkRoXi+IPg4YPuULx0lk6rqxKrO9L6a2vmWmIcbE5So4x+aJwssFQuTawZvNS
BFlWDU4iipPkZDKlkOmmu6bK18rhz0g0N3g91ipeUEut/MbzRz0mBtcytdsGPv40
w1XqgnyUiy/Ux+20zG5jQNPVrVN8I3YAdsSU1S83fDS+VxjQscT/6q00EDEuT6N5
hpyXI7u/hR0q/bCAuiWGXVvGyPsjkROHq6pcBCvd+p+SQl4qTH7GaSvxO/MnvXPp
ffRlcA6hFUA/+euF8mPkJ6AoceUVqkC+qJcqXJU8I+W/Jm7ZJmjHaM59tiKLV8x2
hGlo4pE0k9qVwnwOOpnG1pi9IX/swecbpq+0tt6vLFv0kGbBODBmCjNbXZjIuo8b
0Snp3M41WUHOK658xWwIfsvLOvFg/+rcBpQe56/9+peHmCUQZyqoGRvBxWz3ZF22
YtdyyFOL2vk6kI6Q5hFG6Dee0I6pRXdzdGhjiSHn02lxs3jw6Qaf4UOO4PqWQu9c
o04eObHjvgzsWYP6QoZ6ZMWLcNCeF13cIt64H/Ce+VUxD2JGrj0=
=8PRS
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#31337; Package guix. Full text available.

Message received at 31337 <at> debbugs.gnu.org:


Received: (at 31337) by debbugs.gnu.org; 8 May 2018 05:53:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 08 01:53:48 2018
Received: from localhost ([127.0.0.1]:53432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fFvZM-0000wb-1A
	for submit <at> debbugs.gnu.org; Tue, 08 May 2018 01:53:48 -0400
Received: from mail-pl0-f45.google.com ([209.85.160.45]:38467)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1fFvZK-0000wO-D1
 for 31337 <at> debbugs.gnu.org; Tue, 08 May 2018 01:53:46 -0400
Received: by mail-pl0-f45.google.com with SMTP id c11-v6so1559645plr.5
 for <31337 <at> debbugs.gnu.org>; Mon, 07 May 2018 22:53:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=LTrWuNBl8UoHNAYmXCN/zNO4hNHdEwS+SheGAJcw0vc=;
 b=euWigVP1kHrwnQO59hoyDD5auMndSgek9fJua8+AO52K7tj8LEwGW8VV1bjb9GIs5G
 7Gsn8cUE1V7f8r0TaTOtlv/f1hxeHoG9ahYX6tCFKVtoT2YMQ5gNxzVhdfktRM8dIIdG
 7eiUu3VS2n7M6JgRgqFVvode51ypeLK4lnNWltd3miMnHcHmEZfPBI2ewufgZ10300uF
 nawx9lF9JQ3WwK77ahxmh5gd2xa5I0VivWUAT1wLoIiuvdM7wOf6SYJ7HaUwJi82BCpD
 Wq8s9bbXNzdWRA7AQ8AnwGR1l/Kw/2wVCLbS8bWR0PiTv5MfwezK+CrTdVtlcQ2cLsh8
 7Vcg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=LTrWuNBl8UoHNAYmXCN/zNO4hNHdEwS+SheGAJcw0vc=;
 b=e0szAyJgxvN4BeUFcy5E+HctaerIoTpWBPYWX3V9JynOeZm8vT272iBmi+eVjpwO03
 eFCizGnkigg97SBcToretLo4tFv8je+UWXKaSZCLI5oaklKokF/DaZ+iY/BP9Iy9yHeS
 u+m4iboLAjjxdNYVdYnNSMuZAFO8cXhT0C9ndSAqhVc2+yh/8PzRB9SWyuOHJ9PlLpOY
 LKo+f+x2WS53qwdr4oW+s3gDyV4eS+tupRxIXeMlquTWKbLkPaa4z7sHubwMKzAZa8th
 W4U9V3W5x3oGhiZ63fmhui8R6LuR19krM5mtZgrXC+qcVdf0x5Srx4fmyGw21Y9zsg4U
 RFyQ==
X-Gm-Message-State: ALQs6tCboM/8eYFGhnbv02rJquFXeeXH8QiNEMICCoZjaPVXDyL8VmVT
 g6m7B5V8Bk25Q2OldnC5Edg2yg==
X-Google-Smtp-Source: AB8JxZrumrk8pc8rnvSR1X7M4n91jpQCXCahzAm6/DyHM6DHE2mwGgvxiYshLkok5TpBy52V1uMTFg==
X-Received: by 2002:a17:902:7288:: with SMTP id
 d8-v6mr22464471pll.218.1525758819999; 
 Mon, 07 May 2018 22:53:39 -0700 (PDT)
Received: from garuda.local ([2601:602:9d02:4725:6495:ba21:1ebe:620a])
 by smtp.gmail.com with ESMTPSA id z62sm55209834pff.57.2018.05.07.22.53.38
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 07 May 2018 22:53:38 -0700 (PDT)
From: Chris Marusich <cmmarusich@HIDDEN>
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: Re: bug#31337: Unable to use gnuk usb smartcard token on GuixSD
References: <87r2mvui1b.fsf@HIDDEN>
Date: Mon, 07 May 2018 22:53:37 -0700
In-Reply-To: <87r2mvui1b.fsf@HIDDEN> (Vagrant Cascadian's message of
 "Tue, 01 May 2018 15:29:04 -0700")
Message-ID: <87efimpuam.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31337
Cc: 31337 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Vagrant Cascadian <vagrant@HIDDEN> writes:

> Another option might be to use pcsc-lite and ccid, but I had even less
> luck getting that to work.

When you tried that, did you enable the USB drivers by creating a
symlink as described here?

https://lists.gnu.org/archive/html/guix-devel/2016-10/msg01433.html

=2D-=20
Chris

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlrxO2EACgkQ3UCaFdgi
Rp1BeRAAy+sw9DWCo1XUomp85/X22WRyTFUmpK6GtoYhJrP3qMvDb49/9tX9XeFY
cIk/HKb3oMu4jam53L7nem0CqWFxkAlHasyciaHGhvCpFfknSzzyiOZAtpWG6h/d
4jRCtSpOORKQ7RPeGCJhOhzPzt7i5+huvNqxsSSOsa52AAmHR7z56hhLCVxg5YUm
gXNjNTJRfybimgSXi4k0bVZy7p+mFQPkzRtC0g9tDam8IVEnTi1tx2hcls9x5v0c
2SQkqsXo8RDupMBezo7HOuXmK1d4lo/bJMhXSmzoGTEgs/8KRdFERj00zKQrj27W
blcN6QmlytGGEK+FCxwdHT4o/i3VU0ko5tLkx7WG9wZblvKiJzB3I8m/XIPklDvX
raO+p9WLOD4iqy/EoAr1Rnd2P3soNoL4JKKnG9icWh3ZuUcOlUBw4Z/REbjKQhaR
1hwLFK+1YEX9aleN7A+9LCsQfcqMMJVazhRtrTPmYq00f55f5DL0J0uIUhgNqUVR
OG7CHVxBxodJhii9ZSTXAK22QxaWHJXNxHsQVb/4lTV55QWnRce3WLjC5uYmRZN+
59zmkkFqxWxXOCdetFSOVNLz9/a+3acfqfDJpvLHF9dPheRVi2SxAY6AS2Gq4B55
luGkyjVNky5H4SXsGMIU677UIcS6QPebtf3JCNOfX9QzTzYdv6E=
=z8Xb
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#31337; Package guix. Full text available.

Message received at 31337 <at> debbugs.gnu.org:


Received: (at 31337) by debbugs.gnu.org; 7 May 2018 10:05:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 07 06:05:03 2018
Received: from localhost ([127.0.0.1]:52001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fFd0w-0000mn-U3
	for submit <at> debbugs.gnu.org; Mon, 07 May 2018 06:05:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56090)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fFd0v-0000mG-PB
 for 31337 <at> debbugs.gnu.org; Mon, 07 May 2018 06:05:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fFd0l-0001hj-HJ
 for 31337 <at> debbugs.gnu.org; Mon, 07 May 2018 06:04:56 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47679)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fFd0l-0001he-EU; Mon, 07 May 2018 06:04:51 -0400
Received: from [193.50.110.223] (port=44884 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fFd0k-0003qk-Vm; Mon, 07 May 2018 06:04:51 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: Re: bug#31337: Unable to use gnuk usb smartcard token on GuixSD
References: <87r2mvui1b.fsf@HIDDEN>
Date: Mon, 07 May 2018 12:04:48 +0200
In-Reply-To: <87r2mvui1b.fsf@HIDDEN> (Vagrant Cascadian's message of
 "Tue, 01 May 2018 15:29:04 -0700")
Message-ID: <87zi1b93y7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31337
Cc: 31337 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hi Vagrant,

Vagrant Cascadian <vagrant@HIDDEN> skribis:

> 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.

Did you try attaching strace or gdb to the faulty test to see what=E2=80=99s
going on?

It may be that this test depends on the availability of special hardware
or something like that, in which case we should arrange to skip just
this test.

Thanks for looking into it!

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#31337; Package guix. Full text available.

Message received at 31337 <at> debbugs.gnu.org:


Received: (at 31337) by debbugs.gnu.org; 2 May 2018 07:01:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 02 03:01:30 2018
Received: from localhost ([127.0.0.1]:46344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fDllZ-0006Pd-67
	for submit <at> debbugs.gnu.org; Wed, 02 May 2018 03:01:30 -0400
Received: from static.195.114.201.195.clients.your-server.de
 ([195.201.114.195]:50052 helo=conspiracy.of.n0.is)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gillmann@HIDDEN>) id 1fDkkq-0004rk-Ev
 for 31337 <at> debbugs.gnu.org; Wed, 02 May 2018 01:56:41 -0400
Received: by conspiracy.of.n0.is (OpenSMTPD) with ESMTPSA id 4e1bcf76
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Wed, 2 May 2018 05:56:38 +0000 (UTC)
Date: Wed, 2 May 2018 05:57:07 +0000
From: Nils Gillmann <gillmann@HIDDEN>
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: Re: bug#31337: Unable to use gnuk usb smartcard token on GuixSD
Message-ID: <20180502055707.5c7cpbrnykso6h2h@abyayala>
References: <87r2mvui1b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <87r2mvui1b.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31337
X-Mailman-Approved-At: Wed, 02 May 2018 03:01:27 -0400
Cc: 31337 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Vagrant Cascadian transcribed 3.3K bytes:
> 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
>           >

There should be a test-suite.log in some location in the build chroot,
have you checked that? You might need to build with -K.

> 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 _






Information forwarded to bug-guix@HIDDEN:
bug#31337; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 May 2018 22:30:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 01 18:30:01 2018
Received: from localhost ([127.0.0.1]:46170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fDdma-0002Zb-P7
	for submit <at> debbugs.gnu.org; Tue, 01 May 2018 18:30:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41583)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1fDdmZ-0002ZQ-Hs
 for submit <at> debbugs.gnu.org; Tue, 01 May 2018 18:29:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1fDdmT-0001qG-Hf
 for submit <at> debbugs.gnu.org; Tue, 01 May 2018 18:29:54 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34280)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <vagrant@HIDDEN>) id 1fDdmT-0001qC-E7
 for submit <at> debbugs.gnu.org; Tue, 01 May 2018 18:29:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60772)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1fDdmS-0001wJ-9m
 for bug-guix@HIDDEN; Tue, 01 May 2018 18:29:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vagrant@HIDDEN>) id 1fDdmP-0001o5-5x
 for bug-guix@HIDDEN; 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 <vagrant@HIDDEN>) id 1fDdmO-0001nn-VJ
 for bug-guix@HIDDEN; Tue, 01 May 2018 18:29:49 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id 7A18D1B6D9
 for <bug-guix@HIDDEN>; Tue,  1 May 2018 15:29:15 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
To: bug-guix@HIDDEN
Subject: Unable to use gnuk usb smartcard token on GuixSD
Date: Tue, 01 May 2018 15:29:04 -0700
Message-ID: <87r2mvui1b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

--=-=-=
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-----
--=-=-=--




Acknowledgement sent to Vagrant Cascadian <vagrant@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#31337; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.