ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/tex/manual/SCRAM.tex
Revision: 1.7
Committed: Thu Jul 18 13:46:16 2002 UTC (22 years, 10 months ago) by sashby
Content type: application/x-tex
Branch: MAIN
Changes since 1.6: +420 -113 lines
Log Message:
Some changes to manual.

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