SconsUPS
This page is about creating the UPS product tarball for new versions of scons.
Necessary Permissions
To clone the git repo that contains the build scripts for building scons, you need to make sure you have permission on redmine as a developer on the scons project.
After you have the necessary redmine permissions, you should just need kinit.
Setting Up a UPS Product Working Area
Build scripts:
These commands will pull the necessary scripts to build scons and a table of dependencies for the scons product. I created a new directory in /mu2e/app/users/ to hold the scripts. Before we can execute the scripts to build scons, we also need to setup UPS, so I called setupmu2e-art.sh explicitly, but setup mu2e should be equivalent.
git clone ssh://p-build-framework@cdcvs.fnal.gov/cvs/projects/build-framework-scons-ssi-build source /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh
After cloning this area, you will see three scripts and a directory inside of the build-framework-scons-ssi-build repo:
- bootstrap.sh: grabs product from the web and makes the source code tarball and helper product files
- build_scons.sh: builds the actual UPS product tarball
- autobuild.sh: for building in distributions only
- ups directory: table file which lists dependencies on other packages; for scons, there are only python dependencies, so in the table file is a list of specific python versions which can be built against
Output directory for products:
The area to which output files will be directed needs to be an area that is writeable for UPS products, so we need to copy the .upsfiles directory from /cvmfs/.
mkdir /mu2e/data/users/<your_username>/<output_dir_name> cp -pr /cvmfs/mu2e.opensciencegrid.org/artexternals/.upsfiles /mu2e/data/users/<your_username>/<output_dir_name>
Running the Scripts and Making Tarballs
After the build script and output file areas are set up, there are two main build scripts to run to link all of the necessary dependencies and produce the tarball of the UPS product. These are bootstrap.sh and build_scons.sh.
To build a specific version of scons, there are a few flags in bootstrap.sh and build_scons.sh that need modified. Typically, the only flags that need modified to build a new version are the flags origpkgver and pkgver. Search for these strings in both bootstrap.sh and build_scons.sh and change them in both scripts before running the next commands. Here's what the two flags mean:
- origpkgver: package version like vN_N_N
- pkgver: only used for appending a letter if a patch is released; add the letter on the end if needed and remove if not needed
In build_scons.sh, the other place that you may want to keep an eye on are the python qualifiers that are allowed to build against. If the version that you need is not there, it will also need to be added to the table file in the ups directory.
To create the necessary tarballs execute these two commands:
./bootstrap.sh /mu2e/data/users/<your_username>/<output_dir_name>
From this script, you'll see two directories and two tarballs - a pair for scons and a pair for the helper product ssibuildshims. This scons tarball will be the source code tarball and will contain the word source. what is the pair? what is in the ssibuildshims tarball?'
./build_scons.sh /mu2e/data/users/<your_username>/<output_dir_name> p392 tar > scons_vNNN.log
please say a few words about what the arguments do. Are they just labeles for the tarball or do they select the python verson, for example. Are there are useful options
From this script, you'll see the UPS product tarball for scons which will be named something like scons-N.N.N-noarch-p392.tar.bz2. This will be what you use with /cvmfs/.
Next Steps
- Once you have the tarball from the build_scons.sh script, this tarball can be copied to
/cvmfs/mu2e.opensciencegrid.org/artexternals
and untarred to make the new versions of scons available using the standard procedures.
- Before using the new version anywhere in the head of Mu2e repos, be sure to test the new version in a clean working area. The easiest way to do this is to make a clean muse working area and [a new uNNN muse envset] which chooses the new version. In the working area, clone all of the repos listed in the file
/cvmfs/mu2e.opensciencegrid.org/DataFiles/Muse/linkOrder
. Try to build and watch for any warnings or errors.
- If necessary, push the changes that you have made to the build scripts back to the redmine build-framework-scons-ssi-build repo. If you need to do this, simply commit and push.