From 429c670f4bcbde60ba70815b99cb3c473eb9d219 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Fri, 22 Nov 2024 12:34:56 -0500 Subject: [PATCH] Add upstream patch fixing a Boost.Asio bug Upstream patch in question (present in boost 1.76 but not 1.75): https://github.com/chriskohlhoff/asio/commit/b5a8065ecc018b521ed800475b59b8423f3c8564 In passing fix the %patch directives to be compatible with RPM 4.20. Resolves: RHEL-67973 --- boost-1.75-asio-fix.patch | 29 +++++++++++++++++++++++++++++ boost.spec | 29 +++++++++++++++++++---------- 2 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 boost-1.75-asio-fix.patch diff --git a/boost-1.75-asio-fix.patch b/boost-1.75-asio-fix.patch new file mode 100644 index 0000000..0f2af04 --- /dev/null +++ b/boost-1.75-asio-fix.patch @@ -0,0 +1,29 @@ +From 296746ce9469210fae520db31b07ccb31a6affce Mon Sep 17 00:00:00 2001 +From: Christopher Kohlhoff +Date: Wed, 3 Mar 2021 18:50:31 +1100 +Subject: [PATCH] The executor must be copied when an I/O object is + move-assigned. + +The moved-from I/O object needs to be left in the same state as if +constructed with a valid executor but without a resource. +--- + boost/asio/detail/io_object_impl.hpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/boost/asio/detail/io_object_impl.hpp b/boost/asio/detail/io_object_impl.hpp +index 54a622d..7f2f36c 100644 +--- a/boost/asio/detail/io_object_impl.hpp ++++ b/boost/asio/detail/io_object_impl.hpp +@@ -99,8 +99,7 @@ public: + service_->move_assign(implementation_, + *other.service_, other.implementation_); + executor_.~executor_type(); +- new (&executor_) executor_type( +- std::move(other.executor_)); ++ new (&executor_) executor_type(other.executor_); + service_ = other.service_; + } + return *this; +-- +2.47.0 + diff --git a/boost.spec b/boost.spec index cce55db..726d910 100644 --- a/boost.spec +++ b/boost.spec @@ -42,7 +42,7 @@ Name: boost %global real_name boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.75.0 -Release: 8%{?dist} +Release: 9%{?dist} License: Boost and MIT and Python # Replace each . with _ in %%{version} @@ -157,6 +157,10 @@ Patch94: boost-1.73-locale-empty-vector.patch # https://github.com/boostorg/build/issues/696 Patch95: boost-1.75.0-boost-build-fix.patch +# https://issues.redhat.com/browse/RHEL-67973 +# https://github.com/chriskohlhoff/asio/issues/790 +Patch98: boost-1.75-asio-fix.patch + %bcond_with tests %bcond_with docs_generated @@ -672,15 +676,16 @@ a number of significant features and is now developed independently. %setup -q -n %{toplev_dirname} find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x -%patch15 -p0 -%patch51 -p1 -%patch96 -p1 -%patch97 -p1 -%patch83 -p1 -%patch88 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -p1 +%patch -P15 -p0 +%patch -P51 -p1 +%patch -P96 -p1 +%patch -P97 -p1 +%patch -P83 -p1 +%patch -P88 -p1 +%patch -P93 -p1 +%patch -P94 -p1 +%patch -P95 -p1 +%patch -P98 -p1 %build %set_build_flags @@ -1282,6 +1287,10 @@ fi %{_mandir}/man1/b2.1* %changelog +* Fri Nov 22 2024 Patrick Palka - 1.75.0-9 +- Apply upstream Boost.Asio patch to resolve RHEL-67973 +- Fix %patch directive compatibility with RPM 4.20 + * Fri Jun 24 2022 Jonathan Wakely - 1.75.0-8 - Restore Provides for boost-python3-devel