Preface

This document is part of the Campcaster project, Copyright © 2004 Media Development Loan Fund, under the GNU GPL.

Scope

This document describes the installation procedures used by the components of the Campcaster project.

Introduction

Component installation is a process more tricky than it seems at first. For example, when using a binary package manager, the component is configured and compiled on a different system (the one creating the binary package) than the one it will run on at the end.

Installation also involves related issues like uninstallation and product version migration, which also have to be discussed here.

Installation use cases

Basic installation

The basic installation procedure is as follows.

1.  setting up the sources

Get and unpack the source tarball(s), patch them if necessary. Make sure all tools required by the build are present.

2. configuring the sources

Run the configure script on the unpacked source tree.

Assumptions:

3. compile the sources

The sources are compiled (if needed) by the invoking make all.

4. install the component

Install (copy) the component, possibly into a different directory than what was specified at step 2. This basically involves copying relevant files from the (built) source directory tree into a target directory tree.

5. post-installation setup

Do post-installation (post-copy) setup of the component. This might involve the following:
Assumptions:

Basic uninstallation

The basic uninstallation procedure is the following.

1. pre-uninstallation steps

Destroy any resources used by the component, with the components itself still being installed. This might involve:
Assumptions:

2. uninstall the component

Remove the components files from the filesystem.

Upgrading

TODO: detail the upgrading procedure

Provisions in the build environment

For the above goals to be met, the following structure is needed for each component in the build environment:

componentX
|-- configure
|-- bin
| |-- autogen.sh
| |-- postInstall.sh
| `-- preUninstall.sh
`-- etc
|-- acinclude.m4
|-- configure.ac
`-- Makefile.in

Considerations about specific installation steps

1.  setting up the sources

none: this step is external to the package.

2. configuring the sources

Assumptions:

3. compile the sources

Assumptions:

4. install the component

When using package managers, this step is usually two-fold:
Note that there is a lot of package manager-specific magic happening between these two steps, and that the steps usually take place on different machines (after all the package is only build on one, while it will be installed on a miriad of systems).

Assumptions:

5. post-installation setup

The bin/postInstall.sh script should be used to perform the post-installation setup. The script should expect all variables it needs to be supplied by command-line arguments.

Assumptions:

Considerations about specific uninstallation steps

1. pre-uninstallation steps

The bin/preUninstall.sh script should be used to perform the pre-uninstallation steps. The script should expect all variables it needs to be supplied by command-line arguments.

Assumptions:

2. uninstall the component

none: this step is external to the package