Changeset 1161

Show
Ignore:
Timestamp:
06/21/08 19:31:02 (7 months ago)
Author:
shibuya
Message:

- version 2.66-0BQ18
- fixed exportPlatform check routine.
- fixed the issue that doesn't import admin user without root access.
- fixed the chown issue that the gid isn't defined.
- fixed the issue that doesn't enable SSL.
- fixed the issue to import the suspended user.
- fixed the issue that the value is 0 isn't exported
- doesn't output error message for exporting admin user.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • utils/cmu/trunk/Makefile

    r1066 r1161  
    1111INSTALL = /usr/bin/install 
    1212 
    13 VERSION   =   2.65 
     13VERSION   =   2.66 
    1414 
    1515BUILD_DIR =   /tmp/cmu 
     
    239239        /bin/tar -X $(TMP_DIR)/ignore -C $(BUILD_DIR) -czvf $(TMPTAR) cpr 
    240240        $(RPMBUILD) -ta $(TMPTAR) 
    241         perl -pi -e 's#\[VERSION\]#$(VERSION)#' $(PKG_DIR)/5100R/packing_list 
    242         (cd $(PKG_DIR)/5100R;make) 
    243241 
    2442425200r:: cmu base adjust 
     
    255253        /bin/tar -X $(TMP_DIR)/ignore -C $(BUILD_DIR) -czvf $(TMPTAR) cpr 
    256254        $(RPMBUILD) -ta $(TMPTAR) 
    257         perl -pi -e 's#\[VERSION\]#$(VERSION)#' $(PKG_DIR)/5200R/packing_list 
    258         (cd $(PKG_DIR)/5200R;make) 
    259255 
    260256tlas1he:: cmu base adjust 
     
    271267        /bin/tar -X $(TMP_DIR)/ignore -C $(BUILD_DIR) -czvf $(TMPTAR) cpr 
    272268        $(RPMBUILD) -ta $(TMPTAR) 
    273         perl -pi -e 's#\[VERSION\]#$(VERSION)#' $(PKG_DIR)/5100R/packing_list 
    274         (cd $(PKG_DIR)/TLAS1HE;make) 
    275269 
    276270tlas2:: cmu base adjust 
     
    287281        /bin/tar -X $(TMP_DIR)/ignore -C $(BUILD_DIR) -czvf $(TMPTAR) cpr 
    288282        $(RPMBUILD) -ta $(TMPTAR) 
    289         perl -pi -e 's#\[VERSION\]#$(VERSION)#' $(PKG_DIR)/5100R/packing_list 
    290         (cd $(PKG_DIR)/TLAS2;make) 
    291283 
    292284qube2:: cmu base 
  • utils/cmu/trunk/cobalt-cmu.spec.in

    r1066 r1161  
    44Name: [PRODUCT]-cmu 
    55Version: [VERSION] 
    6 Release: 0BQ17%{?dist} 
     6Release: 0BQ18%{?dist} 
    77Vendor: %{vendor} 
    88License: Sun modified BSD 
     
    6868 
    6969%changelog 
     70* Sat Jun 21 2008 Hisao SHIBUYA <shibuya@bluequartz.org> 
     71- version 2.66-0BQ18 
     72- fixed exportPlatform check routine. 
     73- fixed the issue that doesn't import admin user without root access. 
     74- fixed the chown issue that the gid isn't defined. 
     75- fixed the issue that doesn't enable SSL. 
     76- fixed the issue to import the suspended user. 
     77- fixed the issue that the value is 0 isn't exported 
     78- doesn't output error message for exporting admin user. 
     79 
    7080* Sun Jan 27 2008 Hisao SHIBUYA <shibuya@bluequartz.org> 
    7181- version 2.65-0BQ17 
  • utils/cmu/trunk/perl_modules/Archive.pm

    r1065 r1161  
    518518                } 
    519519 
     520                my $gid; 
     521                if (defined $self->{gid}) { 
     522                        $gid = $self->{gid}; 
     523                } else { 
     524                        $gid = 'users'; 
     525                } 
     526 
    520527                # escape problem chars 
    521528                if($file->{name} =~ /\$/) { $file->{name} =~ s/\$/\\\$/g; } 
     
    524531                if($self->build =~ /^RaQ/ || $self->build =~ /^5100R/ || $self->build =~ /^5200R/ || $self->build =~ /^TLAS1HE/ || $self->build =~ /^TLAS2/) { 
    525532                        $ret = chown((getpwnam($file->{uid}))[2], 
    526                          (getgrnam($self->{gid}))[2], $file->{name} ); 
     533                         (getgrnam($gid))[2], $file->{name} ); 
    527534                        $ret = ($ret > 0)? 0: 1; 
    528535                } elsif($self->build =~ /^Qube/) {  
  • utils/cmu/trunk/perl_modules/TreeXml.pm

    r945 r1161  
    2424                $XMLHEADER 
    2525);       
    26 $VERSION = 2.53
     26$VERSION = 2.66
    2727 
    2828use vars qw($XMLPROLOG $XMLHEADER $KEYATTR); 
     
    226226    my @attrs = []; 
    227227 
    228     if ($data->{exportPlatform} =~ /RaQ/ || $data->{exportPlatform} =~ /5100R/ || $data->{exportPlatform} =~ /TLAS[0-9]+HE/) { 
     228    if ($data->{exportPlatform} =~ /RaQ/ || $data->{exportPlatform} =~ /5100R/ || $data->{exportPlatform} =~ /TLAS1HE/ || $data->{exportPlatform} =~ /TLAS2/) { 
    229229        @attrs = qw(vsite user list); 
    230230    } 
     
    385385                    push @nested, @{ TreeXml::asXml($val, $key, "$indent  ") }; 
    386386                } 
    387                 elsif ($val) { 
     387                elsif (defined($val)) { 
    388388                    $val = escText($val); 
    389389                    push @result, $indent, qq(   <$key value = "$val"/>\n); 
  • utils/cmu/trunk/perl_modules/cmuCCE.pm

    r930 r1161  
    170170 
    171171        foreach my $attr (keys %{ $curObj }) { 
    172                 next unless($curObj->{$attr}); 
     172                next unless($curObj->{$attr} ne ''); 
    173173                if(exists($self->{_arrayVal}->{$attr})) { 
    174174                        # to make more this readable 
  • utils/cmu/trunk/scripts/5100Radjust.pl

    r956 r1161  
    2525$tree->{adjustPlatform} = "5100R"; 
    2626 
     27if(defined $tree->{user}) { 
     28my($uTree, $fqdn, @arr); 
     29my @keys = keys %{ $tree->{user} }; 
     30foreach my $user (@keys) { 
     31        $uTree = $tree->{user}->{$user}; 
     32 
     33        # Check suspend user 
     34        if (!defined($uTree->{enabled})) { 
     35                $uTree->{enabled} = 0; 
     36        } 
     37        if (!defined($uTree->{ui_enabled})) { 
     38                $uTree->{ui_enabled} = 0; 
     39        } 
     40} 
     41} 
     42 
     43if(defined $tree->{list}) { 
     44my($lTree, $fqdn, @arr); 
     45my @keys = keys %{ $tree->{list} }; 
     46foreach my $list (@keys) { 
     47        $lTree = $tree->{list}->{$list}; 
     48 
     49        # Check reply policy 
     50        if (!defined($lTree->{replyToList})) { 
     51                $lTree->{replyToList} = 0; 
     52        } 
     53} 
     54} 
     55 
     56 
     57if(defined $tree->{vsite}) { 
     58my $vTree; 
     59my @keys = keys %{ $tree->{vsite} }; 
     60foreach my $vsite (@keys) { 
     61        $vTree = $tree->{vsite}->{$vsite}; 
     62        if(defined $vTree->{SSL}->{importCert}) { 
     63                delete $vTree->{SSL}->{importCert} 
     64        } 
     65} 
     66} 
     67 
    2768my $migrate = {}; 
    2869TreeXml::addNode('migrate', $tree, $migrate); 
  • utils/cmu/trunk/scripts/5100Rscanin.pl

    r957 r1161  
    162162        # convert into fqdn into site 
    163163        my $vsites; 
     164 
     165        # check adminUser 
     166        my $admin; 
     167        if (defined $uTree->{capLevels}) { 
     168                my @arr = @{ $uTree->{capLevels}->{cap} }; 
     169 
     170                for(my $i = 0; $i < @arr; $i++) { 
     171                        if($uTree->{capLevels}->{cap}->[$i] eq 'adminUser') { 
     172                                $admin = 1; 
     173                        } 
     174                } 
     175        } 
     176 
    164177        if(defined $uRef->{fqdn}) { 
    165178                ($uRef->{site}) = $cce->findMember("Vsite",  
  • utils/cmu/trunk/scripts/5100Rscanout.pl

    r945 r1161  
    108108                $vobj->{archives} = $arch->archives; 
    109109        } 
     110        if(defined $vobj->{SSL}->{importCert}) { 
     111                delete $vobj->{SSL}->{importCert}; 
     112        } 
     113 
    110114        push @{ $tree->{migrate}->{vsite} }, $vobj; 
    111115} 
     
    119123 
    120124    my $key = $cceRef->{name}; 
     125        # check adminUser 
     126        my $admin; 
     127        if ($cceRef->{capLevels} =~ /&adminUser&/) { 
     128                $admin = 1; 
     129        } 
     130 
    121131        warn "INFO: exporting user $key\n"; 
    122132        ($fqdn) = $cce->findMember("Vsite",  
     
    125135                'fqdn' 
    126136        ); 
    127         if(!$fqdn) { 
     137        if(!$fqdn && !$admin) { 
    128138                warn "ERROR: cannot retrieve virtual site for user ", 
    129139                        $cceRef->{name}, "\n"; 
  • utils/cmu/trunk/scripts/cmuImport

    r950 r1161  
    8787my ($pid, $adjustCmd); 
    8888# cobaltBase adjust 
     89cmuLog("INFO", "Adjustment : Platform = " . $migrate->{adjustPlatform} . " build = $build\n"); 
    8990if($cfg->skipAdjust eq 't') { 
    9091        cmuLog("WARN","Skipping adjust script\n"); 
     
    105106                $adjustCmd = "/usr/cmu/scripts/". 
    106107                        $adjustPath{ $migrate->{adjustPlatform} }."adjust.pl"; 
     108                cmuLog("INFO", "AdjustCommand = $adjustCmd\n"); 
    107109                if(! -x $adjustCmd) { 
    108110                        cmuLog("ERROR", "Cannot adjust to this platform\n");