[packages/libtorrent] - updated to 0.13.8
adamg
adamg at pld-linux.org
Tue Aug 27 16:10:00 CEST 2019
commit 9eb6269f5bada95ef70734ad2de3385870939386
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Tue Aug 27 16:09:53 2019 +0200
- updated to 0.13.8
libtorrent-bencoded-error.patch | 18 -------
libtorrent.spec | 15 ++----
openssl.patch | 105 ----------------------------------------
3 files changed, 4 insertions(+), 134 deletions(-)
---
diff --git a/libtorrent.spec b/libtorrent.spec
index 038e710..0b31eb3 100644
--- a/libtorrent.spec
+++ b/libtorrent.spec
@@ -7,17 +7,15 @@ Summary: LibTorrent - a BitTorrent library written in C++ for Unix
Summary(pl.UTF-8): LibTorrent - biblioteka BitTorrenta napisana w C++ dla Uniksa
Name: libtorrent
# keep stable line, see URL below
-Version: 0.13.7
-Release: 2
+Version: 0.13.8
+Release: 1
Epoch: 1
License: GPL v2+
Group: Libraries
Source0: http://rtorrent.net/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: fe34521cd440910b7ad4e1720a1ff5e0
+# Source0-md5: ca02e624fde0d704780085987010f99a
Patch0: %{name}-client_list.patch
Patch1: %{name}-build.patch
-Patch2: libtorrent-bencoded-error.patch
-Patch3: openssl.patch
URL: https://github.com/rakshasa/rtorrent/wiki
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -79,11 +77,6 @@ fi
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-
-# force refresh
-%{__rm} scripts/{libtool,lt*}.m4
%build
%{__libtoolize}
@@ -118,7 +111,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc AUTHORS README
%attr(755,root,root) %{_libdir}/libtorrent.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libtorrent.so.20
+%attr(755,root,root) %ghost %{_libdir}/libtorrent.so.21
%files devel
%defattr(644,root,root,755)
diff --git a/libtorrent-bencoded-error.patch b/libtorrent-bencoded-error.patch
deleted file mode 100644
index 10e1a16..0000000
--- a/libtorrent-bencoded-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/tracker/tracker_http.cc b/src/tracker/tracker_http.cc
-index 6dbd0f5..48ab5a5 100644
---- a/src/tracker/tracker_http.cc
-+++ b/src/tracker/tracker_http.cc
-@@ -276,8 +276,11 @@ TrackerHttp::receive_done() {
- Object b;
- *m_data >> b;
-
-- if (m_data->fail())
-- return receive_failed("Could not parse bencoded data");
-+ if (m_data->fail()) {
-+ std::stringstream dump;
-+ dump << "Could not parse bencoded data: " << m_data->str();
-+ return receive_failed(dump.str().c_str());
-+ }
-
- if (!b.is_map())
- return receive_failed("Root not a bencoded map");
diff --git a/openssl.patch b/openssl.patch
deleted file mode 100644
index 8184fe2..0000000
--- a/openssl.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 7b29b6bd2547e72e22b9b7981df27092842d2a10 Mon Sep 17 00:00:00 2001
-From: rakshasa <sundell.software at gmail.com>
-Date: Tue, 20 Dec 2016 19:51:02 +0900
-Subject: [PATCH] Added support for openssl 1.1.
-
----
- configure.ac | 4 ++++
- src/utils/diffie_hellman.cc | 36 ++++++++++++++++++++++++++++++++++--
- 2 files changed, 38 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5b1ea237..b885714d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -71,12 +71,15 @@ AC_ARG_ENABLE(openssl,
- [ --disable-openssl Don't use OpenSSL's SHA1 implementation.],
- [
- if test "$enableval" = "yes"; then
-+dnl move to scripts.
- PKG_CHECK_MODULES(OPENSSL, libcrypto,
- CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS";
- LIBS="$LIBS $OPENSSL_LIBS")
-
- AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
- AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
-+ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
-+
- else
- AC_DEFINE(USE_NSS_SHA, 1, Using Mozilla's SHA1 implementation.)
- fi
-@@ -87,6 +90,7 @@ AC_ARG_ENABLE(openssl,
-
- AC_DEFINE(USE_OPENSSL, 1, Using OpenSSL.)
- AC_DEFINE(USE_OPENSSL_SHA, 1, Using OpenSSL's SHA1 implementation.)
-+ AC_CHECK_LIB([crypto], [DH_set0_pqg], [AC_DEFINE(USE_OPENSSL_1_1, 1, Using OpenSSL 1.1.)])
- ]
- )
-
-diff --git a/src/utils/diffie_hellman.cc b/src/utils/diffie_hellman.cc
-index aa653d45..7ec13165 100644
---- a/src/utils/diffie_hellman.cc
-+++ b/src/utils/diffie_hellman.cc
-@@ -54,11 +54,23 @@ DiffieHellman::DiffieHellman(const unsigned char *prime, int primeLength,
- m_secret(NULL), m_size(0) {
-
- #ifdef USE_OPENSSL
-+
- m_dh = DH_new();
-+
-+#ifdef USE_OPENSSL_1_1
-+ BIGNUM * const dh_p = BN_bin2bn(prime, primeLength, NULL);
-+ BIGNUM * const dh_g = BN_bin2bn(generator, generatorLength, NULL);
-+
-+ if (dh_p == NULL || dh_g == NULL ||
-+ !DH_set0_pqg(m_dh, dh_p, NULL, dh_g))
-+ throw internal_error("Could not generate Diffie-Hellman parameters");
-+#else
- m_dh->p = BN_bin2bn(prime, primeLength, NULL);
- m_dh->g = BN_bin2bn(generator, generatorLength, NULL);
-+#endif
-
- DH_generate_key(m_dh);
-+
- #else
- throw internal_error("Compiled without encryption support.");
- #endif
-@@ -74,7 +86,19 @@ DiffieHellman::~DiffieHellman() {
- bool
- DiffieHellman::is_valid() const {
- #ifdef USE_OPENSSL
-+ if (m_dh == NULL)
-+ return false;
-+
-+#ifdef USE_OPENSSL_1_1
-+ const BIGNUM *pub_key;
-+
-+ DH_get0_key(m_dh, &pub_key, NULL);
-+
-+ return pub_key != NULL;
-+#else
- return m_dh != NULL && m_dh->pub_key != NULL;
-+#endif
-+
- #else
- return false;
- #endif
-@@ -103,8 +127,16 @@ DiffieHellman::store_pub_key(unsigned char* dest, unsigned int length) {
- #ifdef USE_OPENSSL
- std::memset(dest, 0, length);
-
-- if ((int)length >= BN_num_bytes(m_dh->pub_key))
-- BN_bn2bin(m_dh->pub_key, dest + length - BN_num_bytes(m_dh->pub_key));
-+ const BIGNUM *pub_key;
-+
-+#ifdef USE_OPENSSL_1_1
-+ DH_get0_key(m_dh, &pub_key, NULL);
-+#else
-+ pub_key = m_dh->pub_key;
-+#endif
-+
-+ if ((int)length >= BN_num_bytes(pub_key))
-+ BN_bn2bin(pub_key, dest + length - BN_num_bytes(pub_key));
- #endif
- }
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libtorrent.git/commitdiff/9eb6269f5bada95ef70734ad2de3385870939386
More information about the pld-cvs-commit
mailing list