From 061732ddec3343edbb0b3720ce7b226a159fcd73 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 4 Sep 2017 15:35:45 +0200 Subject: [PATCH 1/4] bump version --- CMakeLists.txt | 2 +- ChangeLog | 3 +++ Jamfile | 2 +- bindings/python/setup.py | 2 +- configure.ac | 2 +- docs/building.rst | 2 +- docs/contributing.rst | 2 +- docs/dht_rss.rst | 2 +- docs/dht_sec.rst | 2 +- docs/dht_store.rst | 2 +- docs/examples.rst | 2 +- docs/features.rst | 2 +- docs/gen_reference_doc.py | 2 +- docs/hacking.rst | 2 +- docs/index.rst | 2 +- docs/manual.rst | 2 +- docs/troubleshooting.rst | 2 +- docs/tuning.rst | 2 +- docs/tutorial.rst | 2 +- docs/utp.rst | 2 +- include/libtorrent/version.hpp | 6 +++--- src/settings_pack.cpp | 2 +- 22 files changed, 26 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 340e38f8e..a9ee55f61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(libtorrent) set (SOVERSION "8") -set (VERSION "1.1.4") +set (VERSION "1.1.5") set(sources web_connection_base diff --git a/ChangeLog b/ChangeLog index eee04b8a6..9905f6193 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ + +1.1.5 release + * fix IPv6 tracker support by performing the second announce in more cases * fix utf-8 encoding check in torrent parser * fix infinite loop when parsing maliciously crafted torrents diff --git a/Jamfile b/Jamfile index 496d51329..ec712406a 100644 --- a/Jamfile +++ b/Jamfile @@ -58,7 +58,7 @@ else : : $(boost-include-path) ; } -VERSION = 1.1.4 ; +VERSION = 1.1.5 ; # rule for linking the correct libraries depending # on features and target-os diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 4692551e8..049215c04 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -133,7 +133,7 @@ else: libraries = ['torrent-rasterbar'] + flags.libraries)] setup(name = 'python-libtorrent', - version = '1.1.4', + version = '1.1.5', author = 'Arvid Norberg', author_email = 'arvid@libtorrent.org', description = 'Python bindings for libtorrent-rasterbar', diff --git a/configure.ac b/configure.ac index 6681a3936..bc9e7dc30 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ AC_PREREQ([2.63]) -AC_INIT([libtorrent-rasterbar],[1.1.4],[arvid@libtorrent.org], +AC_INIT([libtorrent-rasterbar],[1.1.5],[arvid@libtorrent.org], [libtorrent-rasterbar],[http://www.libtorrent.org]) AC_CONFIG_SRCDIR([src/torrent.cpp]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/docs/building.rst b/docs/building.rst index f31866716..29461e645 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/contributing.rst b/docs/contributing.rst index 7e3f3765d..5999c775d 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_rss.rst b/docs/dht_rss.rst index c69745e84..ef10897af 100644 --- a/docs/dht_rss.rst +++ b/docs/dht_rss.rst @@ -3,7 +3,7 @@ BitTorrent extension for DHT RSS feeds ====================================== :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_sec.rst b/docs/dht_sec.rst index efac89f5b..019fe07f2 100644 --- a/docs/dht_sec.rst +++ b/docs/dht_sec.rst @@ -3,7 +3,7 @@ BitTorrent DHT security extension ================================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/dht_store.rst b/docs/dht_store.rst index 462f296ad..264a7fe35 100644 --- a/docs/dht_store.rst +++ b/docs/dht_store.rst @@ -3,7 +3,7 @@ BitTorrent extension for arbitrary DHT store ============================================ :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/examples.rst b/docs/examples.rst index fda2b7f3c..3e3dcefc9 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -3,7 +3,7 @@ libtorrent Examples =================== :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/features.rst b/docs/features.rst index e62bdf919..67e49a8e2 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index f7074f6dc..3f48a10ef 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -1027,7 +1027,7 @@ for cat in categories: out.write(''' :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 `home`__ diff --git a/docs/hacking.rst b/docs/hacking.rst index 65e7134db..bea76b780 100644 --- a/docs/hacking.rst +++ b/docs/hacking.rst @@ -3,7 +3,7 @@ libtorrent hacking ================== :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/index.rst b/docs/index.rst index e6fbd2cb3..ee8277d48 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. raw:: html diff --git a/docs/manual.rst b/docs/manual.rst index 8af8a35fb..036047867 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -3,7 +3,7 @@ libtorrent API Documentation ============================ :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 1 diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 44d6eb69a..bc975bbd0 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/tuning.rst b/docs/tuning.rst index ee3703608..8c4f52b0d 100644 --- a/docs/tuning.rst +++ b/docs/tuning.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 5df3b6f7e..535865ce9 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/docs/utp.rst b/docs/utp.rst index 469dbdb71..656c1f812 100644 --- a/docs/utp.rst +++ b/docs/utp.rst @@ -3,7 +3,7 @@ libtorrent manual ================= :Author: Arvid Norberg, arvid@libtorrent.org -:Version: 1.1.4 +:Version: 1.1.5 .. contents:: Table of contents :depth: 2 diff --git a/include/libtorrent/version.hpp b/include/libtorrent/version.hpp index 6449f2689..c2cea0b1c 100644 --- a/include/libtorrent/version.hpp +++ b/include/libtorrent/version.hpp @@ -37,14 +37,14 @@ POSSIBILITY OF SUCH DAMAGE. #define LIBTORRENT_VERSION_MAJOR 1 #define LIBTORRENT_VERSION_MINOR 1 -#define LIBTORRENT_VERSION_TINY 4 +#define LIBTORRENT_VERSION_TINY 5 // the format of this version is: MMmmtt // M = Major version, m = minor version, t = tiny version #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTORRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) -#define LIBTORRENT_VERSION "1.1.4.0" -#define LIBTORRENT_REVISION "20c1407" +#define LIBTORRENT_VERSION "1.1.5.0" +#define LIBTORRENT_REVISION "37ffe99a1" namespace libtorrent { diff --git a/src/settings_pack.cpp b/src/settings_pack.cpp index 0e8eab98e..e908d24b1 100644 --- a/src/settings_pack.cpp +++ b/src/settings_pack.cpp @@ -148,7 +148,7 @@ namespace libtorrent SET_NOPREV(proxy_username, "", &session_impl::update_proxy), SET_NOPREV(proxy_password, "", &session_impl::update_proxy), SET_NOPREV(i2p_hostname, "", &session_impl::update_i2p_bridge), - SET_NOPREV(peer_fingerprint, "-LT1140-", &session_impl::update_peer_fingerprint), + SET_NOPREV(peer_fingerprint, "-LT1150-", &session_impl::update_peer_fingerprint), SET_NOPREV(dht_bootstrap_nodes, "dht.libtorrent.org:25401", &session_impl::update_dht_bootstrap_nodes) }; From 3da7d1d3da3083ff11c19713abc3b113620bcaa8 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 4 Sep 2017 16:50:11 +0200 Subject: [PATCH 2/4] fix documentation issue --- include/libtorrent/torrent_status.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libtorrent/torrent_status.hpp b/include/libtorrent/torrent_status.hpp index b6a2e5fd6..47342debb 100644 --- a/include/libtorrent/torrent_status.hpp +++ b/include/libtorrent/torrent_status.hpp @@ -118,12 +118,12 @@ namespace libtorrent checking_resume_data }; +#ifndef TORRENT_NO_DEPRECATE // may be set to an error code describing why the torrent was paused, in // case it was paused by an error. If the torrent is not paused or if it's // paused but not because of an error, this error_code is not set. // if the error is attributed specifically to a file, error_file is set to // the index of that file in the .torrent file. -#ifndef TORRENT_NO_DEPRECATE std::string error; #else // internal From e36b06602067282c02901f65803d70945303e3a1 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 4 Sep 2017 17:17:11 +0200 Subject: [PATCH 3/4] make logging alerts enabled by default in autoconf builds --- configure.ac | 19 +++++++------------ test/test_dht.cpp | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index bc9e7dc30..00aa9b4ec 100644 --- a/configure.ac +++ b/configure.ac @@ -99,7 +99,7 @@ AX_PTHREAD() LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CC="$PTHREAD_CC" -CXXFLAGS="$CXXFLAGS -ftemplate-depth=120" +CXXFLAGS="$CXXFLAGS -ftemplate-depth=120 -Wno-format-zero-length" AS_ECHO "Checking for visibility support:" AC_CACHE_CHECK([for __attribute__((visibility("hidden")))], @@ -172,9 +172,9 @@ AC_ARG_ENABLE( [logging], [AS_HELP_STRING( [--enable-logging], - [enable logging to disk (use value "verbose" to enable verbose peer wire logging or "errors" limit logging to errors ) [default=no]])], + [enable logging alerts [default=yes]])], [[ARG_ENABLE_LOGGING=$enableval]], - [[ARG_ENABLE_LOGGING=no]] + [[ARG_ENABLE_LOGGING=yes]] ) AC_ARG_ENABLE( @@ -196,7 +196,7 @@ AC_ARG_ENABLE( [dht], [AS_HELP_STRING( [--enable-dht], - [enable dht support (use value "logging" to add extra logging) [default=yes]])], + [enable dht support [default=yes]])], [[ARG_ENABLE_DHT=$enableval]], [[ARG_ENABLE_DHT=yes]] ) @@ -363,7 +363,7 @@ AS_CASE(["$ARG_ENABLE_LOGGING"], ], ["no"|"none"], [ AC_MSG_RESULT([no]) - AC_DEFINE([TORRENT_DISABLE_LOGGING],[1],[Define to enable support for logging alerts]) + AC_DEFINE([TORRENT_DISABLE_LOGGING],[1],[Define to disable support for logging alerts]) COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DTORRENT_DISABLE_LOGGING " ], [AC_MSG_RESULT([$ARG_ENABLE_LOGGING]) @@ -418,13 +418,8 @@ AS_CASE(["$ARG_ENABLE_DHT"], AC_DEFINE([TORRENT_DISABLE_DHT],[1],[Define to disable the DHT support.]) COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DTORRENT_DISABLE_DHT " ], - ["logging"], [ - AC_MSG_RESULT([logging]) - AC_DEFINE([TORRENT_DHT_VERBOSE_LOGGING],[1],[Define to enable DHT support with verbose logging.]) - COMPILETIME_OPTIONS="$COMPILETIME_OPTIONS -DTORRENT_DHT_VERBOSE_LOGGING " - ], [AC_MSG_RESULT([$ARG_ENABLE_DHT]) - AC_MSG_ERROR([Unknown option "$ARG_ENABLE_DHT". Use either "yes", "no" or "logging".])] + AC_MSG_ERROR([Unknown option "$ARG_ENABLE_DHT". Use either "yes" or "no".])] ) AC_MSG_CHECKING([whether pool allocators should be enabled]) @@ -625,7 +620,7 @@ Build options: deprecated functions: ${ARG_ENABLE_DEPRECATED:-yes} debug build: ${ARG_ENABLE_DEBUG:-no} invariant checks: ${ARG_ENABLE_INVARIANT:-no} - logging support: ${ARG_ENABLE_LOGGING:-no} + logging support: ${ARG_ENABLE_LOGGING:-yes} disk statistics: ${ARG_ENABLE_DISK_STATS:-no} Features: diff --git a/test/test_dht.cpp b/test/test_dht.cpp index 2a541f695..0ac2b730b 100644 --- a/test/test_dht.cpp +++ b/test/test_dht.cpp @@ -2282,7 +2282,7 @@ TORRENT_TEST(routing_table_uniform) // i.e. no more than 5 levels TEST_EQUAL(tbl.num_active_buckets(), 5); -#if defined TORRENT_DHT_VERBOSE_LOGGING || defined TORRENT_DEBUG +#if defined TORRENT_DEBUG tbl.print_state(std::cout); #endif } From 1280361236934d3b988995ec69ad39aad03f1406 Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 5 Sep 2017 15:10:15 +0200 Subject: [PATCH 4/4] update build docs --- docs/building.rst | 64 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/building.rst b/docs/building.rst index 29461e645..0fd59886a 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -12,10 +12,9 @@ libtorrent manual downloading and building ======================== -To acquire the latest version of libtorrent, you'll have to grab it from SVN. -You'll find instructions on how to do this here__ (see subversion access). +To download the latest version of libtorrent, clone the `github repo`__. -__ http://sourceforge.net/svn/?group_id=79942 +__ https://github.com/arvidn/libtorrent The build systems supported "out of the box" in libtorrent are boost-build v2 (BBv2) and autotools (for unix-like systems). If you still can't build after @@ -38,15 +37,18 @@ IRC channel on ``irc.freenode.net``. configuration options in the pkg-config file. Always use pkg-config when linking against libtorrent. -building from svn +building from git ----------------- -To build libtorrent from svn you need to check out the libtorrent sources from -sourceforge. If you downloaded a release tarball, you can skip this section. +To build libtorrent from git you need to clone the libtorrent repo from +github. If you downloaded a release `tarball`__, you can skip this section. -To check out libtorrent follow these instructions__. +__ https://github.com/arvidn/libtorrent/releases/latest + +:: + + git clone https://github.com/arvidn/libtorrent.git -__ http://sourceforge.net/svn/?group_id=79942 building with BBv2 ------------------ @@ -75,7 +77,7 @@ You'll find boost here__. __ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=619445 Extract the archive to some directory where you want it. For the sake of this -guide, let's assume you extract the package to ``c:\boost_1_55_0`` (I'm using +guide, let's assume you extract the package to ``c:\boost_1_64_0`` (I'm using a windows path in this example since if you're on linux/unix you're more likely to use the autotools). You'll need at least version 1.49 of the boost library in order to build libtorrent. @@ -86,7 +88,7 @@ Step 2: Setup BBv2 First you need to build ``bjam``. You do this by opening a terminal (In windows, run ``cmd``). Change directory to -``c:\boost_1_55_0\tools\jam\src``. Then run the script called +``c:\boost_1_64_0\tools\jam\src``. Then run the script called ``build.bat`` or ``build.sh`` on a unix system. This will build ``bjam`` and place it in a directory starting with ``bin.`` and then have the name of your platform. Copy the ``bjam.exe`` (or ``bjam`` on a unix system) to a place @@ -101,16 +103,16 @@ set the environment variable ``BOOST_BUILD_PATH``. This is the path that tells ``bjam`` where it can find boost-build, your configuration file and all the toolsets (descriptions used by boost-build to know how to use different compilers on different platforms). Assuming the boost install path above, set -it to ``c:\boost_1_55_0\tools\build\v2``. +it to ``c:\boost_1_64_0\tools\build\v2``. To set an environment variable in windows, type for example:: - set BOOST_BUILD_PATH=c:\boost_1_55_0\tools\build\v2 + set BOOST_BUILD_PATH=c:\boost_1_64_0\tools\build\v2 In a terminal window. The last thing to do to complete the setup of BBv2 is to modify your -``user-config.jam`` file. It is located in ``c:\boost_1_55_0\tools\build\v2``. +``user-config.jam`` file. It is located in ``c:\boost_1_64_0\tools\build\v2``. Depending on your platform and which compiler you're using, you should add a line for each compiler and compiler version you have installed on your system that you want to be able to use with BBv2. For example, if you're using @@ -148,7 +150,7 @@ Step 3: Building libtorrent When building libtorrent, the ``Jamfile`` expects the environment variable ``BOOST_ROOT`` to be set to the boost installation directory. It uses this to find the boost libraries it depends on, so they can be built and their headers -files found. So, set this to ``c:\boost_1_55_0``. You only need this if you're +files found. So, set this to ``c:\boost_1_64_0``. You only need this if you're building against a source distribution of boost. Then the only thing left is simply to invoke ``bjam``. If you want to specify @@ -224,8 +226,8 @@ from a cygwin terminal, you'll have to run it from a ``cmd`` terminal. The same cygwin, if you're building with gcc in cygwin you'll have to run it from a cygwin terminal. Also, make sure the paths are correct in the different environments. In cygwin, the paths (``BOOST_BUILD_PATH`` and ``BOOST_ROOT``) should be in the typical unix-format (e.g. -``/cygdrive/c/boost_1_55_0``). In the windows environment, they should have the typical -windows format (``c:/boost_1_55_0``). +``/cygdrive/c/boost_1_64_0``). In the windows environment, they should have the typical +windows format (``c:/boost_1_64_0``). .. note:: In Jamfiles, spaces are separators. It's typically easiest to avoid spaces @@ -388,12 +390,12 @@ building with autotools First of all, you need to install ``automake`` and ``autoconf``. Many unix/linux systems comes with these preinstalled. -The prerequisites for building libtorrent are boost.thread, boost.date_time -and boost.filesystem. Those are the *compiled* boost libraries needed. The -headers-only libraries needed include (but is not necessarily limited to) -boost.bind, boost.ref, boost.multi_index, boost.optional, boost.lexical_cast, -boost.integer, boost.iterator, boost.tuple, boost.array, boost.function, -boost.smart_ptr, boost.preprocessor, boost.static_assert. +The prerequisites for building libtorrent are boost.system, boost.chrono and +boost.random. Those are the *compiled* boost libraries needed. The headers-only +libraries needed include (but is not necessarily limited to) boost.bind, +boost.ref, boost.multi_index, boost.optional, boost.lexical_cast, boost.integer, +boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr, +boost.preprocessor, boost.static_assert. If you want to build the ``client_test`` example, you'll also need boost.regex and boost.program_options. @@ -452,12 +454,14 @@ the suffix ``mt``. You know that the boost libraries were found if you see the following output from the configure script:: - checking whether the Boost::DateTime library is available... yes - checking for main in -lboost_date_time... yes - checking whether the Boost::Filesystem library is available... yes - checking for main in -lboost_filesystem... yes - checking whether the Boost::Thread library is available... yes - checking for main in -lboost_thread... yes + Checking for boost libraries: + checking for boostlib >= 1.53... yes + checking whether the Boost::System library is available... yes + checking for exit in -lboost_system... yes + checking whether the Boost::Chrono library is available... yes + checking for exit in -lboost_chrono-mt... yes + checking whether the Boost::Random library is available... yes + checking for exit in -lboost_random-mt... yes Another possible source of problems may be if the path to your libtorrent directory contains spaces. Make sure you either rename the directories with @@ -532,10 +536,6 @@ defines you can use to control the build. | | peer_log_alert. With this build flag, you | | | cannot enable those alerts. | +----------------------------------------+-------------------------------------------------+ -| ``TORRENT_STORAGE_DEBUG`` | This will enable extra expensive invariant | -| | checks in the storage, including logging of | -| | piece sorting. | -+----------------------------------------+-------------------------------------------------+ | ``TORRENT_DISK_STATS`` | This will create a log of all disk activity | | | which later can parsed and graphed using | | | ``parse_disk_log.py``. |