Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2006_11_05.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml"$>" />
11
12    <title>Status for Andrew DeFaria: November  5, 2006 - November 11, 2006 Archives</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2006_10_29.html" title="October 29, 2006 - November  4, 2006" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2006_11_12.html" title="November 12, 2006 - November 18, 2006" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2006_10_29.html">&laquo; October 29, 2006 - November  4, 2006</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2006_11_12.html">November 12, 2006 - November 18, 2006 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">November  7, 2006</h2>
44                      <a id="a000590"></a>
45                      <div class="entry" id="entry-590">
46                         <h3 class="entry-header">UK -> GPDB</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Working on convertdb, a Perl script to read the UK database and convert it into GPDB</li>
51
52   <li>Finished code to convert users. Using de to get info about a user to populate the GPDB fields</li>
53
54   <li>Worked out problems with sites and got sites being added to GPDB from the UK database</li>
55
56   <li>Got adding of PDB_CLEARCASE records preliminarily done</li>
57 </ul>
58                               
59                               <h2>convertdb</h2>
60
61 <p>Started coding a Perl script to attempt to convert the UK database to GPDB. Got the Users done then worked out the Site records. The Projects are harder because they contain both site and project as a pair as well as vob/view information. The goal is to get as much of the conversion done as I can as well as flush out issues. Then, at some point, change mkview_linked and mkvob_db to use this new database.</p>
62
63 <p>Apparently mkview_linked and mkvob_db utilize this UK database mainly for the purposes of obtaining defaults or a template of information for the creation of views or vobs. There are site-wide defaults, project defaults and finally command line overrides.</p>
64
65 <h2>GPDB requirements for mkview_link and mkvob_db</h2>
66
67 <p>I scanned the scripts mkview_link and mkvob_db in order to determine what exactly it needs from GPDB. Here's what I found. Below field names are <b>bold</b> where table names are both <b>bold</b> and <i>italic</i>.</p>
68
69 <h3>mkview_linked</h3>
70 <ul>
71   <li>Obtains the <b>site</b> name in a table called <b><i>Sites</i> </b>where the <b>domain</b> field = the domain of the current host</li>
72
73   <li>Gets all of the <b>project</b> and <b>stream</b> for this <b>site</b></li>
74
75   <li>Obtains the following fields from a <b><i>Projects</i></b> table where the site = <b>site</b> and the <b>project</b> = "_default":</li>
76
77   <ul>
78     <li><b>site</b></li>
79
80     <li><b>project</b></li>
81
82     <li><b>vob_host</b></li>
83
84     <li><b>vob_path</b></li>
85
86     <li><b>vob_remote</b></li>
87
88     <li><b>pool_postfix</b></li>
89
90     <li><b>msdos_mode</b></li>
91
92     <li><b>snap_to</b></li>
93
94     <li><b>db_check</b></li>
95
96     <li><b>snap_notify</b></li>
97
98     <li><b>default_view</b></li>
99
100     <li><b>umask</b></li>
101
102     <li><b>group</b></li>
103
104     <li><b>view_host</b>: Used in -host for mkview</li>
105
106     <li><b>view_path</b>: Used in -hpath and -gpath for mkview  ($view_path/$username/$view.vws)</li>
107
108     <li><b>view_remote</b>: If present then the view storage is placed remotely. Note this is Unix specific.</li>
109
110     <li><b>msdos_view</b>: If present then a -tmode msdos style view is created.</li>
111
112     <li><b>config_spec</b>: Path to a file containing this project's default config spec that is then set as the new view's config spec<sup>1</sup></li>
113
114     <li><b>notify</b></li>
115
116     <li><b>vob_only</b></li>
117
118     <li><b>cachesize</b></li>
119
120     <li><b>snapshot</b></li>
121
122     <li><b>snapshot_workdir</b></li>
123
124     <li><b>stream</b></li>
125   </ul>
126
127   <li>It then obtains the same file list from a <b><i>Projects</i></b> table where the site = <b>site</b> and the <b>project</b> = the project name. The idea here is that _default is the base and the project record then overrides those defaults.</li>
128
129   <li>It then does some parameter substitutions for the field values above. Occurances of %USER% will be substituted with the current user, %PROJECT% the current project and strings of the form %SCRIPT()% will run the script defined between the (). The result of that will be the
130 substitution value.</p></li>
131 </ul>
132
133 <h4>Notes</h4>
134 <ol>
135   <li>Variable substitution happens on each config spec line too. Occurances of %USER% are replaced with the username (%LCUSER% a lower case username and %UCUSER% an upper case username), %VIEW% with the current view (similar %LCVIEW% and %UCVIEW%), %PROJECT% -&gt; current project and %SITE% -&gt; site (with LC/UC versions too).</li>
136 </ol>
137
138 <h3>mkvob_db</h3>
139 <ul>
140   <li>Obtains the <b>site</b> name in a table called <b><i>Sites</i> </b>where the <b>domain</b> field = the domain of the current host</li>
141
142   <li>Obtains all fields from the the <b><i>Projects</i> </b>table for this <b>site</b></li>
143
144   <li>Creates a $project_homes hash for each project/site combination with all fields from the <i><b>Projects</b></i> table</li>
145
146   <li>Creates a @valid_projects array for each project.</li>
147
148   <li>For each project, substitutes in to each field that is not defined from the site/project/_default record</li>
149
150   <li>Performs the same substitution as described above on the various fields.</li>
151 </ul>
152                               
153                               <p class="entry-footer">
154                                  <span class="post-footers">Posted by  at 12:29 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000590.html">Permalink</a>
155                                  
156                                  
157                               </p>
158                            </div>
159                         </div>
160                      </div>
161                      
162                   </div>
163                </div>
164             </div>
165          </div>
166       </div>
167    </div>
168 </body>
169 </html>