Difference between revisions of "Hall D Package Manager"

From GlueXWiki
Jump to: navigation, search
(Using it)
Line 1: Line 1:
This is a set of scripts with a unified user interface 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 builds with a series of simple text files, separating the process of scripting from configuration, and providing templates for future builds. The configuration text files are meant to be general enough so that the user will never need to modify any of the source scripts. Secondly, an effort is made to minimize the number of lines a user will need to modify in order to (re)configure a build; the scripts recognize certain variables, such as [VER] for version number to make this possible. Example templates are provided; most of these are designed for use on the JLab CentOS 6.5 iFarm, but can easily be modified for general use. [https://github.com/JeffersonLab/hdpm Hall D Package Manager] (hdpm) is located at the GitHub along with a thorough README.
+
This is a set of scripts with a unified user interface 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 builds with a series of simple text files, separating the process of scripting from configuration, and providing templates for future builds. The configuration text files are meant to be general enough so that the user will never need to modify any of the source scripts. Secondly, an effort is made to minimize the number of lines a user will need to modify in order to (re)configure a build; the scripts recognize certain variables, such as [VER] for version number to make this possible. A "master" template is provided along with tools for generating custom templates from it. [https://github.com/JeffersonLab/hdpm Hall D Package Manager] (hdpm) is located at the GitHub along with a thorough README.
  
 
==Getting it==
 
==Getting it==
Line 12: Line 12:
 
For help, just type ''''hdpm'''' or ''''hdpm help''''.
 
For help, just type ''''hdpm'''' or ''''hdpm help''''.
  
Select a build template. For first time use, the user should select an example template: "all", "Sp15", or "F14".
+
For first time use, the "master" template is copied to the "settings" directory, and "master" will be the only available template.
  hdpm select <template id>
+
 
 +
Select a build template. The "master" will be selected if no argument is given.
 +
  hdpm select [template id]
  
 
Show the current build settings. Note that these arguments are optional. Column names: "version", "url", "path", "deps", and "cmds".
 
Show the current build settings. Note that these arguments are optional. Column names: "version", "url", "path", "deps", and "cmds".
 
  hdpm show [column name] [column spacing]
 
  hdpm show [column name] [column spacing]
  
Customize build templates by editing/copying the text files in the "templates" directory (which starts off as a copy of the "example-templates" directory). The current build settings are stored in the "settings" directory; these should be directly modified when the user wants to try out new settings. These can be made into a template by using the "save" command.
+
The current build settings are stored in the "settings" directory; these can be directly modified when the user wants to try out new settings.  
 +
 
 +
To change the versions to versions specified in a '''version XML file''', use the "v-xml" command.
 +
hdpm v-xml [url or path of xml file]
 +
The current settings can be made into a template with the "save" command. Use it with '''jlab''' as the argument to generate and save a base template for building against group installations at JLab (after using "v-xml").
 
  hdpm save <new template id>
 
  hdpm save <new template id>
  
Line 26: Line 32:
 
Build selected packages (fetch if needed). Use with no arguments 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.
 
Build selected packages (fetch if needed). Use with no arguments 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 [template id]
 
  hdpm build [template id]
 +
hdpm build [url or path of xml file]
 
  hdpm build [pkgs...]
 
  hdpm build [pkgs...]
  

Revision as of 15:53, 25 August 2015

This is a set of scripts with a unified user interface 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 builds with a series of simple text files, separating the process of scripting from configuration, and providing templates for future builds. The configuration text files are meant to be general enough so that the user will never need to modify any of the source scripts. Secondly, an effort is made to minimize the number of lines a user will need to modify in order to (re)configure a build; the scripts recognize certain variables, such as [VER] for version number to make this possible. A "master" template is provided along with tools for generating custom templates from it. Hall D Package Manager (hdpm) is located at the GitHub along with a thorough README.

Getting it

git clone https://github.com/JeffersonLab/hdpm

Using it

On 64-bit Linux, change to hdpm directory and source the appropriate setup script. This script is for setting up the package manager, not the builds, and needs to be sourced each time a new shell is started.

source setup.(c)sh

On Mac OS X, change to hdpm directory and do the following:

source setup-osx.(c)sh

For help, just type 'hdpm' or 'hdpm help'.

For first time use, the "master" template is copied to the "settings" directory, and "master" will be the only available template.

Select a build template. The "master" will be selected if no argument is given.

hdpm select [template id]

Show the current build settings. Note that these arguments are optional. Column names: "version", "url", "path", "deps", and "cmds".

hdpm show [column name] [column spacing]

The current build settings are stored in the "settings" directory; these can be directly modified when the user wants to try out new settings.

To change the versions to versions specified in a version XML file, use the "v-xml" command.

hdpm v-xml [url or path of xml file]

The current settings can be made into a template with the "save" command. Use it with jlab as the argument to generate and save a base template for building against group installations at JLab (after using "v-xml").

hdpm save <new template id>

Checkout, clone, or download selected packages.

hdpm fetch [pkgs...]

Build selected packages (fetch if needed). Use with no arguments 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 [template id]
hdpm build [url or path of xml file]
hdpm build [pkgs...]

Update selected Git/SVN packages.

hdpm update [pkgs...]

Completely remove build products of selected packages.

hdpm clean [pkgs...] 

Do a clean build of selected packages.

hdpm clean-build [pkgs...]

Show usage and description of command.

hdpm help <command>