From 6605c4a4025cd86a440eaf39d4f31a3b687e5abb Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 13 Feb 2013 13:18:54 +0100 Subject: [PATCH 1/3] Fix classifying incomplete UTF-8 sequences in Boost.Locale --- boost-1.50.0-invalid-utf8.patch | 52 +++++++++++++++++++++++++++++++++ boost.spec | 9 ++++-- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 boost-1.50.0-invalid-utf8.patch diff --git a/boost-1.50.0-invalid-utf8.patch b/boost-1.50.0-invalid-utf8.patch new file mode 100644 index 0000000..7ef51e9 --- /dev/null +++ b/boost-1.50.0-invalid-utf8.patch @@ -0,0 +1,52 @@ +Index: boost/locale/utf.hpp +=================================================================== +--- boost/locale/utf.hpp (revision 81589) ++++ boost/locale/utf.hpp (revision 81590) +@@ -219,16 +219,22 @@ + if(BOOST_LOCALE_UNLIKELY(p==e)) + return incomplete; + tmp = *p++; ++ if (!is_trail(tmp)) ++ return illegal; + c = (c << 6) | ( tmp & 0x3F); + case 2: + if(BOOST_LOCALE_UNLIKELY(p==e)) + return incomplete; + tmp = *p++; ++ if (!is_trail(tmp)) ++ return illegal; + c = (c << 6) | ( tmp & 0x3F); + case 1: + if(BOOST_LOCALE_UNLIKELY(p==e)) + return incomplete; + tmp = *p++; ++ if (!is_trail(tmp)) ++ return illegal; + c = (c << 6) | ( tmp & 0x3F); + } + +Index: libs/locale/test/test_codepage_converter.cpp +=================================================================== +--- libs/locale/test/test_codepage_converter.cpp (revision 81589) ++++ libs/locale/test/test_codepage_converter.cpp (revision 81590) +@@ -140,6 +140,20 @@ + TEST_TO("\xf8\x90\x80\x80\x80",illegal); // 400 0000 + TEST_TO("\xfd\xbf\xbf\xbf\xbf\xbf",illegal); // 7fff ffff + ++ std::cout << "-- Invalid trail" << std::endl; ++ TEST_TO("\xC2\x7F",illegal); ++ TEST_TO("\xdf\x7F",illegal); ++ TEST_TO("\xe0\x7F\x80",illegal); ++ TEST_TO("\xef\xbf\x7F",illegal); ++ TEST_TO("\xe0\x7F\x80",illegal); ++ TEST_TO("\xef\xbf\x7F",illegal); ++ TEST_TO("\xf0\x7F\x80\x80",illegal); ++ TEST_TO("\xf4\x7f\xbf\xbf",illegal); ++ TEST_TO("\xf0\x90\x7F\x80",illegal); ++ TEST_TO("\xf4\x8f\x7F\xbf",illegal); ++ TEST_TO("\xf0\x90\x80\x7F",illegal); ++ TEST_TO("\xf4\x8f\xbf\x7F",illegal); ++ + std::cout << "-- Invalid length" << std::endl; + + /// Test that this actually works diff --git a/boost.spec b/boost.spec index 7257d64..f86abb1 100644 --- a/boost.spec +++ b/boost.spec @@ -25,7 +25,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.50.0 %define version_enc 1_50_0 -Release: 4%{?dist} +Release: 5%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -108,6 +108,9 @@ Patch12: boost-1.50.0-polygon.patch # https://bugzilla.redhat.com/show_bug.cgi?id=828857 Patch15: boost-1.50.0-pool.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=907481 +Patch17: boost-1.50.0-invalid-utf8.patch + %bcond_with tests %bcond_with docs_generated @@ -485,6 +488,7 @@ a number of significant features and is now developed independently %patch10 -p1 %patch12 -p3 %patch15 -p0 +%patch17 -p0 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -969,9 +973,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog -* Thu Aug 16 2012 Petr Machata - 1.50.0-5 +* Wed Feb 13 2013 Petr Machata - 1.50.0-5 - Update %%description to reflect current state of C++ standardization. Courtesy of Jonathan Wakely. (#837813) +- Fix classifying incomplete UTF-8 sequences in Boost.Locale (#907481) * Wed Aug 15 2012 Petr Machata - 1.50.0-4 - Override boost_thread-mt.so with a linker script that brings in From c8d5eede58e8801a7689f3a509a1bf8da83ac854 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 27 Jun 2013 20:47:56 +0200 Subject: [PATCH 2/3] Add symlinks for /usr/lib/libboost_{thread,locale}.so -> *-mt.so --- boost.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/boost.spec b/boost.spec index f86abb1..c6b7104 100644 --- a/boost.spec +++ b/boost.spec @@ -25,7 +25,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.50.0 %define version_enc 1_50_0 -Release: 5%{?dist} +Release: 6%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -622,6 +622,14 @@ echo ============================= install serial ================== rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/ +# Add symlinks libboost_{thread,locale}.so -> *-mt.so +# https://bugzilla.redhat.com/show_bug.cgi?id=971956 +ln -s libboost_thread-mt.so $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so +ln -s libboost_locale-mt.so $RPM_BUILD_ROOT%{_libdir}/libboost_locale.so +# Check that we didn't forget about anything. +find $RPM_BUILD_ROOT%{_libdir} -maxdepth 1 -name libboost_\*-mt.so \ + | while read a; do test -e ${a/-mt/} || exit 1; done + echo ============================= install Boost.Build ================== (cd tools/build/v2 ./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install @@ -973,6 +981,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog +* Thu Jun 27 2013 Petr Machata - 1.50.0-6 +- Add symlinks for /usr/lib/libboost_{thread,locale}.so -> *-mt.so + * Wed Feb 13 2013 Petr Machata - 1.50.0-5 - Update %%description to reflect current state of C++ standardization. Courtesy of Jonathan Wakely. (#837813) From 92a8829062880ada02797a0848dc38382429f823 Mon Sep 17 00:00:00 2001 From: Deji Akingunola Date: Thu, 25 Jul 2013 01:15:40 -0400 Subject: [PATCH 3/3] Rename mpich2 sub-packages to mpich and rebuild for mpich-3.0 --- boost.spec | 103 +++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/boost.spec b/boost.spec index c6b7104..501df42 100644 --- a/boost.spec +++ b/boost.spec @@ -7,9 +7,9 @@ # Configuration of MPI back-ends %ifarch %{arm} - %bcond_with mpich2 + %bcond_with mpich %else - %bcond_without mpich2 + %bcond_without mpich %endif %ifarch s390 s390x %{arm} # No OpenMPI support on these arches @@ -25,7 +25,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.50.0 %define version_enc 1_50_0 -Release: 6%{?dist} +Release: 7%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -403,52 +403,60 @@ back-end to do the parallel work. %endif -%if %{with mpich2} +%if %{with mpich} -%package mpich2 +%package mpich Summary: Run-Time component of Boost.MPI library Group: System Environment/Libraries -Requires: mpich2 -BuildRequires: mpich2-devel +Requires: mpich +BuildRequires: mpich-devel +Provides: %{name}-mpich2 = %{version}-%{release} +Obsoletes: %{name}-mpich2 < 1.50.0-7 -%description mpich2 +%description mpich -Run-Time support for Boost.MPI-MPICH2, a library providing a clean C++ -API over the MPICH2 implementation of MPI. +Run-Time support for Boost.MPI-MPICH, a library providing a clean C++ +API over the MPICH implementation of MPI. -%package mpich2-devel +%package mpich-devel Summary: Shared library symbolic links for Boost.MPI Group: System Environment/Libraries Requires: boost-devel = %{version}-%{release} -Requires: boost-mpich2 = %{version}-%{release} -Requires: boost-mpich2-python = %{version}-%{release} -Requires: boost-graph-mpich2 = %{version}-%{release} +Requires: boost-mpich = %{version}-%{release} +Requires: boost-mpich-python = %{version}-%{release} +Requires: boost-graph-mpich = %{version}-%{release} +Provides: %{name}-mpich2-devel = %{version}-%{release} +Obsoletes: %{name}-mpich2-devel < 1.50.0-7 -%description mpich2-devel +%description mpich-devel -Devel package for Boost.MPI-MPICH2, a library providing a clean C++ -API over the MPICH2 implementation of MPI. +Devel package for Boost.MPI-MPICH, a library providing a clean C++ +API over the MPICH implementation of MPI. -%package mpich2-python +%package mpich-python Summary: Python run-time component of Boost.MPI library Group: System Environment/Libraries -Requires: boost-mpich2 = %{version}-%{release} +Requires: boost-mpich = %{version}-%{release} +Provides: %{name}-mpich2-python = %{version}-%{release} +Obsoletes: %{name}-mpich2-python < 1.50.0-7 -%description mpich2-python +%description mpich-python -Python support for Boost.MPI-MPICH2, a library providing a clean C++ -API over the MPICH2 implementation of MPI. +Python support for Boost.MPI-MPICH, a library providing a clean C++ +API over the MPICH implementation of MPI. -%package graph-mpich2 +%package graph-mpich Summary: Run-Time component of parallel boost graph library Group: System Environment/Libraries -Requires: boost-mpich2 = %{version}-%{release} +Requires: boost-mpich = %{version}-%{release} +Provides: %{name}-graph-mpich2 = %{version}-%{release} +Obsoletes: %{name}-graph-mpich2 < 1.50.0-7 -%description graph-mpich2 +%description graph-mpich Run-Time support for the Parallel BGL graph library. The interface and graph components are generic, in the same sense as the the Standard -Template Library (STL). This libraries in this package use MPICH2 +Template Library (STL). This libraries in this package use MPICH back-end to do the parallel work. %endif @@ -551,15 +559,15 @@ echo ============================= build $MPI_COMPILER ================== export PATH=/bin${PATH:+:}$PATH %endif -# Build MPI parts of Boost with MPICH2 support -%if %{with mpich2} -%{_mpich2_load} +# Build MPI parts of Boost with MPICH support +%if %{with mpich} +%{_mpich_load} echo ============================= build $MPI_COMPILER ================== ./b2 -d+2 -q %{?_smp_mflags} --layout=tagged \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ variant=release threading=multi debug-symbols=on pch=off \ python=%{python2_version} stage -%{_mpich2_unload} +%{_mpich_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -592,8 +600,8 @@ rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* export PATH=/bin${PATH:+:}$PATH %endif -%if %{with mpich2} -%{_mpich2_load} +%if %{with mpich} +%{_mpich_load} echo ============================= install $MPI_COMPILER ================== ./b2 -q %{?_smp_mflags} --layout=tagged \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ @@ -604,7 +612,7 @@ echo ============================= install $MPI_COMPILER ================== # Remove generic parts of boost that were built for dependencies. rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* -%{_mpich2_unload} +%{_mpich_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -910,8 +918,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root, -) %doc LICENSE_1_0.txt %{_libdir}/*.a -%if %{with mpich2} -%{_libdir}/mpich2/lib/*.a +%if %{with mpich} +%{_libdir}/mpich/lib/*.a %endif %if %{with openmpi} %{_libdir}/openmpi/lib/*.a @@ -943,29 +951,29 @@ rm -rf $RPM_BUILD_ROOT %endif -# MPICH2 packages -%if %{with mpich2} +# MPICH packages +%if %{with mpich} -%files mpich2 +%files mpich %defattr(-, root, root, -) %doc LICENSE_1_0.txt -%{_libdir}/mpich2/lib/libboost_mpi-mt.so.%{sonamever} +%{_libdir}/mpich/lib/libboost_mpi-mt.so.%{sonamever} -%files mpich2-devel +%files mpich-devel %defattr(-, root, root, -) %doc LICENSE_1_0.txt -%{_libdir}/mpich2/lib/libboost_*.so +%{_libdir}/mpich/lib/libboost_*.so -%files mpich2-python +%files mpich-python %defattr(-, root, root, -) %doc LICENSE_1_0.txt -%{_libdir}/mpich2/lib/libboost_mpi_python*.so.%{sonamever} -%{_libdir}/mpich2/lib/mpi.so +%{_libdir}/mpich/lib/libboost_mpi_python*.so.%{sonamever} +%{_libdir}/mpich/lib/mpi.so -%files graph-mpich2 +%files graph-mpich %defattr(-, root, root, -) %doc LICENSE_1_0.txt -%{_libdir}/mpich2/lib/libboost_graph_parallel-mt.so.%{sonamever} +%{_libdir}/mpich/lib/libboost_graph_parallel-mt.so.%{sonamever} %endif @@ -981,6 +989,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog +* Thu Jul 25 2013 Deji Akingunola - 1.50.0-7 +- Rename mpich2 sub-packages to mpich and rebuild for mpich-3.0 + * Thu Jun 27 2013 Petr Machata - 1.50.0-6 - Add symlinks for /usr/lib/libboost_{thread,locale}.so -> *-mt.so