From f3a7e2749f21dd2a5dd21b50471a8f4b683dcf51 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 30 Mar 2020 15:22:56 +0100 Subject: [PATCH 1/5] Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) --- boost-1.69-format-allocator.patch | 28 ++++++++++++++++++++++++++++ boost.spec | 9 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 boost-1.69-format-allocator.patch diff --git a/boost-1.69-format-allocator.patch b/boost-1.69-format-allocator.patch new file mode 100644 index 0000000..28c43a8 --- /dev/null +++ b/boost-1.69-format-allocator.patch @@ -0,0 +1,28 @@ +--- boost_1_69_0/boost/format/alt_sstream_impl.hpp~ 2020-03-30 15:20:18.565658757 +0100 ++++ boost_1_69_0/boost/format/alt_sstream_impl.hpp 2020-03-30 15:20:33.768636162 +0100 +@@ -40,8 +40,11 @@ + #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); + Ch *new_ptr = static_cast(vd_ptr); +-#else ++#elif defined BOOST_NO_CXX11_ALLOCATOR + Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); ++#else ++ Ch *new_ptr = std::allocator_traits::allocate(alloc_, ++ sz, is_allocated_? eback() : 0); + #endif + // if this didnt throw, we're safe, update the buffer + dealloc(); +@@ -257,8 +260,11 @@ + #ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC + void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); + newptr = static_cast(vdptr); +-#else ++#elif defined BOOST_NO_CXX11_ALLOCATOR + newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); ++#else ++ newptr = std::allocator_traits::allocate(alloc_, ++ new_size, is_allocated_? oldptr : 0); + #endif + } + diff --git a/boost.spec b/boost.spec index 45962b2..6f9f3d9 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,7 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 14%{?dist} +Release: 15%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -146,6 +146,9 @@ Patch84: boost-1.69-random.patch # https://github.com/boostorg/mpi/pull/81 Patch85: boost-1.69-mpi-c_data.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1818723 +Patch86: boost-1.69-format-allocator.patch + %bcond_with tests %bcond_with docs_generated @@ -650,6 +653,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch83 -p1 %patch84 -p2 %patch85 -p2 +%patch86 -p1 %build # Dump the versions being used into the build logs. @@ -1269,6 +1273,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Mon Mar 30 2020 Jonathan Wakely - 1.69.0-15 +- Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) + * Tue Jan 28 2020 Fedora Release Engineering - 1.69.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 7ef9cdfd23a41ed6025fd365c3afd61d70a88538 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 11 May 2020 13:03:48 +0100 Subject: [PATCH 2/5] Add patch for C++20 compatibility in Boost.Test (#1832639) --- boost-1.69.0-test-cxx20.patch | 50 +++++++++++++++++++++++++++++++++++ boost.spec | 9 ++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 boost-1.69.0-test-cxx20.patch diff --git a/boost-1.69.0-test-cxx20.patch b/boost-1.69.0-test-cxx20.patch new file mode 100644 index 0000000..c9b0e67 --- /dev/null +++ b/boost-1.69.0-test-cxx20.patch @@ -0,0 +1,50 @@ +From 8ac88c62dcc809d42daf8b6bef10f7adecc46dd1 Mon Sep 17 00:00:00 2001 +From: Laurent Stacul +Date: Mon, 17 Feb 2020 08:57:49 +0000 +Subject: [PATCH] Fix compilation issue due to deleted + std::basic_ostream::operator<< overload + +--- + include/boost/test/impl/test_tools.ipp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/test/impl/test_tools.ipp b/include/boost/test/impl/test_tools.ipp +index 40f24e6399..e4d61660b8 100644 +--- a/include/boost/test/impl/test_tools.ipp ++++ b/include/boost/test/impl/test_tools.ipp +@@ -124,7 +124,7 @@ print_log_value::operator()( std::ostream& ostr, char const* t ) + void + print_log_value::operator()( std::ostream& ostr, wchar_t const* t ) + { +- ostr << ( t ? t : L"null string" ); ++ ostr << ( t ? reinterpret_cast(t) : "null string" ); + } + + //____________________________________________________________________________// +From db6b98c72783351e0acd3c558691323a7a103ba9 Mon Sep 17 00:00:00 2001 +From: Raffi Enficiaud +Date: Sat, 9 May 2020 10:42:38 +0200 +Subject: [PATCH] Fixing cast issue when logging wchar_t + +--- + include/boost/test/impl/test_tools.ipp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/include/boost/test/impl/test_tools.ipp b/include/boost/test/impl/test_tools.ipp +index 025cd1a92a..bbee21fbbc 100644 +--- a/include/boost/test/impl/test_tools.ipp ++++ b/include/boost/test/impl/test_tools.ipp +@@ -124,7 +124,12 @@ print_log_value::operator()( std::ostream& ostr, char const* t ) + void + print_log_value::operator()( std::ostream& ostr, wchar_t const* t ) + { +- ostr << ( t ? reinterpret_cast(t) : "null string" ); ++ if(t) { ++ ostr << static_cast(t); ++ } ++ else { ++ ostr << "null w-string"; ++ } + } + + //____________________________________________________________________________// diff --git a/boost.spec b/boost.spec index 6f9f3d9..4b23dfb 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,7 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 15%{?dist} +Release: 16%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -149,6 +149,9 @@ Patch85: boost-1.69-mpi-c_data.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1818723 Patch86: boost-1.69-format-allocator.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1832639 +Patch87: boost-1.69.0-test-cxx20.patch + %bcond_with tests %bcond_with docs_generated @@ -654,6 +657,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch84 -p2 %patch85 -p2 %patch86 -p1 +%patch87 -p2 %build # Dump the versions being used into the build logs. @@ -1273,6 +1277,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Mon May 11 2020 Jonathan Wakely - 1.69.0-16 +- Add patch for C++20 compatibility in Boost.Test (#1832639) + * Mon Mar 30 2020 Jonathan Wakely - 1.69.0-15 - Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) From c61827c98a5c9606f45c8ec795bfa3afe3161ee4 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Tue, 12 May 2020 14:39:35 +0300 Subject: [PATCH 3/5] Fix Boost.Signals2 C++20 compatibility (#1834764) --- auto_buffer-C-20-compatibility.patch | 34 ++++++++++++++++++++++++++++ boost.spec | 9 +++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 auto_buffer-C-20-compatibility.patch diff --git a/auto_buffer-C-20-compatibility.patch b/auto_buffer-C-20-compatibility.patch new file mode 100644 index 0000000..6e4a95c --- /dev/null +++ b/auto_buffer-C-20-compatibility.patch @@ -0,0 +1,34 @@ +From 675ea3ddf714e2594393ed935f64dce99721b7d7 Mon Sep 17 00:00:00 2001 +From: Avi Kivity +Date: Tue, 12 May 2020 14:29:56 +0300 +Subject: [PATCH] auto_buffer: C++20 compatibility + +C++20's std::allocator does not define the pointer member type, +use std::allocator_traits instead. +--- + include/boost/signals2/detail/auto_buffer.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/include/boost/signals2/detail/auto_buffer.hpp b/include/boost/signals2/detail/auto_buffer.hpp +index 5ff8dd2..ed62152 100644 +--- a/include/boost/signals2/detail/auto_buffer.hpp ++++ b/include/boost/signals2/detail/auto_buffer.hpp +@@ -140,11 +140,15 @@ namespace detail + typedef Allocator allocator_type; + typedef T value_type; + typedef typename Allocator::size_type size_type; + typedef typename Allocator::difference_type difference_type; + typedef T* pointer; ++#if __cplusplus <= 201703L + typedef typename Allocator::pointer allocator_pointer; ++#else ++ typedef typename std::allocator_traits::pointer allocator_pointer; ++#endif + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + typedef pointer iterator; + typedef const_pointer const_iterator; +-- +2.26.2 + diff --git a/boost.spec b/boost.spec index 4b23dfb..3c973b5 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,7 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 16%{?dist} +Release: 17%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -152,6 +152,9 @@ Patch86: boost-1.69-format-allocator.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1832639 Patch87: boost-1.69.0-test-cxx20.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1834764 +Patch88: auto_buffer-C-20-compatibility.patch + %bcond_with tests %bcond_with docs_generated @@ -658,6 +661,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch85 -p2 %patch86 -p1 %patch87 -p2 +%patch88 -p2 %build # Dump the versions being used into the build logs. @@ -1277,6 +1281,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Tue May 12 2020 Avi Kivity - 1.69.0-17 +- Add patch for C++20 compatibility in Boost.Signals2 (#1834764) + * Mon May 11 2020 Jonathan Wakely - 1.69.0-16 - Add patch for C++20 compatibility in Boost.Test (#1832639) From 10d41a9a95b030e8c66630c6a230a98187d25f20 Mon Sep 17 00:00:00 2001 From: Denis Arnaud Date: Thu, 14 May 2020 22:51:36 +0200 Subject: [PATCH 4/5] Obsoletes all sub-packages of boost169 (on F32) (#1835079) --- boost.spec | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/boost.spec b/boost.spec index 3c973b5..299b693 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,8 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 17%{?dist} +%global obsver 1.69.0-7 +Release: 18%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -170,6 +171,8 @@ in future standards.) %package atomic Summary: Run-time component of boost atomic library +Provides: boost169-atomic = %{obsver} +Obsoletes: boost169-atomic < %{obsver} %description atomic @@ -181,6 +184,8 @@ variables. %package chrono Summary: Run-time component of boost chrono library Requires: %{name}-system%{?_isa} = %{version}-%{release} +Provides: boost169-chrono = %{obsver} +Obsoletes: boost169-chrono < %{obsver} %description chrono @@ -188,6 +193,8 @@ Run-time support for Boost.Chrono, a set of useful time utilities. %package container Summary: Run-time component of boost container library +Provides: boost169-container = %{obsver} +Obsoletes: boost169-container < %{obsver} %description container @@ -198,6 +205,8 @@ standard draft features for compilers that comply with C++03. %package contract Summary: Run-time component of boost contract library +Provides: boost169-contract = %{obsver} +Obsoletes: boost169-contract < %{obsver} %description contract @@ -211,6 +220,8 @@ from Lorenzo Caminiti. %if %{with context} %package context Summary: Run-time component of boost context switching library +Provides: boost169-context = %{obsver} +Obsoletes: boost169-context < %{obsver} %description context @@ -219,6 +230,8 @@ provides a sort of cooperative multitasking on a single thread. %package coroutine Summary: Run-time component of boost coroutine library +Provides: boost169-coroutine = %{obsver} +Obsoletes: boost169-coroutine < %{obsver} %description coroutine Run-time support for Boost.Coroutine, a library that provides @@ -229,6 +242,8 @@ suspending and resuming execution. %package date-time Summary: Run-time component of boost date-time library +Provides: boost169-date-time = %{obsver} +Obsoletes: boost169-date-time < %{obsver} %description date-time @@ -238,6 +253,8 @@ on generic programming concepts. %if %{with context} %package fiber Summary: Run-time component of boost fiber library +Provides: boost169-fiber = %{obsver} +Obsoletes: boost169-fiber < %{obsver} %description fiber @@ -248,6 +265,8 @@ micro-/userland-threads (fibers) scheduled cooperatively. %package filesystem Summary: Run-time component of boost filesystem library Requires: %{name}-system%{?_isa} = %{version}-%{release} +Provides: boost169-filesystem = %{obsver} +Obsoletes: boost169-filesystem < %{obsver} %description filesystem @@ -258,6 +277,8 @@ directories. %package graph Summary: Run-time component of boost graph library Requires: %{name}-regex%{?_isa} = %{version}-%{release} +Provides: boost169-graph = %{obsver} +Obsoletes: boost169-graph < %{obsver} %description graph @@ -267,6 +288,8 @@ Library (STL). %package iostreams Summary: Run-time component of boost iostreams library +Provides: boost169-iostreams = %{obsver} +Obsoletes: boost169-iostreams < %{obsver} %description iostreams @@ -278,6 +301,8 @@ Summary: Run-time component of boost locale library Requires: %{name}-chrono%{?_isa} = %{version}-%{release} Requires: %{name}-system%{?_isa} = %{version}-%{release} Requires: %{name}-thread%{?_isa} = %{version}-%{release} +Provides: boost169-locale = %{obsver} +Obsoletes: boost169-locale < %{obsver} %description locale @@ -286,6 +311,8 @@ handling tools. %package log Summary: Run-time component of boost logging library +Provides: boost169-log = %{obsver} +Obsoletes: boost169-log < %{obsver} %description log @@ -295,6 +322,8 @@ tools along with public interfaces for extending the library. %package math Summary: Math functions for boost TR1 library +Provides: boost169-math = %{obsver} +Obsoletes: boost169-math < %{obsver} %description math @@ -307,6 +336,8 @@ portion of Boost.TR1. Summary: Run-time component of boost numpy library for Python 3 Requires: %{name}-python3%{?_isa} = %{version}-%{release} Requires: python3-numpy +Provides: boost169-numpy3 = %{obsver} +Obsoletes: boost169-numpy3 < %{obsver} %description numpy3 @@ -320,6 +351,8 @@ support for the NumPy extension of the Boost Python Library for Python 3. %package program-options Summary: Run-time component of boost program_options library +Provides: boost169-program_options = %{obsver} +Obsoletes: boost169-program_options < %{obsver} %description program-options @@ -331,6 +364,8 @@ conventional methods such as command-line and configuration file. %package python3 Summary: Run-time component of boost python library for Python 3 +Provides: boost169-python3 = %{obsver} +Obsoletes: boost169-python3 < %{obsver} %description python3 @@ -345,6 +380,8 @@ Summary: Shared object symbolic links for Boost.Python 3 Requires: %{name}-numpy3%{?_isa} = %{version}-%{release} Requires: %{name}-python3%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Provides: boost169-python3-devel = %{obsver} +Obsoletes: boost169-python3-devel < %{obsver} %description python3-devel @@ -354,6 +391,8 @@ Shared object symbolic links for Python 3 variant of Boost.Python. %package random Summary: Run-time component of boost random library +Provides: boost169-random = %{obsver} +Obsoletes: boost169-random < %{obsver} %description random @@ -361,6 +400,8 @@ Run-time support for boost random library. %package regex Summary: Run-time component of boost regular expression library +Provides: boost169-regex = %{obsver} +Obsoletes: boost169-regex < %{obsver} %description regex @@ -368,6 +409,8 @@ Run-time support for boost regular expression library. %package serialization Summary: Run-time component of boost serialization library +Provides: boost169-serialization = %{obsver} +Obsoletes: boost169-serialization < %{obsver} %description serialization @@ -375,6 +418,8 @@ Run-time support for serialization for persistence and marshaling. %package stacktrace Summary: Run-time component of boost stacktrace library +Provides: boost169-stacktrace = %{obsver} +Obsoletes: boost169-stacktrace < %{obsver} %description stacktrace @@ -382,6 +427,8 @@ Run-time component of the Boost stacktrace library. %package system Summary: Run-time component of boost system support library +Provides: boost169-system = %{obsver} +Obsoletes: boost169-system < %{obsver} %description system @@ -390,6 +437,8 @@ the diagnostics support that is part of the C++11 standard library. %package test Summary: Run-time component of boost test library +Provides: boost169-test = %{obsver} +Obsoletes: boost169-test < %{obsver} %description test @@ -399,6 +448,8 @@ program execution monitoring. %package thread Summary: Run-time component of boost thread library Requires: %{name}-system%{?_isa} = %{version}-%{release} +Provides: boost169-thread = %{obsver} +Obsoletes: boost169-thread < %{obsver} %description thread @@ -411,6 +462,8 @@ data specific to individual threads. Summary: Run-time component of boost timer library Requires: %{name}-chrono%{?_isa} = %{version}-%{release} Requires: %{name}-system%{?_isa} = %{version}-%{release} +Provides: boost169-timer = %{obsver} +Obsoletes: boost169-timer < %{obsver} %description timer @@ -422,6 +475,8 @@ with as little as one #include and one additional line of code. Summary: Run-time component of boost type erasure library Requires: %{name}-chrono%{?_isa} = %{version}-%{release} Requires: %{name}-system%{?_isa} = %{version}-%{release} +Provides: boost169-type_erasure = %{obsver} +Obsoletes: boost169-type_erasure < %{obsver} %description type_erasure @@ -435,6 +490,8 @@ Requires: %{name}-date-time%{?_isa} = %{version}-%{release} Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} Requires: %{name}-system%{?_isa} = %{version}-%{release} Requires: %{name}-thread%{?_isa} = %{version}-%{release} +Provides: boost169-wave = %{obsver} +Obsoletes: boost169-wave < %{obsver} %description wave @@ -449,6 +506,8 @@ Requires: libicu-devel%{?_isa} %if %{with quadmath} Requires: libquadmath-devel%{?_isa} %endif +Provides: boost169-devel = %{obsver} +Obsoletes: boost169-devel < %{obsver} %description devel Headers and shared object symbolic links for the Boost C++ libraries. @@ -456,6 +515,8 @@ Headers and shared object symbolic links for the Boost C++ libraries. %package static Summary: The Boost C++ static development libraries Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Provides: boost169-static = %{obsver} +Obsoletes: boost169-static < %{obsver} %description static Static Boost C++ libraries. @@ -465,6 +526,8 @@ Summary: HTML documentation for the Boost C++ libraries %if 0%{?rhel} >= 6 BuildArch: noarch %endif +Provides: boost169-doc = %{obsver} +Obsoletes: boost169-doc < %{obsver} %description doc This package contains the documentation in the HTML format of the Boost C++ @@ -477,6 +540,8 @@ Summary: Source examples for the Boost C++ libraries BuildArch: noarch %endif Requires: %{name}-devel = %{version}-%{release} +Provides: boost169-examples = %{obsver} +Obsoletes: boost169-examples < %{obsver} %description examples This package contains example source files distributed with boost. @@ -488,6 +553,8 @@ This package contains example source files distributed with boost. Summary: Run-time component of Boost.MPI library BuildRequires: openmpi-devel Requires: %{name}-serialization%{?_isa} = %{version}-%{release} +Provides: boost169-openmpi = %{obsver} +Obsoletes: boost169-openmpi < %{obsver} %description openmpi @@ -499,6 +566,8 @@ Summary: Shared library symbolic links for Boost.MPI Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: %{name}-graph-openmpi%{?_isa} = %{version}-%{release} +Provides: boost169-openmpi-devel = %{obsver} +Obsoletes: boost169-openmpi-devel < %{obsver} %description openmpi-devel @@ -513,6 +582,8 @@ Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: %{name}-python3%{?_isa} = %{version}-%{release} Requires: %{name}-serialization%{?_isa} = %{version}-%{release} Requires: python3-openmpi%{?_isa} +Provides: boost169-openmpi-python3 = %{obsver} +Obsoletes: boost169-openmpi-python3 < %{obsver} %description openmpi-python3 @@ -525,6 +596,8 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-python3-devel%{?_isa} = %{version}-%{release} Requires: %{name}-openmpi-devel%{?_isa} = %{version}-%{release} Requires: %{name}-openmpi-python3%{?_isa} = %{version}-%{release} +Provides: boost169-openmpi-python3-devel = %{obsver} +Obsoletes: boost169-openmpi-python3-devel < %{obsver} %description openmpi-python3-devel @@ -537,6 +610,8 @@ providing a clean C++ API over the OpenMPI implementation of MPI. Summary: Run-time component of parallel boost graph library Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: %{name}-serialization%{?_isa} = %{version}-%{release} +Provides: boost169-graph-openmpi = %{obsver} +Obsoletes: boost169-graph-openmpi < %{obsver} %description graph-openmpi @@ -554,6 +629,8 @@ back-end to do the parallel work. Summary: Run-time component of Boost.MPI library BuildRequires: mpich-devel Requires: %{name}-serialization%{?_isa} = %{version}-%{release} +Provides: boost169-mpich = %{obsver} +Obsoletes: boost169-mpich < %{obsver} %description mpich @@ -565,6 +642,8 @@ Summary: Shared library symbolic links for Boost.MPI Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: %{name}-graph-mpich%{?_isa} = %{version}-%{release} +Provides: boost169-mpich-devel = %{obsver} +Obsoletes: boost169-mpich-devel < %{obsver} %description mpich-devel @@ -579,6 +658,8 @@ Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: %{name}-python3%{?_isa} = %{version}-%{release} Requires: %{name}-serialization%{?_isa} = %{version}-%{release} Requires: python3-mpich%{?_isa} +Provides: boost169-mpich-python3 = %{obsver} +Obsoletes: boost169-mpich-python3 < %{obsver} %description mpich-python3 @@ -591,6 +672,8 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{name}-python3-devel%{?_isa} = %{version}-%{release} Requires: %{name}-mpich-devel%{?_isa} = %{version}-%{release} Requires: %{name}-mpich-python3%{?_isa} = %{version}-%{release} +Provides: boost169-mpich-python3-devel = %{obsver} +Obsoletes: boost169-mpich-python3-devel < %{obsver} %description mpich-python3-devel @@ -603,6 +686,8 @@ providing a clean C++ API over the MPICH implementation of MPI. Summary: Run-time component of parallel boost graph library Requires: %{name}-mpich%{?_isa} = %{version}-%{release} Requires: %{name}-serialization%{?_isa} = %{version}-%{release} +Provides: boost169-graph-mpich = %{obsver} +Obsoletes: boost169-graph-mpich < %{obsver} %description graph-mpich @@ -617,6 +702,8 @@ back-end to do the parallel work. Summary: Cross platform build system for C++ projects Requires: %{name}-jam BuildArch: noarch +Provides: boost169-build = %{obsver} +Obsoletes: boost169-build < %{obsver} %description build Boost.Build is an easy way to build C++ projects, everywhere. You name @@ -630,6 +717,8 @@ C++ compilers -- on Windows, OSX, Linux and commercial UNIX systems. Summary: Tools for working with Boost documentation Requires: docbook-dtds Requires: docbook-style-xsl +Provides: boost169-doctools = %{obsver} +Obsoletes: boost169-doctools < %{obsver} %description doctools @@ -637,6 +726,8 @@ Tools for working with Boost documentation in BoostBook or QuickBook format. %package jam Summary: A low-level build tool +Provides: boost169-jam = %{obsver} +Obsoletes: boost169-jam < %{obsver} %description jam Boost.Jam (BJam) is the low-level build engine tool for Boost.Build. @@ -1281,6 +1372,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Thu May 14 2020 Denis Arnaud - 1.69.0-18 +- Obsoletes all sub-packages of boost169 (on F32) (#1835079) + * Tue May 12 2020 Avi Kivity - 1.69.0-17 - Add patch for C++20 compatibility in Boost.Signals2 (#1834764) From d7303b452616c1d1dd1f676996dd32e56549d884 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 3 Mar 2021 12:19:42 +0000 Subject: [PATCH 5/5] Patch Boost.Locale to not access empty vector (#1899888) --- boost-1.73-locale-empty-vector.patch | 37 ++++++++++++++++++++++++++++ boost.spec | 10 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 boost-1.73-locale-empty-vector.patch diff --git a/boost-1.73-locale-empty-vector.patch b/boost-1.73-locale-empty-vector.patch new file mode 100644 index 0000000..f5cc981 --- /dev/null +++ b/boost-1.73-locale-empty-vector.patch @@ -0,0 +1,37 @@ +From daf4ef50c88c2b9a6bf2c40b537eebc202caad6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Gonzalve?= + +Date: Sat, 14 Nov 2020 10:39:47 +0100 +Subject: [PATCH] Do not try to access element when vector is empty + +Trying to access tmp[0] causes a crash on Fedora when assertion on STL +are enabled. + +/usr/include/c++/10/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = unsigned char; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = unsigned char&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. + +This patch just passes nullptr as pointer to getSortKey() when tmp size +is 0, preventing dereferencing elements in empty vector. + +I guess that &tmp[0] should be optimized as 'no real access' when +disabling assertion, but actually leads to crash when assert are +enabled. +--- + src/icu/collator.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/locale/src/icu/collator.cpp b/libs/locale/src/icu/collator.cpp +index 7f1ea6a..dc59e8c 100644 +--- a/libs/locale/src/icu/collator.cpp ++++ b/libs/locale/src/icu/collator.cpp +@@ -93,7 +93,7 @@ namespace boost { + std::vector tmp; + tmp.resize(str.length()); + icu::Collator *collate = get_collator(level); +- int len = collate->getSortKey(str,&tmp[0],tmp.size()); ++ int len = collate->getSortKey(str,tmp.empty()?nullptr:&tmp[0],tmp.size()); + if(len > int(tmp.size())) { + tmp.resize(len); + collate->getSortKey(str,&tmp[0],tmp.size()); +-- +2.26.2 + diff --git a/boost.spec b/boost.spec index 299b693..9beba5d 100644 --- a/boost.spec +++ b/boost.spec @@ -45,7 +45,7 @@ Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 %global obsver 1.69.0-7 -Release: 18%{?dist} +Release: 19%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -156,6 +156,10 @@ Patch87: boost-1.69.0-test-cxx20.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1834764 Patch88: auto_buffer-C-20-compatibility.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1899888 +# https://github.com/boostorg/locale/issues/52 +Patch94: boost-1.73-locale-empty-vector.patch + %bcond_with tests %bcond_with docs_generated @@ -753,6 +757,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch86 -p1 %patch87 -p2 %patch88 -p2 +%patch94 -p1 %build # Dump the versions being used into the build logs. @@ -1372,6 +1377,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Wed Mar 03 2021 Jonathan Wakely - 1.69.0-19 +- Patch Boost.Locale to not access empty vector (#1899888) + * Thu May 14 2020 Denis Arnaud - 1.69.0-18 - Obsoletes all sub-packages of boost169 (on F32) (#1835079)