" /> Status for Andrew DeFaria: July 24, 2005 - July 30, 2005 Archives

« July 17, 2005 - July 23, 2005 | Main | July 31, 2005 - August 6, 2005 »

July 29, 2005

verifycrs

  • 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

verifycrs

The verifycrs script verify that the files associated with a list of [E]CRs from one CVS repository are present in another CVS repository.

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.

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.

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.

In order to minimize false diffs, checkouts are down without keywords (i.e. -kk).

Usage: verifycrs [-u] [-v] [-d]
        -fcvsroot <CVSROOT> -fmod <CVS module> -ftag <tag>
        -tcvsroot <CVSROOT> -tmod <CVS module> -ttag <tag>
        [-c <CRs...>|-e <ECRs...>]

Where:

        -u              Display usage
        -v              Turn on verbose mode
        -d              Turn on debug mode
        -fcvsroot       CVSROOT specification for from repository
        -fmod           CVS module (e.g. los178)
        -ftag           From tag (e.g. DEV_LOS178_3p0p0_ppc_20050704)
        -tcvsroot       CVSROOT specification for to repository
        -tmod           CVS module (e.g. los178)
        -ttag           To tag (e.g. DEV_HYBRIDOS_3p0p0_ppc_20050707)
        <CRs>           CR numbers included in this export/import
        <ECRs>          ECR numbers included in this export/import

July 27, 2005

complogs

  • Downloaded a Perl compatible Diff module from Perl Diff and adapted it for use with complogs
  • Created complogs to compare two log files and print out their differences in terms of warnings

complogs

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, check, (which should be in /int/bin and /int/bin should be in your path. BTW: That's where complogs is also).

Secondly it attempts to be semi intelligent WRT comparing warnings. In order to do this I had downloaded a Perl Diff module 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.

This Diff.pm module allows me to diff two arrays and provide a function for determining equality. Thus I have the following function:

    sub hash {
      # Return the line possibly removing any line number. For example, a
      # line such as the following:
      #
      # syscall_switch.c:14: warning: initialization from incompatible pointer type
      #
      # has a line number (14) in it. A subsequent compile of
      # syscall_switch.c may generate the same warning but the line number
      # may change (e.g. 16). It's the same warning so we will remove the
      # string ":\d*:" from the output. This is a bit kludgy.
      my $line = shift;

      return $line =~ s/(\w*\.[ch]):\d*:( warning:)/$1$2/;
    } # hash

This helps cut down on warnings that have only changed line numbers.

I've tested this with a few install.log's that I've found. For example:

    saturn:complogs 20050718.install.log 20050722.install.log
    ----------------------------------------------------------------------
    Warnings removed:
    ----------------------------------------------------------------------
    1439    bsp_pcibus.c:783: warning: unused variable `bus'
    1440    bsp_pcibus.c:784: warning: unused variable `dev'
    1441    bsp_pcibus.c:785: warning: unused variable `func'
    1442    bsp_pcibus.c:150: warning: 'pci_bridge_init' defined but not used
    1443    bsp_reboot.c:168: warning: implicit declaration of function `hw_local_reset'
    1444    bsp_reboot.c:171: warning: implicit declaration of function `stopcpu'
    ----------------------------------------------------------------------
    TOTAL:  6
    ----------------------------------------------------------------------
    Warnings added:
    ----------------------------------------------------------------------
    1881    /usr/los178/3.0.0/ppc_dev/sys/include/kernel/kernel.h:94:1: warning: this is the location of the previous definition
    3378    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3379    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3380    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3381    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3382    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3383    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3384    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3385    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3386    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3387    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3388    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3389    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3390    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3391    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3392    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3393    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3394    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3395    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3396    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3397    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3398    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3399    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3400    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3401    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3403    regex.h:39:1: warning: "RE_DUP_MAX" redefined
    3404    /usr/los178/3.0.0/ppc_dev/usr/include/limits.h:162:1: warning: this is the location of the previous definition
    3412    regex.c:4825: warning: passing arg 2 of `bcmp_translate' discards qualifiers from pointer target type
    3415    ../tar-1.11.2/getdate.y:807: warning: static declaration of 'getdate_yylex' follows non-static declaration
    3416    bison.simple:332: warning: previous implicit declaration of 'getdate_yylex' was here
    3419    /usr/los178/3.0.0/ppc_dev/usr/include/wait.h:58:2: warning: #warning Using  instead of 
    3421    pipesize.h:8:1: warning: "PIPESIZE" redefined
    3422    /usr/los178/3.0.0/ppc_dev/usr/include/conf.h:76:1: warning: this is the location of the previous definition
    3424    display.c:1155: warning: comparison is always true due to limited range of data type
    3425    malloc.c:521: warning: conflicting types for built-in function 'malloc'
    3426    malloc.c:798: warning: conflicting types for built-in function 'calloc'
    3427    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3428    ../ex/ex_cd.c:75: warning: assignment from incompatible pointer type
    3429    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3430    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3431    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3432    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3433    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3434    ../vi/getc.c:63: warning: passing arg 3 of `db_eget' from incompatible pointer type
    3435    ../vi/getc.c:193: warning: passing arg 4 of `db_get' from incompatible pointer type
    3436    ../common/key.c:159: warning: comparison is always true due to limited range of data type
    3437    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3438    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3439    ../common/recover.c:368: warning: assignment from incompatible pointer type
    3440    ../vi/v_txt.c:2184: warning: comparison of distinct pointer types lacks a cast
    3441    ../vi/v_txt.c:2202: warning: comparison of distinct pointer types lacks a cast
    3442    ../vi/v_ulcase.c:130: warning: passing arg 4 of `db_get' from incompatible pointer type
    3443    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3444    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3445    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3446    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3447    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3448    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3449    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3450    /usr/los178/3.0.0/ppc_dev/usr/include/sys/uio.h:21:2: warning: #warning Using  instead of 
    3451    /usr/los178/3.0.0/ppc_dev/usr/include/sys/param.h:21:2: warning: #warning Using  instead of 
    3452    /usr/los178/3.0.0/ppc_dev/usr/include/cdefs.h:21:2: warning: #warning Using  instead of 
    3453    /usr/los178/3.0.0/ppc_dev/usr/include/cdefs.h:21:2: warning: #warning Using  instead of 
    ----------------------------------------------------------------------
    TOTAL:  63

July 26, 2005

CVS Adm Web App Prototype

  • Added CVSCommit to CVSAdm.pm and changed it so that CVS commits are now happening when changes happen to the file
  • Finished up CVS Adm Web App Prototype

CVS Adm Web App Tutorial

To access this web app go to http://saturn.lynx.com and select CVS Adm from the menu on the left.

Notice that there are several servers in the drop down list (controlled by a cvsadm.conf file). Select penguin and click on Select. 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.

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 Select.

At this point you're at the Login 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 Login.

You are now at the Edit User screen. Since you are cvsroot you will see an Admin button. Also as an admin you are presented with a drop down for System User that allows you to modify the system user for a CVS user. Admins are also presented with only a New Password field. This is so that an admin can re/set the password for another user.

Fullname and Email 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 Email.

Next the repository and read/write access is listed. Finally you have a Submit and a Logout button.

To edit another user or perform any of the other administrative task select the Admin button. You are now at the Maintenance Menu. This screen presents users, groups and sysusers as drop downs and corresponding Edit/Delete/Create buttons. Let's add a new user - testuser. Select Create User. The Add New User screen is presented. Here you can create a new Username (testuser), assign him to a System User, Password, Fullname, Email as well as assign him to specific groups and set the read/write access to this repository for the user. Then Select Add User.

After adding testuser click OK and you will be back at the Add New User screen. If you are done adding users select Admin to return to the Maintenance Menu. Notice that testuser is now in the users drop down menu. Select testuser and then select Edit User to edit testuser's fields.

Return to the Maintenance Menu and select testuser in the users drop down menu then Delete User to delete this user.

Try creating a new group men and another new group women. Use Edit User to edit pre-existing users. Notice the new groups of men and women are now listed (but unchecked). Find some men and assign them to be in the men group then click on the Submit button to update their records. Similarly find some women and mark them as such.

Now return to the Maintenance Menu and select the men group and delete it. CVSAdm will not only remove the men group but it will clear off the group men from the individual entries in the passwd file.

Now select the women group and then Edit Group and change women -> wonderwomen. CVSAdm will update the groups file as well as the passwd file changing women -> wonderwomen.

Try adding a system user of say superuser. It now becomes available under the System User drop down.

Edit a user who's password you do not know as cvsroot to a known password. Now Logout 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.

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 Maintenance Menu. 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.

The group cvsadm and the system user cvsroot are protected from being deleted.