diff options
author | VinÃcius Zavam <egypcio@FreeBSD.org> | 2021-04-19 19:57:38 +0000 |
---|---|---|
committer | VinÃcius Zavam <egypcio@FreeBSD.org> | 2021-04-19 19:57:38 +0000 |
commit | 99b3ddf04f4dd18812d2ca69216b2fd7b214bd70 (patch) | |
tree | 90d429e124a9f0bfbd864ae6acef34062d0c81f5 | |
parent | 6c92546a2c4bc10252871c7c5e5e5b5f17a8bc17 (diff) | |
download | ports-99b3ddf04f4dd18812d2ca69216b2fd7b214bd70.tar.gz ports-99b3ddf04f4dd18812d2ca69216b2fd7b214bd70.zip |
security/py-yubikey-manager: patch missing FreeBSD backend support
PR: 254580
Reported by: nwhitehorn
-rw-r--r-- | security/py-yubikey-manager/Makefile | 1 | ||||
-rw-r--r-- | security/py-yubikey-manager/files/patch-ykman_hid_____init____.py | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/security/py-yubikey-manager/Makefile b/security/py-yubikey-manager/Makefile index b60103123654..89e0911599e4 100644 --- a/security/py-yubikey-manager/Makefile +++ b/security/py-yubikey-manager/Makefile @@ -1,5 +1,6 @@ PORTNAME= yubikey-manager PORTVERSION= 4.0.2 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/security/py-yubikey-manager/files/patch-ykman_hid_____init____.py b/security/py-yubikey-manager/files/patch-ykman_hid_____init____.py new file mode 100644 index 000000000000..235da25bf84d --- /dev/null +++ b/security/py-yubikey-manager/files/patch-ykman_hid_____init____.py @@ -0,0 +1,21 @@ +--- ykman/hid/__init__.py.orig 2021-04-12 07:23:08 UTC ++++ ykman/hid/__init__.py +@@ -42,12 +42,15 @@ elif sys.platform.startswith("win32"): + from . import windows as backend + elif sys.platform.startswith("darwin"): + from . import macos as backend ++elif sys.platform.startswith("freebsd"): ++ backend = None + else: + raise Exception("Unsupported platform") + +- +-list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = backend.list_devices +- ++if backend is not None: ++ list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = backend.list_devices ++else: ++ list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = lambda: [] + + class CtapYubiKeyDevice(YkmanDevice): + """YubiKey FIDO USB HID device""" |