ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/SCRAM.tex
Revision: 1.10
Committed: Thu Aug 8 10:57:56 2002 UTC (22 years, 9 months ago) by sashby
Content type: application/x-tex
Branch: MAIN
CVS Tags: V0_19_6p1
Changes since 1.9: +30 -33 lines
Log Message:
Added INCLUDE path filtering.

File Contents

# User Rev Content
1 sashby 1.2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2     % SCRAM manual %
3     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4     % modified : Fri Jun 21 14:50:47 2002 / SFA %
5     % : %
6     % : %
7     % : %
8     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 sashby 1.10 % Revision : $Id: SCRAM.tex,v 1.9 2002/08/05 11:54:07 sashby Exp $
10 sashby 1.2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11     \documentclass[11pt]{report}
12     \usepackage{a4p}
13 sashby 1.3 \usepackage{html}
14     \usepackage{makeidx}
15 sashby 1.2
16 sashby 1.3 %% Begin the document:
17 sashby 1.2 \begin{document}
18     \pagestyle{plain}
19     \oddsidemargin=-0.25cm
20     \topmargin=-1.5cm
21     \setlength{\textwidth}{16.5cm}
22     \setlength{\textheight}{24.0cm}
23     \headheight 0.0cm
24     \footskip 35pt
25     \parskip 2ex plus 2pt minus 1pt
26    
27 sashby 1.3 %% Define some variables here:
28     \newcommand{\authorname}{S.~Ashby, \textsc{CERN EP D}ivision.}
29     \newcommand{\revision}{1.0}
30 sashby 1.5 %% Need to automate the update of this variable:
31 sashby 1.6 \newcommand{\thisrelease}{CURRENTRELEASETAG} %% Something like this
32     %% should work: V0\_19\_4
33 sashby 1.5
34     %% More variables:
35 sashby 1.3 \newcommand{\scramdevelopers}{scram-developers@cern.ch}
36 sashby 1.7 \newcommand{\scram}{\textsc{scram}~}
37     % Need to escape the special characters:
38     \newcommand{\scramcvsrepository}
39     {\begin{verbatim}pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM\end{verbatim}}
40 sashby 1.3 \newenvironment{indentlist}[2]{\begin{description}}{\end{description}}
41 sashby 1.7 % Define a shortcut for typesetting scram commands:
42     %\newenvironment{scramcommand}[]{}
43 sashby 1.8
44     \newcommand{\scramhelp}
45     {
46     \begin{verbatim}
47     *************************************************************************
48     SCRAM HELP --------- Recognised Commands
49     *************************************************************************
50    
51     scram project
52     scram build
53     scram install
54     scram version
55     scram list
56     scram remove
57     scram arch
58     scram setup
59     scram runtime
60     scram setroot
61     scram db
62     scram tool
63     scram url
64    
65     Help on individual commands available through
66    
67     scram command help
68    
69    
70     Options:
71     --------
72     -verbose Class : Activate the verbose function on the specified class
73    
74     -arch architecture : Set the architecture id to that specified
75    
76     \end{verbatim}
77     }
78    
79    
80 sashby 1.3 \newcommand{\indentitem}[1]{\item[#1]}
81     \newcommand{\url}[2]{\htmladdnormallink{#1}{#2}}
82     \newcommand{\email}[1]{\htmladdnormallink{#1}{mailto:#1}}
83    
84     %% Heading for title page:
85     \begin{titlepage}
86     \begin{center}
87     {\Large\bf SCRAM User Manual } \\ \vspace{1cm}
88     \end{center}
89    
90     %% Author and contact info:
91     \vspace{1cm}
92     \begin{center}
93     \begin{indentlist}{2.5cm}{3.0cm}
94     \indentitem{Documentation author:}\authorname
95     \indentitem{Contributors:}
96     \end{indentlist}
97     \end{center}
98     \vspace{3cm}
99    
100 sashby 1.4 \indent \scram~ (\textsc{s}oftware \textsc{c}onfiguration
101 sashby 1.3 \textsc{r}elease \textsc{a}nd \textsc{m}anagement) is a tool
102     originally conceived for the software development environment of a
103     high-energy physics experiment at \textsc{cern}. It provides a set of
104     commands allowing users to develop and test code in different physical
105     locations while ensuring that a common configuration is available, but
106 sashby 1.4 also allowing developers the flexibility to easily choose
107 sashby 1.3 different tools as they wish (compilers or external packages, etc\.).
108 sashby 1.2
109    
110 sashby 1.4
111 sashby 1.7 Further information can be obtained from the \url{\scram home page.}
112 sashby 1.3 {http://cmsdoc.cern.ch/Releases/SCRAM/current/cgi/scrampage.cgi}
113 sashby 1.2
114 sashby 1.10 \textbf{Please report bugs to \email{\scramdevelopers}}
115 sashby 1.2
116 sashby 1.3 \end{titlepage}
117     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
118 sashby 1.2
119 sashby 1.4
120 sashby 1.7
121     % *************************************************************************
122     % SCRAM HELP --------- project
123     % *************************************************************************
124    
125     % Setup a new project development area. The new area will appear in the current
126     % working directory.
127     % Usage:
128    
129     % scram project [-d install_area] [-n directory_name] project_url [project_version] [-f cmstools.conf]
130    
131     % Options:
132    
133     % project_url: The url of a scram bootstrap file.
134    
135     % Currently supported types are:
136    
137     % Database label
138     % Labels can be assigned to bootstrap files for easy
139     % access (See "scram install" command). If you
140     % specify a label you must also specify a project_version.
141     % e.g.
142    
143     % scram project ORCA ORCA_1_1_1
144    
145     % To see the list of installed projects use the
146     % "scram list" command.
147    
148     % file: A regular file on an accessible file system
149     % e.g.
150    
151     % file:~/myprojects/projecta/config/BootStrapFile
152    
153    
154     % Use the "-f" flag followed by a valid filename (which MUST end in ".conf") to
155     % allow auto setup to proceed without reading files from a repository (standalone mode).
156    
157    
158     % project_version:
159     % Only for use with a database label.
160    
161     % -d install_area:
162     % Indicate a project installation area into which the new
163     % project area should appear. Default is the current working
164     % directory.
165    
166     % -n directory_name:
167     % Specify the name of the SCRAM development area you wish to
168     % create.
169    
170    
171    
172     % *************************************************************************
173     % SCRAM HELP --------- build
174     % *************************************************************************
175    
176     % Information for building binaries and libraries.
177    
178     % Subcommands:
179    
180     % scram (b)uild lib/bin
181    
182     % Command is run from the src directory.
183    
184    
185     % SCRAM error: Unable to locate the top of local release. Exitting.
186    
187    
188     % *************************************************************************
189     % SCRAM HELP --------- install
190     % *************************************************************************
191    
192     % Associates a label with the current release in the SCRAM database.
193     % This allows other users to refer to a centrally installed project by
194     % this label rather than a remote url reference.
195    
196     % Usage:
197    
198     % scram install [project_tag [version_tag]]
199    
200     % project_tag : override default label (the project name of the current release)
201     % version_tag : the version tag of the current release. If version is not
202     % specified the base release version will be taken by default.
203    
204    
205     % *************************************************************************
206     % SCRAM HELP --------- version
207     % *************************************************************************
208    
209     % With no [version] argument given, this command will simply
210     % print to standard output the current version number.
211    
212     % Providing a version argument will cause that version to be downloaded and
213     % installed, if not already locally available.
214    
215    
216     % Usage:
217     % scram version [version]
218    
219    
220     % *************************************************************************
221     % SCRAM HELP --------- list
222     % *************************************************************************
223    
224     % List the available projects and versions installed in the local SCRAM database
225     % (see scram install help).
226    
227     % Usage:
228    
229     % scram list [ProjectName]
230    
231    
232     % *************************************************************************
233     % SCRAM HELP --------- remove
234     % *************************************************************************
235    
236     % Remove a project entry from scram database file ("project.lookup").
237    
238     % Usage:
239    
240     % scram remove [ProjectName] [Version]
241    
242    
243     % *************************************************************************
244     % SCRAM HELP --------- arch
245     % *************************************************************************
246    
247     % Print out the architecture flag for the current machine.
248    
249     % Usage:
250     % scram arch
251    
252     % *************************************************************************
253     % SCRAM HELP --------- setup
254     % *************************************************************************
255    
256     % Allows installation/re-installation of a new tool/external package into an
257     % already existing development area. If no toolname is specified,
258     % the complete installation process is initiated.
259    
260     % Usage:
261    
262     % scram setup [-i] [-f cmstools.conf] [toolname] [[version] [url]]
263    
264     % toolname : The name of the tool setup file required.
265     % version : where more than one version exists, specify the version.
266     % url : when setting up a completely new tool specify the url too.
267    
268     % The -i option turns off the automatic search mechanism allowing for more
269     % user interaction with the setup mechanism.
270    
271     % The -f option allows the user to supply a valid path to a cmstools file (the filename
272     % MUST end in ".conf")
273    
274    
275     % *************************************************************************
276     % SCRAM HELP --------- runtime
277     % *************************************************************************
278    
279     % Echo to Standard Output the Runtime Environment for the current development area
280     % Output available in csh or sh flavours
281    
282     % Usage:
283     % 1) scram runtime [-csh|-sh]
284     % or
285     % 2) scram runtime [-csh|-sh] filename
286     % or
287     % 3) scram runtime info filename [variable]
288    
289     % 1) For the general configuration environment
290     % 2) For environment described in filename or
291     % areatop/src/directory/BuildFile
292     % 3) Display information concerning the environment in the given file
293     % (limited to variable if specified)
294    
295     % The file for cases 2) and 3) are searched as follows :
296     % a) straightforward filename
297     % b) filename relative to local_area/src
298     % c) filename relative to release_area/src
299     % d) BuildFile relative to local_area/src
300     % e) BuildFile relative to release_area/src
301    
302     % Examples:
303    
304     % Setup the current environment to include the project Runtime Environment
305     % in a csh environment
306    
307     % eval `scram runtime -csh`
308    
309     % Setup the current environment to include the project Runtime Environment in a
310     % sh environment
311    
312     % eval `scram runtime -sh`
313    
314    
315     % *************************************************************************
316     % SCRAM HELP --------- setroot
317     % *************************************************************************
318    
319     % Set a SCRAM-aware variable which points to a particular project area. This
320     % permits the setting of the runtime environment outside of the project area.
321    
322     % Usage:
323     % scram setroot [-sh|-csh] [ProjectName] [Version]
324    
325     % To set the environment:
326    
327     % eval `scram setroot [-sh|-csh] [ProjectName] [Version]`
328    
329    
330     % *************************************************************************
331     % SCRAM HELP --------- db
332     % *************************************************************************
333    
334     % scram database administration command.
335    
336     % Usage:
337    
338     % scram db subcommand
339    
340     % Subcommands:
341    
342     % link :
343     % Make available an additional database for
344     % project and list operations
345    
346     % scram db link /a/directory/path/project.lookup
347    
348     % unlink :
349     % Remove a database from the link list. Note this does
350     % not remove the database, just the link to it in scram.
351    
352     % scram db unlink /a/directory/path/project.lookup
353    
354     % showlinks :
355     % List the databases that are linked in.
356    
357    
358     % *************************************************************************
359     % SCRAM HELP --------- tool
360     % *************************************************************************
361    
362     % Manage the tools in the scram area that define the areas environment.
363     % Tool subcommands:
364    
365     % list
366     % info <tool_name>
367     % default <tool_name> <tool_version>
368     % tag <tool_name> <tag_name>
369     % remove <tool_name>
370    
371    
372     % *************************************************************************
373     % SCRAM HELP --------- url
374     % *************************************************************************
375    
376     % URL information.
377    
378     % Subcommands:
379    
380     % scram url get
381 sashby 1.4
382    
383 sashby 1.5
384    
385    
386    
387    
388    
389    
390    
391    
392 sashby 1.7 %% Start the sections
393 sashby 1.5
394    
395    
396 sashby 1.7 % Introduction and History
397     % An overview for the impatient user
398     % Setting up a project for the first time
399     % Creating a developer area
400     % Changing tools or adding/configuring new tools
401     % Other items which will eventually go somewhere:
402     %
403     % Using debug libraries
404     %
405 sashby 1.5
406    
407    
408 sashby 1.4
409 sashby 1.7 \section{Introduction and History}
410 sashby 1.4
411 sashby 1.7 % Stuff here from Dr Dobbs....
412     % Description
413     % What is SCRAM?
414     % Current SCRAM Functionality
415 sashby 1.4
416 sashby 1.5 \subsection{Background}
417 sashby 1.4
418 sashby 1.7 \scram has been developed to enable large, geographically dispersed and
419 sashby 1.5 autonomous groups to work together on software development projects.
420     The groups, primarily based in universities and academic institutions,
421     independently manage their own resources. As such it can be extremely
422     difficult or even impossible to impose software process, adequate
423     documentation levels and heavy resource requirements - such as
424     dedicating entire machines to a single software development project.
425 sashby 1.4
426 sashby 1.7 The philosophy throughout the \scram project is, therefore, to
427 sashby 1.5 encourage good practice by making the intuitive, easy and convenient
428 sashby 1.7 way to do things the right way to do things.
429 sashby 1.4
430 sashby 1.7 \subsection{What is \scram ?}
431 sashby 1.4
432 sashby 1.7 \scram is a configuration management tool, a distribution system, a
433     build system and manages local resources and applications in a
434     transparent way. In addition it provides a common development
435     environment.
436 sashby 1.9 These features are described more fully in the following sections.
437 sashby 1.4
438 sashby 1.5 \subsubsection{A Configuration Manager}
439 sashby 1.4
440 sashby 1.7 The main task of \scram is to ensure that all developers are
441     working with the same consistent set of external products, libraries,
442 sashby 1.5 environments and source codes.
443 sashby 1.9
444 sashby 1.7 \begin{description}
445     \item[\textsc{external products configuration}]
446     A requirement of any \scram managed project is an explicit
447     statement, in the form of an XML-like
448     document, of all underlying products and versions of external
449 sashby 1.5 libraries and other software products used. Each product must have a
450 sashby 1.7 description document to inform \scram how it is to be used, to
451     supply dependency information, set environmental variables, and give default system locations.
452     Such description documents can be maintained independently of \scram
453     and imported into the project by \scram s built-in URL downloading
454 sashby 1.5 mechanism.
455 sashby 1.7 \item[\textsc{common configurations}]
456     It is often the case that many projects
457 sashby 1.5 need to share the same configuration in order that they can be
458 sashby 1.7 inter-operable (e.g. two applications using the same database).
459     \scram thus provides a mechanism for importing independently
460 sashby 1.5 maintained configuration documents automatically.
461 sashby 1.7 \item[\textsc{source code control}]
462     \scram itself is not a code repository but
463 sashby 1.5 any project must have access to one or more such repositories from
464     which it can checkout the appropriate code into the appropriate
465 sashby 1.7 place in the project structure. Currently, only CVS is supported but
466     this could be easily extended to other versioning systems if required.
467     \item[\textsc{environment control}]
468     The build and runtime environments are constructed from the
469     description documents of the required external products and
470     the project-specific environment.
471     \end{description}
472 sashby 1.4
473 sashby 1.5 \subsubsection{A distribution system}
474 sashby 1.4
475 sashby 1.7 \scram projects can be 'bootstrapped' from a single document that
476 sashby 1.5 describes its structure and download information of other project
477     documents and components.
478 sashby 1.4
479 sashby 1.7 From this document \scram can construct a copy of a project release.
480 sashby 1.9 Connected to a properly configured web browser such as netscape
481     makes "single click" installation possible. At present, \scram is
482     unable to automatically install external components although the user
483     can be directed to the correct documentation to do this themselves.
484     Binary distribution is not supported as building a distribution is
485     seen as a check that all the components of the system have been
486     installed properly. This feature could be added if user distributions were required.
487 sashby 1.4
488    
489 sashby 1.5 \subsubsection{A System resource/application interface}
490 sashby 1.4
491 sashby 1.5 As no two people are the same, it is often the case that no two
492     machines are the same. Products can be installed in different places
493     depending on the whims of system administrators, policy makers and
494 sashby 1.7 system constraints. \scram matches up the request for a product from a
495 sashby 1.5 projects configuration to the system it is installing the project on.
496 sashby 1.7 \scram does this by a number of automated means and if it fails to find
497     a product will prompt the user for its location. \scram then maintains
498 sashby 1.5 a database of such system information for future reference.
499 sashby 1.4
500 sashby 1.5 \subsubsection{A Build System}
501 sashby 1.4
502 sashby 1.5 Abstraction of logical build elements from implementation details
503     Associate directory and file structure with build operations (e.g.
504     everything in a directory libsrc could be automatically compiled into
505     a library , e.g.2 every binary in a directory test could be
506     automatically linked with a test utilities library) Definition of
507     Classes of build objects. e.g A library class can have types such as
508     debug, archive, shared, shared debug, profiled etc. Default types can
509     be assigned to a class/directory structure but are easy to override on
510     the command line. Strong environment control. Makes it easy to tweak
511     general rules for special cases - something not easy to do in make.
512     Abstract dependency specification. You can link in a product by
513 sashby 1.7 specifying its name, \scram does the rest taking care of system
514 sashby 1.5 specifics, dependencies etc. Module Interfaces can be defined for
515     large software modules to define dependencies etc. Other modules can
516     then simply load the interface to use the module. Compatible with
517     code repositories such as CVS which checkout the file with the same
518     date that it was checked in. This is a major flaw in make which simply
519     checks to see if a datea > dateb rather than datea != dateb.
520 sashby 1.4
521 sashby 1.5 \subsubsection{A development environment}
522    
523     Once a copy of a release is installed and built on a system it can be
524 sashby 1.7 made available for developers by adding it to \scram s list of projects.
525 sashby 1.5 Upon selecting an item from this list, a new development area is
526     created in which the developer can work independently of everyone
527     else. The development area will have the same configuration,
528     environment etc. as the base release. It will also automatically use
529     libraries/headers etc. from the base release if not rebuilt in the
530     local development area. The user is free to use whatever editors and
531     other tools he/she prefers.
532    
533     \subsubsection{Project Isolation}
534    
535 sashby 1.7 \scram ensures that an installed release is independent of any other.
536 sashby 1.5 This allows developers to easily switch between projects/versions they
537     might be working on even though they may have very different and
538     conflicting environment requirements.
539    
540     %%
541     %% Insert this pic here: <SCRAM-base>/doc/images/scram.jpg
542     %%
543     %%
544    
545    
546 sashby 1.9 In summary, \scram provides
547 sashby 1.5 \begin{itemize}
548 sashby 1.9 \item project installation with a click on a web page
549     \item control of Build Environment, including dependency tracking
550     \item fully configurable build operations, including default operations.
551     \item abstraction of logical build elements from the implementation details.
552     \item re-use of configuration management elements between projects.
553     \item configuration specification with XML-like documents.
554 sashby 1.5 \end{itemize}
555    
556    
557    
558    
559 sashby 1.7 \section{Installing \scram }
560 sashby 1.4
561 sashby 1.9 This section is for administrators who need to create and set up a local \scram installation.
562     General users can skip straight to the "Working within a \scram
563     Environment" section.
564 sashby 1.5
565    
566     \subsection{Download and general installation instructions}
567    
568 sashby 1.7
569 sashby 1.5
570     \subsubsection{Downloading and installing from CVS}
571    
572 sashby 1.10 \begin{enumerate}
573     \item Create a directory \scram in which you wish to keep your \scram
574     installation e.g. mkdir \scram
575     \item Go into the directory you have just made e.g. cd \scram
576     \item Set the Environment variable CVSROOT variable to
577     \scramcvsrepository
578     e.g. csh, tcsh: setenv CVSROOT \scramcvsrepository
579     Bourne Shell, zsh, ksh: export CVSROOT \scramcvsrepository
580    
581     \item Type cvs login and enter the password 98passwd for the anonymous user
582     \item Check out the version of \scram you require with the following
583     command: cvs co -d version -r version \scram
584 sashby 1.5
585 sashby 1.10 where version is one of versions listed as available on the main \scram
586 sashby 1.5 page. Make sure you replace version twice in the above command! Note:
587 sashby 1.7 Once a version of \scram has been installed, installation of any other
588     version becomes trivial with the \scram version Version command
589 sashby 1.5
590 sashby 1.10
591    
592     \item Goto the Installation directory of the version you have just
593 sashby 1.5 checked out
594     e.g cd version/Installation
595 sashby 1.10 \item Run the installation script (install_scram). e.g.
596     ./install_scram
597 sashby 1.5 This will create a file wrapper script called "scram" in your top
598     level directory. The Perl executable will be found from your path,
599     automatically. If you want to specify the location, you can use the
600 sashby 1.6 -perl option (from V0\_15\_0): e.g ./install_scram -perl /usr/bin/perl
601 sashby 1.5
602     Experienced Users Note: The install script will make the current
603     version the default.
604 sashby 1.10 \end{enumerate}
605    
606    
607    
608    
609 sashby 1.5
610    
611 sashby 1.7 \subsubsection{Further information on \scram installation at remote sites}
612 sashby 1.5
613     At external sites, where the SITENAME is not CERN, the installation
614     script has been modified to allow the site managers to set default
615     values. The script asks for a value for SITENAME:
616 sashby 1.10 \begin{verbatim}
617 sashby 1.5 ** Please enter the name of your SITE (e.g. CERN[default], FNAL) **
618     sitename?:
619 sashby 1.10 \end{verbatim}
620 sashby 1.5
621     and for a default location for the CMS tools file:
622 sashby 1.10 \begin{verbatim}
623 sashby 1.5 ** Please enter the default location of the cmstools file **
624     cmstools-CERN.conf location?: ~/siteconf
625 sashby 1.10 \end{verbatim}
626 sashby 1.5
627     This location should be a directory name (e.g. ~/siteconf), under
628     which a valid file can be found (note that the filename of this file
629     must be cmstools-SITENAME.conf).
630    
631     During a setup or project command, this directory will be used in
632     place of [project_name]/config/site/.
633    
634     If the -f argument is given to either the project or setup commands,
635     the file specified will be used and any other file location (including
636     the default location described above) will be overridden. For
637     example, if the filename was given as ~/myfile.conf, then a file with
638     this name in the home directory will be used if it exists.
639    
640 sashby 1.10 Note that any filename given as a cmstools file name must end in ".conf".
641 sashby 1.5
642     The main part of the filename can be anything at all.
643    
644     9. change back to your top level directory e.g. cd ../..
645    
646     You will see the new file in this directory. Ensure that your system
647     can see it too by either: Creating a link from an area in your path to
648 sashby 1.7 the \scram file in this directory Extending your PATH environment
649 sashby 1.5 variable to include your top level directory Creating an alias to
650 sashby 1.7 point to the \scram file in this directory
651 sashby 1.5
652 sashby 1.7 10. If you wish to use \scram directly through web page links you will
653     now need to configure your browser to use \scram .
654 sashby 1.5
655 sashby 1.7 \subsubsection{Configuring Netscape to use \scram }
656 sashby 1.5
657    
658     Netscape navigator Checklist
659    
660     From the EDIT menu Select "Preferences" to open the preferences window
661     Click on "Navigator" and select "Applications" Click on New and fill
662     in the form Fill in the MIME-type box with application/scram_bootstrap
663     Click on the Button Next to the Application box to select it. Fill in
664     the Application Box with :
665    
666     xterm -e scram -re project -d myinstall_area file:%s
667    
668     Remember to replace myinstall_area in the above line with the location
669     where you will want your downloaded projects to be. i.e. Where the
670     src/binaries etc should go.
671    
672     Make sure that the directory you specified actually exists!
673    
674     Click on OK Click on OK in the preferences box
675    
676     So now whenever you click on a project bootstrap file netscape will
677 sashby 1.7 start \scram for you automatically to install the project.
678 sashby 1.5
679 sashby 1.7 Note: If you have just installed \scram , it may be necessary to restart
680     netscape in an environment where it can find the \scram executable
681 sashby 1.5
682    
683 sashby 1.7 \subsubsection{Controlling \scram versions}
684 sashby 1.5
685    
686    
687     Checking the Current Version
688    
689 sashby 1.7 The version of \scram you are using can be found with the command
690 sashby 1.5
691     scram version
692    
693 sashby 1.7 Downloading Alternative \scram versions
694 sashby 1.5
695 sashby 1.7 Once a version of \scram has been installed, downloading of other \scram
696     versions becomes trivial with the \scram version command. If you
697     supply a version number as an argument, \scram will check to see if the
698 sashby 1.5 specified version is already installed. If it isn't then it will
699     attempt to download the requested version automatically.
700    
701     e.g.
702    
703 sashby 1.6 scram version V0\_19\_2
704 sashby 1.5
705     Making a version the default
706    
707     Running the install_scram script of a specific version (see
708     Installation Guide) will make that version the default.
709    
710     Overriding the default Version
711    
712     The default version can be overridden at any time by setting the
713     SCRAM_HOME environment variable to point to the top of the version
714     required. It must be the full path to the version.
715    
716     Automated Version Selection
717    
718 sashby 1.7 \scram can be made to automatically select the correct version to use
719 sashby 1.5 for a given project area, overridding any other version selection
720     mechanism. To turn this feature on, simply create the file
721     scram_version in your project development/release configuration
722 sashby 1.7 directory. The file should contain the required \scram version tag. Any
723     \scram command issued in that area is then directed to the correct
724 sashby 1.5 version if it is installed. If the required version is not installed
725     then a warning is issued and execution of the command continues within
726     the current version.
727    
728 sashby 1.7 \subsubsection{\scram database handling}
729 sashby 1.5
730    
731    
732 sashby 1.7 The \scram database maintains lookup tables for the various projects
733     that may be installed on your system as accessed through the \scram
734 sashby 1.5 project project_name project_version command.
735    
736 sashby 1.7 The \scram database will usually live in the scramdb directory of your
737     \scram installation area and is accessible to all \scram versions. This
738 sashby 1.5 default can be overriden with the environment variable SCRAM_LOOKUPDB.
739    
740     Linking databases
741    
742 sashby 1.7 \scram databases can be linked together. You may want to do this, for
743 sashby 1.5 example, if you are maintaining a local copy of a project to speed up
744     development but would still like access to a remote copy of the
745     project (e.g over a shared file system such as AFS) which may be
746     slower but will have a guaranteed configuration, minor versions etc.
747    
748     Maintaing Links
749    
750     Database linking is maintained through
751    
752     scram db [link dbfile|unlink dbfile|showlinks]
753    
754     Please see the online help for more details.
755    
756     Installing a Project in the Database
757    
758     A project can be installed into the database with the
759    
760     scram install [project_name project_version]
761    
762     command. If no name/version tags are given the defaults are used from
763     the project configuration files.
764    
765     Removing A project from the database
766    
767     A project can be removed from the local database with the command
768    
769     scram remove [project_name project_version]
770    
771    
772    
773 sashby 1.7 \subsubsection{Installation of projects that use \scram }
774 sashby 1.5
775     It is envisaged that releases of a project need to be distributed to
776 sashby 1.7 remote sites. The release is contained in a special \scram area which
777     is created by \scram according to the projects requirements. Once a
778 sashby 1.5 carbon copy of the area has been built on the remote site, the
779 sashby 1.7 administrator can "scram install" it into the remote sites \scram
780     database. Once installed many other \scram development areas can be
781 sashby 1.5 based upon it, for use by other users,developers etc.
782    
783 sashby 1.9 \scram aims to make installion of projects as painless a possible. It
784 sashby 1.5 is designed to be used with a web browser so that you simply click on
785     a link to start the installation process.
786    
787     You will be asked questions about your system as required by the
788     project during the installation. Some basic error and consistency
789     checking is provided. These values can be changed later (see below) so
790     dont worry too much if you get things wrong at this stage.
791    
792     Once through the installation process you can make the project
793 sashby 1.7 available for general use by using the \scram install command. This
794     command will update your local \scram database with the project details
795     so that other \scram user can simply refer to it by name and version.
796 sashby 1.5
797     Automated setup procedure for new project areas
798    
799     The setup procedure is first invoked for a new project area to set up
800     the tools selected via the RequirementsDoc. This is now automated by
801     using site information read from a configuration file. The
802     configuration file is called cmstools-SITENAME.conf, where SITENAME is
803     the name of your site (the default is CERN). The sitename can be
804     changed by modifying the file sitename. These files reside in the
805 sashby 1.7 configuration area for each \scram -based project under a subdirectory
806 sashby 1.5 site. The configuration file contains default paths to tools,
807 sashby 1.7 especially ANAPHE tools, which \scram will use first to find locations
808 sashby 1.5 of libraries and include files. At remote sites that have read access
809     to the CVS repository only, and want to install a project that was
810 sashby 1.7 previously released at CERN, the sitename can be chosen during \scram
811 sashby 1.5 installation. An optional flag to the project command can allow the
812     administrator to specify the cmstools file to read. A default location
813 sashby 1.7 for this file can also be chosen during \scram installation.
814 sashby 1.5
815     Here is an extract from the CERN configuration file:
816    
817 sashby 1.6 \begin{verbatim}
818 sashby 1.5 ###############################################################
819     # cmstools-CERN.conf #
820     ###############################################################
821     # modified : Tue Nov 20 11:39:49 2001 / SFA #
822     # : #
823     # : #
824     # function : Configuration file for setting up ANAPHE and CMS #
825     # : tools at CERN. #
826     # : #
827     ###############################################################
828     # Set some ANAPHE variables.
829     # Specify the OS. All subsequent defns will be for this OS:
830     ANAPHEOS:Linux
831     # ANAPHE version:
832     ANAPHEVER:3.6.2
833     # Specify the top of the ANAPHE tool dir, excluding the version:
834     ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2
835     #
836     CMSTOOL:g77:
837     +FC:/usr/local/gcc-alt-2.95.2/bin/g77
838     CMSTOOL:gcc:
839     +CXX:/usr/local/gcc-alt-2.95.2/bin/c++
840     +CC:/usr/local/gcc-alt-2.95.2/bin/gcc
841     +LD_LIBRARY_PATH:/usr/local/gcc-alt-2.95.2/lib
842     CMSTOOL:htl:
843     +SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
844     CMSTOOL:zlib:
845     +ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/Linux__2.0/zlib-1.1.3
846     # Specify the OS. All subsequent defns will be for this OS:
847     ANAPHEOS:SunOS
848     # ANAPHE version:
849     ANAPHEVER:3.6.2
850     # Specify the top of the ANAPHE tool dir, excluding the version:
851     ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/sun4x_57/CC-5.2
852     #
853     CMSTOOL:f77:
854     +FC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/f77
855     CMSTOOL:cc:
856     +CXX:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/CC
857     +CC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/cc
858     +CXX_PRIOR_LIBS:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/WS6U1/lib
859     CMSTOOL:htl:
860     +SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
861     CMSTOOL:zlib:
862     +ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/SunOS__5.6/zlib-1.1.3
863 sashby 1.6 \end{verbatim}
864 sashby 1.5
865     For ANAPHE tools under linux, the default path is ANAPHETOP and
866     normally the libraries are found under a subdirectory matching the
867     ANAPHE version (set using the variable ANAPHEVER in the above
868     file). If a tool is not likely to be found under this default path,
869     an entry is made in the file. This entry begins with CMSTOOL and
870 sashby 1.7 the tool name (as known to \scram ), and any variables that \scram
871 sashby 1.5 must set for this tool are subsequently listed, each entry
872     beginning with a plus sign.
873    
874 sashby 1.7 When setting up the tools, \scram reads this file and creates a
875     lookup-table. If the default search fails, \scram looks for an entry
876 sashby 1.5 in the lookup table for the tool. If an entry exists, subsequent
877 sashby 1.7 values for the \scram variables will be used. If no entry is found,
878     \scram will drop to an interactive environment and request user
879 sashby 1.5 input.
880    
881     \subsubsection{Changing Installation Defaults}
882    
883     You can use the command
884    
885     scram setup [-i] [-f cmstools.conf] tool_name [[tool_version]
886     [tool_file]]
887    
888     to rerun the setup of a specific tool.
889    
890     The -f flag causes setup to read the filename given. This filename
891     must end in ".conf".
892    
893 sashby 1.7 You can override the automatic mechanisms that \scram uses to install a
894 sashby 1.5 tool with the -i option, or if this is not sufficient, you can modify
895     the values directly. Simply edit the appropriate .dat file in the
896     .SCRAM/SCRAM_ARCH directory from the top of the project installation.
897    
898    
899    
900    
901    
902    
903    
904     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
905    
906    
907 sashby 1.7 \section{Configuration Management with \scram }
908 sashby 1.2
909 sashby 1.5 \subsection{What is CM?}
910 sashby 1.2
911 sashby 1.5 \subsection{Configuring a new project}
912 sashby 1.2
913 sashby 1.7 o Tools Available in a \scram environment
914 sashby 1.5 o Installing/removing tools
915     o Tool Description Documents
916 sashby 1.2
917 sashby 1.7 \subsection{Working Within a \scram Environment}
918 sashby 1.2
919 sashby 1.5 o Getting Started
920     o The Runtime Environment
921     o Building Binaries
922 sashby 1.2
923 sashby 1.5 o Controlling the Build - The BuildFile
924 sashby 1.2
925 sashby 1.5 o <Export> tags. Configuring the <Use> tag for your Software Package.
926     o Defining the Configuration Interface for a Software Unit
927     o BuildFile Tags
928     o Glossary of BuildFile Tags
929     o Some Example BuildFiles
930     o Asking for Externals
931     o Advanced Use of the build command
932 sashby 1.7 o Specific Tools in \scram
933 sashby 1.2
934    
935    
936 sashby 1.9 o changing lib order by editing .SCRAM/<arch>/admin
937 sashby 1.2
938    
939 sashby 1.5 %% Appendices:
940 sashby 1.2
941 sashby 1.5 % Release Notes
942     % GNU Public Licence
943 sashby 1.2
944 sashby 1.5 % Template CMSTOOLS file
945 sashby 1.2
946    
947 sashby 1.5 \end{document}
948 sashby 1.2
949