From owner-dev-commits-ports-all@freebsd.org Mon Apr 19 19:58:50 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E26B5FDBB8; Mon, 19 Apr 2021 19:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPHgt0JYjz4p0d; Mon, 19 Apr 2021 19:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E640724F48; Mon, 19 Apr 2021 19:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13JJwnl3053819; Mon, 19 Apr 2021 19:58:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13JJwnDX053818; Mon, 19 Apr 2021 19:58:49 GMT (envelope-from git) Date: Mon, 19 Apr 2021 19:58:49 GMT Message-Id: <202104191958.13JJwnDX053818@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?B?Vmluw61jaXVzIFphdmFt?= Subject: git: 99b3ddf04f4d - main - security/py-yubikey-manager: patch missing FreeBSD backend support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: egypcio X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99b3ddf04f4dd18812d2ca69216b2fd7b214bd70 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 19:58:50 -0000 The branch main has been updated by egypcio: URL: https://cgit.FreeBSD.org/ports/commit/?id=99b3ddf04f4dd18812d2ca69216b2fd7b214bd70 commit 99b3ddf04f4dd18812d2ca69216b2fd7b214bd70 Author: Vinícius Zavam AuthorDate: 2021-04-19 19:57:38 +0000 Commit: Vinícius Zavam 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"""