It looks like it requires a corresponding update to py-fido2, as this happens whenever you try to run it: $ ykman Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master ws.require(__requires__) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (fido2 0.8.1 (/usr/local/lib/python3.7/site-packages), Requirement.parse('fido2<1.0,>=0.9'), {'yubikey-manager'}) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/ykman", line 6, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module> @_call_aside File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 585, in _build_master return cls._build_from_requirements(__requires__) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'fido2<1.0,>=0.9' distribution was not found and is required by yubikey-manager
Now the fido2 update is in, but the port is still broken: $ ykman Traceback (most recent call last): File "/usr/local/bin/ykman", line 11, in <module> load_entry_point('yubikey-manager==4.0.0', 'console_scripts', 'ykman')() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point return ep.load() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2443, in load return self.resolve() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.7/site-packages/ykman/__init__.py", line 29, in <module> from .device import ( # noqa File "/usr/local/lib/python3.7/site-packages/ykman/device.py", line 52, in <module> from .hid import list_otp_devices, list_ctap_devices File "/usr/local/lib/python3.7/site-packages/ykman/hid/__init__.py", line 46, in <module> raise Exception("Unsupported platform") Exception: Unsupported platform Maybe this update can be backed out?
py-yubikey-manager is a dependency for yubikey-manager-qt, which last time I tried it did work for me. I'll reverify it and report back. But if we roll this back then yubikey-manager-qt will need to be rolled back.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=970206166db81f25eb6c13ec0a5c56b91454b907 commit 970206166db81f25eb6c13ec0a5c56b91454b907 Author: VinÃcius Zavam <egypcio@FreeBSD.org> AuthorDate: 2021-04-13 15:38:05 +0000 Commit: VinÃcius Zavam <egypcio@FreeBSD.org> CommitDate: 2021-04-13 15:38:05 +0000 security/py-yubikey-manager: update 4.0.0 to 4.0.2 - https://github.com/Yubico/yubikey-manager/blob/4.0.2/NEWS PR: 254580 Reported by: nwhitehorn@ security/py-yubikey-manager/Makefile | 2 +- security/py-yubikey-manager/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
hello there! port got updated to 4.0.2; would you try testing it again and report back? my current testing env got compromised and it's gonna take a while til it's up and running 100% again tho. few more hands/eyes would be appreciated thanks!
Still broken. The core problem is that yubikey-manager 4.0 and above simply don't support FreeBSD with their HID mode and needs someone to write a FreeBSD backend. The following diff "fixes" the issue by removing support for the HID backend, which means the port is crippled but at least can still work through the PCSC backend: --- yubikey-manager-4.0.2/ykman/hid/__init__.py 2021-04-12 03:23:08.142234800 -0400 +++ /tmp/__init__.py 2021-04-14 09:44:54.413841000 -0400 @@ -43,10 +43,12 @@ elif sys.platform.startswith("darwin"): from . import macos as backend else: - raise Exception("Unsupported platform") + backend = None - -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):
ACK. thanks for sharing that one; I am going to take care of this one and suggest kind of a MR into upstream as well. should get back to you ASAP
A commit in branch main references this bug: 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 (new) | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+)
(In reply to Nathan Whitehorn from comment #5) that should be fixed now :) gonna let the PR open, so you guys can confirm if it's all fine.
Working great. Thanks! It would probably be good to actually an HID backend for FreeBSD at some point, though.