Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946163 - sys-apps/pcsc-lite-2.3.0: doesn't see devices.
Summary: sys-apps/pcsc-lite-2.3.0: doesn't see devices.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 950473
Blocks:
  Show dependency tree
 
Reported: 2024-12-09 19:14 UTC by Joe Kappus
Modified: 2025-03-02 15:33 UTC (History)
6 users (show)

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


Attachments
pcsc-lite build log (build.log,31.79 KB, text/plain)
2024-12-09 19:18 UTC, Joe Kappus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kappus 2024-12-09 19:14:17 UTC
Build pcsc-lite with udev or libusb backend and it will not work with usb smartcard devices (tested with yubikey 4 and 5 devices). 


Reproducible: Always

Steps to Reproduce:
1. Upgrade to 2.3.0. 
2. Try to use smartcards
3. Smartcards don't work. 
Actual Results:  
Gnupg's built-in smartcard support will work still with pcsc-lite nonfunctional (this can be built with +usb on app-crypt/gnupg) but other packages that don't ship their own pcsc daemon like ykman will fail.

Expected Results:  
Expect devices to show up. 

Portage 3.0.66.1-24+gb39f9f819 (python 3.12.7-final-0, default/linux/amd64/23.0/split-usr/no-multilib, gcc-13, glibc-2.40-r7, 6.12.3 x86_64)
=================================================================
System uname: Linux-6.12.3-x86_64-Intel-R-_Core-TM-_i7-6820HQ_CPU_@_2.70GHz-with-glibc2.40
KiB Mem:    65215836 total,  11565700 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 3243b132ec8e59eb1e0aaa83d3c345a8fa86792c

Timestamp of repository brother-overlay: Tue, 08 Oct 2024 15:51:03 +0000
Head commit of repository brother-overlay: 928bbe8f324720cbb3dd74c3db524c0e674f1349

Timestamp of repository guru: Sun, 08 Dec 2024 23:48:19 +0000
Head commit of repository guru: d43afb83a17a7a13c8d10ec52b8aee40273acdfc

Timestamp of repository pentoo: Sun, 08 Dec 2024 23:48:15 +0000
Head commit of repository pentoo: b3ab0bc0dc8a6eb552c847c5cf6133cb158bde74

Timestamp of repository pf4public: Sun, 08 Dec 2024 14:48:15 +0000
Head commit of repository pf4public: a819de6e639e20542cc56bd89fbd5e6104baeab8

Timestamp of repository torbrowser: Sun, 08 Dec 2024 23:48:17 +0000
Head commit of repository torbrowser: 53eab8fe17744f5ce72e9280f9b4333d4e42dc92

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
ccache version 4.10.2 [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.31.2::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.6.0-r1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0-r1::gentoo
dev-lang/python:           3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust:             1.83.0::gentoo
dev-util/ccache:           4.10.2-r1::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.40::gentoo
sys-devel/binutils:        2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8-r6::gentoo, 19.1.5::gentoo
sys-devel/gcc:             13.3.1_p20241115::gentoo, 14.2.1_p20241116::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-devel/lld:             19.1.5::gentoo
sys-devel/llvm:            18.1.8-r6::gentoo, 19.1.5::gentoo
sys-kernel/linux-headers:  6.12::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/joecool1029/gentoo.git
    priority: -1000
    volatile: True

brother-overlay
    location: /var/db/repos/brother-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

joecool-overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 0
    volatile: True

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

pf4public
    location: /var/db/repos/pf4public
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pf4public.git
    masters: gentoo
    volatile: False

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/torbrowser.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fgraphite-identity -floop-nest-optimize -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fgraphite-identity -floop-nest-optimize -flto"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en_US en"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X acl alsa amd64 bluetooth bzip2 cairo cet corefonts crypt cuda cups dbus dri egl elogind flac fontconfig gdbm gif gles2 gpm iconv icu ipv6 jpeg jpegxl kde libtirpc lto mp3 ncurses nls ogg opencl opengl openmp pam pcre pgo png ppds qml qt6 readline screencast seccomp split-usr ssl svg test-rust threads tiff truetype unicode usb vaapi vulkan wayland webp wifi xattr zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="nmea mtk3301" GRUB_PLATFORMS="pc" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="19" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="iris intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Joe Kappus 2024-12-09 19:18:19 UTC
Created attachment 913670 [details]
pcsc-lite build log

Here's the build log.

ykman reports when run with the new version:

WARNING: PC/SC not available. Smart card (CCID) protocols will not function.

gpg reports (when built without usb):

gpg: selecting card failed: Service is not running
gpg: OpenPGP card not available: Service is not running
Comment 2 Daniel M. Weeks 2025-01-15 17:34:30 UTC
I just ran into this since 2.3.0 was stabilized. For anyone else that hits this and downgrades: After downgrading, make sure nothing is resident still using the problematic library. For example, I had to kill an scdaemon process.
Comment 3 Ed Santiago 2025-02-05 14:38:29 UTC
SOLUTION (or, at least, workaround): rebuild pcsc-lite with USE=policykit

Details: found this in journal

Feb 05 07:31:58 hostname pcscd[306512]: 00000000 ../pcsc-lite-2.3.0/src/
auth.c:127:IsClientAuthorized() Error in authorization: GDBus.Error:org.freedesk
top.PolicyKit1.Error.NotAuthorized: Only trusted callers (e.g. uid 0 or an actio
n owner) can use CheckAuthorization() for subjects belonging to other identities
Feb 05 07:31:58 hostname pcscd[306512]: 00000229 ../pcsc-lite-2.3.0/src/
auth.c:145:IsClientAuthorized() Process 306613 (user: 1000) is NOT authorized fo
r action: access_pcsc                                                           
Feb 05 07:31:58 hostname pcscd[306512]: 00000211 ../pcsc-lite-2.3.0/src/
winscard_svc.c:357:ContextThread() Rejected unauthorized PC/SC client           
Feb 05 07:31:58 hostname pcscd[306512]: 00120043 ../pcsc-lite-2.3.0/src/
auth.c:127:IsClientAuthorized() Error in authorization: GDBus.Error:org.freedesk
top.PolicyKit1.Error.NotAuthorized: Only trusted callers (e.g. uid 0 or an actio
n owner) can use CheckAuthorization() for subjects belonging to other identities
Feb 05 07:31:58 hostname pcscd[306512]: 00000012 ../pcsc-lite-2.3.0/src/
auth.c:145:IsClientAuthorized() Process 306613 (user: 1000) is NOT authorized fo
r action: access_pcsc                                                           
Feb 05 07:31:58 hostname pcscd[306512]: 00000064 ../pcsc-lite-2.3.0/src/
winscard_svc.c:357:ContextThread() Rejected unauthorized PC/SC client
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(+)