When using STORE, we have found that a need for some tools for effective installation of application. It is also possible to make additional such tools.
All these tools are currently implemented as aliases or functions in the
shell, mostly just starting a perl script. They could also be
implemented as shell scripts installed in the administrative area, in
the bin/
directory, if you use a shell without aliases or
equivalent functionality. For example, the "shadow" command is just an
alias for "perl /store/etc/internal/shadow.pl".
These are the tools currently available:
Common for most of these tools are that they ask cryptic questions with
(normally correct) default values, like for example shadow
:
Which compile store? [khym] ? Which application? [gopher] ? What version? [1.03] ? what architechture [sun4os4] ?
The default values are based on the current directory and what store server you are currently logged onto. If you run the commands from the "correct" place the defaults are correct. You can also give the answers as parameters to the program; the example above is equivalent to:
shadow -s khym -a gopher -v 1.03 -A sun4os4This feature is used mostly in scripts.
A short overview of the current behaviour of the different programs are:
/store/store/<master>/<application>/src-<version>
. For compile
trees, you also need to have created the directory
/store/store/<compilestore>/<application>-c
.
Asks for:
src-<version>
directory),
shadow
tries to locate a master store with source code, and
asks you to confirm that it guessed right. If it can't find anything,
you may need to NFS-mount the store.
In addition to creating the source shadow tree, shadow
protects the original source code. This is so diffs can be
made more easily (if needed, automatically).
Sometimes you want to make a set of patches to be used for all
compilations regardless of architectures. In this case, run
shadow
with an architecture of "local", and make your
modification in the src-<local>
shadow tree. On later runs,
shadow
will make links to this new tree instead of the
real original, so you get a two-tier system of links.
unshadow
replaces a softlink with a copy of the file it points
to, and ensures that the file copy is writable by the owner (store).
It is just a small shell function, and takes the name of the
link as parameter.
fix
is exactly like unshadow
, but in addition invokes
the "vi" editor on the file, for small modifications.
Note that "unshadow" isn't the inverse of "shadow".
postinst
is quite a 'dirty' tool. It assumes that you are
installing a complex application, and do not want to unneccessarily
modify the Makefiles etc. In this case, it is convenient to do 'make
install' into the /store directory directly. Normally, this would be
dead wrong, and the next run of the nightly job with cclient
would notice all the extra files and delete them.
postinst
is used right after installing directly into /store, and
searches the /store linktree for extra files, assumes they really
belonged to the application you are installing, and moves them into the
version tree.
To alleviate some of the worst problems with postinst, it has a built-in
time limit: It assumes that files older than 10 minutes doesn't belong
with this installation, and leaves them alone. To modify this time
limit, use the -t minutes
option.
In addition, if the application only installs files into a specific
directory, you may optimize postinst
by using the -p
prefix
option. For example, use -p /store/gnu
when installing
GNU programs configured with configure --prefix=/store/gnu
.
Postinst asks the following extra questions:
perl
regular expression identifying files in the link
tree that are not softlinks to files in the version tree. This
can be temporary files or automatically generated configuration files (e.g.
generated by the Nightly command). Should normally be left
empty.
You may also edit the registration file manually, if you are just updating some fields. Note that if the registration file syntax is wrong, important information may be lost.
cslave
. It asks for slave store, application, and
master store. These may also be specified using the -s
,
-a
and -m
options.
cclient
. The program reads the registration file to get
most of its information, like what version to link up. It asks for three
things:
Up : Installing software in STORE, Previous: Installing programs -- checklist, Next : Handling documentation.
arnej@lise.unit.no