Hall D Package Manager
hdpm is a command line tool for managing Hall-D software. It allows one to build and update Hall-D software from a single directory, and makes it easy to view and modify current package versions. The main idea is to configure package settings with a series of simple files, separating the process of scripting from configuration, and providing a mechanism to save and restore groups of package settings. Default settings are provided which have been tested for compatibility on supported platforms. The following is a relatively brief description of how to use the Hall D Package Manager (hdpm); The detailed documentation is located at the GitHub-hdpm wiki.
You can find download links for the latest release at https://github.com/JeffersonLab/hdpm/releases.
If you are on the JLab CUE, you can find the binary releases at /group/halld/Software/hdpm.
To put hdpm version 0.4.0 in your PATH (for csh):
setenv PATH /group/halld/Software/hdpm/0.4.0/bin:$PATH
If you are not at JLab, then you need to first download and unpack it.
macOS users should replace linux with macOS in the following commands.
curl -OL https://halldweb.jlab.org/dist/hdpm/hdpm-0.4.0.linux.tar.gz tar xf hdpm-0.4.0.linux.tar.gz setenv PATH $PWD/hdpm-0.4.0/bin:$PATH
Building software from source
You can set the package installation directory by setting the GLUEX_TOP environment variable.
If $GLUEX_TOP is an empty string or unset, hdpm will use the current working directory.
For help, just type hdpm or hdpm help.
Show usage and description of command.
hdpm help [<command>]
The current package settings are stored in the settings directory; these can be directly modified when the user wants to adjust their settings.
To write the default settings to the settings directory:
hdpm select master
To change the versions to versions specified in a version XML file:
hdpm select --xml <xmlfile-url> | <xmlfile-path>
To save the current package settings:
hdpm save [<settings-id>]
Select a package settings id.
hdpm select [<settings-id>]
Show the current package settings. Note that these arguments are optional. Field names: "version", "url", "path", "deps", and "cmds".
hdpm show [<field-name>]
Checkout, clone, or download selected packages.
hdpm fetch [<pkg>...]
hdpm fetch --xml <xmlfile-url> | <xmlfile-path>
Build selected packages (fetch if needed). Use the "-a" flag to build all packages. If a package is already built, the build time, disk use, and timestamp of when the build finished will be displayed.
hdpm build [<pkg>...]
hdpm build <directory>
hdpm build --xml <xmlfile-url> | <xmlfile-path>
Update selected Git/SVN packages.
hdpm update [<pkg>...]
Completely remove build products of selected packages.
hdpm clean [<pkg>...]
Print/write the GlueX environment variables.
hdpm env [<variable>]
Run a command in the GlueX offline environment.
hdpm run [<cmd>]
Installing pre-compiled software
CentOS/RHEL 6/7 and Ubuntu 14.04/16.04 LTS are supported at this time.
Fetch binary distribution of sim-recon and its dependencies and install it. Use with no argument to fetch the latest available distribution. Rerun this command for updates.
hdpm install [<commit>]
hdpm install [<tarfile-url> | <tarfile-path>]
Setting environment variables
The environment setup scripts produced by hdpm are written to $GLUEX_TOP/env-setup.
The name of the script corresponds to the active settings id at the time that it is written.
To set up the GlueX environment (default settings id):
To set up environment for sim-recon binary distribution:
These scripts are automatically generated at build time based on the configuration encoded by your package-settings files. It is not recommended to modify these environment scripts directly. Instead, if needed, one can make an additional environment script which modifies some of the environment variables, and source it after sourcing the main one.