[RPM Based Distro] How to install latest `pcsclite` and `ccid` package

Hello.

For everyone got problems using the nk3 with RPM based linux distros I post the way I got both important libraries installed.

First download the sources for both from
https://pcsclite.apdu.fr/
https://ccid.apdu.fr/

To install the pcsclite package
you can use the well known
./configure make make install

assuming you have the developer meta package installed.

For my system (Mageia Linux)
the installation of the ccid package was much harder.

First of all you have to tell configure the path to the
libpcsclite.pc file.
Second you need the libusb package installed (of course) and the devoleper files for libusb.

Then you need to tell configure also this path.
So this command made the configuration running.
./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-libusb=/usr/lib64

Thereafter I can do make and make install.

After that you have to start the pcscd deamon.

That should do the trick.
Unfortunately my system still did not recognize the key as
a GPG Smart Card.
:frowning:

Any suggestions welcome!

What do you use? Under Fedora 37 for example, the device will work without any compilation.

1 Like

Hello @tuxmaster5000
I use Mageia Linux.

Well If if is possible to use the nk3 on Fedora than it
should be with Mageia too.

Can you please print the info from the following cmds
dnf info ccid
dnf info pcsc-lite
systemctl status pcscd
gpg --version

On my system I have default
pcsc-lite 1.9.0
ccid 1.4.33 → which need to be min 1.5
gpg 2.2.36

Thanks !
:slight_smile:

You can check what is the current latest package for various versions of Fedora here:

https://src.fedoraproject.org/rpms/pcsc-lite-ccid

https://src.fedoraproject.org/rpms/pcsc-lite

https://src.fedoraproject.org/rpms/gnupg2

it is also relatively easy to clone those git projects and rebuild the RPM on your own.

Hello @saper :slight_smile:
Thank you for the answer

Hm I want to understand what’s going wrong here.

Things I did not understand:

  • What does the gpg card agent need to accept the nk3 as a smartcard
  • Do I need to start the pcsc daemon
  • I installed the ccid package 1.5 and the latest pcsc-lite package (compiling and building them). Can it be that gpg did not consider those packages since they are not installed by rpm/dnf?

If all those will not get me any further I maybe switch my Linux distro.
But this should be not the purpose of this. :frowning:
Thanks TL

It depends.

You can use gnupg + scdaemon + libusb

This is the default on most systems - there should be no need to run pcscd and no PC/SC lite is required.

You can also use gnupg + scdaemon + pcscd + ccid

For that, you can add disable-ccid to ${HOME}/.gnupg/scdaemon.conf and this way all smartcard communication is going via PC/SC Lite and the pcscd daemon. Looks like gnupg2 does not need to be compiled with pcsclite support directly to support this, it is a runtime option.

Now, Fedora prefers to disable direct ccid support in their RPM and their require PC/SC lite library to build the package.

Mageia seems to use the default - allow scdaemon to access USB directly via libusb. This way ccid is not needed for gnupg2 and they can use older 1.4.33.

(Personally, I prefer the pcscd way because I use lots of other software to access smartcards in parallel, but this is a personal choice).

As for Mageia, I could not easily find information who maintains their gnupg2 and ccid packages. Edit: ccid seems to be maintained by sander85 and gnupg2 does not seem to have a current maintainer. Maybe you can volunteer to submit a patch to update their ccid version.

1 Like

Hello @saper
Thanks for your answer.
Hmm On my system there is no scdaemon and dnf did not know this.
Mageia will soon become version 9 and I will decide to stay with it or
give Fedora again a try. I used it for a while but have trouble with my
Nvidia grafic card and native drivers. That was the reason to switch to Mageia.

I still did not really get a clue what I’ve todo.
Thanks anyway! :slight_smile:

You could grab srpms from Alma or Rocky Linux and compile them on your distro.

1 Like