pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-fido2: remove, used for updating pkgsrc/security/py-fido2



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Sun Mar 12 15:06:16 2023 +0100
Changeset:	535c5ff4f4d5e72e903caa41769a87f1529cb370

Modified Files:
	Makefile
Removed Files:
	py-fido2/DESCR
	py-fido2/Makefile
	py-fido2/PLIST
	py-fido2/distinfo
	py-fido2/patches/patch-fido2_hid_____init____.py
	py-fido2/patches/patch-fido2_hid_netbsd.py

Log Message:
py-fido2: remove, used for updating pkgsrc/security/py-fido2

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=535c5ff4f4d5e72e903caa41769a87f1529cb370

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                         |   1 -
 py-fido2/DESCR                                   |   7 -
 py-fido2/Makefile                                |  29 ----
 py-fido2/PLIST                                   |  86 -----------
 py-fido2/distinfo                                |   7 -
 py-fido2/patches/patch-fido2_hid_____init____.py |  16 --
 py-fido2/patches/patch-fido2_hid_netbsd.py       | 178 -----------------------
 7 files changed, 324 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index 544d909906..e01a679424 100644
--- a/Makefile
+++ b/Makefile
@@ -3763,7 +3763,6 @@ SUBDIR+=	py-fedmsg
 SUBDIR+=	py-fermilab
 SUBDIR+=	py-feyn
 SUBDIR+=	py-ffmpeg-normalize
-SUBDIR+=	py-fido2
 SUBDIR+=	py-figleaf
 SUBDIR+=	py-fileinspector
 SUBDIR+=	py-fiona
diff --git a/py-fido2/DESCR b/py-fido2/DESCR
deleted file mode 100644
index c944382550..0000000000
--- a/py-fido2/DESCR
+++ /dev/null
@@ -1,7 +0,0 @@
-This library aims to support the FIDO U2F and FIDO 2.0 protocols for
-communicating with a USB authenticator via the Client-to-Authenticator
-Protocol (CTAP 1 and 2).  In addition to this low-level device access,
-classes defined in the fido2.client and fido2.server modules implement
-higher level operations which are useful when interfacing with an
-Authenticator, or when implementing WebAuthn support for a Relying
-Party.
diff --git a/py-fido2/Makefile b/py-fido2/Makefile
deleted file mode 100644
index 9369b82964..0000000000
--- a/py-fido2/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#	$NetBSD: Makefile,v 1.4 2022/04/21 11:00:01 wiz Exp $
-
-DISTNAME=	fido2-1.1.0
-PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES=	security
-MASTER_SITES=	${MASTER_SITE_GITHUB:=Yubico/}
-GITHUB_PROJECT=	python-fido2
-GITHUB_TAG=	${PKGVERSION_NOREV}
-
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://developers.yubico.com/python-fido2/
-COMMENT=	Yubico FIDO U2F and FIDO 2.0 USB Python library
-LICENSE=	2-clause-bsd AND apache-2.0 AND mpl-2.0
-
-DEPENDS+=	${PYPKGPREFIX}-scard>=0:../../devel/py-scard
-DEPENDS+=	${PYPKGPREFIX}-cryptography>=0:../../security/py-cryptography
-TEST_DEPENDS+=	${PYPKGPREFIX}-test>=2:../../devel/py-test
-TOOL_DEPENDS+=	${PYPKGPREFIX}-poetry-core>=1:../../devel/py-poetry-core
-
-PYTHON_VERSIONS_INCOMPATIBLE=	27
-
-post-install:
-	${RM} -f ${DESTDIR}${PREFIX}/${PYSITELIB}/fido2/hid/*.orig
-
-do-test:
-	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
-
-.include "../../lang/python/wheel.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/py-fido2/PLIST b/py-fido2/PLIST
deleted file mode 100644
index 7b9abdb455..0000000000
--- a/py-fido2/PLIST
+++ /dev/null
@@ -1,86 +0,0 @@
-@comment $NetBSD$
-${PYSITELIB}/${WHEEL_INFODIR}/COPYING
-${PYSITELIB}/${WHEEL_INFODIR}/COPYING.APLv2
-${PYSITELIB}/${WHEEL_INFODIR}/COPYING.MPLv2
-${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER
-${PYSITELIB}/${WHEEL_INFODIR}/METADATA
-${PYSITELIB}/${WHEEL_INFODIR}/RECORD
-${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED
-${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
-${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json
-${PYSITELIB}/fido2/__init__.py
-${PYSITELIB}/fido2/__init__.pyc
-${PYSITELIB}/fido2/attestation/__init__.py
-${PYSITELIB}/fido2/attestation/__init__.pyc
-${PYSITELIB}/fido2/attestation/android.py
-${PYSITELIB}/fido2/attestation/android.pyc
-${PYSITELIB}/fido2/attestation/apple.py
-${PYSITELIB}/fido2/attestation/apple.pyc
-${PYSITELIB}/fido2/attestation/base.py
-${PYSITELIB}/fido2/attestation/base.pyc
-${PYSITELIB}/fido2/attestation/packed.py
-${PYSITELIB}/fido2/attestation/packed.pyc
-${PYSITELIB}/fido2/attestation/tpm.py
-${PYSITELIB}/fido2/attestation/tpm.pyc
-${PYSITELIB}/fido2/attestation/u2f.py
-${PYSITELIB}/fido2/attestation/u2f.pyc
-${PYSITELIB}/fido2/cbor.py
-${PYSITELIB}/fido2/cbor.pyc
-${PYSITELIB}/fido2/client.py
-${PYSITELIB}/fido2/client.pyc
-${PYSITELIB}/fido2/cose.py
-${PYSITELIB}/fido2/cose.pyc
-${PYSITELIB}/fido2/ctap.py
-${PYSITELIB}/fido2/ctap.pyc
-${PYSITELIB}/fido2/ctap1.py
-${PYSITELIB}/fido2/ctap1.pyc
-${PYSITELIB}/fido2/ctap2/__init__.py
-${PYSITELIB}/fido2/ctap2/__init__.pyc
-${PYSITELIB}/fido2/ctap2/base.py
-${PYSITELIB}/fido2/ctap2/base.pyc
-${PYSITELIB}/fido2/ctap2/bio.py
-${PYSITELIB}/fido2/ctap2/bio.pyc
-${PYSITELIB}/fido2/ctap2/blob.py
-${PYSITELIB}/fido2/ctap2/blob.pyc
-${PYSITELIB}/fido2/ctap2/config.py
-${PYSITELIB}/fido2/ctap2/config.pyc
-${PYSITELIB}/fido2/ctap2/credman.py
-${PYSITELIB}/fido2/ctap2/credman.pyc
-${PYSITELIB}/fido2/ctap2/extensions.py
-${PYSITELIB}/fido2/ctap2/extensions.pyc
-${PYSITELIB}/fido2/ctap2/pin.py
-${PYSITELIB}/fido2/ctap2/pin.pyc
-${PYSITELIB}/fido2/features.py
-${PYSITELIB}/fido2/features.pyc
-${PYSITELIB}/fido2/hid/__init__.py
-${PYSITELIB}/fido2/hid/__init__.pyc
-${PYSITELIB}/fido2/hid/base.py
-${PYSITELIB}/fido2/hid/base.pyc
-${PYSITELIB}/fido2/hid/freebsd.py
-${PYSITELIB}/fido2/hid/freebsd.pyc
-${PYSITELIB}/fido2/hid/linux.py
-${PYSITELIB}/fido2/hid/linux.pyc
-${PYSITELIB}/fido2/hid/macos.py
-${PYSITELIB}/fido2/hid/macos.pyc
-${PYSITELIB}/fido2/hid/netbsd.py
-${PYSITELIB}/fido2/hid/netbsd.pyc
-${PYSITELIB}/fido2/hid/openbsd.py
-${PYSITELIB}/fido2/hid/openbsd.pyc
-${PYSITELIB}/fido2/hid/windows.py
-${PYSITELIB}/fido2/hid/windows.pyc
-${PYSITELIB}/fido2/mds3.py
-${PYSITELIB}/fido2/mds3.pyc
-${PYSITELIB}/fido2/pcsc.py
-${PYSITELIB}/fido2/pcsc.pyc
-${PYSITELIB}/fido2/public_suffix_list.dat
-${PYSITELIB}/fido2/py.typed
-${PYSITELIB}/fido2/rpid.py
-${PYSITELIB}/fido2/rpid.pyc
-${PYSITELIB}/fido2/server.py
-${PYSITELIB}/fido2/server.pyc
-${PYSITELIB}/fido2/utils.py
-${PYSITELIB}/fido2/utils.pyc
-${PYSITELIB}/fido2/webauthn.py
-${PYSITELIB}/fido2/webauthn.pyc
-${PYSITELIB}/fido2/win_api.py
-${PYSITELIB}/fido2/win_api.pyc
diff --git a/py-fido2/distinfo b/py-fido2/distinfo
deleted file mode 100644
index f7f0730880..0000000000
--- a/py-fido2/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 11:17:45 nia Exp $
-
-BLAKE2s (fido2-1.1.0.tar.gz) = 92d590ca5ca32758eb40559447844a9eb53c1b22603cc91d5abddb940bfceb5a
-SHA512 (fido2-1.1.0.tar.gz) = 28446710cd2bf1d82ecc52a779cb535943c9ddf020958c6549167091cd8da72f8cd1ab2fd3a0aee0a6f34d61059bcd72ecc2f4504c9086b5c5815b63faaf5d17
-Size (fido2-1.1.0.tar.gz) = 243692 bytes
-SHA1 (patch-fido2_hid_____init____.py) = cdc96645c972d5b7ad14b2fbc3b13ad607b6d1ca
-SHA1 (patch-fido2_hid_netbsd.py) = 330afb08ed955ddd739594a23155280d7967f59b
diff --git a/py-fido2/patches/patch-fido2_hid_____init____.py b/py-fido2/patches/patch-fido2_hid_____init____.py
deleted file mode 100644
index 02ca7a70e6..0000000000
--- a/py-fido2/patches/patch-fido2_hid_____init____.py
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-Add NetBSD support.
-https://github.com/Yubico/python-fido2/pull/174
-
---- fido2/hid/__init__.py.orig	2022-10-17 13:36:35.000000000 +0000
-+++ fido2/hid/__init__.py
-@@ -49,6 +49,8 @@ elif sys.platform.startswith("darwin"):
-     from . import macos as backend
- elif sys.platform.startswith("freebsd"):
-     from . import freebsd as backend
-+elif sys.platform.startswith('netbsd'):
-+    from . import netbsd as backend
- elif sys.platform.startswith("openbsd"):
-     from . import openbsd as backend
- else:
diff --git a/py-fido2/patches/patch-fido2_hid_netbsd.py b/py-fido2/patches/patch-fido2_hid_netbsd.py
deleted file mode 100644
index ee85fd5ca1..0000000000
--- a/py-fido2/patches/patch-fido2_hid_netbsd.py
+++ /dev/null
@@ -1,178 +0,0 @@
-$NetBSD$
-
-Add NetBSD support.
-https://github.com/Yubico/python-fido2/pull/174
-
---- fido2/hid/netbsd.py.orig	2023-03-11 13:39:42.733028371 +0000
-+++ fido2/hid/netbsd.py
-@@ -0,0 +1,170 @@
-+# Copyright 2016 Google Inc. All Rights Reserved.
-+#
-+# Licensed under the Apache License, Version 2.0 (the "License");
-+# you may not use this file except in compliance with the License.
-+# You may obtain a copy of the License at
-+#
-+#    http://www.apache.org/licenses/LICENSE-2.0
-+#
-+# Unless required by applicable law or agreed to in writing, software
-+# distributed under the License is distributed on an "AS IS" BASIS,
-+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+# See the License for the specific language governing permissions and
-+# limitations under the License.
-+
-+"""Implements raw HID interface on NetBSD."""
-+
-+from __future__ import absolute_import
-+
-+import errno
-+import logging
-+import os
-+import select
-+import struct
-+
-+from ctypes import Structure
-+from ctypes import c_char
-+from ctypes import c_int
-+from ctypes import c_ubyte
-+from ctypes import c_uint16
-+from ctypes import c_uint32
-+from ctypes import c_uint8
-+from ctypes import sizeof
-+from fcntl import ioctl
-+from typing import Set
-+
-+from . import base
-+
-+
-+logger = logging.getLogger(__name__)
-+
-+
-+USB_MAX_DEVNAMELEN = 16
-+USB_MAX_DEVNAMES = 4
-+USB_MAX_STRING_LEN = 128
-+USB_MAX_ENCODED_STRING_LEN = USB_MAX_STRING_LEN * 3
-+
-+
-+class usb_ctl_report_desc(Structure):
-+    _fields_ = [
-+        ('ucrd_size', c_int),
-+        ('ucrd_data', c_ubyte * 1024),
-+    ]
-+
-+
-+class usb_device_info(Structure):
-+    _fields_ = [
-+        ('udi_bus', c_uint8),
-+        ('udi_addr', c_uint8),
-+        ('udi_pad0', c_uint8 * 2),
-+        ('udi_cookie', c_uint32),
-+        ('udi_product', c_char * USB_MAX_ENCODED_STRING_LEN),
-+        ('udi_vendor', c_char * USB_MAX_ENCODED_STRING_LEN),
-+        ('udi_release', c_char * 8),
-+        ('udi_serial', c_char * USB_MAX_ENCODED_STRING_LEN),
-+        ('udi_productNo', c_uint16),
-+        ('udi_vendorNo', c_uint16),
-+        ('udi_releaseNo', c_uint16),
-+        ('udi_class', c_uint8),
-+        ('udi_subclass', c_uint8),
-+        ('udi_protocol', c_uint8),
-+        ('udi_config', c_uint8),
-+        ('udi_speed', c_uint8),
-+        ('udi_pad1', c_uint8),
-+        ('udi_power', c_int),
-+        ('udi_nports', c_int),
-+        ('udi_devnames', c_char * USB_MAX_DEVNAMES * USB_MAX_DEVNAMELEN),
-+        ('udi_ports', c_uint8 * 16),
-+    ]
-+
-+
-+USB_GET_DEVICE_INFO = 0x44f45570  # _IOR('U', 112, struct usb_device_info)
-+USB_GET_REPORT_DESC = 0x44045515  # _IOR('U', 21, struct usb_ctl_report_desc)
-+USB_HID_SET_RAW = 0x80046802      # _IOW('h', 2, int)
-+
-+
-+# Cache for continuously failing devices
-+# XXX not thread-safe
-+_failed_cache: Set[str] = set()
-+
-+
-+def list_descriptors():
-+    stale = set(_failed_cache)
-+    descriptors = []
-+
-+    for i in range(100):
-+        path = '/dev/uhid%d' % (i,)
-+        stale.discard(path)
-+        try:
-+            desc = get_descriptor(path)
-+        except OSError as e:
-+            if e.errno == errno.ENOENT:
-+                break
-+            if path not in _failed_cache:
-+                logger.debug("Failed opening FIDO device %s", path,
-+                    exc_info=True)
-+                _failed_cache.add(path)
-+            continue
-+        except Exception:
-+            if path not in _failed_cache:
-+                logger.debug("Failed opening FIDO device %s", path,
-+                    exc_info=True)
-+                _failed_cache.add(path)
-+            continue
-+        descriptors.append(desc)
-+
-+    _failed_cache.difference_update(stale)
-+    return descriptors
-+
-+
-+def get_descriptor(path):
-+    fd = None
-+    try:
-+        fd = os.open(path, os.O_RDONLY|os.O_CLOEXEC)
-+        devinfo = usb_device_info()
-+        ioctl(fd, USB_GET_DEVICE_INFO, devinfo)
-+        ucrd = usb_ctl_report_desc()
-+        ioctl(fd, USB_GET_REPORT_DESC, ucrd)
-+        report_desc = bytearray(ucrd.ucrd_data[:ucrd.ucrd_size])
-+        maxin, maxout = base.parse_report_descriptor(report_desc)
-+        vid = devinfo.udi_vendorNo
-+        pid = devinfo.udi_productNo
-+        try:
-+            name = devinfo.udi_product.decode('utf-8')
-+        except UnicodeDecodeError:
-+            name = None
-+        try:
-+            serial = devinfo.udi_serial.decode('utf-8')
-+        except UnicodeDecodeError:
-+            serial = None
-+        return base.HidDescriptor(path, vid, pid, maxin, maxout, name, serial)
-+    finally:
-+        if fd is not None:
-+            os.close(fd)
-+
-+
-+def open_connection(descriptor):
-+    return NetBSDCtapHidConnection(descriptor);
-+
-+
-+class NetBSDCtapHidConnection(base.FileCtapHidConnection):
-+    def __init__(self, descriptor):
-+        # XXX racy -- device can change identity now that it has been
-+        # closed
-+        super().__init__(descriptor)
-+        try:
-+            ioctl(self.handle, USB_HID_SET_RAW, struct.pack('@i', 1))
-+            ping = bytearray(64)
-+            ping[0:7] = bytearray([0xff,0xff,0xff,0xff,0x81,0,1])
-+            for i in range(10):
-+                self.write_packet(ping)
-+                poll = select.poll()
-+                poll.register(self.handle, select.POLLIN)
-+                if poll.poll(100):
-+                    self.read_packet()
-+                    break
-+            else:
-+                raise Exception('u2f ping timeout')
-+        except Exception:
-+            self.close()
-+            raise


Home | Main Index | Thread Index | Old Index