Installation Tools/Utilities
The
VDT-Core package provides the following isntallation utilities.
- vdt-begin-install and vdt-end-install - these commands "wrap" the install section in the pacman file, and do the following:
- Write standardized headers/footers to vdt-install.log
- Write installation timestamps into the internal install log. This allows you to easily find files modified outside of pacman installations, which in turn simplifies debugging and/or preservation of relevant files during VDT upgrades.
- vdt-untar - unpackage the donwloaded file, depending on its format
- Automatically gathers and records a list of files installed by a package
- vdt-untar untars files into a specified directory (optional) and fixes ownership
- Allow platform-independence (e.g. AIX doesn't support GNU tar)
- Fixes hard coded paths from NMI builds
- vdt-uninstall - removes files created by vdt-untar and undoes actions by VDTConfigure.pm.
- vdt-check-arch - duplicates pacmans OS detection for install scripts.
- vdt-list-pacakges, vdt-query-package and vdt-which-package - meta-data query utilities: list installed packages, list files/info for a package, show which package a file belongs to, respectively
Pacman File Conventions
All .pacman files that install/create new files (i.e. as opposed to *-Environment.pacman, etc), must:
- Use only Pacman 3 syntax
- Place all package() and configure() before any installation atoms (shell(), mkdir()...).
- Have shell('vdt-begin-install') as the first installation atom and shell('vdt-end-install') as the last.
- Use vdt-set-package-filelist and vdt-add-package-file to correct the package's file list for any file creations/removals within the pacman file itself.
Example:
description('Virtual Data System !!VDS_VERSION!!')
url('!!VDS_URL!!')
package('Licenses')
package('JDK-1.4')
package('Perl-Modules')
package('Globus-RLS-Client')
setenv('VDS_HOME', '$VDT_LOCATION/vds')
setenv('VDS_JAVA_HEAPMAX', '1024')
setup('source ${VDS_HOME}/setup-user-env.SHELL')
vdt_download('linux' => '/vds/!!VDS_VERSION!!/vds-binary-!!VDS_VERSION!!.tar.gz')
shell('vdt-begin-install VDS')
shell('vdt-untar vds-binary-!!VDS_VERSION!!.tar.gz vds')
# We use perl's chmod because it doesn't complain about the
# lack of sticky support of AFS
shell('perl -e "chmod 01777, \'vds/var\'"')
shell('vdt/bin/vdt-version -add VDS')
shell('vdt-end-install')
Command Details
vdt-begin-install <pkg_name> [pkg_descriptive_name]
Example: vdt-begin-install Condor "Condor/Condor-G 6.6.0"
vdt-end-install
Example: vdt-end-install
vdt-untar <tar_file> [directory]
Creates and stores the list of all files the tar file contains
Untars the tar file, fixes ownership
If the directory is specified, changes the top-level directory of all the files in the archive to the specified one. E.g. if a file in the archive is named ./vds-1.2.0/bin/chimera, and the directory is specified as vds, the file will be installed into $VDT_LOCATION/vds/bin/chimera
Example: vdt-untar vds-1.2.0.tar.gz vds/
vdt-set-package-filelist
Reads a list of files from STDIN and records them as belonging to the current package (the package name is determined automatically, provided it was specified correctly in the preceding vdt-begin-install command)
This "resets" the list of files for this package to the given list
If you want the list to be empty, do "cat /dev/null | vdt-set-package-filelist"
Example: find condor/ | vdt-set-package-filelist
vdt-add-package-file [file]
Adds a specified file to the filelist
Example: vdt-add-package-file globus/lib/perl/condor.pm
vdt-remove-package-file [file]
Remove specified file from the filelist
Example: vdt-remove-package-file condor/release.tar
Implementation Details
All the package metadata is stored in $VDT_LOCATION/vdt/etc/package_data
Package filelist for package Condor in $VDT_LOCATION/vdt/etc/package_data/Condor.filelist
Internal install log in $VDT_LOCATION/vdt/etc/package_data/INSTALL_LOG