[Bug 297291] net/py-sbws
[email protected] Wed, 05 Aug 2026 00:36:59 +0000
| Newsgroups | gmane.os.freebsd.devel.ports.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D297291
Bug ID: 297291
Summary: net/py-sbws
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Assignee: [email protected]
Flags: maintainer-feedback?([email protected])
(Yo yo egypcio!)
Below is diff for net/py-sbws. Some tests dropped since it relies on a runn=
ing
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=3D sbws
-PORTVERSION=3D 1.7.0
-PORTREVISION=3D 1
+PORTVERSION=3D 2.2.0
DISTVERSIONPREFIX=3D v
CATEGORIES=3D net python
PKGNAMEPREFIX=3D ${PYTHON_PKGNAMEPREFIX}
@@ -15,23 +14,21 @@
# pysocks: indirect dependency via requests[socks]
RUN_DEPENDS=3D=20=20
${PYTHON_PKGNAMEPREFIX}pysocks>=3D1.6.8:net/py-pysocks@${PY_FLAVOR} \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}requests>=3D2.18.4:www/py-requests@${PY_FLAVOR} \
-=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}stem>=3D1.7.0:security/py-stem@${PY_FLAVOR} \
-=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}psutil>=3D5.5:sysutils/py-psutil@${PY_FLAVOR} \
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}stem>=3D1.8.0:security/py-stem@${PY_FLAVOR} \
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}psutil>=3D7.0:sysutils/py-psutil@${PY_FLAVOR} \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}versioneer>=3D0: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 her=
e.
see `start_chutney.sh`
+ # there's no chutney port, so just doing unit tests
TEST_DEPENDS=3D=20
${PYTHON_PKGNAMEPREFIX}coverage>=3D0:devel/py-coverage@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flake8>=3D0:devel/py-flake8@${PY_FLA=
VOR} \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}flake8-docstrings>=3D0:devel/py-flake8-docstrings@${=
PY_FLAVOR}
\
-=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}freezegun>=3D0:devel/py-freezegun@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>=3D0:devel/py-pytest@${PY_FLA=
VOR} \
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}pytest-mock>=3D0:devel/py-pytest-mock@${PY_FLAVOR} \
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}time-machine>=3D0:devel/py-time-machine@${PY_FLAVOR}=
\
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
${PYTHON_PKGNAMEPREFIX}sphinx>=3D0:textproc/py-sphinx@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}tox>=3D0:devel/py-tox@${PY_FLAVOR} \
- bash:shells/bash
+# ${PYTHON_PKGNAMEPREFIX}tox>=3D0:devel/py-tox@${PY_FLAVOR} \
+# bash:shells/bash
USES=3D cpe python shebangfix
USE_GITLAB=3D yes
@@ -43,16 +40,20 @@
GL_SITE=3D https://gitlab.torproject.org/tpo
GL_ACCOUNT=3D network-health
GL_PROJECT=3D sbws
-GL_TAGNAME=3D 30a2256098fad8e8aaa06e325274546b4aead552
+GL_TAGNAME=3D v2.2.0
+USE_RC_SUBR=3D sbws
+SUB_FILES=3D pkg-message
+
+#USERS=3D _sbws
+#GROUPS=3D _sbws
+
SHEBANG_FILES=3D 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=3D yes
@@ -60,13 +61,21 @@
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262759
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=3D 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 =3D 1693666331
-SHA256
(network-health-sbws-30a2256098fad8e8aaa06e325274546b4aead552_GL0.tar.gz) =
=3D
61aaade50cd99160109cbabb2fec540f8703c9e99d0cc1c0dc0192b7a132efb7
-SIZE (network-health-sbws-30a2256098fad8e8aaa06e325274546b4aead552_GL0.tar=
.gz)
=3D 4659885
+TIMESTAMP =3D 1772047854
+SHA256 (sbws-v2.2.0.tar.bz2) =3D
f5263faaa500aa169455e5c4437b09cee32db272833fea7d398aca71365944fd
+SIZE (sbws-v2.2.0.tar.bz2) =3D 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 prod=
uces
-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.
--=20
You are receiving this mail because:
You are the assignee for the bug.=