+cc ports@ & maintainer
On 2022/04/14 21:11, [email protected] wrote:
> > 127.0.0.1 is probably the best thing to suggest
> > for listening to localhost.
> The thing is - I need it accessible from another machine over network.
> With `localhost` it DOES work over network,
> this is how I have used it for months.
> (With `127.0.0.1` it doesn't.)
>
> > For listening to connections from any v4 address use 0.0.0.0
> Thank you for this tip, it does work and I leave it set to `0.0.0.0`.
>
> > the ideal fix for qbittorrent-nox would be if it created
> > separate socket bindings, one for IPv4, one for IPv6.
> I can't help with that, hope someone will address it.
>
> > Java is a different situation
> My point is that `qbittorrent-nox` suffers either,
> even though the details may grossly differ.
> And `jdk` README has it described
> whereas `qbittorrent-nox` README has not.
This issue does affect various software in packages, it is a common
thing you need to deal with if you're using various software on OpenBSD.
It doesn't really feel right to me to mention it in a pkg-readme for
one specific package when it affects a wide range of them. Perhaps an
FAQ section might be a better idea.
In qbittorrent-nox case, Qt5's network socket listener, when told to
listen for connections to "Any" address, binds only a v6 socket. To
have it do something different, software using this API would need
to listen for "AnyIPv6" and/or "AnyIPv4" instead.
> I feel such intricacies would be welcome in the README.
> Again, my main question to openbsd-misc is:
> whom and how to contact if the maintainer seems not to reply?
Generally the ports@ mailing list is the best place for ports-specific
questions. Also if a maintainer is not responding to your mail, it is
possible that they did not receive it - if that's the case there is a
higher chance they'll see a re-post on ports@ than misc@ (ports devs
are more likely to read ports@ than misc@)
In this case perhaps the diff below might be the least surprising
approach i.e. have it listen to v4 by default. Maybe the pkg-readme
isn't needed any more then too.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent-nox/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 11 Mar 2022 19:47:15 -0000 1.9
+++ Makefile 14 Apr 2022 20:42:55 -0000
@@ -1,5 +1,6 @@
COMMENT = BitTorrent client with web interface
PKGNAME = qbittorrent-nox-${VER}
+REVISION = 0
WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Network Qt5Xml boost_system
WANTLIB += boost_system-mt c crypto execinfo m ssl torrent-rasterbar z
Index: patches/patch-src_base_bittorrent_tracker_cpp
===================================================================
RCS file: patches/patch-src_base_bittorrent_tracker_cpp
diff -N patches/patch-src_base_bittorrent_tracker_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_base_bittorrent_tracker_cpp 14 Apr 2022 20:42:55
-0000
@@ -0,0 +1,15 @@
+qt's "Any" listener binds the socket to AF_INET6 which doesn't accept v4
+connections on OpenBSD. Change this to "AnyIPv4".
+
+Index: src/base/bittorrent/tracker.cpp
+--- src/base/bittorrent/tracker.cpp.orig
++++ src/base/bittorrent/tracker.cpp
+@@ -199,7 +199,7 @@ Tracker::Tracker(QObject *parent)
+
+ bool Tracker::start()
+ {
+- const QHostAddress ip = QHostAddress::Any;
++ const QHostAddress ip = QHostAddress::AnyIPv4;
+ const int port = Preferences::instance()->getTrackerPort();
+
+ if (m_server->isListening())
Index: patches/patch-src_webui_webui_cpp
===================================================================
RCS file: patches/patch-src_webui_webui_cpp
diff -N patches/patch-src_webui_webui_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_webui_webui_cpp 14 Apr 2022 20:42:55 -0000
@@ -0,0 +1,16 @@
+qt's "Any" listener binds the socket to AF_INET6 which doesn't accept v4
+connections on OpenBSD. Change this to "AnyIPv4". If you specifically
+want v6 then set config to listen to :: instead
+
+Index: src/webui/webui.cpp
+--- src/webui/webui.cpp.orig
++++ src/webui/webui.cpp
+@@ -112,7 +112,7 @@ void WebUI::configure()
+ if (!m_httpServer->isListening())
+ {
+ const auto address = (serverAddressString == "*" ||
serverAddressString.isEmpty())
+- ? QHostAddress::Any : QHostAddress(serverAddressString);
++ ? QHostAddress::AnyIPv4 : QHostAddress(serverAddressString);
+ bool success = m_httpServer->listen(address, m_port);
+ if (success)
+ {