Skip to content

Commit

Permalink
Merge branch 'IB/CMSSW_12_3_X/rootnext' into root624
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar authored Dec 7, 2021
2 parents 899123c + 7e45648 commit 4539e15
Show file tree
Hide file tree
Showing 23 changed files with 162 additions and 672 deletions.
4 changes: 2 additions & 2 deletions cms-common.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### RPM cms cms-common 1.0
## REVISION 1214
## REVISION 1215
## NOCOMPILER

%define tag 166543613737055cac97d283ec2f5ec5297cdd12
%define tag be997745c00b3f046795520d349ad52d95ca87f0
Source: git+https://github.com/cms-sw/cms-common.git?obj=master/%{tag}&export=%{n}-%{realversion}-%{tag}&output=/%{n}-%{realversion}-%{tag}.tgz

%prep
Expand Down
6 changes: 3 additions & 3 deletions cmsmon-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

%define arch amd64
%define linuxarch linux-amd64
%define promv 2.30.3
%define promv 2.31.1
%define amver 0.23.0
%define sternv 1.11.0
%define apsver 0.2.15
%define trivyver 0.20.2
%define trivyver 0.21.1
%define heyver 0.0.2
%define k8s_info_ver 0.0.1
%define gocurlver 0.0.2
%define gocurlver 0.0.4
%define monit_commands monit ggus_parser alert annotationManager nats-sub nats-pub dbs_vm
%define common_commands promtool amtool prometheus hey stern trivy k8s_info gocurl
%define flags -ldflags="-s -w -extldflags -static" -p %{compiling_processes}
Expand Down
4 changes: 2 additions & 2 deletions cmssw-osenv.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### RPM cms cmssw-osenv 211007.0
### RPM cms cmssw-osenv 211125.0
## NOCOMPILER
## NO_VERSION_SUFFIX

# ***Do not change minor number of the above version. ***

%define commit b3b917bf8931b3f778bce339d54f1636f465f90a
%define commit 3a1d33d8dc9989257ec91e3543eda8250e5a3593
%define branch master
# We do not use a revision explicitly, because revisioned packages do not get
# updated automatically when there are dependencies.
Expand Down
58 changes: 58 additions & 0 deletions cmsswdata.file
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/cmsswdata.xml
<tool name="cmsswdata" version="%v">
<client>
<environment name="CMSSWDATA_BASE" default="%{cmsroot}/%{cmsplatf}/%{pkgcategory}"/>
<environment name="CMSSW_DATA_PATH" default="$CMSSWDATA_BASE"/>
EOF_TOOLFILE

cat << \EOF_TOOLFILE > %i/searchpath.xml
</client>
<runtime name="CMSSW_DATA_PATH" value="$CMSSWDATA_BASE" type="path"/>
EOF_TOOLFILE

for toolbase in `echo %pkgreqs | tr ' ' '\n' | grep 'cms/data-'` ; do
toolver=`basename $toolbase`
pack=`echo $toolbase | cut -d/ -f2 | sed 's|data-||;s|-|/|'`
echo " <flags CMSSW_DATA_PACKAGE=\"$pack=$toolver\"/>" >> %i/etc/scram.d/cmsswdata.xml
echo " <runtime name=\"CMSSW_SEARCH_PATH\" default=\"%{cmsroot}/%{cmsplatf}/$toolbase\" type=\"path\"/>" >> %i/searchpath.xml
done

cat %i/searchpath.xml >> %i/etc/scram.d/cmsswdata.xml
echo " </tool>" >> %i/etc/scram.d/cmsswdata.xml
rm -f %i/searchpath.xml

%post
%{relocateConfig}etc/scram.d/*.xml
echo "%{BaseTool}_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
echo "set %{BaseTool}_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh
echo "%{BaseTool}_PKGREQUIRED='%pkgreqs'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
echo "set %{BaseTool}_PKGREQUIRED='%pkgreqs'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh

for DATA_PATH in %directpkgreqs; do
PKG_DIR=$(echo $DATA_PATH | cut -d/ -f2)
[ $(echo $PKG_DIR | grep '^data-' | wc -l) -eq 1 ] || continue
PKG_DIR=$(echo $PKG_DIR | sed 's|^data-||;s|-|/|')
SOURCE=$RPM_INSTALL_PREFIX/%{cmsplatf}/$DATA_PATH
DES_PATH=$(echo $DATA_PATH | cut -d/ -f1,2)/$(echo $DATA_PATH | cut -d/ -f3 | tr '-' '\n' | grep '^V[0-9][0-9]$\|^[0-9][0-9]$' | tr '\n' '-' | sed 's|-$||')
PKG_DATA=$(echo $PKG_DIR | cut -d/ -f1)
if [ ! -e $RPM_INSTALL_PREFIX/share/$DES_PATH/$PKG_DIR ] ; then
rm -rf $RPM_INSTALL_PREFIX/share/$DES_PATH
mkdir -p $RPM_INSTALL_PREFIX/share/$DES_PATH
if [ -L $SOURCE/$PKG_DATA ] ; then
ln -fs ../../../../%{cmsplatf}/$DATA_PATH/$PKG_DATA $RPM_INSTALL_PREFIX/share/$DES_PATH/$PKG_DATA
else
echo "Moving $DATA_PATH in share"
rsync -aq --no-t --size-only $SOURCE/$PKG_DATA/ $RPM_INSTALL_PREFIX/share/$DES_PATH/$PKG_DATA/
fi
fi
if [ ! -L $SOURCE/$PKG_DATA ] ; then
rm -rf $SOURCE/$PKG_DATA && ln -fs ../../../../share/$DES_PATH/$PKG_DATA $SOURCE/$PKG_DATA
fi
done
60 changes: 2 additions & 58 deletions cmsswdata.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Source: none
%define BaseTool %(echo %n | tr '[a-z-]' '[A-Z_]')

Requires: data-CondTools-SiPhase2Tracker
Requires: data-DQM-EcalMonitorClient
Requires: data-RecoTracker-MkFit
Requires: data-RecoMuon-TrackerSeedGenerator
Requires: data-Validation-HGCalValidation
Expand Down Expand Up @@ -84,61 +85,4 @@ Requires: data-Validation-Geometry
Requires: data-Fireworks-Geometry
Requires: data-GeneratorInterface-ReggeGribovPartonMCInterface

%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/cmsswdata.xml
<tool name="cmsswdata" version="%v">
<client>
<environment name="CMSSWDATA_BASE" default="%{cmsroot}/%{cmsplatf}/%{pkgcategory}"/>
<environment name="CMSSW_DATA_PATH" default="$CMSSWDATA_BASE"/>
EOF_TOOLFILE

cat << \EOF_TOOLFILE > %i/searchpath.xml
</client>
<runtime name="CMSSW_DATA_PATH" value="$CMSSWDATA_BASE" type="path"/>
EOF_TOOLFILE

for toolbase in `echo %pkgreqs | tr ' ' '\n' | grep 'cms/data-'` ; do
toolver=`basename $toolbase`
pack=`echo $toolbase | cut -d/ -f2 | sed 's|data-||;s|-|/|'`
echo " <flags CMSSW_DATA_PACKAGE=\"$pack=$toolver\"/>" >> %i/etc/scram.d/cmsswdata.xml
echo " <runtime name=\"CMSSW_SEARCH_PATH\" default=\"%{cmsroot}/%{cmsplatf}/$toolbase\" type=\"path\"/>" >> %i/searchpath.xml
done

cat %i/searchpath.xml >> %i/etc/scram.d/cmsswdata.xml
echo " </tool>" >> %i/etc/scram.d/cmsswdata.xml
rm -f %i/searchpath.xml

%post
%{relocateConfig}etc/scram.d/*.xml
echo "%{BaseTool}_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
echo "set %{BaseTool}_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh
echo "%{BaseTool}_PKGREQUIRED='%pkgreqs'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
echo "set %{BaseTool}_PKGREQUIRED='%pkgreqs'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh

for DATA_PATH in %directpkgreqs; do
PKG_DIR=$(echo $DATA_PATH | cut -d/ -f2)
[ $(echo $PKG_DIR | grep '^data-' | wc -l) -eq 1 ] || continue
PKG_DIR=$(echo $PKG_DIR | sed 's|^data-||;s|-|/|')
SOURCE=$RPM_INSTALL_PREFIX/%{cmsplatf}/$DATA_PATH
PKG_DATA=$(echo $PKG_DIR | cut -d/ -f1)
if [ ! -e $RPM_INSTALL_PREFIX/share/$DATA_PATH/$PKG_DIR ] ; then
rm -rf $RPM_INSTALL_PREFIX/share/$DATA_PATH
mkdir -p $RPM_INSTALL_PREFIX/share/$DATA_PATH
if [ -L $SOURCE/$PKG_DATA ] ; then
ln -fs ../../../../%{cmsplatf}/$DATA_PATH/$PKG_DATA $RPM_INSTALL_PREFIX/share/$DATA_PATH/$PKG_DATA
else
echo "Moving $DATA_PATH in share"
rsync -aq --no-t --size-only $SOURCE/$PKG_DATA/ $RPM_INSTALL_PREFIX/share/$DATA_PATH/$PKG_DATA/
fi
fi
if [ ! -L $SOURCE/$PKG_DATA ] ; then
rm -rf $SOURCE/$PKG_DATA && ln -fs ../../../../share/$DATA_PATH/$PKG_DATA $SOURCE/$PKG_DATA
fi
done

## INCLUDE cmsswdata
2 changes: 1 addition & 1 deletion coral.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### RPM cms coral CORAL_2_3_21
%define tag c5ddd97499d6a76f24cba6800e5cb88887764bcb
%define tag 2ac0d2a14fe877702f5491fe66702a5d32039262
%define branch cms/%{realversion}py3
%define github_user cms-externals

Expand Down
20 changes: 13 additions & 7 deletions crab-build.file
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ echo dbs >> %{i}/etc/crab_py_pkgs.txt
echo RestClient >> %{i}/etc/crab_py_pkgs.txt

#Copy WMCore
for pkg in %{wmcore_packages} ; do
if [ -d %{_builddir}/WMCore/src/python/${pkg} ] ; then
rsync -a %{_builddir}/WMCore/src/python/${pkg} %{i}/lib/
else
cp %{_builddir}/WMCore/src/python/${pkg} %{i}/lib/${pkg}
fi
done
if [ "%{crab_type}" == "pre" ] ; then
for pkg in %{wmcore_packages} ; do
if [ -d %{_builddir}/WMCore/src/python/${pkg} ] ; then
rsync -a %{_builddir}/WMCore/src/python/${pkg} %{i}/lib/
else
cp %{_builddir}/WMCore/src/python/${pkg} %{i}/lib/${pkg}
fi
done
else
mkdir %{i}/lib/WMCore
cp %{_builddir}/CRABClient/src/python/CRABClient/WMCoreConfiguration.py %{i}/lib/WMCore/Configuration.py
touch %{i}/lib/WMCore/__init__.py
fi

#Copy CRABServer
for pkg in %{crabserver_packages} ; do
Expand Down
2 changes: 1 addition & 1 deletion crab-dev.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#For any other change, increment version_suffix
##########################################
%define version_suffix 01
%define crabclient_version v3.211026
%define crabclient_version v3.211130
### RPM cms crab-dev %{crabclient_version}.%{version_suffix}
%define wmcore_version 1.5.3
%define crabserver_version v3.211025
Expand Down
6 changes: 3 additions & 3 deletions crab-pre.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#For new crabclient_version, set the version_suffix to 00
#For any other change, increment version_suffix
##########################################
%define version_suffix 01
%define crabclient_version v3.210323
%define version_suffix 04
%define crabclient_version v3.210825
### RPM cms crab-pre %{crabclient_version}.%{version_suffix}
%define wmcore_version 1.3.6.crab6
%define crabserver_version v3.210318
%define crabserver_version v3.210611p1
%define dbs_version 3.14.0

## IMPORT crab-build
8 changes: 4 additions & 4 deletions crab-prod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#For new crabclient_version, set the version_suffix to 00
#For any other change, increment version_suffix
##########################################
%define version_suffix 01
%define crabclient_version v3.210825
%define version_suffix 00
%define crabclient_version v3.211130
### RPM cms crab-prod %{crabclient_version}.%{version_suffix}
%define wmcore_version 1.3.6.crab6
%define crabserver_version v3.210611p1
%define wmcore_version 1.5.3
%define crabserver_version v3.211025
%define dbs_version 3.14.0

## IMPORT crab-build
59 changes: 50 additions & 9 deletions cuda-compatible-runtime.spec
Original file line number Diff line number Diff line change
@@ -1,26 +1,67 @@
### RPM external cuda-compatible-runtime 1.0

%define branch master
%define commit 18d5a51bfb32fbb7b765dd2eecd14e193cce8126
%define commit bfe5537537428ab4a72ae929c77977a55501c576

Source: git+https://:@gitlab.cern.ch:8443/cms-patatrack/%{n}.git?obj=%{branch}/%{commit}&export=%{n}&filter=./test.c&output=/%{n}-%{realversion}.tgz
Source: git+https://:@gitlab.cern.ch:8443/cms-patatrack/%{n}.git?obj=%{branch}/%{commit}&export=%{n}&filter=./test.cu&output=/%{n}-%{realversion}.tgz
Requires: cuda
AutoReq: no

%prep
%setup -n %{n}

%build
## INCLUDE cuda-flags
# defines nvcc_stdcxx and cuda_flags_4

rm -rf %{_builddir}/build && mkdir %{_builddir}/build
gcc -std=c99 -O2 -Wall test.c -I $CUDA_ROOT/include -L $CUDA_ROOT/lib64 -L $CUDA_ROOT/lib64/stubs -l cudart_static -l cuda -ldl -lrt -pthread -static-libgcc -o %{_builddir}/build/cuda-compatible-runtime # || true
if
$CUDA_ROOT/bin/nvcc %{nvcc_stdcxx} -O2 -g %{cuda_flags_4} test.cu -I $CUDA_ROOT/include -L $CUDA_ROOT/lib64 -L $CUDA_ROOT/lib64/stubs --cudart static -ldl -lrt --compiler-options '-Wall -pthread' -o %{_builddir}/build/cuda-compatible-runtime
then
true
else
# CUDA is not supported by this architecture or compiler version
cat > %{_builddir}/build/cuda-compatible-runtime << @EOF_
#! /bin/bash

%install
VERBOSE=false

mkdir %{i}/test
if [ -f %{_builddir}/build/cuda-compatible-runtime ]; then
cp %{_builddir}/build/cuda-compatible-runtime %{i}/test/cuda-compatible-runtime
else
ln -s /usr/bin/false %{i}/test/cuda-compatible-runtime
function usage() {
cat << @EOF
Usage: \$0 [-h|-v]

Options:
-h Print a help message and exits.
-v Be more verbose.
@EOF
}

for ARG in "\$@"; do
case "\$ARG" in
-h)
usage
exit 0
;;
-v)
VERBOSE=true
;;
*)
echo "\$0: invalid option '\$ARG'"
echo
usage
exit 1
;;
esac
done

\$VERBOSE && echo "CUDA ${CUDA_VERSION} is not compatible with GCC ${GCC_VERSION}"
exit 1
@EOF_
chmod +x %{_builddir}/build/cuda-compatible-runtime
fi

%install
mkdir %{i}/test
cp %{_builddir}/build/cuda-compatible-runtime %{i}/test/cuda-compatible-runtime

%post
38 changes: 0 additions & 38 deletions data-package-build.file

This file was deleted.

Loading

0 comments on commit 4539e15

Please sign in to comment.