ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/SCRAM.tex
Revision: 1.9
Committed: Mon Aug 5 11:54:07 2002 UTC (22 years, 9 months ago) by sashby
Content type: application/x-tex
Branch: MAIN
Changes since 1.8: +22 -24 lines
Log Message:
*** empty log message ***

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.9 % Revision : $Id: SCRAM.tex,v 1.8 2002/07/19 15:43:30 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.3 \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     1.Click on the boxes next to the numbers as you proceed to ensure you
573 sashby 1.7 don't miss any steps. 2. Create a directory \scram in which you wish
574     to keep your \scram installation e.g. mkdir \scram
575 sashby 1.5
576 sashby 1.7 3.Go into the directory you have just made e.g. cd \scram
577 sashby 1.5
578     4. Set the Environment variable CVSROOT variable to
579    
580 sashby 1.6 %:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM
581 sashby 1.5
582     e.g. csh, tcsh: setenv CVSROOT
583 sashby 1.6 %:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM
584 sashby 1.5 Bourne Shell, zsh, ksh: set
585 sashby 1.6 %CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM;
586 sashby 1.5 export CVSROOT 5. Type cvs login At the prompt enter the password
587     98passwd
588    
589 sashby 1.7 6. Check out the version of \scram you require with the following
590 sashby 1.5 command.
591    
592 sashby 1.7 cvs co -d version -r version \scram
593 sashby 1.5
594 sashby 1.7 Where version is one of versions listed as available on the main \scram
595 sashby 1.5 page. Make sure you replace version twice in the above command! Note:
596 sashby 1.7 Once a version of \scram has been installed, installation of any other
597     version becomes trivial with the \scram version Version command
598 sashby 1.5
599     7. Goto the Installation directory of the version you have just
600     checked out
601    
602     e.g cd version/Installation
603    
604     8. Run the installation script (install_scram). e.g. ./install_scram
605    
606     This will create a file wrapper script called "scram" in your top
607     level directory. The Perl executable will be found from your path,
608     automatically. If you want to specify the location, you can use the
609 sashby 1.6 -perl option (from V0\_15\_0): e.g ./install_scram -perl /usr/bin/perl
610 sashby 1.5
611     Experienced Users Note: The install script will make the current
612     version the default.
613    
614    
615 sashby 1.7 \subsubsection{Further information on \scram installation at remote sites}
616 sashby 1.5
617     At external sites, where the SITENAME is not CERN, the installation
618     script has been modified to allow the site managers to set default
619     values. The script asks for a value for SITENAME:
620    
621     ** Please enter the name of your SITE (e.g. CERN[default], FNAL) **
622     sitename?:
623    
624     and for a default location for the CMS tools file:
625    
626     ** Please enter the default location of the cmstools file **
627     cmstools-CERN.conf location?: ~/siteconf
628    
629     This location should be a directory name (e.g. ~/siteconf), under
630     which a valid file can be found (note that the filename of this file
631     must be cmstools-SITENAME.conf).
632    
633     During a setup or project command, this directory will be used in
634     place of [project_name]/config/site/.
635    
636     If the -f argument is given to either the project or setup commands,
637     the file specified will be used and any other file location (including
638     the default location described above) will be overridden. For
639     example, if the filename was given as ~/myfile.conf, then a file with
640     this name in the home directory will be used if it exists.
641    
642     Note that any filename given as a cmstools file name must end in
643     ".conf".
644    
645     The main part of the filename can be anything at all.
646    
647     9. change back to your top level directory e.g. cd ../..
648    
649     You will see the new file in this directory. Ensure that your system
650     can see it too by either: Creating a link from an area in your path to
651 sashby 1.7 the \scram file in this directory Extending your PATH environment
652 sashby 1.5 variable to include your top level directory Creating an alias to
653 sashby 1.7 point to the \scram file in this directory
654 sashby 1.5
655 sashby 1.7 10. If you wish to use \scram directly through web page links you will
656     now need to configure your browser to use \scram .
657 sashby 1.5
658 sashby 1.7 \subsubsection{Configuring Netscape to use \scram }
659 sashby 1.5
660    
661     Netscape navigator Checklist
662    
663     From the EDIT menu Select "Preferences" to open the preferences window
664     Click on "Navigator" and select "Applications" Click on New and fill
665     in the form Fill in the MIME-type box with application/scram_bootstrap
666     Click on the Button Next to the Application box to select it. Fill in
667     the Application Box with :
668    
669     xterm -e scram -re project -d myinstall_area file:%s
670    
671     Remember to replace myinstall_area in the above line with the location
672     where you will want your downloaded projects to be. i.e. Where the
673     src/binaries etc should go.
674    
675     Make sure that the directory you specified actually exists!
676    
677     Click on OK Click on OK in the preferences box
678    
679     So now whenever you click on a project bootstrap file netscape will
680 sashby 1.7 start \scram for you automatically to install the project.
681 sashby 1.5
682 sashby 1.7 Note: If you have just installed \scram , it may be necessary to restart
683     netscape in an environment where it can find the \scram executable
684 sashby 1.5
685    
686 sashby 1.7 \subsubsection{Controlling \scram versions}
687 sashby 1.5
688    
689    
690     Checking the Current Version
691    
692 sashby 1.7 The version of \scram you are using can be found with the command
693 sashby 1.5
694     scram version
695    
696 sashby 1.7 Downloading Alternative \scram versions
697 sashby 1.5
698 sashby 1.7 Once a version of \scram has been installed, downloading of other \scram
699     versions becomes trivial with the \scram version command. If you
700     supply a version number as an argument, \scram will check to see if the
701 sashby 1.5 specified version is already installed. If it isn't then it will
702     attempt to download the requested version automatically.
703    
704     e.g.
705    
706 sashby 1.6 scram version V0\_19\_2
707 sashby 1.5
708     Making a version the default
709    
710     Running the install_scram script of a specific version (see
711     Installation Guide) will make that version the default.
712    
713     Overriding the default Version
714    
715     The default version can be overridden at any time by setting the
716     SCRAM_HOME environment variable to point to the top of the version
717     required. It must be the full path to the version.
718    
719     Automated Version Selection
720    
721 sashby 1.7 \scram can be made to automatically select the correct version to use
722 sashby 1.5 for a given project area, overridding any other version selection
723     mechanism. To turn this feature on, simply create the file
724     scram_version in your project development/release configuration
725 sashby 1.7 directory. The file should contain the required \scram version tag. Any
726     \scram command issued in that area is then directed to the correct
727 sashby 1.5 version if it is installed. If the required version is not installed
728     then a warning is issued and execution of the command continues within
729     the current version.
730    
731 sashby 1.7 \subsubsection{\scram database handling}
732 sashby 1.5
733    
734    
735 sashby 1.7 The \scram database maintains lookup tables for the various projects
736     that may be installed on your system as accessed through the \scram
737 sashby 1.5 project project_name project_version command.
738    
739 sashby 1.7 The \scram database will usually live in the scramdb directory of your
740     \scram installation area and is accessible to all \scram versions. This
741 sashby 1.5 default can be overriden with the environment variable SCRAM_LOOKUPDB.
742    
743     Linking databases
744    
745 sashby 1.7 \scram databases can be linked together. You may want to do this, for
746 sashby 1.5 example, if you are maintaining a local copy of a project to speed up
747     development but would still like access to a remote copy of the
748     project (e.g over a shared file system such as AFS) which may be
749     slower but will have a guaranteed configuration, minor versions etc.
750    
751     Maintaing Links
752    
753     Database linking is maintained through
754    
755     scram db [link dbfile|unlink dbfile|showlinks]
756    
757     Please see the online help for more details.
758    
759     Installing a Project in the Database
760    
761     A project can be installed into the database with the
762    
763     scram install [project_name project_version]
764    
765     command. If no name/version tags are given the defaults are used from
766     the project configuration files.
767    
768     Removing A project from the database
769    
770     A project can be removed from the local database with the command
771    
772     scram remove [project_name project_version]
773    
774    
775    
776 sashby 1.7 \subsubsection{Installation of projects that use \scram }
777 sashby 1.5
778     It is envisaged that releases of a project need to be distributed to
779 sashby 1.7 remote sites. The release is contained in a special \scram area which
780     is created by \scram according to the projects requirements. Once a
781 sashby 1.5 carbon copy of the area has been built on the remote site, the
782 sashby 1.7 administrator can "scram install" it into the remote sites \scram
783     database. Once installed many other \scram development areas can be
784 sashby 1.5 based upon it, for use by other users,developers etc.
785    
786 sashby 1.9 \scram aims to make installion of projects as painless a possible. It
787 sashby 1.5 is designed to be used with a web browser so that you simply click on
788     a link to start the installation process.
789    
790     You will be asked questions about your system as required by the
791     project during the installation. Some basic error and consistency
792     checking is provided. These values can be changed later (see below) so
793     dont worry too much if you get things wrong at this stage.
794    
795     Once through the installation process you can make the project
796 sashby 1.7 available for general use by using the \scram install command. This
797     command will update your local \scram database with the project details
798     so that other \scram user can simply refer to it by name and version.
799 sashby 1.5
800     Automated setup procedure for new project areas
801    
802     The setup procedure is first invoked for a new project area to set up
803     the tools selected via the RequirementsDoc. This is now automated by
804     using site information read from a configuration file. The
805     configuration file is called cmstools-SITENAME.conf, where SITENAME is
806     the name of your site (the default is CERN). The sitename can be
807     changed by modifying the file sitename. These files reside in the
808 sashby 1.7 configuration area for each \scram -based project under a subdirectory
809 sashby 1.5 site. The configuration file contains default paths to tools,
810 sashby 1.7 especially ANAPHE tools, which \scram will use first to find locations
811 sashby 1.5 of libraries and include files. At remote sites that have read access
812     to the CVS repository only, and want to install a project that was
813 sashby 1.7 previously released at CERN, the sitename can be chosen during \scram
814 sashby 1.5 installation. An optional flag to the project command can allow the
815     administrator to specify the cmstools file to read. A default location
816 sashby 1.7 for this file can also be chosen during \scram installation.
817 sashby 1.5
818     Here is an extract from the CERN configuration file:
819    
820 sashby 1.6 \begin{verbatim}
821 sashby 1.5 ###############################################################
822     # cmstools-CERN.conf #
823     ###############################################################
824     # modified : Tue Nov 20 11:39:49 2001 / SFA #
825     # : #
826     # : #
827     # function : Configuration file for setting up ANAPHE and CMS #
828     # : tools at CERN. #
829     # : #
830     ###############################################################
831     # Set some ANAPHE variables.
832     # Specify the OS. All subsequent defns will be for this OS:
833     ANAPHEOS:Linux
834     # ANAPHE version:
835     ANAPHEVER:3.6.2
836     # Specify the top of the ANAPHE tool dir, excluding the version:
837     ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2
838     #
839     CMSTOOL:g77:
840     +FC:/usr/local/gcc-alt-2.95.2/bin/g77
841     CMSTOOL:gcc:
842     +CXX:/usr/local/gcc-alt-2.95.2/bin/c++
843     +CC:/usr/local/gcc-alt-2.95.2/bin/gcc
844     +LD_LIBRARY_PATH:/usr/local/gcc-alt-2.95.2/lib
845     CMSTOOL:htl:
846     +SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
847     CMSTOOL:zlib:
848     +ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/Linux__2.0/zlib-1.1.3
849     # Specify the OS. All subsequent defns will be for this OS:
850     ANAPHEOS:SunOS
851     # ANAPHE version:
852     ANAPHEVER:3.6.2
853     # Specify the top of the ANAPHE tool dir, excluding the version:
854     ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/sun4x_57/CC-5.2
855     #
856     CMSTOOL:f77:
857     +FC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/f77
858     CMSTOOL:cc:
859     +CXX:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/CC
860     +CC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/cc
861     +CXX_PRIOR_LIBS:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/WS6U1/lib
862     CMSTOOL:htl:
863     +SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
864     CMSTOOL:zlib:
865     +ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/SunOS__5.6/zlib-1.1.3
866 sashby 1.6 \end{verbatim}
867 sashby 1.5
868     For ANAPHE tools under linux, the default path is ANAPHETOP and
869     normally the libraries are found under a subdirectory matching the
870     ANAPHE version (set using the variable ANAPHEVER in the above
871     file). If a tool is not likely to be found under this default path,
872     an entry is made in the file. This entry begins with CMSTOOL and
873 sashby 1.7 the tool name (as known to \scram ), and any variables that \scram
874 sashby 1.5 must set for this tool are subsequently listed, each entry
875     beginning with a plus sign.
876    
877 sashby 1.7 When setting up the tools, \scram reads this file and creates a
878     lookup-table. If the default search fails, \scram looks for an entry
879 sashby 1.5 in the lookup table for the tool. If an entry exists, subsequent
880 sashby 1.7 values for the \scram variables will be used. If no entry is found,
881     \scram will drop to an interactive environment and request user
882 sashby 1.5 input.
883    
884     \subsubsection{Changing Installation Defaults}
885    
886     You can use the command
887    
888     scram setup [-i] [-f cmstools.conf] tool_name [[tool_version]
889     [tool_file]]
890    
891     to rerun the setup of a specific tool.
892    
893     The -f flag causes setup to read the filename given. This filename
894     must end in ".conf".
895    
896 sashby 1.7 You can override the automatic mechanisms that \scram uses to install a
897 sashby 1.5 tool with the -i option, or if this is not sufficient, you can modify
898     the values directly. Simply edit the appropriate .dat file in the
899     .SCRAM/SCRAM_ARCH directory from the top of the project installation.
900    
901    
902    
903    
904    
905    
906    
907     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
908    
909    
910 sashby 1.7 \section{Configuration Management with \scram }
911 sashby 1.2
912 sashby 1.5 \subsection{What is CM?}
913 sashby 1.2
914 sashby 1.5 \subsection{Configuring a new project}
915 sashby 1.2
916 sashby 1.7 o Tools Available in a \scram environment
917 sashby 1.5 o Installing/removing tools
918     o Tool Description Documents
919 sashby 1.2
920 sashby 1.7 \subsection{Working Within a \scram Environment}
921 sashby 1.2
922 sashby 1.5 o Getting Started
923     o The Runtime Environment
924     o Building Binaries
925 sashby 1.2
926 sashby 1.5 o Controlling the Build - The BuildFile
927 sashby 1.2
928 sashby 1.5 o <Export> tags. Configuring the <Use> tag for your Software Package.
929     o Defining the Configuration Interface for a Software Unit
930     o BuildFile Tags
931     o Glossary of BuildFile Tags
932     o Some Example BuildFiles
933     o Asking for Externals
934     o Advanced Use of the build command
935 sashby 1.7 o Specific Tools in \scram
936 sashby 1.2
937    
938    
939 sashby 1.9 o changing lib order by editing .SCRAM/<arch>/admin
940 sashby 1.2
941    
942 sashby 1.5 %% Appendices:
943 sashby 1.2
944 sashby 1.5 % Release Notes
945     % GNU Public Licence
946 sashby 1.2
947 sashby 1.5 % Template CMSTOOLS file
948 sashby 1.2
949    
950 sashby 1.5 \end{document}
951 sashby 1.2
952