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-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-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-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 45962b2..9beba5d 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: 14%{?dist} +%global obsver 1.69.0-7 +Release: 19%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -146,6 +147,19 @@ 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 + +# 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 + +# 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 @@ -161,6 +175,8 @@ in future standards.) %package atomic Summary: Run-time component of boost atomic library +Provides: boost169-atomic = %{obsver} +Obsoletes: boost169-atomic < %{obsver} %description atomic @@ -172,6 +188,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 @@ -179,6 +197,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 @@ -189,6 +209,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 @@ -202,6 +224,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 @@ -210,6 +234,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 @@ -220,6 +246,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 @@ -229,6 +257,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 @@ -239,6 +269,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 @@ -249,6 +281,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 @@ -258,6 +292,8 @@ Library (STL). %package iostreams Summary: Run-time component of boost iostreams library +Provides: boost169-iostreams = %{obsver} +Obsoletes: boost169-iostreams < %{obsver} %description iostreams @@ -269,6 +305,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 @@ -277,6 +315,8 @@ handling tools. %package log Summary: Run-time component of boost logging library +Provides: boost169-log = %{obsver} +Obsoletes: boost169-log < %{obsver} %description log @@ -286,6 +326,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 @@ -298,6 +340,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 @@ -311,6 +355,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 @@ -322,6 +368,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 @@ -336,6 +384,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 @@ -345,6 +395,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 @@ -352,6 +404,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 @@ -359,6 +413,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 @@ -366,6 +422,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 @@ -373,6 +431,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 @@ -381,6 +441,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 @@ -390,6 +452,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 @@ -402,6 +466,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 @@ -413,6 +479,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 @@ -426,6 +494,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 @@ -440,6 +510,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. @@ -447,6 +519,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. @@ -456,6 +530,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++ @@ -468,6 +544,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. @@ -479,6 +557,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 @@ -490,6 +570,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 @@ -504,6 +586,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 @@ -516,6 +600,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 @@ -528,6 +614,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 @@ -545,6 +633,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 @@ -556,6 +646,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 @@ -570,6 +662,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 @@ -582,6 +676,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 @@ -594,6 +690,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 @@ -608,6 +706,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 @@ -621,6 +721,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 @@ -628,6 +730,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. @@ -650,6 +754,10 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch83 -p1 %patch84 -p2 %patch85 -p2 +%patch86 -p1 +%patch87 -p2 +%patch88 -p2 +%patch94 -p1 %build # Dump the versions being used into the build logs. @@ -1269,6 +1377,21 @@ 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) + +* 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) + +* 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