(Yo yo egypcio!) Below is diff for net/py-sbws. Some tests dropped since it relies on a running sbws server. It seems to build and run fine, but probably needs more work. Ping me if you have any questions. george **** diff -u /usr/ports/net/py-sbws/Makefile py-sbws/Makefile --- /usr/ports/net/py-sbws/Makefile 2026-03-13 20:55:19.174644000 +0000 +++ py-sbws/Makefile 2026-03-03 21:58:26.568762000 +0000 @@ -1,6 +1,5 @@ PORTNAME= sbws -PORTVERSION= 1.7.0 -PORTREVISION= 1 +PORTVERSION= 2.2.0 DISTVERSIONPREFIX= v CATEGORIES= net python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -15,23 +14,21 @@ # pysocks: indirect dependency via requests[socks] RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pysocks>=1.6.8:net/py-pysocks@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.18.4:www/py-requests@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}stem>=1.7.0:security/py-stem@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}psutil>=5.5:sysutils/py-psutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}stem>=1.8.0:security/py-stem@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psutil>=7.0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}versioneer>=0:devel/py-versioneer@${PY_FLAVOR} \ - tor:security/tor \ - obfs4proxy:security/obfs4proxy-tor \ - snowflake-client:security/snowflake-tor + tor:security/tor - # testing depends on `git` and chutney. not adding that here. see `start_chutney.sh` + # there's no chutney port, so just doing unit tests TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage>=0:devel/py-coverage@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}flake8>=0:devel/py-flake8@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}flake8-docstrings>=0:devel/py-flake8-docstrings@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}freezegun>=0:devel/py-freezegun@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-mock>=0:devel/py-pytest-mock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}time-machine>=0:devel/py-time-machine@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tox>=0:devel/py-tox@${PY_FLAVOR} \ - bash:shells/bash +# ${PYTHON_PKGNAMEPREFIX}tox>=0:devel/py-tox@${PY_FLAVOR} \ +# bash:shells/bash USES= cpe python shebangfix USE_GITLAB= yes @@ -43,16 +40,20 @@ GL_SITE= https://gitlab.torproject.org/tpo GL_ACCOUNT= network-health GL_PROJECT= sbws -GL_TAGNAME= 30a2256098fad8e8aaa06e325274546b4aead552 +GL_TAGNAME= v2.2.0 +USE_RC_SUBR= sbws +SUB_FILES= pkg-message + +#USERS= _sbws +#GROUPS= _sbws + SHEBANG_FILES= setup.py \ sbws/core/bwfile_health.py \ scripts/maint/release.py \ scripts/tools/get-per-relay-budget.py \ scripts/tools/scale-v3bw-with-budget.py \ tests/integration/async_https_server.py \ - tests/integration/stop_chutney.sh \ - tests/integration/start_chutney.sh \ tests/integration/run.sh NO_ARCH= yes @@ -60,13 +61,21 @@ # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262759 post-patch: ${RM} ${WRKSRC}/tests/__init__.py + ${TOUCH} ${WRKSRC}/tests/unit/core/__init__.py + ${TOUCH} ${WRKSRC}/tests/unit/lib/__init__.py + ${TOUCH} ${WRKSRC}/tests/unit/util/__init__.py + ${TOUCH} ${WRKSRC}/tests/integration/core/__init__.py + ${TOUCH} ${WRKSRC}/tests/integration/lib/__init__.py +# just do unit tests since doesn't rely on live tor control port,etc do-test: cd ${WRKSRC} && \ - ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v + ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v tests/unit post-install: ${INSTALL_DATA} ${WRKSRC}/docs/source/examples/sbws.example.ini \ ${STAGEDIR}${PREFIX}/etc/sbws.ini.sample + +USE_RC_SUBR= sbws .include <bsd.port.mk> diff -u /usr/ports/net/py-sbws/distinfo py-sbws/distinfo --- /usr/ports/net/py-sbws/distinfo 2026-03-13 20:55:19.174704000 +0000 +++ py-sbws/distinfo 2026-03-03 21:58:26.568828000 +0000 @@ -1,3 +1,3 @@ -TIMESTAMP = 1693666331 -SHA256 (network-health-sbws-30a2256098fad8e8aaa06e325274546b4aead552_GL0.tar.gz) = 61aaade50cd99160109cbabb2fec540f8703c9e99d0cc1c0dc0192b7a132efb7 -SIZE (network-health-sbws-30a2256098fad8e8aaa06e325274546b4aead552_GL0.tar.gz) = 4659885 +TIMESTAMP = 1772047854 +SHA256 (sbws-v2.2.0.tar.bz2) = f5263faaa500aa169455e5c4437b09cee32db272833fea7d398aca71365944fd +SIZE (sbws-v2.2.0.tar.bz2) = 4137628 Common subdirectories: /usr/ports/net/py-sbws/files and py-sbws/files diff -u /usr/ports/net/py-sbws/pkg-descr py-sbws/pkg-descr --- /usr/ports/net/py-sbws/pkg-descr 2026-03-13 20:55:19.174916000 +0000 +++ py-sbws/pkg-descr 2026-03-03 21:58:26.569176000 +0000 @@ -1,5 +1,19 @@ -Simple Bandwidth Scanner (a.k.a sbws) is a Tor bandwidth scanner that produces -bandwidth measurements files to be used by Directory Authorities. +Simple Bandwidth Scanner (called ``sbws``) is a Tor bandwidth scanner +that generates bandwidth files to be used by Directory Authorities. -The scanner builds two hop circuits consisting of the relay being measured and -a fast exit. Over these circuits it measures RTT and bandwidth. +The scanner measures the bandwidth of each relay in the Tor network, +except the directory authorities, by creating a two hop circuit +(consisting of a helper relay and the relay to measure). It then +measures the bandwidth by downloading data from a destination Web +Server and stores the measurements. + +The generator read the measurements, aggregates, filters and scales +them using torflow's scaling method. Then it generates a bandwidth +list file that is read by a directory authority to report relays' +bandwidth in its vote. + +**WARNING**: This software is intended to be run by researchers +using a test Tor network, such as chutney or shadow, or by the Tor +bandwidth authorities on the public Tor network. Please do not run +this software on the public Tor network unless you are one of the +Tor bandwidth authorities, to avoid creating unnecessary traffic.