From 0a5c36b1b0c0dcae6288f43b91ef546a4945d61d Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Thu, 20 Oct 2022 10:57:04 +0200 Subject: [PATCH 01/10] [CMake] Make switches for server-only options dependent on XRCL_ONLY=FALSE Fixes: ff67c2a0 Closes: #1804 --- cmake/XRootDDefaults.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/XRootDDefaults.cmake b/cmake/XRootDDefaults.cmake index bbee8a275b5..5c25975bb29 100644 --- a/cmake/XRootDDefaults.cmake +++ b/cmake/XRootDDefaults.cmake @@ -9,6 +9,8 @@ if( "${CMAKE_BUILD_TYPE}" STREQUAL "" ) endif() endif() +include( CMakeDependentOption ) + define_default( PLUGIN_VERSION 5 ) option( ENABLE_FUSE "Enable the fuse filesystem driver if possible." TRUE ) option( ENABLE_CRYPTO "Enable the OpenSSL cryprography support." TRUE ) @@ -28,7 +30,7 @@ option( ENABLE_XRDEC "Enable erasure coding component." option( ENABLE_ASAN "Enable adress sanitizer." FALSE ) option( ENABLE_TSAN "Enable thread sanitizer." FALSE ) option( ENABLE_XRDCLHTTP "Enable xrdcl-http plugin." TRUE ) -option( ENABLE_SCITOKENS "Enable SciTokens plugin." TRUE ) -option( ENABLE_MACAROONS "Enable Macaroons plugin." TRUE ) +cmake_dependent_option( ENABLE_SCITOKENS "Enable SciTokens plugin." TRUE "NOT XRDCL_ONLY" FALSE ) +cmake_dependent_option( ENABLE_MACAROONS "Enable Macaroons plugin." TRUE "NOT XRDCL_ONLY" FALSE ) option( FORCE_ENABLED "Fail build if enabled components cannot be built." FALSE ) define_default( XRD_PYTHON_REQ_VERSION 3 ) From 4177404bd825cd64fcddb24de707dc9f4d442926 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Tue, 8 Nov 2022 11:58:27 +0100 Subject: [PATCH 02/10] [CMake] Drop setting of CMP0054 policy to OLD behavior This does not seem to be necessary. Eventually CMake will remove the old behavior, so it's better to switch to the new behavior. See "cmake --help-policy CMP0054" for information on this policy. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 104b497ba0b..f338a68e126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,11 +9,6 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/cmake ) -if(NOT (CMAKE_VERSION VERSION_LESS "3.1")) - cmake_policy(SET CMP0054 OLD) -endif() - - #------------------------------------------------------------------------------- # A 'plugins' phony target to simplify building build-tree binaries. # Plugins are responsible for adding themselves to this target, where From 180d08e1515c51ad0b684a74e89b70b3cb5e30a7 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Tue, 8 Nov 2022 13:31:27 +0100 Subject: [PATCH 03/10] [CMake] Fix warnings due to package name mismatches in find modules CMake generates a warning when a find module like Find.cmake uses something other than (case-sensitive) in the call to find_package_handle_standard_args. --- cmake/{FindCPPUnit.cmake => FindCppUnit.cmake} | 2 +- cmake/FindKerberos5.cmake | 2 +- cmake/FindReadline.cmake | 2 +- cmake/{FindLibUuid.cmake => Findlibuuid.cmake} | 4 ++-- cmake/{FindSystemd.cmake => Findsystemd.cmake} | 0 cmake/XRootDFindLibs.cmake | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) rename cmake/{FindCPPUnit.cmake => FindCppUnit.cmake} (90%) rename cmake/{FindLibUuid.cmake => Findlibuuid.cmake} (94%) rename cmake/{FindSystemd.cmake => Findsystemd.cmake} (100%) diff --git a/cmake/FindCPPUnit.cmake b/cmake/FindCppUnit.cmake similarity index 90% rename from cmake/FindCPPUnit.cmake rename to cmake/FindCppUnit.cmake index 9b015db1b96..cc6e7400191 100644 --- a/cmake/FindCPPUnit.cmake +++ b/cmake/FindCppUnit.cmake @@ -27,4 +27,4 @@ set(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR}) set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY}) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(cppunit DEFAULT_MSG CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES) +find_package_handle_standard_args(CppUnit DEFAULT_MSG CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES) diff --git a/cmake/FindKerberos5.cmake b/cmake/FindKerberos5.cmake index 345c3729d3e..eae4dd3dba7 100644 --- a/cmake/FindKerberos5.cmake +++ b/cmake/FindKerberos5.cmake @@ -32,7 +32,7 @@ else() set( KERBEROS5_LIBRARIES ${KERBEROS5_LIBRARY} ${COM_ERR_LIBRARY} ) find_package_handle_standard_args( - KERBEROS5 + Kerberos5 DEFAULT_MSG KERBEROS5_LIBRARIES KERBEROS5_INCLUDE_DIR ) diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake index 99dfa442187..d79cfb36b4d 100644 --- a/cmake/FindReadline.cmake +++ b/cmake/FindReadline.cmake @@ -56,7 +56,7 @@ else( READLINE_INCLUDE_DIR AND READLINE_LIBRARY ) endif() find_package_handle_standard_args( - READLINE + Readline DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR ) diff --git a/cmake/FindLibUuid.cmake b/cmake/Findlibuuid.cmake similarity index 94% rename from cmake/FindLibUuid.cmake rename to cmake/Findlibuuid.cmake index 94b97a9e786..f18268e5e40 100644 --- a/cmake/FindLibUuid.cmake +++ b/cmake/Findlibuuid.cmake @@ -1,5 +1,5 @@ #.rst: -# Finduuid +# Findlibuuid # ----------- # # Find libuuid, DCE compatible Universally Unique Identifier library. @@ -52,5 +52,5 @@ unset(CMAKE_REQUIRED_INCLUDES) unset(_uuid_header_only) unset(_have_libuuid) -find_package_handle_standard_args(uuid DEFAULT_MSG UUID_INCLUDE_DIR) +find_package_handle_standard_args(libuuid DEFAULT_MSG UUID_INCLUDE_DIR) mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY) diff --git a/cmake/FindSystemd.cmake b/cmake/Findsystemd.cmake similarity index 100% rename from cmake/FindSystemd.cmake rename to cmake/Findsystemd.cmake diff --git a/cmake/XRootDFindLibs.cmake b/cmake/XRootDFindLibs.cmake index 333a5d06865..9c990a819e3 100644 --- a/cmake/XRootDFindLibs.cmake +++ b/cmake/XRootDFindLibs.cmake @@ -3,7 +3,7 @@ #------------------------------------------------------------------------------- find_package( ZLIB REQUIRED) -find_package( LibUuid REQUIRED ) +find_package( libuuid REQUIRED ) if( ENABLE_READLINE ) if( FORCE_ENABLED ) @@ -30,7 +30,7 @@ if( LIBXML2_FOUND ) add_definitions( -DHAVE_XML2 ) endif() -find_package( Systemd ) +find_package( systemd ) if( SYSTEMD_FOUND ) add_definitions( -DHAVE_SYSTEMD ) endif() @@ -82,9 +82,9 @@ endif() if( ENABLE_TESTS ) if( FORCE_ENABLED ) - find_package( CPPUnit REQUIRED ) + find_package( CppUnit REQUIRED ) else() - find_package( CPPUnit ) + find_package( CppUnit ) endif() if( CPPUNIT_FOUND ) set( BUILD_TESTS TRUE ) From 2083b95d28d268e5e070e193bb21623aad64ba95 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Tue, 8 Nov 2022 13:52:41 +0100 Subject: [PATCH 04/10] [CMake] Use upstream FindOpenSSL.cmake XRootD's FindOpenSSL.cmake fails when OpenSSL is not found with the following error: CMake Error at cmake/FindOpenSSL.cmake:15 (file): file STRINGS file "/tmp/xrootd/xrootd/OPENSSL_INCLUDE_DIR-NOTFOUND/openssl/opensslv.h" cannot be read. Call Stack (most recent call first): cmake/XRootDFindLibs.cmake:44 (find_package) CMakeLists.txt:26 (include) CMake Error at cmake/FindOpenSSL.cmake:16 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command. Call Stack (most recent call first): cmake/XRootDFindLibs.cmake:44 (find_package) CMakeLists.txt:26 (include) Since FindOpenSSL.cmake is already provided upstream by CMake 3.1, we can use that instead and drop our custom module. --- cmake/FindOpenSSL.cmake | 136 ------------------------------------- cmake/XRootDFindLibs.cmake | 5 +- 2 files changed, 3 insertions(+), 138 deletions(-) delete mode 100644 cmake/FindOpenSSL.cmake diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake deleted file mode 100644 index 847e78141e9..00000000000 --- a/cmake/FindOpenSSL.cmake +++ /dev/null @@ -1,136 +0,0 @@ -include( FindPackageHandleStandardArgs ) - -set( OPENSSL_GOOD_VERSION TRUE ) -if( OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES ) - set( OPENSSL_FOUND TRUE ) -else() - find_path( - OPENSSL_INCLUDE_DIR - NAMES openssl/ssl.h - HINTS - ${OPENSSL_ROOT_DIR} - PATH_SUFFIXES - include ) - - file(STRINGS ${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h opensslvers REGEX "^# define OPENSSL_VERSION_NUMBER") - string(REGEX REPLACE "# define[ ]+OPENSSL_VERSION_NUMBER[ ]+" "" opensslvers ${opensslvers}) - - set( LIBSSLNAME ssl ) - set( LIBCRYPTONAME crypto ) - - if ( OPENSSL_GOOD_VERSION ) - - find_library( - OPENSSL_SSL_LIBRARY - NAMES ${LIBSSLNAME} - HINTS - ${OPENSSL_ROOT_DIR} - PATH_SUFFIXES - ${LIBRARY_PATH_PREFIX} - ${LIB_SEARCH_OPTIONS}) - - string(FIND ${OPENSSL_SSL_LIBRARY} ".a" hasstaticext) - if (NOT ${hasstaticext} EQUAL -1) - if ( ${opensslvers} LESS "0x1000201fL" ) - set( OPENSSL_GOOD_VERSION FALSE ) - message(WARNING " >>> Cannot build XRootD crypto modules: static openssl build version is < 1.0.2") - else() - set(OPENSSL_USE_STATIC TRUE) - set( LIBCRYPTONAME libcrypto.a ) - endif() - message("-- Using OpenSSL static libraries (version: " ${opensslvers} ")") - endif() - - endif() - - if ( OPENSSL_GOOD_VERSION ) - find_library( - OPENSSL_CRYPTO_LIBRARY - NAMES ${LIBCRYPTONAME} - HINTS - ${OPENSSL_ROOT_DIR} - PATH_SUFFIXES - ${LIBRARY_PATH_PREFIX} - ${LIB_SEARCH_OPTIONS}) - - set( OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ) - - find_package_handle_standard_args( - OpenSSL - DEFAULT_MSG - OPENSSL_LIBRARIES) - - mark_as_advanced( OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES ) - - endif() -endif() - - -#------------------------------------------------------------------------------- -# Check for the TLS support in the OpenSSL version that is available -# (assume available if use of static libs is detected and the openssl version -# is at least 1.0.2) -#------------------------------------------------------------------------------- - -if ( OPENSSL_FOUND ) - - if( OPENSSL_USE_STATIC AND OPENSSL_GOOD_VERSION ) - - add_definitions( -DHAVE_TLS -DHAVE_TLS12 -DHAVE_TLS11 -DHAVE_TLS1 -DHAVE_DH_PADDED -DHAVE_DH_PADDED_FUNC ) - - else() - - set( CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES} ) - set( CMAKE_REQUIRED_QUIET FALSE) - - check_function_exists(TLS_method HAVE_TLS_FUNC) - check_symbol_exists( - TLS_method - ${OPENSSL_INCLUDE_DIR}/openssl/ssl.h - HAVE_TLS_SYMB) - if( HAVE_TLS_FUNC AND HAVE_TLS_SYMB ) - add_definitions( -DHAVE_TLS ) - endif() - - check_function_exists(TLSv1_2_method HAVE_TLS12_FUNC) - check_symbol_exists( - TLSv1_2_method - ${OPENSSL_INCLUDE_DIR}/openssl/ssl.h - HAVE_TLS12_SYMB) - if( HAVE_TLS12_FUNC AND HAVE_TLS12_SYMB ) - add_definitions( -DHAVE_TLS12 ) - endif() - - check_function_exists(TLSv1_1_method HAVE_TLS11_FUNC) - check_symbol_exists( - TLSv1_1_method - ${OPENSSL_INCLUDE_DIR}/openssl/ssl.h - HAVE_TLS11_SYMB) - if( HAVE_TLS11_FUNC AND HAVE_TLS11_SYMB ) - add_definitions( -DHAVE_TLS11 ) - endif() - - check_function_exists(TLSv1_method HAVE_TLS1_FUNC) - check_symbol_exists( - TLSv1_method - ${OPENSSL_INCLUDE_DIR}/openssl/ssl.h - HAVE_TLS1_SYMB) - if( HAVE_TLS1_FUNC AND HAVE_TLS1_SYMB ) - add_definitions( -DHAVE_TLS1 ) - endif() - - check_function_exists(DH_compute_key_padded HAVE_DH_PADDED_FUNC) - check_symbol_exists( - DH_compute_key_padded - ${OPENSSL_INCLUDE_DIR}/openssl/dh.h - HAVE_DH_PADDED_SYMB) - if( HAVE_DH_PADDED_FUNC) - if( HAVE_DH_PADDED_SYMB ) - add_definitions( -DHAVE_DH_PADDED ) - else() - add_definitions( -DHAVE_DH_PADDED_FUNC ) - endif() - endif() - - endif() -endif() diff --git a/cmake/XRootDFindLibs.cmake b/cmake/XRootDFindLibs.cmake index 9c990a819e3..d9bb661ae3d 100644 --- a/cmake/XRootDFindLibs.cmake +++ b/cmake/XRootDFindLibs.cmake @@ -39,11 +39,12 @@ find_package( CURL ) if( ENABLE_CRYPTO ) if( FORCE_ENABLED ) - find_package( OpenSSL REQUIRED ) + find_package( OpenSSL 1.0.2 REQUIRED ) else() - find_package( OpenSSL ) + find_package( OpenSSL 1.0.2 ) endif() if( OPENSSL_FOUND ) + add_definitions( -DHAVE_DH_PADDED ) add_definitions( -DHAVE_XRDCRYPTO ) add_definitions( -DHAVE_SSL ) set( BUILD_CRYPTO TRUE ) From 957a08e13f3d806687875e6a04fc60c7de8ceedc Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Tue, 8 Nov 2022 15:33:26 +0100 Subject: [PATCH 05/10] Replace usage of deprecated egrep command with grep -E The egrep command has been deprecated since 2007. Recently grep started to warn about it, so replace egrep usage with grep -E. See release notes of grep at the link below for more information. https://savannah.gnu.org/forum/forum.php?forum_id=10227 --- genversion.sh | 8 ++++---- packaging/makesrpm.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/genversion.sh b/genversion.sh index 8f1bf6df0bd..f609e64020b 100755 --- a/genversion.sh +++ b/genversion.sh @@ -13,7 +13,7 @@ EXP3='^v[0-9]+\.[0-9]+\.[0-9]+\-rc.*$' function getNumericVersion() { VERSION=$1 - if test x`echo $VERSION | egrep $EXP2` == x; then + if test x`echo $VERSION | grep -E $EXP2` == x; then echo "1000000"; return; fi @@ -37,16 +37,16 @@ function getVersionFromRefs() VERSION="unknown" for i in ${REFS[@]}; do - if test x`echo $i | egrep $EXP2` != x; then + if test x`echo $i | grep -E $EXP2` != x; then echo "$i" return 0 fi - if test x`echo $i | egrep $EXP1` != x; then + if test x`echo $i | grep -E $EXP1` != x; then VERSION="$i" fi - if test x`echo $i | egrep $EXP3` != x; then + if test x`echo $i | grep -E $EXP3` != x; then VERSION="$i" fi diff --git a/packaging/makesrpm.sh b/packaging/makesrpm.sh index 143a726d61c..817ffdd2f1f 100755 --- a/packaging/makesrpm.sh +++ b/packaging/makesrpm.sh @@ -150,7 +150,7 @@ fi # Deal with release candidates #------------------------------------------------------------------------------- RELEASE=1 -if test x`echo $VERSION | egrep $RCEXP` != x; then +if test x`echo $VERSION | grep -E $RCEXP` != x; then RELEASE=0.`echo $VERSION | sed 's/.*-rc/rc/'` VERSION=`echo $VERSION | sed 's/-rc.*//'` fi @@ -158,7 +158,7 @@ fi #------------------------------------------------------------------------------- # Deal with CERN releases #------------------------------------------------------------------------------- -if test x`echo $VERSION | egrep $CERNEXP` != x; then +if test x`echo $VERSION | grep -E $CERNEXP` != x; then RELEASE=`echo $VERSION | sed 's/.*-//'` VERSION=`echo $VERSION | sed 's/-.*\.CERN//'` fi @@ -281,7 +281,7 @@ gzip -9fn $RPMSOURCES/xrootd.tar # Check if we need some other versions #------------------------------------------------------------------------------- OTHER_VERSIONS=`cat $TEMPDIR/xrootd.spec | \ - egrep '^Source[0-9]+:[[:space:]]*xrootd-.*.gz$' |\ + grep -E '^Source[0-9]+:[[:space:]]*xrootd-.*.gz$' |\ awk '{ print $2; }'` for VER in $OTHER_VERSIONS; do From 915d91f8629927090637fe7e4027a8fb042b137f Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Wed, 9 Nov 2022 16:08:09 +0100 Subject: [PATCH 06/10] [CI] Skip step to upgrade wheel for Python 2.x Attempting to upgrade it results in the error below. Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-b24Ztv/wheel/setup.py", line 1 from __future__ import annotations SyntaxError: future feature annotations is not defined --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a4dc39e595..3bc51647e89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -173,7 +173,7 @@ jobs: container: centos:7 steps: - # python2-pip is broken on CentOS so can't upgrade pip or setuptools + # python2-pip is broken on CentOS so can't upgrade pip, setuptools, or wheel - name: Install external dependencies with yum run: | yum update -y @@ -195,7 +195,6 @@ jobs: git \ cppunit-devel yum clean all - python2 -m pip --no-cache-dir install --upgrade wheel # Need to use v1 of action as image Git is too old - name: Clone repository now that Git is available From 2a8e04e5e55b797773ce6f2be331a4a6c7584dbb Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Wed, 9 Nov 2022 16:55:13 +0100 Subject: [PATCH 07/10] [CI] Explicitly set clang/clang++ as C/C++ compilers for macOS When not setting CMAKE_{C,CXX}_COMPILER explicitly, the default ones (cc and c++) are picked up, but are not properly setup to find headers, which causes build failures of the Python bindings. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3bc51647e89..59a43d411c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -333,6 +333,8 @@ jobs: run: | cd .. cmake \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INSTALL_PREFIX=/usr/local/ \ -DOPENSSL_SSL_LIBRARY=$(find $(find $(brew --cellar openssl) -type d -iname "lib") -type f -iname "libssl*.dylib") \ -DOPENSSL_CRYPTO_LIBRARY=$(find $(find $(brew --cellar openssl) -type d -iname "lib") -type f -iname "libcrypto*.dylib") \ From a70e340816fc2ec6ef0127fe94a3615d2b9156e1 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Wed, 9 Nov 2022 16:55:28 +0100 Subject: [PATCH 08/10] [CI] Use CMAKE_PREFIX_PATH to simplify finding openssl 3 on macOS --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59a43d411c6..dcdac81dab1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -336,9 +336,7 @@ jobs: -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_INSTALL_PREFIX=/usr/local/ \ - -DOPENSSL_SSL_LIBRARY=$(find $(find $(brew --cellar openssl) -type d -iname "lib") -type f -iname "libssl*.dylib") \ - -DOPENSSL_CRYPTO_LIBRARY=$(find $(find $(brew --cellar openssl) -type d -iname "lib") -type f -iname "libcrypto*.dylib") \ - -DOPENSSL_INCLUDE_DIR=$(find $(brew --cellar openssl) -type d -iname "include") \ + -DCMAKE_PREFIX_PATH=/usr/local/opt/openssl@3 \ -DPYTHON_EXECUTABLE=$(command -v python3) \ -DENABLE_TESTS=ON \ -DPIP_OPTIONS="--verbose" \ From e3d11dc1873a5706d8092732f62bffdf7b98794c Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Wed, 9 Nov 2022 17:28:30 +0100 Subject: [PATCH 09/10] [CI] Perform a local installation of Python bindings for testing on Mac This is required as by default the installed Python doesn't know about XRootD which was installed into /usr/local/lib/python3.X. Using a local installation we can work around it. Note that we cannot set --user in PIP_OPTIONS as it conflicts with --prefix, which is added by the build system in bindings/python/CMakeLists.txt. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcdac81dab1..3d9501d3051 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -348,6 +348,7 @@ jobs: --clean-first \ --parallel $(($(sysctl -n hw.ncpu) - 1)) cmake --build build --target install + python3 -m pip install --user build/bindings/python python3 -m pip list - name: Verify install @@ -357,6 +358,7 @@ jobs: - name: Verify Python bindings run: | + export DYLD_LIBRARY_PATH=/usr/local/lib python3 --version --version python3 -m pip list python3 -m pip show xrootd From 49d1dd9292ac32798adbcd67a437f3dff4a60af4 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Fri, 11 Nov 2022 10:27:27 +0100 Subject: [PATCH 10/10] [XrdTls] Replace "#ifdef HAVE_TLS" with a version-based check This ensures that the right function is used with both shared and static libraries, as CMake's check_symbol_exists() doesn't work with static libraries. The release notes for OpenSSL 1.1.0 mention the deprecation of the old function and recommends using the new TLS_method(). More information at https://www.openssl.org/news/cl111.txt. --- src/XrdTls/XrdTlsContext.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/XrdTls/XrdTlsContext.cc b/src/XrdTls/XrdTlsContext.cc index 0a9454f9568..2dfd12b06d2 100644 --- a/src/XrdTls/XrdTlsContext.cc +++ b/src/XrdTls/XrdTlsContext.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "XrdOuc/XrdOucUtils.hh" @@ -429,7 +430,7 @@ void Fatal(std::string *eMsg, const char *msg, bool sslmsg=false) const char *GetTlsMethod(const SSL_METHOD *&meth) { -#ifdef HAVE_TLS +#if OPENSSL_VERSION_NUMBER > 0x1010000fL /* v1.1.0 */ meth = TLS_method(); #else meth = SSLv23_method();