Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 2005_07.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: July 2005 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/2005_06.html" title="June 2005" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/2005_08.html" title="August 2005" />
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/2005_06.html">&laquo; June 2005</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/2005_08.html">August 2005 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">July 29, 2005</h2>
44                      <a id="a000395"></a>
45                      <div class="entry" id="entry-395">
46                         <h3 class="entry-header">verifycrs</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Created a script, verifycrs, which when given a lot of parameters will insure that the file revisions associated with a set of CRs (or ECRs) has been properly migrated into another CVS repository</li>
51 </ul>
52                               
53                               <h3>verifycrs</h3>
54
55 <p>The verifycrs script verify that the files associated with a list
56 of [E]CRs from one CVS repository are present in another CVS repository.</p>
57
58 <p>Odd as it seems we have a situation here where CVS repositories have to remain separate due to contract concerns. Nevertheless code is routinely exported from one repository to the other. Then it is needed to verify that a set of [E]CRs have successfully made it into the other repository.</p>
59
60 <p>The plan here is simple: Checkout both repositories as per a base tag to a temporary area. Then update the "from" repository by utilizing files4[e]cr in update mode. At this point we are sure that the from repository is correct.</p>
61
62 <p>The "to" repository - also checked out via a tag - should be already up to date (IOW we use a to tag of the resultant build). Then all that is needed is to compare the list of files associated with the [E]CRs being imported.</p>
63
64 <p>In order to minimize false diffs, checkouts are down without keywords (i.e. -kk).</p>
65
66 <div class="code"><pre>
67 Usage: verifycrs [-u] [-v] [-d]
68         -fcvsroot &lt;CVSROOT&gt; -fmod &lt;CVS module&gt; -ftag &lt;tag&gt;
69         -tcvsroot &lt;CVSROOT&gt; -tmod &lt;CVS module&gt; -ttag &lt;tag&gt;
70         [-c &lt;CRs...&gt;|-e &lt;ECRs...&gt;]
71
72 Where:
73
74         -u              Display usage
75         -v              Turn on verbose mode
76         -d              Turn on debug mode
77         -fcvsroot       CVSROOT specification for from repository
78         -fmod           CVS module (e.g. los178)
79         -ftag           From tag (e.g. DEV_LOS178_3p0p0_ppc_20050704)
80         -tcvsroot       CVSROOT specification for to repository
81         -tmod           CVS module (e.g. los178)
82         -ttag           To tag (e.g. DEV_HYBRIDOS_3p0p0_ppc_20050707)
83         &lt;CRs&gt;           CR numbers included in this export/import
84         &lt;ECRs&gt;          ECR numbers included in this export/import
85 </pre></div>
86                               
87                               <p class="entry-footer">
88                                  <span class="post-footers">Posted by  at 12:11 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000395.html">Permalink</a>
89                                  
90                                  
91                               </p>
92                            </div>
93                         </div>
94                      </div>
95                      
96                      
97
98                      <h2 class="date-header">July 27, 2005</h2>
99                      <a id="a000394"></a>
100                      <div class="entry" id="entry-394">
101                         <h3 class="entry-header">complogs</h3>
102                         <div class="entry-content">
103                            <div class="entry-body">
104                               <ul>
105   <li>Downloaded a Perl compatible Diff module from <a href="http://perl.plover.com/diff">Perl Diff</a> and adapted it for use with complogs</li>
106
107   <li>Created complogs to compare two log files and print out their differences in terms of warnings</li>
108 </ul>
109                               
110                               <h3>complogs</h3>
111
112 <p>I have developed a script to compare two logfile and print out the differences in terms of warnings. First of all this script leans on a prior script, <i>check</i>, (which should be in /int/bin and /int/bin should be in your path. BTW: That's where complogs is also).</p>
113
114 <p>Secondly it attempts to be semi intelligent WRT comparing warnings. In order to do this I had downloaded a <a href="http://perl.plover.com/diff/">Perl Diff module</a> and adapted it for use with complogs. Normally one would install a Perl module into the system library. But I cannot tell where complog will be run Side note: At a previous company we compiled a version of Perl and placed it on a network accessible area like /int. We also altered it to look at a network path for Perl modules. This meant that one need only install a new Perl module once in the network area and the networked Perl would automatically see it. Lacking that I've installed this Diff.pm into /int/lib.</p>
115
116 <p>This Diff.pm module allows me to diff two arrays and provide a function for determining equality. Thus I have the following function:</p>
117
118 <div class="code"><pre>
119     sub hash {
120       # Return the line possibly removing any line number. For example, a
121       # line such as the following:
122       #
123       # syscall_switch.c:14: warning: initialization from incompatible pointer type
124       #
125       # has a line number (14) in it. A subsequent compile of
126       # syscall_switch.c may generate the same warning but the line number
127       # may change (e.g. 16). It's the same warning so we will remove the
128       # string ":\d*:" from the output. This is a bit kludgy.
129       my $line = shift;
130
131       return $line =~ s/(\w*\.[ch]):\d*:( warning:)/$1$2/;
132     } # hash
133 </pre></div>
134
135 <p>This helps cut down on warnings that have only changed line numbers.</p>
136
137 <p>I've tested this with a few install.log's that I've found. For example:</p>
138
139 <div class="code"><pre>
140     saturn:complogs 20050718.install.log 20050722.install.log
141     ----------------------------------------------------------------------
142     Warnings removed:
143     ----------------------------------------------------------------------
144     1439    bsp_pcibus.c:783: warning: unused variable `bus'
145     1440    bsp_pcibus.c:784: warning: unused variable `dev'
146     1441    bsp_pcibus.c:785: warning: unused variable `func'
147     1442    bsp_pcibus.c:150: warning: 'pci_bridge_init' defined but not used
148     1443    bsp_reboot.c:168: warning: implicit declaration of function `hw_local_reset'
149     1444    bsp_reboot.c:171: warning: implicit declaration of function `stopcpu'
150     ----------------------------------------------------------------------
151     TOTAL:  6
152     ----------------------------------------------------------------------
153     Warnings added:
154     ----------------------------------------------------------------------
155     1881    /usr/los178/3.0.0/ppc_dev/sys/include/kernel/kernel.h:94:1: warning: this is the location of the previous definition
156     3378    regex.h:39:1: warning: "RE_DUP_MAX" redefined
157     3379    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
158     3380    regex.h:39:1: warning: "RE_DUP_MAX" redefined
159     3381    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
160     3382    regex.h:39:1: warning: "RE_DUP_MAX" redefined
161     3383    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
162     3384    regex.h:39:1: warning: "RE_DUP_MAX" redefined
163     3385    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
164     3386    regex.h:39:1: warning: "RE_DUP_MAX" redefined
165     3387    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
166     3388    regex.h:39:1: warning: "RE_DUP_MAX" redefined
167     3389    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
168     3390    regex.h:39:1: warning: "RE_DUP_MAX" redefined
169     3391    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
170     3392    regex.h:39:1: warning: "RE_DUP_MAX" redefined
171     3393    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
172     3394    regex.h:39:1: warning: "RE_DUP_MAX" redefined
173     3395    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
174     3396    regex.h:39:1: warning: "RE_DUP_MAX" redefined
175     3397    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
176     3398    regex.h:39:1: warning: "RE_DUP_MAX" redefined
177     3399    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
178     3400    regex.h:39:1: warning: "RE_DUP_MAX" redefined
179     3401    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
180     3403    regex.h:39:1: warning: "RE_DUP_MAX" redefined
181     3404    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
182     3412    regex.c:4825: warning: passing arg 2 of `bcmp_translate' discards qualifiers from pointer target type
183     3415    ../tar-1.11.2/getdate.y:807: warning: static declaration of 'getdate_yylex' follows non-static declaration
184     3416    bison.simple:332: warning: previous implicit declaration of 'getdate_yylex' was here
185     3419    /usr/los178/3.0.0/ppc_dev/usr/include/wait.h:58:2: warning: #warning Using <sys/wait.h> instead of <wait.h>
186     3421    pipesize.h:8:1: warning: "PIPESIZE" redefined
187     3422    /usr/los178/3.0.0/ppc_dev/usr/include/conf.h:76:1: warning: this is the location of the previous definition
188     3424    display.c:1155: warning: comparison is always true due to limited range of data type
189     3425    malloc.c:521: warning: conflicting types for built-in function 'malloc'
190     3426    malloc.c:798: warning: conflicting types for built-in function 'calloc'
191     3427    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
192     3428    ../ex/ex_cd.c:75: warning: assignment from incompatible pointer type
193     3429    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
194     3430    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
195     3431    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
196     3432    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
197     3433    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
198     3434    ../vi/getc.c:63: warning: passing arg 3 of `db_eget' from incompatible pointer type
199     3435    ../vi/getc.c:193: warning: passing arg 4 of `db_get' from incompatible pointer type
200     3436    ../common/key.c:159: warning: comparison is always true due to limited range of data type
201     3437    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
202     3438    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
203     3439    ../common/recover.c:368: warning: assignment from incompatible pointer type
204     3440    ../vi/v_txt.c:2184: warning: comparison of distinct pointer types lacks a cast
205     3441    ../vi/v_txt.c:2202: warning: comparison of distinct pointer types lacks a cast
206     3442    ../vi/v_ulcase.c:130: warning: passing arg 4 of `db_get' from incompatible pointer type
207     3443    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
208     3444    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
209     3445    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
210     3446    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
211     3447    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
212     3448    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
213     3449    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
214     3450    /usr/los178/3.0.0/ppc_dev/usr/include/sys/uio.h:21:2: warning: #warning Using <uio.h> instead of <sys/uio.h>
215     3451    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using <param.h> instead of <sys/param.h>
216     3452    /usr/los178/3.0.0/ppc_dev/usr/include/cdefs.h:21:2: warning: #warning Using <sys/cdefs.h> instead of <cdefs.h>
217     3453    /usr/los178/3.0.0/ppc_dev/usr/include/cdefs.h:21:2: warning: #warning Using <sys/cdefs.h> instead of <cdefs.h>
218     ----------------------------------------------------------------------
219     TOTAL:  63
220 </pre></div>
221                               
222                               <p class="entry-footer">
223                                  <span class="post-footers">Posted by  at  6:00 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000394.html">Permalink</a>
224                                  
225                                  
226                               </p>
227                            </div>
228                         </div>
229                      </div>
230                      
231                      
232
233                      <h2 class="date-header">July 26, 2005</h2>
234                      <a id="a000393"></a>
235                      <div class="entry" id="entry-393">
236                         <h3 class="entry-header">CVS Adm Web App Prototype</h3>
237                         <div class="entry-content">
238                            <div class="entry-body">
239                               <ul>
240   <li>Added CVSCommit to CVSAdm.pm and changed it so that CVS commits are now happening when changes happen to the file</li>
241
242   <li>Finished up CVS Adm Web App Prototype</li>
243 </ul>
244                               
245                               <h3>CVS Adm Web App Tutorial</h3>
246
247 <p>To access this web app go to http://saturn.lynx.com and select CVS Adm from the menu on the left.</p>
248
249 <p>Notice that there are several servers in the drop down list (controlled by a cvsadm.conf file). Select penguin and click on <b>Select</b>. Note you could select other servers and see other repositories but any attempts to modify files will result in CVS commit failures. We have not set up CVS access for these other repositories yet.</p>
250
251 <p>The next screen will show you the repositories available for that server. Penguin has only one - andrew-cvs - which is a test cvs repository. Click on <b>Select</b>.</p>
252
253 <p>At this point you're at the <i>Login</i> screen for this server, this repository. For now let's be cvsroot and test some of it's capabilities. The cvsroot user password for this test repository is "cvsroot123". Enter cvsroot user and cvsroot123 for the password and click <b>Login</b>.</p>
254
255 <p>You are now at the <i>Edit User</i> screen. Since you are cvsroot you will see an <b>Admin</b> button. Also as an admin you are presented with a drop down for <b>System User</b> that allows you to modify the system user for a CVS user. Admins are also presented with only a <b>New Password</b> field. This is so that an admin can re/set the password for another user.</p>
256
257 <p><b>Fullname</b> and <b>Email</b> are required fields. Many user entries do not have these fields filled in yet but will be required to enter them when/if they edit their entry. Additionally we've added the concept of groups which are listed below <b>Email</b>.</p>
258
259 <p>Next the repository and read/write access is listed. Finally you have a <b>Submit</b> and a <b>Logout</b> button.</p>
260
261 <p>To edit another user or perform any of the other administrative task select the <b>Admin</b> button. You are now at the <i>Maintenance Menu</i>. This screen presents users, groups and sysusers as drop downs and corresponding Edit/Delete/Create buttons. Let's add a new user - <i>testuser</i>. Select <b>Create User</b>. The <i>Add New User</i> screen is presented. Here you can create a new <b>Username</b> (<i>testuser</i>), assign him to a <b>System User</b>, <b>Password</b>, <b>Fullname</b>, <b>Email</b> as well as assign him to specific groups and set the read/write access to this repository for the user. Then Select <b>Add User</b>.</p>
262
263 <p>After adding <i>testuser</i> click <b>OK</b> and you will be back at the <i>Add New User</i> screen. If you are done adding users select <b>Admin</b> to return to the <i>Maintenance Menu</i>. Notice that <i>testuser</i> is now in the users drop down menu. Select testuser and then select <b>Edit User</b> to edit <i>testuser</i>'s fields.</p>
264
265 <p>Return to the <i>Maintenance Menu</i> and select <i>testuser</i> in the users drop down menu then <b>Delete User</b> to delete this user.</p>
266
267 <p>Try creating a new group <i>men</i> and another new group <i>women</i>. Use <b>Edit User</b> to edit pre-existing users. Notice the new groups of <i>men</i> and <i>women</i> are now listed (but unchecked). Find some men and assign them to be in the <i>men</i> group then click on the <b>Submit</b> button to update their records. Similarly find some women and mark them as such.</p>
268
269 <p>Now return to the <i>Maintenance Menu</i> and select the <i>men</i> group and delete it. CVSAdm will not only remove the <i>men</i> group but it will clear off the group <i>men</i> from the individual entries in the passwd file.</p>
270
271 <p>Now select the <i>women</i> group and then <b>Edit Group</b> and change <i>women</i> -> <i>wonderwomen</i>. CVSAdm will update the groups file as well as the passwd file changing <i>women</i> -> <i>wonderwomen</i>.</p>
272
273 <p>Try adding a system user of say <i>superuser</i>. It now becomes available under the <b>System User</b> drop down.</p>
274
275 <p>Edit a user who's password you do not know as cvsroot to a known password. Now <b>Logout</b> and login as that user using the newly assigned password. Unless you had assign this user to the special group cvsadm you will notice that you are not able to change groups or read/write access to the repository as a normal user.</p>
276
277 <p>The group cvsadm is a special group. It's used to allow another user to be cvsroot-like. Users in the cvsadm group for the server/repository are able to edit/delete/create other users on the <i>Maintenance Menu</i>. They are not allowed to edit/delete/create groups or system users but they are allows to assign other users to groups and/or system users. Only cvsroot can edit/delete/create groups and system users.</p>
278
279 <p>The group <i>cvsadm</i> and the system user <i>cvsroot</i> are protected from being deleted.</p>
280                               
281                               <p class="entry-footer">
282                                  <span class="post-footers">Posted by  at 12:23 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000393.html">Permalink</a>
283                                  
284                                  
285                               </p>
286                            </div>
287                         </div>
288                      </div>
289                      
290                      
291
292                      <h2 class="date-header">July 22, 2005</h2>
293                      <a id="a000392"></a>
294                      <div class="entry" id="entry-392">
295                         <h3 class="entry-header">Porting Perl -> LOS178</h3>
296                         <div class="entry-content">
297                            <div class="entry-body">
298                               <ul>
299   <li>Started implementing a CVS Checkout/Update in CVSAdm</li>
300
301   <li>Jas asked me to look into porting Perl -> LOS178 3.0.0</li>
302 </ul>
303                               
304                               <h3>Porting Perl -> LOS178 3.0.0</h3>
305
306 <p>I was asked to attempt to port Perl (latest version - 5.8.7) to LOS178 (latest version - 3.0.0 20050719). Here's what I attempted:</p>
307
308 <ul>
309   <li>Downloaded perl-5.8.7 from perl.com (http://www.perl.com/download.csp#stable)</li>
310
311   <li>Extracted to europa:/build/perl-5.8.7</li>
312
313   <li>Extracted from 20050719:
314
315   <ul>
316     <li>3000-04.los178_rsc_src.tar.gz</li>
317
318     <li>3001-05.los178_src.tar.gz</li>
319
320     <li>3013-05.los178_dev.tar.gz</li>
321
322     <li>3015-04.los178_rsc_dev.tar.gz</li>
323   </ul>
324
325   to /build/3.0.0/los178</li>
326
327   <li>Extracted ppc.cdklinux.tar.gz from bin-image (DEV_LOS178_3p0p0_ppc_20050719)</li>
328
329   <li>Sourced SETUP.bash</li>
330 </ul>
331
332 <p>Next I went to /build/perl-5.8.7 and ran Configure. I was supprised to see that it had a selection for lynxos! Unfortunately this is not the way to go.</p>
333
334 <p>Spoke with Ed Mooring, who happens to be a Perl porter and who had previously ported Perl 5.6 to LynxOS 4.0. He suggested I attempt to run Configure natively on a LynxOS 4.0 machine to get config.sh to be generated. I could then use that in conjunction with reading about the <i>Perl Patch Pumpkin</i> (Apparently a guide about patching and porting) in an attempt to figure out what needs to be done to that config.sh to get a cross build to LOS178 3.0.0. (Note that I used a LynxOS 5.0 machine not a LynxOS 4.0 machine)</p>
335
336 <p>After going through the long Configure process and hopefully answering questions properly Ed said I should attempt a native build anyway. Build failed with:</p>
337 <div class="code"><pre>
338     `sh  cflags "optimize='-O'" mg.o`  mg.c
339               CCCMD =  gcc -DPERL_CORE -c -DEXTRA_F_IN_SEMUN_BUF -D__NO_INCLUDE_WARN__ -fno-strict-aliasing -pipe -I/usr/local/include -O  -Wall
340     mg.c:74: conflicting types for `setegid'
341     /usr/include/unistd.h:410: previous declaration of `setegid'
342     /usr/include/netinet/in.h:512: warning: `ntohs' declared `static' but never defined
343     /usr/include/netinet/in.h:514: warning: `ntohl' declared `static' but never defined
344     make: *** [mg.o] Error 1
345 </pre></div>
346                               
347                               <p class="entry-footer">
348                                  <span class="post-footers">Posted by  at  5:03 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000392.html">Permalink</a>
349                                  
350                                  
351                               </p>
352                            </div>
353                         </div>
354                      </div>
355                      
356                      
357
358                      <h2 class="date-header">July 21, 2005</h2>
359                      <a id="a000391"></a>
360                      <div class="entry" id="entry-391">
361                         <h3 class="entry-header">Ants and Docs</h3>
362                         <div class="entry-content">
363                            <div class="entry-body">
364                               <ul>
365   <li>Spent most of the day dealing with ants and documenting the LOS178 2.1.0 Build Procedure</li>
366 </ul>
367                               
368                               <p class="entry-footer">
369                                  <span class="post-footers">Posted by  at  3:52 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000391.html">Permalink</a>
370                                  
371                                  
372                               </p>
373                            </div>
374                         </div>
375                      </div>
376                      
377                      
378
379                      <h2 class="date-header">July 20, 2005</h2>
380                      <a id="a000390"></a>
381                      <div class="entry" id="entry-390">
382                         <h3 class="entry-header">CVS Adm Web App Conf</h3>
383                         <div class="entry-content">
384                            <div class="entry-body">
385                               <ul>
386   <li>CVS Adm Web App now uses files under &lt;DocumentRoot&gt;/cvsadm/&lt;cvs_server&gt;/&lt;repository&gt;/CVSROOT</li>
387
388   <li>CVS Adm Web App now uses a cvsadm.conf file to configure the servers and repositories it will consider working on.</li>
389
390   <li>Need to implement the cvs checkout of CVSROOT</li>
391 </ul>
392                               
393                               <h3>New File Store</h3>
394
395 <p>Instead of relying on network access to a file store under /&lt;cvs_server&gt;-cvs/&lt;repository&gt;/CVSROOT/etc... we now instead rely on it directly under &lt;DocumentRoot&gt;/cvsadm. This also will allow us to create/refresh that area using cvs checkout CVSROOT instead. The checkout portion has not yet been implemented because currently I cannot checkout CVSROOT due to lack of permissions. I have asked Vinnie to create a test repository so I can play with this and not damage anybody.</p>
396
397 <h3>cvsadm.conf</h3>
398
399 <p>Also, instead of having a simple list of CVS servers and hoping that /&lt;cvs_server&gt;-cvs is a network path to that server's CVS repositories a scheme was designed to use a configuration file. Soon cvs checkout CVSROOT will be used to populate a different file store to work on and when files are modified cvs commit's will commit them to the actual CVS repositories. This also has the effect of defining and perhaps limiting exactly which servers and repositories CVS Adm Web App is even allowed to work on.</p>
400
401 <p>The format of the config file is simple. Here's an example:</p>
402
403 <div class="code"><pre>
404 ################################################################################
405 #
406 # File:         cvsadm/cvsadm.conf
407 # Description:  Identifies the CVS servers and repositories per server
408 # Author:       Andrew@DeFaria.com
409 # Created:      Thu Jul  7 16:54:07 PDT 2005
410 # Modified:
411 # Language:     Perl
412 #
413 # (c) Copyright 2005, LynuxWorks Inc., all rights reserved.
414 #
415 ################################################################################
416 # Format: &lt;host&gt; &lt;respository&gt;
417 rock    los178-cvs
418 t3      X-cvs
419 t3      bootloader-cvs
420 t3      gcc-cvs
421 t3      lynxos-cvs
422 t3      results-cvs
423 t3      spyker-cvs
424 t3      tst-cvs
425 t3      yaboot-cvs
426 tomcat  hybrid-os-cvs
427 </pre></div>
428                               
429                               <p class="entry-footer">
430                                  <span class="post-footers">Posted by  at  3:35 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000390.html">Permalink</a>
431                                  
432                                  
433                               </p>
434                            </div>
435                         </div>
436                      </div>
437                      
438                      
439
440                      <h2 class="date-header">July 19, 2005</h2>
441                      <a id="a000389"></a>
442                      <div class="entry" id="entry-389">
443                         <h3 class="entry-header">CVS Adm Web App Prototype</h3>
444                         <div class="entry-content">
445                            <div class="entry-body">
446                               <ul>
447   <li>Finished up on a CVS Adm Web App prototype. Still need to adapt this to real CVS repositories on web server</li>
448 </ul>
449                               
450                               <p>Vinnie So wrote:</p>
451
452 <blockquote type=cite>
453 Andrew,
454
455 I just cook up the information on what we need to get the cvs user administration project requirement going. Please review and add/modify what you think is necessary. Also, add the information you need.
456
457 --Vinnie
458
459 <hr>
460 <ul>
461   <li>CVS Passwd file format:
462
463   <div class="code"><pre>
464 CVS User Name:Encrypted Password:System User:User Real Name:User Email:Groups</pre></div>
465 <p>Example of passwd file:</p>
466   <div class="code"><pre>
467 adefaria:88ZHm.yYFgFyI:lynxuser:Andrew DeFaria:adefaria@lnxw.com:int,cvsadmin
468 jdoe:78WHm.yYFgFyI:toolsuser:John Doe:jdoe@lnxw.com:tools
469 hyow:78WHm.yYFgFyI::Harry Yow:hyow@lnxw.com:test</pre></div></li>
470
471   <li>Writers file format: This file contains CVS User Name listing who has write only permission access to the CVS repository. One CVS User Name per line.
472
473 <br>Example of writers file:
474
475   <div class="code"><pre>
476 adefaria
477 vso</pre></div></li>
478
479   <li>Readers file format: This file contains CVS User Name listing who has read only permission access to the CVS repository . One CVS User Name per line.
480
481 <br>Example of readers file:
482
483   <div class="code"><pre>
484 int
485 anoncvs</pre></div>
486 </ul>
487 </blockquote>
488
489 <p>Readers/Writers file formats and their interaction is not that clearly defined in the CVS manual. I've attempted to document that <a href="000384.html#more">here</a>. Worse yet, it's even harder to ascertain after the fact from a web application. For example, if the web application is told that user john has only read access to repository X, which of the 5 cases (#2, #5, #7, #8 or #9) should the backend update the readers and writers files to look like?</p>
490
491 <p>Here's my simplification:</p>
492
493 <div class="code"><pre>
494       # CVS readers and writers files are a little weird. We will attempt
495       # to simplify here. If a user has read only access to a repository
496       # then we will explicitly list them in the readers file and make
497       # sure they are not in the writers file. If they have write access
498       # (thus implying read access) then we will arrange for them to be in
499       # the writers file and absent from the readers file as CVS treats
500       # users who are in both files as read only.
501       my $user    = $user_record {userid};
502       my $access  = $user_record {$repository};
503
504       if ($access eq "r") {
505         Remove $cvs_server, $repository, "writers", $user;
506         Add    $cvs_server, $repository, "readers", $user;
507       } elsif ($access eq "rw") {
508         Remove $cvs_server, $repository, "readers", $user;
509         Add    $cvs_server, $repository, "writers", $user;
510       } else {
511         Remove $cvs_server, $repository, "readers", $user;
512         Remove $cvs_server, $repository, "writers", $user;
513       } # if
514 </pre></div>
515
516 <blockquote type=cite>
517 <p># The GUI Interface requirement:</p>
518
519 <p>CVS User cvsroot can to the following once authentication passed:</p>
520
521 <ul>
522   <li>Administer the GUI interface</li>
523 </ul>
524 </blockquote>
525
526 <p>I don't know what that means.</p>
527
528 <blockquote type=cite>
529 <ul>
530   <li>Add/delete attributes list
531   <p>For example:</p>
532   <div class="code"><pre>
533 group - int, csadmin, ce, engr, tools
534 system users - lynxuser, gduser, toolsuser</pre></div></li>
535 </ul>
536
537 <p>CVS User belonging to group "cvsadmin" shall be able to do the following once authentication passed:</p>
538
539 <ul>
540   <li>Add user</li>
541
542   <li>Delete user</li>
543
544   <li>Modify user's attributes</li>
545
546   <li>Change user's permission to the cvs repository by modifying writer or readers files.</li>
547 </ul>
548
549 <p>CVS User not belonging to group "cvsadmin" shall be able to do the following once authentication passed:</p>
550
551 <ul>
552   <li>Change its own password</li>
553 </ul>
554 </blockquote>
555
556 <p>Well a prototype is up and running at http://saturn/cvsadm. First select a server then a repository. All files (passwd, groups, sysusers, readers, writers) are kept at the repository level and world write access is current required to the files. Locally I have set the cvsroot password to cvsroot123 (that is the CVS user's password not the system cvsroot user's password) so you can login as cvsroot then use Admin to edit other users, etc. Users who are members of the group cvsadm are considered no different than cvsroot themselves as they can add/change/delete users, groups and sysusers (the group cvsadm and the sysuser cvsroot cannot be deleted). Play around with it and let me know what you think.</p>
557
558 <p>Note, if a cvsroot user deletes a group the web app is smart enough to go back through the passwd file and remove the removed group from the users lists. So, for example, if vso is a member of int,badgroup,tools those groups will be listed in his passwd entry. If the cvsroot user deletes badgroup then vso's passwd entry will be adjusted to just int,tools. Also, if the cvsroot user edits tools to change it to toolchain then vso's passwd entry will then read int,toolchain.</p>
559
560 <p>With sysusers it's a little different. Technically sysusers should equate to bona fide Unix usernames. Yet there is no easy way to insure this. For one, how would the web server gain access to /etc/passwd on a remote machine? Also, sysusers are stored in a file in the repository's CVSROOT directory and can easily become out of date WRT that server's /etc/passwd file. So no checks are made to insure that a sysuser is indeed a Unix userid.</p>
561
562 <p>Finally, while if cvsroot edits say the sysuser lynxuser -> lynuxosuser, the passwd file will be modified by also changing all lynxuser's -> lynxosuser's. However if cvsroot deletes sysuser lynxuser the passwd file is not changed to remove the sysuser from the passwd lines. Doing so changes the meaning of the user entirely.</p>
563
564 <p>The backend, however, will need to change to properly handle the security of the various files as well as to properly use CVS to maintain a history (i.e. check out admin files, change them and check them in). The current thought is to set up the apache user as having login rights for cvsroot from the web server only.</p>
565
566 <p>In order for this to work we need to:</p>
567
568 <ul>
569   <li>Create groups and sysusers files for each &lt;host&gt;:&lt;repository&gt;</li>
570
571   <li>Add groups and sysusers files to checkoutlist so that CVS considers them part of the administrative files set.</li>
572
573   <li>Have cvsroot perform a cvs -d :pserver:cvsroot@&lt;host&gt;:&lt;repository&gt; login for each and every host:repository combination as whatever the apache user will be on the web server</li>
574 </ul>
575
576 <p>Then the web app has to change to use a file store created by issuing a cvs co CVSROOT for the host/repository it is working on (and/or possibly a cvs update). Finally the web app needs to change to perform the necessary commit after a file (groups, sysusers, readers or writers - passwd will be handled differently - see <a href="http://www.network-theory.co.uk/docs/cvsmanual/cvs_30.html">http://www.network-theory.co.uk/docs/cvsmanual/cvs_30.html</a> - bottom of the page) has been changed with an appropriate checkin comment. Still at issue is how to handle the passwd file.</p>
577
578 <p>This should be done (setup) on the web server instead of my desktop. We should, perhaps, create a dummy repository for testing.</p>
579
580 <p>Let me know when this is available so I can start testing there.</p>
581
582                               
583                               <p class="entry-footer">
584                                  <span class="post-footers">Posted by  at  4:54 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000389.html">Permalink</a>
585                                  
586                                  
587                               </p>
588                            </div>
589                         </div>
590                      </div>
591                      
592                      
593
594                      <h2 class="date-header">July 15, 2005</h2>
595                      <a id="a000388"></a>
596                      <div class="entry" id="entry-388">
597                         <h3 class="entry-header">CVS Adm Web App - per repository</h3>
598                         <div class="entry-content">
599                            <div class="entry-body">
600                               <ul>
601   <li>Vinnie and I decided that it's best to place the passwd, groups (new), sysusers (new) files in the repository under CVSROOT</li>
602
603   <li>Started changing web app to handle this new change and added new <i>Select Server</i> and <i>Select Repository</i> screens. Much of the code now needs to pass along $cvs_server and $repository to the API</li>
604 </ul>
605                               
606                               <p class="entry-footer">
607                                  <span class="post-footers">Posted by  at 11:05 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000388.html">Permalink</a>
608                                  
609                                  
610                               </p>
611                            </div>
612                         </div>
613                      </div>
614                      
615                      
616
617                      <h2 class="date-header">July 14, 2005</h2>
618                      <a id="a000384"></a>
619                      <div class="entry" id="entry-384">
620                         <h3 class="entry-header">DOORS/LOS178 Build Procedure</h3>
621                         <div class="entry-content">
622                            <div class="entry-body">
623                               <ul>
624   <li>Managed to install DOORS. Turns out that using Tomcat for FlexLM requires port 19360 <b>not</b> port 19353</li>
625
626   <li>Exported the HybridOS Build Procedure document to create the LOS178 2.1.0 Build Procedure document</li>
627
628   <li>Attempting to document exactly what CVS access is given for a username in the readers/writers files depending on whether or not either file exists for the CVSAdm web app</li>
629 </ul>
630                               
631                               <h3>Determining CVS Read/Write Access</h3>
632
633 <p>CVS decides read/write access based on the presence of the user name in the files readers and writers in the repository. Additionally either or both of these files may be missing.</p>
634
635 <p>The CVS Manual says:</p>
636
637 <blockquote><i>
638 <p>If <tt>readers</tt> exists, and this user is listed in it, then the user gets read-only access. Or if <tt>writers</tt> exists, and this user is <b>not</b> listed in it, then they also get read-only access (this is true even if <tt>readers</tt> exists but they are not listed there). Otherwise, she gets full read-write access.</p>
639
640 <p>Of course there is a conflict if the user is listed in both files. This is resolved in the more conservative way, it being   better to protect the repository too much than too little: such a user gets read-only access.</p>
641 </i></blockquote>
642
643 <p>Based on that the following describe the access granted to a user.</p>
644
645 <center>
646 <table border=1 cellspacing=0 cellpadding=2>
647   <tbody>
648     <tr>
649       <th bgcolor="teal"><font color="white">Case</font></th>
650       <th bgcolor="teal"><font color="white">Readers</font></th>
651       <th bgcolor="teal"><font color="white">Writers</font></th>
652       <th bgcolor="teal"><font color="white">Read Access</font></th>
653       <th bgcolor="teal"><font color="white">Write Access</font></th>    </tr>
654     <tr align="center">
655       <td>1</td>
656       <td>No File</td>
657       <td>No File</td>
658       <td>No</td>
659       <td>No</td>
660     </tr>
661     <tr align="center">
662       <td>2</td>
663       <td>No File</td>
664       <td>Not Present</td>
665       <td>Yes</td>
666       <td>No</td>
667     </tr>
668     <tr align="center">
669       <td>3</td>
670       <td>No File</td>
671       <td>Present</td>
672       <td>Yes</td>
673       <td>Yes</td>
674     </tr>
675     <tr align="center">
676       <td>4</td>
677       <td>Not Present</td>
678       <td>No File</td>
679       <td>No</td>
680       <td>No</td>
681     </tr>
682     <tr align="center">
683       <td>5</td>
684       <td>Not Present</td>
685       <td>Not Present</td>
686       <td>Yes</td>
687       <td>No</td>
688     </tr>
689     <tr align="center">
690       <td>6</td>
691       <td>Not Present</td>
692       <td>Present</td>
693       <td>Yes</td>
694       <td>Yes</td>
695     </tr>
696     <tr align="center">
697       <td>7</td>
698       <td>Present</td>
699       <td>No File</td>
700       <td>Yes</td>
701       <td>No</td>
702     </tr>
703     <tr align="center">
704       <td>8</td>
705       <td>Present</td>
706       <td>Not Present</td>
707       <td>Yes</td>
708       <td>No</td>
709     </tr>
710     <tr align="center">
711       <td>9</td>
712       <td>Present</td>
713       <td>Present</td>
714       <td>Yes</td>
715       <td>No</td>
716     </tr>
717   </tbody>
718 </table>
719 </center>
720
721 <ol>
722   <li>A strict intepretation of the CVS manual might lead you to
723 believe that since readers does not exist and writers does not exist then it would fall into the "Otherwise" statement at the end of the first paragraph. However an argument can be made that the user is also not listed in the writers file because the writers file is not present. But I believe that no access should be granted.</li>
724
725   <li>Readers does not exist and the user is not listed in writers
726 so read only access.</li>
727
728   <li>Readers does not exist but the user is listed in writers. So
729 the user has write access. Does this imply read access? Does write-only access exist?</li>
730
731   <li>User is not listed in the readers file and there is no writers
732 file. This case is not covered by the CVS manual. My assumption is therefore no access. Again a strict interpretation might argue the "Otherwise" clause but I think not.</li>
733
734   <li>User is not listed in the readers file nor in the writers file
735 therefore read only access.</li>
736
737   <li>User is not listed in the readers file but is listed in the
738 writers file. User gets read/write access.</li>
739
740   <li>User is listed in the readers file but there is no writers
741 file. Read only access.</li>
742
743   <li>User is listed in the readers file but not present in writers
744 file. Read only access.</li>
745
746   <li>User is listed in the readers file and the writers file. This
747 is the conflict. Resolve the conflict by only providing read access.</li>
748 </ol>
749                               
750                               <p class="entry-footer">
751                                  <span class="post-footers">Posted by  at  5:13 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000384.html">Permalink</a>
752                                  
753                                  
754                               </p>
755                            </div>
756                         </div>
757                      </div>
758                      
759                      
760
761                      <h2 class="date-header">July 13, 2005</h2>
762                      <a id="a000387"></a>
763                      <div class="entry" id="entry-387">
764                         <h3 class="entry-header">CVS Adm Web App</h3>
765                         <div class="entry-content">
766                            <div class="entry-body">
767                               <ul>
768   <li>Got password updating working</li>
769
770   <li>Got it working such that the cookie setting code is working</li>
771
772   <li>Implemented Admin mode for cvsroot user only. This allows the cvsroot user to manage other users, groups and sysusers</li>
773
774   <li>Also when in admin mode the cvsroot user can set another persons password to something new without having to know the old password (i.e. password reset)</li>
775
776   <li>Also when in admin mode the sysuser is exposed as a drop down - allowing cvsroot to change a sysuser for a user</li>
777
778   <li>Still need to workout read/write access properly, other security issues (possibly a setuid script allowing the apache user to become cvsroot to re-write and/or check out and in files like passwd, readers and writers for repositories).</li>
779
780   <li>Another issue is what to do as far as for paranoia checking. For example, what should happen if cvsroot attempts to remove say the "int" group and there are still users associated with the int group?</li>
781 </ul>
782                               
783                               <p class="entry-footer">
784                                  <span class="post-footers">Posted by  at  5:59 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000387.html">Permalink</a>
785                                  
786                                  
787                               </p>
788                            </div>
789                         </div>
790                      </div>
791                      
792                      
793
794                      <h2 class="date-header">July 12, 2005</h2>
795                      <a id="a000386"></a>
796                      <div class="entry" id="entry-386">
797                         <h3 class="entry-header">CVS Adm Web App</h3>
798                         <div class="entry-content">
799                            <div class="entry-body">
800                               <ul>
801   <li>Managed to get logging in working</li>
802
803   <li>Moved common code to CVSAdm.pm Perl module</li>
804
805   <li>Changed to handle multiple groups</li>
806
807   <li>Changed to use global groups and sysusers files</li>
808 </ul>
809                               
810                               <p class="entry-footer">
811                                  <span class="post-footers">Posted by  at  5:44 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000386.html">Permalink</a>
812                                  
813                                  
814                               </p>
815                            </div>
816                         </div>
817                      </div>
818                      
819                      
820
821                      <h2 class="date-header">July 11, 2005</h2>
822                      <a id="a000385"></a>
823                      <div class="entry" id="entry-385">
824                         <h3 class="entry-header">CVS Adm Web App</h3>
825                         <div class="entry-content">
826                            <div class="entry-body">
827                               <ul>
828   <li>Vinnie told me of a CVS Administration Web App he wants so I started developing it</li>
829
830   <li>Working on the basic login screen and parsing of files like passwd and repository readers/writers files. Borrowing heavily from my MAPS application at home where I have done this before.</li>
831 </ul>
832                               
833                               <p class="entry-footer">
834                                  <span class="post-footers">Posted by  at  5:23 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000385.html">Permalink</a>
835                                  
836                                  
837                               </p>
838                            </div>
839                         </div>
840                      </div>
841                      
842                      
843
844                      <h2 class="date-header">July  7, 2005</h2>
845                      <a id="a000383"></a>
846                      <div class="entry" id="entry-383">
847                         <h3 class="entry-header">CDK Packaging</h3>
848                         <div class="entry-content">
849                            <div class="entry-body">
850                               <p>The CDK was not properly packaged before. Here's what needs to be done. Because we built GDB we need to get the GDB client software into the LOS178 CDK area. This is done by performing a make package-gdb in toolchain to obtain a tarball for GDB. This process also creates a toolchain source tarball, which takes quite some time and space and it largely not needed.</p>
851
852 <p>Then you need to unpack this GDB tarball into the LOS178 CDK area. Then you can tar up the CDK (for Linux and Windows) or use package.sh (Solaris).</p>
853
854 <div class="note">There is a problem with make package-gdb on Solaris. It uses tar naked and also uses -z. Unfortunately Solaris' tar doesn't support -z. Aliasing tar=gnutar didn't work either. I had to, temporarily, modify the Makefile to use gnutar.</div>
855                               
856                               <p class="entry-footer">
857                                  <span class="post-footers">Posted by  at 11:50 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000383.html">Permalink</a>
858                                  
859                                  
860                               </p>
861                            </div>
862                         </div>
863                      </div>
864                      
865                      
866
867                      <h2 class="date-header">July  6, 2005</h2>
868                      <a id="a000382"></a>
869                      <div class="entry" id="entry-382">
870                         <h3 class="entry-header">Building LOS178 2.1.0 on Windows</h3>
871                         <div class="entry-content">
872                            <div class="entry-body">
873                               <p>In order to build LOS178 2.1.0 on Windows the following steps were performed:</p>
874
875 <h4>Create LOS178 build area</h4>
876
877 <ul>
878   <li>In /build the directory 2.1.0/los178 was created</li>
879
880   <li>From a successful build on Rock the tar images: 
881
882    <ul>
883       <li>2000-00.los178_rsc_src.tar.gz</li>
884
885       <li>2001-00.los178_src.tar.gz</li>
886
887       <li>2013-00.los178_dev.tar.gz</li>
888
889       <li>2015.los178_rsc_dev.tar.gz</li>
890     </ul>
891
892     were extracted into /build/2.1.0/los178.</li>
893
894     <li>2032-00.cdkwin32.tar.gz was obtaind from t3:/export/dev_archive/los178/2p1p0/20050622/solaris/media/ppc and extracted into /build/2.1.0/los178</li>
895 </ul>
896
897 <h4>Compile cdk</h4>
898
899 <ul>
900   <li>Sourced SETUP.bash</li>
901
902   <li>cd'ed into src/cdk</li>
903
904   <li>make install > install.log 2>&1</li>
905
906   <li>The install.log was checked for errors</li>
907 </ul>
908
909 <h4>Build GDB</h4>
910
911 <ul>
912   <li>The toolchain was exported, tarred, copied and extracted to /build/2.1.0/toolchain and fixup.sh was run</li>
913
914   <li>In order for GDB to compile successfully the liblcsapi.a library was extracted from t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib, a directory that has to be made first) </li>
915
916   <li>The GDB module was compiled with make install-gdb > install.log 2>&1</li>
917
918   <li>The install.log was checked for errors</li>
919
920   <li>Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.</li>
921
922 </ul>
923                               
924                               <p class="entry-footer">
925                                  <span class="post-footers">Posted by  at 10:22 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000382.html">Permalink</a>
926                                  
927                                  
928                               </p>
929                            </div>
930                         </div>
931                      </div>
932                      
933                      
934
935                      <h2 class="date-header">July  5, 2005</h2>
936                      <a id="a000381"></a>
937                      <div class="entry" id="entry-381">
938                         <h3 class="entry-header">Building LOS178 2.1.0 on Linux</h3>
939                         <div class="entry-content">
940                            <div class="entry-body">
941                               <p>In order to build LOS178 2.1.0 on Linux the following steps were performed:</p>
942
943 <h4>Create LOS178 build area</h4>
944
945 <ul>
946   <li>In /build the directory 2.1.0/los178 was created</li>
947
948   <li>From a successful build on Rock the tar images: 
949
950    <ul>
951       <li>2000-00.los178_rsc_src.tar.gz</li>
952
953       <li>2001-00.los178_src.tar.gz</li>
954
955       <li>2013-00.los178_dev.tar.gz</li>
956
957       <li>2015.los178_rsc_dev.tar.gz</li>
958     </ul>
959
960     were extracted into /build/2.1.0/los178.</li>
961
962   <li>A copy of bin-image was checked out using the DEV_LOS178_2p1p0_ppc_20050705 tag to /build/2.1.0</li>
963
964   <li>The bin-image/ppc.cdklinux.tar.gz was extracted into /build/2.1.0/los178</li>
965 </ul>
966
967 <h4>Compile cdk</h4>
968
969 <ul>
970   <li>Sourced SETUP.bash</li>
971
972   <li>cd'ed into src/cdk</li>
973
974   <li>make install > install.log 2>&1</li>
975
976   <li>The install.log was checked for errors</li>
977
978   <div class="note">There was an error with disasm_mips.c under elflook but I remember Vinnie reporting that elflook was not compiling completely. I assume that this error is acceptable</div>
979 </ul>
980
981 <h4>Build GDB</h4>
982
983 <ul>
984   <li>The toolchain was checked out to /build/2.1.0/toolchain and fixup.sh was run</li>
985
986   <li>In order for GDB to compile successfully the liblcsapi.a library was extracted from t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib, a directory that has to be made first) </li>
987
988   <li>The GDB module was compiled with make install-gdb > install.log 2>&1</li>
989
990   <li>The install.log was checked for errors</li>
991
992   <li>Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.</li>
993 </ul>
994                               
995                               <p class="entry-footer">
996                                  <span class="post-footers">Posted by  at  8:01 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000381.html">Permalink</a>
997                                  
998                                  
999                               </p>
1000                            </div>
1001                         </div>
1002                      </div>
1003                      
1004                      
1005
1006                      
1007                      <a id="a000380"></a>
1008                      <div class="entry" id="entry-380">
1009                         <h3 class="entry-header">Test build of LOS178 2.1.0</h3>
1010                         <div class="entry-content">
1011                            <div class="entry-body">
1012                               <ul>
1013   <li>Rebuilt LOS178 2.1.0 in preparation for release of LOS178 2.1.0</li>
1014 </ul>
1015                               
1016                               <h3>Building LOS178</h3>
1017
1018 <h4>Solaris</h4>
1019
1020 <p>Use /int/bin/build_los178 which performs all the necessary steps. Solaris builds have not changed</p>
1021
1022 <h4>Linux</h4>
1023
1024 <p>There is no need to build LOS178 on Linux but there is a need to build the CDK since what is in the bin-image tarball is not complete. There's also a need to build gdb client portions.</p>
1025
1026 <p>"Building" of LOS178 on Linux therefore consists of:</p>
1027
1028 <ol>
1029   <li>Creating a "build" area</li>
1030
1031   <li>Extracting sources from 2000-00.los178_rsc_src.tar.gz and 2001-00.los178_src.tar.gz</li>
1032 </ol>
1033
1034 <h4>Windows</h4>
1035
1036 <p>Similarly there is no need to build LOS178 on Windows but there is a need to build the CDK since what is in the bin-image tarball is not complete. There's also a need to build gdb client portions.</p>
1037
1038 <p>"Building" of LOS178 on Windows therefore consists of:</p>
1039
1040
1041 <ol>
1042   <li>Setup PC with Cygwin properly (if not already set up)</li>
1043
1044   <li>Start a cmd shell and execute the VCVARS32.bat file</li>
1045
1046   <li>Execute the cygnus.bat script to enter Cygwin</li>
1047
1048   <li>Create build area</li>
1049
1050   <li>Extract sources from 2000-00.los178_rsc_src.tar.gz and 2001-00.los178_src.tar.gz (May also need 2013-00.los178_dev.tar.gz and 2015-00.los178_rsc_dev.tar.gz)</li>
1051 </ol>
1052
1053 <h3>Building CDK</h3>
1054
1055 <h4>Solaris</h4>
1056
1057 <p>There is no CDK to build on Solaris as it is contained in the ppc.cdksol.tar.gz</p>
1058
1059 <h4>Linux</h4>
1060
1061 <p>For Linux, cd to your build area and:</p>
1062
1063 <ol>
1064   <li>SETUP.bash</li>
1065
1066   <li>cd src/cdk and make install. This builds parts of the CDK not contained in bin-image.</li>
1067 </ol>
1068
1069 <h4>Windows</h4>
1070
1071 <p>Make sure you have a proper setup:</p>
1072
1073 <ol>
1074   <li>Setup PC with Cygwin properly (if not already set up)</li>
1075
1076   <li>Start a cmd shell and execute the VCVARS32.bat file</li>
1077
1078   <li>Execute the cygnus.bat script to enter Cygwin</li>
1079
1080   <li>SETUP.bash</li>
1081
1082   <li>cd src/cdk and make install. This builds parts of the CDK not contained in bin-image.</li>
1083 </ol>
1084
1085 <h3>Packaging CDK</h3>
1086
1087 <p>The CDKs for all of Solaris, Linux and Windows need to be properly packaged for the customer. Currently package.sh is designed to handle both cdksol and cdklinux. Thus after building CDK on Linux one can tar it up and deposit it into the Solaris build area and use package.sh to create the proper packaging.</p>
1088
1089 <p>The rename.sh also handles renaming cdk[sol|linux|win32] tarballs it finds with the proper package #.</p>
1090
1091 <p>So the remaining issue is how to deal with the oddball win32... The issue is that it was thought that the cdk could not be easily tarred up and moved over because symlinks in the tar would be messed up. This does not appear to be the case as a little test shows that Cygwin's B20 tar will properly store the symlink on the Windows side and the Unix/Linux tar will properly unpack it.</p>
1092
1093 <h3>GDB Madness</h3>
1094
1095 <p>GDB, which consists of a gdbserver part that needs to eventually be put into $ENV_PREFIX/bin as it is built into a different area (why isn't a make install-gdb putting it in the right place) and some client parts (Just gdb in install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin? Or do we include the other files like insight, tclsh8.4 and wish8.4?). These parts need to be placed in the build area.</p>
1096
1097 <p>So, for example, for Linux one needs to follow the above and then:</p>
1098
1099 <ul>
1100   <li>Check out the toolchain from CVS (tag: DEV_LOS178_2p1p0_ppc_20050705)</li>
1101
1102   <li>Run fixup.sh</li>
1103
1104   <li>Source SETUP.bash from a LOS178 area
1105
1106 <div class="note">
1107 Remember: You need to use SETUP.bash from a dev area build. Using pdn will result in an error as the build is unable to find libbsd.a!
1108 </div>
1109
1110 <p></p>
1111
1112 <div class="note">
1113 Also: Install the liblcsapi.a library from the t3:/export/rel_archive/archive-lcs-1.0.0/052703/10001.lcs_host.tar.gz tarball into the host environment ($ENV_PREFIX/lib).
1114 </div>
1115
1116 </li>
1117
1118   <li>make install-gdb > install.log 2>&1</li>
1119
1120   <li>Check for errors and if successful, make package.</li>
1121 </ul>
1122
1123 <p>With the build of gdb successful:</p>
1124
1125 <ul>
1126   <li>Move install-powerpc178/cdk/sunos-xcoff-ppc/usr/bin/gdbserver (and gdbserver-lcs) to $ENV_PREFIX/bin.
1127
1128 <div class="note"><b>Note:</b> Since $ENV_PREFIX is set to dev then this means that gdbserver goes to dev. Should it also be put in pdn?</div>
1129
1130 </li>
1131
1132 </ul>
1133
1134                               
1135                               <p class="entry-footer">
1136                                  <span class="post-footers">Posted by  at  5:24 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000380.html">Permalink</a>
1137                                  
1138                                  
1139                               </p>
1140                            </div>
1141                         </div>
1142                      </div>
1143                      
1144                   </div>
1145                </div>
1146             </div>
1147          </div>
1148       </div>
1149    </div>
1150 </body>
1151 </html>