On Fri, Oct 30, 2026, at 03:38 p.m. -0700, namn wrote: > Here is an inline update updating net/libtorrent and net/rtorrent both > to 0.16.27. > > changelogs from 0.16.25 to 0.16.27: > https://github.com/rakshasa/rtorrent/releases#release-v0.16.27 > > libtorrent: > - major bump because of removed symbol and data object sizes changes. > - make test patches get a little more complicated. tests work but I had to > patch a new file (test/data/test_file_list.cc) and sprinkle some more > ../src/.libs/libtorrent.a in test/Makefile.in > - plist: connection_state.h got removed and functional.h got added > > rtorrent: > - churn in rtorrent test patch > - new patch unbreaking a new test. freebsd also sees this. > report: https://github.com/rakshasa/rtorrent/issues/2082 > source: https://github.com/rakshasa/rtorrent/pull/2085
Here is a diff with the committed fix for this test. > > As sthen had suggested, I tried to upstream sprinkling libtorrent.a, but > I have not added the newest stuff from this diff yet: > https://github.com/rakshasa/libtorrent/pull/1007 > > Testing: > 0.16.25 added large-file support. configure: Enable large-file support > by @zippy2. I tested on an i386 vm and concluded that this was not > needed. Both i386 and amd64 report: "checking for cc option to enable > large file support... none needed". I was able to download a 5 GB file > on a devuan torrent. > > Regarding the net/rtorrent test case that broke with multicall, we don't > build XMLRPC (checking for XMLRPC-C... ignored) where it would likely be > used. Internally, I was able to still run some simple multicall commands > inside the client's ctrl-x: > d.multicall="main","d.start=" > d.multicall="main","d.stop=" > d.multicall="main","d.close=" > > for more details see: > https://rtorrent-docs.readthedocs.io/en/latest/scripting.html#multicall-demystified > > Downloading and seeding devuan and ubuntu torrents worked. There is the > usual stutter when seeding or checksumming. Feedback and tests are > welcome. OK? Index: libtorrent/Makefile =================================================================== RCS file: /cvs/ports/net/libtorrent/Makefile,v diff -u -p -r1.75 Makefile --- libtorrent/Makefile 30 Sep 2026 20:27:21 -0000 1.75 +++ libtorrent/Makefile 31 Oct 2026 20:16:47 -0000 @@ -3,10 +3,10 @@ COMMENT= BitTorrent library written in BROKEN-hppa = undefined references to __sync atomic ops BROKEN-sh = undefined references to __sync atomic ops -V = 0.16.24 +V = 0.16.27 DISTNAME= libtorrent-$V EPOCH= 0 -SHARED_LIBS += torrent 26.0 # 52.0.0 +SHARED_LIBS += torrent 27.0 # 55.0 CATEGORIES= net devel HOMEPAGE= https://rakshasa.github.io/rtorrent/ Index: libtorrent/distinfo =================================================================== RCS file: /cvs/ports/net/libtorrent/distinfo,v diff -u -p -r1.25 distinfo --- libtorrent/distinfo 30 Sep 2026 20:27:21 -0000 1.25 +++ libtorrent/distinfo 31 Oct 2026 20:16:47 -0000 @@ -1,2 +1,2 @@ -SHA256 (libtorrent-0.16.24.tar.gz) = JKLE6EQpCtqxIIlW/EBDQ2YqxclSQfPRWscKkXL9Uls= -SIZE (libtorrent-0.16.24.tar.gz) = 943301 +SHA256 (libtorrent-0.16.27.tar.gz) = t+4/Y32m0Tb7cKRWb76o5ET3ouJZWW6GEq3rDHxSD9E= +SIZE (libtorrent-0.16.27.tar.gz) = 967041 Index: libtorrent/patches/patch-test_Makefile_in =================================================================== RCS file: /cvs/ports/net/libtorrent/patches/patch-test_Makefile_in,v diff -u -p -r1.9 patch-test_Makefile_in --- libtorrent/patches/patch-test_Makefile_in 30 Sep 2026 20:27:21 -0000 1.9 +++ libtorrent/patches/patch-test_Makefile_in 31 Oct 2026 20:16:47 -0000 @@ -3,7 +3,7 @@ link tests with static archive due to un Index: test/Makefile.in --- test/Makefile.in.orig +++ test/Makefile.in -@@ -140,9 +140,7 @@ am_LibTorrent_Test_OBJECTS = $(am__objects_1) \ +@@ -142,9 +142,7 @@ am_LibTorrent_Test_OBJECTS = $(am__objects_1) \ protocol/LibTorrent_Test-test_protocol_buffer.$(OBJEXT) \ protocol/LibTorrent_Test-test_request_list.$(OBJEXT) LibTorrent_Test_OBJECTS = $(am_LibTorrent_Test_OBJECTS) @@ -14,7 +14,18 @@ Index: test/Makefile.in AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -@@ -683,9 +681,7 @@ top_srcdir = @top_srcdir@ +@@ -216,9 +214,7 @@ am_LibTorrent_Test_Protocol_OBJECTS = $(am__objects_4) + ../src/utils/LibTorrent_Test_Protocol-fd_close_queue.$(OBJEXT) + LibTorrent_Test_Protocol_OBJECTS = \ + $(am_LibTorrent_Test_Protocol_OBJECTS) +-LibTorrent_Test_Protocol_DEPENDENCIES = ../src/libtorrent.la \ +- ../src/libtorrent_other.la \ +- ../src/torrent/libtorrent_torrent.la ++LibTorrent_Test_Protocol_DEPENDENCIES = ../src/.libs/libtorrent.a + LibTorrent_Test_Protocol_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(LibTorrent_Test_Protocol_CXXFLAGS) $(CXXFLAGS) \ +@@ -748,9 +744,7 @@ top_srcdir = @top_srcdir@ # LibTorrent_Test_LDADD = ../src/libtorrent.la LibTorrent_Test_LDADD = \ @@ -25,3 +36,14 @@ Index: test/Makefile.in LibTorrent_Test_Torrent_Net_LDADD = $(LibTorrent_Test_LDADD) LibTorrent_Test_Torrent_Runtime_LDADD = $(LibTorrent_Test_LDADD) +@@ -797,9 +791,7 @@ LibTorrent_Test_Protocol_SOURCES = $(LibTorrent_Test_C + ../src/utils/fd_close_queue.cc + + LibTorrent_Test_Protocol_LDADD = \ +- ../src/libtorrent.la \ +- ../src/libtorrent_other.la \ +- ../src/torrent/libtorrent_torrent.la ++ ../src/.libs/libtorrent.a + + LibTorrent_Test_Torrent_Net_SOURCES = $(LibTorrent_Test_Common) \ + torrent/net/test_address_info.cc \ Index: libtorrent/patches/patch-test_data_test_file_list_cc =================================================================== RCS file: libtorrent/patches/patch-test_data_test_file_list_cc diff -N libtorrent/patches/patch-test_data_test_file_list_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libtorrent/patches/patch-test_data_test_file_list_cc 31 Oct 2026 20:16:47 -0000 @@ -0,0 +1,23 @@ +duplicate symbol (stub and socket_file.cc) + +Index: test/data/test_file_list.cc +--- test/data/test_file_list.cc.orig ++++ test/data/test_file_list.cc +@@ -19,17 +19,6 @@ namespace torrent { + // in this test binary links those in, and initialize()'s guard throws + // before either would ever run, so a link-only stub is enough here. + Manager* manager = nullptr; +- +-MemoryChunk +-SocketFile::create_padding_chunk(uint32_t, int, int) { +- throw internal_error("stub SocketFile::create_padding_chunk() called"); +-} +- +-MemoryChunk +-SocketFile::create_chunk(uint64_t, uint32_t, int, int) const { +- throw internal_error("stub SocketFile::create_chunk() called"); +-} +- + } // namespace torrent + + namespace { Index: libtorrent/pkg/PLIST =================================================================== RCS file: /cvs/ports/net/libtorrent/pkg/PLIST,v diff -u -p -r1.19 PLIST --- libtorrent/pkg/PLIST 15 Aug 2026 09:55:48 -0000 1.19 +++ libtorrent/pkg/PLIST 31 Oct 2026 20:16:47 -0000 @@ -27,7 +27,6 @@ include/torrent/exceptions.h include/torrent/hash_string.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 @@ -81,6 +80,7 @@ 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/functional.h include/torrent/utils/log.h include/torrent/utils/log_buffer.h include/torrent/utils/option_strings.h Index: rtorrent/Makefile =================================================================== RCS file: /cvs/ports/net/rtorrent/Makefile,v diff -u -p -r1.81 Makefile --- rtorrent/Makefile 30 Sep 2026 20:22:30 -0000 1.81 +++ rtorrent/Makefile 31 Oct 2026 20:16:48 -0000 @@ -1,6 +1,6 @@ COMMENT = ncurses BitTorrent client based on libTorrent -V = 0.16.24 +V = 0.16.27 EPOCH = 0 DISTNAME = rtorrent-$V CATEGORIES = net Index: rtorrent/distinfo =================================================================== RCS file: /cvs/ports/net/rtorrent/distinfo,v diff -u -p -r1.25 distinfo --- rtorrent/distinfo 30 Sep 2026 20:22:30 -0000 1.25 +++ rtorrent/distinfo 31 Oct 2026 20:16:48 -0000 @@ -1,2 +1,2 @@ -SHA256 (rtorrent-0.16.24.tar.gz) = Jp2CBUvfOGIZRyLF4nvdwSq7UdRQRb9t8b1+46KDe6s= -SIZE (rtorrent-0.16.24.tar.gz) = 886723 +SHA256 (rtorrent-0.16.27.tar.gz) = ZF5eqGP+4sOg90W+YjWjfoDPfbage8gsox1Jv2XypSo= +SIZE (rtorrent-0.16.27.tar.gz) = 899609 Index: rtorrent/patches/patch-test_Makefile_in =================================================================== RCS file: /cvs/ports/net/rtorrent/patches/patch-test_Makefile_in,v diff -u -p -r1.11 patch-test_Makefile_in --- rtorrent/patches/patch-test_Makefile_in 30 Sep 2026 20:22:30 -0000 1.11 +++ rtorrent/patches/patch-test_Makefile_in 31 Oct 2026 20:16:48 -0000 @@ -1,7 +1,7 @@ Index: test/Makefile.in --- test/Makefile.in.orig +++ test/Makefile.in -@@ -743,11 +743,11 @@ rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \ +@@ -779,11 +779,11 @@ rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \ src/test_watch_ready_queue.h rtorrent_Test_Core_CXXFLAGS = $(CPPUNIT_CFLAGS) Index: rtorrent/patches/patch-test_core_test_view_cc =================================================================== RCS file: rtorrent/patches/patch-test_core_test_view_cc diff -N rtorrent/patches/patch-test_core_test_view_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ rtorrent/patches/patch-test_core_test_view_cc 31 Oct 2026 20:16:48 -0000 @@ -0,0 +1,108 @@ +commit b240e020f825a81bd1267ddf3c1cf50258ad2e00 (master, origin/master) +from: Ivan <[email protected]> +via: Jari Sundell <[email protected]> +date: Sat Oct 31 11:44:18 2026 UTC + + Do not assume libstdc++ in TestView::test_multicall_skips_moved_entries + + libc++ has moved all three entries out by the second comparison, so + count the ones left. + +Index: test/core/test_view.cc +--- test/core/test_view.cc.orig ++++ test/core/test_view.cc +@@ -49,6 +49,9 @@ std::function<void()> compare_action; + std::function<void(core::Download*)> added_action; + std::function<void(core::Download*)> removed_action; + ++// Runs from every comparator command, until cleared. ++std::function<void()> every_compare_action; ++ + core::Download* + new_download() { + torrent::Object info = torrent::Object::create_map(); +@@ -142,6 +145,9 @@ cmd_compare(rpc::target_type target, const torrent::Ob + if (compare_action) + std::exchange(compare_action, {})(); + ++ if (every_compare_action) ++ every_compare_action(); ++ + auto left = static_cast<core::Download*>(target.second); + auto right = static_cast<core::Download*>(target.third); + +@@ -220,6 +226,8 @@ TestView::setUp() { + + void + TestView::tearDown() { ++ every_compare_action = {}; ++ + control->core()->download_list()->clear(); + control->view_manager()->clear(); + +@@ -478,9 +486,10 @@ TestView::test_insert_stops_at_erased_download() { + CPPUNIT_ASSERT_EQUAL(size_t(0), list->size()); + } + +-// A comparator may read the view it sorts, while std::stable_sort holds one of +-// its entries outside and leaves a moved-from one in its place. The commands +-// that read a view skip that entry, also when no command would use it. ++// A comparator may read the view it sorts, while std::stable_sort holds some ++// of its entries outside and leaves moved-from ones in their place. The ++// commands that read a view skip those entries, also when no command would ++// use them. + void + TestView::test_multicall_skips_moved_entries() { + auto d0 = insert_download(); +@@ -491,35 +500,30 @@ TestView::test_multicall_skips_moved_entries() { + sort_rank = {{d0, 0}, {d1, 1}, {d2, 2}}; + matches_filter = {nullptr, d0, d1, d2}; + +- torrent::Object rows; +- torrent::Object filtered_rows; +- torrent::Object named_rows; +- torrent::Object hashes; ++ size_t comparisons = 0; ++ size_t wrong_counts = 0; + +- // The insertion sort moves d1 out after the first comparison returns false. +- compare_action = [&]() { +- compare_action = [&]() { +- auto args = torrent::Object::create_list(); +- args.as_list().push_back(std::string("test_view")); +- rows = rpc::call_command("d.multicall", args); ++ every_compare_action = [&]() { ++ comparisons++; + +- hashes = rpc::call_command("download_list", args); ++ size_t present = std::count_if(view->begin_visible(), view->end_visible(), [](const auto& d) { return d != nullptr; }); + +- args.as_list().push_back(command_object(filter_command)); +- filtered_rows = rpc::call_command("d.multicall.filtered", args); ++ auto args = torrent::Object::create_list(); ++ args.as_list().push_back(std::string("test_view")); ++ wrong_counts += rpc::call_command("d.multicall", args).as_list().size() != present; ++ wrong_counts += rpc::call_command("download_list", args).as_list().size() != present; + +- args.as_list().back() = command_object(name_command); +- named_rows = rpc::call_command("d.multicall.filtered", args); +- }; ++ args.as_list().push_back(command_object(filter_command)); ++ wrong_counts += rpc::call_command("d.multicall.filtered", args).as_list().size() != present; ++ ++ args.as_list().back() = command_object(name_command); ++ wrong_counts += rpc::call_command("d.multicall.filtered", args).as_list().size() != present; + }; + + view->set_sort_current(command_object(compare_command)); + view->sort(); + +- CPPUNIT_ASSERT(rows.is_list() && filtered_rows.is_list() && named_rows.is_list() && hashes.is_list()); +- CPPUNIT_ASSERT_EQUAL(size_t(2), rows.as_list().size()); +- CPPUNIT_ASSERT_EQUAL(size_t(2), filtered_rows.as_list().size()); +- CPPUNIT_ASSERT_EQUAL(size_t(2), named_rows.as_list().size()); +- CPPUNIT_ASSERT_EQUAL(size_t(2), hashes.as_list().size()); ++ CPPUNIT_ASSERT(comparisons > 0); ++ CPPUNIT_ASSERT_EQUAL(size_t{0}, wrong_counts); + CPPUNIT_ASSERT_EQUAL(std::string("d0,d1,d2"), describe_visible(*view)); + }
