1 |
williamc |
1.2 |
<! Style Sheet Header>
|
2 |
|
|
<html>
|
3 |
|
|
<head>
|
4 |
|
|
<title>configtools.html</title>
|
5 |
|
|
<body bgcolor=beige>
|
6 |
|
|
<! End Style Sheet Header -----------Insert Text Here --------------------->
|
7 |
|
|
<center>
|
8 |
|
|
<h1>Scram Configuration Tools in the Environment</h1>
|
9 |
|
|
<font color=red>S</font>oftware <font color=red>C</font>onfiguration,
|
10 |
|
|
<font color=red>R</font>elease <font color=red>A</font>nd
|
11 |
|
|
<font color=red>M</font>anagement
|
12 |
|
|
</center>
|
13 |
|
|
<hr>
|
14 |
sashby |
1.4 |
Each Scram-managed project area has a set of configuration tools associated with it. The
|
15 |
williamc |
1.2 |
tools available are those requested in the corresponding
|
16 |
|
|
<a href=requirementdoc.html>requirements document</a> of the project
|
17 |
|
|
configuration.
|
18 |
|
|
<p>
|
19 |
|
|
The environment to which the following commands apply correspond to that of
|
20 |
sashby |
1.4 |
the current working directory (from which the command is executed). If
|
21 |
williamc |
1.2 |
this does not correspond to a scram area an error will be issued.
|
22 |
|
|
<p>
|
23 |
sashby |
1.4 |
<h2>Viewing the Available Tools</h2>
|
24 |
williamc |
1.2 |
The tools available within any given area can be viewed with the command :
|
25 |
|
|
<p>
|
26 |
sashby |
1.4 |
<pre>
|
27 |
|
|
scram tool list
|
28 |
|
|
</pre>
|
29 |
williamc |
1.2 |
<p>
|
30 |
|
|
<h2>Viewing Tool Configuration Settings</h2>
|
31 |
|
|
The settings for a given tool and other tool info can be seen with :
|
32 |
|
|
<p>
|
33 |
sashby |
1.4 |
<pre>
|
34 |
|
|
scram tool info tool_name [<em>tool_version</em>]
|
35 |
|
|
</pre>
|
36 |
williamc |
1.2 |
<p>
|
37 |
|
|
If no <em>tool_version</em> is specified the default version is taken.
|
38 |
sashby |
1.4 |
<p>
|
39 |
|
|
The individual values of tool variables (e.g., INCLUDE or LIB paths etc.) can be obtained using
|
40 |
|
|
the command
|
41 |
|
|
<pre>
|
42 |
|
|
scram tool tag tool_name [<em>tag_name</em>]
|
43 |
|
|
</pre>
|
44 |
|
|
If no tag name (variable name) is supplied, all known tags for the tool are listed.
|
45 |
|
|
This command is especially useful within scripts that require local project information, and avoids having
|
46 |
|
|
to parse scram output using SED or AWK.
|
47 |
|
|
|
48 |
|
|
<h2>Changing the Tool Configuration Settings</h2>
|
49 |
|
|
|
50 |
|
|
There are two modes available: automatic and interactive. Default is automatic and this is used
|
51 |
|
|
during project bootstrapping.<br>
|
52 |
|
|
In auto mode, scram will try a number of things to determine the
|
53 |
|
|
correct values of each tool variable on your system (e.g. checking default
|
54 |
|
|
locations, environment variables, reading a cmstools file, checking other projects etc.).
|
55 |
|
|
If SCRAM fails to find the correct value then it will go into interactive mode
|
56 |
|
|
and ask the user for input.
|
57 |
|
|
<p>
|
58 |
|
|
You can override the settings using the command
|
59 |
|
|
<pre>
|
60 |
|
|
scram setup [-i] [-f cmstools.conf] tool_name [[<em>tool_version</em>] [<em>tool_doc</em>]]
|
61 |
|
|
</pre>
|
62 |
|
|
to rerun the installation of a specific tool.<p>
|
63 |
|
|
The <b>-f</b> flag causes setup to read the filename given. This filename must end in ".conf".<br>
|
64 |
|
|
The <b>-i</b> flag overrides the auto mechanism and a tool description document can also be specified.
|
65 |
sashby |
1.5 |
|
66 |
sashby |
1.6 |
<a name="INSTALL"></a>
|
67 |
sashby |
1.5 |
<h2>Removing a Tool from a Project Area</h2>
|
68 |
|
|
|
69 |
|
|
Sometimes it might be necessary to remove a tool from a project area. This can be achieved by
|
70 |
|
|
using the command
|
71 |
|
|
<pre>
|
72 |
|
|
scram tool remove tool_name
|
73 |
|
|
</pre>
|
74 |
|
|
This completely removes all references to the tool. To re-install the default version it will
|
75 |
|
|
be necessary to re-run scram setup. Before installing a new version of a tool, it is best to
|
76 |
|
|
remove the old one.
|
77 |
sashby |
1.4 |
<p>
|
78 |
|
|
|
79 |
sashby |
1.6 |
<h2>Installing a New Tool into a Project Area</h2>
|
80 |
sashby |
1.5 |
|
81 |
sashby |
1.6 |
Adding a new tool to a project area is also possible. A tool description file can either be obtained from
|
82 |
|
|
the CVS repository, or can be provided by the user. The setup command is used but with arguments that
|
83 |
|
|
inform scram that a tool description should be read. The arguments are the location. <br>
|
84 |
|
|
Here is the command:
|
85 |
|
|
<pre>
|
86 |
|
|
scram setup [-i] [-f cmstools.conf] tool_name tool_version [<em>URL: or file:</em>]]
|
87 |
|
|
</pre>
|
88 |
|
|
where the location is described by either <em>URL</em> or <em>file</em>.
|
89 |
|
|
<br>
|
90 |
|
|
A URL specifies the location of the tool <tool_name> having version <tool_version> in the directory
|
91 |
|
|
tree of the CVS repository (eventually, a script will be provided to give this information via a web
|
92 |
|
|
interface: in the meantime, please contact the CMS librarian for this information), and the appropriate
|
93 |
|
|
CMS configuration cvs tag.<p>
|
94 |
|
|
An example URL looks like this:
|
95 |
|
|
<pre>
|
96 |
|
|
cvs://cmscvs.cern.ch/cvs_server/repositories/SCRAMToolBox?auth=pserver&module=SCRAMToolBox/<Tool Location>/&passkey=AA_:yZZ3e&user=anonymous&version=CMS_40_2
|
97 |
|
|
</pre>
|
98 |
|
|
<p>
|
99 |
|
|
The URL can be divided into three parts:<p>
|
100 |
|
|
<table border=1>
|
101 |
|
|
<tr>
|
102 |
|
|
<th> Part </th><th> Purpose </th></tr>
|
103 |
|
|
<tr>
|
104 |
|
|
<td>
|
105 |
|
|
cvs://cmscvs.cern.ch/cvs_server/repositories/SCRAMToolBox
|
106 |
|
|
</td>
|
107 |
|
|
<td>ToolBox location on the CMS CVS server</td>
|
108 |
|
|
</tr>
|
109 |
|
|
<tr>
|
110 |
|
|
<td>
|
111 |
|
|
auth=pserver&module=SCRAMToolBox/<Tool Location>/&passkey=AA_:yZZ3e&user=anonymous
|
112 |
|
|
</td>
|
113 |
|
|
<td>pserver information for the tool</td>
|
114 |
|
|
</tr>
|
115 |
|
|
<tr>
|
116 |
|
|
<td>
|
117 |
|
|
version=CMS_40_2
|
118 |
|
|
</td>
|
119 |
|
|
<td>A valid CVS tag for the CMSconfiguration to use</td>
|
120 |
|
|
</tr>
|
121 |
|
|
</table>
|
122 |
|
|
<p>
|
123 |
|
|
<h3>Examples</h3>
|
124 |
sashby |
1.5 |
|
125 |
sashby |
1.6 |
Here are two examples of use. Firstly, let's add ROOT to our project area (A common request). ROOT is a tool that is part
|
126 |
|
|
of the CMS configuration. It is found in a directory CMS/Tools in the SCRAMToolBox.<br>
|
127 |
|
|
We will set up ROOT version 3.03.02. The full command, including the URL, looks like this (we have used the current
|
128 |
|
|
CMS base configuration):
|
129 |
|
|
<pre>
|
130 |
|
|
scram setup -i root root-3.03.02 'cvs://cmscvs.cern.ch/cvs_server/repositories/SCRAMToolBox?auth=pserver&module= \
|
131 |
sashby |
1.7 |
SCRAMToolBox/CMS/Tools/ROOT&passkey=AA_:yZZ3e&user=anonymous&version=CMS_48'
|
132 |
sashby |
1.6 |
</pre>
|
133 |
|
|
<p>
|
134 |
|
|
Note that the URL must always be quoted to prevent evaluation by the shell.
|
135 |
|
|
<p>
|
136 |
|
|
Next, let's add another new tool called RUBY to our project space. This tool is not a
|
137 |
|
|
CMS tool (that is, the tool is not contained in the CMSconfiguration), so we will add it using a local tool
|
138 |
|
|
description file. The command is
|
139 |
|
|
<pre>
|
140 |
|
|
scram setup -i ruby ruby-1.6.7 file:ruby-1.6.7
|
141 |
|
|
</pre>
|
142 |
|
|
The tool description file looks like this
|
143 |
|
|
<pre>
|
144 |
|
|
<doc type=BuildSystem::ToolDoc version=1.0>
|
145 |
|
|
<Tool name=RUBY version=1.6.7>
|
146 |
|
|
<Client>
|
147 |
|
|
<Environment name=RUBY_BASE>
|
148 |
|
|
The top of the Ruby distribution.
|
149 |
|
|
</Environment>
|
150 |
|
|
<Environment name=LIBDIR default=$RUBY_BASE/lib/ruby/1.6 type=lib>
|
151 |
|
|
</Environment>
|
152 |
|
|
</Client>
|
153 |
|
|
<Environment name=PATH value="$RUBY_BASE/bin" type=Runtime_path>
|
154 |
|
|
</Environment>
|
155 |
|
|
<Environment name=LD_LIBRARY_PATH value=$LIBDIR type=Runtime_path>
|
156 |
|
|
</Environment>
|
157 |
|
|
</Tool>
|
158 |
|
|
</pre>
|
159 |
|
|
so the interactive setup mechanism will ask for a value for RUBY_BASE. The other values will be
|
160 |
|
|
set automatically.
|
161 |
|
|
<p>
|
162 |
sashby |
1.5 |
|
163 |
|
|
|
164 |
williamc |
1.2 |
<! Style Sheet Footer ---------------Do not change anything after this line-->
|
165 |
|
|
<hr>
|
166 |
|
|
<table border=1 width=100%>
|
167 |
|
|
<td align=left>
|
168 |
sashby |
1.3 |
<a href=mailto:Shaun.Ashby@cern.ch
|
169 |
|
|
>Shaun Ashby</a>
|
170 |
williamc |
1.2 |
</td>
|
171 |
|
|
<td align=right><a href=/cgi-cmc/pagestat>Show Stats</a>
|
172 |
|
|
</td>
|
173 |
|
|
</table>
|
174 |
|
|
</body> </html>
|
175 |
sashby |
1.6 |
<! End Style Sheet Footer> |