diff --git a/boost-1.50.0-fix-non-utf8-files.patch b/boost-1.50.0-fix-non-utf8-files.patch deleted file mode 100644 index e0334ff4463dc1aaf5c9cdaad279738936621bb1..0000000000000000000000000000000000000000 --- a/boost-1.50.0-fix-non-utf8-files.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/libs/units/example/autoprefixes.cpp b/libs/units/example/autoprefixes.cpp -index 9966766c6..090be0906 100644 ---- a/libs/units/example/autoprefixes.cpp -+++ b/libs/units/example/autoprefixes.cpp -@@ -67,7 +67,7 @@ struct thing_base_unit : boost::units::base_unit - { - static constexpr const char* name() { return("EUR"); } -- static constexpr const char* symbol() { return("€"); } -+ static constexpr const char* symbol() { return("€"); } - }; - - int main() -@@ -140,7 +140,7 @@ int main() - - quantity ce = 2048. * euro_base_unit::unit_type(); - cout << name_format << engineering_prefix << ce << endl; // 2.048 kiloEUR -- cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€ -+ cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€ - - - return 0; --- -2.19.1 diff --git a/boost-1.66.0-no-rpath.patch b/boost-1.66.0-no-rpath.patch index e69e0b4c0d2e1d05f3d752f2aff57686d69ea5f9..beb26ef113bfe81f0df3c0cc86d68e0eeada0c63 100644 --- a/boost-1.66.0-no-rpath.patch +++ b/boost-1.66.0-no-rpath.patch @@ -1,6 +1,14 @@ ---- boost_1_66_0/tools/build/src/tools/gcc.jam~ 2018-01-19 13:23:45.361330881 +0000 -+++ boost_1_66_0/tools/build/src/tools/gcc.jam 2018-01-19 13:23:45.362330880 +0000 -@@ -1191,7 +1191,7 @@ rule link ( targets * : sources * : prop +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index ff3209f7b..04520bc01 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -1132,17 +1132,17 @@ actions link.mingw bind LIBRARIES + + actions link.dll.mingw bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" -shared @"@($(<[-1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[0])" -o "$(<[-1])" -shared @"@($(<[-1]:T).rsp:E=$(START-GROUP) "$(>:T)" "$(LIBRARIES:T)" $(FINDLIBS-ST-PFX:T) -l$(FINDLIBS-ST:T) $(FINDLIBS-SA-PFX:T) -l$(FINDLIBS-SA:T) $(END-GROUP))" $(OPTIONS) $(USER_OPTIONS) + } actions link bind LIBRARIES { @@ -8,9 +16,6 @@ + "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) } - rule link.dll ( targets * : sources * : properties * ) -@@ -1204,7 +1204,7 @@ rule link.dll ( targets * : sources * : - # Differs from 'link' above only by -shared. actions link.dll bind LIBRARIES { - "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) @@ -18,3 +23,5 @@ } ### +-- +2.23.0 \ No newline at end of file diff --git a/boost-1.73-locale-empty-vector.patch b/boost-1.73-locale-empty-vector.patch new file mode 100644 index 0000000000000000000000000000000000000000..fe063c78f1df7b535417112c5cbf379c96be82ef --- /dev/null +++ b/boost-1.73-locale-empty-vector.patch @@ -0,0 +1,36 @@ +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 3e3915ece49aa6cc40d0e54c1fa0a65bc4acca09..46a09fe5ba3d95b8b17a90d1dd78a7af2c4956d9 100644 --- a/boost.spec +++ b/boost.spec @@ -1,7 +1,7 @@ %global boost_docdir __tmp_docdir %global boost_examplesdir __tmp_examplesdir -%global version_enc 1_73_0 -%global version_mid 73 +%global version_enc 1_75_0 +%global version_mid 75 %global toplev_dirname %{name}_%{version_enc} %global sonamever %{version} %global python3_lib_version 38 @@ -21,8 +21,8 @@ %bcond_with docs_generated Name: boost -Version: 1.73.0 -Release: 2 +Version: 1.75.0 +Release: 1 Summary: The free peer-reviewed portable C++ source libraries License: Boost Software license V1.0 URL: http://www.boost.org @@ -30,19 +30,20 @@ Source0: https://sourceforge.net/projects/boost/files/boost/%{version}/%{ Source1: libboost_thread.so Source2: bjam -# https://svn.boost.org/trac/boost/ticket/6150 -Patch1: boost-1.50.0-fix-non-utf8-files.patch - # https://bugzilla.redhat.com/show_bug.cgi?id=828856 # https://bugzilla.redhat.com/show_bug.cgi?id=828857 # https://svn.boost.org/trac/boost/ticket/6701 -Patch2: boost-1.58.0-pool.patch +Patch1: boost-1.58.0-pool.patch # https://svn.boost.org/trac/boost/ticket/9038 -Patch3: boost-1.58.0-pool-test_linking.patch +Patch2: boost-1.58.0-pool-test_linking.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1318383 -Patch4: boost-1.66.0-no-rpath.patch +Patch3: boost-1.66.0-no-rpath.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1899888 +# https://github.com/boostorg/locale/issues/52 +Patch4: boost-1.73-locale-empty-vector.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -585,8 +586,8 @@ 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 -%patch1 -p1 -%patch2 -p0 +%patch1 -p0 +%patch2 -p1 %patch3 -p1 %patch4 -p1 @@ -710,10 +711,6 @@ rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake -version=%{version} -rm ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_*.so.${version%%.*} -rm ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_*.so.${version%%%%.*} - %{_openmpi_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -739,10 +736,6 @@ rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake -version=%{version} -rm ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_*.so.${version%%.*} -rm ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_*.so.${version%%%%.*} - %{_mpich_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -769,8 +762,6 @@ install -p -m 644 $(basename %{SOURCE1}) $RPM_BUILD_ROOT%{_libdir}/ rm -r $RPM_BUILD_ROOT/%{_libdir}/cmake version=%{version} -rm $RPM_BUILD_ROOT%{_libdir}/libboost_*.so.${version%%.*} -rm $RPM_BUILD_ROOT%{_libdir}/libboost_*.so.${version%%%%.*} echo ============================= install Boost.Build ================== (cd tools/build @@ -1051,6 +1042,7 @@ fi %license LICENSE_1_0.txt %{_includedir}/%{name} %{_libdir}/*.so +%{_libdir}/*.so.* %{_libdir}/*.a %if 0%{with mpich} %{_libdir}/mpich/lib/*.a @@ -1135,6 +1127,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Wed Feb 3 2021 xinghe - 1.75.0-1 +- update version to 1.75.0 + * Wed Dec 16 2020 xinghe - 1.73.0-2 - correct license diff --git a/boost_1_73_0.tar.bz2 b/boost_1_75_0.tar.bz2 similarity index 81% rename from boost_1_73_0.tar.bz2 rename to boost_1_75_0.tar.bz2 index a8e153013be01809f26362c43478b4763cc21010..1a5d6590555afdfada1428f1469ec2a8053e10b5 100644 Binary files a/boost_1_73_0.tar.bz2 and b/boost_1_75_0.tar.bz2 differ