ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/SCRAM.tex
Revision: 1.8
Committed: Fri Jul 19 15:43:30 2002 UTC (22 years, 9 months ago) by sashby
Content type: application/x-tex
Branch: MAIN
Changes since 1.7: +38 -36 lines
Log Message:
Changes to src makefiles.

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