How to update uboone_oslibs¶
Ups product uboone_oslibs is a hand-maintained, flavored, unqualified ups product containing copies of various operating system libraries. The purpose of uboone_oslibs is to allow MicroBooNE programs to run on sites that don't include all operating system libraries used to build MicroBooNE software packages.
Uboone_oslibs has distribution tarballs on scisoft, and is installed in standard MicroBooNE ups products areas. Uboone_oslibs does not have a git repository, nor a build procedure.
Ups product uboone_oslibs should contain the following directories.
Each flavor subdirectory should have a name that matches the output of command "ups flavor -n" to the desired depth n (normally n=4 on linux). Library directories should contain shared library files.
The ups subdirectory should contain the table file uboone_oslibs.table. The table file is hand-maintained. The same table file works for all flavors and versions, and should rarely need to change.
Adding versions and flavors¶
The path of the table file is
The table file should be configured to modify LD_LIBRARY_PATH on (DYLD_LIBRARY_PATH on darwin). The table file could normally be copied from a previous version.
Adding linux flavors¶
Log in to a linux host running the wanted OS flavor. Create the following product directory to the desired flavor depth.
uboone_oslibs/<version>/`ups flavor -4`/lib
Populate this directory with any desired libraries from this node.
Adding darwin flavors¶
The procedure from the previous section could be followed on darwin nodes. There is little reason to have actual darwin libraries in product uboone_oslibs, since batch jobs are never run on Mac nodes. However, it is necessary that uboone_oslibs will be able to be set up as a ups product on darwin nodes. For this it is sufficient to have a dummy darwin flavor to flavor depth 1 (`ups flavor -1` = Darwin64bit) as a catch-all darwin flavor. If it will be necessary to install actual darwin shared libraries, use `ups flavor -2`.
As an alternative to having a catch-all darwin flavor, adding a dummy null flavor is sufficient to ensure that uboone_oslibs will be able to be set up as a ups product on any node. The null flavor corresponds to flavor depth 0 (`ups flavor -0`=NULL).
Declaring to ups¶
Each flavor of uboone_oslibs needs to be declared to ups. Copy all version/flavor files to a ups products directory (containing a file .upsfiles/dbconfig) and issue the following command for each flavor.
ups declare -f <flavor> -z <upsdir> -r uboone_oslibs/<version> -m uboone_oslibs.table uboone_oslibs <version>
Here are the meaning of the options and arguments.
- -f <flavor> - Ups flavor (flavor should match flavor directory). A numeric argument (such as "-4") may be used in place of "-f <flavor>" to specify a flavor matching the current node to the desired flavor depth.
- -z <upsdir> - The ups products directory (the directory above dirctory "uboone_oslibs").
- -r <subdir> - Version subdirectory path.
- -m <table file> - Name of table file.
After each flavor is declared, subdirectory uboone_oslibs/<version>.version should be populated with a file matching each flavor.
At the time this article is being written, MicroBooNE is supporting the following flavors.
- SLF 6 - Linux64bit+2.6-2.12
- SLF 7 - Linux64bit+3.10-2.17
- MacOS 10.12 (Sierra) - Darwin64bit+16
- Mac OS 10.13 (High Sierra) - Darwin64bit+17
- MacOS any version - Darwin64bit
- Any OS, any version - NULL
Create a tarball for each supported OS and flavor. The name of the tarball should exactly match the name given below for scisoft tools to work properly.
tar -cvf uboone_oslibs-<dotversion>-<os>-x86_64.tar.bz2 -C <upsdir> uboone_oslibs/<version>/<flavor> uboone_oslibs/<version>/ups uboone_oslibs/<version>.version/<flavor>_
Note the following.
- <upsdir> is the base of the ups products area (above directoroy uboone_oslibs).
- The version <dotversion> should be in "dot fomrat" (e.g. 1.0.0). The version <version> should be ups/underscore format (e.g. v1_0_0).
- Flavor <flavor> is some ups flavor (can be "NULL").
- The os field <os> should match some supported os name (as cetpkgsupport "get-directory-name os", namely, one of slf6, slf7, d16, d17, ...). Note that it is necessary to supply tarballs for each supported os, even if the corresponding ups flavor is NULL. The flavor and os should be consistent.
Uploading tarballs to scisoft¶
Upload each tarball to scisoft using script copyToSciSoft (download scisoft tools from here).
If you are updating a previously uploaded version, log in to scisoftportal and delete the previous version/tarballs from /nasroot/SciSoft/packages/uboone_oslibs/<version>.
Install in ups¶
Unroll tarballs in the standard ups products area /grid/fermiapp/products/uboone and upload to cvmfs.