Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XRootD: Update to version 5.4.0 and build with scitokens-cpp #7594

Merged
merged 6 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions scitokens-cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
--- CMakeLists.txt.orig 2021-09-14 22:52:06.000000000 +0200
+++ CMakeLists.txt 2022-02-01 11:46:11.698151800 +0100
@@ -25,27 +25,23 @@
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")


-if( APPLE )
-
find_package( OpenSSL REQUIRED )
find_package( Sqlite3 REQUIRED )
+
+if( APPLE )
+
set(LIBCRYPTO_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
set(LIBCRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
set(CMAKE_MACOSX_RPATH ON)

elseif( UNIX )

-include (FindPkgConfig)
-pkg_check_modules(LIBCRYPTO REQUIRED libcrypto)
-pkg_check_modules(OPENSSL REQUIRED openssl)
-pkg_check_modules(SQLITE REQUIRED sqlite3)
-
# pkg_check_modules fails to return an absolute path on RHEL7. Set the
# link directories accordingly.
link_directories(${OPENSSL_LIBRARY_DIRS} ${LIBCRYPTO_LIBRARY_DIRS})
endif()

-include_directories( "${PROJECT_SOURCE_DIR}" ${JWT_CPP_INCLUDES} ${CURL_INCLUDES} ${OPENSSL_INCLUDE_DIRS} ${LIBCRYPTO_INCLUDE_DIRS} ${SQLITE_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} )
+include_directories( "${PROJECT_SOURCE_DIR}" ${JWT_CPP_INCLUDES} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LIBCRYPTO_INCLUDE_DIRS} ${SQLITE_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} )

add_library(SciTokens SHARED src/scitokens.cpp src/scitokens_internal.cpp src/scitokens_cache.cpp)
target_link_libraries(SciTokens ${OPENSSL_LIBRARIES} ${LIBCRYPTO_LIBRARIES} ${CURL_LIBRARIES} ${SQLITE_LIBRARIES} ${UUID_LIBRARIES})
23 changes: 23 additions & 0 deletions scitokens-cpp.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### RPM external scitokens-cpp 0.7.0
Source: https://github.com/scitokens/%{n}/archive/refs/tags/v%{realversion}.tar.gz

BuildRequires: cmake gmake
Requires: libuuid curl sqlite
Patch0: scitokens-cpp

%prep
%setup -n %{n}-%{realversion}

%patch0 -p0

%build
rm -rf ../build; mkdir ../build; cd ../build
cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${CURL_ROOT};${LIBUUID_ROOT};${SQLITE_ROOT}"

%install
cd ../build
make %{makeprocesses}
make install
11 changes: 11 additions & 0 deletions scram-tools.file/tools/scitokens-cpp/scitokens-cpp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<tool name="scitokens-cpp" version="@TOOL_VERSION@">
<lib name="SciTokens"/>
<client>
<environment name="LIBSCITOKENS_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$LIBSCITOKENS_BASE/lib64"/>
<environment name="INCLUDE" default="$LIBSCITOKENS_BASE/include"/>
</client>
<use name="sqlite"/>
<use name="libuuid"/>
<use name="curl"/>
</tool>
1 change: 1 addition & 0 deletions scram-tools.file/tools/xrootd/xrootd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
<runtime name="PATH" value="$XROOTD_BASE/bin" type="path"/>
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
<use name="root_cxxdefaults"/>
<use name="scitokens-cpp"/>
</tool>
8 changes: 5 additions & 3 deletions xrootd.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external xrootd 5.3.1
### RPM external xrootd 5.4.0
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}

Expand All @@ -7,10 +7,11 @@
%define github_user xrootd
Source: git+https://github.com/%github_user/xrootd.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz

BuildRequires: cmake autotools
BuildRequires: cmake gmake autotools
Requires: zlib
Requires: python3
Requires: libxml2
Requires: scitokens-cpp

%define soext so
%ifarch darwin
Expand Down Expand Up @@ -39,7 +40,8 @@ cmake .. \
-DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include" \
-DUUID_INCLUDE_DIR="${LIBUUID_ROOT}/include" \
-DUUID_LIBRARY="${LIBUUID_ROOT}/lib64/libuuid.%{soext}" \
-DCMAKE_PREFIX_PATH="${PYTHON3_ROOT};${LIBXML2_ROOT};${LIBUUID_ROOT}"
-DSCITOKENS_CPP_DIR="${SCITOKENS_CPP_ROOT}" \
-DCMAKE_PREFIX_PATH="${PYTHON3_ROOT};${LIBXML2_ROOT};${LIBUUID_ROOT};${SCITOKENS_CPP_ROOT}"

make %makeprocesses VERBOSE=1
make install
Expand Down