-
First notes:
- do not have a CMSSW environment activated
- use a regular user (non-root/superuser) account
- typically requires at least a few GB of disk space
- depending on what's in your login file etc., may need to do:
unset PYTHONPATH
-
Get environment variables for CMSSW master branch with production architecture:
eval $(curl -s https://raw.githubusercontent.com/cms-sw/cms-bot/master/config.map | grep 'RELEASE_BRANCH=master' | grep 'PROD_ARCH=1')
-
Make a scratch directory, then clone the following repositories (you probably want to make a fork of cms-sw/cmsdist to store your work in progress):
git clone -b $PKGTOOLS_TAG [email protected]:cms-sw/pkgtools.git git clone -b $CMSDIST_TAG [email protected]:cms-sw/cmsdist.git
-
Each external package
[name]
has files[name].spec
andscram-tools.file/tools/[name]/[name].xml
incmsdist
. The latter file is the toolfile template. It depends on the former, so building the toolfile will also build the external. (For complicated externals, these may be split into multiple components/files.) To build an external and any new dependencies (existing dependencies will be downloaded as RPMs):pkgtools/cmsBuild -i build -a $SCRAM_ARCH -j 8 build [name]-toolfile
-
Once the external is successfully compiled, you can test it in a CMSSW release like this (reminder: use a separate session for cmsenv):
cp scratch/build/$SCRAM_ARCH/cms/protobuf-toolfile/[version]/etc/scram.d/[name].xml $CMSSW_BASE/config/toolbox/$SCRAM_ARCH/tools/selected scram setup [name]
If any externals depend on your new external, they will also have been rebuilt, and you should repeat the above commands for those externals.
-
In case you updated any existing dependencies that are used in CMSSW packages, you'll need to rebuild those packages. You can checkout all of those packages using (like git cms-checkdeps, but for external changes):
scram b checkdeps
-
Last notes:
- if you update the .spec file (e.g. to fix a bug), but the actual version of the external software doesn't change, it will append "-cms" to the version number. For a subsequent change, it will append "-cms2", etc.
scram b checkdeps
may not work in older versions of CMSSW. An alternative command is:scram b echo_[name]_USED_BY | tr ' ' '\n' | grep "self" | cut -d'/' -f2-3 | sort -u > pkgs.txt git cms-addpkg -f pkgs.txt
Last active
December 25, 2023 22:39
-
-
Save kpedro88/215f2377264510b55a4b308e7a4d22d2 to your computer and use it in GitHub Desktop.
cmsdist instructions and notes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment