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] Use FORCE_ENABLED to make sure xrootd fails if any deps is not found #7870

Merged
merged 12 commits into from May 20, 2022
25 changes: 10 additions & 15 deletions davix.spec
@@ -1,4 +1,4 @@
### RPM external davix 0.7.6
### RPM external davix 0.8.1

%define tag %(echo R_%{realversion} | tr . _)
%define branch master
Expand All @@ -10,29 +10,24 @@ Source0: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&exp
%define soext dylib
%endif

BuildRequires: cmake gmake git
Requires: libxml2 libuuid
BuildRequires: cmake gmake
Requires: libxml2 libuuid curl
%prep
%setup -n %{n}-%{realversion}

%build
# need this until we have the submodule recursive option
cd ../ ; rm -rf %{n}-%{realversion}
git clone https://github.com/%{github_user}/%{n}.git %{n}-%{realversion} ; cd %{n}-%{realversion} ; git checkout tags/%{tag}
git submodule update --recursive --init
mkdir build ; cd build

cmake -DCMAKE_INSTALL_PREFIX="%{i}" \
-DLIBXML2_INCLUDE_DIR="${LIBXML2_ROOT}/include/libxml2" \
-DLIBXML2_LIBRARY="${LIBXML2_ROOT}/lib/libxml2.%{soext}" \
-DUUID_INCLUDE_DIR="${LIBUUID_ROOT}/include" \
rm -rf ../build; mkdir ../build; cd ../build
cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX="%{i}" \
-DEMBEDDED_LIBCURL=FALSE \
-DDAVIX_TESTS=False \
-DUUID_LIBRARY="${LIBUUID_ROOT}/lib64/libuuid.%{soext}" \
../
-DCMAKE_PREFIX_PATH="${LIBXML2_ROOT};${LIBUUID_ROOT};${CURL_ROOT}"

make VERBOSE=1 %{makeprocesses}

%install
cd build
cd ../build
make install

%post
Expand Down
13 changes: 9 additions & 4 deletions xrootd.spec
Expand Up @@ -3,13 +3,13 @@
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}

%define strip_files %i/lib
%define tag 332967cdc6553aebff0fd356254d4cdab9c9e515
%define tag 975ea12e06dd4237a40d91de7869fbcb3a48bfaa
%define branch master
%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 gmake autotools
Requires: zlib libuuid
Requires: zlib libuuid curl davix
Requires: python3
Requires: libxml2
Requires: scitokens-cpp
Expand All @@ -30,19 +30,24 @@ sed -i -e 's|UUID REQUIRED|UUID |' cmake/XRootDFindLibs.cmake
rm -rf ../build; mkdir ../build; cd ../build
cmake ../%n-%{realversion} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DUSER_VERSION=%{realversion} \
-DCMAKE_BUILD_TYPE=Release \
-DFORCE_ENABLED=ON \
-DENABLE_FUSE=FALSE \
-DENABLE_VOMS=FALSE \
-DXRDCL_ONLY=FALSE \
-DENABLE_KRB5=TRUE \
-DENABLE_READLINE=TRUE \
-DENABLE_CRYPTO=TRUE \
-DCMAKE_SKIP_RPATH=TRUE \
-DENABLE_PYTHON=TRUE \
-DENABLE_HTTP=TRUE \
-DXRD_PYTHON_REQ_VERSION=3 \
-DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include" \
-DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include -I${DAVIX_ROOT}/include" \
-DUUID_INCLUDE_DIR="${LIBUUID_ROOT}/include" \
-DUUID_LIBRARY="${LIBUUID_ROOT}/lib64/libuuid.%{soext}" \
-DSCITOKENS_CPP_DIR="${SCITOKENS_CPP_ROOT}" \
-DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${PYTHON3_ROOT};${LIBXML2_ROOT};${LIBUUID_ROOT};${SCITOKENS_CPP_ROOT}"
-DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${PYTHON3_ROOT};${LIBXML2_ROOT};${LIBUUID_ROOT};${SCITOKENS_CPP_ROOT};${CURL_ROOT};${DAVIX_ROOT}"

make %makeprocesses VERBOSE=1

Expand Down