public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/yubikey-manager] epel10: Add upstream patch to build with pyscard 2.2.2
@ 2026-08-21 14:27 Orion Poplawski
0 siblings, 0 replies; only message in thread
From: Orion Poplawski @ 2026-08-21 14:27 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/yubikey-manager
Branch : epel10
Commit : cca886ab21975155c79c0d55a21530d833948ad9
Author : Orion Poplawski <orion@nwra.com>
Date : 2026-08-21T08:26:15-06:00
Stats : +36/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/yubikey-manager/c/cca886ab21975155c79c0d55a21530d833948ad9?branch=epel10
Log:
Add upstream patch to build with pyscard 2.2.2
---
diff --git a/yubikey-manager-pyscard-2.2.2.patch b/yubikey-manager-pyscard-2.2.2.patch
new file mode 100644
index 0000000..e6ef4e8
--- /dev/null
+++ b/yubikey-manager-pyscard-2.2.2.patch
@@ -0,0 +1,34 @@
+diff --git a/ykman/pcsc/__init__.py b/ykman/pcsc/__init__.py
+index f365d97..ff71c15 100644
+--- a/ykman/pcsc/__init__.py
++++ b/ykman/pcsc/__init__.py
+@@ -34,7 +34,6 @@ from yubikit.logging import LOG_LEVEL
+ from smartcard import System
+ from smartcard.Exceptions import CardConnectionException
+ from smartcard.pcsc.PCSCExceptions import ListReadersException
+-from smartcard.pcsc.PCSCContext import PCSCContext
+
+ from fido2.pcsc import CtapPcscDevice
+ from time import sleep
+@@ -166,12 +165,18 @@ def kill_yubikey_agent():
+ def list_readers():
+ try:
+ return System.readers()
+- except ListReadersException:
++ except ListReadersException as e:
+ # If the PCSC system has restarted the context might be stale, try
+ # forcing a new context (This happens on Windows if the last reader is
+ # removed):
+- PCSCContext.instance = None
+- return System.readers()
++ try:
++ from smartcard.pcsc.PCSCContext import PCSCContext
++
++ PCSCContext.instance = None
++ return System.readers()
++ except ImportError:
++ # As of pyscard 2.2.2 the PCSCContext singleton has been removed
++ raise e
+
+
+ def list_devices(name_filter=None):
diff --git a/yubikey-manager.spec b/yubikey-manager.spec
index 47ccccc..986c083 100644
--- a/yubikey-manager.spec
+++ b/yubikey-manager.spec
@@ -12,6 +12,8 @@ License: BSD-2-Clause
URL: %{forgeurl}
Source0: %{forgesource}
Source1: %{name}.rpmlintrc
+# Backport support for pyscard 2.2.2
+Patch: yubikey-manager-pyscard-2.2.2.patch
BuildArch: noarch
BuildRequires: swig pcsc-lite-devel ykpers pyproject-rpm-macros
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-21 14:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 14:27 [rpms/yubikey-manager] epel10: Add upstream patch to build with pyscard 2.2.2 Orion Poplawski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox