Hello community,

here is the log from the commit of package libtorrent-rasterbar for 
openSUSE:Factory checked in at 2016-07-20 09:19:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libtorrent-rasterbar (Old)
 and      /work/SRC/openSUSE:Factory/.libtorrent-rasterbar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libtorrent-rasterbar"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/libtorrent-rasterbar/libtorrent-rasterbar.changes    
    2016-07-05 09:52:12.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.libtorrent-rasterbar.new/libtorrent-rasterbar.changes
   2016-07-20 09:19:36.000000000 +0200
@@ -1,0 +2,11 @@
+Sun Jul 17 20:34:17 UTC 2016 - [email protected]
+
+- Add a bcond to enable tests build (disabled by default).
+- Add libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch: fix Deluge
+  crashing when IP filters are used without patching Deluge
+  (commit 66e5994) (boo#978600).
+- Add libtorrent-rasterbar-1.1.0-python-fixes.patch from upstream:
+  fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f,
+  42c6376) (boo#988986).
+
+-------------------------------------------------------------------

New:
----
  libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch
  libtorrent-rasterbar-1.1.0-python-fixes.patch

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

Other differences:
------------------
++++++ libtorrent-rasterbar.spec ++++++
--- /var/tmp/diff_new_pack.xB28oC/_old  2016-07-20 09:19:38.000000000 +0200
+++ /var/tmp/diff_new_pack.xB28oC/_new  2016-07-20 09:19:38.000000000 +0200
@@ -20,6 +20,7 @@
 %define sover   9
 %define _version 1_1
 %bcond_with examples
+%bcond_with tests
 Name:           libtorrent-rasterbar
 Version:        1.1.0
 Release:        0
@@ -30,8 +31,12 @@
 Source:         
https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch -- 
Remove -msse4.2 flag (commit 680eddf).
 Patch0:         %{name}-1.1.0-remove-x86-only-flag.patch
+# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch 
boo#978600 -- Fix crash in session::get_ip_filter when not having set one 
(commit 66e5994).
+Patch1:         %{name}-1.1.0-fix-get-ip-filter.patch
+# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-python-fixes.patch boo#988986 
-- Fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f, 42c6376).
+Patch2:         %{name}-1.1.0-python-fixes.patch
 # PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-fix-invalid-input-crash.patch 
boo#983228 -- Fix crash on invalid input in http_parser (commit 3624ce6).
-Patch1:         %{name}-1.1.0-fix-invalid-input-crash.patch
+Patch3:         %{name}-1.1.0-fix-invalid-input-crash.patch
 BuildRequires:  boost-devel >= 1.54
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
@@ -102,7 +107,7 @@
 Summary:        Libtorrent is a C++ implementation of the BitTorrent protocol
 Group:          Development/Libraries/C and C++
 Requires:       %{name}%{sover} = %{version}
-Requires:       boost-devel >= 1.36
+Requires:       boost-devel >= 1.54
 Requires:       gcc-c++
 Requires:       pkgconfig
 Requires:       pkgconfig(openssl)
@@ -131,17 +136,19 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing"
 export CXXFLAGS="$CFLAGS"
 %if 0%{?suse_version} <= 1320
 export CXXFLAGS="$CXXFLAGS -std=c++11"
-%endif
 %ifarch aarch64
 # Some architectures require explicit linkage to libboost_atomic on boost 1.55 
and older.
 export LIBS="$LIBS -lboost_atomic"
 %endif
+%endif
 
 %global _configure ../configure
 %if 0%{?suse_version} > 1320
@@ -155,6 +162,9 @@
     %configure \
       --disable-static          \
       --disable-silent-rules    \
+%if %{with tests}
+      --enable-tests                     \
+%endif
 %if %{with examples}
       --enable-examples         \
 %endif
@@ -182,6 +192,14 @@
   %{buildroot}%{_bindir}/{parse_request_log,rss_reader,upnp_test,utp_test}
 %endif
 
+%if %{with tests}
+%check
+make check %{?_smp_mflags} -C build-python
+%if 0%{?suse_version} > 1320
+make check %{?_smp_mflags} -C build-python3
+%endif
+%endif
+
 %post -n %{name}%{sover} -p /sbin/ldconfig
 
 %postun -n %{name}%{sover} -p /sbin/ldconfig

++++++ libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch ++++++
--- a/src/session_impl.cpp
+++ b/src/session_impl.cpp
@@ -1237,6 +1237,7 @@ namespace aux {
        ip_filter const& session_impl::get_ip_filter()
        {
                TORRENT_ASSERT(is_single_thread());
+               if (!m_ip_filter) m_ip_filter = boost::make_shared<ip_filter>();
                return *m_ip_filter;
        }
 
--- a/test/test_ip_filter.cpp
+++ b/test/test_ip_filter.cpp
@@ -89,6 +89,18 @@ void test_rules_invariant(std::vector<ip
        }
 }
 
+TORRENT_TEST(session_get_ip_filter)
+{
+       using namespace libtorrent;
+       session ses;
+       ip_filter const& ipf = ses.get_ip_filter();
+#if TORRENT_USE_IPV6
+       TEST_EQUAL(boost::get<0>(ipf.export_filter()).size(), 1);
+#else
+       TEST_EQUAL(ipf.export_filter().size(), 1);
+#endif
+}
+
 TORRENT_TEST(ip_filter)
 {
        using namespace libtorrent;
++++++ libtorrent-rasterbar-1.1.0-python-fixes.patch ++++++
--- a/bindings/python/src/session.cpp
+++ b/bindings/python/src/session.cpp
@@ -106,7 +106,7 @@ namespace
                        std::string key = extract<std::string>(iterkeys[i]);
 
                        int sett = setting_by_name(key);
-                       if (sett == 0) continue;
+                       if (sett < 0) continue;
 
                        TORRENT_TRY
                        {
@@ -810,7 +810,7 @@ void bind_session()
 #ifndef TORRENT_NO_DEPRECATE
         .def("add_feed", &add_feed)
         .def("status", allow_threads(&lt::session::status))
-        .def("settings", &session_get_settings)
+        .def("settings", &lt::session::settings)
         .def("set_settings", &session_set_settings)
 #endif
         .def("get_settings", &session_get_settings)
--- a/bindings/python/src/torrent_handle.cpp
+++ b/bindings/python/src/torrent_handle.cpp
@@ -193,9 +193,9 @@ void dict_to_announce_entry(dict d, anno
    if (d.has_key("source"))
       ae.source = extract<int>(d["source"]);
    if (d.has_key("verified"))
-      ae.verified = extract<int>(d["verified"]);
+      ae.verified = extract<bool>(d["verified"]);
    if (d.has_key("send_stats"))
-      ae.send_stats = extract<int>(d["send_stats"]);
+      ae.send_stats = extract<bool>(d["send_stats"]);
 }
 
 void replace_trackers(torrent_handle& h, object trackers)
--- a/bindings/python/src/torrent_info.cpp
+++ b/bindings/python/src/torrent_info.cpp
@@ -113,10 +113,10 @@ namespace
 
     int get_tier(announce_entry const& ae) { return ae.tier; }
     void set_tier(announce_entry& ae, int v) { ae.tier = v; }
-    bool get_fail_limit(announce_entry const& ae) { return ae.fail_limit; }
+    int get_fail_limit(announce_entry const& ae) { return ae.fail_limit; }
     void set_fail_limit(announce_entry& ae, int l) { ae.fail_limit = l; }
-    bool get_fails(announce_entry const& ae) { return ae.fails; }
-    bool get_source(announce_entry const& ae) { return ae.source; }
+    int get_fails(announce_entry const& ae) { return ae.fails; }
+    int get_source(announce_entry const& ae) { return ae.source; }
     bool get_verified(announce_entry const& ae) { return ae.verified; }
     bool get_updating(announce_entry const& ae) { return ae.updating; }
     bool get_start_sent(announce_entry const& ae) { return ae.start_sent; }

Reply via email to