Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libtorrent-rasterbar/files/, net-libs/libtorrent-rasterbar/
Date: Thu, 22 Feb 2018 21:49:06
Message-Id: 1519336121.57d52572cbe8d2586523a66b0f6bbc6254f7edc0.asturm@gentoo
1 commit: 57d52572cbe8d2586523a66b0f6bbc6254f7edc0
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 22 21:47:44 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 22 21:48:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d52572
7
8 net-libs/libtorrent-rasterbar: Cleanup vulnerable
9
10 Closes: https://bugs.gentoo.org/623152
11
12 net-libs/libtorrent-rasterbar/Manifest | 1 -
13 ...rent-rasterbar-1.0.11-boost-config-header.patch | 31 ----
14 ...libtorrent-rasterbar-1.0.11-fix-abicompat.patch | 157 ---------------------
15 .../libtorrent-rasterbar-1.0.11-fix-test_ssl.patch | 21 ---
16 .../libtorrent-rasterbar-1.0.11-move-header.patch | 34 -----
17 ...orrent-rasterbar-1.0.9-test_torrent_parse.patch | 41 ------
18 .../libtorrent-rasterbar-1.0.11-r1.ebuild | 117 ---------------
19 7 files changed, 402 deletions(-)
20
21 diff --git a/net-libs/libtorrent-rasterbar/Manifest b/net-libs/libtorrent-rasterbar/Manifest
22 index 0bcb190e818..38db164ee52 100644
23 --- a/net-libs/libtorrent-rasterbar/Manifest
24 +++ b/net-libs/libtorrent-rasterbar/Manifest
25 @@ -1,2 +1 @@
26 -DIST libtorrent-rasterbar-1.0.11.tar.gz 3325786 BLAKE2B ef49c3242f520e222da2724385a41944fb752f09eab45fe60588df999d69832a82ed6b7b7494a0bf303cd6f05b28679f4d7776e6dd66e41cd22b1038f3391800 SHA512 770d16b241174ae4b121af9b2ac7bcde8b14c6ed99352b827b760a3cbdc2c0ebd0d505319762897720c5f72acdff506ee9948ac1140e6d4591805eca5439b184
27 DIST libtorrent-rasterbar-1.1.5.tar.gz 3942894 BLAKE2B 0a1102e1b74049c1f5d8980363a6b92a3378339349609d64d3b7a38a58baf6c2898a26f70e92b0de0d6a1f4b6725a576a850aacaa5764fe7d96fa0b541dfa2d7 SHA512 d0e7fe944c8a396aaf79ce80c7513be07a855bc8a9eee3bca46ed83d5e190aaa5ea4dc9a8a7208e27e18ae8f15733e6e34eabd375f0bde43d4dc4607840782e7
28
29 diff --git a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-boost-config-header.patch b/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-boost-config-header.patch
30 deleted file mode 100644
31 index f3a81c381d8..00000000000
32 --- a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-boost-config-header.patch
33 +++ /dev/null
34 @@ -1,31 +0,0 @@
35 -commit 7eb3cf6bc6dbada3fa7bb7ff4d5981182813a0e2
36 -Author: arvidn <arvid@××××××.se>
37 -Date: Tue Jul 11 23:16:50 2017 -0700
38 -
39 - use the official boost.config header
40 -
41 -diff --git a/include/libtorrent/export.hpp b/include/libtorrent/export.hpp
42 -index 87536af2a..503afe27a 100644
43 ---- a/include/libtorrent/export.hpp
44 -+++ b/include/libtorrent/export.hpp
45 -@@ -33,19 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
46 - #ifndef TORRENT_EXPORT_HPP_INCLUDED
47 - #define TORRENT_EXPORT_HPP_INCLUDED
48 -
49 --#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG)
50 --# include <boost/config/select_compiler_config.hpp>
51 --#endif
52 --#ifdef BOOST_COMPILER_CONFIG
53 --# include BOOST_COMPILER_CONFIG
54 --#endif
55 --
56 --#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG)
57 --# include <boost/config/select_platform_config.hpp>
58 --#endif
59 --#ifdef BOOST_PLATFORM_CONFIG
60 --# include BOOST_PLATFORM_CONFIG
61 --#endif
62 -+#include <boost/config.hpp>
63 -
64 - // backwards compatibility with older versions of boost
65 - #if !defined BOOST_SYMBOL_EXPORT && !defined BOOST_SYMBOL_IMPORT
66
67 diff --git a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-abicompat.patch b/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-abicompat.patch
68 deleted file mode 100644
69 index eebee122551..00000000000
70 --- a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-abicompat.patch
71 +++ /dev/null
72 @@ -1,157 +0,0 @@
73 -From 76381835be19da2f8f1fc501445e31d32e6d83e4 Mon Sep 17 00:00:00 2001
74 -From: Arvid Norberg <arvid.norberg@×××××.com>
75 -Date: Sun, 12 Feb 2017 21:05:22 -0500
76 -Subject: [PATCH] fix ABI compatibility issue introduced with preformatted
77 - entry type (#1702)
78 -
79 -fix ABI compatibility issue introduced with preformatted entry type
80 ----
81 - ChangeLog | 2 ++
82 - bindings/python/src/create_torrent.cpp | 2 +-
83 - include/libtorrent/create_torrent.hpp | 6 ++++++
84 - src/create_torrent.cpp | 31 ++++++++++++++++++++++++++++---
85 - src/torrent.cpp | 11 ++++++++---
86 - test/test_create_torrent.cpp | 2 +-
87 - 6 files changed, 46 insertions(+), 8 deletions(-)
88 -
89 -diff --git a/ChangeLog b/ChangeLog
90 -index 9b501ce..9defe7c 100644
91 ---- a/ChangeLog
92 -+++ b/ChangeLog
93 -@@ -1,3 +1,5 @@
94 -+ * fix ABI compatibility issue introduced with preformatted entry type
95 -+
96 - 1.0.11 release
97 -
98 - * updating super seeding would include the torrent in state_update_alert
99 -diff --git a/bindings/python/src/create_torrent.cpp b/bindings/python/src/create_torrent.cpp
100 -index 55b6b51..31abb07 100644
101 ---- a/bindings/python/src/create_torrent.cpp
102 -+++ b/bindings/python/src/create_torrent.cpp
103 -@@ -127,7 +127,7 @@ void bind_create_torrent()
104 -
105 - class_<create_torrent>("create_torrent", no_init)
106 - .def(init<file_storage&>())
107 -- .def(init<torrent_info const&>(arg("ti")))
108 -+ .def(init<torrent_info const&, int>((arg("ti"), arg("version") = LIBTORRENT_VERSION_NUM)))
109 - .def(init<file_storage&, int, int, int>((arg("storage"), arg("piece_size") = 0
110 - , arg("pad_file_limit") = -1, arg("flags") = int(libtorrent::create_torrent::optimize))))
111 -
112 -diff --git a/include/libtorrent/create_torrent.hpp b/include/libtorrent/create_torrent.hpp
113 -index 05dc6ca..d55e86a 100644
114 ---- a/include/libtorrent/create_torrent.hpp
115 -+++ b/include/libtorrent/create_torrent.hpp
116 -@@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
117 - #include "libtorrent/utf8.hpp"
118 - #include "libtorrent/allocator.hpp"
119 - #include "libtorrent/file.hpp" // for combine_path etc.
120 -+#include "libtorrent/version.hpp"
121 -
122 - #include <vector>
123 - #include <string>
124 -@@ -171,9 +172,12 @@ namespace libtorrent
125 - // ``alignment`` is used when pad files are enabled. This is the size
126 - // eligible files are aligned to. The default is -1, which means the
127 - // piece size of the torrent.
128 -+ // The ``use_preformatted`` parameter can be set to true to preserve
129 -+ // invalid encoding of the .torrent file.
130 - create_torrent(file_storage& fs, int piece_size = 0
131 - , int pad_file_limit = -1, int flags = optimize, int alignment = -1);
132 - create_torrent(torrent_info const& ti);
133 -+ create_torrent(torrent_info const& ti, bool use_preformatted);
134 -
135 - // internal
136 - ~create_torrent();
137 -@@ -290,6 +294,8 @@ namespace libtorrent
138 -
139 - private:
140 -
141 -+ void load_from_torrent_info(torrent_info const& ti, bool const use_preformatted);
142 -+
143 - file_storage& m_files;
144 - // if m_info_dict is initialized, it is
145 - // used instead of m_files to generate
146 -diff --git a/src/create_torrent.cpp b/src/create_torrent.cpp
147 -index df4c759..aab5574 100644
148 ---- a/src/create_torrent.cpp
149 -+++ b/src/create_torrent.cpp
150 -@@ -330,6 +330,24 @@ namespace libtorrent
151 - , m_include_symlinks(false)
152 - , m_calculate_file_hashes(false)
153 - {
154 -+ load_from_torrent_info(ti, false);
155 -+ }
156 -+
157 -+ create_torrent::create_torrent(torrent_info const& ti, bool const use_preformatted)
158 -+ : m_files(const_cast<file_storage&>(ti.files()))
159 -+ , m_creation_date(time(0))
160 -+ , m_multifile(ti.num_files() > 1)
161 -+ , m_private(ti.priv())
162 -+ , m_merkle_torrent(ti.is_merkle_torrent())
163 -+ , m_include_mtime(false)
164 -+ , m_include_symlinks(false)
165 -+ , m_calculate_file_hashes(false)
166 -+ {
167 -+ load_from_torrent_info(ti, use_preformatted);
168 -+ }
169 -+
170 -+ void create_torrent::load_from_torrent_info(torrent_info const& ti, bool const use_preformatted)
171 -+ {
172 - TORRENT_ASSERT(ti.is_valid());
173 - if (!ti.is_valid()) return;
174 -
175 -@@ -361,9 +379,16 @@ namespace libtorrent
176 - m_piece_hash.resize(m_files.num_pieces());
177 - for (int i = 0; i < num_pieces(); ++i) set_hash(i, ti.hash_for_piece(i));
178 -
179 -- boost::shared_array<char> const info = ti.metadata();
180 -- int const size = ti.metadata_size();
181 -- m_info_dict.preformatted().assign(&info[0], &info[0] + size);
182 -+ if (use_preformatted)
183 -+ {
184 -+ boost::shared_array<char> const info = ti.metadata();
185 -+ int const size = ti.metadata_size();
186 -+ m_info_dict.preformatted().assign(&info[0], &info[0] + size);
187 -+ }
188 -+ else
189 -+ {
190 -+ m_info_dict = bdecode(&ti.metadata()[0], &ti.metadata()[0] + ti.metadata_size());
191 -+ }
192 - m_info_hash = ti.info_hash();
193 - }
194 -
195 -diff --git a/src/torrent.cpp b/src/torrent.cpp
196 -index 75f0cc7..ef05dfd 100644
197 ---- a/src/torrent.cpp
198 -+++ b/src/torrent.cpp
199 -@@ -5601,9 +5601,14 @@ namespace libtorrent
200 - {
201 - if (m_magnet_link || (m_save_resume_flags & torrent_handle::save_info_dict))
202 - {
203 -- boost::shared_array<char> const info = torrent_file().metadata();
204 -- int const size = torrent_file().metadata_size();
205 -- ret["info"].preformatted().assign(&info[0], &info[0] + size);
206 -+ ret["info"] = bdecode(&torrent_file().metadata()[0]
207 -+ , &torrent_file().metadata()[0] + torrent_file().metadata_size());
208 -+// TODO: re-enable this code once there's a non-inlined encoder function. Or
209 -+// perhaps this should not be used until saving resume_data via
210 -+// add_torrent_params and a free function, similar to read_resume_data
211 -+// boost::shared_array<char> const info = torrent_file().metadata();
212 -+// int const size = torrent_file().metadata_size();
213 -+// ret["info"].preformatted().assign(&info[0], &info[0] + size);
214 - }
215 - }
216 -
217 -diff --git a/test/test_create_torrent.cpp b/test/test_create_torrent.cpp
218 -index 0a87c08..33fd3e8 100644
219 ---- a/test/test_create_torrent.cpp
220 -+++ b/test/test_create_torrent.cpp
221 -@@ -51,7 +51,7 @@ int test_main()
222 -
223 - lt::torrent_info info(test_torrent, sizeof(test_torrent) - 1);
224 -
225 -- lt::create_torrent t(info);
226 -+ lt::create_torrent t(info, true);
227 -
228 - std::vector<char> buffer;
229 - lt::bencode(std::back_inserter(buffer), t.generate());
230
231 diff --git a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-test_ssl.patch b/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-test_ssl.patch
232 deleted file mode 100644
233 index 2add42c7dd2..00000000000
234 --- a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-fix-test_ssl.patch
235 +++ /dev/null
236 @@ -1,21 +0,0 @@
237 -From 7f060e4a70b21974bcf154cf1a93c7b68c5a9aa8 Mon Sep 17 00:00:00 2001
238 -From: Alden Torres <aldenml@×××××.com>
239 -Date: Sat, 8 Oct 2016 01:12:15 -0400
240 -Subject: [PATCH] fix openssl compilation with boost 1.62 (#1193)
241 -
242 ----
243 - test/test_ssl.cpp | 1 -
244 - 1 file changed, 1 deletion(-)
245 -
246 -diff --git a/test/test_ssl.cpp b/test/test_ssl.cpp
247 -index 659973c..5aa6b15 100644
248 ---- a/test/test_ssl.cpp
249 -+++ b/test/test_ssl.cpp
250 -@@ -47,7 +47,6 @@ POSSIBILITY OF SUCH DAMAGE.
251 - #include <boost/asio/connect.hpp>
252 -
253 - #ifdef TORRENT_USE_OPENSSL
254 --#include <boost/asio/ssl/error.hpp> // for asio::error::get_ssl_category()
255 - #include <boost/asio/ssl.hpp>
256 -
257 - using namespace libtorrent;
258
259 diff --git a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-move-header.patch b/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-move-header.patch
260 deleted file mode 100644
261 index 589998b7fb3..00000000000
262 --- a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.11-move-header.patch
263 +++ /dev/null
264 @@ -1,34 +0,0 @@
265 -From ecd20f15cb3fa5a0ebabd647b1f57f3cd62cb4b7 Mon Sep 17 00:00:00 2001
266 -From: sledgehammer_999 <hammered999@×××××.com>
267 -Date: Mon, 20 Feb 2017 01:22:27 +0200
268 -Subject: [PATCH] Move include into implementation instead(from #1702).
269 -
270 ----
271 - bindings/python/src/create_torrent.cpp | 1 +
272 - include/libtorrent/create_torrent.hpp | 1 -
273 - 2 files changed, 1 insertion(+), 1 deletion(-)
274 -
275 -diff --git a/bindings/python/src/create_torrent.cpp b/bindings/python/src/create_torrent.cpp
276 -index 31abb07..e856d85 100644
277 ---- a/bindings/python/src/create_torrent.cpp
278 -+++ b/bindings/python/src/create_torrent.cpp
279 -@@ -6,6 +6,7 @@
280 - #include <libtorrent/create_torrent.hpp>
281 - #include <libtorrent/file_storage.hpp>
282 - #include "libtorrent/intrusive_ptr_base.hpp"
283 -+#include <libtorrent/version.hpp>
284 - #include "bytes.hpp"
285 -
286 - using namespace boost::python;
287 -diff --git a/include/libtorrent/create_torrent.hpp b/include/libtorrent/create_torrent.hpp
288 -index d55e86a..8d2c680 100644
289 ---- a/include/libtorrent/create_torrent.hpp
290 -+++ b/include/libtorrent/create_torrent.hpp
291 -@@ -42,7 +42,6 @@ POSSIBILITY OF SUCH DAMAGE.
292 - #include "libtorrent/utf8.hpp"
293 - #include "libtorrent/allocator.hpp"
294 - #include "libtorrent/file.hpp" // for combine_path etc.
295 --#include "libtorrent/version.hpp"
296 -
297 - #include <vector>
298 - #include <string>
299
300 diff --git a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.9-test_torrent_parse.patch b/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.9-test_torrent_parse.patch
301 deleted file mode 100644
302 index 658c0aa5715..00000000000
303 --- a/net-libs/libtorrent-rasterbar/files/libtorrent-rasterbar-1.0.9-test_torrent_parse.patch
304 +++ /dev/null
305 @@ -1,41 +0,0 @@
306 -From bdd91e29225b44a1a13e670dc4cecfb58f241d28 Mon Sep 17 00:00:00 2001
307 -From: Davide Pesavento <pesa@g.o>
308 -Date: Sun, 7 Aug 2016 12:14:57 +0200
309 -Subject: [PATCH] Disable failing torrent_parse tests
310 -
311 -For unknown reasons, some test torrents are missing from the tarball.
312 -Skip the corresponding test cases to avoid spurious failures.
313 ----
314 - test/test_torrent_parse.cpp | 5 -----
315 - 1 file changed, 5 deletions(-)
316 -
317 -diff --git a/test/test_torrent_parse.cpp b/test/test_torrent_parse.cpp
318 -index 663f341..2de6fb5 100644
319 ---- a/test/test_torrent_parse.cpp
320 -+++ b/test/test_torrent_parse.cpp
321 -@@ -49,13 +49,10 @@ using namespace libtorrent;
322 - test_torrent_t test_torrents[] =
323 - {
324 - { "base.torrent" },
325 -- { "empty_path.torrent" },
326 - { "parent_path.torrent" },
327 - { "hidden_parent_path.torrent" },
328 - { "single_multi_file.torrent" },
329 - { "slash_path.torrent" },
330 -- { "slash_path2.torrent" },
331 -- { "slash_path3.torrent" },
332 - { "backslash_path.torrent" },
333 - { "url_list.torrent" },
334 - { "url_list2.torrent" },
335 -@@ -75,8 +72,6 @@ test_torrent_t test_torrents[] =
336 - { "root_hash.torrent" },
337 - { "empty_path_multi.torrent" },
338 - { "duplicate_web_seeds.torrent" },
339 -- { "invalid_name3.torrent" },
340 -- { "symlink1.torrent" },
341 - };
342 -
343 - struct test_failing_torrent_t
344 ---
345 -2.9.2
346 -
347
348 diff --git a/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.0.11-r1.ebuild b/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.0.11-r1.ebuild
349 deleted file mode 100644
350 index 77e5c5b9b40..00000000000
351 --- a/net-libs/libtorrent-rasterbar/libtorrent-rasterbar-1.0.11-r1.ebuild
352 +++ /dev/null
353 @@ -1,117 +0,0 @@
354 -# Copyright 1999-2018 Gentoo Foundation
355 -# Distributed under the terms of the GNU General Public License v2
356 -
357 -EAPI=6
358 -
359 -PYTHON_COMPAT=( python2_7 python3_{4,5} )
360 -PYTHON_REQ_USE="threads"
361 -DISTUTILS_OPTIONAL=true
362 -DISTUTILS_IN_SOURCE_BUILD=true
363 -
364 -inherit distutils-r1 versionator
365 -
366 -MY_PV=$(replace_all_version_separators _)
367 -
368 -DESCRIPTION="C++ BitTorrent implementation focusing on efficiency and scalability"
369 -HOMEPAGE="http://libtorrent.org"
370 -SRC_URI="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MY_PV}/${P}.tar.gz"
371 -
372 -LICENSE="BSD"
373 -SLOT="0/8"
374 -KEYWORDS="amd64 arm ppc ppc64 ~sparc x86 ~x86-fbsd"
375 -IUSE="debug +dht doc examples +geoip libressl python +ssl static-libs test"
376 -
377 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
378 -
379 -COMMON_DEPEND="
380 - dev-libs/boost:=[threads]
381 - virtual/libiconv
382 - geoip? ( dev-libs/geoip )
383 - python? (
384 - ${PYTHON_DEPS}
385 - dev-libs/boost:=[python,${PYTHON_USEDEP}]
386 - )
387 - ssl? (
388 - !libressl? ( dev-libs/openssl:0= )
389 - libressl? ( dev-libs/libressl:= )
390 - )
391 -"
392 -DEPEND="${COMMON_DEPEND}
393 - sys-devel/libtool
394 -"
395 -RDEPEND="${COMMON_DEPEND}
396 - examples? ( !net-p2p/mldonkey )
397 -"
398 -
399 -PATCHES=(
400 - "${FILESDIR}/${PN}-1.0.9-test_torrent_parse.patch"
401 - # RC_1_0 branch
402 - "${FILESDIR}/${P}-fix-abicompat.patch"
403 - "${FILESDIR}/${P}-move-header.patch"
404 - # master branch
405 - "${FILESDIR}/${P}-fix-test_ssl.patch"
406 - "${FILESDIR}/${P}-boost-config-header.patch"
407 -)
408 -
409 -src_prepare() {
410 - default
411 -
412 - # bug 578026
413 - # prepend -L${S}/... to ensure bindings link against the lib we just built
414 - sed -i -e "s|^|-L${S}/src/.libs |" bindings/python/compile_flags.in || die
415 -
416 - use python && distutils-r1_src_prepare
417 -}
418 -
419 -src_configure() {
420 - local myeconfargs=(
421 - $(use_enable debug)
422 - $(use_enable debug logging)
423 - $(use_enable debug statistics)
424 - $(use_enable debug disk-stats)
425 - $(use_enable dht dht $(usex debug logging yes))
426 - $(use_enable examples)
427 - $(use_enable geoip)
428 - $(use_with geoip libgeoip)
429 - $(use_enable ssl encryption)
430 - $(use_enable static-libs static)
431 - $(use_enable test tests)
432 - --with-libiconv
433 - )
434 - econf "${myeconfargs[@]}"
435 -
436 - if use python; then
437 - myeconfargs+=(
438 - --enable-python-binding
439 - --with-boost-python
440 - )
441 - python_configure() {
442 - econf "${myeconfargs[@]}"
443 - }
444 - distutils-r1_src_configure
445 - fi
446 -}
447 -
448 -src_compile() {
449 - default
450 -
451 - python_compile() {
452 - cd "${BUILD_DIR}/../bindings/python" || die
453 - distutils-r1_python_compile
454 - }
455 - use python && distutils-r1_src_compile
456 -}
457 -
458 -src_install() {
459 - use doc && HTML_DOCS+=( "${S}"/docs )
460 -
461 - default
462 -
463 - python_install() {
464 - cd "${BUILD_DIR}/../bindings/python" || die
465 - distutils-r1_python_install
466 - }
467 - use python && distutils-r1_src_install
468 -
469 - find "${D}" -name '*.la' -delete || die
470 -}