[arch-commits] Commit in ceph/trunk (PKGBUILD boost-1.66-compatibility.patch)
Thore Bödecker
foxxx0 at archlinux.org
Thu Jan 4 10:38:07 UTC 2018
Date: Thursday, January 4, 2018 @ 10:38:06
Author: foxxx0
Revision: 278613
upgpkg: ceph 12.2.2-3
add patches for boost 1.66 compatibility
Added:
ceph/trunk/boost-1.66-compatibility.patch
Modified:
ceph/trunk/PKGBUILD
--------------------------------+
PKGBUILD | 27 ++++-
boost-1.66-compatibility.patch | 204 +++++++++++++++++++++++++++++++++++++++
2 files changed, 226 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-01-04 10:24:31 UTC (rev 278612)
+++ PKGBUILD 2018-01-04 10:38:06 UTC (rev 278613)
@@ -4,7 +4,7 @@
pkgbase='ceph'
pkgname=('ceph' 'ceph-libs')
pkgver=12.2.2
-pkgrel=1
+pkgrel=3
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
arch=('x86_64')
url='https://ceph.com/'
@@ -25,13 +25,15 @@
'fix-ceph_disk-python-interpreter.patch'
'fix-or-disable-broken-tests.patch'
'fix-python2-paths.patch'
- 'remove-distro-version-detection.patch')
+ 'remove-distro-version-detection.patch'
+ 'boost-1.66-compatibility.patch')
sha512sums=('89b166dc4b58e0110ebe0147eef9f47e1090ccee01702b3f72cfbdca856d02bf03b2663de9e88c84b21a2a61f8f92211e217a05b8bdcf7d5de3158adbe49db88'
'4354001c1abd9a0c385ba7bd529e3638fb6660b6a88d4e49706d4ac21c81b8e829303a20fb5445730bdac18c4865efb10bc809c1cd56d743c12aa9a52e160049'
'7abd94a333fb0d6c9f7156d69ed6d4bf123f0f3030407f4347209d677b282e5023664d43e74a21a27b7856d3493ae469a17ea8a810331c7266018cc34eee4841'
'40446e298ab6b735b149d26ac26d273d6e159c319bb79f112614f1d4933a5a2684007fc9a1d660c5d4a17075d8bac59019c6cc7e66d64d4e240a1a61454800ef'
'd5d9e8123833212f6cf0ecef209a5dd9b9a8ec70d780b5140884dc9f87690ec305fb2569c5d1da2b28deb05bd03caecc534acc9dc5ce7ec75e2580df4b5b2063'
- 'e2ed33e2ac37bfdb9597083388e1a87f10051e976033055d440b1a4bc2bd11148c29128fb9841771ca983c12fb36b343bcc04219dea87199321ceea9aa18b3cc')
+ 'e2ed33e2ac37bfdb9597083388e1a87f10051e976033055d440b1a4bc2bd11148c29128fb9841771ca983c12fb36b343bcc04219dea87199321ceea9aa18b3cc'
+ '51d4e7aa735c611aabb150a1bee6f791cc2de0d808a750e0cadf771507cf810420078a057c7805a5ae763aa81bdf7bed33a3a4d803d3e9db3657c08e1005edce')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
@@ -57,6 +59,17 @@
if mount | grep 'type btrfs' &>/dev/null; then
sed -i '/run-tox-ceph-disk/d' src/test/CMakeLists.txt
fi
+
+ # fix python interpreter -> python2
+ for file in \
+ src/ceph-create-keys \
+ src/ceph-rest-api \
+ src/mount.fuse.ceph \
+ src/brag/client/ceph-brag \
+ src/ceph-detect-init/ceph_detect_init/main.py
+ do
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${file}"
+ done
}
build() {
@@ -65,6 +78,10 @@
mkdir -p build
cd build
+ # experimental in luminous: (and currently broken with boost 1.66)
+ # RADOSGW_BEAST_FRONTEND
+ # -> disabled
+
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
@@ -80,7 +97,7 @@
-DWITH_NSS=ON \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
-DWITH_RADOSGW=ON \
- -DWITH_RADOSGW_BEAST_FRONTEND=ON \
+ -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
-DWITH_RDMA=OFF \
-DWITH_SSL=ON \
-DWITH_SYSTEM_BOOST=ON \
@@ -107,7 +124,7 @@
package_ceph-libs() {
depends=('boost-libs' 'curl' 'glibc' 'keyutils' 'leveldb' 'libaio'
- 'libutil-linux' 'nss' 'python2' 'xfsprogs')
+ 'libutil-linux' 'lz4' 'nss' 'python2' 'xfsprogs')
cd "${srcdir}/${pkgbase}-${pkgver}/build"
Added: boost-1.66-compatibility.patch
===================================================================
--- boost-1.66-compatibility.patch (rev 0)
+++ boost-1.66-compatibility.patch 2018-01-04 10:38:06 UTC (rev 278613)
@@ -0,0 +1,204 @@
+From 746c218c620d7681f6c9d769631ee1ac0d2b5987 Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley at redhat.com>
+Date: Thu, 6 Jul 2017 16:31:23 -0400
+Subject: [PATCH 1/6] rgw: update beast frontend/submodule to v116
+
+Signed-off-by: Casey Bodley <cbodley at redhat.com>
+---
+ src/rgw/rgw_env.cc | 2 +-
+ 5 files changed, 39 insertions(+), 79 deletions(-)
+
+diff --git a/src/rgw/rgw_env.cc b/src/rgw/rgw_env.cc
+index 8be133d67f80..f17b7832ba94 100644
+--- a/src/rgw/rgw_env.cc
++++ b/src/rgw/rgw_env.cc
+@@ -19,7 +19,7 @@ void RGWEnv::init(CephContext *cct)
+
+ void RGWEnv::set(const boost::string_ref& name, const boost::string_ref& val)
+ {
+- env_map[std::string{name}] = std::string{val};
++ env_map[name.to_string()] = val.to_string();
+ }
+
+ void RGWEnv::init(CephContext *cct, char **envp)
+
+From b904b575042d6598a9cf74d23beecd4884e097d2 Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley at redhat.com>
+Date: Mon, 25 Sep 2017 11:13:08 -0400
+Subject: [PATCH 5/6] rgw: remove boost::coroutine and context deps
+
+the beast frontend no longer uses stackful coroutines, so these
+dependencies aren't necessary
+
+Signed-off-by: Casey Bodley <cbodley at redhat.com>
+---
+ CMakeLists.txt | 4 ----
+ src/rgw/CMakeLists.txt | 5 -----
+ 2 files changed, 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d30d00eded8a..6b6a827a2e8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -543,10 +543,6 @@ if(WITH_MGR)
+ list(APPEND BOOST_COMPONENTS python)
+ endif()
+
+-if(WITH_RADOSGW_BEAST_FRONTEND)
+- list(APPEND BOOST_COMPONENTS coroutine context)
+-endif()
+-
+ set(Boost_USE_MULTITHREADED ON)
+ # require minimally the bundled version
+ if(WITH_SYSTEM_BOOST)
+diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
+index 8aa91b3fc031..cf93257e9a63 100644
+--- a/src/rgw/CMakeLists.txt
++++ b/src/rgw/CMakeLists.txt
+@@ -173,11 +173,6 @@ endif (WITH_RADOSGW_BEAST_FRONTEND)
+ add_library(radosgw_a STATIC ${radosgw_srcs}
+ $<TARGET_OBJECTS:civetweb_common_objs>)
+ target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
+-if(WITH_RADOSGW_BEAST_FRONTEND)
+- target_link_libraries(radosgw_a
+- Boost::coroutine
+- Boost::context)
+-endif()
+
+ add_executable(radosgw rgw_main.cc)
+ target_link_libraries(radosgw radosgw_a librados
+
+From 18c6235cb1af3268595d879c6b42c21c6dcc735a Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley at redhat.com>
+Date: Mon, 18 Dec 2017 13:03:35 -0500
+Subject: [PATCH 1/5] cmake: update minimum boost version to 1.66
+
+Signed-off-by: Casey Bodley <cbodley at redhat.com>
+---
+ CMakeLists.txt | 4 ++--
+ cmake/modules/BuildBoost.cmake | 6 +++---
+ make-dist | 4 ++--
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 889b6f9fc7d2..fd9761fcfa2b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -555,13 +555,13 @@ if(WITH_SYSTEM_BOOST)
+ else()
+ set(Boost_USE_STATIC_LIBS ON)
+ endif()
+- find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
++ find_package(Boost 1.66 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
+ else()
+ set(BOOST_J 1 CACHE STRING
+ "max jobs for Boost build") # override w/-DBOOST_J=<n>
+ set(Boost_USE_STATIC_LIBS ON)
+ include(BuildBoost)
+- build_boost(1.63
++ build_boost(1.66
+ COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
+ include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
+ endif()
+diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
+index d70828398ecf..36ac6b925bf1 100644
+--- a/cmake/modules/BuildBoost.cmake
++++ b/cmake/modules/BuildBoost.cmake
+@@ -79,12 +79,12 @@ function(do_build_boost version)
+ message(STATUS "boost already in src")
+ set(source_dir
+ SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
+- elseif(version VERSION_GREATER 1.63)
++ elseif(version VERSION_GREATER 1.66)
+ message(FATAL_ERROR "Unknown BOOST_REQUESTED_VERSION: ${version}")
+ else()
+ message(STATUS "boost will be downloaded from sf.net")
+- set(boost_version 1.63.0)
+- set(boost_md5 1c837ecd990bb022d07e7aab32b09847)
++ set(boost_version 1.66.0)
++ set(boost_md5 b2dfbd6c717be4a7bb2d88018eaccf75)
+ string(REPLACE "." "_" boost_version_underscore ${boost_version} )
+ set(boost_url http://downloads.sourceforge.net/project/boost/boost/${boost_version}/boost_${boost_version_underscore}.tar.bz2)
+
+From 88a75c38287b5a9782bda8925e303f716ad57857 Mon Sep 17 00:00:00 2001
+From: Casey Bodley <cbodley at redhat.com>
+Date: Sun, 26 Nov 2017 15:46:26 -0500
+Subject: [PATCH 4/5] cmake: add WITH_BOOST_CONTEXT option
+
+adds a more specific option for this boost::context dependency, which was
+previously only used by the radosgw beast frontend. see
+http://tracker.ceph.com/issues/20048 for more background
+
+Signed-off-by: Casey Bodley <cbodley at redhat.com>
+---
+ CMakeLists.txt | 12 ++++++++++++
+ ceph.spec.in | 4 ++--
+ debian/rules | 6 +++---
+ src/include/config-h.in.cmake | 3 +++
+ 4 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fd9761fcfa2b..2337694180e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,6 +362,11 @@ if(WITH_BLKIN)
+ include_directories(SYSTEM src/blkin/blkin-lib)
+ endif(WITH_BLKIN)
+
++option(WITH_BOOST_CONTEXT "Enable boost::asio stackful coroutines" ON)
++if(WITH_BOOST_CONTEXT)
++ set(HAVE_BOOST_CONTEXT ON)
++endif()
++
+ #option for RGW
+ option(WITH_RADOSGW "Rados Gateway is enabled" ON)
+ option(WITH_RADOSGW_FCGI_FRONTEND "Rados Gateway's FCGI frontend is enabled" OFF)
+@@ -371,6 +376,10 @@ if(WITH_RADOSGW)
+ if(WITH_RADOSGW_FCGI_FRONTEND)
+ find_package(fcgi REQUIRED)
+ endif()
++ if(WITH_RADOSGW_BEAST_FRONTEND AND NOT WITH_BOOST_CONTEXT)
++ message(WARNING "disabling WITH_RADOSGW_BEAST_FRONTEND, which depends on WITH_BOOST_CONTEXT")
++ set(WITH_RADOSGW_BEAST_FRONTEND OFF)
++ endif()
+ endif(WITH_RADOSGW)
+
+
+@@ -542,6 +551,9 @@ set(BOOST_HEADER_COMPONENTS container)
+ if(WITH_MGR)
+ list(APPEND BOOST_COMPONENTS python)
+ endif()
++if(WITH_BOOST_CONTEXT)
++ list(APPEND BOOST_COMPONENTS context coroutine)
++endif()
+
+ set(Boost_USE_MULTITHREADED ON)
+ # require minimally the bundled version
+diff --git a/ceph.spec.in b/ceph.spec.in
+index 70ab1799eace..b4e10c68e347 100644
+--- a/ceph.spec.in
++++ b/ceph.spec.in
+@@ -846,9 +846,9 @@ cmake .. \
+ -DWITH_OCF=ON \
+ %endif
+ %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
+- -DWITH_RADOSGW_BEAST_FRONTEND=ON \
++ -DWITH_BOOST_CONTEXT=ON \
+ %else
+- -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
++ -DWITH_BOOST_CONTEXT=OFF \
+ %endif
+ -DBOOST_J=%{_smp_ncpus}
+
+diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake
+index 46beb891ed6d..7030a53bd8ca 100644
+--- a/src/include/config-h.in.cmake
++++ b/src/include/config-h.in.cmake
+@@ -321,4 +321,7 @@
+ /* Defined if getentropy() is available */
+ #cmakedefine HAVE_GETENTROPY
+
++/* Defined if boost::context is available */
++#cmakedefine HAVE_BOOST_CONTEXT
++
+ #endif /* CONFIG_H */
More information about the arch-commits
mailing list