On 2024/06/22 00:45, Kirill A. Korinsky wrote: > ports@, > > Here a ping about mitmproxy port. > > I've reattached the archive with all required dependencies. > > -- > wbr, Kirill
I've attached a new tgz with some small tweaks, and include a diff below with commentary on those changes. With those changes I am ok with importing these (i.e. all except py-aioquic and mitmproxy itself), or I can import given another ok) - archivers/py-brotlicffi archivers/py-lsqpack archivers/py-zstandard devel/py-kaitaistruct net/py-publicsuffix2 security/py-mitmproxy_rs www/py-asgiref www/py-h2 www/py-hpack www/py-hyperframe www/py-aioquic has an issue, IPV6_V6ONLY is neutered on OpenBSD so it is broken, so I'm not entirely happy importing it as-is (although mitmproxy itself does work as long as you don't use the quic support). >From src/aioquic/asyncio/client.py: --- loop = asyncio.get_event_loop() local_host = "::" # lookup remote address infos = await loop.getaddrinfo(host, port, type=socket.SOCK_DGRAM) addr = infos[0][4] if len(addr) == 2: addr = ("::ffff:" + addr[0], addr[1], 0, 0) --- --- # explicitly enable IPv4/IPv6 dual stack sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) completed = False try: sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0) sock.bind((local_host, local_port, 0, 0)) completed = True finally: if not completed: sock.close() --- Pragmatically, changing the code to use v4 only is probably the sane thing to do for OpenBSD at this point. Not ideal but likely a lot simpler than switching it to cope with dual sockets (and there's precedent for doing that in ports; see e.g. Java). Alternatively I guess we could add it with a big fat warning in DESCR that it's not actually going to work on OpenBSD but is only there to satisfy the dependency. : diff --git a/archivers/py-lsqpack/Makefile b/archivers/py-lsqpack/Makefile : index 1699729..ad5622b 100644 : --- a/archivers/py-lsqpack/Makefile : +++ b/archivers/py-lsqpack/Makefile : @@ -1,4 +1,4 @@ : -COMMENT = python bindings for ls-qpack : +COMMENT = Python bindings for ls-qpack obvious : : MODPY_EGG_VERSION = 0.3.18 : DISTNAME = pylsqpack-${MODPY_EGG_VERSION} : diff --git a/archivers/py-zstandard/pkg/PLIST b/archivers/py-zstandard/pkg/PLIST : index 7fdfe25..e157ff6 100644 : --- a/archivers/py-zstandard/pkg/PLIST : +++ b/archivers/py-zstandard/pkg/PLIST : @@ -12,6 +12,7 @@ lib/python${MODPY_VERSION}/site-packages/zstandard/${MODPY_PYCACHE}__init__.${MO : lib/python${MODPY_VERSION}/site-packages/zstandard/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc : lib/python${MODPY_VERSION}/site-packages/zstandard/${MODPY_PYCACHE}backend_cffi.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION} : lib/python${MODPY_VERSION}/site-packages/zstandard/${MODPY_PYCACHE}backend_cffi.${MODPY_PYC_MAGIC_TAG}pyc : +@so lib/python${MODPY_VERSION}/site-packages/zstandard/_cffi.${MODPY_PYC_MAGIC_TAG}so not sure if this is needed; either way it should either be listed in PLIST or the file removed : @so lib/python${MODPY_VERSION}/site-packages/zstandard/backend_c.${MODPY_PYC_MAGIC_TAG}so : lib/python${MODPY_VERSION}/site-packages/zstandard/backend_cffi.py : lib/python${MODPY_VERSION}/site-packages/zstandard/py.typed : diff --git a/security/mitmproxy/Makefile b/security/mitmproxy/Makefile : index 5fddaf5..7984e96 100644 : --- a/security/mitmproxy/Makefile : +++ b/security/mitmproxy/Makefile : @@ -46,8 +46,6 @@ RUN_DEPENDS = archivers/py-brotli${MODPY_FLAVOR} \ : www/py-hyperframe${MODPY_FLAVOR} \ : www/py-tornado${MODPY_FLAVOR} : : -BUILD_DEPENDS = ${RUN_DEPENDS} : - certainly the full set of these is not needed, and it's nice to avoid unneeded dependency churn in bulk builds - I didn't try on a clean machine yet but I think we're probably ok with the BDEPs added by default without that line: $ make show=BUILD_DEPENDS lang/python/3 devel/py-build,python3 devel/py-installer,python3 devel/py-setuptools,python3 devel/py-wheel,python3 : NO_TEST = Yes : : .include <bsd.port.mk> : diff --git a/security/py-mitmproxy_rs/Makefile b/security/py-mitmproxy_rs/Makefile : index ecbd630..d98a57e 100644 : --- a/security/py-mitmproxy_rs/Makefile : +++ b/security/py-mitmproxy_rs/Makefile : @@ -1,10 +1,10 @@ : -COMMENT = the Rust bits in mitmproxy. : +COMMENT = Rust components used in mitmproxy : : MODPY_EGG_VERSION = 0.5.2 : DISTNAME = mitmproxy_rs-${MODPY_EGG_VERSION} : PKGNAME = py-${DISTNAME} : : -CATEGORIES = security devek net : +CATEGORIES = security typo, but I don't think the other categories are really useful anyway : : HOMEPAGE = https://mitmproxy.org/ : : @@ -13,7 +13,7 @@ MAINTAINER= Kirill A. Korinsky <kir...@korins.ky> : # MIT : PERMIT_PACKAGE = Yes : : -WANTLIB += ${MODCARGO_WANTLIB} pthread : +WANTLIB += ${MODCARGO_WANTLIB} m pthread : : MODULES = devel/cargo \ : lang/python : @@ -27,11 +27,9 @@ MODPY_PYBUILD = maturin : MODCARGO_CARGO_BIN = maturin : CONFIGURE_STYLE = cargo : : -BUILD_DEPENDS = devel/maturin \ already set by MODPY_PYBUILD : - devel/py-pip${MODPY_FLAVOR} \ pip is pretty heavyweight, let's not use it when py-installer will do. (we used to use it in python.port.mk for a short time when I was getting to grips with pep517 builds but it's long gone there now). : - security/rust-ring : +BUILD_DEPENDS = security/rust-ring I think tb will be a bit sad about this :( : -WRKSRC = ${WRKDIST}/mitmproxy-rs : +WRKSRC = ${WRKDIST}/mitmproxy-rs whitespace nit : : NO_TEST = Yes : : @@ -42,18 +40,8 @@ do-build: : ${MODCARGO_BUILD_ARGS} : : do-install: : - ${INSTALL_PROGRAM} ${WRKSRC}/target/release/libmitmproxy_rs.so ${PREFIX}/lib INSTALL_PROGRAM strips by default so use INSTALL_DATA for a library, but this doesn't seem to be needed anyway - site-packages/mitmproxy_rs/mitmproxy_rs.abi3.so looks to have all that's needed in it, and mitmproxy runs ok without it. : - pip${MODPY_VERSION} install --no-cache-dir --isolated \ : - --root=${WRKINST} \ : - --ignore-installed \ : - --no-deps ${WRKSRC}/target/wheels/*.whl : + ${INSTALL_DATA_DIR} ${WRKINST}${MODPY_LIBDIR} : + ${MODPY_BIN} -m installer -d ${WRKINST} ${WRKSRC}/target/wheels/*.whl as above, pip -> py-installer : - : -do-test: : - pip${MODPY_VERSION} install --no-cache-dir --isolated \ : - --target=${WRKSRC}/tests \ : - --ignore-installed \ : - --no-deps ${WRKSRC}/target/wheels/*.whl : - cd ${WRKSRC} && ${SETENV} ${ALL_TEST_ENV} ${MODPY_BIN} -m pytest -v rm, unused due to NO_TEST : : .include "crates.inc" : : diff --git a/security/py-mitmproxy_rs/pkg/PLIST b/security/py-mitmproxy_rs/pkg/PLIST : index 72af140..e2fa637 100644 : --- a/security/py-mitmproxy_rs/pkg/PLIST : +++ b/security/py-mitmproxy_rs/pkg/PLIST <snip details> plist changes from above pipi -> py-installer and stopping installing .so : index 7f05714..0000000 : --- a/security/py-service_identity/Makefile : +++ /dev/null <snip> already updated in tree
mitmproxy-with-deps,2.tgz
Description: application/tar-gz