Skip to content

Commit

Permalink
Merge pull request ceph#135 from digitalocean/v16.2.9-jammy-try3
Browse files Browse the repository at this point in the history
Pacific: Add Ubuntu 22.04 (Jammy) support.
  • Loading branch information
baergj committed Aug 25, 2022
2 parents 042a62f + 7f615d0 commit 38c091f
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/BuildBoost.cmake
Expand Up @@ -70,7 +70,7 @@ function(do_build_boost version)
if(c MATCHES "^python([0-9])\$")
set(with_python_version "${CMAKE_MATCH_1}")
list(APPEND boost_with_libs "python")
elseif(c MATCHES "^python([0-9])\\.?([0-9])\$")
elseif(c MATCHES "^python([0-9])\\.?([0-9]+)\$")
set(with_python_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
list(APPEND boost_with_libs "python")
else()
Expand Down
13 changes: 11 additions & 2 deletions cmake/modules/Distutils.cmake
Expand Up @@ -65,7 +65,11 @@ function(distutils_add_cython_module target name src)
# This little bit of magic wipes out __Pyx_check_single_interpreter()
# Note: this is reproduced in distutils_install_cython_module
list(APPEND cflags -D'void0=dead_function\(void\)')
list(APPEND cflags -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0')
list(APPEND cflags -D'__Pyx_check_single_interpreter\(ARG\)=ARG\#\#0')
cmake_parse_arguments(DU "DISABLE_VTA" "" "" ${ARGN})
if(DU_DISABLE_VTA AND HAS_VTA)
list(APPEND cflags -fno-var-tracking-assignments)
endif()
set(PY_CC ${compiler_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} ${cflags})
set(PY_CXX ${compiler_launcher} ${CMAKE_CXX_COMPILER} ${cxx_compiler_arg1})
set(PY_LDSHARED ${link_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} "-shared")
Expand Down Expand Up @@ -108,12 +112,17 @@ function(distutils_install_cython_module name)
get_property(link_launcher GLOBAL PROPERTY RULE_LAUNCH_LINK)
set(PY_CC "${compiler_launcher} ${CMAKE_C_COMPILER}")
set(PY_LDSHARED "${link_launcher} ${CMAKE_C_COMPILER} -shared")
cmake_parse_arguments(DU "DISABLE_VTA" "" "" ${ARGN})
if(DU_DISABLE_VTA AND HAS_VTA)
set(CFLAG_DISABLE_VTA -fno-var-tracking-assignments)
endif()
install(CODE "
set(ENV{CC} \"${PY_CC}\")
set(ENV{LDSHARED} \"${PY_LDSHARED}\")
set(ENV{CPPFLAGS} \"-iquote${CMAKE_SOURCE_DIR}/src/include
-D'void0=dead_function\(void\)' \
-D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0'\")
-D'__Pyx_check_single_interpreter\(ARG\)=ARG\#\#0' \
${CFLAG_DISABLE_VTA}\")
set(ENV{LDFLAGS} \"-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
set(ENV{CYTHON_BUILD_DIR} \"${CMAKE_CURRENT_BINARY_DIR}\")
set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
Expand Down
1 change: 1 addition & 0 deletions do-build-plan
@@ -1,3 +1,4 @@
rpm centos-8
deb ubuntu-18.04
deb ubuntu-20.04
deb ubuntu-22.04
3 changes: 3 additions & 0 deletions make-dist
Expand Up @@ -86,6 +86,9 @@ download_boost() {
--exclude="$boost_version_underscore/tools/auto_index" \
--exclude='doc' --exclude='more' --exclude='status'
mv src/boost_${boost_version_underscore} src/boost
# Newer versions of boost have adapted to Python 3.10 by the following replacement.
# https://github.com/boostorg/python/pull/344
sed -i -e 's/_Py_fopen/fopen/' src/boost/libs/python/src/exec.cpp
tar cf ${outfile}.boost.tar ${outfile}/src/boost
rm -rf src/boost
}
Expand Down
9 changes: 9 additions & 0 deletions src/auth/Crypto.cc
Expand Up @@ -33,6 +33,12 @@
#include "common/debug.h"
#include <errno.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

// use getentropy() if available. it uses the same source of randomness
// as /dev/urandom without the filesystem overhead
#ifdef HAVE_GETENTROPY
Expand Down Expand Up @@ -603,3 +609,6 @@ CryptoHandler *CryptoHandler::create(int type)
return NULL;
}
}

#pragma clang diagnostic pop
#pragma GCC diagnostic pop
9 changes: 9 additions & 0 deletions src/common/ceph_crypto.cc
Expand Up @@ -27,6 +27,12 @@
# include <openssl/err.h>
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

namespace TOPNSPC::crypto::ssl {

#if OPENSSL_VERSION_NUMBER < 0x10100000L
Expand Down Expand Up @@ -213,3 +219,6 @@ void ssl::OpenSSLDigest::Final(unsigned char *digest) {
}

}

#pragma clang diagnostic pop
#pragma GCC diagnostic pop
9 changes: 9 additions & 0 deletions src/common/ceph_crypto.h
Expand Up @@ -22,6 +22,12 @@

#include "include/ceph_assert.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

extern "C" {
const EVP_MD *EVP_md5(void);
const EVP_MD *EVP_sha1(void);
Expand Down Expand Up @@ -202,4 +208,7 @@ auto digest(const ceph::buffer::list& bl)
}
}

#pragma clang diagnostic pop
#pragma GCC diagnostic pop

#endif
7 changes: 7 additions & 0 deletions src/common/openssl_opts_handler.cc
Expand Up @@ -112,7 +112,14 @@ void load_module(const string &engine_conf)
}

OPENSSL_load_builtin_modules();
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
ENGINE_load_builtin_engines();
#pragma clang diagnostic pop
#pragma GCC diagnostic pop

if (CONF_modules_load(
conf, nullptr,
Expand Down
6 changes: 4 additions & 2 deletions src/pybind/rados/CMakeLists.txt
@@ -1,5 +1,7 @@
distutils_add_cython_module(cython_rados
rados
${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx)
${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx
DISABLE_VTA)
add_dependencies(cython_rados rados)
distutils_install_cython_module(cython_rados)
distutils_install_cython_module(cython_rados
DISABLE_VTA)
3 changes: 1 addition & 2 deletions src/pybind/rgw/CMakeLists.txt
@@ -1,7 +1,6 @@
distutils_add_cython_module(cython${PYTHON_VERSION}_rgw
rgw
${CMAKE_CURRENT_SOURCE_DIR}/rgw.pyx
${PYTHON_VERSION})
${CMAKE_CURRENT_SOURCE_DIR}/rgw.pyx)
add_dependencies(cython${PYTHON_VERSION}_rgw rgw)
distutils_install_cython_module(cython${PYTHON_VERSION}_rgw
${PYTHON_VERSION})
9 changes: 9 additions & 0 deletions src/rgw/rgw_rest_sts.h
Expand Up @@ -8,9 +8,17 @@
#include "rgw_rest.h"
#include "rgw_sts.h"
#include "rgw_web_idp.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include "jwt-cpp/jwt.h"
#pragma clang diagnostic pop
#pragma GCC diagnostic pop
#include "rgw_oidc_provider.h"


namespace rgw::auth::sts {

class WebTokenEngine : public rgw::auth::Engine {
Expand Down Expand Up @@ -214,3 +222,4 @@ class RGWRESTMgr_STS : public RGWRESTMgr {
const rgw::auth::StrategyRegistry&,
const std::string&) override;
};

0 comments on commit 38c091f

Please sign in to comment.