Here are some internal details about the HEPiX scripts.
The master repository for the HEPiX scripts is in AFS
under /afs/cern.ch/project/hepix/working-groups/scripts
.
Terminology:
src
) contain pre-processing options for the tool
pp
including OS dependent parts or command names from the dictionaries
comp
) contain only few "meta" variables
that will be replaced at installation time only, they are defined in default.s
:
TOP /usr/local/lib/hepix TOP_SYSTEM /etc/hepix TOP_CLUSTER /etc/hepix/cluster TOP_USER $HOME/.hepix TOP_GROUP $GROUP_DIR TOP_XDM /usr/sue/lib/xdm/hepix perl /usr/local/bin/perl5
Conventions:
The relevant subdirectories are:
comp
: compiled files
doc
(aka www
): all the documentation,
mainly in HTML format, accessible from
http://wwwinfo.cern.ch/hepix/wg/scripts/www/
src
: source tree
tools
: internals tools for the HEPiX scripts,
described below
unpack
: ready-to-use files in SALAD format under
<pkg>-<ver>
High-level tools:
compile [-noprep] [-wipeout] <util> [where...]
where
can be 'all';
-noprep
skips the preparation phase
(create the directories, create the symbolic links...);
-wipeout
removes everything under
comp/utils/<util>
before compiling
compile-src -<pkg> [build-flags] <ver> <sys>...
src
to comp
)
the given version of a package for the given <sys> (can be 'all')
prepare -<pkg> [-dst dir] [build-flags] <ver> <sys>...
comp
)
the given version of a package for the given <sys> (can be 'all');
-dst
can be 'asis'
(will end up under /afs/.cern.ch/asis/packages/HEPiX/...
)
or 'unpack'
(will end up under unpack/<pkg>-<ver>
)
or a real directory
Low-level tools:
build [-d] [-f] [-n] [-sys sys] src_dir dst_dir
pp
recursively on the tree under src_dir
and put the processed files under dst_dir
;
the given sys
will be used to choose a dictionary;
src_dir/build.cfg
will be used to customise the task,
for more info RTSL!
csh2sh [csh-script [sh-script]]
pp [-d] [-o name] [-s file] [-i file] [-S expr] [-D expr] file
compile-src
requires dictionaries that contain, for each supported
<sys>, a mapping between command names and full paths
(e.g. chmod
-> /bin/chmod
).
The dictionaries (as well as the related manipulation programs)
are stored in the dico
subdirectory of
tools
. The name of a dictionary is simply <sys>.
The dictionaries contain building information (who, when,
where...) and a log file (named log
) keeps track of all
the changes made to the dictionaries.
The manipulation programs are:
build [-o file] [-p path] [template]
check [dico]
store [-n] dico...
-n
means show only the differences)
in the current working directory; the names are taken from the AFS' @sys
stored in the files and the changes are logged
usage [-v] dir
-v
means show also the line where the command appears
For instance, one would probably do something like:
# build a dico using current $PATH host1> ./build -o test1 template # build a dico using default (hard-coded) $PATH host1> ./build -o test2 -p 0 template # check the result host1> diff test1 test2 # check that the commands exist on another machine host2> ./check test # see the differences with the current dictionary host1> ./store -n test # really store the dico host1> ./store test
Lionel Cons, 5-Nov-1996