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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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"$>" />
12 <title>Status for Andrew DeFaria: July 17, 2005 - July 23, 2005 Archives</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2005_07_10.html" title="July 10, 2005 - July 16, 2005" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_07_24.html" title="July 24, 2005 - July 30, 2005" />
18 <body class="layout-one-column">
20 <div id="container-inner" class="pkg">
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>
30 <div id="pagebody-inner" class="pkg">
32 <div id="alpha-inner" class="pkg">
34 <p class="content-nav">
35 <a href="http://defaria.com/blogs/Status/archives/week_2005_07_10.html">« July 10, 2005 - July 16, 2005</a> |
36 <a href="http://defaria.com/blogs/Status/">Main</a>
37 | <a href="http://defaria.com/blogs/Status/archives/week_2005_07_24.html">July 24, 2005 - July 30, 2005 »</a>
43 <h2 class="date-header">July 22, 2005</h2>
45 <div class="entry" id="entry-392">
46 <h3 class="entry-header">Porting Perl -> LOS178</h3>
47 <div class="entry-content">
48 <div class="entry-body">
50 <li>Started implementing a CVS Checkout/Update in CVSAdm</li>
52 <li>Jas asked me to look into porting Perl -> LOS178 3.0.0</li>
55 <h3>Porting Perl -> LOS178 3.0.0</h3>
57 <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>
60 <li>Downloaded perl-5.8.7 from perl.com (http://www.perl.com/download.csp#stable)</li>
62 <li>Extracted to europa:/build/perl-5.8.7</li>
64 <li>Extracted from 20050719:
67 <li>3000-04.los178_rsc_src.tar.gz</li>
69 <li>3001-05.los178_src.tar.gz</li>
71 <li>3013-05.los178_dev.tar.gz</li>
73 <li>3015-04.los178_rsc_dev.tar.gz</li>
76 to /build/3.0.0/los178</li>
78 <li>Extracted ppc.cdklinux.tar.gz from bin-image (DEV_LOS178_3p0p0_ppc_20050719)</li>
80 <li>Sourced SETUP.bash</li>
83 <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>
85 <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>
87 <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>
88 <div class="code"><pre>
89 `sh cflags "optimize='-O'" mg.o` mg.c
90 CCCMD = gcc -DPERL_CORE -c -DEXTRA_F_IN_SEMUN_BUF -D__NO_INCLUDE_WARN__ -fno-strict-aliasing -pipe -I/usr/local/include -O -Wall
91 mg.c:74: conflicting types for `setegid'
92 /usr/include/unistd.h:410: previous declaration of `setegid'
93 /usr/include/netinet/in.h:512: warning: `ntohs' declared `static' but never defined
94 /usr/include/netinet/in.h:514: warning: `ntohl' declared `static' but never defined
95 make: *** [mg.o] Error 1
98 <p class="entry-footer">
99 <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>
109 <h2 class="date-header">July 21, 2005</h2>
111 <div class="entry" id="entry-391">
112 <h3 class="entry-header">Ants and Docs</h3>
113 <div class="entry-content">
114 <div class="entry-body">
116 <li>Spent most of the day dealing with ants and documenting the LOS178 2.1.0 Build Procedure</li>
119 <p class="entry-footer">
120 <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>
130 <h2 class="date-header">July 20, 2005</h2>
132 <div class="entry" id="entry-390">
133 <h3 class="entry-header">CVS Adm Web App Conf</h3>
134 <div class="entry-content">
135 <div class="entry-body">
137 <li>CVS Adm Web App now uses files under <DocumentRoot>/cvsadm/<cvs_server>/<repository>/CVSROOT</li>
139 <li>CVS Adm Web App now uses a cvsadm.conf file to configure the servers and repositories it will consider working on.</li>
141 <li>Need to implement the cvs checkout of CVSROOT</li>
144 <h3>New File Store</h3>
146 <p>Instead of relying on network access to a file store under /<cvs_server>-cvs/<repository>/CVSROOT/etc... we now instead rely on it directly under <DocumentRoot>/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>
150 <p>Also, instead of having a simple list of CVS servers and hoping that /<cvs_server>-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>
152 <p>The format of the config file is simple. Here's an example:</p>
154 <div class="code"><pre>
155 ################################################################################
157 # File: cvsadm/cvsadm.conf
158 # Description: Identifies the CVS servers and repositories per server
159 # Author: Andrew@DeFaria.com
160 # Created: Thu Jul 7 16:54:07 PDT 2005
164 # (c) Copyright 2005, LynuxWorks Inc., all rights reserved.
166 ################################################################################
167 # Format: <host> <respository>
180 <p class="entry-footer">
181 <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>
191 <h2 class="date-header">July 19, 2005</h2>
193 <div class="entry" id="entry-389">
194 <h3 class="entry-header">CVS Adm Web App Prototype</h3>
195 <div class="entry-content">
196 <div class="entry-body">
198 <li>Finished up on a CVS Adm Web App prototype. Still need to adapt this to real CVS repositories on web server</li>
201 <p>Vinnie So wrote:</p>
203 <blockquote type=cite>
206 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.
212 <li>CVS Passwd file format:
214 <div class="code"><pre>
215 CVS User Name:Encrypted Password:System User:User Real Name:User Email:Groups</pre></div>
216 <p>Example of passwd file:</p>
217 <div class="code"><pre>
218 adefaria:88ZHm.yYFgFyI:lynxuser:Andrew DeFaria:adefaria@lnxw.com:int,cvsadmin
219 jdoe:78WHm.yYFgFyI:toolsuser:John Doe:jdoe@lnxw.com:tools
220 hyow:78WHm.yYFgFyI::Harry Yow:hyow@lnxw.com:test</pre></div></li>
222 <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.
224 <br>Example of writers file:
226 <div class="code"><pre>
230 <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.
232 <br>Example of readers file:
234 <div class="code"><pre>
240 <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>
242 <p>Here's my simplification:</p>
244 <div class="code"><pre>
245 # CVS readers and writers files are a little weird. We will attempt
246 # to simplify here. If a user has read only access to a repository
247 # then we will explicitly list them in the readers file and make
248 # sure they are not in the writers file. If they have write access
249 # (thus implying read access) then we will arrange for them to be in
250 # the writers file and absent from the readers file as CVS treats
251 # users who are in both files as read only.
252 my $user = $user_record {userid};
253 my $access = $user_record {$repository};
255 if ($access eq "r") {
256 Remove $cvs_server, $repository, "writers", $user;
257 Add $cvs_server, $repository, "readers", $user;
258 } elsif ($access eq "rw") {
259 Remove $cvs_server, $repository, "readers", $user;
260 Add $cvs_server, $repository, "writers", $user;
262 Remove $cvs_server, $repository, "readers", $user;
263 Remove $cvs_server, $repository, "writers", $user;
267 <blockquote type=cite>
268 <p># The GUI Interface requirement:</p>
270 <p>CVS User cvsroot can to the following once authentication passed:</p>
273 <li>Administer the GUI interface</li>
277 <p>I don't know what that means.</p>
279 <blockquote type=cite>
281 <li>Add/delete attributes list
283 <div class="code"><pre>
284 group - int, csadmin, ce, engr, tools
285 system users - lynxuser, gduser, toolsuser</pre></div></li>
288 <p>CVS User belonging to group "cvsadmin" shall be able to do the following once authentication passed:</p>
295 <li>Modify user's attributes</li>
297 <li>Change user's permission to the cvs repository by modifying writer or readers files.</li>
300 <p>CVS User not belonging to group "cvsadmin" shall be able to do the following once authentication passed:</p>
303 <li>Change its own password</li>
307 <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>
309 <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>
311 <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>
313 <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>
315 <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>
317 <p>In order for this to work we need to:</p>
320 <li>Create groups and sysusers files for each <host>:<repository></li>
322 <li>Add groups and sysusers files to checkoutlist so that CVS considers them part of the administrative files set.</li>
324 <li>Have cvsroot perform a cvs -d :pserver:cvsroot@<host>:<repository> login for each and every host:repository combination as whatever the apache user will be on the web server</li>
327 <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>
329 <p>This should be done (setup) on the web server instead of my desktop. We should, perhaps, create a dummy repository for testing.</p>
331 <p>Let me know when this is available so I can start testing there.</p>
334 <p class="entry-footer">
335 <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>