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.6 |
% Revision : $Id: SCRAM.tex,v 1.5 2002/07/11 13:01:34 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 |
|
|
\newcommand{\scram}{\textsc{scram}}
|
37 |
|
|
\newenvironment{indentlist}[2]{\begin{description}}{\end{description}}
|
38 |
|
|
\newcommand{\indentitem}[1]{\item[#1]}
|
39 |
|
|
\newcommand{\url}[2]{\htmladdnormallink{#1}{#2}}
|
40 |
|
|
\newcommand{\email}[1]{\htmladdnormallink{#1}{mailto:#1}}
|
41 |
|
|
|
42 |
|
|
%% Heading for title page:
|
43 |
|
|
\begin{titlepage}
|
44 |
|
|
\begin{center}
|
45 |
|
|
{\Large\bf SCRAM User Manual } \\ \vspace{1cm}
|
46 |
|
|
\end{center}
|
47 |
|
|
|
48 |
|
|
%% Author and contact info:
|
49 |
|
|
\vspace{1cm}
|
50 |
|
|
\begin{center}
|
51 |
|
|
\begin{indentlist}{2.5cm}{3.0cm}
|
52 |
|
|
\indentitem{Documentation author:}\authorname
|
53 |
|
|
\indentitem{Contributors:}
|
54 |
|
|
\end{indentlist}
|
55 |
|
|
\end{center}
|
56 |
|
|
\vspace{3cm}
|
57 |
|
|
|
58 |
sashby |
1.4 |
\indent \scram~ (\textsc{s}oftware \textsc{c}onfiguration
|
59 |
sashby |
1.3 |
\textsc{r}elease \textsc{a}nd \textsc{m}anagement) is a tool
|
60 |
|
|
originally conceived for the software development environment of a
|
61 |
|
|
high-energy physics experiment at \textsc{cern}. It provides a set of
|
62 |
|
|
commands allowing users to develop and test code in different physical
|
63 |
|
|
locations while ensuring that a common configuration is available, but
|
64 |
sashby |
1.4 |
also allowing developers the flexibility to easily choose
|
65 |
sashby |
1.3 |
different tools as they wish (compilers or external packages, etc\.).
|
66 |
sashby |
1.2 |
|
67 |
|
|
|
68 |
sashby |
1.4 |
|
69 |
sashby |
1.3 |
Further information can be obtained from the \url{SCRAM home page.}
|
70 |
|
|
{http://cmsdoc.cern.ch/Releases/SCRAM/current/cgi/scrampage.cgi}
|
71 |
sashby |
1.2 |
|
72 |
sashby |
1.3 |
\textbf{please report bugs to \email{\scramdevelopers}}
|
73 |
sashby |
1.2 |
|
74 |
sashby |
1.3 |
\end{titlepage}
|
75 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
76 |
sashby |
1.2 |
|
77 |
sashby |
1.4 |
%% Start the sections
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
% Introduction and History
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
sashby |
1.5 |
% An overview for the impatient user
|
86 |
|
|
|
87 |
|
|
% Setting up a project for the first time
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
% Creating a developer area
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
% using debug libraries
|
94 |
|
|
|
95 |
|
|
% Changing tools or adding/configuring new tools
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
\section{Introduction and History}
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
%Stuff here from Dr Dobbs....
|
104 |
|
|
%Description
|
105 |
|
|
|
106 |
|
|
% What is SCRAM?
|
107 |
|
|
% Current SCRAM Functionality
|
108 |
|
|
|
109 |
|
|
|
110 |
sashby |
1.4 |
|
111 |
|
|
|
112 |
|
|
|
113 |
sashby |
1.5 |
\subsection{Background}
|
114 |
sashby |
1.4 |
|
115 |
sashby |
1.5 |
SCRAM has been developed to enable large, geographically dispersed and
|
116 |
|
|
autonomous groups to work together on software development projects.
|
117 |
|
|
The groups, primarily based in universities and academic institutions,
|
118 |
|
|
independently manage their own resources. As such it can be extremely
|
119 |
|
|
difficult or even impossible to impose software process, adequate
|
120 |
|
|
documentation levels and heavy resource requirements - such as
|
121 |
|
|
dedicating entire machines to a single software development project.
|
122 |
sashby |
1.4 |
|
123 |
sashby |
1.5 |
The philosophy throughout the SCRAM project is, therefore, to
|
124 |
|
|
encourage good practice by making the intuitive, easy and convenient
|
125 |
|
|
way to do things the right way to do things. Take for example the fact
|
126 |
|
|
that SCRAM is controlled and configured through XML-like documents.
|
127 |
|
|
Thus documentation has to be kept up to date for SCRAM to even
|
128 |
|
|
function.
|
129 |
sashby |
1.4 |
|
130 |
sashby |
1.5 |
\subsection{What is SCRAM?}
|
131 |
sashby |
1.4 |
|
132 |
|
|
|
133 |
|
|
|
134 |
sashby |
1.5 |
\subsubsection{A Configuration Manager}
|
135 |
sashby |
1.4 |
|
136 |
sashby |
1.5 |
The main task of the SCRAM tool is to ensure that all developers are
|
137 |
|
|
working with the same consistent set of products, libraries,
|
138 |
|
|
environments and source codes.
|
139 |
|
|
\begin{itemize}
|
140 |
|
|
\item External Products Configuration A requirement of any SCRAM
|
141 |
|
|
managed project is an explicit statement, in the form of an XML
|
142 |
|
|
document, of all the underlying products and versions of external
|
143 |
|
|
libraries and other software products used. Each product must have a
|
144 |
|
|
description document to tell SCRAM how it is to be used, dependency
|
145 |
|
|
information, environmental variables, default system locations etc.
|
146 |
|
|
Such description documents can be maintained independently of SCRAM
|
147 |
|
|
and imported into the project by SCRAMs built-in url down-loading
|
148 |
|
|
mechanism.
|
149 |
|
|
\item Common Configurations It is often the case that many projects
|
150 |
|
|
need to share the same configuration in order that they can be
|
151 |
|
|
inter-operable (e.g. Two applications using the same database).
|
152 |
|
|
SCRAM thus provides a mechanism for importing independently
|
153 |
|
|
maintained configuration documents automatically.
|
154 |
|
|
\item Source Code Control SCRAM itself is not a code repository but
|
155 |
|
|
any project must have access to one or more such repositories from
|
156 |
|
|
which it can checkout the appropriate code into the appropriate
|
157 |
|
|
place in the project structure. Currently it only supports CVS but
|
158 |
|
|
this could be easily extended to other repositories if required.
|
159 |
|
|
\item Environment Control The build and runtime environments are built
|
160 |
|
|
up from the descriptions of those required by external products and
|
161 |
|
|
project specific environment description documents.
|
162 |
|
|
\end{itemize}
|
163 |
sashby |
1.4 |
|
164 |
|
|
|
165 |
sashby |
1.5 |
\subsubsection{A distribution system}
|
166 |
sashby |
1.4 |
|
167 |
sashby |
1.5 |
SCRAM projects can be 'bootstrapped' from a single document that
|
168 |
|
|
describes its structure and download information of other project
|
169 |
|
|
documents and components.
|
170 |
sashby |
1.4 |
|
171 |
sashby |
1.5 |
From this document SCRAM can construct a copy of a project release.
|
172 |
|
|
Connected to a web browser such as netscape makes "single click"
|
173 |
|
|
installation possible. At present SCRAM is unable to automatically
|
174 |
|
|
install external components although the user can be directed to the
|
175 |
|
|
correct documentation to do this themselves. Binary distribution is
|
176 |
|
|
not supported as building a distribution is seen as a check that all
|
177 |
|
|
the components of the system have been installed properly. This
|
178 |
|
|
feature could be added if user distributions were required.
|
179 |
sashby |
1.4 |
|
180 |
|
|
|
181 |
sashby |
1.5 |
\subsubsection{A System resource/application interface}
|
182 |
sashby |
1.4 |
|
183 |
sashby |
1.5 |
As no two people are the same, it is often the case that no two
|
184 |
|
|
machines are the same. Products can be installed in different places
|
185 |
|
|
depending on the whims of system administrators, policy makers and
|
186 |
|
|
system constraints. SCRAM matches up the request for a product from a
|
187 |
|
|
projects configuration to the system it is installing the project on.
|
188 |
|
|
SCRAM does this by a number of automated means and if it fails to find
|
189 |
|
|
a product will prompt the user for its location. SCRAM then maintains
|
190 |
|
|
a database of such system information for future reference.
|
191 |
sashby |
1.4 |
|
192 |
sashby |
1.5 |
\subsubsection{A Build System}
|
193 |
sashby |
1.4 |
|
194 |
sashby |
1.5 |
Abstraction of logical build elements from implementation details
|
195 |
|
|
Associate directory and file structure with build operations (e.g.
|
196 |
|
|
everything in a directory libsrc could be automatically compiled into
|
197 |
|
|
a library , e.g.2 every binary in a directory test could be
|
198 |
|
|
automatically linked with a test utilities library) Definition of
|
199 |
|
|
Classes of build objects. e.g A library class can have types such as
|
200 |
|
|
debug, archive, shared, shared debug, profiled etc. Default types can
|
201 |
|
|
be assigned to a class/directory structure but are easy to override on
|
202 |
|
|
the command line. Strong environment control. Makes it easy to tweak
|
203 |
|
|
general rules for special cases - something not easy to do in make.
|
204 |
|
|
Abstract dependency specification. You can link in a product by
|
205 |
|
|
specifying its name, SCRAM does the rest taking care of system
|
206 |
|
|
specifics, dependencies etc. Module Interfaces can be defined for
|
207 |
|
|
large software modules to define dependencies etc. Other modules can
|
208 |
|
|
then simply load the interface to use the module. Compatible with
|
209 |
|
|
code repositories such as CVS which checkout the file with the same
|
210 |
|
|
date that it was checked in. This is a major flaw in make which simply
|
211 |
|
|
checks to see if a datea > dateb rather than datea != dateb.
|
212 |
sashby |
1.4 |
|
213 |
sashby |
1.5 |
\subsubsection{A development environment}
|
214 |
|
|
|
215 |
|
|
Once a copy of a release is installed and built on a system it can be
|
216 |
|
|
made available for developers by adding it to SCRAMs list of projects.
|
217 |
|
|
Upon selecting an item from this list, a new development area is
|
218 |
|
|
created in which the developer can work independently of everyone
|
219 |
|
|
else. The development area will have the same configuration,
|
220 |
|
|
environment etc. as the base release. It will also automatically use
|
221 |
|
|
libraries/headers etc. from the base release if not rebuilt in the
|
222 |
|
|
local development area. The user is free to use whatever editors and
|
223 |
|
|
other tools he/she prefers.
|
224 |
|
|
|
225 |
|
|
\subsubsection{Project Isolation}
|
226 |
|
|
|
227 |
|
|
SCRAM ensures that an installed release is independent of any other.
|
228 |
|
|
This allows developers to easily switch between projects/versions they
|
229 |
|
|
might be working on even though they may have very different and
|
230 |
|
|
conflicting environment requirements.
|
231 |
|
|
|
232 |
|
|
%%
|
233 |
|
|
%% Insert this pic here: <SCRAM-base>/doc/images/scram.jpg
|
234 |
|
|
%%
|
235 |
|
|
%%
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
Summary
|
239 |
|
|
\begin{itemize}
|
240 |
|
|
\item Project installation with a click on a web page
|
241 |
|
|
\item Control of Build Environment, including dependency tracking
|
242 |
|
|
\item Fully configurable build operations, including default
|
243 |
|
|
operations.
|
244 |
|
|
\item Abstraction of logical build elements from the implementation
|
245 |
|
|
details
|
246 |
|
|
\item Reuse of configuration management elements between projects.
|
247 |
|
|
\item Configuration specifications with XML documents.
|
248 |
|
|
\end{itemize}
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
\section{Installing SCRAM}
|
254 |
sashby |
1.4 |
|
255 |
|
|
This section is for administrators who need to set things up. General
|
256 |
sashby |
1.5 |
users can skip straight to the "Working within a SCRAM Environment"
|
257 |
|
|
section.
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
\subsection{Download and general installation instructions}
|
261 |
|
|
|
262 |
|
|
o Requirements
|
263 |
|
|
|
264 |
|
|
\subsubsection{Downloading and installing from CVS}
|
265 |
|
|
|
266 |
|
|
1.Click on the boxes next to the numbers as you proceed to ensure you
|
267 |
|
|
don't miss any steps. 2. Create a directory SCRAM in which you wish
|
268 |
|
|
to keep your scram installation e.g. mkdir SCRAM
|
269 |
|
|
|
270 |
|
|
3.Go into the directory you have just made e.g. cd SCRAM
|
271 |
|
|
|
272 |
|
|
4. Set the Environment variable CVSROOT variable to
|
273 |
|
|
|
274 |
sashby |
1.6 |
%:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM
|
275 |
sashby |
1.5 |
|
276 |
|
|
e.g. csh, tcsh: setenv CVSROOT
|
277 |
sashby |
1.6 |
%:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM
|
278 |
sashby |
1.5 |
Bourne Shell, zsh, ksh: set
|
279 |
sashby |
1.6 |
%CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/SCRAM;
|
280 |
sashby |
1.5 |
export CVSROOT 5. Type cvs login At the prompt enter the password
|
281 |
|
|
98passwd
|
282 |
|
|
|
283 |
|
|
6. Check out the version of scram you require with the following
|
284 |
|
|
command.
|
285 |
|
|
|
286 |
|
|
cvs co -d version -r version SCRAM
|
287 |
|
|
|
288 |
|
|
Where version is one of versions listed as available on the main scram
|
289 |
|
|
page. Make sure you replace version twice in the above command! Note:
|
290 |
|
|
Once a version of scram has been installed, installation of any other
|
291 |
|
|
version becomes trivial with the scram version Version command
|
292 |
|
|
|
293 |
|
|
7. Goto the Installation directory of the version you have just
|
294 |
|
|
checked out
|
295 |
|
|
|
296 |
|
|
e.g cd version/Installation
|
297 |
|
|
|
298 |
|
|
8. Run the installation script (install_scram). e.g. ./install_scram
|
299 |
|
|
|
300 |
|
|
This will create a file wrapper script called "scram" in your top
|
301 |
|
|
level directory. The Perl executable will be found from your path,
|
302 |
|
|
automatically. If you want to specify the location, you can use the
|
303 |
sashby |
1.6 |
-perl option (from V0\_15\_0): e.g ./install_scram -perl /usr/bin/perl
|
304 |
sashby |
1.5 |
|
305 |
|
|
Experienced Users Note: The install script will make the current
|
306 |
|
|
version the default.
|
307 |
|
|
|
308 |
|
|
|
309 |
|
|
\subsubsection{Further information on SCRAM installation at remote sites}
|
310 |
|
|
|
311 |
|
|
At external sites, where the SITENAME is not CERN, the installation
|
312 |
|
|
script has been modified to allow the site managers to set default
|
313 |
|
|
values. The script asks for a value for SITENAME:
|
314 |
|
|
|
315 |
|
|
** Please enter the name of your SITE (e.g. CERN[default], FNAL) **
|
316 |
|
|
sitename?:
|
317 |
|
|
|
318 |
|
|
and for a default location for the CMS tools file:
|
319 |
|
|
|
320 |
|
|
** Please enter the default location of the cmstools file **
|
321 |
|
|
cmstools-CERN.conf location?: ~/siteconf
|
322 |
|
|
|
323 |
|
|
This location should be a directory name (e.g. ~/siteconf), under
|
324 |
|
|
which a valid file can be found (note that the filename of this file
|
325 |
|
|
must be cmstools-SITENAME.conf).
|
326 |
|
|
|
327 |
|
|
During a setup or project command, this directory will be used in
|
328 |
|
|
place of [project_name]/config/site/.
|
329 |
|
|
|
330 |
|
|
If the -f argument is given to either the project or setup commands,
|
331 |
|
|
the file specified will be used and any other file location (including
|
332 |
|
|
the default location described above) will be overridden. For
|
333 |
|
|
example, if the filename was given as ~/myfile.conf, then a file with
|
334 |
|
|
this name in the home directory will be used if it exists.
|
335 |
|
|
|
336 |
|
|
Note that any filename given as a cmstools file name must end in
|
337 |
|
|
".conf".
|
338 |
|
|
|
339 |
|
|
The main part of the filename can be anything at all.
|
340 |
|
|
|
341 |
|
|
9. change back to your top level directory e.g. cd ../..
|
342 |
|
|
|
343 |
|
|
You will see the new file in this directory. Ensure that your system
|
344 |
|
|
can see it too by either: Creating a link from an area in your path to
|
345 |
|
|
the scram file in this directory Extending your PATH environment
|
346 |
|
|
variable to include your top level directory Creating an alias to
|
347 |
|
|
point to the scram file in this directory
|
348 |
|
|
|
349 |
|
|
10. If you wish to use SCRAM directly through web page links you will
|
350 |
|
|
now need to configure your browser to use scram.
|
351 |
|
|
|
352 |
|
|
\subsubsection{Configuring Netscape to use SCRAM}
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
Netscape navigator Checklist
|
356 |
|
|
|
357 |
|
|
From the EDIT menu Select "Preferences" to open the preferences window
|
358 |
|
|
Click on "Navigator" and select "Applications" Click on New and fill
|
359 |
|
|
in the form Fill in the MIME-type box with application/scram_bootstrap
|
360 |
|
|
Click on the Button Next to the Application box to select it. Fill in
|
361 |
|
|
the Application Box with :
|
362 |
|
|
|
363 |
|
|
xterm -e scram -re project -d myinstall_area file:%s
|
364 |
|
|
|
365 |
|
|
Remember to replace myinstall_area in the above line with the location
|
366 |
|
|
where you will want your downloaded projects to be. i.e. Where the
|
367 |
|
|
src/binaries etc should go.
|
368 |
|
|
|
369 |
|
|
Make sure that the directory you specified actually exists!
|
370 |
|
|
|
371 |
|
|
Click on OK Click on OK in the preferences box
|
372 |
|
|
|
373 |
|
|
So now whenever you click on a project bootstrap file netscape will
|
374 |
|
|
start SCRAM for you automatically to install the project.
|
375 |
|
|
|
376 |
|
|
Note: If you have just installed SCRAM, it may be necessary to restart
|
377 |
|
|
netscape in an environment where it can find the scram executable
|
378 |
|
|
|
379 |
|
|
|
380 |
|
|
\subsubsection{Controlling SCRAM versions}
|
381 |
|
|
|
382 |
|
|
|
383 |
|
|
|
384 |
|
|
Checking the Current Version
|
385 |
|
|
|
386 |
|
|
The version of scram you are using can be found with the command
|
387 |
|
|
|
388 |
|
|
scram version
|
389 |
|
|
|
390 |
|
|
Downloading Alternative SCRAM versions
|
391 |
|
|
|
392 |
|
|
Once a version of SCRAM has been installed, downloading of other SCRAM
|
393 |
|
|
versions becomes trivial with the scram version command. If you
|
394 |
|
|
supply a version number as an argument, SCRAM will check to see if the
|
395 |
|
|
specified version is already installed. If it isn't then it will
|
396 |
|
|
attempt to download the requested version automatically.
|
397 |
|
|
|
398 |
|
|
e.g.
|
399 |
|
|
|
400 |
sashby |
1.6 |
scram version V0\_19\_2
|
401 |
sashby |
1.5 |
|
402 |
|
|
Making a version the default
|
403 |
|
|
|
404 |
|
|
Running the install_scram script of a specific version (see
|
405 |
|
|
Installation Guide) will make that version the default.
|
406 |
|
|
|
407 |
|
|
Overriding the default Version
|
408 |
|
|
|
409 |
|
|
The default version can be overridden at any time by setting the
|
410 |
|
|
SCRAM_HOME environment variable to point to the top of the version
|
411 |
|
|
required. It must be the full path to the version.
|
412 |
|
|
|
413 |
|
|
Automated Version Selection
|
414 |
|
|
|
415 |
|
|
Scram can be made to automatically select the correct version to use
|
416 |
|
|
for a given project area, overridding any other version selection
|
417 |
|
|
mechanism. To turn this feature on, simply create the file
|
418 |
|
|
scram_version in your project development/release configuration
|
419 |
|
|
directory. The file should contain the required SCRAM version tag. Any
|
420 |
|
|
scram command issued in that area is then directed to the correct
|
421 |
|
|
version if it is installed. If the required version is not installed
|
422 |
|
|
then a warning is issued and execution of the command continues within
|
423 |
|
|
the current version.
|
424 |
|
|
|
425 |
|
|
\subsubsection{SCRAM database handling}
|
426 |
|
|
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
The scram database maintains lookup tables for the various projects
|
430 |
|
|
that may be installed on your system as accessed through the scram
|
431 |
|
|
project project_name project_version command.
|
432 |
|
|
|
433 |
|
|
The scram database will usually live in the scramdb directory of your
|
434 |
|
|
scram installation area and is accessible to all scram versions. This
|
435 |
|
|
default can be overriden with the environment variable SCRAM_LOOKUPDB.
|
436 |
|
|
|
437 |
|
|
Linking databases
|
438 |
|
|
|
439 |
|
|
Scram databases can be linked together. You may want to do this, for
|
440 |
|
|
example, if you are maintaining a local copy of a project to speed up
|
441 |
|
|
development but would still like access to a remote copy of the
|
442 |
|
|
project (e.g over a shared file system such as AFS) which may be
|
443 |
|
|
slower but will have a guaranteed configuration, minor versions etc.
|
444 |
|
|
|
445 |
|
|
Maintaing Links
|
446 |
|
|
|
447 |
|
|
Database linking is maintained through
|
448 |
|
|
|
449 |
|
|
scram db [link dbfile|unlink dbfile|showlinks]
|
450 |
|
|
|
451 |
|
|
Please see the online help for more details.
|
452 |
|
|
|
453 |
|
|
Installing a Project in the Database
|
454 |
|
|
|
455 |
|
|
A project can be installed into the database with the
|
456 |
|
|
|
457 |
|
|
scram install [project_name project_version]
|
458 |
|
|
|
459 |
|
|
command. If no name/version tags are given the defaults are used from
|
460 |
|
|
the project configuration files.
|
461 |
|
|
|
462 |
|
|
Removing A project from the database
|
463 |
|
|
|
464 |
|
|
A project can be removed from the local database with the command
|
465 |
|
|
|
466 |
|
|
scram remove [project_name project_version]
|
467 |
|
|
|
468 |
|
|
|
469 |
|
|
|
470 |
|
|
\subsubsection{Installation of projects that use SCRAM}
|
471 |
|
|
|
472 |
|
|
It is envisaged that releases of a project need to be distributed to
|
473 |
|
|
remote sites. The release is contained in a special scram area which
|
474 |
|
|
is created by scram according to the projects requirements. Once a
|
475 |
|
|
carbon copy of the area has been built on the remote site, the
|
476 |
|
|
administrator can "scram install" it into the remote sites scram
|
477 |
|
|
database. Once installed many other scram development areas can be
|
478 |
|
|
based upon it, for use by other users,developers etc.
|
479 |
|
|
|
480 |
|
|
SCRAM aims to make installion of projects as painless a possible. It
|
481 |
|
|
is designed to be used with a web browser so that you simply click on
|
482 |
|
|
a link to start the installation process.
|
483 |
|
|
|
484 |
|
|
You will be asked questions about your system as required by the
|
485 |
|
|
project during the installation. Some basic error and consistency
|
486 |
|
|
checking is provided. These values can be changed later (see below) so
|
487 |
|
|
dont worry too much if you get things wrong at this stage.
|
488 |
|
|
|
489 |
|
|
Once through the installation process you can make the project
|
490 |
|
|
available for general use by using the scram install command. This
|
491 |
|
|
command will update your local SCRAM database with the project details
|
492 |
|
|
so that other SCRAM user can simply refer to it by name and version.
|
493 |
|
|
|
494 |
|
|
Automated setup procedure for new project areas
|
495 |
|
|
|
496 |
|
|
The setup procedure is first invoked for a new project area to set up
|
497 |
|
|
the tools selected via the RequirementsDoc. This is now automated by
|
498 |
|
|
using site information read from a configuration file. The
|
499 |
|
|
configuration file is called cmstools-SITENAME.conf, where SITENAME is
|
500 |
|
|
the name of your site (the default is CERN). The sitename can be
|
501 |
|
|
changed by modifying the file sitename. These files reside in the
|
502 |
|
|
configuration area for each SCRAM-based project under a subdirectory
|
503 |
|
|
site. The configuration file contains default paths to tools,
|
504 |
|
|
especially ANAPHE tools, which scram will use first to find locations
|
505 |
|
|
of libraries and include files. At remote sites that have read access
|
506 |
|
|
to the CVS repository only, and want to install a project that was
|
507 |
|
|
previously released at CERN, the sitename can be chosen during scram
|
508 |
|
|
installation. An optional flag to the project command can allow the
|
509 |
|
|
administrator to specify the cmstools file to read. A default location
|
510 |
|
|
for this file can also be chosen during scram installation.
|
511 |
|
|
|
512 |
|
|
Here is an extract from the CERN configuration file:
|
513 |
|
|
|
514 |
sashby |
1.6 |
\begin{verbatim}
|
515 |
sashby |
1.5 |
###############################################################
|
516 |
|
|
# cmstools-CERN.conf #
|
517 |
|
|
###############################################################
|
518 |
|
|
# modified : Tue Nov 20 11:39:49 2001 / SFA #
|
519 |
|
|
# : #
|
520 |
|
|
# : #
|
521 |
|
|
# function : Configuration file for setting up ANAPHE and CMS #
|
522 |
|
|
# : tools at CERN. #
|
523 |
|
|
# : #
|
524 |
|
|
###############################################################
|
525 |
|
|
# Set some ANAPHE variables.
|
526 |
|
|
# Specify the OS. All subsequent defns will be for this OS:
|
527 |
|
|
ANAPHEOS:Linux
|
528 |
|
|
# ANAPHE version:
|
529 |
|
|
ANAPHEVER:3.6.2
|
530 |
|
|
# Specify the top of the ANAPHE tool dir, excluding the version:
|
531 |
|
|
ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2
|
532 |
|
|
#
|
533 |
|
|
CMSTOOL:g77:
|
534 |
|
|
+FC:/usr/local/gcc-alt-2.95.2/bin/g77
|
535 |
|
|
CMSTOOL:gcc:
|
536 |
|
|
+CXX:/usr/local/gcc-alt-2.95.2/bin/c++
|
537 |
|
|
+CC:/usr/local/gcc-alt-2.95.2/bin/gcc
|
538 |
|
|
+LD_LIBRARY_PATH:/usr/local/gcc-alt-2.95.2/lib
|
539 |
|
|
CMSTOOL:htl:
|
540 |
|
|
+SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
|
541 |
|
|
CMSTOOL:zlib:
|
542 |
|
|
+ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/Linux__2.0/zlib-1.1.3
|
543 |
|
|
# Specify the OS. All subsequent defns will be for this OS:
|
544 |
|
|
ANAPHEOS:SunOS
|
545 |
|
|
# ANAPHE version:
|
546 |
|
|
ANAPHEVER:3.6.2
|
547 |
|
|
# Specify the top of the ANAPHE tool dir, excluding the version:
|
548 |
|
|
ANAPHETOP:/afs/cern.ch/sw/lhcxx/specific/sun4x_57/CC-5.2
|
549 |
|
|
#
|
550 |
|
|
CMSTOOL:f77:
|
551 |
|
|
+FC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/f77
|
552 |
|
|
CMSTOOL:cc:
|
553 |
|
|
+CXX:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/CC
|
554 |
|
|
+CC:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/bin/cc
|
555 |
|
|
+CXX_PRIOR_LIBS:/afs/cern.ch/project/sun/solaris/opt/SUNWspro61/WS6U1/lib
|
556 |
|
|
CMSTOOL:htl:
|
557 |
|
|
+SCHEMA_HOME:/afs/cern.ch/sw/lhcxx/share/HTL/1.3.1.1/schema
|
558 |
|
|
CMSTOOL:zlib:
|
559 |
|
|
+ZLIB_BASE:/afs/cern.ch/cms/Releases/sw/zlib/SunOS__5.6/zlib-1.1.3
|
560 |
sashby |
1.6 |
\end{verbatim}
|
561 |
sashby |
1.5 |
|
562 |
|
|
For ANAPHE tools under linux, the default path is ANAPHETOP and
|
563 |
|
|
normally the libraries are found under a subdirectory matching the
|
564 |
|
|
ANAPHE version (set using the variable ANAPHEVER in the above
|
565 |
|
|
file). If a tool is not likely to be found under this default path,
|
566 |
|
|
an entry is made in the file. This entry begins with CMSTOOL and
|
567 |
|
|
the tool name (as known to scram), and any variables that scram
|
568 |
|
|
must set for this tool are subsequently listed, each entry
|
569 |
|
|
beginning with a plus sign.
|
570 |
|
|
|
571 |
|
|
When setting up the tools, scram reads this file and creates a
|
572 |
|
|
lookup-table. If the default search fails, scram looks for an entry
|
573 |
|
|
in the lookup table for the tool. If an entry exists, subsequent
|
574 |
|
|
values for the scram variables will be used. If no entry is found,
|
575 |
|
|
scram will drop to an interactive environment and request user
|
576 |
|
|
input.
|
577 |
|
|
|
578 |
|
|
\subsubsection{Changing Installation Defaults}
|
579 |
|
|
|
580 |
|
|
You can use the command
|
581 |
|
|
|
582 |
|
|
scram setup [-i] [-f cmstools.conf] tool_name [[tool_version]
|
583 |
|
|
[tool_file]]
|
584 |
|
|
|
585 |
|
|
to rerun the setup of a specific tool.
|
586 |
|
|
|
587 |
|
|
The -f flag causes setup to read the filename given. This filename
|
588 |
|
|
must end in ".conf".
|
589 |
|
|
|
590 |
|
|
You can override the automatic mechanisms that SCRAM uses to install a
|
591 |
|
|
tool with the -i option, or if this is not sufficient, you can modify
|
592 |
|
|
the values directly. Simply edit the appropriate .dat file in the
|
593 |
|
|
.SCRAM/SCRAM_ARCH directory from the top of the project installation.
|
594 |
|
|
|
595 |
|
|
|
596 |
|
|
|
597 |
|
|
|
598 |
|
|
|
599 |
|
|
|
600 |
|
|
|
601 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
602 |
|
|
|
603 |
|
|
|
604 |
|
|
\section{Configuration Management with SCRAM}
|
605 |
sashby |
1.2 |
|
606 |
sashby |
1.5 |
\subsection{What is CM?}
|
607 |
sashby |
1.2 |
|
608 |
sashby |
1.5 |
\subsection{Configuring a new project}
|
609 |
sashby |
1.2 |
|
610 |
sashby |
1.5 |
o Tools Available in a SCRAM environment
|
611 |
|
|
o Installing/removing tools
|
612 |
|
|
o Tool Description Documents
|
613 |
sashby |
1.2 |
|
614 |
sashby |
1.5 |
\subsection{Working Within a SCRAM Environment}
|
615 |
sashby |
1.2 |
|
616 |
sashby |
1.5 |
o Getting Started
|
617 |
|
|
o The Runtime Environment
|
618 |
|
|
o Building Binaries
|
619 |
sashby |
1.2 |
|
620 |
sashby |
1.5 |
o Controlling the Build - The BuildFile
|
621 |
sashby |
1.2 |
|
622 |
sashby |
1.5 |
o <Export> tags. Configuring the <Use> tag for your Software Package.
|
623 |
|
|
o Defining the Configuration Interface for a Software Unit
|
624 |
|
|
o BuildFile Tags
|
625 |
|
|
o Glossary of BuildFile Tags
|
626 |
|
|
o Some Example BuildFiles
|
627 |
|
|
o Asking for Externals
|
628 |
|
|
o Advanced Use of the build command
|
629 |
|
|
o Specific Tools in SCRAM
|
630 |
sashby |
1.2 |
|
631 |
|
|
|
632 |
|
|
|
633 |
|
|
|
634 |
|
|
|
635 |
sashby |
1.5 |
%% Appendices:
|
636 |
sashby |
1.2 |
|
637 |
sashby |
1.5 |
% Release Notes
|
638 |
|
|
% GNU Public Licence
|
639 |
sashby |
1.2 |
|
640 |
sashby |
1.5 |
% Template CMSTOOLS file
|
641 |
sashby |
1.2 |
|
642 |
|
|
|
643 |
sashby |
1.5 |
\end{document}
|
644 |
sashby |
1.2 |
|
645 |
|
|
|