On 2021/09/21 00:06, Theo Buehler wrote:
> On Mon, Sep 20, 2021 at 10:01:48PM +0100, Stuart Henderson wrote:
> > On 2021/09/20 22:33, Solene Rapenne wrote:
> > > Upon start, onionshare-gui crashes with the following message.
> > > I suppose it's totally broken in its current state.
> > > 
> > > I'm not even sure the cli tool onionshare works at all, I always
> > > get the message "Onionshare could not connect to tor in the background:
> > > dictionary keys changed during iteration" while Tor is running and
> > > working fine, so net/onionshare may be broken too at this time.
> > > 
> > > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to 
> > > '/tmp/runtime-solene'
> > > Traceback (most recent call last):
> > >   File 
> > > "/usr/local/lib/python3.8/site-packages/onionshare_gui/onionshare_gui.py",
> > >  line 317, in open_settings
> > >     d = SettingsDialog(self.common, self.onion, self.qtapp, self.config, 
> > > self.local_only)
> > >   File 
> > > "/usr/local/lib/python3.8/site-packages/onionshare_gui/settings_dialog.py",
> > >  line 478, in __init__
> > >     self.reload_settings()
> > >   File 
> > > "/usr/local/lib/python3.8/site-packages/onionshare_gui/settings_dialog.py",
> > >  line 597, in reload_settings
> > >     if self.onion.supports_v3_onions:
> > > AttributeError: 'Onion' object has no attribute 'supports_v3_onions'
> > > Abort trap (core dumped) 
> > > 
> > 
> > It looks like that problem was fixed in newer versions, unfortunately
> > they moved to mainly snap/flatpak for distribution and it's not an
> > entirely straightforward update
> > 
> > Probably a bit late to fix for 7.0
> > 
> 
> Would it be acceptable to work around it and add the missing attribute?
> At least the diff makes the crash on startup go away. (I don't use tor,
> so I can't check this in a real-life scenario)
> 
> The check for setting this variable on a working connection is this:
> 'self.supports_v3_onions = self.tor_version >= Version('0.3.5.7')'
> It should be true most of the time.
> 
> If this is set, the settings dialog allows a checkbox to enable legacy
> v2 onions to be toggled instead of selecting it by default. If it is set
> to true, it uses Ed25519 instead of RSA1024. This will just not work
> with legacy onions. I don't think any harm can come from that.

Looks like the problem is entirely down to py-stem which is incompatible
with Python 3.8. This update fixes it (change to py3-only while there
because the py2 version is unused, and it removes some mess from the port)

net/nyx also uses py-stem. It doesn't work with the update, but it
didn't work before either.

Index: devel/quirks/Makefile
===================================================================
RCS file: /cvs/ports/devel/quirks/Makefile,v
retrieving revision 1.1299
diff -u -p -r1.1299 Makefile
--- devel/quirks/Makefile       14 Sep 2021 10:40:30 -0000      1.1299
+++ devel/quirks/Makefile       21 Sep 2021 09:08:22 -0000
@@ -5,7 +5,7 @@ CATEGORIES =    devel databases
 DISTFILES =
 
 # API.rev
-PKGNAME =      quirks-4.52
+PKGNAME =      quirks-4.53
 PKG_ARCH =     *
 MAINTAINER =   Marc Espie <es...@openbsd.org>
 
Index: devel/quirks/files/Quirks.pm
===================================================================
RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v
retrieving revision 1.1315
diff -u -p -r1.1315 Quirks.pm
--- devel/quirks/files/Quirks.pm        14 Sep 2021 10:40:30 -0000      1.1315
+++ devel/quirks/files/Quirks.pm        21 Sep 2021 09:08:22 -0000
@@ -495,6 +495,7 @@ my $stem_extensions = {
        'py-PyNaCl' => 'py3-PyNaCl',
        'py-websocket-client' => 'py3-websocket-client',
        'libmesode' => 'libstrophe',
+       'py-stem' => 'py3-stem',
 };
 
 my $obsolete_reason = {};
Index: net/py-stem/Makefile
===================================================================
RCS file: /cvs/ports/net/py-stem/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- net/py-stem/Makefile        19 Feb 2021 23:13:05 -0000      1.8
+++ net/py-stem/Makefile        21 Sep 2021 09:08:22 -0000
@@ -2,14 +2,9 @@
 
 COMMENT =              Tor controller library
 
-MODPY_EGG_VERSION =    1.7.1
-V =                    ${MODPY_EGG_VERSION:S/b//}
+MODPY_EGG_VERSION =    1.8.0
 DISTNAME =             stem-${MODPY_EGG_VERSION}
-PKGNAME =              py-stem-${V}
-WRKDIST =              ${WRKDIR}/stem-${V}
-REVISION =             2
-
-SUBST_VARS +=          V
+PKGNAME =              py-${DISTNAME}
 
 CATEGORIES =           net
 
@@ -21,14 +16,11 @@ MAINTAINER =                Pascal Stumpf <pascal@stum
 PERMIT_PACKAGE =       Yes
 
 FLAVORS =              python3
-FLAVOR ?=
+FLAVOR =               python3
 
 MODULES =              lang/python
 MODPY_PI =             Yes
 
 NO_TEST =              Yes
-
-post-install:
-       mv ${PREFIX}/bin/tor-prompt{,${MODPY_BIN_SUFFIX}}
 
 .include <bsd.port.mk>
Index: net/py-stem/distinfo
===================================================================
RCS file: /cvs/ports/net/py-stem/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- net/py-stem/distinfo        26 Dec 2018 23:23:09 -0000      1.3
+++ net/py-stem/distinfo        21 Sep 2021 09:08:22 -0000
@@ -1,2 +1,2 @@
-SHA256 (stem-1.7.1.tar.gz) = yerzEWy2DBWZXL097DpcvFDpu24GLE1tQiAeVm9JjKI=
-SIZE (stem-1.7.1.tar.gz) = 2196854
+SHA256 (stem-1.8.0.tar.gz) = oLSOpiJOlfIqo0wLw0FfDrRmfd6uPfteMqaSDBhVaMI=
+SIZE (stem-1.8.0.tar.gz) = 2853802
Index: net/py-stem/pkg/PFRAG.no-python3
===================================================================
RCS file: net/py-stem/pkg/PFRAG.no-python3
diff -N net/py-stem/pkg/PFRAG.no-python3
--- net/py-stem/pkg/PFRAG.no-python3    12 Nov 2017 20:04:12 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-@comment $OpenBSD: PFRAG.no-python3,v 1.1.1.1 2017/11/12 20:04:12 danj Exp $
-@pkgpath net/stem
Index: net/py-stem/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/py-stem/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- net/py-stem/pkg/PLIST       19 Feb 2021 23:13:05 -0000      1.3
+++ net/py-stem/pkg/PLIST       21 Sep 2021 09:08:22 -0000
@@ -1,8 +1,9 @@
 @comment $OpenBSD: PLIST,v 1.3 2021/02/19 23:13:05 sthen Exp $
 @conflict py-stem-<1.7.1p2
 @conflict stem-*
-!%%python3%%
-bin/tor-prompt${MODPY_BIN_SUFFIX}
+@pkgpath net/stem
+@pkgpath net/py-stem
+bin/tor-prompt
 lib/python${MODPY_VERSION}/site-packages/stem/
 
lib/python${MODPY_VERSION}/site-packages/stem-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
 lib/python${MODPY_VERSION}/site-packages/stem/__init__.py
@@ -33,9 +34,12 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/stem/descriptor/__init__.py
 
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}/
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}bandwidth_file.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}certificate.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}collector.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}export.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}extrainfo_descriptor.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}hidden_service.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}hidden_service_descriptor.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}microdescriptor.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}networkstatus.${MODPY_PYC_MAGIC_TAG}pyc
@@ -44,9 +48,12 @@ lib/python${MODPY_VERSION}/site-packages
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}router_status_entry.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}server_descriptor.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/${MODPY_PYCACHE}tordnsel.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/bandwidth_file.py
 lib/python${MODPY_VERSION}/site-packages/stem/descriptor/certificate.py
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/collector.py
 lib/python${MODPY_VERSION}/site-packages/stem/descriptor/export.py
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/extrainfo_descriptor.py
+lib/python${MODPY_VERSION}/site-packages/stem/descriptor/hidden_service.py
 
lib/python${MODPY_VERSION}/site-packages/stem/descriptor/hidden_service_descriptor.py
 lib/python${MODPY_VERSION}/site-packages/stem/descriptor/microdescriptor.py
 lib/python${MODPY_VERSION}/site-packages/stem/descriptor/networkstatus.py
@@ -99,6 +106,7 @@ ${MODPY_COMMENT}lib/python${MODPY_VERSIO
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}conf.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}connection.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}ed25519.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}enum.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}log.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}lru_cache.${MODPY_PYC_MAGIC_TAG}pyc
@@ -111,6 +119,7 @@ lib/python${MODPY_VERSION}/site-packages
 
lib/python${MODPY_VERSION}/site-packages/stem/util/${MODPY_PYCACHE}tor_tools.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/stem/util/conf.py
 lib/python${MODPY_VERSION}/site-packages/stem/util/connection.py
+lib/python${MODPY_VERSION}/site-packages/stem/util/ed25519.py
 lib/python${MODPY_VERSION}/site-packages/stem/util/enum.py
 lib/python${MODPY_VERSION}/site-packages/stem/util/log.py
 lib/python${MODPY_VERSION}/site-packages/stem/util/lru_cache.py

Reply via email to