Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libtorrent for openSUSE:Factory 
checked in at 2025-03-31 11:42:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libtorrent (Old)
 and      /work/SRC/openSUSE:Factory/.libtorrent.new.2696 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libtorrent"

Mon Mar 31 11:42:35 2025 rev:17 rq:1265385 version:0.15.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libtorrent/libtorrent.changes    2025-01-05 
15:29:01.672262679 +0100
+++ /work/SRC/openSUSE:Factory/.libtorrent.new.2696/libtorrent.changes  
2025-03-31 11:43:48.913740497 +0200
@@ -1,0 +2,9 @@
+Fri Mar 28 20:41:18 UTC 2025 - Jan Engelhardt <[email protected]>
+
+- Update to release 0.15.2
+  * preparation for multi-threaded trackers
+  * added a thread-safe DNS resolver
+- Add 0001-0.15.2-Missing-header-algorithm.patch,
+  0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch
+
+-------------------------------------------------------------------

Old:
----
  libtorrent-0.15.1.tar.gz

New:
----
  0001-0.15.2-Missing-header-algorithm.patch
  0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch
  libtorrent-0.15.2.tar.gz

BETA DEBUG BEGIN:
  New:  * added a thread-safe DNS resolver
- Add 0001-0.15.2-Missing-header-algorithm.patch,
  0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch
  New:- Add 0001-0.15.2-Missing-header-algorithm.patch,
  0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libtorrent.spec ++++++
--- /var/tmp/diff_new_pack.kO5Gal/_old  2025-03-31 11:43:50.049787638 +0200
+++ /var/tmp/diff_new_pack.kO5Gal/_new  2025-03-31 11:43:50.081788965 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libtorrent
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,25 @@
 #
 
 
+#common.m4 depends on a bashism in <=0.15.2
+%define _buildshell /bin/sh
+%define lname  libtorrent24
 Name:           libtorrent
-%define lname  libtorrent23
-Version:        0.15.1
+Version:        0.15.2
 Release:        0
 Summary:        A BitTorrent library written in C++
 License:        SUSE-GPL-2.0+-with-openssl-exception
 Group:          Productivity/Networking/File-Sharing
 URL:            https://github.com/rakshasa/libtorrent
-
 Source:         
https://github.com/rakshasa/rtorrent/releases/download/v%version/libtorrent-%version.tar.gz
+Patch1:         0001-0.15.2-Missing-header-algorithm.patch
+Patch2:         0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch
 BuildRequires:  automake
+%if 0%{?suse_version} && 0%{?suse_version} < 1600
+BuildRequires:  gcc13-c++
+%else
 BuildRequires:  gcc-c++
+%endif
 BuildRequires:  libtool
 BuildRequires:  pkgconfig(cppunit)
 BuildRequires:  pkgconfig(openssl)
@@ -61,9 +68,11 @@
 %autosetup -p1
 
 %build
+%if 0%{?suse_version} && 0%{?suse_version} < 1600
+export CXX=g++-13
+%endif
 export CFLAGS="%optflags -fno-strict-aliasing"
 export CXXFLAGS="$CFLAGS"
-export CXXFLAGS="$CXXFLAGS -std=gnu++14"
 autoreconf -fiv
 %configure --enable-ipv6 --with-posix-fallocate
 %make_build

++++++ 0001-0.15.2-Missing-header-algorithm.patch ++++++
>From 67cc72ba73c6b3dfa5b133715d5c7a52e6db2ff4 Mon Sep 17 00:00:00 2001
From: Nicolas PARLANT <[email protected]>
Date: Fri, 28 Mar 2025 20:43:26 +0000
Subject: [PATCH] 0.15.2: Missing header <algorithm>
References: https://github.com/rakshasa/libtorrent/pull/337

>utils/directory_events.cc:118:40: error: no member named 'find_if' in 
>namespace 'std'; did you mean '__find_if'?
>  118 |     wd_list::const_iterator itr = std::find_if(m_wd_list.begin(), 
> m_wd_list.end(),
>      |                                   ~~~~~^~~~~~~
>      |                                        __find_if

Signed-off-by: Nicolas PARLANT <[email protected]>
---
 src/torrent/utils/directory_events.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/torrent/utils/directory_events.cc 
b/src/torrent/utils/directory_events.cc
index 524fdd3e..a0998683 100644
--- a/src/torrent/utils/directory_events.cc
+++ b/src/torrent/utils/directory_events.cc
@@ -5,6 +5,7 @@
 #include <string>
 #include <errno.h>
 #include <unistd.h>
+#include <algorithm>
 
 #ifdef HAVE_INOTIFY
 #include <sys/inotify.h>
-- 
2.49.0


++++++ 0002-Fixed-DhtController-m_router-check-and-log-unit-test.patch ++++++
>From 01fc34516ef9fcff3cffc9d224c6870a8eb7eff6 Mon Sep 17 00:00:00 2001
From: rakshasa <[email protected]>
Date: Sat, 29 Mar 2025 07:32:25 +0100
Subject: [PATCH 2/2] Fixed DhtController::m_router check and log unit tests.

---
 src/torrent/tracker/dht_controller.cc | 16 +++++++++--
 src/torrent/utils/log.cc              | 26 +++++++++---------
 src/torrent/utils/log_buffer.h        |  8 +++---
 test/Makefile.am                      |  3 +++
 test/helpers/progress_listener.cc     |  2 ++
 test/helpers/test_fixture.cc          | 38 ++++++++++++++-------------
 test/torrent/utils/test_log.cc        | 12 ++++-----
 test/torrent/utils/test_log_buffer.cc |  2 +-
 8 files changed, 63 insertions(+), 44 deletions(-)

diff --git a/src/torrent/tracker/dht_controller.cc 
b/src/torrent/tracker/dht_controller.cc
index 2d0afcf6..c43e1dd7 100644
--- a/src/torrent/tracker/dht_controller.cc
+++ b/src/torrent/tracker/dht_controller.cc
@@ -101,13 +101,13 @@ DhtController::set_receive_requests(bool state) {
 
 void
 DhtController::add_node(const sockaddr* sa, int port) {
-  if (!m_router)
+  if (m_router)
     m_router->contact(sa, port);
 }
 
 void
 DhtController::add_node(const std::string& host, int port) {
-  if (!m_router)
+  if (m_router)
     m_router->add_contact(host, port);
 }
 
@@ -121,11 +121,17 @@ DhtController::store_cache(Object* container) {
 
 DhtController::statistics_type
 DhtController::get_statistics() const {
+  if (!m_router)
+    throw internal_error("DhtController::get_statistics called but DHT not 
initialized.");
+
   return m_router->get_statistics();
 }
 
 void
 DhtController::reset_statistics() {
+  if (!m_router)
+    throw internal_error("DhtController::reset_statistics called but DHT not 
initialized.");
+
   m_router->reset_statistics();
 }
 
@@ -133,6 +139,9 @@ DhtController::reset_statistics() {
 
 void
 DhtController::set_upload_throttle(Throttle* t) {
+  if (!m_router)
+    throw internal_error("DhtController::set_upload_throttle() called but DHT 
not initialized.");
+
   if (m_router->is_active())
     throw internal_error("DhtController::set_upload_throttle() called while 
DHT server active.");
 
@@ -141,6 +150,9 @@ DhtController::set_upload_throttle(Throttle* t) {
 
 void
 DhtController::set_download_throttle(Throttle* t) {
+  if (!m_router)
+    throw internal_error("DhtController::set_download_throttle() called but 
DHT not initialized.");
+
   if (m_router->is_active())
     throw internal_error("DhtController::set_download_throttle() called while 
DHT server active.");
 
diff --git a/src/torrent/utils/log.cc b/src/torrent/utils/log.cc
index a587cdfe..1c7a4362 100644
--- a/src/torrent/utils/log.cc
+++ b/src/torrent/utils/log.cc
@@ -45,12 +45,12 @@ struct log_gz_output {
   gzFile gz_file;
 };
 
-typedef std::vector<log_cache_entry>                   log_cache_list;
-typedef std::vector<std::pair<int, int> >              log_child_list;
-typedef std::vector<log_slot>                          log_slot_list;
-typedef std::vector<std::pair<std::string, log_slot> > log_output_list;
+typedef std::vector<log_cache_entry>                  log_cache_list;
+typedef std::vector<std::pair<int, int>>              log_child_list;
+typedef std::vector<log_slot>                         log_slot_list;
+typedef std::vector<std::pair<std::string, log_slot>> log_output_list;
 
-log_output_list log_outputs;
+log_output_list log_outputs LIBTORRENT_EXPORT;
 log_child_list  log_children;
 log_cache_list  log_cache;
 log_group_list  log_groups;
@@ -105,10 +105,10 @@ log_rebuild_cache() {
       continue;
     }
 
-    log_cache_list::iterator cache_itr = 
+    log_cache_list::iterator cache_itr =
       std::find_if(log_cache.begin(), log_cache.end(),
                    std::bind(&log_cache_entry::equal_outputs, 
std::placeholders::_1, use_outputs));
-    
+
     if (cache_itr == log_cache.end()) {
       cache_itr = log_cache.insert(log_cache.end(), log_cache_entry());
       cache_itr->outputs = use_outputs;
@@ -282,13 +282,11 @@ log_add_group_output(int group, const char* name) {
   log_output_list::iterator itr = log_find_output_name(name);
   size_t index = std::distance(log_outputs.begin(), itr);
 
-  if (itr == log_outputs.end()) {
-    throw input_error("Log name not found.");
-  }
+  if (itr == log_outputs.end())
+    throw input_error("Log name not found: '" + std::string(name) + "'");
 
-  if (index >= log_group::max_size_outputs()) {
+  if (index >= log_group::max_size_outputs())
     throw input_error("Cannot add more log group outputs.");
-  }
 
   log_groups[group].set_output_at(index, true);
   log_rebuild_cache();
@@ -346,7 +344,7 @@ log_gz_file_write(std::shared_ptr<log_gz_output>& outfile, 
const char* data, siz
     int buffer_length = snprintf(buffer, 64, GROUPFMT,
                                  cachedTime.seconds(),
                                  log_level_char[group % 6]);
-    
+
     if (buffer_length > 0)
       gzwrite(outfile->gz_file, buffer, buffer_length);
 
@@ -355,7 +353,7 @@ log_gz_file_write(std::shared_ptr<log_gz_output>& outfile, 
const char* data, siz
 
   } else if (group == -1) {
     gzwrite(outfile->gz_file, "---DUMP---\n", sizeof("---DUMP---\n") - 1);
-    
+
     if (length != 0)
       gzwrite(outfile->gz_file, data, length);
 
diff --git a/src/torrent/utils/log_buffer.h b/src/torrent/utils/log_buffer.h
index 025192c1..41f9d5ef 100644
--- a/src/torrent/utils/log_buffer.h
+++ b/src/torrent/utils/log_buffer.h
@@ -8,6 +8,8 @@
 #include <string>
 #include <utility>
 
+#include <torrent/common.h>
+
 namespace torrent {
 
 struct log_entry {
@@ -23,7 +25,7 @@ struct log_entry {
   std::string message;
 };
 
-class [[gnu::visibility("default")]] log_buffer : private 
std::deque<log_entry> {
+class LIBTORRENT_EXPORT log_buffer : private std::deque<log_entry> {
 public:
   typedef std::deque<log_entry>  base_type;
   typedef std::function<void ()> slot_void;
@@ -47,7 +49,7 @@ public:
       m_max_size(200) {}
 
   unsigned int        max_size() const { return m_max_size; }
-  
+
   // Always lock before calling any function.
   void                lock()   { m_lock.lock(); }
   void                unlock() { m_lock.unlock(); }
@@ -66,7 +68,7 @@ private:
 
 typedef std::unique_ptr<log_buffer, std::function<void (log_buffer*)>> 
log_buffer_ptr;
 
-[[gnu::visibility("default")]] log_buffer_ptr log_open_log_buffer(const char* 
name);
+log_buffer_ptr log_open_log_buffer(const char* name) LIBTORRENT_EXPORT;
 
 }
 
diff --git a/test/Makefile.am b/test/Makefile.am
index d0d98da9..87ae61d2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,6 +9,9 @@ TESTS = \
 
 check_PROGRAMS = $(TESTS)
 
+# This can cause duplicate symbols, so export anything that causes issues.
+
+# LibTorrent_Test_LDADD = ../src/libtorrent.la
 LibTorrent_Test_LDADD = \
        ../src/libtorrent.la \
        ../src/libtorrent_other.la \
diff --git a/test/helpers/progress_listener.cc 
b/test/helpers/progress_listener.cc
index 7a6ed047..e7f000fc 100644
--- a/test/helpers/progress_listener.cc
+++ b/test/helpers/progress_listener.cc
@@ -10,6 +10,8 @@
 #include "torrent/utils/log.h"
 #include "torrent/utils/log_buffer.h"
 
+#include <iostream>
+
 static std::string
 get_test_path(const test_list_type& tl) {
   if (tl.size() < 2)
diff --git a/test/helpers/test_fixture.cc b/test/helpers/test_fixture.cc
index 4d8d7214..3d766ea0 100644
--- a/test/helpers/test_fixture.cc
+++ b/test/helpers/test_fixture.cc
@@ -1,18 +1,20 @@
-#include "config.h"
-
-#include "test_fixture.h"
-
-#include "torrent/utils/log.h"
-
-void
-test_fixture::setUp() {
-  mock_init();
-
-  log_add_group_output(torrent::LOG_CONNECTION_BIND, "test_output");
-  log_add_group_output(torrent::LOG_CONNECTION_FD, "test_output");
-}
-
-void
-test_fixture::tearDown() {
-  mock_cleanup();
-}
+#include "config.h"
+
+#include "test_fixture.h"
+
+#include "torrent/utils/log.h"
+
+#include <iostream>
+
+void
+test_fixture::setUp() {
+  mock_init();
+
+  log_add_group_output(torrent::LOG_CONNECTION_BIND, "test_output");
+  log_add_group_output(torrent::LOG_CONNECTION_FD, "test_output");
+}
+
+void
+test_fixture::tearDown() {
+  mock_cleanup();
+}
diff --git a/test/torrent/utils/test_log.cc b/test/torrent/utils/test_log.cc
index 8ab8ed87..214866a8 100644
--- a/test/torrent/utils/test_log.cc
+++ b/test/torrent/utils/test_log.cc
@@ -9,8 +9,8 @@
 #include <functional>
 #include <iostream>
 
-#include <torrent/exceptions.h>
-#include <torrent/utils/log.h>
+#include "torrent/exceptions.h"
+#include "torrent/utils/log.h"
 
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test_log, "torrent/utils");
 
@@ -97,12 +97,12 @@ test_log::test_print() {
   open_output("test_print_1", 0x1);
   open_output("test_print_2", 0x2);
   torrent::log_add_group_output(0, "test_print_1");
-  
+
   LTUNIT_ASSERT_OUTPUT(0, 0x1, "foo_bar", "foo_bar");
   LTUNIT_ASSERT_OUTPUT(0, 0x1, "foo 123 bar", "foo %i %s", 123, "bar");
 
   torrent::log_add_group_output(0, "test_print_2");
-  
+
   LTUNIT_ASSERT_OUTPUT(0, 0x1|0x2, "test_multiple", "test_multiple");
 }
 
@@ -144,7 +144,7 @@ test_log::test_file_output() {
 
   torrent::log_open_file_output("test_file", filename.c_str());
   torrent::log_add_group_output(GROUP_PARENT_1, "test_file");
-  
+
   lt_log_print(GROUP_PARENT_1, "test_file");
 
   torrent::log_cleanup(); // To ensure we flush the buffers.
@@ -152,7 +152,7 @@ test_log::test_file_output() {
   std::ifstream temp_file(filename.c_str());
 
   CPPUNIT_ASSERT(temp_file.good());
-  
+
   char buffer[256];
   temp_file.getline(buffer, 256);
 
diff --git a/test/torrent/utils/test_log_buffer.cc 
b/test/torrent/utils/test_log_buffer.cc
index 58412750..60732273 100644
--- a/test/torrent/utils/test_log_buffer.cc
+++ b/test/torrent/utils/test_log_buffer.cc
@@ -3,7 +3,7 @@
 #include "test_log_buffer.h"
 
 #include "globals.h"
-#include <torrent/utils/log_buffer.h>
+#include "torrent/utils/log_buffer.h"
 
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test_log_buffer, "torrent/utils");
 
-- 
2.49.0


++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.kO5Gal/_old  2025-03-31 11:43:50.613811041 +0200
+++ /var/tmp/diff_new_pack.kO5Gal/_new  2025-03-31 11:43:50.645812370 +0200
@@ -1,5 +1,5 @@
-mtime: 1735818918
-commit: 792e2f431d839380f2b4cd13938971b3eb4a39719c59d2c8df4ea3506c89379d
+mtime: 1743243802
+commit: b7fe1c89e619fb42085bfe628670c1822ec8eb769767b0493d744a067d34a8ee
 url: https://src.opensuse.org/jengelh/libtorrent
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ libtorrent-0.15.1.tar.gz -> libtorrent-0.15.2.tar.gz ++++++
++++ 35067 lines of diff (skipped)

Reply via email to