From c59dfe76602420faefed4cc25204225e54618fc2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:04:30 +0000 Subject: import boost-1.53.0-26.el7 --- diff --git a/SOURCES/boost-1.53.0-no-rpath.patch b/SOURCES/boost-1.53.0-no-rpath.patch new file mode 100644 index 0000000..5b5e482 --- /dev/null +++ b/SOURCES/boost-1.53.0-no-rpath.patch @@ -0,0 +1,11 @@ +--- boost_1_53_0/tools/build/v2/tools/gcc.jam.rpath 2016-06-10 13:56:13.554723863 +0100 ++++ boost_1_53_0/tools/build/v2/tools/gcc.jam 2016-06-10 13:56:40.027816092 +0100 +@@ -937,7 +937,7 @@ + + actions link bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(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) + + } + diff --git a/SOURCES/boost-1.53.0-no-ssl3.patch b/SOURCES/boost-1.53.0-no-ssl3.patch new file mode 100644 index 0000000..d3faf9d --- /dev/null +++ b/SOURCES/boost-1.53.0-no-ssl3.patch @@ -0,0 +1,25 @@ +--- boost_1_53_0.dist/boost/asio/ssl/impl/context.ipp 2012-12-30 15:17:13.000000000 -0800 ++++ boost_1_53_0.dist/boost/asio/ssl/impl/context.ipp 2016-01-12 16:15:45.178958712 -0800 +@@ -57,6 +57,14 @@ + handle_ = ::SSL_CTX_new(::SSLv2_server_method()); + break; + #endif // defined(OPENSSL_NO_SSL2) ++#if defined(OPENSSL_NO_SSL3) ++ case context::sslv3: ++ case context::sslv3_client: ++ case context::sslv3_server: ++ boost::asio::detail::throw_error( ++ boost::asio::error::invalid_argument, "context"); ++ break; ++#else // defined(OPENSSL_NO_SSL3) + case context::sslv3: + handle_ = ::SSL_CTX_new(::SSLv3_method()); + break; +@@ -66,6 +74,7 @@ + case context::sslv3_server: + handle_ = ::SSL_CTX_new(::SSLv3_server_method()); + break; ++#endif // defined(OPENSSL_NO_SSL3) + case context::tlsv1: + handle_ = ::SSL_CTX_new(::TLSv1_method()); + break; diff --git a/SOURCES/boost-1.53.0-python-abi_letters.patch b/SOURCES/boost-1.53.0-python-abi_letters.patch new file mode 100644 index 0000000..cca97d1 --- /dev/null +++ b/SOURCES/boost-1.53.0-python-abi_letters.patch @@ -0,0 +1,62 @@ +--- boost_1_53_0/tools/build/v2/tools/python.jam.orig 2012-04-26 04:35:55.000000000 +0100 ++++ boost_1_53_0/tools/build/v2/tools/python.jam 2016-05-11 15:13:47.628380504 +0100 +@@ -95,7 +95,7 @@ feature.feature pythonpath : : free opti + # using python : 2.3 : /usr/local/bin/python ; + # + rule init ( version ? : cmd-or-prefix ? : includes * : libraries ? +- : condition * : extension-suffix ? ) ++ : condition * : extension-suffix ? : abi-letters ? ) + { + project.push-current $(.project) ; + +@@ -108,7 +108,7 @@ rule init ( version ? : cmd-or-prefix ? + } + } + +- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ; ++ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ; + + project.pop-current ; + } +@@ -662,7 +662,7 @@ local rule system-library-dependencies ( + + # Declare a target to represent Python's library. + # +-local rule declare-libpython-target ( version ? : requirements * ) ++local rule declare-libpython-target ( version ? : requirements * : abi-letters ? ) + { + # Compute the representation of Python version in the name of Python's + # library file. +@@ -686,13 +686,13 @@ local rule declare-libpython-target ( ve + } + + # Declare it. +- lib python.lib : : python$(lib-version) $(requirements) ; ++ lib python.lib : : python$(lib-version)$(abi-letters) $(requirements) ; + } + + + # Implementation of init. + local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : +- condition * : extension-suffix ? ) ++ condition * : extension-suffix ? : abi-letters ? ) + { + local prefix ; + local exec-prefix ; +@@ -708,6 +708,7 @@ local rule configure ( version ? : cmd-o + extension-suffix ?= _d ; + } + extension-suffix ?= "" ; ++ abi-letters ?= "" ; + + # Normalize and dissect any version number. + local major-minor ; +@@ -931,7 +932,7 @@ local rule configure ( version ? : cmd-o + } + else + { +- declare-libpython-target $(version) : $(target-requirements) ; ++ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ; + + # This is an evil hack. On, Windows, when Python is embedded, nothing + # seems to set up sys.path to include Python's standard library diff --git a/SOURCES/boost-1.53.0-python-libpython_dep.patch b/SOURCES/boost-1.53.0-python-libpython_dep.patch new file mode 100644 index 0000000..3b49c51 --- /dev/null +++ b/SOURCES/boost-1.53.0-python-libpython_dep.patch @@ -0,0 +1,11 @@ +--- boost_1_53_0/tools/build/v2/tools/python.jam.orig 2016-05-11 15:13:47.628380504 +0100 ++++ boost_1_53_0/tools/build/v2/tools/python.jam 2016-05-11 15:14:25.337485463 +0100 +@@ -996,7 +996,7 @@ local rule configure ( version ? : cmd-o + else + { + alias python_for_extensions +- : ++ : python + : $(target-requirements) + : + : $(usage-requirements) diff --git a/SOURCES/boost-1.53.0-python-test-PyImport_AppendInittab.patch b/SOURCES/boost-1.53.0-python-test-PyImport_AppendInittab.patch new file mode 100644 index 0000000..fdd8df0 --- /dev/null +++ b/SOURCES/boost-1.53.0-python-test-PyImport_AppendInittab.patch @@ -0,0 +1,98 @@ +diff -up boost_1_53_0/libs/python/test/exec.cpp\~ boost_1_53_0/libs/python/test/exec.cpp +--- boost_1_53_0/libs/python/test/exec.cpp~ 2010-07-05 00:38:38.000000000 +0200 ++++ boost_1_53_0/libs/python/test/exec.cpp 2015-01-09 21:31:12.903218280 +0100 +@@ -56,6 +56,20 @@ void eval_test() + BOOST_TEST(value == "ABCDEFG"); + } + ++struct PyCtx ++{ ++ PyCtx() { ++ Py_Initialize(); ++ } ++ ++ ~PyCtx() { ++ // N.B. certain problems may arise when Py_Finalize is called when ++ // using Boost.Python. However in this test suite it all seems to ++ // work fine. ++ Py_Finalize(); ++ } ++}; ++ + void exec_test() + { + // Register the module with the interpreter +@@ -68,6 +82,8 @@ void exec_test() + ) == -1) + throw std::runtime_error("Failed to add embedded_hello to the interpreter's " + "builtin modules"); ++ ++ PyCtx ctx; + // Retrieve the main module + python::object main = python::import("__main__"); + +@@ -148,41 +164,43 @@ void check_pyerr(bool pyerr_expected=fal + } + } + ++template ++bool ++run_and_handle_exception(Cb cb, bool pyerr_expected = false) ++{ ++ PyCtx ctx; ++ if (python::handle_exception(cb)) { ++ check_pyerr(pyerr_expected); ++ return true; ++ } else { ++ return false; ++ } ++} ++ + int main(int argc, char **argv) + { + BOOST_TEST(argc == 2 || argc == 3); + std::string script = argv[1]; +- // Initialize the interpreter +- Py_Initialize(); + +- if (python::handle_exception(eval_test)) { +- check_pyerr(); +- } +- else if(python::handle_exception(exec_test)) { +- check_pyerr(); +- } +- else if (python::handle_exception(boost::bind(exec_file_test, script))) { ++ // N.B. exec_test mustn't be called through run_and_handle_exception ++ // as it needs to handles the python context by itself. ++ if (run_and_handle_exception(eval_test) ++ || python::handle_exception(exec_test)) + check_pyerr(); +- } +- +- if (python::handle_exception(exec_test_error)) +- { +- check_pyerr(/*pyerr_expected*/ true); +- } + else +- { ++ run_and_handle_exception(boost::bind(exec_file_test, script)); ++ ++ if (!run_and_handle_exception(exec_test_error, true)) + BOOST_ERROR("Python exception expected, but not seen."); +- } + + if (argc > 2) { ++ PyCtx ctx; + // The main purpose is to test compilation. Since this test generates + // a file and I (rwgk) am uncertain about the side-effects, run it only + // if explicitly requested. + exercise_embedding_html(); + } + +- // Boost.Python doesn't support Py_Finalize yet. +- // Py_Finalize(); + return boost::report_errors(); + } + + +Diff finished. Fri Jan 9 21:31:13 2015 diff --git a/SPECS/boost.spec b/SPECS/boost.spec index d31aea1..81fc3f1 100644 --- a/SPECS/boost.spec +++ b/SPECS/boost.spec @@ -34,7 +34,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.53.0 %define version_enc 1_53_0 -Release: 25%{?dist} +Release: 26%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -75,14 +75,14 @@ Requires: boost-thread%{?_isa} = %{version}-%{release} Requires: boost-timer%{?_isa} = %{version}-%{release} Requires: boost-wave%{?_isa} = %{version}-%{release} -BuildRequires: libstdc++-devel%{?_isa} -BuildRequires: bzip2-devel%{?_isa} -BuildRequires: zlib-devel%{?_isa} -BuildRequires: python-devel%{?_isa} +BuildRequires: libstdc++-devel +BuildRequires: bzip2-devel +BuildRequires: zlib-devel +BuildRequires: python-devel %if %{with python3} -BuildRequires: python3-devel%{?_isa} +BuildRequires: python3-devel %endif -BuildRequires: libicu-devel%{?_isa} +BuildRequires: libicu-devel BuildRequires: chrpath # https://svn.boost.org/trac/boost/ticket/6150 @@ -212,6 +212,16 @@ Patch56: boost-1.54.0-interprocess-atomic_cas32-ppc.patch # https://svn.boost.org/trac/boost/ticket/7421 Patch57: boost-1.53.0-lexical_cast.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1298227 +# https://github.com/boostorg/asio/pull/23 +Patch58: boost-1.53.0-no-ssl3.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1302120 +Patch61: boost-1.53.0-python-libpython_dep.patch +Patch62: boost-1.53.0-python-abi_letters.patch +Patch63: boost-1.53.0-python-test-PyImport_AppendInittab.patch +Patch64: boost-1.53.0-no-rpath.patch + %bcond_with tests %bcond_with docs_generated @@ -675,9 +685,14 @@ a number of significant features and is now developed independently %patch52 -p1 %patch53 -p1 %patch54 -p1 -%patch55 -p1 +%patch55 -p1 -b .buildflags %patch56 -p1 %patch57 -p2 +%patch58 -p1 +%patch61 -p1 +%patch62 -p1 +%patch63 -p1 +%patch64 -p1 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -698,11 +713,13 @@ cat >> ./tools/build/v2/user-config.jam << EOF # There are many strict aliasing warnings, and it's not feasible to go # through them all at this time. using gcc : : : "$RPM_OPT_FLAGS -fno-strict-aliasing" ; +%if %{with openmpi} || %{with mpich} using mpi ; +%endif %if %{with python3} # This _adds_ extra python version. It doesn't replace whatever # python 2.X is default on the system. -using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} ; +using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{python3_abiflags} ; %endif EOF @@ -856,6 +873,8 @@ echo ============================= install Boost.Build ================== rm -f $RPM_BUILD_ROOT%{_datadir}/boost-build/tools/doxygen/windows-paths-check.hpp # Install the manual page %{__install} -p -m 644 doc/bjam.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/bjam.1 + # Install the unpatched gcc.jam + %{__install} -p -m 644 tools/gcc.jam.buildflags -D $RPM_BUILD_ROOT%{_datadir}/boost-build/tools/gcc.jam ) # Install documentation files (HTML pages) within the temporary place @@ -1249,6 +1268,21 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog +* Fri Jun 10 2016 Jonathan Wakely - 1.53.0-26 +- Install unpatched gcc.jam (#1305019). +- Build libboost_python and libboost_python3 such that they depend on + their respective libpython (#1302120). + (boost-1.53.0-python-libpython_dep.patch, + boost-1.53.0-python-abi_letters.patch) +- Fix Boost.Python test suite so that PyImport_AppendInittab is called + before PyInitialize, which broke the test suite with Python 3. + (boost-1.53.0-python-test-PyImport_AppendInittab.patch) +- Patch gcc.jam to not add bogus rpaths. + +* Mon Jun 06 2016 Jonathan Wakely - 1.53.0-26 +- do not use arch-specific BuildRequires (#1268268) +- support TLS libraries without SSLv3 (#1298227) + * Tue Sep 01 2015 Jonathan Wakely - 1.53.0-25 - Rebuilt for openmpi update (#1258794)