Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950469 - sys-apps/pcsc-lite-2.3.0 is unable to provide service for cards
Summary: sys-apps/pcsc-lite-2.3.0 is unable to provide service for cards
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 950473
Blocks:
  Show dependency tree
 
Reported: 2025-03-02 12:05 UTC by Klaus Ethgen
Modified: 2025-03-02 15:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Ethgen 2025-03-02 12:05:11 UTC
In January sys-apps/pcsc-lite was updated from 2.0.1-r1 to 2.3.0 and stopped to provide service for GPG-Cards.

I tried to narrow the bug down but finally only a downgrade to 2.0.1-r1 brought it back working.

The following analysis might be a hint to the problem.

I use the following uses:
 U I
 - - abi_x86_32                      : 32-bit (x86) libraries
 - - doc                             : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - embedded                        : limit RAM and CPU ressources by disabling features
 - - libusb                          : (Restricted to >=sys-apps/pcsc-lite-1.8.0)
                                       Use dev-libs/libusb detection to hotplug new smartcard readers. This flag should only be enabled if you're
                                       running a non-Linux kernel or you don't want to use udev.
 - - policykit                       : Uses sys-auth/polkit to restrict access to smartcard readers or smartcards to given users.
 - - python_single_target_python3_10 : Build for Python 3.10 only
 - - python_single_target_python3_11 : Build for Python 3.11 only
 + + python_single_target_python3_12 : Build for Python 3.12 only
 - - systemd                         : Enable use of systemd-specific libraries and features like socket activation or session tracking
 + + udev                            : Use virtual/libudev rules to handle devices' permissions and hotplug support. Unless you know what you're
                                       doing do not disable this flag on Linux kernels. This is provided as an option for completeness.

With version 2.0.1-r1, this seems to be respected:
~> ldd /usr/sbin/pcscd         
        linux-vdso.so.1 (0x00007ffd46f25000)
        libudev.so.1 => /usr/lib64/libudev.so.1 (0x00007f60cc1c3000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f60cbfd7000)
        libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f60cbfca000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f60cc24c000)

However, if I install version 2.3.0, the binary is linked to the following libraries:
~> ldd /usr/sbin/pcscd
        linux-vdso.so.1 (0x00007fff6779d000)
        libudev.so.1 => /usr/lib64/libudev.so.1 (0x00007fb9ceeeb000)
        libpolkit-gobject-1.so.0 => /usr/lib64/libpolkit-gobject-1.so.0 (0x00007fb9ceecc000)
        libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007fb9cee6b000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fb9ced21000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb9ceb35000)
        libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007fb9ceb28000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb9cef76000)
        libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007fb9ce93e000)
        libelogind.so.0 => /usr/lib64/libelogind.so.0 (0x00007fb9ce87c000)
        libffi.so.8 => /usr/lib64/libffi.so.8 (0x00007fb9ce86f000)
        libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0 (0x00007fb9ce7d1000)
        libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007fb9ce7ca000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00007fb9ce7ae000)
        libmount.so.1 => /usr/lib64/libmount.so.1 (0x00007fb9ce73b000)
        libblkid.so.1 => /usr/lib64/libblkid.so.1 (0x00007fb9ce6de000)

Note, that it linked to libpolkit even that I don't want polkit! It also links to libelogind even hat I don't use logind at all!

Please note also, that it does also not work for root with the broken version.

Reproducible: Always

Steps to Reproduce:
1. Install version 2.3.0
2. Try to use gpg --card-status
Actual Results:  
It does not find a card, neither as user nor as root.

Expected Results:  
It displays the card status of plugged card.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-02 12:10:48 UTC
(In reply to Klaus Ethgen from comment #0)
> 
> With version 2.0.1-r1, this seems to be respected:
> ~> ldd /usr/sbin/pcscd         
>         linux-vdso.so.1 (0x00007ffd46f25000)
>         libudev.so.1 => /usr/lib64/libudev.so.1 (0x00007f60cc1c3000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f60cbfd7000)
>         libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007f60cbfca000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f60cc24c000)
> 
> However, if I install version 2.3.0, the binary is linked to the following
> libraries:
> ~> ldd /usr/sbin/pcscd
> [...]

> Note, that it linked to libpolkit even that I don't want polkit! It also
> links to libelogind even hat I don't use logind at all!
> 

Please use lddtree instead of ldd.
Comment 2 Klaus Ethgen 2025-03-02 12:20:44 UTC
Broken 2.3.0:
~> lddtree =pcscd
pcscd => /usr/sbin/pcscd (interpreter => /lib64/ld-linux-x86-64.so.2)
    libudev.so.1 => /usr/lib64/libudev.so.1
        libcap.so.2 => /usr/lib64/libcap.so.2
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libpolkit-gobject-1.so.0 => /usr/lib64/libpolkit-gobject-1.so.0
        libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0
            libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0
            libz.so.1 => /usr/lib64/libz.so.1
            libmount.so.1 => /usr/lib64/libmount.so.1
                libblkid.so.1 => /usr/lib64/libblkid.so.1
        libelogind.so.0 => /usr/lib64/libelogind.so.0
    libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0
        libffi.so.8 => /usr/lib64/libffi.so.8
    libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
        libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0
    libc.so.6 => /lib64/libc.so.6

Working 2.0.1:
~> lddtree =pcscd
pcscd => /usr/sbin/pcscd (interpreter => /lib64/ld-linux-x86-64.so.2)
    libudev.so.1 => /usr/lib64/libudev.so.1
        libcap.so.2 => /usr/lib64/libcap.so.2
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libc.so.6 => /lib64/libc.so.6
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-02 12:44:26 UTC
Thanks! I will have a look.
Comment 4 Larry the Git Cow gentoo-dev 2025-03-02 12:55:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=335c6325c1f2d7fbd7fa6fc9f3d5e8afe272b798

commit 335c6325c1f2d7fbd7fa6fc9f3d5e8afe272b798
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-03-02 12:54:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-02 12:55:05 +0000

    sys-apps/pcsc-lite: add 2.3.1
    
    Closes: https://bugs.gentoo.org/946163
    Closes: https://bugs.gentoo.org/950469
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/pcsc-lite/Manifest               |   1 +
 sys-apps/pcsc-lite/pcsc-lite-2.3.1.ebuild | 110 ++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-02 12:56:08 UTC
Thanks. Can you try 2.3.1? If it works, I'll stable it immediately.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-02 12:56:25 UTC
(It has build system fixes for respecting the polkit/systemd/logind options.)
Comment 7 Klaus Ethgen 2025-03-02 13:02:18 UTC
I immediately did a eix-sync but I believe it takes some hours until it is on the serveres...

I will test it when it is available. (except if you have an option to test the git version directly.)
Comment 8 Klaus Ethgen 2025-03-02 15:26:41 UTC
Yes, the problem is fixed with that version.

~> equery l pcsc-lite
 * Searching for pcsc-lite ...
[IP-] [  ] sys-apps/pcsc-lite-2.3.1:0

~> lddtree =pcscd             
pcscd => /usr/sbin/pcscd (interpreter => /lib64/ld-linux-x86-64.so.2)
    libudev.so.1 => /usr/lib64/libudev.so.1
        libcap.so.2 => /usr/lib64/libcap.so.2
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
    libc.so.6 => /lib64/libc.so.6


And card-access works too.

Thanks for the very fast fix.