2019-04-16 10:42:25 +00:00
|
|
|
# Software Installation Tool (SIT)
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:25 +00:00
|
|
|
## About
|
2024-03-28 02:39:40 +00:00
|
|
|
SIT is a simple software installation tool inspired by Gentoo's emerge script.
|
2019-04-16 10:42:24 +00:00
|
|
|
It eases the installation process and helps to prevent errors during the
|
2024-03-28 02:39:40 +00:00
|
|
|
installation. Further sit helps with documenting software installations
|
|
|
|
by generating log files from the installation process, which are installed
|
|
|
|
along the software package itself.
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:25 +00:00
|
|
|
## Getting started
|
|
|
|
|
|
|
|
### Basic usage
|
|
|
|
|
2024-03-28 02:39:40 +00:00
|
|
|
In its current version sit can only install a package using a package class file
|
|
|
|
including the necessary information.
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2024-03-28 02:39:40 +00:00
|
|
|
The package tree resides per default in the directory `$SIT_PATH/packages`. For
|
|
|
|
convenience it should look like follows:
|
|
|
|
```shell
|
2012-10-25 09:30:53 +00:00
|
|
|
$SIT_PATH/packages/CATEGORY/PACKAGE/PACKAGE-VERSION
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2024-03-28 02:39:40 +00:00
|
|
|
The global configuration file of SIT is `$SIT_PATH/etc/sit.conf`. It includes
|
|
|
|
a variety of default values:
|
2011-07-07 23:35:12 +00:00
|
|
|
* PREFIX_BASE
|
2019-04-16 10:42:24 +00:00
|
|
|
* SRC_POOL
|
2011-07-07 23:35:12 +00:00
|
|
|
* SCLASS_DIR
|
|
|
|
* DEFAULT_PLATFORM
|
|
|
|
* DEFAULT_COMPILER
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2024-03-28 02:39:40 +00:00
|
|
|
A user specific configuration file `$HOME/.sit`" can be used to overwrite the
|
2012-05-11 08:02:14 +00:00
|
|
|
settings in the global configuration file.
|
|
|
|
|
2019-04-16 10:42:24 +00:00
|
|
|
The installation process is currently controled with the following environment
|
2011-03-04 17:44:10 +00:00
|
|
|
variables:
|
|
|
|
* COMPILER
|
|
|
|
* COMPILER_VERSION
|
|
|
|
* MPI
|
|
|
|
* MPI_VERSION
|
2011-11-02 13:52:44 +00:00
|
|
|
* PLATFORM
|
2011-07-07 23:35:12 +00:00
|
|
|
* HOSTNAME
|
|
|
|
|
2024-03-28 02:39:40 +00:00
|
|
|
Sit detects currently the build platform using the `SITE_PLATFORM_NAME` variable.
|
2013-07-17 18:55:09 +00:00
|
|
|
If sit cannot determine the PLATFORM it uses the default platform specified
|
2024-03-28 02:39:40 +00:00
|
|
|
in `sit.conf`.
|
2019-04-16 10:42:24 +00:00
|
|
|
For each platform configuration files are stored unter
|
2019-04-16 10:42:25 +00:00
|
|
|
```shell
|
|
|
|
$SIT_PATH/etc/platform-configs/$PLATFORM/*
|
|
|
|
```
|
2011-07-07 23:35:12 +00:00
|
|
|
|
|
|
|
At the moment only compiler configurations are supported.
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:24 +00:00
|
|
|
To install a package simply call sit with the necessary information provided by
|
2011-03-04 17:44:10 +00:00
|
|
|
these variables:
|
2024-03-28 02:39:40 +00:00
|
|
|
```shell
|
|
|
|
[VARIABLE_DECLARATIONS] sit PACKAGE
|
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
e.g.
|
2024-03-28 02:39:40 +00:00
|
|
|
```shell
|
|
|
|
PREFIX_BASE=/opt COMPILER=gnu COMPILER_VERSION=4.5 sit mpi/openmpi-1.5.1
|
|
|
|
```
|
2019-04-16 10:42:25 +00:00
|
|
|
or for a package to be installed with a specific compiler and mpi version
|
2024-03-28 02:39:40 +00:00
|
|
|
```shell
|
|
|
|
PREFIX_BASE=/opt COMPILER=gnu COMPILER_VERSION=8.3.0 MPI=openmpi MPI_VERSION=4.0.1 ./sit performance/extrae/extrae-3.6.1
|
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:25 +00:00
|
|
|
### Package files
|
2011-03-04 17:44:10 +00:00
|
|
|
|
|
|
|
Package files should include all the necessary information for the installation
|
|
|
|
proces. The syntax of the package class files is inspired by gentoo's ebuild files.
|
|
|
|
|
|
|
|
|
|
|
|
A sit package file must contain at least the following variables
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
A archive (source tarball)
|
|
|
|
P package (name of extracted source folder)
|
|
|
|
URL
|
|
|
|
INSTALLER
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
|
|
|
Optional varialbes to control the build process are
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
CONFIGURE_OPTS options which will be passed to configure
|
2012-03-06 09:53:36 +00:00
|
|
|
CMAKE_OPTS options which will be passed to cmake
|
2011-03-04 17:44:10 +00:00
|
|
|
MAKEOPTS options which will be passed to make (see sit.conf)
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
|
|
|
During the installation the following directory paths are used
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
WORKDIR working directory to which e.g. sources will be unpacked
|
|
|
|
SRCDIR source directory
|
2019-08-29 16:14:44 +00:00
|
|
|
BUILDDIR directory in which the package will be build ($WORKDIR/build)
|
2011-03-04 17:44:10 +00:00
|
|
|
LOGDIR directory storing the temporary logfiles ($WORKDIR)
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:24 +00:00
|
|
|
For fine tuning of the installation process the user can overwrite the following
|
2011-03-04 17:44:10 +00:00
|
|
|
functions. If not other mentioned they are executed in $BUILDDIR
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
src_unpack extract $SRC_POOL/${A} into $WORKDIR
|
2011-03-24 10:27:01 +00:00
|
|
|
src_prepare prepare extracted sources
|
2011-03-04 17:44:10 +00:00
|
|
|
src_configure configure
|
|
|
|
src_build make
|
2011-08-19 08:05:35 +00:00
|
|
|
src_pretest tests to be performed before installation
|
2011-03-04 17:44:10 +00:00
|
|
|
src_install make install
|
2011-08-19 08:05:35 +00:00
|
|
|
src_posttest tests to be done after installation
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|
2019-04-16 10:42:24 +00:00
|
|
|
The following helper functions can be used
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
unpack recognize and extract a compressed tar file
|
2024-03-28 02:39:40 +00:00
|
|
|
```
|
2011-03-04 17:44:10 +00:00
|
|
|
|