From 2f23cd1df51c368b8f516b62ca74ecd528181e15 Mon Sep 17 00:00:00 2001 From: zzlhyly Date: Sat, 27 Apr 2024 09:37:20 +0800 Subject: [PATCH 1/8] fix the compilation failure caused by the failure to find std::max --- include/libtorrent/aux_/heterogeneous_queue.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/libtorrent/aux_/heterogeneous_queue.hpp b/include/libtorrent/aux_/heterogeneous_queue.hpp index b3bc99952eb..760c73d876f 100644 --- a/include/libtorrent/aux_/heterogeneous_queue.hpp +++ b/include/libtorrent/aux_/heterogeneous_queue.hpp @@ -39,6 +39,7 @@ POSSIBILITY OF SUCH DAMAGE. #include // for malloc #include #include +#include #include "libtorrent/assert.hpp" #include "libtorrent/aux_/throw.hpp" From 98f1b2541a92848541f28729a270aae7e8aff506 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 11 May 2024 17:01:03 +0200 Subject: [PATCH 2/8] bump libsimulator submodule --- simulation/libsimulator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulation/libsimulator b/simulation/libsimulator index 66ac6cc0b24..c25c485a61d 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit 66ac6cc0b248e4655b8d21004fd24e3b62b5908d +Subproject commit c25c485a61d22103910e5861946e33d7bcd36a31 From fda33cf509000d62b850ebb5de734bc7a3bdc2bd Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 11 May 2024 08:48:26 +0200 Subject: [PATCH 3/8] assume copy_file_range() exists on linux (unless old glibc or android) --- ChangeLog | 1 + include/libtorrent/config.hpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6289511f372..5ece91e118a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2.0.11 not released + * assume copy_file_range() exists on linux (unless old glibc) * fix issue where set_piece_deadline() did not correctly post read_piece_alert * fix integer overflow in piece picker * torrent_status::num_pieces counts pieces passed hash check, as documented diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index b995e99fc03..6752a5eb168 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -186,7 +186,11 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_HAVE_MMAP 1 #endif -#if defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 27)) +#if defined __GLIBC__ && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 27)) +#define TORRENT_HAS_COPY_FILE_RANGE 0 +#elif defined __ANDROID__ +#define TORRENT_HAS_COPY_FILE_RANGE 0 +#else #define TORRENT_HAS_COPY_FILE_RANGE 1 #endif From 3ec66bbd995d15842e5998ff485c2763a3a168b6 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 11 May 2024 11:15:06 +0200 Subject: [PATCH 4/8] bump cibuildwheel action to v2.17.0 --- .github/workflows/cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 1f9390eec3c..3404982b9e2 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -104,7 +104,7 @@ jobs: - uses: docker/setup-qemu-action@v3 if: steps.cache-wheel.outputs.cache-hit != 'true' && runner.os == 'Linux' - - uses: pypa/cibuildwheel@v2.16.5 + - uses: pypa/cibuildwheel@v2.17.0 if: steps.cache-wheel.outputs.cache-hit != 'true' - uses: actions/upload-artifact@v3 From 6a32b7dd743fd3b9a4b23fe79aaaebfbb996516f Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 11 May 2024 18:27:28 +0200 Subject: [PATCH 5/8] fixup pyproject.toml --- pyproject.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a3b0b8c6955..9f245f3ab77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,15 +62,13 @@ PATH = "/usr/lib/ccache/bin:/tmp/boost:$PATH" [[tool.cibuildwheel.overrides]] before-all = [ - "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", - "bash -c 'choco install --no-progress --x86 openssl'" # choco only allows EITHER 32 OR 64-bit version of a package + "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'" ] select = "*-win32" [[tool.cibuildwheel.overrides]] before-all = [ - "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'", - "bash -c 'choco install --no-progress openssl'" # choco only allows EITHER 32 OR 64-bit version of a package + "bash -c './tools/cibuildwheel/setup_boost.sh $BOOST_VERSION $BOOST_ROOT'" ] select = "*-win_amd64" From 5824e63d511ca52f2f6e252539860a21c5ae1157 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 8 Jun 2024 10:32:02 +0200 Subject: [PATCH 6/8] fix EXT_SUFFIX issue --- bindings/python/setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index d720c475beb..7880f9fd50e 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -97,7 +97,10 @@ def b2_escape(value: str) -> str: def write_b2_python_config( - include_dirs: Sequence[str], library_dirs: Sequence[str], config: IO[str] + include_dirs: Sequence[str], + library_dirs: Sequence[str], + ext_suffix: str, + config: IO[str], ) -> None: write = config.write # b2 keys python environments by X.Y version, breaking ties by matching @@ -150,9 +153,6 @@ def write_b2_python_config( # other words we apply debian's override everywhere, and hope no other # overrides ever disagree with us. - ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") - ext_suffix = str(ext_suffix or "") - # python.jam appends the platform-specific final suffix on its own. I can't # find a consistent value from sysconfig for this. for plat_suffix in (".pyd", ".dll", ".so", ".sl"): @@ -428,7 +428,10 @@ def _configure_b2_with_distutils(self) -> Iterator[None]: if self._maybe_add_arg(f"python={sysconfig.get_python_version()}"): config_writers.append( functools.partial( - write_b2_python_config, self.include_dirs, self.library_dirs + write_b2_python_config, + self.include_dirs, + self.library_dirs, + os.path.basename(self.get_ext_fullpath("")), ) ) From f53151b233069f04c81105c7f892e1ee494aaedc Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 13 Jun 2024 00:23:30 +0200 Subject: [PATCH 7/8] rely on installed openssl on windows runners --- .github/workflows/python.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6072e41e496..99aa5aa7213 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -68,16 +68,6 @@ jobs: cd boost .\b2 headers - - name: install openssl (windows) - if: runner.os == 'Windows' - uses: nick-fields/retry@v3 - with: - shell: cmd - timeout_minutes: 5 - retry_wait_seconds: 4 - max_attempts: 3 - command: choco install openssl --limitoutput --no-progress - - name: build/install (windows) if: runner.os == 'Windows' shell: cmd From ba3a13c3413b52b78e0f23edc642690db1dfd848 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 13 Jun 2024 11:14:29 +0200 Subject: [PATCH 8/8] rather than installing openssl on winows, rely on the openssl version already installed on the runner --- .github/workflows/windows.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 760ef6b3267..6f0baea9d5b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,14 +33,6 @@ jobs: with: submodules: true - - name: install openssl (64 bit) - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - retry_wait_seconds: 4 - max_attempts: 3 - command: choco install openssl --limitoutput --no-progress - - name: install boost run: | git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.78.0 https://github.com/boostorg/boost.git @@ -148,14 +140,6 @@ jobs: cd boost bootstrap.bat - - name: install openssl (64 bit) - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - retry_wait_seconds: 4 - max_attempts: 3 - command: choco install openssl --limitoutput --no-progress - - name: boost headers run: | cd boost @@ -199,14 +183,6 @@ jobs: with: submodules: true - - name: install openssl (64 bit) - uses: nick-fields/retry@v3 - with: - timeout_minutes: 30 - retry_wait_seconds: 4 - max_attempts: 3 - command: choco install openssl --limitoutput --no-progress - - name: install boost run: | git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.78.0 https://github.com/boostorg/boost.git