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,30 +1,31 @@ PORTNAME= yubikey-manager PORTVERSION= 4.0.2 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= egypcio@FreeBSD.org COMMENT= Python library and command line tool for configuring a YubiKey LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${RUN_DEPENDS} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}fido2>0:security/py-fido2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyscard>0:security/py-pyscard@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pycrypto>0:security/py-pycrypto@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyusb>0:devel/py-pyusb@${PY_FLAVOR} \ RSA_SecurID_getpasswd:devel/libccid \ pcsc-spy:devel/pcsc-lite \ u2f-host:security/libu2f-host \ ykpersonalize:security/ykpers USES= python:3.6+ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes .include 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"""