Merge of bug fixes from branch_2_1 to HEAD, round 3.
authorZdeněk Šustr <sustr4@cesnet.cz>
Mon, 14 Feb 2011 17:06:07 +0000 (17:06 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Mon, 14 Feb 2011 17:06:07 +0000 (17:06 +0000)
47 files changed:
org.glite.lb.client-java/configure
org.glite.lb.client-java/project/ChangeLog
org.glite.lb.client-java/project/version.properties
org.glite.lb.client/configure
org.glite.lb.client/project/ChangeLog
org.glite.lb.client/project/version.properties
org.glite.lb.client/src/producer.c
org.glite.lb.common/configure
org.glite.lb.common/project/ChangeLog
org.glite.lb.common/project/version.properties
org.glite.lb.doc/configure
org.glite.lb.doc/project/ChangeLog
org.glite.lb.doc/project/version.properties
org.glite.lb.glite-LB/configure
org.glite.lb.harvester/config/startup
org.glite.lb.harvester/configure
org.glite.lb.harvester/project/ChangeLog
org.glite.lb.harvester/project/version.properties
org.glite.lb.logger/config/startup
org.glite.lb.logger/configure
org.glite.lb.logger/project/ChangeLog
org.glite.lb.logger/project/version.properties
org.glite.lb.logger/src/input_queue_socket.c
org.glite.lb.logger/src/logd_proto.c
org.glite.lb.logger/src/send_event.c
org.glite.lb.server/config/startup
org.glite.lb.server/configure
org.glite.lb.server/project/ChangeLog
org.glite.lb.server/project/version.properties
org.glite.lb.server/src/stats.c
org.glite.lb.state-machine/configure
org.glite.lb.state-machine/project/ChangeLog
org.glite.lb.state-machine/project/version.properties
org.glite.lb.types/configure
org.glite.lb.types/project/ChangeLog
org.glite.lb.types/project/version.properties
org.glite.lb.utils/configure
org.glite.lb.utils/project/ChangeLog
org.glite.lb.utils/project/version.properties
org.glite.lb.ws-interface/configure
org.glite.lb.ws-interface/project/ChangeLog
org.glite.lb.ws-interface/project/version.properties
org.glite.lb.ws-test/configure
org.glite.lb.ws-test/project/ChangeLog
org.glite.lb.ws-test/project/version.properties
org.glite.lb.yaim/configure
org.glite.lb/project/version.properties

index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 335b845..82bd9fe 100644 (file)
 1.0.5-3
 - Module rebuilt
 
+1.0.5-4
+- Module rebuilt
+
+1.0.5-5
+- Module rebuilt
+
+1.0.5-6
+- Module rebuilt
+
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 945463d..551144b 100644 (file)
 4.1.6-2
 - Module rebuilt
 
+4.1.7-1
+- New multi-threaded example added
+
+4.1.7-2
+- Module rebuilt
+
+4.1.8-1
+- Optimized handling of simultaneous proxy&direct logging (fix for bug #77366)
+
index ee82baa..6c59415 100644 (file)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=4.1.6
-module.age=2
+module.version=4.1.8
+module.age=1
index 47d2d04..9f31eb8 100644 (file)
@@ -17,7 +17,7 @@ limitations under the License.
 */
 
 
-#include <sys/types.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
@@ -154,15 +154,13 @@ int edg_wll_DoLogEventServer(
         edg_wll_PlainConnection con_lbproxy;
         edg_wll_GssConnection   con_bkserver;
         fd_set fdset;
-       int count,fd,fd_n;
+       int count,fd,fd_n,proxy_answer=0,direct_answer=0;
        int answer = EAGAIN, ret = 0;
 
         edg_wll_ResetError(ctx);
         memset(&con_lbproxy, 0, sizeof(con_lbproxy));
         memset(&con_bkserver, 0, sizeof(con_bkserver));
 
-       FD_ZERO(&fdset);
-
        /* CONNECT */
        count=0;
        if (flags & EDG_WLL_LOGFLAG_PROXY) {
@@ -202,12 +200,15 @@ int edg_wll_DoLogEventServer(
 
        /* READ ANSWER */
        while (count > 0) {
+
+               FD_ZERO(&fdset);
+
                fd_n=0;
-               if (flags & EDG_WLL_LOGFLAG_DIRECT) {
+               if ((flags & EDG_WLL_LOGFLAG_DIRECT)&&(!direct_answer)) {
                        FD_SET(con_bkserver.sock,&fdset);
                        if (con_bkserver.sock > fd_n) fd_n = con_bkserver.sock;
                }
-               if (flags & EDG_WLL_LOGFLAG_PROXY) {
+               if ((flags & EDG_WLL_LOGFLAG_PROXY)&&(!proxy_answer)) {
                        FD_SET(con_lbproxy.sock,&fdset);
                        if (con_lbproxy.sock > fd_n) fd_n = con_lbproxy.sock;
                }
@@ -245,6 +246,7 @@ int edg_wll_DoLogEventServer(
                                goto edg_wll_DoLogEventServer_end; 
                        }
                        count -= 1;
+                       proxy_answer = 1;
                }       
                if (FD_ISSET(con_bkserver.sock,&fdset)) {
                        /* read answer from bkserver */
@@ -253,6 +255,7 @@ int edg_wll_DoLogEventServer(
                                goto edg_wll_DoLogEventServer_end; 
                        }
                        count -= 1;
+                       direct_answer = 1;
                }       
        }
 
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 6517934..56694d6 100644 (file)
 7.1.7-2
 - Module rebuilt
 
+7.1.8-1
+- Fixed warning output.
+
+7.1.8-2
+- Module rebuilt
+
+7.1.8-3
+- Module rebuilt
+
+7.1.9-1
+- Prevent interlogger files from getting corrupted when disk is full
+
index ddd48c9..4a9b842 100644 (file)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=7.1.7
-module.age=2
+module.version=7.1.9
+module.age=1
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 22c76ad..ff2376f 100644 (file)
 1.1.10-3
 - Module rebuilt
 
+1.1.11-1
+- New threaded test documented in LBTP
+
+1.1.11-2
+- Module rebuilt
+
+1.1.11-3
+- Module rebuilt
+
index a2dd2f4..112013b 100644 (file)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=1.1.10
+module.version=1.1.11
 module.age=3
index 0d662fe..3258454 100755 (executable)
@@ -41,39 +41,105 @@ my $output;
 my $lb_tag = '';
 my $lbjp_tag = '';
 my $jp_tag = '';
-my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
+my $projectname;
+
 
 my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
 my %enable_nodes;
 my %disable_nodes;
 
-my %extern_prefix = (
-       cares => '/opt/c-ares',
-       classads => '/opt/classads',
-       cppunit => '/usr',
-       expat => '/usr',
-       globus => '/opt/globus',
-       myproxy => '/opt/myproxy',
-       gsoap => '/usr',
-       mysql => '/usr',
-       'mysql-devel' => '',
-       'mysql-server' => '',
-       voms => '/opt/glite',
-       gridsite => '/opt/glite',
-       lcas => '/opt/glite',
-       trustmanager => '/opt/glite',
-       utiljava => '/opt/glite',
-       ant => '/usr',
-       jdk => '/usr',
-       libtar => '/usr',
-       axis => '/usr',
-       log4c => '/usr',
-       postgresql => '/usr',
-       activemq => '/opt/activemq-cpp-library',
-       apr => '/opt/apr',
-       aprutil => '/opt/apr-util'
+my %externs = (
+       cares => {
+               prefix => '/opt/c-ares',
+               pkg => 'libcares'
+       },
+       classads => {
+               prefix=> '/usr',
+               pkg => 'classads'
+       },
+       cppunit => {
+               prefix=> '/usr',
+               pkg => 'cppunit'
+       },
+       expat => {
+               prefix=> '/usr',
+               pkg => 'expat'
+       },
+       globus => {
+               prefix=> '/opt/globus',
+               pkg => 'globus-gssapi-gsi'
+       },
+       'myproxy-essentials' => {
+               prefix=> '/opt/globus',
+               pkg => 'myproxy'
+       },
+       'myproxy-server' => {
+               prefix=> '/opt/globus',
+       },
+       'myproxy-client' => {
+               prefix=> '/opt/globus',
+       },
+       gsoap => {
+               prefix=> '/usr',
+               pkg => 'gsoap'
+       },
+       mysql => {
+               prefix=> '/usr'
+       },
+       'mysql-devel' => {
+               prefix=> ''
+       },
+       'mysql-server' => {
+               prefix => ''
+       },
+       voms => {
+               prefix => '/opt/glite',
+               pkg => 'voms-1.0'
+       },
+       gridsite => {
+               prefix => '/opt/glite'
+       },
+       lcas => {
+               prefix => '/opt/glite'
+       },
+       trustmanager => {
+               prefix => '/opt/glite'
+       },
+       utiljava => {
+               prefix=> '/opt/glite'
+       },
+       ant => {
+               prefix=> '/usr'
+       },
+       jdk => {
+               prefix=> '/usr'
+       },
+       libtar => {
+               prefix=> '/usr'
+       },
+       axis => {
+               prefix=> '/usr'
+       },
+       log4c => {
+               prefix=> '/usr'
+       },
+       postgresql => {
+               prefix=> '/usr'
+       },
+       activemq => {
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
+       apr => {
+               prefix=>'/opt/apr',
+               pkg => 'apr-1'
+       },
+       aprutil => {
+               prefix=>'/opt/apr-util',
+               pkg => 'apr-util-1'
+       },
 );
 
 my %jar = (
@@ -91,14 +157,15 @@ my %extranodmod;
 my %deps;
 my %deps_type;
 my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/proxyrenewal/],
+       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/], 
        'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
        'jobid' => [qw/api-c api-cpp api-java/],
        'jp' => [ qw/client doc index primary server-common ws-interface/ ],
        'gridsite' => [ qw/apache shared commands core/ ],
+       'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
        );
 
 
@@ -106,8 +173,8 @@ my @opts = (
        'prefix=s' => \$prefix,
        'staged=s' => \$staged,
        'module=s' => \$module,
-       'thrflavour=s' => \$thrflavour,
-       'nothrflavour=s' => \$nothrflavour,
+       'thrflavour:s' => \$thrflavour,
+       'nothrflavour:s' => \$nothrflavour,
        'mode=s' => \$mode,
        'listmodules=s' => \$listmodules,
        'version=s' => \$version,
@@ -117,10 +184,10 @@ my @opts = (
        'lb-tag=s' => \$lb_tag,
        'lbjp-common-tag=s' => \$lbjp_tag,
        'jp-tag=s' => \$jp_tag,
-       'security-tag=s' => \$sec_tag,
        'jobid-tag=s' => \$jobid_tag,
        'help' => \$help,
        'libdir=s' => \$libdir,
+       'emi' => \$emi,
 );
 
 for (@nodes) {
@@ -131,20 +198,26 @@ for (@nodes) {
        push @opts,"enable-$_",\$enable_nodes{$_};
 }
 
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
 push @opts,"with-$_=s",\$jar{$_} for keys %jar;
 
 my @keeparg = @ARGV;
 
 GetOptions @opts or die "Errors parsing command line\n";
 
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+       for $_ (keys %etics_externs_emi) {
+               $etics_externs{$_} = $etics_externs_emi{$_};
+       }
+}
 
 if ($help) { usage(); exit 0; }
 
 if ($listmodules) {
-       my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+       my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
        print "@m\n";
        exit 0;
 }
@@ -164,7 +237,33 @@ die "--enable-* and --disable-* are mutually exclusive\n"
 die "--module cannot be used with --enable-* or --disable-*\n"
        if $module && ($en || $dis);
 
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+       if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+       elsif (defined $externs{$ext}{pkg}) {
+               my ($prefix, $flag);
+               my $pkg = $externs{$ext}{pkg};
+               my $flagname = uc $externs{$ext}{pkg};
+               $flagname =~ s/-[0-9\.]*$//;
+               $flagname =~ s/-/_/g;
+
+               print "Checking $pkg ... ";
+               `pkg-config "$pkg" --exists >/dev/null`;
+               if ($? == 0) {
+                       $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+                       chomp $externs{$ext}{prefix};
+                       print "$externs{$ext}{prefix}\n";
+
+                       $flag=`pkg-config $pkg --cflags`;
+                       $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+                       $flag=`pkg-config $pkg --libs`;
+                       $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+               } else {
+                       print "(using default $externs{$ext}{prefix})\n";
+               }
+       }
+} }
 
 if ($dis) {
        for (@nodes) {
@@ -181,7 +280,7 @@ $stagedir = $prefix unless $stagedir;
 if ($mode eq 'build') {
        print "Writing config.status\n";
        open CONF,">config.status" or die "config.status: $!\n";
-       print CONF "$0 @keeparg\n";
+       print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
        close CONF;
 }
 
@@ -227,8 +326,9 @@ sub mode_build {
        @myjars = keys %aux;
        
        print "\nRequired externals:\n";
-       print "\t$_: $extern_prefix{$_}\n" for @ext;
+       print "\t$_: $externs{$_}{prefix}\n" for @ext;
        print "\t$_: $jar{$_}\n" for @myjars;
+       for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
        print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
        
        mkinc($_) for @modules;
@@ -295,13 +395,6 @@ sub mode_checkout() {
                                }
                         }
                }
-               if ($sec_tag){
-                       for (@{$lbmodules{security}}){
-                               if ("security.".$_ eq $module){
-                                        $tag = '-r '.$sec_tag;
-                                }
-                       }
-               }
                if ($jobid_tag){
                        for (@{$lbmodules{jobid}}){
                                if ("jobid.".$_ eq $module){
@@ -343,7 +436,6 @@ BEGIN{
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
        'lbjp-common.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
        'lbjp-common.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
-       'security.proxyrenewal' =>  [ qw/voms globus:B myproxy/ ],
        'jobid.api-c' =>  [ qw/cppunit:B/ ],
        'jobid.api-cpp' =>  [ qw/cppunit:B/ ],
        'jobid.api-java' =>  [ qw/ant:B jdk:B/ ],
@@ -354,6 +446,10 @@ BEGIN{
         'jp.server-common' => [],
         'jp.ws-interface' => [],
        'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+       'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+       'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+       'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+       'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -435,7 +531,6 @@ for my $jar (keys %need_jars) {
        'lbjp-common.trio' => [ qw// ],
        'lbjp-common.gss' =>  [ qw// ],
        'lbjp-common.gsoap-plugin' =>  [ qw/lbjp-common.gss/ ],
-       'security.proxyrenewal' =>  [ qw// ],
        'jobid.api-c' =>  [ qw// ],
        'jobid.api-cpp' =>  [ qw/jobid.api-c/ ],
        'jobid.api-java' =>  [ qw// ],
@@ -467,6 +562,11 @@ for my $jar (keys %need_jars) {
        'jp.ws-interface' => [ qw// ],
 
        'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+       'px.proxyrenewal' => [ qw// ],
+       'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+       'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+       'px.myproxy-config' => [],
 );
 
 for my $ext (keys %deps_aux) {
@@ -491,6 +591,9 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+       'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+       'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
        'lbjp-common.gss' => [ qq/glite-security-gss/ ],
        'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
 );
@@ -501,7 +604,7 @@ for my $ext (keys %deps_aux) {
        'jobid' => 'org.glite',
        'lbjp-common' => 'org.glite',
        'gridsite' => 'org',
-       'security' => 'org.glite',
+       'px' => 'org.glite',
 );
 
 %conf_prefix = (
@@ -510,7 +613,16 @@ for my $ext (keys %deps_aux) {
        'jobid' => 'glite-',
        'lbjp-common' => 'glite-',
        'gridsite' => '',
-       'security' => 'glite-',
+       'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+       'lb' => 'emi-',
+       'jp' => 'emi-',
+       'jobid' => 'emi-',
+       'lbjp-common' => 'emi-',
+       'gridsite' => '',
+       'px' => 'emi-',
 );
 
 my @k = keys %deps_aux;
@@ -536,8 +648,9 @@ sub mkinc
 lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
 lbjp-common.gss lbjp-common.gsoap-plugin
 jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
 /;
        @aux{@m} = (1) x ($#m+1);
 
@@ -574,7 +687,8 @@ libdir = $libdir
 };
 
        for (@{$need_externs{$short}}) {
-               print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+               print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+               print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
        }
 
        for (@{$need_jars{$short}}) {
@@ -589,13 +703,13 @@ libdir = $libdir
        close MKINC;
 }
 
-my %etics_externs;
-my %etics_projects;
 BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
-               myproxy=>'myproxy',
+               'myproxy-essentials'=>'myproxy_essentials',
+               'myproxy-server'=>'myproxy_server',
+               'myproxy-client'=>'myproxy_client',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -615,10 +729,20 @@ BEGIN{
                apr=>'apr-dev',
                aprutil=>'aprutil-dev',
        );
+       %etics_externs_emi = (
+               globus_essentials=>'globus-gssapi-gsi',
+               globus=>'globus-gssapi-gsi-devel',
+               gridsite=>'emi.gridsite.shared',
+               yaim_core=>'emi.yaim.yaim-core'
+       );
        %etics_projects = (
                vdt=>[qw/globus globus_essentials myproxy/],
                'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
        );
+       %etics_projects_emi = (
+               vdt=>'externs',
+               'org.glite'=>'emi',
+       );
 
        %platform_properties = (
                'gridsite.core' => {
@@ -666,30 +790,45 @@ sub mode_etics {
        for (@{$need_externs{"$subsys.$module"}}) {
            if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
-               push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+               if ($emi) {
+                       if ($ge{$_} and not defined $externs{$_}{pkg}) {
+                               push @copts, "--with-$_=\${stageDir}";
+                       }
+               } else {
+                       push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+               }
            }
        }
 
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
        }
 
        my $conf;
        my $conftag;
+       my ($confprefix, $nameprefix);
 
        $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+       $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+       $nameprefix = $confprefix;
+       $nameprefix =~ s/-$//;
+       $nameprefix =~ s/-/\./g;
+
        if ($branch) {
-               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conf = "$confprefix${subsys}-${module}_$branch"; 
                $conftag = $branch;
                # forced low age number
                $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+               $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
 # XXX: gridsite hack
-               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
+                       "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
@@ -728,7 +867,13 @@ sub mode_etics {
 
        if ($subsys eq 'gridsite') {
                if ($module eq 'core') {
-                       my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       my $flags;
+
+                       if ($emi) {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+                       } else {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       }
 
                        $cmd{compile} = "make $flags build";
                        $cmd{install} = "make $flags install";
@@ -738,8 +883,13 @@ sub mode_etics {
                        $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
                }
        }
+       elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+               $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+       }
        else {
-               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+               my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
                $cmd{compile} = 'make';
                $cmd{test} = 'make check';
                $cmd{install} = 'make install';
@@ -751,23 +901,20 @@ sub mode_etics {
                $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
        }
 
-       my $checkoutcmd;
-       if ($conftag eq 'HEAD') {
-               $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
-       } else {
-               $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
-       }
+       my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+       $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
 displayName = $conf
 description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
 age = $age
 deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
 tag = $conftag
 version = $major.$minor.$rev
 $dwpath
@@ -800,8 +947,9 @@ $buildroot
 aprSuffix = 0
 package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
 package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
@@ -828,6 +976,9 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
                my $proj = 'externals';
                for my $p (keys %etics_projects) {
+                       if ($emi and defined $etics_projects_emi{$p}) {
+                               $p = $etics_projects_emi{$p};
+                       }
                        for $m (@{$etics_projects{$p}}) {
                                $proj = $p if $m eq $_;
                        }
@@ -839,7 +990,7 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
        for (@{$deps{"$subsys.$module"}}) {
                my $type = $deps_type{"$subsys.$module"}->{$_};
-               print C "org.glite|org.glite.$_ = $type\n";
+               print C "$projectname|$projectname.$_ = $type\n";
        }
 
        close C;
@@ -848,12 +999,13 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 sub gsoap_version {
        local $_;
        my $gsoap_version;
-       open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+       open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
 
        while ($_ = <S>) {
                chomp;
 
                $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+               $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
        }
        close S;
        return $gsoap_version;
@@ -910,7 +1062,7 @@ sub getlibdir {
 }
 
 sub usage {
-       my @ext = keys %extern_prefix;
+       my @ext = keys %externs;
        my @myjars, keys %jar;
 
        print STDERR qq{
@@ -925,6 +1077,7 @@ General options (defaults in []):
   --version=maj.min.rev-age    specify version here instead of reading version.properties
   --branch=branch              CVS branch/etics name suffix (HEAD, branch_2_1, ...)
   --libdir=libdir              typically [lib,lib64] postfix
+  --emi                                generate configurations with emi flavor in mode 'etics'
   
 Mode of operation:
   --mode={checkout|build|etics}        what to do [build]
@@ -932,12 +1085,11 @@ Mode of operation:
 What to build:
   --module=module              build this module only (mostly in-Etics operation)
   --enable-NODE                        build this "node" (set of modules) only. Available nodes are
-                                       @{$lbmodules{lb}},@{$lbmodules{security}}
+                                       @{$lbmodules{lb}}
   --disable-NODE               don't build this node
   --lb-tag=tag                 checkout LB modules with specific tag
   --jp-tag=tag                 checkout JP modules with specific tag
   --lbjp-common-tag=tag         checkout lbjp-common modules with specific tag
-  --security-tag=tag           checkout security modules with specific tag
   --jobid-tag=tag              checkout jobid modules with specific tag
 
 Dependencies:
index abe657e..603568d 100755 (executable)
@@ -44,6 +44,8 @@ if [ -n "$GLITE_LB_HARVESTER_CONFIG" ]; then
 fi
 [ -n "$GLITE_LB_HARVESTER_DBCS" ] && conf="$conf -m $GLITE_LB_HARVESTER_DBCS"
 
+HARVESTER_NOTIFSFILE=/var/tmp/notifs.txt
+
 unset creds port log4c
 
 [ -n "$GLITE_HOST_CERT" -a -n "$GLITE_HOST_KEY" ] &&
@@ -61,13 +63,20 @@ start_daemon()
        local name="$1"
        local pidfile="$2"
        local cmd="$3"
+       local stale="$4"
 
        if [ -f "$pidfile" ]; then
                if kill -0 `cat $pidfile`; then
                        return 0
                fi
-               echo -n "Warning: stalled $pidfile for $name"
+               echo "Warning: stale $pidfile for $name"
                rm -f "$pidfile"
+               if [ -n "$stale" ]; then
+                       for file in $stale; do
+                               echo "Warning: stale $file for $name"
+                               rm -f "$file"
+                       done
+               fi
        fi
        echo -n "Starting $name ..."
        su - $GLITE_USER -c "$log4c $cmd" && echo " done" || echo " FAILED"
@@ -111,7 +120,7 @@ status_daemon()
                if kill -0 $pid >/dev/null 2>&1; then
                        echo "$name running as $pid"
                else
-                       echo "$name not running (stalled pidfile)"
+                       echo "$name not running (stale pidfile)"
                        return 1
                fi
        else
@@ -143,7 +152,7 @@ start()
 
        start_daemon glite-lb-harvester "$pidfile" "$GLITE_LOCATION/bin/glite-lb-harvester \
                $creds $conf -i $pidfile -d $level $port --daemon\
-               $GLITE_LB_HARVESTER_OTHER_OPTIONS"
+               $GLITE_LB_HARVESTER_OTHER_OPTIONS" "$HARVESTER_NOTIFSFILE"
 }
 
 stop()
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index d5d8e8a..d0d6326 100644 (file)
 1.0.10-2
 - Module rebuilt
 
+1.0.10-3
+- Module rebuilt
+
+1.0.10-4
+- Module rebuilt
+
+1.0.11-1
+- Startup scripts remove stale sockets (fix tu bug #77357)
+
index 5c3139d..7a70366 100755 (executable)
@@ -30,6 +30,7 @@ GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-$GLITE_LOCATION/var}
 
 LL_PIDFILE=${LL_PIDFILE:-$GLITE_LOCATION_VAR/glite-lb-logd.pid}
 IL_PIDFILE=${IL_PIDFILE:-$GLITE_LOCATION_VAR/glite-lb-interlogd.pid}
+IL_SOCKFILE=/tmp/interlogger.sock
 
 unset creds port log4c
 
@@ -38,13 +39,20 @@ start_daemon()
        local name="$1"
        local pidfile="$2"
        local cmd="$3"
+       local stale="$4"
 
        if [ -f "$pidfile" ]; then
                if ps p `cat $pidfile` >/dev/null 2>&1; then
                        return 0
                fi
-               echo -n "Warning: stalled $pidfile for $name"
+               echo "Warning: stale $pidfile for $name"
                rm -f "$pidfile"
+               if [ -n "$stale" ]; then
+                       for file in $stale; do
+                               echo "Warning: stale $file for $name"
+                               rm -f "$file"
+                       done
+               fi
        fi
        echo -n "Starting $name ..."
        su - $GLITE_USER -c "$log4c $cmd" && echo " done" || echo " FAILED"
@@ -60,7 +68,7 @@ status_daemon()
                if ps p $pid >/dev/null 2>&1; then
                        echo "$name running as $pid"
                else
-                       echo "$name not running (stalled pidfile)"
+                       echo "$name not running (stale pidfile)"
                        return 1
                fi
        else
@@ -118,7 +126,7 @@ start()
                -i $LL_PIDFILE $creds $port $sock $fprefix"
 
        start_daemon "glite-lb-interlogd" "$IL_PIDFILE" "$GLITE_LOCATION/bin/glite-lb-interlogd \
-               -i $IL_PIDFILE $creds $sock $fprefix"
+               -i $IL_PIDFILE $creds $sock $fprefix" "$IL_SOCKFILE"
 }
 
 killwait()
@@ -150,7 +158,7 @@ stop()
        if netstat -an --inet --inet6 | grep "^tcp .* \(::\|0.0.0.0\):${GLITE_LB_LOGGER_PORT:-9002} .*LISTEN" >/dev/null 2>&1 ;then
                killall -9 glite-lb-logd
        fi
-       if netstat -an --unix | grep "^unix .* LISTEN.* ${GLITE_LB_IL_SOCK:-/tmp/interlogger.sock}$" >/dev/null 2>&1 ;then
+       if netstat -an --unix | grep "^unix .* LISTEN.* ${GLITE_LB_IL_SOCK:-$IL_SOCKFILE}$" >/dev/null 2>&1 ;then
                killall -9 glite-lb-interlogd
        fi
 }
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 8567a31..f0b726c 100644 (file)
 2.1.11-2
 - Module rebuilt
 
+2.1.12-1
+- Fixed build-time warnings in logging output calls
+
+2.1.12-2
+- Module rebuilt
+
+2.1.13-1
+- Optimized recovery from errors affecting single jobs (fix to bug #77365)
+- Startup scripts remove stale sockets (fix to bug #77357)
+
+2.1.14-1
+- Prevent interlogger.sock from being deleted by tmpwatch
+- Do not fail on insufficient disk space in /tmp/ when not really necessary
+- Fixed behavior of the --noIPC option
+- Minor memory handling bug fixed
+
index bace89d..007059f 100644 (file)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=2.1.11
-module.age=2
+module.version=2.1.14
+module.age=1
index 6faf2a2..ed6034d 100644 (file)
@@ -250,6 +250,8 @@ input_queue_get(il_octet_string_t **buffer, long *offset, int timeout)
   
   tv.tv_sec = timeout;
   tv.tv_usec = 0;
+
+  utime(socket_path, NULL);
   
   utime(socket_path, NULL);
 
index cc9cb79..d626657 100644 (file)
@@ -491,7 +491,7 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout
                // glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_TRACE,"Read message: \"%s\"\n",msg);
        }       
 
-       if (buf[count] != '\0') buf[count] = '\0';
+       buf[count] = '\0';
 
        /* parse message and get jobId and priority from it */
        if (!noparse && strstr(msg, "DG.TYPE=\"command\"") == NULL) {
@@ -573,19 +573,17 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout
                if (!send_answer_back(con,answer,timeout)) { 
                        answer_sent = 1;
                }
+               if(init_confirmation() < 0) { 
+                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error initializing 2nd UNIX socket (%s) for priority messages confirmation.\n",confirm_sock_name); 
+                       answer = errno; 
+                       goto edg_wll_log_proto_server_end; 
+               } else {
+                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Initializing 2nd UNIX socket (%s) for priority messages confirmation...[ok]\n",confirm_sock_name);
+               }
        } 
 
        /* send message via IPC (UNIX socket) */
        if (!noipc) {
-               if (event->any.priority & (EDG_WLL_LOGFLAG_SYNC|EDG_WLL_LOGFLAG_SYNC_COMPAT)) {
-                       if(init_confirmation() < 0) { 
-                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error initializing 2nd UNIX socket (%s) for priority messages confirmation.\n",confirm_sock_name); 
-                               answer = errno; 
-                               goto edg_wll_log_proto_server_end; 
-                       } else {
-                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Initializing 2nd UNIX socket (%s) for priority messages confirmation...[ok]\n",confirm_sock_name);
-                       }
-               }         
 
                if ( edg_wll_log_event_send(context, socket_path, filepos, msg, msg_size, CONNECT_ATTEMPTS, timeout) ) {
                        char *errd;
@@ -600,22 +598,23 @@ int edg_wll_log_proto_server(edg_wll_GssConnection *con, struct timeval *timeout
                        "the message position %ld (%ld bytes)... [ok]",
                        socket_path, filepos, sizeof(filepos));
 
-               if (event->any.priority & (EDG_WLL_LOGFLAG_SYNC|EDG_WLL_LOGFLAG_SYNC_COMPAT)) {
-                       if ((count = wait_for_confirmation(timeout, &answer)) < 0) {
-                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error waiting for confirmation.\n");
-                               answer = errno;
+       } else {
+               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"NOT sending via IPC.\n");
+       }
+
+       if (event->any.priority & (EDG_WLL_LOGFLAG_SYNC|EDG_WLL_LOGFLAG_SYNC_COMPAT)) {
+               if ((count = wait_for_confirmation(timeout, &answer)) < 0) {
+                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_WARN,"Error waiting for confirmation.\n");
+                       answer = errno;
+               } else {
+                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Waiting for confirmation... [ok].\n");
+                       if (count == 0) {
+                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Waking up, timeout expired.\n");
+                               answer = EAGAIN;
                        } else {
-                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Waiting for confirmation... [ok].\n");
-                               if (count == 0) {
-                                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Waking up, timeout expired.\n");
-                                       answer = EAGAIN;
-                               } else {
-                                       glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Confirmation received, waking up.\n");
-                               }
+                               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"Confirmation received, waking up.\n");
                        }
                }
-       } else {
-               glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,"NOT sending via IPC.\n");
        }
 
 edg_wll_log_proto_server_end:
index 0be4a7a..8cd90d1 100644 (file)
@@ -355,14 +355,16 @@ event_queue_send(struct event_queue *eq, struct queue_thread *me)
     case LB_NOMEM:
            /* NOT USED: case LB_SYS:  */
            /* NOT USED: case LB_AUTH: */
-
     case LB_DBERR:
-      /* non fatal errors (for us) */
-      me->timeout = TIMEOUT;
-      return(0);
+           /* check minor code */
+           if(!(ENOENT == code_min)) {
+                   /* non fatal errors (for us) */
+                   eq->timeout = TIMEOUT;
+                   return(0);
+           }
        
     case LB_OK:
-      /* event succesfully delivered */
+      /* event 'succesfully' delivered */
       
     case LB_PERM:
     default: /* LB_PROTO */
index a47cb8a..e1afc9f 100755 (executable)
@@ -49,13 +49,20 @@ start_daemon()
        local name="$1"
        local pidfile="$2"
        local cmd="$3"
+       local stale="$4"
 
        if [ -f "$pidfile" ]; then
-               if ps p `cat $pidfile` >/dev/null 2>&2; then
+               if ps p `cat $pidfile` >/dev/null 2>&1; then
                        return 0
                fi
-               echo -n "Warning: stalled $pidfile for $name"
+               echo "Warning: stale $pidfile for $name"
                rm -f "$pidfile"
+               if [ -n "$stale" ]; then
+                       for file in $stale; do
+                               echo "Warning: stale $file for $name"
+                               rm -f "$file"
+                       done
+               fi
        fi
        echo -n "Starting $name ..."
        su - $GLITE_USER -c "$log4c $cmd" && echo " done" || echo " FAILED"
@@ -99,7 +106,7 @@ status_daemon()
                if ps p $pid >/dev/null 2>&1; then
                        echo "$name running as $pid"
                else
-                       echo "$name not running (stalled pidfile)"
+                       echo "$name not running (stale pidfile)"
                        return 1
                fi
        else
@@ -209,13 +216,13 @@ start()
                --notif-il-sock=$GLITE_LB_NOTIF_SOCK \
                --notif-il-fprefix=$GLITE_LB_NOTIF_FPREFIX \
                $super $creds -i $BK_PIDFILE $port $wport $dumpdir $purgedir $lbreg_maildir $proxy $policy\
-               $GLITE_LB_SERVER_OTHER_OPTIONS"
+               $GLITE_LB_SERVER_OTHER_OPTIONS" "/tmp/lb_proxy_serve.sock /tmp/lb_proxy_store.sock"
 
        if test -x $GLITE_LOCATION/bin/glite-lb-notif-interlogd; then
                start_daemon glite-lb-notif-interlogd "$NOTIF_IL_PIDFILE" "$GLITE_LOCATION/bin/glite-lb-notif-interlogd \
                        -f $GLITE_LB_NOTIF_FPREFIX -s $GLITE_LB_NOTIF_SOCK \
                        -i $NOTIF_IL_PIDFILE -M 10485760 \
-                       $creds $GLITE_LB_NOTIF_IL_OTHER_OPTIONS"
+                       $creds $GLITE_LB_NOTIF_IL_OTHER_OPTIONS" "$GLITE_LB_NOTIF_SOCK"
        else
                echo Warning: glite-lb-notif-interlogd not installed, LB notifications will not work
        fi
@@ -233,7 +240,7 @@ start()
                        start_daemon "glite-lb-interlog for proxy" "$PROXY_IL_PIDFILE" "$GLITE_LOCATION/bin/glite-lb-interlogd \
                                -f $GLITE_LB_PROXY_FPREFIX -s $GLITE_LB_PROXY_SOCK \
                                -i $PROXY_IL_PIDFILE \
-                               $creds $GLITE_LB_PROXY_IL_OTHER_OPTIONS"
+                               $creds $GLITE_LB_PROXY_IL_OTHER_OPTIONS" "$GLITE_LB_PROXY_SOCK"
                else
                        echo Warning: glite-lb-interlogd not installed, logging to LB proxy will not work
                fi
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 0156e99..f4b0c08 100644 (file)
 2.1.13-2
 - Module rebuilt
 
+2.1.14-1
+- Fixed lcas linking issues for EMI builds
+- Fixed build-time warnings in logging output calls
+- Fixed emty set handling issues in statistics
+
+2.1.14-2
+- Module rebuilt
+
+2.1.15-1
+- Startup scripts remove stale sockets (fix to bug #77357)
+
+2.1.16-1
+- Increased severity for DB open errors
+
index 65a5bd2..9117ef1 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.lb.server/project/version.properties,v 1.185 2008/06/25 13:12:58 akrenek Exp $
-module.version=2.1.13
-module.age=2
+module.version=2.1.16
+module.age=1
index 003d8a4..f9f5678 100644 (file)
@@ -789,8 +789,8 @@ int edg_wll_StateRateServer(
                         goto cleanup;
                }
                else if (i == shift){ // found groups, but all empty
-                        edg_wll_SetError(ctx,ENOENT,"no data available");
-                }
+                       edg_wll_SetError(ctx,ENOENT,"no data available");       
+               }
                else
                         edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked
        }
@@ -1038,7 +1038,7 @@ int edg_wll_StateDurationFromToServer(
                         goto cleanup;
                 }
                else if (i == shift)
-                        edg_wll_SetError(ctx,ENOENT,"no data available");
+                       edg_wll_SetError(ctx,ENOENT,"no data available");
                else
                        edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked
        }
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 91e40d7..cd666cf 100644 (file)
 1.1.4-2
 - Module rebuilt
 
+1.1.4-3
+- Module rebuilt
+
+1.1.4-4
+- Module rebuilt
+
+1.1.4-5
+- Module rebuilt
+
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index f075658..43bb0f8 100644 (file)
 1.1.4-1
 - Configure updated to work across org.glite & EMI
 
+1.1.4-2
+- Module rebuilt
+
+1.1.4-3
+- Module rebuilt
+
+1.1.4-4
+- Module rebuilt
+
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 14c4317..0874bdf 100644 (file)
 2.0.8-1
 - Makefile a configuration updated to work across org.glite & EMI
 
+2.0.8-2
+- Module rebuilt
+
+2.0.8-3
+- Module rebuilt
+
+2.0.8-4
+- Module rebuilt
+
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 1a02f59..6e7d7c0 100644 (file)
 3.1.2-4
 - Module rebuilt
 
+3.1.2-5
+- Module rebuilt
+
+3.1.2-6
+- Module rebuilt
+
+3.1.2-7
+- Module rebuilt
+
index 76e67f9..3258454 100755 (executable)
@@ -127,18 +127,19 @@ my %externs = (
        },
        postgresql => {
                prefix=> '/usr'
-       }
+       },
        activemq => {
-               prefix=>'/opt/activemq-cpp-library'
-       }
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
        apr => {
                prefix=>'/opt/apr',
                pkg => 'apr-1'
-       }
+       },
        aprutil => {
                prefix=>'/opt/apr-util',
                pkg => 'apr-util-1'
-       }
+       },
 );
 
 my %jar = (
@@ -827,9 +828,6 @@ sub mode_etics {
 # XXX: gridsite hack
                $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
                        "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
-       if ($emi) {
-               $age = "${age}emi";
-       } 
 
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
index 01e0fed..91e1d76 100644 (file)
 1.1.5-2
 - Module rebuilt
 
+1.1.5-3
+- Module rebuilt
+
+1.1.5-4
+- Module rebuilt
+
+1.1.5-5
+- Module rebuilt
+
index 262ac6a..118addf 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.lb.ws-test/project/version.properties,v 1.1 2009/01/15 15:49:26 zsustr Exp $
 module.version=1.1.5
-module.age=2
+module.age=5
index 0d662fe..3258454 100644 (file)
@@ -41,39 +41,105 @@ my $output;
 my $lb_tag = '';
 my $lbjp_tag = '';
 my $jp_tag = '';
-my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
+my $projectname;
+
 
 my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
 my %enable_nodes;
 my %disable_nodes;
 
-my %extern_prefix = (
-       cares => '/opt/c-ares',
-       classads => '/opt/classads',
-       cppunit => '/usr',
-       expat => '/usr',
-       globus => '/opt/globus',
-       myproxy => '/opt/myproxy',
-       gsoap => '/usr',
-       mysql => '/usr',
-       'mysql-devel' => '',
-       'mysql-server' => '',
-       voms => '/opt/glite',
-       gridsite => '/opt/glite',
-       lcas => '/opt/glite',
-       trustmanager => '/opt/glite',
-       utiljava => '/opt/glite',
-       ant => '/usr',
-       jdk => '/usr',
-       libtar => '/usr',
-       axis => '/usr',
-       log4c => '/usr',
-       postgresql => '/usr',
-       activemq => '/opt/activemq-cpp-library',
-       apr => '/opt/apr',
-       aprutil => '/opt/apr-util'
+my %externs = (
+       cares => {
+               prefix => '/opt/c-ares',
+               pkg => 'libcares'
+       },
+       classads => {
+               prefix=> '/usr',
+               pkg => 'classads'
+       },
+       cppunit => {
+               prefix=> '/usr',
+               pkg => 'cppunit'
+       },
+       expat => {
+               prefix=> '/usr',
+               pkg => 'expat'
+       },
+       globus => {
+               prefix=> '/opt/globus',
+               pkg => 'globus-gssapi-gsi'
+       },
+       'myproxy-essentials' => {
+               prefix=> '/opt/globus',
+               pkg => 'myproxy'
+       },
+       'myproxy-server' => {
+               prefix=> '/opt/globus',
+       },
+       'myproxy-client' => {
+               prefix=> '/opt/globus',
+       },
+       gsoap => {
+               prefix=> '/usr',
+               pkg => 'gsoap'
+       },
+       mysql => {
+               prefix=> '/usr'
+       },
+       'mysql-devel' => {
+               prefix=> ''
+       },
+       'mysql-server' => {
+               prefix => ''
+       },
+       voms => {
+               prefix => '/opt/glite',
+               pkg => 'voms-1.0'
+       },
+       gridsite => {
+               prefix => '/opt/glite'
+       },
+       lcas => {
+               prefix => '/opt/glite'
+       },
+       trustmanager => {
+               prefix => '/opt/glite'
+       },
+       utiljava => {
+               prefix=> '/opt/glite'
+       },
+       ant => {
+               prefix=> '/usr'
+       },
+       jdk => {
+               prefix=> '/usr'
+       },
+       libtar => {
+               prefix=> '/usr'
+       },
+       axis => {
+               prefix=> '/usr'
+       },
+       log4c => {
+               prefix=> '/usr'
+       },
+       postgresql => {
+               prefix=> '/usr'
+       },
+       activemq => {
+               prefix=>'/opt/activemq-cpp-library',
+               pkg => 'activemq-cpp'
+       },
+       apr => {
+               prefix=>'/opt/apr',
+               pkg => 'apr-1'
+       },
+       aprutil => {
+               prefix=>'/opt/apr-util',
+               pkg => 'apr-util-1'
+       },
 );
 
 my %jar = (
@@ -91,14 +157,15 @@ my %extranodmod;
 my %deps;
 my %deps_type;
 my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/proxyrenewal/],
+       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/], 
        'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
        'jobid' => [qw/api-c api-cpp api-java/],
        'jp' => [ qw/client doc index primary server-common ws-interface/ ],
        'gridsite' => [ qw/apache shared commands core/ ],
+       'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
        );
 
 
@@ -106,8 +173,8 @@ my @opts = (
        'prefix=s' => \$prefix,
        'staged=s' => \$staged,
        'module=s' => \$module,
-       'thrflavour=s' => \$thrflavour,
-       'nothrflavour=s' => \$nothrflavour,
+       'thrflavour:s' => \$thrflavour,
+       'nothrflavour:s' => \$nothrflavour,
        'mode=s' => \$mode,
        'listmodules=s' => \$listmodules,
        'version=s' => \$version,
@@ -117,10 +184,10 @@ my @opts = (
        'lb-tag=s' => \$lb_tag,
        'lbjp-common-tag=s' => \$lbjp_tag,
        'jp-tag=s' => \$jp_tag,
-       'security-tag=s' => \$sec_tag,
        'jobid-tag=s' => \$jobid_tag,
        'help' => \$help,
        'libdir=s' => \$libdir,
+       'emi' => \$emi,
 );
 
 for (@nodes) {
@@ -131,20 +198,26 @@ for (@nodes) {
        push @opts,"enable-$_",\$enable_nodes{$_};
 }
 
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
 push @opts,"with-$_=s",\$jar{$_} for keys %jar;
 
 my @keeparg = @ARGV;
 
 GetOptions @opts or die "Errors parsing command line\n";
 
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+       for $_ (keys %etics_externs_emi) {
+               $etics_externs{$_} = $etics_externs_emi{$_};
+       }
+}
 
 if ($help) { usage(); exit 0; }
 
 if ($listmodules) {
-       my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+       my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
        print "@m\n";
        exit 0;
 }
@@ -164,7 +237,33 @@ die "--enable-* and --disable-* are mutually exclusive\n"
 die "--module cannot be used with --enable-* or --disable-*\n"
        if $module && ($en || $dis);
 
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+       if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+       elsif (defined $externs{$ext}{pkg}) {
+               my ($prefix, $flag);
+               my $pkg = $externs{$ext}{pkg};
+               my $flagname = uc $externs{$ext}{pkg};
+               $flagname =~ s/-[0-9\.]*$//;
+               $flagname =~ s/-/_/g;
+
+               print "Checking $pkg ... ";
+               `pkg-config "$pkg" --exists >/dev/null`;
+               if ($? == 0) {
+                       $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+                       chomp $externs{$ext}{prefix};
+                       print "$externs{$ext}{prefix}\n";
+
+                       $flag=`pkg-config $pkg --cflags`;
+                       $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+                       $flag=`pkg-config $pkg --libs`;
+                       $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+               } else {
+                       print "(using default $externs{$ext}{prefix})\n";
+               }
+       }
+} }
 
 if ($dis) {
        for (@nodes) {
@@ -181,7 +280,7 @@ $stagedir = $prefix unless $stagedir;
 if ($mode eq 'build') {
        print "Writing config.status\n";
        open CONF,">config.status" or die "config.status: $!\n";
-       print CONF "$0 @keeparg\n";
+       print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
        close CONF;
 }
 
@@ -227,8 +326,9 @@ sub mode_build {
        @myjars = keys %aux;
        
        print "\nRequired externals:\n";
-       print "\t$_: $extern_prefix{$_}\n" for @ext;
+       print "\t$_: $externs{$_}{prefix}\n" for @ext;
        print "\t$_: $jar{$_}\n" for @myjars;
+       for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
        print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
        
        mkinc($_) for @modules;
@@ -295,13 +395,6 @@ sub mode_checkout() {
                                }
                         }
                }
-               if ($sec_tag){
-                       for (@{$lbmodules{security}}){
-                               if ("security.".$_ eq $module){
-                                        $tag = '-r '.$sec_tag;
-                                }
-                       }
-               }
                if ($jobid_tag){
                        for (@{$lbmodules{jobid}}){
                                if ("jobid.".$_ eq $module){
@@ -343,7 +436,6 @@ BEGIN{
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
        'lbjp-common.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
        'lbjp-common.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
-       'security.proxyrenewal' =>  [ qw/voms globus:B myproxy/ ],
        'jobid.api-c' =>  [ qw/cppunit:B/ ],
        'jobid.api-cpp' =>  [ qw/cppunit:B/ ],
        'jobid.api-java' =>  [ qw/ant:B jdk:B/ ],
@@ -354,6 +446,10 @@ BEGIN{
         'jp.server-common' => [],
         'jp.ws-interface' => [],
        'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+       'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+       'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+       'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+       'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -435,7 +531,6 @@ for my $jar (keys %need_jars) {
        'lbjp-common.trio' => [ qw// ],
        'lbjp-common.gss' =>  [ qw// ],
        'lbjp-common.gsoap-plugin' =>  [ qw/lbjp-common.gss/ ],
-       'security.proxyrenewal' =>  [ qw// ],
        'jobid.api-c' =>  [ qw// ],
        'jobid.api-cpp' =>  [ qw/jobid.api-c/ ],
        'jobid.api-java' =>  [ qw// ],
@@ -467,6 +562,11 @@ for my $jar (keys %need_jars) {
        'jp.ws-interface' => [ qw// ],
 
        'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+       'px.proxyrenewal' => [ qw// ],
+       'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+       'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+       'px.myproxy-config' => [],
 );
 
 for my $ext (keys %deps_aux) {
@@ -491,6 +591,9 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+       'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+       'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
        'lbjp-common.gss' => [ qq/glite-security-gss/ ],
        'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
 );
@@ -501,7 +604,7 @@ for my $ext (keys %deps_aux) {
        'jobid' => 'org.glite',
        'lbjp-common' => 'org.glite',
        'gridsite' => 'org',
-       'security' => 'org.glite',
+       'px' => 'org.glite',
 );
 
 %conf_prefix = (
@@ -510,7 +613,16 @@ for my $ext (keys %deps_aux) {
        'jobid' => 'glite-',
        'lbjp-common' => 'glite-',
        'gridsite' => '',
-       'security' => 'glite-',
+       'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+       'lb' => 'emi-',
+       'jp' => 'emi-',
+       'jobid' => 'emi-',
+       'lbjp-common' => 'emi-',
+       'gridsite' => '',
+       'px' => 'emi-',
 );
 
 my @k = keys %deps_aux;
@@ -536,8 +648,9 @@ sub mkinc
 lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
 lbjp-common.gss lbjp-common.gsoap-plugin
 jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
 /;
        @aux{@m} = (1) x ($#m+1);
 
@@ -574,7 +687,8 @@ libdir = $libdir
 };
 
        for (@{$need_externs{$short}}) {
-               print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+               print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+               print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
        }
 
        for (@{$need_jars{$short}}) {
@@ -589,13 +703,13 @@ libdir = $libdir
        close MKINC;
 }
 
-my %etics_externs;
-my %etics_projects;
 BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
-               myproxy=>'myproxy',
+               'myproxy-essentials'=>'myproxy_essentials',
+               'myproxy-server'=>'myproxy_server',
+               'myproxy-client'=>'myproxy_client',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -615,10 +729,20 @@ BEGIN{
                apr=>'apr-dev',
                aprutil=>'aprutil-dev',
        );
+       %etics_externs_emi = (
+               globus_essentials=>'globus-gssapi-gsi',
+               globus=>'globus-gssapi-gsi-devel',
+               gridsite=>'emi.gridsite.shared',
+               yaim_core=>'emi.yaim.yaim-core'
+       );
        %etics_projects = (
                vdt=>[qw/globus globus_essentials myproxy/],
                'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
        );
+       %etics_projects_emi = (
+               vdt=>'externs',
+               'org.glite'=>'emi',
+       );
 
        %platform_properties = (
                'gridsite.core' => {
@@ -666,30 +790,45 @@ sub mode_etics {
        for (@{$need_externs{"$subsys.$module"}}) {
            if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
-               push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+               if ($emi) {
+                       if ($ge{$_} and not defined $externs{$_}{pkg}) {
+                               push @copts, "--with-$_=\${stageDir}";
+                       }
+               } else {
+                       push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+               }
            }
        }
 
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
        }
 
        my $conf;
        my $conftag;
+       my ($confprefix, $nameprefix);
 
        $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+       $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+       $nameprefix = $confprefix;
+       $nameprefix =~ s/-$//;
+       $nameprefix =~ s/-/\./g;
+
        if ($branch) {
-               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conf = "$confprefix${subsys}-${module}_$branch"; 
                $conftag = $branch;
                # forced low age number
                $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+               $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
 # XXX: gridsite hack
-               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : 
+                       "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
@@ -728,7 +867,13 @@ sub mode_etics {
 
        if ($subsys eq 'gridsite') {
                if ($module eq 'core') {
-                       my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       my $flags;
+
+                       if ($emi) {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+                       } else {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       }
 
                        $cmd{compile} = "make $flags build";
                        $cmd{install} = "make $flags install";
@@ -738,8 +883,13 @@ sub mode_etics {
                        $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
                }
        }
+       elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+               $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+       }
        else {
-               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+               my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+               $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
                $cmd{compile} = 'make';
                $cmd{test} = 'make check';
                $cmd{install} = 'make install';
@@ -751,23 +901,20 @@ sub mode_etics {
                $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
        }
 
-       my $checkoutcmd;
-       if ($conftag eq 'HEAD') {
-               $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
-       } else {
-               $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
-       }
+       my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+       $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
 displayName = $conf
 description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
 age = $age
 deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
 tag = $conftag
 version = $major.$minor.$rev
 $dwpath
@@ -800,8 +947,9 @@ $buildroot
 aprSuffix = 0
 package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
 package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
@@ -828,6 +976,9 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
                my $proj = 'externals';
                for my $p (keys %etics_projects) {
+                       if ($emi and defined $etics_projects_emi{$p}) {
+                               $p = $etics_projects_emi{$p};
+                       }
                        for $m (@{$etics_projects{$p}}) {
                                $proj = $p if $m eq $_;
                        }
@@ -839,7 +990,7 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
        for (@{$deps{"$subsys.$module"}}) {
                my $type = $deps_type{"$subsys.$module"}->{$_};
-               print C "org.glite|org.glite.$_ = $type\n";
+               print C "$projectname|$projectname.$_ = $type\n";
        }
 
        close C;
@@ -848,12 +999,13 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 sub gsoap_version {
        local $_;
        my $gsoap_version;
-       open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+       open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
 
        while ($_ = <S>) {
                chomp;
 
                $gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+               $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
        }
        close S;
        return $gsoap_version;
@@ -910,7 +1062,7 @@ sub getlibdir {
 }
 
 sub usage {
-       my @ext = keys %extern_prefix;
+       my @ext = keys %externs;
        my @myjars, keys %jar;
 
        print STDERR qq{
@@ -925,6 +1077,7 @@ General options (defaults in []):
   --version=maj.min.rev-age    specify version here instead of reading version.properties
   --branch=branch              CVS branch/etics name suffix (HEAD, branch_2_1, ...)
   --libdir=libdir              typically [lib,lib64] postfix
+  --emi                                generate configurations with emi flavor in mode 'etics'
   
 Mode of operation:
   --mode={checkout|build|etics}        what to do [build]
@@ -932,12 +1085,11 @@ Mode of operation:
 What to build:
   --module=module              build this module only (mostly in-Etics operation)
   --enable-NODE                        build this "node" (set of modules) only. Available nodes are
-                                       @{$lbmodules{lb}},@{$lbmodules{security}}
+                                       @{$lbmodules{lb}}
   --disable-NODE               don't build this node
   --lb-tag=tag                 checkout LB modules with specific tag
   --jp-tag=tag                 checkout JP modules with specific tag
   --lbjp-common-tag=tag         checkout lbjp-common modules with specific tag
-  --security-tag=tag           checkout security modules with specific tag
   --jobid-tag=tag              checkout jobid modules with specific tag
 
 Dependencies:
index 0267027..42bd0fa 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/glite/org.glite.lb/project/version.properties,v 1.164 2008/01/09 15:35:55 mmulac Exp $
-module.version=2.1.17
-module.age=2
+module.version=2.1.20
+module.age=1