forked from pool/libtorrent-rasterbar
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=67
This commit is contained in:
committed by
Git OBS Bridge
parent
ac9e7a3f5d
commit
a12286ed13
31
libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch
Normal file
31
libtorrent-rasterbar-1.1.0-fix-get-ip-filter.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
--- 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;
|
@@ -1,10 +0,0 @@
|
||||
--- 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;
|
||||
}
|
||||
|
@@ -1,9 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 15 13:02:12 UTC 2016 - sor.alexei@meowr.ru
|
||||
Sun Jul 17 20:34:17 UTC 2016 - sor.alexei@meowr.ru
|
||||
|
||||
- Add libtorrent-rasterbar-fix-get-ip-filter.patch: fix Deluge
|
||||
- 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
|
||||
(boo#978600).
|
||||
(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).
|
||||
|
@@ -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
|
||||
@@ -28,12 +29,12 @@ License: BSD-3-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://libtorrent.org/
|
||||
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE libtorrent-rasterbar-fix-get-ip-filter.patch boo#978600 -- Don't crash when get_ip_filter is used before a default value is set.
|
||||
Patch0: %{name}-fix-get-ip-filter.patch
|
||||
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.0-remove-x86-only-flag.patch -- Remove -msse4.2 flag (commit 680eddf).
|
||||
Patch1: %{name}-1.1.0-remove-x86-only-flag.patch
|
||||
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: libtorrent-rasterbar-1.1.0-python-fixes.patch
|
||||
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).
|
||||
Patch3: %{name}-1.1.0-fix-invalid-input-crash.patch
|
||||
BuildRequires: boost-devel >= 1.54
|
||||
@@ -161,6 +162,9 @@ for py in python; do
|
||||
%configure \
|
||||
--disable-static \
|
||||
--disable-silent-rules \
|
||||
%if %{with tests}
|
||||
--enable-tests \
|
||||
%endif
|
||||
%if %{with examples}
|
||||
--enable-examples \
|
||||
%endif
|
||||
@@ -188,6 +192,14 @@ rm -v %{buildroot}%{_bindir}/{client_test,connection_tester,enum_if} \
|
||||
%{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
|
||||
|
Reference in New Issue
Block a user