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

Update XRootD to 5.x in CMSSW 10_6_X #8484

Merged
merged 9 commits into from
May 12, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions pip/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ entrypoints==0.3
enum34==1.1.6
flake8==3.7.7
flawfinder==2.0.8
fs==0.5.5a1
funcsigs==1.0.2
functools32==3.2.3-2
future==0.17.1
Expand Down Expand Up @@ -192,4 +191,3 @@ Werkzeug==0.15.2
wheel==0.33.1
widgetsnbextension==3.4.2
xgboost==0.82
xrootdpyfs==0.1.5
4 changes: 2 additions & 2 deletions python_tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Requires: py2-uproot
Requires: py2-oamap

#this DOES NOT depend on numpy..
Requires: py2-xrootdpyfs
# Requires: py2-xrootdpyfs

Requires: root curl python openldap

Expand Down Expand Up @@ -127,7 +127,7 @@ Requires: py2-idna
Requires: py2-Werkzeug
Requires: py2-pytest
Requires: py2-avro
Requires: py2-fs
# Requires: py2-fs
Requires: py2-lizard
Requires: py2-flawfinder
Requires: py2-python-ldap
Expand Down
2 changes: 1 addition & 1 deletion root.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## INITENV +PATH PYTHON27PATH %{i}/lib
## INITENV +PATH PYTHON3PATH %{i}/lib
## INITENV SET ROOTSYS %{i}
%define tag cfdde2734930ff94b0539a22c0d6fcbd43e7cfc9
%define tag c5b9d2c2dffbe7c71b210a331b343d1a56b1bbac
%define branch cms/v6-14-00-patches/8ba6b0f
%define github_user cms-sw
Source: git+https://github.com/%{github_user}/root.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Expand Down
7 changes: 7 additions & 0 deletions rpm-preamble.file
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,10 @@ if [ -f $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/.autodependencies ] ; then \
%{relocateConfig}etc/profile.d/dependencies-setup.sh \
%{relocateConfig}etc/profile.d/dependencies-setup.csh \
fi

%define relocatePy2SitePackages \
for py in $(grep -RlI -m1 '^#\!.*python' %{i}/${PYTHON_LIB_SITE_PACKAGES} | grep -v '\.pyc') ; do \
lnum=$(grep -n -m1 '^#\!.*python' $py | sed 's|:.*||') \
sed -i -e "${lnum}c#!/usr/bin/env python" $py \
done

2 changes: 1 addition & 1 deletion xrootd-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/xrootd.xml
<tool name="xrootd" version="@TOOL_VERSION@">
<lib name="XrdUtils"/>
<lib name="XrdClient"/>
<lib name="XrdCl"/>
<client>
<environment name="XROOTD_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$XROOTD_BASE/include/xrootd"/>
Expand Down
76 changes: 43 additions & 33 deletions xrootd.spec
Original file line number Diff line number Diff line change
@@ -1,57 +1,67 @@
### RPM external xrootd 4.8.5
### RPM external xrootd 5.5.4
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
## INITENV +PATH PYTHON27PATH %{i}/${PYTHON_LIB_SITE_PACKAGES}
## INITENV +PATH PYTHONPATH %{i}/${PYTHON_LIB_SITE_PACKAGES}

%define tag 72b7fd30afaec0328b4f3693ee60346f8e13802e
%define branch cms/v%{realversion}
%define github_user cms-externals
Source: git+https://github.com/%github_user/xrootd.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
%define strip_files %i/lib
%define tag %{realversion}
%define branch master
%define github_user xrootd
Source: git+https://github.com/%github_user/xrootd.git?obj=%{branch}/v%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz

BuildRequires: cmake
Requires: zlib
BuildRequires: cmake gmake autotools
Requires: zlib libuuid curl davix
Requires: python py2-setuptools
Requires: libxml2
Requires: openssl
Requires: python

%define soext so
%ifarch darwin
%define soext dylib
%endif

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

# need to fix these from xrootd git
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/cleanup.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/loadRTDataToMySQL.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonCollector.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/prepareMySQLStats.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonCreateMySQL.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonLoadMySQL.pl
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonPrepareStats.pl
sed -i -e 's|UUID REQUIRED|UUID |' cmake/XRootDFindLibs.cmake

%build
mkdir build
cd build

# By default xrootd has perl, fuse, krb5, readline, and crypto enabled.
# libfuse and libperl are not produced by CMSDIST.
cmake ../ \

rm -rf ../build; mkdir ../build; cd ../build

PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:$PYTHONPATH \
cmake ../%n-%{realversion} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT} \
-DZLIB_ROOT:PATH=${ZLIB_ROOT} \
-DENABLE_PYTHON=FALSE \
-DUSER_VERSION=%{realversion} \
-DCMAKE_BUILD_TYPE=Release \
-DFORCE_ENABLED=ON \
-DENABLE_FUSE=FALSE \
-DENABLE_VOMS=FALSE \
-DXRDCL_ONLY=TRUE \
-DENABLE_KRB5=TRUE \
-DENABLE_READLINE=FALSE \
-DENABLE_READLINE=TRUE \
-DENABLE_CRYPTO=TRUE \
-DCMAKE_SKIP_RPATH=TRUE \
-DENABLE_PYTHON=TRUE \
-DCMAKE_PREFIX_PATH="${PYTHON_ROOT}"
-DENABLE_HTTP=TRUE \
-DXRD_PYTHON_REQ_VERSION=2 \
-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT} \
-DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include -I${DAVIX_ROOT}/include" \
-DUUID_INCLUDE_DIR="${LIBUUID_ROOT}/include" \
-DUUID_LIBRARY="${LIBUUID_ROOT}/lib64/libuuid.%{soext}" \
-DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${PYTHON_ROOT};${LIBXML2_ROOT};${LIBUUID_ROOT};${CURL_ROOT};${DAVIX_ROOT}"

# Use makeprocess macro, it uses compiling_processes defined by
# build configuration file or build argument
PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:$PYTHONPATH \
make %makeprocesses VERBOSE=1

%install
cd build
cd ../build
mkdir -p %{i}/${PYTHON_LIB_SITE_PACKAGES}
PYTHONPATH=%{i}/${PYTHON_LIB_SITE_PACKAGES}:$PYTHONPATH \
make install
cd ..

%define strip_files %i/lib
%define keep_archives true
%{relocatePy2SitePackages}

%post
%{relocateConfig}bin/xrootd-config
%{relocateConfig}${PYTHON_LIB_SITE_PACKAGES}/xrootd-%{realvesion}-*.egg/EGG-INFO/SOURCES.txt