From: "Anthony J. Bentley" Subject: UPDATE: net/rtorrent, net/libtorrent To: ports@openbsd.org Date: Sat, 13 Jun 2026 17:12:28 -0600 Hi, Here's an update to the latest stable versions of libtorrent and rtorrent. We had been patching libtorrent because it would fail to start due to IPv4-mapped IPv6. I think I've heard reports somewhere that our patches were broken for IPv6 users. Regardless, the old patches no longer apply, and rtorrent no longer fails at startup without them, so maybe the situation has improved upstream. I'm unable to test on IPv6, but it works for me on IPv4. The version currently in ports has performance issues, it has been consistently using 100% cpu at idle on my machines; this version behaves better. So I plan to commit this update to -stable as well. blob - be90f9ebf601193a5c40b816ff910aed29e092d8 blob + deb229840d58cc176a5f5774df1ee416ab40387d --- net/libtorrent/Makefile +++ net/libtorrent/Makefile @@ -3,9 +3,9 @@ COMMENT= BitTorrent library written in C++ BROKEN-hppa = undefined references to __sync atomic ops BROKEN-sh = undefined references to __sync atomic ops -DISTNAME= libtorrent-0.15.7 +DISTNAME= libtorrent-0.16.11 EPOCH= 0 -SHARED_LIBS += torrent 23.0 # .18.0 +SHARED_LIBS += torrent 24.0 # .18.0 CATEGORIES= net devel HOMEPAGE= https://rakshasa.github.io/rtorrent/ @@ -16,9 +16,12 @@ PERMIT_PACKAGE= Yes SITES= https://github.com/rakshasa/rtorrent-archive/raw/master/ WANTLIB += ${COMPILER_LIBCXX} crypto execinfo m z +WANTLIB += curl nghttp2 nghttp3 ngtcp2 ngtcp2_crypto_libressl ssl COMPILER = base-clang ports-gcc base-gcc +LIB_DEPENDS = net/curl + CONFIGURE_STYLE = gnu CONFIGURE_ARGS = --disable-debug \ --disable-instrumentation \ blob - a4485fa092e3172ddd9a30b11bfd3734b7660421 blob + 2516d2feff96a16a99297067e76b2a67621cea0b --- net/libtorrent/distinfo +++ net/libtorrent/distinfo @@ -1,2 +1,2 @@ -SHA256 (libtorrent-0.15.7.tar.gz) = Oy7ctbicKjFq9WIwNHnn4UxmwZ/tT4rnlPk4NJnM7Qc= -SIZE (libtorrent-0.15.7.tar.gz) = 872380 +SHA256 (libtorrent-0.16.11.tar.gz) = YgsokpcujJ1HbJld1S2Cy+hvNnM6485dl+LKf8KE3qE= +SIZE (libtorrent-0.16.11.tar.gz) = 901667 blob - f4c97f3222dd7a1f4b7eb0bef0739a2b99635571 (mode 644) blob + /dev/null --- net/libtorrent/patches/patch-src_net_socket_fd_cc +++ /dev/null @@ -1,48 +0,0 @@ -Index: src/net/socket_fd.cc ---- src/net/socket_fd.cc.orig -+++ src/net/socket_fd.cc -@@ -89,40 +89,14 @@ SocketFd::get_error() const { - - bool - SocketFd::open_stream() { -- m_fd = socket(rak::socket_address::pf_inet6, SOCK_STREAM, IPPROTO_TCP); -- -- if (m_fd == -1) { -- m_ipv6_socket = false; -- return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; -- } -- -- m_ipv6_socket = true; -- -- if (!set_ipv6_v6only(false)) { -- close(); -- return false; -- } -- -- return true; -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; - } - - bool - SocketFd::open_datagram() { -- m_fd = socket(rak::socket_address::pf_inet6, SOCK_DGRAM, 0); -- -- if (m_fd == -1) { -- m_ipv6_socket = false; -- return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; -- } -- -- m_ipv6_socket = true; -- -- if (!set_ipv6_v6only(false)) { -- close(); -- return false; -- } -- -- return true; -+ m_ipv6_socket = false; -+ return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; - } - - bool blob - 38412f6631c20a8c97fd58477f7908ca8ef636aa (mode 644) blob + /dev/null --- net/libtorrent/patches/patch-src_torrent_net_socket_address_key_h +++ /dev/null @@ -1,11 +0,0 @@ -Index: src/torrent/net/socket_address_key.h ---- src/torrent/net/socket_address_key.h.orig -+++ src/torrent/net/socket_address_key.h -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - // Unique key for the socket address, excluding port numbers, etc. - blob - 6d0d30a36a92eb5e4f8ab06be6db0f5cd0c50c21 blob + 48f7a788e43fc82dc34f0089433fc5b0015c0d07 --- net/libtorrent/pkg/PLIST +++ net/libtorrent/pkg/PLIST @@ -28,16 +28,18 @@ include/torrent/error.h include/torrent/event.h include/torrent/exceptions.h include/torrent/hash_string.h -include/torrent/http.h include/torrent/net/ include/torrent/net/address_info.h +include/torrent/net/connection_state.h include/torrent/net/fd.h +include/torrent/net/http_get.h +include/torrent/net/http_stack.h +include/torrent/net/network_config.h +include/torrent/net/poll.h include/torrent/net/resolver.h include/torrent/net/socket_address.h include/torrent/net/socket_address_key.h -include/torrent/net/socket_event.h include/torrent/net/types.h -include/torrent/net/utils.h include/torrent/object.h include/torrent/object_raw_bencode.h include/torrent/object_static_map.h @@ -51,8 +53,12 @@ include/torrent/peer/connection_list.h include/torrent/peer/peer.h include/torrent/peer/peer_info.h include/torrent/peer/peer_list.h -include/torrent/poll.h include/torrent/rate.h +include/torrent/runtime/ +include/torrent/runtime/network_manager.h +include/torrent/runtime/socket_manager.h +include/torrent/system/ +include/torrent/system/thread.h include/torrent/throttle.h include/torrent/torrent.h include/torrent/tracker/ @@ -65,6 +71,7 @@ include/torrent/utils/ include/torrent/utils/chrono.h include/torrent/utils/directory_events.h include/torrent/utils/extents.h +include/torrent/utils/file_stat.h include/torrent/utils/log.h include/torrent/utils/log_buffer.h include/torrent/utils/option_strings.h @@ -73,7 +80,8 @@ include/torrent/utils/ranges.h include/torrent/utils/resume.h include/torrent/utils/scheduler.h include/torrent/utils/signal_bitfield.h -include/torrent/utils/thread.h +include/torrent/utils/string_manip.h +include/torrent/utils/unordered_vector.h include/torrent/utils/uri_parser.h @static-lib lib/libtorrent.a lib/libtorrent.la blob - 6ba1cf00823920109246923648efaab470068735 blob + 5834334d6937453c30a79d58e2ad3d612ffcf6bd --- net/rtorrent/Makefile +++ net/rtorrent/Makefile @@ -1,8 +1,7 @@ COMMENT = ncurses BitTorrent client based on libTorrent -DISTNAME = rtorrent-0.15.7 +DISTNAME = rtorrent-0.16.11 CATEGORIES = net -REVISION = 0 HOMEPAGE = https://rakshasa.github.io/rtorrent/ blob - 68602c4857bbaf07a66b34a616809a0a02b140c6 blob + dbebe4aa3d8f3c6d50d644891ff65aff921da5d7 --- net/rtorrent/distinfo +++ net/rtorrent/distinfo @@ -1,2 +1,2 @@ -SHA256 (rtorrent-0.15.7.tar.gz) = 9fOCs0Ds21gSNmU5JKXzfrZeEn30FeecdKYyYUbWpfg= -SIZE (rtorrent-0.15.7.tar.gz) = 866976 +SHA256 (rtorrent-0.16.11.tar.gz) = vtL+/WmgHb6VoCszDdjCV9Gq4rTuK6SpxIWdovpAT2U= +SIZE (rtorrent-0.16.11.tar.gz) = 858663 blob - 3068da7825d078e95164d9ff9bce2aee223a677f blob + eee96acd5ac57fdb74c328773afd181cf27afc6e --- net/rtorrent/patches/patch-test_Makefile_in +++ net/rtorrent/patches/patch-test_Makefile_in @@ -1,7 +1,7 @@ Index: test/Makefile.in --- test/Makefile.in.orig +++ test/Makefile.in -@@ -674,9 +674,9 @@ rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \ +@@ -673,9 +673,9 @@ rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \ src/test_command_dynamic.h rtorrent_Test_Rpc_CXXFLAGS = $(CPPUNIT_CFLAGS) blob - 3d632229dd052c353de8d34a4ba865e645b561f9 blob + da04cb75f9b4eb7e40c25b1e8412f6dd14432dac --- net/rtorrent/pkg/PLIST +++ net/rtorrent/pkg/PLIST @@ -3,3 +3,6 @@ share/doc/pkg-readmes/${PKGSTEM} share/doc/rtorrent/ share/examples/rtorrent/ share/examples/rtorrent/rtorrent.rc +share/rtorrent/ +share/rtorrent/lua/ +share/rtorrent/lua/rtorrent.lua