From b8f41fb80392ae856571278a03362889064e16b034c76f62a79d89fda01b2bd0 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Fri, 15 Jul 2016 17:26:15 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=65 --- libtorrent-rasterbar-1.1.0-python-fixes.patch | 50 +++++++++++++++++++ libtorrent-rasterbar.changes | 7 +++ libtorrent-rasterbar.spec | 11 ++-- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 libtorrent-rasterbar-1.1.0-python-fixes.patch diff --git a/libtorrent-rasterbar-1.1.0-python-fixes.patch b/libtorrent-rasterbar-1.1.0-python-fixes.patch new file mode 100644 index 0000000..4be5cac --- /dev/null +++ b/libtorrent-rasterbar-1.1.0-python-fixes.patch @@ -0,0 +1,50 @@ +--- a/bindings/python/src/session.cpp ++++ b/bindings/python/src/session.cpp +@@ -106,7 +106,7 @@ namespace + std::string key = extract(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(<::session::status)) +- .def("settings", &session_get_settings) ++ .def("settings", <::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(d["source"]); + if (d.has_key("verified")) +- ae.verified = extract(d["verified"]); ++ ae.verified = extract(d["verified"]); + if (d.has_key("send_stats")) +- ae.send_stats = extract(d["send_stats"]); ++ ae.send_stats = extract(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; } diff --git a/libtorrent-rasterbar.changes b/libtorrent-rasterbar.changes index f7edd29..632dee4 100644 --- a/libtorrent-rasterbar.changes +++ b/libtorrent-rasterbar.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jul 15 13:02:12 UTC 2016 - sor.alexei@meowr.ru + +- Add libtorrent-rasterbar-1.1.0-python-fixes.patch from upstream: + fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f, + 42c6376) (boo#988986). + ------------------------------------------------------------------- Sun Jul 3 16:21:16 UTC 2016 - sor.alexei@meowr.ru diff --git a/libtorrent-rasterbar.spec b/libtorrent-rasterbar.spec index aa17376..4ded4fd 100644 --- a/libtorrent-rasterbar.spec +++ b/libtorrent-rasterbar.spec @@ -30,8 +30,10 @@ Url: http://libtorrent.org/ 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-python-fixes.patch boo#988986 -- Fixes for Python bindings (commits e4fd45e, 80710ab, f01ac8f, 42c6376). +Patch1: %{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 +Patch2: %{name}-1.1.0-fix-invalid-input-crash.patch BuildRequires: boost-devel >= 1.54 BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -131,6 +133,7 @@ Documentation for the libtorrent-rasterbar package. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -153,10 +156,10 @@ for py in python; do pushd "build-$py" export PYTHON="$py" %configure \ - --disable-static \ - --disable-silent-rules \ + --disable-static \ + --disable-silent-rules \ %if %{with examples} - --enable-examples \ + --enable-examples \ %endif --with-boost-python="libboost_$py" \ --enable-python-binding