guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] gnu: Add libpcsclite


From: Marius Bakke
Subject: Re: [PATCH 0/2] gnu: Add libpcsclite
Date: Sat, 22 Oct 2016 22:16:34 +0100

Mike Gerwitz <address@hidden> writes:

> This adds libpcsclite for smartcard support.
>
> This is my first Guix package, and I surely screwed something up. :)
> I'd appreciate any help or criticism you can give.  This was not a
> trivial change.

Hi Mike,

Thanks a lot for working on this! The patches look mostly good, see
comments below.

> * gnu/packages/gnupg.scm (libpcsclite): New variable.

I think this should be named "pcsc-lite" to match the upstream name.

> +    (propagated-inputs
> +     `(("libudev" ,eudev)))

Generally, libraries do not need to be propagated, as they will be added
to rpath by the Guix ld wrapper when they are linked. More on this below.

> +    (home-page "https://pcsclite.alioth.debian.org/pcsclite.html";)
> +    (synopsis "Middleware to access a smart card using PC/SC")
> +    (description
> +     "The purpose of PC/SC Lite is to provide a Windows(R) SCard interface in
> +a very small form factor for communicating to smartcards and readers.  The
> +PC/SC Lite library is used to connect to the PC/SC daemon from a client
> +application and provide access to the desired reader.")

I agree that the Windows reference here is unnecessary. Perhaps the
first sentence could be changed to something generic like "pcsc-lite
provides an interface to communicate with smartcards and readers using
the SCard API".

> * gnu/packages/gnupg.scm (gnupg): Add libpcsclite as propagated-input
[...]

> +    (propagated-inputs
> +     `(("libpcsclite" ,libpcsclite)))
>     (arguments
> -    `(#:configure-flags '("--enable-gpg2-is-gpg")
> +    `(#:configure-flags
> +      (list "--enable-gpg2-is-gpg"
> +            (string-append "LDFLAGS=-Wl,-rpath="
> +                           (assoc-ref %build-inputs "libpcsclite")
> +                           "/lib"))

The intention here is to make gnupg locate the libpcsclite library at
runtime, since it has no build-time checks for it, correct? I think this
approach is fine, if there is no way to make it search the Guix profile
paths for the library.

However, the LDFLAGS need to be in #:make-flags for this to work, and
then pcsc-lite does not need to be propagated, since Guix will scan the
output for store references (including rpath entries) and add them as
runtime dependencies.

Can you see if these changes work for you and send an updated patch?

Meanwhile I'll see if I can find a way to test this with a Yubikey.
Currently I get:
scdaemon[4600]: pcsc_list_readers failed: unknown PC/SC error code (0x8010002e)
..when using the "gpg-agent --debug-all" command mentioned earlier.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]