From owner-freebsd-ports@freebsd.org Mon Jul 27 20:34:37 2020 Return-Path: Delivered-To: freebsd-ports@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 C905936E4F1 for ; Mon, 27 Jul 2020 20:34:37 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24]) (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 "smtp.xs4all.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BFs3x2rhjz4Jsq for ; Mon, 27 Jul 2020 20:34:37 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from cust-d4a83f22 ([IPv6:fc0c:c11d:cecc:f58a:eaa1:c0:9d8f:c143]) by smtp-cloud7.xs4all.net with ESMTPA id 09pSkmBKRywL509pTkiuAP; Mon, 27 Jul 2020 22:34:35 +0200 From: Adriaan de Groot To: freebsd-ports@freebsd.org Subject: libusb & API versions Date: Mon, 27 Jul 2020 22:34:34 +0200 Message-ID: <2124799.5gTYqTD1LS@beastie.bionicmutton.org> Organization: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1786419.CJpZife00y"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-CMAE-Envelope: MS4wfNVzctoo59i+PODRxeE0kyNLaOfwZ5O2UFBxrb4qm10TpbX84eKXh/c2ashkOzQg149txMLioOQEku6x5NYys/r3vvwFMhjAo28YXBsHCy36dcOVjM7k pK8hnFLQQvGNVABV7skLFKLUDJU6viGJ4xAbTFmmQ9L6jhbULr7VCWMM8PKlrQSHfqBBQ7BI+yQRHQ== X-Rspamd-Queue-Id: 4BFs3x2rhjz4Jsq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2020 20:34:37 -0000 --nextPart1786419.CJpZife00y Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" I'm wondering about libusb, because the libusb in base is missing a bunch of "current" API, and the API version number doesn't match Linux (upstream?) idea of what was available in historical versions. tl;dr: would a libusb port make any sense? Is updating libusb in base feasible? Background: - KDE Plasma currently displays nothing useful in the System Information panel about USB devices. This is because it reads data from files in /sys .. and doesn't expect to find the source code of the operating system there. - Switching to libusb is an obvious improvement: libusb supports a dozen OS'es, with backends for NetBSD, OpenBSD, Solaris .. and not FreeBSD, for whatever reason, but we have our own libusb in base anyway. - *Current* upstream libusb has at least these two things that original version 1.0 libusb from 2010 or so didn't have: - libusb_device *libusb_get_parent(libusb_device *) - LIBUSB_SPEED_SUPER_PLUS - Our libusb.h defines an API version #define LIBUSB_API_VERSION 0x01000102 - libusb upstream introduced libusb_get_parent in v1.0.12 - libusb upstream introduced LIBUSBX_API_VERSION in v1.0.13, as 0x01000100 - much later LIBUSBX_API_VERSION was renamed LIBUSB_API_VERSION But it comes down to this: the API_VERSIONs don't match up with the available functionality; libusb 2.0 was though-about in 2012 or so, but never gained any traction. Our libusb has things for the apparently abandoned 2.0 API, but nothing for the continued evolution of the 1.0 API. Any recommendations? I'd like to avoid patches upstream, but if things need to be rewritten to match our libusb, so be it. [ade] --nextPart1786419.CJpZife00y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEhrjttu2OP5apuuy1z93JbxKxkVwFAl8fOloACgkQz93JbxKx kVyhhQv9EBQkizj9s9icUEseQxkcTBHmu2ft04ciwVvD/RVLwuBlu4K/FBdMi7KK 5yCXWNxdMWjoCNyZYuUzXQ/G5Dr8mGCvdocwF4EQjS2Nanp8ZNEjWpWPlhl57J1f Y/eBUo6h1dI6jkhXNxPJZhCgxp4DVAcDx7i9IYnm2gxG9Jn2+mBi0HmTrGUAOgDL vKmzXx9aL8vvyGfvsivfxwZLZ5zw3Vjf51cwgyY5E9d1PGJCczGKT/7PMhaP56uy sWbHvllMLNCJSXGFNNmcFZ2gWt5/WpLioCROUX7aKG7Evxo4Bb00KN3AnT/PoTy7 YTrsHCRyObmC+bQ0MngeV8mAD09YFsxyw9pic+8P/ivRUiKWT3g57sr6N8Loyg+B 6+5U3qvPNGjPKDxoWy6ckyDWWMkEpZtzAeln9dVPgRRQuvKf3GCKsBBJgy9j7+rs tdYoe4N6R9D2gCYtUHfQ2XRhAClxmes6pSwsWD10fJm7xNARixKaWLeGErWIYRoT FGECXGI1 =A2Sv -----END PGP SIGNATURE----- --nextPart1786419.CJpZife00y--