Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2021 19:58:49 GMT
From:      =?utf-8?B?Vmluw61jaXVzIFphdmFt?= <egypcio@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 99b3ddf04f4d - main - security/py-yubikey-manager: patch missing FreeBSD backend support
Message-ID:  <202104191958.13JJwnDX053818@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by egypcio:

URL: https://cgit.FreeBSD.org/ports/commit/?id=99b3ddf04f4dd18812d2ca69216b2fd7b214bd70

commit 99b3ddf04f4dd18812d2ca69216b2fd7b214bd70
Author:     Vinícius Zavam <egypcio@FreeBSD.org>
AuthorDate: 2021-04-19 19:57:38 +0000
Commit:     Vinícius Zavam <egypcio@FreeBSD.org>
CommitDate: 2021-04-19 19:57:38 +0000

    security/py-yubikey-manager: patch missing FreeBSD backend support
    
    PR:             254580
    Reported by:    nwhitehorn
---
 security/py-yubikey-manager/Makefile                |  1 +
 .../files/patch-ykman_hid_____init____.py           | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

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"""



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104191958.13JJwnDX053818>