Merge branch_21 to head.
authorZdeněk Šustr <sustr4@cesnet.cz>
Wed, 8 Sep 2010 09:12:49 +0000 (09:12 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Wed, 8 Sep 2010 09:12:49 +0000 (09:12 +0000)
169 files changed:
org.glite.jobid.api-c/Makefile
org.glite.jobid.api-c/configure
org.glite.jobid.api-c/project/ChangeLog
org.glite.jobid.api-c/project/version.properties
org.glite.jobid.api-c/src/cjobid.c
org.glite.jobid.api-cpp/Makefile
org.glite.jobid.api-cpp/configure
org.glite.jobid.api-cpp/project/ChangeLog
org.glite.jobid.api-cpp/project/version.properties
org.glite.jobid.api-java/Makefile
org.glite.jobid.api-java/configure
org.glite.jobid.api-java/project/ChangeLog
org.glite.jobid.api-java/project/version.properties
org.glite.jobid/project/version.properties
org.glite.lb.client-java/Makefile
org.glite.lb.client-java/configure
org.glite.lb.client-java/project/ChangeLog
org.glite.lb.client-java/project/package.description
org.glite.lb.client-java/project/version.properties
org.glite.lb.client-java/src_c/Makefile
org.glite.lb.client/Makefile
org.glite.lb.client/configure
org.glite.lb.client/examples/gen_begin
org.glite.lb.client/examples/job_reg.c
org.glite.lb.client/examples/stats-duration-fromto.c [new file with mode: 0644]
org.glite.lb.client/examples/stats.c
org.glite.lb.client/interface/statistics.h
org.glite.lb.client/m4/glite_lb.m4
org.glite.lb.client/m4/glite_lb_client.m4 [deleted file]
org.glite.lb.client/project/ChangeLog
org.glite.lb.client/project/version.properties
org.glite.lb.client/src/notify.c
org.glite.lb.client/src/perftest_jobreg.c
org.glite.lb.client/src/producer.c
org.glite.lb.client/src/statistics.c
org.glite.lb.common/Makefile
org.glite.lb.common/configure
org.glite.lb.common/interface/context-int.h
org.glite.lb.common/interface/xml_conversions.h
org.glite.lb.common/interface/xml_parse.h
org.glite.lb.common/project/ChangeLog
org.glite.lb.common/project/version.properties
org.glite.lb.common/src/lb_perftest.c
org.glite.lb.common/src/param.c
org.glite.lb.common/src/xml_conversions.c
org.glite.lb.common/src/xml_parse.c.T
org.glite.lb.doc/Makefile
org.glite.lb.doc/configure
org.glite.lb.doc/project/ChangeLog
org.glite.lb.doc/project/version.properties
org.glite.lb.doc/src/LBAG-Installation.tex
org.glite.lb.doc/src/LBAG-Running.tex
org.glite.lb.doc/src/LBAG.tex
org.glite.lb.doc/src/LBTP-Tests.tex
org.glite.lb.doc/src/LBUG-Introduction.tex
org.glite.lb.doc/src/LBUG.tex
org.glite.lb.doc/src/change_acl.tex
org.glite.lb.doc/src/components.tex
org.glite.lb.doc/src/definitions.tex
org.glite.lb.doc/src/faq.tex [new file with mode: 0644]
org.glite.lb.doc/src/versions.tex
org.glite.lb.glite-LB/Makefile
org.glite.lb.glite-LB/configure
org.glite.lb.glite-LB/project/ChangeLog
org.glite.lb.glite-LB/project/version.properties
org.glite.lb.harvester/Makefile
org.glite.lb.harvester/configure
org.glite.lb.harvester/project/ChangeLog
org.glite.lb.harvester/project/version.properties
org.glite.lb.harvester/src/harvester.c
org.glite.lb.logger-msg/configure
org.glite.lb.logger/Makefile
org.glite.lb.logger/configure
org.glite.lb.logger/doc/glite-lb-interlogd.8
org.glite.lb.logger/doc/glite-lb-logd.8
org.glite.lb.logger/project/ChangeLog
org.glite.lb.logger/project/version.properties
org.glite.lb.logger/src/event_queue.c
org.glite.lb.logger/src/il_error.c
org.glite.lb.server/Makefile
org.glite.lb.server/config/startup
org.glite.lb.server/configure
org.glite.lb.server/doc/glite-lb-bkserverd.8
org.glite.lb.server/project/ChangeLog
org.glite.lb.server/project/version.properties
org.glite.lb.server/src/bkindex.c
org.glite.lb.server/src/bkserverd.c
org.glite.lb.server/src/il_notification.c
org.glite.lb.server/src/jobstat.c
org.glite.lb.server/src/lb_proto.c
org.glite.lb.server/src/lb_xml_parse.c.T
org.glite.lb.server/src/lb_xml_parse.h
org.glite.lb.server/src/notif_match.c
org.glite.lb.server/src/notification.c
org.glite.lb.server/src/stats.c
org.glite.lb.server/src/stats.h
org.glite.lb.server/src/store.c.T
org.glite.lb.state-machine/Makefile
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/Makefile
org.glite.lb.types/configure
org.glite.lb.types/events.T
org.glite.lb.types/project/ChangeLog
org.glite.lb.types/project/version.properties
org.glite.lb.utils/Makefile
org.glite.lb.utils/configure
org.glite.lb.utils/project/ChangeLog
org.glite.lb.utils/project/version.properties
org.glite.lb.utils/src/dump.c
org.glite.lb.utils/src/load.c
org.glite.lb.utils/src/purge.c
org.glite.lb.ws-interface/Makefile
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/Makefile
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/Makefile
org.glite.lb.yaim/config/defaults/glite-lb.pre
org.glite.lb.yaim/config/functions/config_glite_lb
org.glite.lb.yaim/config/functions/config_info_service_lb
org.glite.lb.yaim/configure
org.glite.lb.yaim/project/ChangeLog
org.glite.lb.yaim/project/version.properties
org.glite.lb/configure
org.glite.lb/etics-tag-branch.pl
org.glite.lb/etics-tag-gridsite.pl [new file with mode: 0644]
org.glite.lb/etics-tag-with-subsystems-branch.pl
org.glite.lb/etics-tag-with-subsystems.pl
org.glite.lb/etics-tag.pl
org.glite.lb/generate-properties.pl [new file with mode: 0644]
org.glite.lb/project/version.properties
org.glite.lbjp-common.db/Makefile
org.glite.lbjp-common.db/configure
org.glite.lbjp-common.db/project/ChangeLog
org.glite.lbjp-common.db/project/version.properties
org.glite.lbjp-common.gsoap-plugin/Makefile
org.glite.lbjp-common.gsoap-plugin/configure
org.glite.lbjp-common.gss/Makefile
org.glite.lbjp-common.gss/configure
org.glite.lbjp-common.jp-interface/Makefile
org.glite.lbjp-common.jp-interface/configure
org.glite.lbjp-common.jp-interface/project/ChangeLog
org.glite.lbjp-common.jp-interface/project/package.description
org.glite.lbjp-common.jp-interface/project/version.properties
org.glite.lbjp-common.log/Makefile
org.glite.lbjp-common.log/configure
org.glite.lbjp-common.log/project/ChangeLog
org.glite.lbjp-common.log/project/version.properties
org.glite.lbjp-common.maildir/Makefile
org.glite.lbjp-common.maildir/configure
org.glite.lbjp-common.maildir/project/ChangeLog
org.glite.lbjp-common.maildir/project/version.properties
org.glite.lbjp-common.server-bones/Makefile
org.glite.lbjp-common.server-bones/configure
org.glite.lbjp-common.server-bones/project/ChangeLog
org.glite.lbjp-common.server-bones/project/package.description
org.glite.lbjp-common.server-bones/project/version.properties
org.glite.lbjp-common.server-bones/src/srvbones.c
org.glite.lbjp-common.trio/Makefile
org.glite.lbjp-common.trio/configure
org.glite.lbjp-common.trio/project/ChangeLog
org.glite.lbjp-common.trio/project/package.description
org.glite.lbjp-common.trio/project/version.properties
org.glite.lbjp-common/project/version.properties

index a559056..6a06d63 100644 (file)
@@ -67,8 +67,9 @@ base64_test: %: %.cpp compile
        ${LINKXX} -o $@ $@.o ${LIB} ${TEST_LIBS}
 
 clean:
-       rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h
-       rm -rvf log.xml project rpmbuild RPMS tgz
+       rm -rvf *.o *.lo .libs/ lib* *.c *.cpp *.h
+       rm -vf base64_test base64_test.xml
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 install: ${LIB}
        mkdir -p ${PREFIX}/${libdir}
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 1b7907f..fa037ff 100644 (file)
 - Generic lbdir settings in the Makefile
 - Fixed package description and summary
 
+1.0.3-1
+- Fix library versioning
+
+1.0.4-1
+- Fixed libtool version numbering
+
+1.0.5-1
+- Fixed target 'clean' in the Makefile
+
+1.0.6-1
+- Support for IPv6 literal addresses
+- Fixed notification ID parsing
+
index 63f734c..f1bdbc3 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.jobid.api-c/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $
-module.version=1.0.2
+module.version=1.0.6
 module.age=1
index 3c8631d..bfd4203 100644 (file)
@@ -84,7 +84,7 @@ int glite_jobid_recreate(const char* bkserver, int port, const char *unique, gli
         return EINVAL;
 
     out->BShost = strdup(bkserver);
-    portbeg = strchr(out->BShost, ':');
+    portbeg = strrchr(out->BShost, ':');
     if (portbeg) {
        *portbeg = 0;
         /* try to get port number */
@@ -164,11 +164,14 @@ int glite_jobid_parse(const char *idString, glite_jobid_t *jobId)
 
     pom = strdup(idString + sizeof(GLITE_JOBID_PROTO_PREFIX) - 1);
     pom1 = strchr(pom, '/');
-    pom2 = strchr(pom, ':');
 
     if (!pom1) { free(pom); free(out); return EINVAL; }
+    pom1[0] = '\0';
 
-    if ( pom2 && (pom1 > pom2)) {
+    pom2 = strrchr(pom, ':');
+    if (pom2 && strchr(pom2,']')) pom2 = NULL;
+
+    if ( pom2 ) {
        pom[pom2-pom]     = '\0';
        out->BShost  = strdup(pom);
        pom[pom1-pom]     = '\0';
index b35b7b8..9f25c7c 100644 (file)
@@ -43,7 +43,7 @@ check: compile
 
 clean:
        rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h
-       rm -rvf log.xml project rpmbuild RPMS tgz
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 install: 
        mkdir -p ${PREFIX}/include/${globalprefix}/${jobidprefix}
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 55c1bc7..9d98118 100644 (file)
 1.0.0-5
 - module rebuilt
 
+1.0.0-6
+- module rebuilt
+
+1.0.1-1
+- Fixed target 'clean' in the Makefile
+1.0.1-2
+- Module rebuilt
+
index 701dfc2..62a0db9 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/glite/org.glite.jobid.api-cpp/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $
-module.version=1.0.0
-module.age=5
+module.version=1.0.1
+module.age=2
index af36ad7..b920e6c 100644 (file)
@@ -1,7 +1,7 @@
 -include Makefile.inc
 
 all compile:
-       ${ant_prefix}/bin/ant -Dfile.reference.commons-codec.jar=${commons-codec_jar}
+       ${ant_prefix}/bin/ant -Dfile.reference.commons-codec.jar=${jakarta-commons-codec_jar}
 
 install:
        mkdir -p ${PREFIX}/share/java
@@ -10,4 +10,5 @@ install:
 check:
 
 clean:
-       echo TODO
+       ${ant_prefix}/bin/ant clean
+       rm -rvf log.xml project/glite-jobid-api-java.spec rpmbuild/ RPMS/ tgz/ debian/
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 97824c2..10c30e7 100644 (file)
@@ -1,3 +1,12 @@
 1.0.1-1
 - Initial release of the api-java module
 
+1.0.2-1
+- Fixed target 'clean' in the Makefile
+
+1.0.3-1
+- Target 'clean' fixed to handle debian builds as well
+
+1.0.3-2
+- Module rebuilt
+
index 5eb8cb0..538be4c 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/glite/org.glite.jobid.api-java/project/version.properties,v 1.5 2009/01/20 17:25:13 akrenek Exp $
-module.version=1.0.1
-module.age=1
+module.version=1.0.3
+module.age=2
index 63f734c..f1bdbc3 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.jobid.api-c/project/version.properties,v 1.1 2009/01/16 08:48:52 zsustr Exp $
-module.version=1.0.2
+module.version=1.0.6
 module.age=1
index ea32734..312a913 100644 (file)
@@ -22,7 +22,7 @@ all compile: genevents genws compile-java build-jar examples build-c
 
 compile-java:
        ${JAVAC} \
-               -classpath ${commons-lang_jar}:${stagedir}/share/java/jobid-api-java.jar:${trustmanager_classpath}:${utiljava_prefix}/share/java/glite-security-util-java.jar:${axis_classpath} \
+               -classpath ${jakarta-commons-lang_jar}:${stagedir}/share/java/jobid-api-java.jar:${trustmanager_classpath}:${utiljava_prefix}/share/java/glite-security-util-java.jar:${axis_classpath} \
                -d build \
                src/org/glite/lb/*.java \
                build/gen/*.java \
@@ -43,7 +43,7 @@ build-c:
        ${JAVAH} -classpath build -jni -d build org.glite.lb.ContextIL
        -mkdir -p build/c
        -ln -s ../../src_c/Makefile build/c
-       cd build/c && make PREFIX=${PREFIX} JAVA_HOME=${jdk_prefix} topdir=../..
+       cd build/c && $(MAKE) PREFIX=${PREFIX} JAVA_HOME=${jdk_prefix} topdir=../..
 
 examples: build/examples
 
@@ -75,10 +75,11 @@ install:
        mkdir -p ${PREFIX}/share/java
        cp build/lb-client-java.jar ${PREFIX}/share/java
        cp build/examples/lb-client-java-examples.jar ${PREFIX}/share/java
-       cd build/c && make install PREFIX=${PREFIX}
+       cd build/c && $(MAKE) install PREFIX=${PREFIX}
 
 clean:
        rm -rf build
-       cd src_c && make clean
+       cd src_c && $(MAKE) clean
+       rm -rvf log.xml project/org.glite.lb.client-java.spec rpmbuild/ RPMS/ tgz/ debian/
 
 .PHONY: all compile compile-java build-jar build-c examples genevents genws check install clean
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index c0e4d4b..39665e6 100644 (file)
@@ -3,3 +3,14 @@
 
 1.0.2-1
 - Fixed time zone in UTC times in events
+
+1.0.3-1
+- Improved portability
+
+1.0.4-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- Fixed format of the package description file
+
+1.0.4-2
+- Module rebuilt
+
index 7b62601..40fc623 100644 (file)
@@ -1,4 +1 @@
-JAVA implemantation of the L&B service client. Supports producing (logging)
-events into L&B, event and job status queries, and receiving notifications.
-
-
+JAVA implemantation of the L&B service client. Supports producing (logging) events into L&B, event and job status queries, and receiving notifications.
index 6e76ae4..2124d30 100755 (executable)
@@ -4,6 +4,8 @@
 CC=gcc
 PATH_TO_JAVA=${JAVA_HOME}
 
+OS=$(shell uname | tr '[:upper:]' '[:lower:]')
+
 LIB=libglite_lb_sendviasocket.la
 OBJ=send_via_socket.lo
 
@@ -15,7 +17,7 @@ ${LIB}: ${OBJ}
        libtool --mode=link ${CC} -rpath ${PREFIX}/${libdir} -o $@ ${OBJ}
 
 %.lo: %.c
-       libtool --mode=compile ${CC} -I.. -I${PATH_TO_JAVA}/include -I${PATH_TO_JAVA}/include/linux -c $<
+       libtool --mode=compile ${CC} -I.. -I${PATH_TO_JAVA}/include -I${PATH_TO_JAVA}/include/$(OS) -c $<
 
 install: compile
        -mkdir -p ${PREFIX}/${libdir}
index 9847276..700e01f 100644 (file)
@@ -93,7 +93,7 @@ COMMON_LIB:=-lglite_lb_common_${nothrflavour}
 COMMON_LIB_THR:=-lglite_lb_common_${thrflavour}
 TRIO_LIB:=-lglite_lbu_trio
 
-CFLAGS:=${DEBUG} \
+CFLAGS:=${CFLAGS} ${DEBUG} \
        -I. \
        -I${top_srcdir}/src -I${top_srcdir}/interface \
        -I${stagedir}/include \
@@ -108,7 +108,7 @@ EXT_LIB:=
 TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
 TEST_INC:=-I${cppunit_prefix}/include
 
-LDFLAGS:=-L${stagedir}/${libdir} ${COVERAGE_FLAGS}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} ${COVERAGE_FLAGS}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS}
@@ -140,7 +140,7 @@ PLUSLIB:=libglite_lb_clientpp_${nothrflavour}.la
 THRPLUSLIB:=libglite_lb_clientpp_${thrflavour}.la
 
 TOOLS:=${LB_PERF_TOOLS}
-EXAMPLES_SRC:=log_usertag_proxy.c job_log.c job_reg.c feed_shark.c query_ext.c query_seq_code.c stats.c abort_job.c change_acl.c stresslog.c flood_proxy.c dagids.c stress_context.c parse_eventsfile.c test_changed_jdl.c done_failed_events.c
+EXAMPLES_SRC:=log_usertag_proxy.c job_log.c job_reg.c feed_shark.c query_ext.c query_seq_code.c stats.c stats-duration-fromto.c abort_job.c change_acl.c stresslog.c flood_proxy.c dagids.c stress_context.c parse_eventsfile.c test_changed_jdl.c done_failed_events.c
 EXAMPLES:=${EXAMPLES_SRC:.c=}
 
 # TODO: migrate them here from branch_RC31_3
@@ -346,15 +346,14 @@ endif
        ${INSTALL} -m 755 ${top_srcdir}/examples/sandbox_transfers.sh ${PREFIX}/examples/glite-lb-sandbox_transfers.sh
        ${INSTALL} -m 644 ${MAN_GZ} ${PREFIX}/share/man/man1
        ${INSTALL} -m 644 ${MAN8_GZ} ${PREFIX}/share/man/man8
-       sed "s/%LIBDIR%/${libdir}/" ${top_srcdir}/m4/glite_lb_client.m4 > glite_lb_client.m4
-       ${INSTALL} -m 644 glite_lb_client.m4 ${PREFIX}/share/build/m4/
+       ${INSTALL} -m 644 ${top_srcdir}/m4/glite_lb.m4 ${PREFIX}/share/build/m4/
 
 clean:
        rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h *.dox producer_test notify C/ CPP/
        rm -rvf ${LIB} ${THRLIB} ${TOOLS} logevent  register_sandbox ${PLUSLIB} ${THRPLUSLIB} ${MAN_GZ} ${MAN8_GZ}
        rm -rvf ${EXAMPLES} ${EXAMPLES_CL} ${EXAMPLES_CL_THR} ${sh_PROGS}
        rm -f EventAttrNames.pl
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 check_version:
        ${CHECK_VERSION} ${stagedir}/include/glite/lb/common_version.h
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 6e7cb13..feb13c2 100755 (executable)
@@ -9,13 +9,13 @@
 # You may obtain a copy of the License at
 # 
 #     http://www.apache.org/licenses/LICENSE-2.0
-# 
+#        
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+
 
 if test ! -z "$FAKE"; then
        SUFFIX="_fake"
index d079be1..6cdd141 100644 (file)
@@ -35,14 +35,14 @@ extern int opterr,optind;
 
 static void usage(char *me)
 {
-       fprintf(stderr,"usage: %s [-m bkserver] [-x|-X non-default_sock_path] [-j dg_jobid] [-s source_id] [-n num_subjobs [-S][-C]] [-P] [-l jdl_file] [-e seed]\n", me);
+       fprintf(stderr,"usage: %s [-m bkserver] [-x|-X non-default_sock_path] [-j dg_jobid] [-s source_id] [-n num_subjobs [-S][-C]] [-P] [-l jdl_file] [-e seed] [-E]\n", me);
 }
 
 int main(int argc, char *argv[])
 {
        char *src = NULL,*job = NULL,*server = NULL,*seq,*jdl = NULL, *seed = NULL;
        int lbproxy = 0;
-       int done = 0,num_subjobs = 0,reg_subjobs = 0,i, collection = 0, pbs=0, cream=0, type;
+       int done = 0,num_subjobs = 0,reg_subjobs = 0,i, collection = 0, pbs=0, cream=0, type, flags=0;
        edg_wll_Context ctx;
        edg_wlc_JobId   jobid,*subjobs;
 
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
        opterr = 0;
 
        do {
-               switch (getopt(argc,argv,"xX:s:j:m:n:SCl:e:Pc")) {
+               switch (getopt(argc,argv,"xX:s:j:m:n:SCl:e:PcE")) {
                        case 'x': lbproxy = 1; break;
                        case 'X': lbproxy = 1; 
                                  edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_STORE_SOCK, optarg);
@@ -66,6 +66,7 @@ int main(int argc, char *argv[])
                        case 'c': cream = 1; break;
                        case 'l': jdl = (char *) strdup(optarg); break;
                        case 'e': seed = strdup(optarg); break;
+                       case 'E': flags = flags | EDG_WLL_LOGLFLAG_EXCL; break;
                        case '?': usage(argv[0]); exit(EINVAL);
                        case -1: done = 1; break;
                }
@@ -137,6 +138,19 @@ int main(int argc, char *argv[])
                        exit(1);
                }
        } else {
+               
+               if (flags) {
+                       //printf("Registering with edg_wll_RegisterJobExt(). Flags = %d\n", flags);
+                       if (edg_wll_RegisterJobExt(ctx,jobid,type,
+                               jdl ? jdl : "blabla", "NS",
+                               num_subjobs,seed,&subjobs,NULL,flags))
+                       {
+                               char    *et,*ed;
+                               edg_wll_Error(ctx,&et,&ed);
+                               fprintf(stderr,"edg_wll_RegisterJobExt(%s): %s (%s)\n",job,et,ed);
+                               exit(1);
+                       }
+               } else {
                if (edg_wll_RegisterJobSync(ctx,jobid,type,
                        jdl ? jdl : "blabla", "NS",
                        num_subjobs,seed,&subjobs))
@@ -146,6 +160,7 @@ int main(int argc, char *argv[])
                        fprintf(stderr,"edg_wll_RegisterJobSync(%s): %s (%s)\n",job,et,ed);
                        exit(1);
                }
+               }
        }
 
        seq = edg_wll_GetSequenceCode(ctx);
diff --git a/org.glite.lb.client/examples/stats-duration-fromto.c b/org.glite.lb.client/examples/stats-duration-fromto.c
new file mode 100644 (file)
index 0000000..62f1eb2
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+See http://www.eu-egee.org/partners for details on the copyright holders.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+
+#ifdef BUILDING_LB_CLIENT
+#include "statistics.h"
+#else
+#include "glite/lb/statistics.h"
+#endif
+
+
+int main(int argc,char **argv)
+{
+       edg_wll_Context ctx;
+       edg_wll_QueryRec        group[2];
+       time_t  now,from,to;
+       char    *cfrom,*cto;
+       int     from_res,to_res;
+       float   *durations, *dispersions;
+       char    **groups;
+       int     i;
+
+       edg_wll_InitContext(&ctx);
+
+       if (argc < 3) { 
+               fprintf(stderr,"usage: %s CE state_from state_to\n",argv[0]);
+               return 1;
+       }       
+
+/* the only supported grouping for now */
+       group[0].attr = EDG_WLL_QUERY_ATTR_DESTINATION;
+       group[0].op = EDG_WLL_QUERY_OP_EQUAL;
+       if (strcmp(argv[1], "ALL"))
+               group[0].value.c = argv[1];
+       else
+               group[0].value.c = NULL;
+       group[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
+
+
+       time(&now);
+        to = now;
+        from = now - 600;
+
+       if (edg_wll_StateDurationsFromTo(ctx,group,atoi(argv[2]),atoi(argv[3]),
+               argc >=5 ? atoi(argv[4]) : 0, &from,&to,&durations,&dispersions,
+               &groups,&from_res,&to_res))
+       {
+               char    *et,*ed;
+               edg_wll_Error(ctx,&et,&ed);
+               fprintf(stderr,"edg_wll_StateRate(): %s, %s\n",et,ed);
+               return 1;
+       }
+
+       cfrom = strdup(ctime(&from));
+       cto = strdup(ctime(&to));
+       cfrom[strlen(cfrom)-1] = 0;
+       cto[strlen(cto)-1] = 0;
+
+       for (i = 0; groups[i]; i++)
+               printf("Average duration at \"%s\": %f s\n"
+                      "Dispersion index: %f\n"
+                      "  Measuered from %s to %s\n"
+                      "  With resolution from %d to %d s\n",
+                      /*argv[1]*/groups[i],durations[i],dispersions[i],cfrom,
+                       cto,from_res,to_res);
+
+       free(durations);
+       free(dispersions);
+       for (i = 0; groups[i]; i++)
+               free(groups[i]);
+       free(groups);
+
+       return 0;
+}
+
index 14e273a..32eeef1 100644 (file)
@@ -34,8 +34,10 @@ int main(int argc,char **argv)
        time_t  now,from,to;
        char    *cfrom,*cto;
        int     from_res,to_res,argOK = 3, era = 60;
-       float   val;
        int     CEidx = 1, MAJidx = 2, MINidx = 3; 
+       float   *vals;
+       char    **groups;
+       int     i;
 
 
        edg_wll_InitContext(&ctx);
@@ -57,7 +59,10 @@ int main(int argc,char **argv)
 /* the only supported grouping for now */
        group[0].attr = EDG_WLL_QUERY_ATTR_DESTINATION;
        group[0].op = EDG_WLL_QUERY_OP_EQUAL;
-       group[0].value.c = argv[CEidx];
+       if (strcmp(argv[CEidx], "ALL"))
+               group[0].value.c = argv[CEidx];
+       else
+               group[0].value.c = NULL;
        group[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
 
 
@@ -90,8 +95,8 @@ int main(int argc,char **argv)
        to = now;
        from = now - 60;
 
-       if (edg_wll_StateRate(ctx,group,atoi(argv[MAJidx]),argc >= (argOK+1) ? atoi(argv[MINidx]) : 0,
-                               &from,&to,&val,&from_res,&to_res))
+       if (edg_wll_StateRates(ctx,group,atoi(argv[MAJidx]),argc >= (argOK+1) ? atoi(argv[MINidx]) : 0,
+                               &from,&to,&vals,&groups,&from_res,&to_res))
        {
                char    *et,*ed;
                edg_wll_Error(ctx,&et,&ed);
@@ -104,11 +109,16 @@ int main(int argc,char **argv)
        cfrom[strlen(cfrom)-1] = 0;
        cto[strlen(cto)-1] = 0;
 
-       printf("Average failure rate at \"%s\": %f jobs/s\n"
-              "  Measuered from %s to %s\n"
-              "  With resolution from %d to %d s\n",
-              argv[CEidx],val,cfrom,cto,from_res,to_res);
+       for (i = 0; groups[i]; i++)
+               printf("Average failure rate at \"%s\": %f jobs/s\n"
+                      "  Measuered from %s to %s\n"
+                      "  With resolution from %d to %d s\n",
+                       /*argv[1]*/groups[i],vals[i],cfrom,cto,from_res,to_res);
 
+       free(vals);
+       for (i = 0; groups[i]; i++)
+               free(groups[i]);
+       free(groups);
        return 0;
 }
 
index e7c8342..952859d 100644 (file)
@@ -46,29 +46,82 @@ int edg_wll_StateRate(
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *rate,
+       float   *rates,
        int     *res_from,
        int     *res_to
 );
 
+int edg_wll_StateRates(
+        edg_wll_Context context,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     major,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   **rates,
+        char    ***groups,
+        int     *res_from,
+        int     *res_to
+);
 
 /** Compute average time for which jobs stay in the specified state.
  * \see edg_wll_StateRate for description of parameters.
  */
 
 int edg_wll_StateDuration(
+        edg_wll_Context context,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     major,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   *duration,
+        int     *res_from,
+        int     *res_to
+);
+
+int edg_wll_StateDurations(
        edg_wll_Context context,
        const edg_wll_QueryRec  *group,
        edg_wll_JobStatCode     major,
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *duration,
+       float   **durations,
+       char    ***groups,
        int     *res_from,
        int     *res_to
 );
 
+int edg_wll_StateDurationFromTo(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base,
+        edg_wll_JobStatCode     final,
+        int     minor,
+        time_t  *from,
+        time_t  *to,
+        float   *durations,
+        float   *dispersions,
+        int     *res_from,
+        int     *res_to
+);
+
 
+int edg_wll_StateDurationsFromTo(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base,
+        edg_wll_JobStatCode     final,
+        int     minor,
+        time_t  *from,
+        time_t  *to,
+        float   **durations,
+       float   **dispersions,
+       char    ***groups,
+        int     *res_from,
+        int     *res_to
+);
 
 #ifdef __cplusplus
 }
index 0c81292..daf7791 100644 (file)
@@ -54,23 +54,39 @@ dnl - GLITE_STATIC_LB_NOTHR_COMMON_LIBS
 
 AC_DEFUN([AC_GLITE_LB],
 [
+    AC_REQUIRE([AC_GLITE])
     ac_glite_lb_prefix=$GLITE_LOCATION
 
     AC_SEC_GSOAP_PLUGIN
 
-    if test -n "ac_glite_lb_prefix" ; then
+    case $GLITE_LDFLAGS in
+       *lib64* ) 
+               ac_glite_lb_libdir=lib64
+               ;;
+
+       *lib32* ) 
+               ac_glite_lb_libdir=lib32
+               ;;
+
+       * )
+               ac_glite_lb_libdir=lib
+               ;;
+    esac
+
+
+    if test -n "$ac_glite_lb_prefix" ; then
        dnl
        dnl 
        dnl
-        ac_glite_lb_lib="-L$ac_glite_lb_prefix/lib"
+       ac_glite_lb_lib="-L$ac_glite_lb_prefix/$ac_glite_lb_libdir"
        GLITE_LB_THR_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client_$GLOBUS_THR_FLAVOR"
        GLITE_LB_THR_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp_$GLOBUS_THR_FLAVOR"
        GLITE_LB_THR_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common_$GLOBUS_THR_FLAVOR $SEC_GSOAP_PLUGIN_GSS_THR_LIBS"
        GLITE_LB_NOTHR_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client_$GLOBUS_NOTHR_FLAVOR"
        GLITE_LB_NOTHR_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR"
         GLITE_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common_$GLOBUS_NOTHR_FLAVOR $SEC_GSOAP_PLUGIN_GSS_NOTHR_LIBS"
-       GLITE_STATIC_LB_NOTHR_CLIENT_LIBS="$ac_glite_lb_prefix/lib/libglite_lb_client_$GLOBUS_NOTHR_FLAVOR.a"
-        GLITE_STATIC_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_prefix/lib/libglite_lb_common_$GLOBUS_NOTHR_FLAVOR.a $SEC_GSOAP_PLUGIN_GSS_STATIC_NOTHR_LIBS"
+       GLITE_STATIC_LB_NOTHR_CLIENT_LIBS="$ac_glite_lb_prefix/$ac_glite_lb_libdir/libglite_lb_client_$GLOBUS_NOTHR_FLAVOR.a"
+       GLITE_STATIC_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_prefix/$ac_glite_lb_libdir/libglite_lb_common_$GLOBUS_NOTHR_FLAVOR.a $SEC_GSOAP_PLUGIN_GSS_STATIC_NOTHR_LIBS"
        ifelse([$2], , :, [$2])
     else
        GLITE_LB_THR_CLIENT_LIBS=""
diff --git a/org.glite.lb.client/m4/glite_lb_client.m4 b/org.glite.lb.client/m4/glite_lb_client.m4
deleted file mode 100755 (executable)
index f04dca8..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-dnl Usage:
-dnl AC_GLITE_LB
-dnl - GLITE_LB_THR_CLIENT_LIBS
-dnl - GLITE_LB_THR_CLIENTPP_LIBS
-dnl - GLITE_LB_THR_COMMON_LIBS
-dnl - GLITE_LB_NOTHR_CLIENT_LIBS
-dnl - GLITE_LB_NOTHR_CLIENTPP_LIBS
-dnl - GLITE_LB_NOTHR_COMMON_LIBS
-dnl - GLITE_STATIC_LB_NOTHR_CLIENT_LIBS
-dnl - GLITE_STATIC_LB_NOTHR_COMMON_LIBS
-
-AC_DEFUN([AC_GLITE_LB],
-[
-    ac_glite_lb_prefix=$GLITE_LOCATION
-
-    AC_SEC_GSOAP_PLUGIN
-
-    if test -n "ac_glite_lb_prefix" ; then
-       dnl
-       dnl 
-       dnl
-        ac_glite_lb_lib="-L$ac_glite_lb_prefix/%LIBDIR%"
-       GLITE_LB_THR_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client_$GLOBUS_THR_FLAVOR"
-       GLITE_LB_THR_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp_$GLOBUS_THR_FLAVOR"
-       GLITE_LB_THR_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common_$GLOBUS_THR_FLAVOR $SEC_GSOAP_PLUGIN_GSS_THR_LIBS"
-       GLITE_LB_NOTHR_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client_$GLOBUS_NOTHR_FLAVOR"
-       GLITE_LB_NOTHR_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR"
-        GLITE_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common_$GLOBUS_NOTHR_FLAVOR $SEC_GSOAP_PLUGIN_GSS_NOTHR_LIBS"
-       GLITE_STATIC_LB_NOTHR_CLIENT_LIBS="$ac_glite_lb_prefix/%LIBDIR%/libglite_lb_client_$GLOBUS_NOTHR_FLAVOR.a"
-        GLITE_STATIC_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_prefix/%LIBDIR%/libglite_lb_common_$GLOBUS_NOTHR_FLAVOR.a $SEC_GSOAP_PLUGIN_GSS_STATIC_NOTHR_LIBS"
-       ifelse([$2], , :, [$2])
-    else
-       GLITE_LB_THR_CLIENT_LIBS=""
-       GLITE_LB_THR_CLIENTPP_LIBS=""
-       GLITE_LB_THR_COMMON_LIBS=""
-       GLITE_LB_NOTHR_CLIENT_LIBS=""
-       GLITE_LB_NOTHR_CLIENTPP_LIBS=""
-       GLITE_LB_NOTHR_COMMON_LIBS=""
-       GLITE_STATIC_LB_NOTHR_CLIENT_LIBS=""
-        GLITE_STATIC_LB_NOTHR_COMMON_LIBS=""
-       ifelse([$3], , :, [$3])
-    fi
-
-    AC_SUBST(GLITE_LB_THR_CLIENT_LIBS)
-    AC_SUBST(GLITE_LB_THR_CLIENTPP_LIBS)
-    AC_SUBST(GLITE_LB_THR_COMMON_LIBS)
-    AC_SUBST(GLITE_LB_NOTHR_CLIENT_LIBS)
-    AC_SUBST(GLITE_LB_NOTHR_CLIENTPP_LIBS)
-    AC_SUBST(GLITE_LB_NOTHR_COMMON_LIBS)
-    AC_SUBST(GLITE_STATIC_LB_NOTHR_CLIENT_LIBS)
-    AC_SUBST(GLITE_STATIC_LB_NOTHR_COMMON_LIBS)
-])
-
-AC_DEFUN([GLITE_CHECK_LB_CLIENT],
-[AC_MSG_CHECKING([for org.glite.lb.client])
-save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $GLITE_CPPFLAGS"
-save_LDFLAGS=$LDFLAGS
-LDFLAGS="$LDFLAGS $GLITE_LDFLAGS -L$GLOBUS_LOCATION/lib"
-save_LIBS=$LIBS
-
-AC_LANG_PUSH([C])
-
-# prepare the test program, to link against the different combinations
-# of globus flavours
-
-AC_LANG_CONFTEST(
-  [AC_LANG_PROGRAM(
-    [@%:@include "glite/lb/consumer.h"],
-    [edg_wll_QueryEvents(
-      (edg_wll_Context)0,
-      (const edg_wll_QueryRec*)0,
-      (const edg_wll_QueryRec*)0,
-      (edg_wll_Event**)0
-    );]
-  )]
-)
-
-LIBS="-lglite_lb_client_$GLOBUS_THR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
-  [AC_SUBST([GLITE_LB_CLIENT_THR_LIBS], [-lglite_lb_client_$GLOBUS_THR_FLAVOR])],
-  [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_THR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-LIBS="-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
-  [AC_SUBST([GLITE_LB_CLIENT_NOTHR_LIBS], [-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR])],
-  [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_NOTHR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-AC_LANG_POP([C])
-
-AC_LANG_PUSH([C++])
-
-# prepare the test program, to link against the different combinations
-# of globus flavours
-
-AC_LANG_CONFTEST(
-  [AC_LANG_PROGRAM(
-    [@%:@include "glite/lb/Job.h"],
-    [glite::lb::Job job;]
-  )]
-)
-
-save_LIBS=$LIBS
-LIBS="-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
-  [AC_SUBST([GLITE_LB_CLIENTPP_THR_LIBS], [-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR])],
-  [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_THR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-LIBS="-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
-  [AC_SUBST([GLITE_LB_CLIENTPP_NOTHR_LIBS], [-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR])],
-  [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_NOTHR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-AC_LANG_POP([C++])
-
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS=$save_CPPFLAGS
-
-AC_MSG_RESULT([yes])
-
-])
index 61cc514..9ef289c 100644 (file)
 4.0.3-2
 - install libraries into $libdir
 
+4.0.4-1
+- Connection pool lock optimization and fixes
+- Rare crash fixes in notify example
+
+4.0.5-1
+- Compatibility with IPv6 compliant clients
+
+4.0.6-1
+- Install glite_lb.m4 rather than glite_lb_client.m4
+  
+4.0.7-1
+- hard-coded 'lib' fixed in glite_lb.m4
+
 4.1.0-1
 - Support for CREAM jobs
 - Support for logging sandbox transfers as jobs of a specific type
 - Connection Pool locking fixed (Savannah bug #37081)
 - Extended with WMS DNs and other flags (producer API cleanup)
 
+4.1.1-1
+- Job registration example supports the 'exclusive' flag
+- Notification client can read server address from JobID
+4.1.2-1
+- Fixed target 'clean' in the Makefile
+- Extended job state transition statistics
+- Extended statistics example
+- More automation in m4 macros
+- Fixed propagation of error codes received from server
+
+4.1.3-1
+- Hostname parsing adjusted to handle IPv6 addresses
+
index 8e8893c..8013dcc 100644 (file)
@@ -130,9 +130,10 @@ int main(int argc,char **argv)
                        {"state", required_argument, 0, 'S'},
                        {0, 0, 0, 0}};
                int option_index = 0;
-               char *single, *statelist;
+               char *single, *statelist, *notif_server;
                edg_wll_JobStatCode single_code;
                int statno, stdelims, sti;
+               unsigned int notif_server_port;
 
 #define MAX_NEW_CONDS 7
                conditions = (edg_wll_QueryRec **)calloc(MAX_NEW_CONDS + 1,sizeof(edg_wll_QueryRec *));
@@ -150,6 +151,13 @@ int main(int argc,char **argv)
                                }
                                conditions[i][0].value.j = jid;
                                i++;
+                               edg_wll_GetParam(ctx, EDG_WLL_PARAM_NOTIF_SERVER, &notif_server);
+                               if (!notif_server) {
+                                       glite_jobid_getServerParts(jid, &notif_server, &notif_server_port); 
+                                       edg_wll_SetParam(ctx, EDG_WLL_PARAM_NOTIF_SERVER, notif_server);
+                                       edg_wll_SetParamInt(ctx, EDG_WLL_PARAM_NOTIF_SERVER_PORT, notif_server_port);
+                               }
+                               free(notif_server);
                                break;
                        case 'o':
                                if (excl) { usage("new"); return EX_USAGE; } else excl = 1;
@@ -247,6 +255,10 @@ int main(int argc,char **argv)
                                        valid);
                edg_wll_NotifIdFree(id_out);
                if (attr == EDG_WLL_QUERY_ATTR_JOBID) edg_wlc_JobIdFree(jid);
+               if (edg_wll_Error(ctx,&errt,&errd)) {
+                       fprintf(stderr, "%s: %s (%s)\n", me, errt, errd);
+                       return EX_IOERR;
+               }
        }
        else if ( !strcmp(argv[1], "bind") )
        {
@@ -275,6 +287,10 @@ int main(int argc,char **argv)
                if ( !edg_wll_NotifBind(ctx, nid, sock, fake_addr, &valid) )
                        printf("valid until: %s (%ld)\n", TimeToStr(valid), valid);
                edg_wll_NotifIdFree(nid);
+               if (edg_wll_Error(ctx,&errt,&errd)) {
+                       fprintf(stderr, "%s: %s (%s)\n", me, errt, errd);
+                       return EX_IOERR;
+               }
        }
        else if ( !strcmp(argv[1], "receive") )
        {
@@ -359,18 +375,19 @@ int main(int argc,char **argv)
                        if (tout.tv_sec < 0) tout.tv_sec = 0;
                        tout.tv_usec = 0;
 
-                       edg_wll_FreeStatus(&stat);
-                       stat.state = EDG_WLL_JOB_UNDEF;
-               
                        if ( (err = edg_wll_NotifReceive(ctx, sock, &tout, &stat, &recv_nid)) ) {
                                edg_wll_NotifIdFree(recv_nid);
                                recv_nid = NULL; 
 
                                if (err != ETIMEDOUT) goto receive_err;
                        }
-                       else glite_lb_print_stat_fields(fields,&stat);
+                       else {
+                               glite_lb_print_stat_fields(fields,&stat);
+                               edg_wll_FreeStatus(&stat);
+                               stat.state = EDG_WLL_JOB_UNDEF;
+                       }
 
-                       if ((now = time(NULL)) >= client_tout) return 0;
+                       if ((now = time(NULL)) >= client_tout) goto cleanup;
 
                        if (refresh && now >= do_refresh) {
                                valid = now + opt_valid;
@@ -517,13 +534,12 @@ cleanup:
                free(conditions);
        }
        
-       edg_wll_NotifCloseFd(ctx);
-       
        if (edg_wll_Error(ctx,&errt,&errd))
                fprintf(stderr, "%s: %s (%s)\n", me, errt, errd);
 
+       edg_wll_NotifCloseFd(ctx);
        edg_wll_FreeContext(ctx);
+       edg_wll_poolFree();
 
-       
        return 0;
 }
index 6946ab4..80cdc81 100644 (file)
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
        dprintf(("generating jobids..."));
        {
                char *name=server?server:strdup(PROXY_SERVER);
-               char *p = strchr(name,':');
+               char *p = strrchr(name,':');
                int  port;
 
                if (p)  { *p=0; port = atoi(p+1); }
index 1f6e74f..b9616cd 100644 (file)
@@ -178,7 +178,6 @@ int edg_wll_DoLogEventServer(
                if ((ret = edg_wll_log_direct_connect(ctx,&con_bkserver))) {
                        edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_DoLogEventServer(): edg_wll_log_direct_connect error");
                        goto edg_wll_DoLogEventServer_end;
-                       goto inc_seq_code;
                }
                count++;
        }
@@ -223,7 +222,7 @@ int edg_wll_DoLogEventServer(
                case 0: /* timeout */
                        edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_DoLogEventServer(): select() timeouted");
                        count = 0;
-                       goto inc_seq_code
+                       goto edg_wll_DoLogEventServer_end
                        break;
                case -1: /* error */
                        switch(errno) {
@@ -231,7 +230,7 @@ int edg_wll_DoLogEventServer(
                                continue;
                        default:
                                edg_wll_UpdateError(ctx,errno,"edg_wll_DoLogEventServer(): select() error"); 
-                               goto inc_seq_code
+                               goto edg_wll_DoLogEventServer_end
                        }
                default:
                        break;
@@ -243,7 +242,7 @@ int edg_wll_DoLogEventServer(
                        /* read answer from lbproxy */
                        if ((ret = edg_wll_log_proxy_read(ctx,&con_lbproxy)) == -1) {
                                edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_DoLogEventServer(): edg_wll_log_proxy_read error");
-                               goto inc_seq_code
+                               goto edg_wll_DoLogEventServer_end
                        }
                        count -= 1;
                }       
@@ -251,15 +250,12 @@ int edg_wll_DoLogEventServer(
                        /* read answer from bkserver */
                        if ((ret = edg_wll_log_direct_read(ctx,&con_bkserver)) == -1) {
                                edg_wll_UpdateError(ctx,EAGAIN,"edg_wll_DoLogEventServer(): edg_wll_log_direct_read error");
-                               goto inc_seq_code
+                               goto edg_wll_DoLogEventServer_end
                        }
                        count -= 1;
                }       
        }
 
-inc_seq_code:
-       edg_wll_IncSequenceCode(ctx);   /* XXX: should not fail, called second time */
-
 edg_wll_DoLogEventServer_end:
        edg_wll_log_proxy_close(ctx,&con_lbproxy);
        edg_wll_log_direct_close(ctx,&con_bkserver);
@@ -406,6 +402,8 @@ static int edg_wll_LogEventMasterVa(
 //     va_list fmt_args;
        int     ret = 0;
        edg_wll_LogLine in = NULL, out = NULL;
+        int     err_store;
+        char    *err_desc_store = NULL;
 
        if ((flags & (EDG_WLL_LOGFLAG_LOCAL|EDG_WLL_LOGFLAG_PROXY|EDG_WLL_LOGFLAG_DIRECT)) == 0) {
                return edg_wll_SetError(ctx,ret = EINVAL,"edg_wll_LogEventMaster(): no known flag specified");
@@ -448,10 +446,18 @@ edg_wll_logeventmaster_end:
        if (in) free(in);
        if (out) free(out);
 
-       if (!ret) if(edg_wll_IncSequenceCode(ctx)) {
+        if (ctx->errCode) { 
+                err_store = ctx->errCode;
+                err_desc_store = strdup(ctx->errDesc); }
+
+       if(edg_wll_IncSequenceCode(ctx)) {
                edg_wll_SetError(ctx,ret = EINVAL,"edg_wll_LogEventMaster(): edg_wll_IncSequenceCode failed");
        }
 
+       if (err_desc_store) {
+               edg_wll_SetError(ctx, err_store, err_desc_store);
+               free(err_desc_store); }
+
        if (ret) edg_wll_UpdateError(ctx,0,"Logging library ERROR: ");
 
        return edg_wll_Error(ctx,NULL,NULL);
index 3eec328..41ad937 100644 (file)
@@ -49,19 +49,47 @@ static int set_server_name_and_port(edg_wll_Context, const edg_wll_QueryRec **);
  */
 
 int edg_wll_StateRate(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     major,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   *rate,
+        int     *res_from,
+        int     *res_to)
+
+{
+       float *rates = NULL;
+       char **groups = NULL;
+       int i;
+
+       edg_wll_StateRates(ctx, group, major, minor, from, to, &rates, &groups, res_from, res_to);
+       if (groups && groups[0]){
+               *rate = rates[0];
+               free(rates);
+               for (i = 0; groups[i]; i++)
+                       free(groups[i]);
+               free(groups);
+       }
+       return edg_wll_Error(ctx, NULL, NULL);
+}
+
+int edg_wll_StateRates(
        edg_wll_Context ctx,
        const edg_wll_QueryRec  *group,
        edg_wll_JobStatCode     major,
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *rate,
+       float   **rates,
+       char    ***groups,
        int     *res_from,
        int     *res_to)
 
 {      
        char    *response = NULL, *send_mess = NULL, *message = NULL;
-       float   not_returned;
+       float   *not_returned;
        
        
        edg_wll_ResetError(ctx);
@@ -80,8 +108,8 @@ int edg_wll_StateRate(
        if (http_check_status(ctx,response))
                goto err;
 
-       edg_wll_ParseStatsResult(ctx,message, from, to, rate
-                       &not_returned, res_from, res_to);
+       edg_wll_ParseStatsResultFull(ctx,message, from, to, rates
+               &not_returned, &not_returned, groups, res_from, res_to);
 
 err:
        free(response);
@@ -96,18 +124,46 @@ err:
  */
 
 int edg_wll_StateDuration(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     major,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   *duration,
+        int     *res_from,
+        int     *res_to)
+{
+       float *durations;
+       char **groups;
+       int i;
+
+       edg_wll_StateDurations(ctx, group, major, minor, from, to, &durations, &groups, res_from, res_to);
+       if (groups && groups[0]){
+                *duration = durations[0];
+                free(durations);
+                for (i = 0; groups[i]; i++)
+                        free(groups[i]);
+                free(groups);
+        }
+
+        return edg_wll_Error(ctx, NULL, NULL);
+}
+
+int edg_wll_StateDurations(
        edg_wll_Context ctx,
        const edg_wll_QueryRec  *group,
        edg_wll_JobStatCode     major,
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *duration,
+       float   **durations,
+       char    ***groups,
        int     *res_from,
        int     *res_to)
 {
        char    *response = NULL, *send_mess = NULL, *message = NULL;
-       float   not_returned;
+       float   *not_returned;
        
        
        edg_wll_ResetError(ctx);
@@ -126,8 +182,8 @@ int edg_wll_StateDuration(
        if (http_check_status(ctx,response))
                goto err;
 
-       edg_wll_ParseStatsResult(ctx,message, from, to, &not_returned, 
-                       duration, res_from, res_to);
+       edg_wll_ParseStatsResultFull(ctx,message, from, to, &not_returned, 
+               durations, &not_returned, groups, res_from, res_to);
 
 err:
        free(response);
@@ -138,6 +194,90 @@ err:
 
 
 
+/** Compute average time for which jobs moves from one to second specified state.
+ */
+
+int edg_wll_StateDurationFromTo(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base,
+        edg_wll_JobStatCode     final,
+        int     minor,
+        time_t  *from,
+        time_t  *to,
+        float   *duration,
+        float   *dispersion,
+        int     *res_from,
+        int     *res_to
+)
+{
+       float *durations;
+       float *dispersions;
+       char **groups;
+       int i;
+       
+       edg_wll_StateDurationsFromTo(ctx, group, base, final, minor, from, to, 
+               &durations, &dispersions, &groups, res_from, res_to);
+       if (groups && groups[0]){
+                *duration = durations[0];
+               *dispersion = dispersions[0];
+                free(durations);
+               free(dispersions);
+                for (i = 0; groups[i]; i++)
+                        free(groups[i]);
+                free(groups);
+        }
+
+        return edg_wll_Error(ctx, NULL, NULL);
+}
+
+int edg_wll_StateDurationsFromTo(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base,
+        edg_wll_JobStatCode     final,
+       int     minor,
+        time_t  *from,
+        time_t  *to,
+        float   **durations,
+       float   **dispersions,
+       char    ***groups,
+        int     *res_from,
+        int     *res_to
+)
+{
+        char    *response = NULL, *send_mess = NULL, *message = NULL;
+        float   *not_returned;
+
+
+        edg_wll_ResetError(ctx);
+
+        edg_wll_StatsDurationFTRequestToXML(ctx, "DurationFromTo", group, base, final, minor, from, to, &send_mess);
+
+        if (set_server_name_and_port(ctx, NULL))
+                goto err;
+
+        ctx->p_tmp_timeout = ctx->p_query_timeout;
+
+        if (edg_wll_http_send_recv(ctx, "POST /statsRequest HTTP/1.1",request_headers, send_mess,
+                        &response,NULL,&message))
+                goto err;
+
+        if (http_check_status(ctx,response))
+                goto err;
+
+        edg_wll_ParseStatsResultFull(ctx,message, from, to, &not_returned,
+                        durations, dispersions, groups, res_from, res_to);
+
+err:
+        free(response);
+        free(message);
+
+        return edg_wll_Error(ctx,NULL,NULL);
+}
+
+
+
 static int set_server_name_and_port(edg_wll_Context ctx, const edg_wll_QueryRec **job_conditions)
 {
        int                             i = 0, j,
index 2343207..4c90e7c 100644 (file)
@@ -39,7 +39,7 @@ TRIO_LIB:=-lglite_lbu_trio
 PERF_HDRS:=lb_perftest.h
 PERF_OBJS:=lb_perftest.o
 
-CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
+CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
        -I. \
        -I${top_srcdir}/test \
        -I${stagedir}/include \
@@ -64,7 +64,7 @@ endif
 classadslib := ${classadslib} -lclassad
 
 
-LDFLAGS:=-L${stagedir}/${libdir} -L${stagedir}/lib \
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} -L${stagedir}/lib \
        ${COVERAGE_FLAGS}
 
 EXT_LIBS:= ${EXPAT_LIBS} ${JOBID_LIB} ${TRIO_LIB} ${classadslib}
@@ -216,12 +216,10 @@ install:
                ${INSTALL} -m 644 glite/wmsutils/jobid/*.h ${PREFIX}/include/glite/wmsutils/jobid/ ; \
        fi ;
        ${STAGE_PERFTEST} ;
-       mkdir -p ${PREFIX}/share/build/m4
-       ${INSTALL} -m 644 ${top_srcdir}/m4/*.m4 ${PREFIX}/share/build/m4
 
 clean:
        rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/ test_parse il_test parse.cpp events.tex status.tex
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.o: %.c
        ${COMPILE} ${CFLAGS} -c $<
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index d7f4b0a..48c5d74 100644 (file)
@@ -176,6 +176,8 @@ glite_lb_padded_struct(_edg_wll_Context,150,
 
        time_t          rssTime;
        _edg_wll_authz_policy   authz_policy;
+
+       int             exclusive_zombies;
 )
 
 /* to be used internally: set, update and and clear the error information in 
index c2aeaeb..a4ae7dd 100644 (file)
@@ -93,10 +93,12 @@ typedef struct _edg_wll_XML_ctx {
        time_t                  notifValidity;
        char                    *statsFunction;
        edg_wll_QueryRec        **statsConditions;
-       edg_wll_JobStatCode     statsMajor;
+       edg_wll_JobStatCode     statsBaseState;
+       edg_wll_JobStatCode     statsFinalState;
        int                     statsMinor;
        time_t                  statsFrom, statsTo;
-       float                   statsRate, statsDuration;
+       float                   *statsRate, *statsDuration, *statsDispersion;
+       char                    **statsGroup;
        int                     statsResFrom, statsResTo;
        glite_jobid_t           jobId;
        char                    *source;
index 3d3601f..6211219 100644 (file)
@@ -90,9 +90,13 @@ extern int edg_wll_NotifRequestToXML( edg_wll_Context ctx, const char *function,
 extern int edg_wll_QuerySequenceCodeToXML(edg_wll_Context ctx, glite_jobid_const_t jobId, char **message);
 
 extern int edg_wll_StatsRequestToXML(edg_wll_Context,const char *,const edg_wll_QueryRec *,edg_wll_JobStatCode,int,time_t *,time_t *,char **); 
+
+extern int edg_wll_StatsDurationFTRequestToXML(edg_wll_Context,const char *,const edg_wll_QueryRec *,edg_wll_JobStatCode,edg_wll_JobStatCode,int,time_t *,time_t *,char **);
        
 extern edg_wll_ErrorCode edg_wll_ParseStatsResult(edg_wll_Context ctx, char *messageBody, time_t *from, time_t *to, float *rate, float *duration, int *res_from, int *res_to);
 
+extern edg_wll_ErrorCode edg_wll_ParseStatsResultFull(edg_wll_Context ctx, char *messageBody, time_t *from, time_t *to, float **rate, float **duration, float **dispersion, char ***group, int *res_from, int *res_to);
+
 #ifdef __cplusplus
 }
 #endif
index ad998dd..374385c 100644 (file)
 7.0.4-2
 - Buildtime dependency on c-ares
 
+7.0.5-1
+- Comments for common event fields
+- Locking in connPool initiation
+
+7.0.6-1
+- Remove glite_lb_common.m4 (replaced by glite_lb.m4 from lb.client)
+
 7.1.0-1
 - Advanced Autorization
 
 7.1.1-1
 - Broader authorization policy format
+
+7.1.2-1
+- A new property included in context
+
+7.1.3-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- Extended job state transition statistics
+
+7.1.4-1
+- Hostname parsing adjusted to handle IPv6 addresses
+
index de03a01..cf4cc7a 100644 (file)
@@ -311,7 +311,7 @@ glite_wll_perftest_init(const char *host,
        {
                char *p;
 
-               p = strchr(host, ':');
+               p = strrchr(host, ':');
                if(p) 
                        *p = 0;
                dest_host = strdup(host);
index ca38e4e..7a0a0d8 100644 (file)
@@ -83,7 +83,7 @@ static int extract_port(edg_wll_ContextParam param,int dflt)
 {
        char    *p = NULL,*s = mygetenv(param);
 
-        if (s) p = strchr(s,':');
+        if (s) p = strrchr(s,':');
        return  p ? atoi(p+1) : dflt;
 }
 
@@ -100,7 +100,7 @@ static char *extract_host(edg_wll_ContextParam param,const char *dflt)
        s = mygetenv(param);
        if (!s && !dflt) return NULL;
        s = strdup(s?s:dflt),
-       p = strchr(s,':');
+       p = strrchr(s,':');
        if (p) *p = 0;
        return s;
 }
index 8deb8ca..1a7ba37 100644 (file)
@@ -86,10 +86,13 @@ void edg_wll_initXMLCtx(edg_wll_XML_ctx *c) {
        c->bound = 0;
        c->statsFunction = NULL;
        c->statsConditions = NULL;
-       c->statsMajor = EDG_WLL_JOB_UNDEF;
+       c->statsBaseState = EDG_WLL_JOB_UNDEF;
+       c->statsFinalState = EDG_WLL_JOB_UNDEF;
        c->statsMinor = 0;
-       c->statsRate = 0;
-       c->statsDuration = 0;
+       c->statsRate = NULL;
+       c->statsDuration = NULL;
+       c->statsDispersion = NULL;
+       c->statsGroup = NULL; 
        c->statsFrom = 0;
        c->statsTo = 0;
        c->statsResFrom = 0;
@@ -103,11 +106,20 @@ void edg_wll_initXMLCtx(edg_wll_XML_ctx *c) {
 
 
 void edg_wll_freeXMLCtx(edg_wll_XML_ctx *c) {
+       int i;
         if (c->char_buf) free(c->char_buf);
         if (c->errtxt) free(c->errtxt);
         if (c->warntxt) free(c->warntxt);
        if (c->XML_tag) free(c->XML_tag);
        if (c->XML_tag2) free(c->XML_tag2);
+       if (c->statsRate) free(c->statsRate);
+       if (c->statsDuration) free(c->statsDuration);
+       if (c->statsDispersion) free(c->statsDispersion);
+       if (c->statsGroup){
+               for (i = 0; c->statsGroup[i]; i++)
+                       free(c->statsGroup[i]);
+               free(c->statsGroup);
+       }
 }
 
 
index 4e81d9d..8e98502 100644 (file)
@@ -724,13 +724,29 @@ static void startStatsResult(void *data, const char *el, const char **attr)
                                 else if (!strcmp(attr[i],"desc"))
                                         XMLCtx->errDesc = strdup(attr[i+1]);
                                 else { unexpError() }
-                        }       
+                        }      
+                       XMLCtx->statsGroup = (char**)malloc(1*sizeof(char*));
+                       XMLCtx->statsGroup[0] = NULL;
+                       XMLCtx->position = -1;
+       
                         break;          
-                case 1: if (strcasecmp(el,"from") && strcasecmp(el,"to") &&
-                               strcasecmp(el,"rate") && strcasecmp(el,"duration") &&
-                               strcasecmp(el,"res_from") && strcasecmp(el,"res_to")) 
-                                       unexpWarning()
-                        break;  
+               case 1: if (strcasecmp(el,"from") && strcasecmp(el,"to") &&
+                       strcasecmp(el,"res_from") && strcasecmp(el,"res_to") &&
+                       strcasecmp(el, "stat"))
+                               unexpWarning()
+                       if (strcasecmp(el, "stat") == 0){
+                               XMLCtx->position++;
+                               XMLCtx->statsGroup = (char**)realloc(XMLCtx->statsGroup, (XMLCtx->position+2)*sizeof(char*));
+                                XMLCtx->statsGroup[XMLCtx->position+1] = NULL;
+                                XMLCtx->statsRate = (float*)realloc(XMLCtx->statsRate, (XMLCtx->position+1)*sizeof(float));
+                                XMLCtx->statsDuration = (float*)realloc(XMLCtx->statsDuration, (XMLCtx->position+1)*sizeof(float));
+                                XMLCtx->statsDispersion = (float*)realloc(XMLCtx->statsDispersion, (XMLCtx->position+1)*sizeof(float));
+                       }
+                       break;
+               case 2: if (strcasecmp(el,"rate") && strcasecmp(el,"duration") 
+                       && strcasecmp(el,"dispersion") && strcasecmp(el,"group"))
+                               unexpWarning()
+                       break;
                 default: unexpWarning()
                          break;
         }       
@@ -1317,15 +1333,25 @@ static void endStatsResult(void *data, const char *el UNUSED_VAR)
                         XMLCtx->statsFrom = edg_wll_from_string_to_time_t(XMLCtx);
                 else if (!strcmp(XMLCtx->element,"to"))
                         XMLCtx->statsTo = edg_wll_from_string_to_time_t(XMLCtx);
-                else if (!strcmp(XMLCtx->element,"rate"))
-                        XMLCtx->statsRate = edg_wll_from_string_to_float(XMLCtx);
-                else if (!strcmp(XMLCtx->element,"duration"))
-                        XMLCtx->statsDuration = edg_wll_from_string_to_float(XMLCtx);
                 else if (!strcmp(XMLCtx->element,"res_from"))
                         XMLCtx->statsResFrom = edg_wll_from_string_to_int(XMLCtx);
                 else if (!strcmp(XMLCtx->element,"res_to"))
                         XMLCtx->statsResTo = edg_wll_from_string_to_int(XMLCtx);
        }
+       else if (XMLCtx->level == 3){
+               if (!strcmp(XMLCtx->element,"rate"))
+                        XMLCtx->statsRate[XMLCtx->position] = 
+                               edg_wll_from_string_to_float(XMLCtx);
+                else if (!strcmp(XMLCtx->element,"duration"))
+                        XMLCtx->statsDuration[XMLCtx->position] = 
+                               edg_wll_from_string_to_float(XMLCtx);
+                else if (!strcmp(XMLCtx->element,"dispersion"))
+                        XMLCtx->statsDispersion[XMLCtx->position] = 
+                               edg_wll_from_string_to_float(XMLCtx);
+                else if (!strcmp(XMLCtx->element,"group"))
+                        XMLCtx->statsGroup[XMLCtx->position] = 
+                               edg_wll_from_string_to_string(XMLCtx);
+       }
 
        edg_wll_freeBuf(XMLCtx);
        XMLCtx->level--;
@@ -1982,6 +2008,9 @@ edg_wll_ErrorCode edg_wll_ParsePurgeResult(edg_wll_Context ctx, char *messageBod
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
 
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
+
        errno = 0;
        edg_wll_ResetError(ctx);
        edg_wll_initXMLCtx(&XMLCtx);
@@ -2052,6 +2081,9 @@ edg_wll_ErrorCode edg_wll_ParseDumpResult(edg_wll_Context ctx, char *messageBody
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
 
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
+
        errno = 0;
        edg_wll_ResetError(ctx);
        edg_wll_initXMLCtx(&XMLCtx);
@@ -2114,6 +2146,9 @@ edg_wll_ErrorCode edg_wll_ParseLoadResult(edg_wll_Context ctx, char *messageBody
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
 
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
+
        errno = 0;
        edg_wll_ResetError(ctx);
        edg_wll_initXMLCtx(&XMLCtx);
@@ -2250,6 +2285,9 @@ edg_wll_ErrorCode edg_wll_ParseNotifResult(edg_wll_Context ctx, char *messageBod
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
 
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
+
        errno = 0;
        edg_wll_ResetError(ctx);
        edg_wll_initXMLCtx(&XMLCtx);
@@ -2311,6 +2349,9 @@ edg_wll_ErrorCode edg_wll_ParseQuerySequenceCodeResult(edg_wll_Context ctx, char
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
 
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
+
        errno = 0;
        edg_wll_ResetError(ctx);
        edg_wll_initXMLCtx(&XMLCtx);
@@ -2367,11 +2408,46 @@ edg_wll_ErrorCode edg_wll_ParseQuerySequenceCodeResult(edg_wll_Context ctx, char
 
 
 /* parse statistics result from client */
+
+/* this is backward-compatible version, edg_wll_ParseStatsResultFull is prefered*/
 edg_wll_ErrorCode edg_wll_ParseStatsResult(edg_wll_Context ctx, char *messageBody, time_t *from, time_t *to, float *rate, float *duration, int *res_from, int *res_to)
 {
+       float *rates, *durations, *dispersions;
+       char **groups;
+       edg_wll_ErrorCode ret;
+       int i;
+
+       ret = edg_wll_ParseStatsResultFull(ctx, messageBody, from, to, &rates, &durations, &dispersions, &groups, res_from, res_to);
+
+       if (groups && groups[0]){
+               if (rates) {
+                       *rate = rates[0];
+                       free(rates);
+               }
+               if (durations) {
+                       *duration = durations[0];
+                       free(durations);
+               }
+               if (dispersions)
+                       free(dispersions);
+               for(i = 0; groups[i]; i++)  
+                       free(groups[i]);
+       }
+       if (groups)
+               free(groups);
+
+       return ret;
+}
+
+edg_wll_ErrorCode edg_wll_ParseStatsResultFull(edg_wll_Context ctx, char *messageBody, time_t *from, time_t *to, float **rate, float **duration, float **dispersion, char ***group, int *res_from, int *res_to)
+{
        edg_wll_XML_ctx XMLCtx;
        edg_wll_ErrorCode errorCode;
        XML_Char *encoding = "ISO-8859-1";
+       int i;
+
+       if (!messageBody)
+               return edg_wll_SetError(ctx, EDG_WLL_ERROR_XML_PARSE, "Parse error: empty response");
 
        errno = 0;
        edg_wll_ResetError(ctx);
@@ -2401,15 +2477,30 @@ edg_wll_ErrorCode edg_wll_ParseStatsResult(edg_wll_Context ctx, char *messageBod
        if ((errorCode = edg_wll_Error(ctx,NULL,NULL))) {
                *from = -1;
                *to = -1;
-               *rate = 0;
-               *duration = 0;
+               *rate = NULL;
+               *duration = NULL;
+               *dispersion = NULL;
+               *group = NULL;
                *res_from = -1;
                *res_to = -1;
        } else {
                *from = XMLCtx.statsFrom;
                *to = XMLCtx.statsTo;
-               *rate = XMLCtx.statsRate;
-               *duration = XMLCtx.statsDuration;
+               *rate = NULL;
+                *duration = NULL;
+                *dispersion = NULL;
+               *group = NULL;
+               for (i = 0; XMLCtx.statsGroup[i]; i++){
+                       *rate = (float*)realloc(*rate, (i+1)*sizeof(float));
+                        (*rate)[i] = XMLCtx.statsRate[i];
+                        *duration = (float*)realloc(*duration, (i+1)*sizeof(float));
+                        (*duration)[i] = XMLCtx.statsDuration[i];
+                        *dispersion = (float*)realloc(*dispersion, (i+1)*sizeof(float));
+                        (*dispersion)[i] = XMLCtx.statsDispersion[i];
+                        *group = (char**)realloc(*group, (i+2)*sizeof(char*));
+                        (*group)[i] = strdup(XMLCtx.statsGroup[i]);
+                        (*group)[i+1] = NULL;
+               }
                *res_from = XMLCtx.statsResFrom;
                *res_to = XMLCtx.statsResTo;
        }
@@ -2506,7 +2597,9 @@ int edg_wll_JobQueryRecToXML(
                                                edg_wll_add_string_to_XMLBody(&pomValue, conditions[row][i].value.c, "location", NULL);
                                                break;
                                        case EDG_WLL_QUERY_ATTR_DESTINATION:
-                                               edg_wll_add_string_to_XMLBody(&pomValue, conditions[row][i].value.c, "destination", NULL);
+                                               conditions[row][i].value.c ?
+                                                       edg_wll_add_string_to_XMLBody(&pomValue, conditions[row][i].value.c, "destination", NULL) :
+                                                       edg_wll_add_string_to_XMLBody(&pomValue, "", "destination", NULL);
                                                break;
                                        case EDG_WLL_QUERY_ATTR_NETWORK_SERVER:
                                                edg_wll_add_string_to_XMLBody(&pomValue, conditions[row][i].value.c, "networkserver", NULL);
@@ -2975,14 +3068,28 @@ int edg_wll_QuerySequenceCodeToXML(
 
 /* construct Message-Body of Request-Line for edg_wll_StateRate function */
 int edg_wll_StatsRequestToXML(
+                edg_wll_Context         ctx,
+                const char              *function,
+                const edg_wll_QueryRec  *cond,
+                edg_wll_JobStatCode     major,
+                int                     minor,
+                time_t                  *from,
+                time_t                  *to,
+                char                   **message)
+{
+       return edg_wll_StatsDurationFTRequestToXML(ctx, function, cond, major, EDG_WLL_JOB_UNDEF, minor, from, to, message);
+}
+
+int edg_wll_StatsDurationFTRequestToXML(
                 edg_wll_Context        ctx, 
                const char              *function,
                const edg_wll_QueryRec  *cond,
-               edg_wll_JobStatCode     major,
+               edg_wll_JobStatCode     base_state,
+               edg_wll_JobStatCode     final_state,
                int                     minor,
                time_t                  *from,
                time_t                  *to,
-                char **message)
+                char                   **message)
 {
        char *pomA=NULL, *pomB=NULL, *pomC=NULL;
        const edg_wll_QueryRec **conditions;
@@ -2996,7 +3103,8 @@ int edg_wll_StatsRequestToXML(
 
        pomA = strdup("");
        
-       edg_wll_add_edg_wll_JobStatCode_to_XMLBody(&pomA, major, "major", EDG_WLL_JOB_UNDEF);
+       edg_wll_add_edg_wll_JobStatCode_to_XMLBody(&pomA, base_state, "base_state", EDG_WLL_JOB_UNDEF);
+       edg_wll_add_edg_wll_JobStatCode_to_XMLBody(&pomA, final_state, "final_state", EDG_WLL_JOB_UNDEF);
        edg_wll_add_int_to_XMLBody(&pomA, minor, "minor", -1);
        edg_wll_add_time_t_to_XMLBody(&pomA, *from, "from", 0); 
        edg_wll_add_time_t_to_XMLBody(&pomA, *to, "to", 0); 
index 497761d..353272f 100644 (file)
@@ -76,7 +76,7 @@ install:
 
 clean:
        rm -rvf LBUG* LBAG* LBDG* LBTP* events.tex status.tex ver.tex comment*
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 
 # dependencies:
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 25fd422..24f0c84 100644 (file)
 1.0.3-1
 - Updates to the User Guide, Admin Guide and Test Plan Test Suite Documentation
 
+1.0.4-1
+- Admin Guide updates - installation and migration
+- Test Plan updates
+
 1.1.0-1
 - Documentation updated to follow development
 
 
 1.1.6-1
 - Documented new authorization functions
+
+1.1.7-1
+- More docs for authorization functions
+
+1.1.8-1
+- Minor updates in the Admin Guide and Test Plan
+
+1.1.9-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- Updated references to L&B versions
+- General grammar and typo fixes
+- A new shared FAQ section prepared
+- Documentation for new TestPlan tests
+
+1.1.9-2
+- Module rebuilt
+
index 01b265a..4abe227 100644 (file)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=1.1.6
-module.age=1
+module.version=1.1.9
+module.age=2
index 86e4cd5..7ec921d 100644 (file)
@@ -29,7 +29,7 @@ In \LBver{1.x}, the list of all LB packages was the following:
 glite-lb-common & common files \\ 
 glite-lb-client & client library and CLI tools\\ 
 glite-lb-client-interface & client library interface (header files) \\ 
-glite-lb-harvester & enhanced \LB notification client (since \LBver{1.10}) \\
+%glite-lb-harvester & enhanced \LB notification client (since \LBver{1.10}) \\
 glite-lb-logger & local-logger and inter-logger \\ 
 glite-lb-proxy & proxy (restricted server used by WMS)\\ 
 glite-lb-server & server \\ 
@@ -39,19 +39,21 @@ glite-lb-ws-interface & web service interface  \\
 glite-security-gsoap-plugin & GSS wrapper and GSS plugin for gSoap
 \end{tabularx}
 
-In \LBver{2.0}, the code has been restructured quite a lot, especially the dependencies were lightened,
+Starting with \LBver{2.0}, the code has been restructured quite a lot, especially the dependencies were lightened,
 and the new list of packages is now the following:
 
 \begin{tabularx}{\textwidth}{>{\tt}lX}
 glite-lb-doc & documentation \\ 
 glite-lb-common & common files \\ 
 glite-lb-client & client library and CLI tools\\ 
-glite-lb-harvester & enhanced \LB notification client \\
+glite-lb-client-java & Java implementation of the client (since \LBver{2.1})\\ 
+glite-lb-harvester & enhanced \LB notification client (since \LBver{2.1})\\
 glite-lb-logger & local-logger and inter-logger \\
 glite-lb-server & server, including merged proxy functionality \\
 glite-lb-state-machine & state machine and LB plugin for Job Provenance \\ 
 glite-lb-utils & auxiliary utilities \\
 glite-lb-ws-interface & web service interface \\
+glite-lb-yaim & YAIM initialization scripts for \LB (since \LBver{2.1}) \\
 \end{tabularx}
 
 More detailed description together with the dependencies can be read directly from each package,
@@ -164,7 +166,7 @@ can be done then. Available parameters specific to LB server are:
 \item \texttt{MYSQL\_PASSWORD} -- root password of MySQL server (mandatory)
 \item \texttt{GLITE\_WMS\_LCGMON\_FILE} -- pathname of file where job state
 export data are written for use by lgcmon/R-GMA 
-(default: \texttt{/var/glite/logging/status.log}
+(default: \texttt{/var/glite/logging/status.log}). \emph{Note: This feature is now obsolete and only available in \LBver{1.x}.}
 \item \texttt{GLITE\_LB\_EXPORT\_PURGE\_ARGS} -- purge timeouts (default: \texttt{--cleared 2d --aborted 15d --cancelled 15d --other 60d})
 
 According to local retention policy you may want to use different purge timeouts (for example WLCG would need \texttt{--cleared 90d --aborted 90d --cancelled 90d --other 90d}).
@@ -175,7 +177,7 @@ According to local retention policy you may want to use different purge timeouts
 \item \texttt{GLITE\_LB\_RTM\_DN} -- DNs using to get notifications from \LB server\\
 (default: \texttt{heppc24.hep.ph.ic.ac.uk} machine certificate)
 \item \texttt{GLITE\_LB\_SUPER\_USERS} -- additional super-users (default: empty)
-\item \texttt{GLITE\_LB\_TYPE} -- type of the \LB service: server, proxy, both (default: server)
+\item \texttt{GLITE\_LB\_TYPE} -- type of the \LB service: server, proxy, both (default: autodetect, \LB node only: 'server', WMS node only: proxy, \LB and WMS: 'both')
 \item \texttt{GLITE\_LB\_HARVESTER\_ENABLED} -- set to \texttt{true} for sending notification, used mainly for export to MSG publish system (default: \texttt{false})
 \item \texttt{GLITE\_LB\_HARVESTER\_MSG\_OPTIONS} -- additional options for MSG publish (default: \texttt{--wlcg})
 \item \texttt{GLITE\_LB\_INDEX\_OWNER} -- when specified, add (\texttt{true}) or drop (\texttt{false}) 'owner' index (default: 'owner' index not created or dropped)
@@ -200,8 +202,9 @@ Steps:
 \item \emph{Move data.} Just stop the MySQL server and move
  \verb'/var/lib/mysql' data directory directly to the target machine.
 \item \emph{(optional) Restore file contexts.} You may need to restore file 
- contexts in case of enabled SELinux. For example, commands on the target 
- machine:
+ contexts in case of enabled SELinux.
+\end{itemize}
+For example, commands on the target machine:
  \begin{verbatim}
  service mysqld stop
  cd /var/lib
@@ -209,7 +212,6 @@ Steps:
  restorecond -R mysql
  service mysqld start
  \end{verbatim}
-\end{itemize}
 
 \subsubsection{Migration of database to support transactions}
 Started from version 1.4.3 of the \texttt{glite-lb-server}
@@ -221,9 +223,9 @@ installations, YAIM configuration process will create transactional
 database automatically. For existing LB server database the migration 
 process is not automatically handled.
 
-Note: If you want to add transaction when migrating to \LB 2.0 skip
-this section and use \LB 2.0 migration procedure. The migration of
-database to support transactions is included in \LB 2.0 migration procedure.
+Note: If you want to add transaction when migrating to \LB 2.x skip
+this section and use \LB 2.x migration procedure. The migration of
+database to support transactions is included in \LB 2.x migration procedure.
 
 Steps:
 \begin{itemize}
@@ -240,9 +242,9 @@ mysql -u lbserver lbserver20 \
 \end{itemize}
 
 
-\subsubsection{Migration to \LB 2.0}
+\subsubsection{Migration to \LB 2.x}
 \label{inst:migrate20}
-The migration process of existing \LB 1.x database to the \LB 2.0 is
+The migration process of existing \LB 1.x database to the \LB 2.x is
 not handled automatically. The database schema change is required due
 to support of merged \LB server and proxy services using single
 database, pointers to purged jobs (``zombies'') and other
@@ -250,18 +252,18 @@ improvements.
 
 Warning: There are two types of \LB database based on the fact that
 you can have a \LB server or \LB proxy. For more information about \LB
-proxy please see \ref{inst:LBproxy}.
+proxy please see \ref{inst:LBproxy}
 
 Steps:
 \begin{itemize}
- \item \emph{Stop the server and upgrade to \LB 2.0.} Stop both a \LB
+ \item \emph{Stop the server and upgrade to \LB 2.x.} Stop both a \LB
  server and a MySQL server. Making a fresh backup copy of database is
- a good idea. Do the upgrade to \LB 2.0, optionally you can move the
+ a good idea. Do the upgrade to \LB 2.x, optionally you can move the
  database to new OS in this step (see \ref{inst:OSmigration}).
  \item \emph{Before migration some database tuning is
  required.} Especially parameter \texttt{innodb\_buffer\_pool\_size}
  needs to be increased, to support bigger transactions. For details
- see Section~\ref{inst:db_tuning}.
+ see Section~\ref{inst:db_tuning}
  \item \emph{Database type.} Check if you have a \LB server or a \LB
  proxy. In the following step you must properly set the switch
  \verb'-s' (server) or \verb'-p' (proxy).
@@ -276,7 +278,7 @@ Steps:
   \verb'mysql -u lbserver lbserver20 -e "alter table events drop index host"'
   \end{quote}
  \item \emph{(Optional) Check the \LB indexes.} You may need to add
- LastUpdateTime for monitoring services. See \ref{maintain:index}.
+ LastUpdateTime for monitoring services. See \ref{maintain:index}
  \item \emph{Start the servers.} MySQL and \LB. Check logs.
 \end{itemize}
 
@@ -433,6 +435,8 @@ should be followed to set up the LCAS layer properly.
 
 \subsubsection{Export to R-GMA}
 
+\emph{Note: This feature is now obsolete and only available in \LBver{1.x}.}
+
 {\sloppy
 \LB server can export information on job state changes to R-GMA infrastructure through \verb'lcgmon' 
 in real time. This export is enabled by YAIM by default and uses \verb'GLITE_WMS_LCGMON_FILE' 
@@ -454,7 +458,7 @@ Initial YAIM configuration creates a cron job which runs once a day and purges o
 data (jobs in Cleared state after two days, Aborted and Cancelled after 15 days, and other jobs 
 after 60 days of inactivity). It is recommended to run the cron jobs more often (in order to purge less jobs
 during single run) if event queue backlogs form in client WMS machines when the purging cron jobs is running.
-For details on setting job purge timeouts, see Sect.~\ref{run:purge}.
+For details on setting job purge timeouts, see Sect.~\ref{run:purge}
 
 
 \subsubsection{Exploiting parallelism}
index 550fdb8..5649ef0 100644 (file)
@@ -165,7 +165,7 @@ Non-default listening socket have to be specified via \verb'-p' option then.
 
 \LB server only, not supported by proxy.
 
-(This functionality should not be confused with per-job dumps, Sect.~\ref{inst:purge} and \ref{run:purge}.)
+(This functionality should not be confused with per-job dumps, Sect.~\ref{inst:purge} and \ref{run:purge})
 
 Besides setting up \LB server database on a~reliable storage or
 backing it up directly (Sect.~\ref{inst:backup})
@@ -488,8 +488,8 @@ file with \verb'.ctl' suffix.
 
 \begin{sloppypar}
 In case of emergency (\eg corrupted file) the files can be examined
-with \verb'glite-lb-parse_eventsfile' %
-\footnote{Not fully supported tool, installed by \texttt{glite-lb-client} package among examples.}.
+with \verb'glite-lb-parse_eventsfile'.\footnote{Not fully supported tool, installed
+by \texttt{glite-lb-client} package among examples.}
 It is possible to hand-edit the event files in emergency (remove corrupted lines).
 However, glite-lb-interlogd must not be running, and the corresponding .ctl file
 must be removed.
@@ -505,8 +505,8 @@ a~working \LB server) is unlikely.
 On the other hand, if it happens,
 and an event with such a~jobid is logged,
 \eg due to a~third-party job processing software bug,
-glite-lb-interlogd keeps trying to deliver it indefinitely%
-\footnote{Unless event expiration is set, though it is not done for normal events.}.
+glite-lb-interlogd keeps trying to deliver it indefinitely.\footnote{Unless
+event expiration is set, though it is not done for normal events.}
 The unsuccessful attempts are reported via syslog.
 The only solution is manual
 removal of the corresponding files
index 8748379..db63509 100644 (file)
 \newpage
 \input{LBAG-Troubleshooting}
 
+\newpage
+\input{faq}
+
+\newpage
 \nocite{jgc}
 \bibliographystyle{unsrt}
 \bibliography{lbjp}
index a6f9450..7565e47 100644 (file)
@@ -39,7 +39,7 @@ Besides pure System Functionality Tests, this list also includes In-the-Wild tes
 \hline
 {\tt lb-test-logevent.sh} & Implemented & Test if local logger accepts events correctly (i.e. returns 0). \\
 \hline
-{\tt lb-test-il-recovery.sh} & Implemented & Tests if iterlogger recovers correctly and processes events logged in between when restarted. \\
+{\tt lb-test-il-recovery.sh} & Implemented & Tests if interlogger recovers correctly and processes events logged in between when restarted. \\
 \hline
 {\tt lb-test-job-states.sh} & Implemented & Test that job state queries return correctly and that testing jobs are in expected states. \\
 \hline
@@ -65,6 +65,8 @@ Besides pure System Functionality Tests, this list also includes In-the-Wild tes
 \hline
 {\tt lb-test-changeacl.sh} & Implemented & Test proper parsing of \code{ChangeACL} events. \\
 \hline
+{\tt lb-test-statistics.sh} & Implemented & Test statistic functions provided by \LB \\
+\hline
 \end{tabularx}
 
 \subsubsection{Event logging examples}
@@ -116,7 +118,7 @@ They can be grabbed and used for comparing the events later in~\ref{recover}.
 \req\ running \path{glite-lb-bkserverd}
 
 \what\ call \code{edg\_wll\_RegisterJob}. Jobids should preferably point
-to a~remote \LB\ server.
+to a~remote \LB\ server. Try re-registration using flag \code{EDG\_WLL\_LOGLFLAG\_EXCL} in various scenarios.
 
 \how\ \ctblb{lb-test-job-registration.sh}
 
@@ -427,7 +429,7 @@ including the checks.
 \what\
 \begin{enumerate}
 \item Register a compute job.
-\item Register input sandbox trasfer.
+\item Register input sandbox transfer.
 \item Register output sandbox transfer.
 \item Generate events to trigger job state changes in one of the sandbox transfer jobs.
        \begin{enumerate}
@@ -452,7 +454,7 @@ including the checks.
 \what\
 \begin{enumerate}
 \item Register a job.
-\item Send a \code{CahngeACL} event to add authorized user.
+\item Send a \code{ChangeACL} event to add authorized user.
 \item Check job status to see if the event was processed correctly.
 \end{enumerate}
 
@@ -464,6 +466,26 @@ including the checks.
 
 \result\ The \emph{test~DN} should be listed in the job's ACL.
 
+\subsubsection{Statistics}
+
+\req\ All \LB\ services running
+
+\what\
+\begin{enumerate}
+\item Register a series of jobs.
+\item Generate events to push jobs to a given state.
+\item Run statistics to calculate rate of jobs reaching that state. 
+\item Query for average time needed by test jobs to go from one state to another.
+\item Check if the statistics returned reasonable results. 
+\end{enumerate}
+
+\how\ \ctblb{lb-test-statistics.sh}
+
+\note\ The test includes artificial delays. Takes approx. 30\,s to finish.
+
+\result\ Meaningful values should be returned by both tests. 
+
+
 
 \section{LB ``In the Wild''---Real-World WMS Test}
 \req\ All \LB services running, working grid infrastructure accessible (including permissions). 
@@ -480,12 +502,11 @@ including the checks.
 
 In all above cases: Watch the life cycle. Check the resulting state (\emph{Cleared}, \emph{Cancelled} or \emph{Aborted}). Check events received in the course of job execution; events from all relevant components must be present (NS, WM, JC, LM, and LRMS). 
 
-\how\ \ctblb{lb-test-wild.pl}
+\how\ \ctblb{lb-test-wild.sh}
 
 \result\ Jobs were submitted. Cancel operation worked where applicable. Resulting state was as expected (\emph{Cleared}, \emph{Cancelled} or \emph{Aborted}). Events were received from all components as expected.
 
-\note\ The test runs automatically. Bear in mind that in a real-life grid, even valid jobs may not always finish succesf
-ully. Analyze failures and re-run if necessary.
+\note\ The test runs automatically. Bear in mind that in a real-life grid, even valid jobs may not always finish successfully. Analyze failures and re-run if necessary.
 
 \note\ The number of jobs to generate may be specified using the \texttt{-n} argument
 
index 4dce9fb..b2925fc 100644 (file)
@@ -83,8 +83,8 @@ results
 one query but may arrive before a subsequent query is issued),
 and (ii)~the dependence on a~remote service to provide vital state information
 may block the local service if the remote one is not responding.
-These problems are addressed by providing \emph{local view} on the \LB data,
-see Sect.~\ref{local}.
+These problems are addressed by providing \emph{local view} of the \LB data,
+see Sect.~\ref{local}
 
 
 
@@ -295,7 +295,7 @@ collection or DAG.
 Job representing collection or DAG can be used to monitor status of the set, including
 information like how many subjobs is already finished etc.
 Support for non-gLite jobs, namely for PBS or Condor systems, is described in section
-\ref{sec:nonglite}.
+\ref{sec:nonglite}
 
 
 \subsubsection{Event ordering}%
@@ -484,7 +484,7 @@ Besides forwarding events to
 the server where events belonging to a~job are gathered from multiple sources,
 \LB infrastructure can store the logged events temporarily
 on the event source, and perform the processing described
-in Sect.~\ref{evprocess}.
+in Sect.~\ref{evprocess}
 In this setup, the logging vs.\ query semantics can be synchronous---it is
 guaranteed that a~successfully logged event is reflected in the result of
 an immediately following query,
@@ -662,7 +662,7 @@ form ``name = value''.
 Authorization information is also manipulated in this way. 
 
 Description of tools for event submission and ACL manipulation 
-can be found in Section \ref{s:lb-tools}.
+can be found in Section \ref{s:lb-tools}
 
 
 \subsubsection{Querying information}
@@ -706,7 +706,7 @@ The other mode of user interactions are the \LB notifications.
 information, but confortably wait for server to inform the user.
 
 User registers for notifications via notification client \verb'glite-lb-notify', described in Section
-\ref{s:lb-notify}. 
+\ref{s:lb-notify} 
 Conditions under which the notification is sent can be specified. For example - job XY reaches status
 DONE. In \LBver{1.x}, one or more JOBID's are required in the condition and only a single occurence 
 of a specific attribute is allowed among ANDed conditions. In \LBver{2.x}, more complex conditions are allowed.
@@ -858,6 +858,8 @@ Grid infrastructure as seen from the job (or end user) perspective.
 Thus \LB\ becomes a~data source for various real-tim Grid monitoring tools.
 
 \subsubsection{R-GMA feed}
+\emph{Note: This feature is now obsolete and only available in \LBver{1.x}.}
+
 The \LB server also supports streaming the most important data---the job
 state changes---to another monitoring system. It works as the
 notification service, sending information about job state changes to
@@ -867,7 +869,7 @@ has been developed. It supports sending job state changes to
 the R-GMA infrastructure that is part of the Grid monitoring
 infrastructure used in the EGEE Grid.
 
-Currently, only basic information about job state changes is provided
+Only basic information about job state changes is provided
 this way, taking into account the security limitation of the R-GMA. 
 
 \subsubsection{\LB Job Statistics}
@@ -910,7 +912,7 @@ when RB decides where jobs get submitted.
 
 
 \subsubsection{CREAM jobs}
-\LB 2.1 implements basic support for CREAM jobs. \LB gathers events from CREAM, performing both the mapping of CREAM attributes to WMS attributes (if possible) and storing CREAM-specific atributes. Thus, the jobs submitted directly to computing elements can be tracked by \LB as well as extended data from WMS. The CREAM job states are mapped to \LB ones according to Appendix \ref{a:creammapping}.
+\LB 2.1 implements basic support for CREAM jobs. \LB gathers events from CREAM, performing both the mapping of CREAM attributes to WMS attributes (if possible) and storing CREAM-specific atributes. Thus, the jobs submitted directly to computing elements can be tracked by \LB as well as extended data from WMS. The CREAM job states are mapped to \LB ones according to Appendix \ref{a:creammapping}
 
 CREAM events are generated by thee CREAM executor and LRMS, the generic \emph{CREAMStatus} event is generated when CREAM notifies that the job status has been changed.
 
index 6fb9994..7a450b3 100644 (file)
@@ -48,6 +48,9 @@
 \newpage
 \input{LBUG-Troubleshooting}
 
+\newpage
+\input{faq}
+
 \appendix
 \newpage
 \input{LBUG-Appendix}
index 61214b8..d8e41e8 100644 (file)
@@ -83,7 +83,7 @@ glite-lb-logevent -e ChangeACL -s UserInterface -p -j <job_id>          \
 
 Note that \LBver{1.x} supported only using VOMS group names, not full FQANs,
 whose support has been introduced in \LBver{2.0}. \LBver{1.x} also did not
-allowed the users to use symbolic names for the values specifying ACL
+allow the users to use symbolic names for the values specifying ACL
 setting and integers must be used instead. For example, to grant access
 right on a \LBver{1.x} server one has to use following syntax:
 
index 314ce77..620111f 100644 (file)
@@ -92,11 +92,8 @@ into the state machine
 and the job state updated
 accordingly.
 
-On the other hand, the server exposes querying interface (Fig.~\ref{f:comp-query}%
-\ifx\insideUG\undefined\relax\else
-, Sect.~\ref{retrieve}
-\fi
-).
+On the other hand, the server exposes querying interface
+(Fig.~\ref{f:comp-query}\ifx\insideUG\undefined\relax\else, Sect.~\ref{retrieve}\fi).
 The incoming user queries are transformed into SQL queries on the underlying
 database engine.
 The query result is filtered, authorization rules applied, and the result
index fdca0d7..924cb4c 100644 (file)
@@ -22,7 +22,7 @@
 
 % useful definitions
 \def\LB{L\&B\xspace}
-\newcommand\LBver[1]{\textbf{\LB version {#1}\xspace}}
+\newcommand\LBver[1]{\textbf{\LB version {#1}}}
 \def\JP{JP\xspace}
 %\def\eg{e.\,g.}
 \def\eg{for example\xspace}
diff --git a/org.glite.lb.doc/src/faq.tex b/org.glite.lb.doc/src/faq.tex
new file mode 100644 (file)
index 0000000..9fb76d0
--- /dev/null
@@ -0,0 +1,24 @@
+%
+%% Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+%% See http://www.eu-egee.org/partners for details on the copyright holders.
+%% 
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%% 
+%%     http://www.apache.org/licenses/LICENSE-2.0
+%% 
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%
+
+\section{FAQ---Frequently Asked Questions}
+\label{s:faq}
+
+\subsection{Job in State `Running' Despite Having Received the `Done' Event from LRMS}
+
+Jobs stay in state \emph{Running} until a \emph{Done} event is received from the workload management system. \emph{Done} events from local resource managers are not enough since the job in question may have been resubmitted in the meantime.
+
index fffe99d..2c65387 100644 (file)
@@ -45,8 +45,8 @@ The complete \LB Documentation consists of the following parts:
 
 \textbf{The following versions of \LB service are covered by these documents:}
 \begin{itemize}
-\item \LBver{2.2}: current development version, available through CVS only,
-\item \LBver{2.1}: currently in certification, to be released in April 2010,
+\item \LBver{2.2}: in development, available through CVS only,
+\item \LBver{2.1}: replacement for \LBver{2.0} in gLite 3.2,
 \item \LBver{2.0}: current stable version, in production as part of gLite 3.2,
 \item \LBver{1.x}: old stable version, in production as part of gLite 3.1.
 \end{itemize}
index f5c8fd3..44ed7b7 100644 (file)
@@ -25,5 +25,6 @@ stage:
 check:
 
 clean:
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 .PHONY: default all check install stage clean
index 0ef21e0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
+       'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -567,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -588,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -613,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -680,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -805,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 579161c..6af1f7e 100644 (file)
@@ -2,3 +2,12 @@
 - glite-LB Metapackage module now CVS-based
 - compile and build by make rather than inline commands
 
+3.2.11-1
+- Fixed handling of target 'clean' in Makefile
+3.2.12-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+
+3.2.12-2
+- Module rebuilt
+
index e31e71c..319a01b 100644 (file)
@@ -1,3 +1,3 @@
 # $Header
-module.version=3.2.10
-module.age=1
+module.version=3.2.12
+module.age=2
index ccfa702..7132b01 100644 (file)
@@ -68,7 +68,7 @@ install: compile
 clean:
        rm -rfv *.o *.lo *.loT .libs/ manpage.links manpage.refs
        rm -rvf harvester harvester-dbg glite-lb-harvester.*
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 harvester: harvester.o
        ${LINK} -o $@ $+ ${LIBS}
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index d6438b7..195a847 100644 (file)
 - Resource Broker from JDL for CREAM jobs
 - For CE stripping protocol from destination
 - Test script updates
+
+1.0.6-2
+- Module rebuilt
+
+1.0.7-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- Removed log4c calls in code rune manually
+
+1.0.8-1
+- IPv6-compliant implementation
+- Array boundary fix
+
+1.0.8-2
+- Module rebuilt
+
index da0ec6b..d7acc7e 100644 (file)
@@ -21,7 +21,6 @@ limitations under the License.
  * Real time monitor.
  */
 
-#include <arpa/inet.h>
 #include <netinet/in.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -35,13 +34,14 @@ limitations under the License.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#ifdef WITH_OLD_LB
+#if defined(WITH_OLD_LB) || !defined(USE_LOG4C)
 #include <syslog.h>
 #endif
 #include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <time.h>
+#include <netdb.h>
 #include <glite/security/glite_gss.h>
 #ifdef WITH_LBU_DB
 #include <glite/lbu/trio.h>
@@ -151,8 +151,6 @@ limitations under the License.
 #endif
 #endif
 
-// TODO: ipv6? :-)
-
 typedef struct {
        edg_wll_NotifId id;  // notification context (after bootstrap/rebind)
        char *id_str;        // notification id string
@@ -225,7 +223,7 @@ typedef struct {
 
 static const char rcsid[] = "@(#)$Id$";
 
-#ifdef WITH_OLD_LB
+#if defined(WITH_OLD_LB) || !defined(USE_LOG4C)
 static int rtm2syslog[] = {
        LOG_ERR,
        LOG_WARNING,
@@ -332,7 +330,7 @@ void lvprintf_func(thread_t *t, const char *description, int level, const char *
 
        if (level <= WRN && !config.daemonize) fprintf(stderr, RTM_TTY_RED);
        if (config.daemonize) {
-#ifdef WITH_OLD_LB
+#if defined(WITH_OLD_LB) || !defined(USE_LOG4C)
                openlog(NULL, LOG_PID | LOG_CONS, LOG_DAEMON);
                syslog(rtm2syslog[level], "%s", line);
                closelog();
@@ -1452,7 +1450,7 @@ quit:
 
 int load_notifs_file() {
        FILE *f;
-       char *results[5];
+       char *results[RTM_FILE_NOTIF_NUM];
        notif_t *new_notif;
        int err;
        char *notifidstr;
@@ -1632,7 +1630,6 @@ void db_free_notifs() {
 
 
 void *notify_thread(void *thread_data) {
-       struct sockaddr_in addr;
        int i, j, err;
        time_t now, bootstrap;
        edg_wll_NotifId notifid;
@@ -1644,7 +1641,9 @@ void *notify_thread(void *thread_data) {
        thread_t *t = (thread_t *)thread_data;
        edg_wll_Context ctx = NULL;
        int flags = 0;
-
+       struct addrinfo *ai = NULL;
+       struct addrinfo hints;
+       char *portstr;
        const int       one = 1;
 
        lprintf(t, DBG, "thread started");
@@ -1659,8 +1658,26 @@ void *notify_thread(void *thread_data) {
        if (config.cert) edg_wll_SetParam(ctx, EDG_WLL_PARAM_X509_CERT, config.cert);
        if (config.key) edg_wll_SetParam(ctx, EDG_WLL_PARAM_X509_KEY, config.key);
 
-       // socket
-       if ((sock = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
+       // listen
+       memset(&hints, 0, sizeof hints);
+       hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | AI_PASSIVE | AI_ADDRCONFIG;
+       hints.ai_socktype = SOCK_STREAM;
+       asprintf(&portstr, "%d", listen_port ? (listen_port + t->id) : 0);
+       if (!portstr) {
+               lprintf(t, ERR, "can't convert port number: ENOMEM");
+               goto exit;
+       }
+       err = getaddrinfo(NULL, portstr, &hints, &ai);
+       free(portstr); portstr = NULL;
+       if (err != 0) {
+               lprintf(t, ERR, "getaddrinfo() failed: %s", gai_strerror(err));
+               goto exit;
+       }
+       if (!ai) {
+               lprintf(t, ERR, "no result from getaddrinfo()");
+               goto exit;
+       }
+       if ((sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) {
                lprintf(t, ERR, "can't create socket: %s", strerror(errno));
                goto exit;
        }
@@ -1668,11 +1685,7 @@ void *notify_thread(void *thread_data) {
 
        setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
 
-       memset(&addr, 0, sizeof addr);
-       addr.sin_family = AF_INET;
-       if (listen_port) addr.sin_port = htons(listen_port + t->id);
-       addr.sin_addr.s_addr = INADDR_ANY;
-       if (bind(sock, (const struct sockaddr*)&addr, sizeof addr) != 0) {
+       if (bind(sock, ai->ai_addr, ai->ai_addrlen) != 0) {
                lprintf(t, ERR, "can't bind socket: %s, port = %d", strerror(errno), listen_port ? listen_port + t->id : -1);
                goto exit;
        }
@@ -1680,6 +1693,7 @@ void *notify_thread(void *thread_data) {
                lprintf(t, ERR, "can't listen on socket: %s", strerror(errno));
                goto exit;
        }
+       freeaddrinfo(ai); ai = NULL;
 
 #ifdef WITH_LBU_DB
        if (db_init(t, &t->dbctx) == 0)
@@ -2018,6 +2032,7 @@ cont:
 
 exit:  
        if (sock != -1) close(sock);
+       if (ai) freeaddrinfo(ai);
 //     for (i = 0; conditions[i]; i++) free(conditions[i]);
        if (t->nservers && quit != RTM_QUIT_PRESERVE && quit != RTM_QUIT_RELOAD) {
                for (i = 0; i < t->nservers; i++) {
@@ -2740,7 +2755,7 @@ quit:
        if (config.pidfile && !config.guard) {
                if (remove(config.pidfile) == -1) lprintf(NULL, WRN, "can't remove pidfile '%s': %s", config.pidfile, strerror(errno));
        }
-#ifdef WITH_OLD_LB
+#ifndef WITH_OLD_LB
        if (config.daemonize) glite_common_log_fini();
 #endif
 
index a6c4f21..0d662fe 100755 (executable)
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -76,8 +77,8 @@ my %extern_prefix = (
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -89,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 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/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       'security' => [qw/proxyrenewal/],
+       '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/ ],
        );
 
 
@@ -239,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -261,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -334,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -351,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -363,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -378,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -387,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -395,7 +398,7 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.logger-msg' => [ qw/
                lb.logger
@@ -404,33 +407,35 @@ for my $jar (keys %need_jars) {
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -441,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -484,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -502,7 +534,7 @@ sub mkinc
        undef %aux;
        my @m=qw/
 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
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -519,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -563,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -583,9 +616,22 @@ BEGIN{
                aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -602,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -627,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -694,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -824,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 5120efe..541eca0 100644 (file)
@@ -42,13 +42,13 @@ else
 endif
 
 DEBUG:=-g -O0
-CFLAGS:=${DEBUG} \
+CFLAGS:=${CFLAGS} ${DEBUG} \
        -I${stagedir}/include -I${top_srcdir}/src -I${top_srcdir}/interface \
        -D_GNU_SOURCE \
        ${COVERAGE_FLAGS} \
        ${VERSION} ${LB_STANDALONE_FLAGS} ${LB_PERF_FLAGS} 
 
-LDFLAGS:=-L${stagedir}/${libdir} \
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} \
        ${COVERAGE_FLAGS} 
 
 COMPILE:=libtool --mode=compile ${CC} 
@@ -228,5 +228,5 @@ il_test.o IlTestBase.o server_msgTest.o event_queueTest.o input_queue_socketTest
        ${CXX} ${CFLAGS} ${TEST_INC} -c $< -o $@
 
 clean:
-       rm -rvf .libs/ *.o *.lo ${LOGD} ${INTERLOGD} ${NOTIF_INTERLOGD} ${MAN_GZ}
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf .libs/ *.o *.lo *.no ${LOGD} ${INTERLOGD} ${NOTIF_INTERLOGD} ${MAN_GZ}
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 68ae914..87cf2e3 100644 (file)
@@ -83,7 +83,7 @@ protocol+server prefix from the jobid and appending the rest to this
 .I PREFIX.
 
 .I PREFIX
-defaults to /tmp/dglogd.log.
+defaults to /var/glite/log/dglogd.log.
 
 On startup, interlogger checks all files matching the pattern
 .I PREFIX*.
index 2a04be6..6c6590a 100644 (file)
@@ -61,7 +61,7 @@ protocol+server prefix from the jobid and appending the rest to this
 .I PREFIX. 
 
 .I PREFIX 
-defaults to /tmp/dglogd.log.
+defaults to /var/glite/log/dglogd.log.
 
 The value has to be same as used in the cooperating glite-lb-logd.
 
index a4bee80..a320850 100644 (file)
 2.0.4-2
 - install libraries into $libdir
 
+2.0.6-1
+- Pidfiles support in daemons
+
+2.0.7-1
+- Startup script fixes
+
+2.0.8-1
+- Compatibility with IPv6 compliant clients
+
 2.1.0-1
 - Compliance with the Common Logging Format
 - Fixed startup script (Savannah Bug #29081)
 - Introduce a separate logging category for notification interlogger
 - Fix problem with dropping unused notoifications
 
+2.1.5-1
+- Perftest script accepts argument -i to save pidfile in /tmp
+
+2.1.6-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+
+2.1.7-1
+- Hostname parsing adjusted to handle IPv6 addresses
+- Default file locations updated in documentation
+
+2.1.8-1
+- Fixed propagation of error messages
+
index 726666c..0f7bd32 100644 (file)
@@ -59,7 +59,7 @@ event_queue_create(char *server_name, struct il_output_plugin *output)
   } else {
          s = s + 3;
   }
-  p = strchr(s, ':');
+  p = strrchr(s, ':');
   if(p) {
     *p++ = 0;
     c = ':';
index b9a5647..3b8a86c 100644 (file)
@@ -142,7 +142,11 @@ set_error(int code, long minor, char *msg)
     case EDG_WLL_GSS_ERROR_HERRNO:
       snprintf(err->msg, IL_ERR_MSG_LEN, "%s: %s", msg, hstrerror(errno));
       break;
+
+    default:
+      strncpy(err->msg, msg, IL_ERR_MSG_LEN);
     }
+    break;
 
   default:
          strncpy(err->msg, msg, IL_ERR_MSG_LEN);
index 2fd66fd..7a88202 100644 (file)
@@ -69,7 +69,7 @@ GRIDSITE_LIBS = -L${gridsite_prefix}/${libdir} -L${gridsite_prefix}/lib -lgridsi
 
 LCAS_CFLAGS=-I${lcas_prefix}/include
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${WS_CFLAGS} ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
@@ -96,7 +96,7 @@ else
        SRVBONES_LIB:= -L${stagedir}/${libdir} -lglite_lbu_server_bones
        LB_COMMON_LIB:=-L${stagedir}/${libdir} -lglite_lb_common_${nothrflavour}
        LB_UTILS_DB_LIB:=-L${stagedir}/${libdir} -lglite_lbu_db
-       LDFLAGS:= -L${stagedir}/${libdir}
+       LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
 endif
 
 # LB_MACHINE_LIB:=${stagedir}/${libdir}/libglite_lb_statemachine.a
@@ -377,7 +377,7 @@ endif
 
 clean:
        rm -rvf *.c *.h *.ch *.xh *.xml *.nsmap *.o *.lo .libs glite-lb-* ${STATIC_LIB_BK} ${LCAS_PLUGIN_LIB} test* ${MAN_GZ} ${EXAMPLES}
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.c: %.c.T
        rm -f $@
index 0b1fdce..d0a6ce9 100755 (executable)
@@ -239,9 +239,7 @@ stop()
        stop_daemon "glite-lb-notif-interlogd" $NOTIF_IL_PIDFILE
 
        stop_daemon "glite-lb-bkserverd" $BK_PIDFILE
-       if test x"$GLITE_LB_EXPORT_ENABLED" = x"true"; then
-               stop_daemon "glite-jp-importer" $jp_importer_pidfile
-       fi
+       stop_daemon "glite-jp-importer" $jp_importer_pidfile
 
        stop_daemon "glite-lb-interlogd" $PROXY_IL_PIDFILE
 
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 60ca665..af1ce96 100644 (file)
@@ -264,6 +264,10 @@ File prefix for events.
 .BI -G\fR,\fP --proxy-purge
 Enable automatic purging of the jobs in terminal state for proxy service (disabled by default, purging cron job installed by YAIM).
 
+.TP
+.BI -E\fR,\fP --exclusive-zombies-off
+Disable checking of purged jobs when registering jobs with the EDG_WLL_LOGLFLAG_EXCL flag set. 
+
 .\".SH USAGE
 .\" Add any additional description here
 
index c40ed59..2466f7a 100644 (file)
 2.0.3-2
 - Rebuild with lb.state-machine 1.0.2-1
 
----
-Crystal ball:
+2.0.3-3
+- install libraries into $libdir
+- buildtime dependency pn c-ares
+
 2.0.4-1
 - Consider arch libdir when linking c-ares
 - Checking the c-ares version, fix for c-ares >= 1.5.0.
 
 2.0.5-1
 - Reflect updates in the database module
-- Adjusted grey job purges (purge undefined jobs etc.)
+- Adjusted grey job purges
+- Purge undefined or unknown jobs
 
-2.0.3-3
-- install libraries into $libdir
-- buildtime dependency on c-ares
+2.0.6-1
+- Fixed collection state with cancelled subjobs
+
+2.0.7-1
+- Starting proxy support
+- Fixed collection state with cancelled subjobs
+
+2.0.7-2
+- Rebuild with gridsite 1.5.10.5-3
+
+2.0.8-1
+- Startup script fixes
+
+2.0.9-1
+- Compatibility with IPv6 compliant clients
 
 2.1.0-1
 - Advanced Autorization (used by LCAS plugin too, old configuration file not supported anymore)
@@ -143,3 +158,30 @@ Crystal ball:
 
 2.1.4-1
 - Broader authorization policy format
+
+2.1.5-1
+- READ_ALL and PURGE authorization
+- Refactoring of WS error handling
+
+2.1.6-1
+- Implemented checking of zombie jobs for JobID exclusivity
+
+2.1.7-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- More robust reaction to errors while parsing client requests
+- Extended job state transition statistics
+
+2.1.8-1
+- Statistics turned on by default
+- Old implementation of statistics optimized
+- Memory handling bug fixes
+- Two sets of statistic functions implemented for bw compatibility
+
+2.1.9-1
+- Support for IPv6 literal addresses
+- Fixed jobid detection in HTTP GET requests
+- Provisional handling of c-ares name translation bugs
+
+2.1.10-1
+- Fixed precedence in selecting IPv6/IPv4
+
index 0228472..40504a9 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.4
+module.version=2.1.10
 module.age=1
index ed18343..e0d302b 100644 (file)
@@ -48,6 +48,7 @@ int   enable_lcas;
 int    proxy_purge;
 struct _edg_wll_authz_policy authz_policy;
 char    *policy_file = NULL;
+int    exclusive_zombies;
 
 static struct option opts[] = {
        { "mysql",1,NULL,'m' },
index 3e074c8..f0a2e87 100644 (file)
@@ -148,7 +148,7 @@ static int                          noAuth = 0;
 static int                             noIndex = 0;
 static int                             strict_locking = 0;
 static int greyjobs = 0;
-static int count_statistics = 0;
+static int count_statistics = 1;
 static int                             hardJobsLimit = 0;
 static int                             hardEventsLimit = 0;
 static int                             hardRespSizeLimit = 0;
@@ -184,6 +184,7 @@ static char *           port;
 static time_t          rss_time = 60*60;
 char *         policy_file = NULL;
 struct _edg_wll_authz_policy   authz_policy = { NULL, 0};
+static int             exclusive_zombies = 1;
 
 
 
@@ -234,10 +235,11 @@ static struct option opts[] = {
        {"proxy-purge", 0,      NULL,   'G'},
        {"rss-time",    1,      NULL,   'I'},
        {"policy",      1,      NULL,   'l'},
+       {"exclusive-zombies-off",       0,      NULL,   'E'},
        {NULL,0,NULL,0}
 };
 
-static const char *get_opt_string = "Ac:k:C:V:p:a:drm:ns:i:S:D:J:jR:F:xOL:N:X:Y:T:t:zb:gPBo:q:W:Z:GI:l:"
+static const char *get_opt_string = "Ac:k:C:V:p:a:drm:ns:i:S:D:J:jR:F:xOL:N:X:Y:T:t:zb:gPBo:q:W:Z:GI:l:E"
 #ifdef GLITE_LB_SERVER_WITH_WS
        "w:"
 #endif
@@ -296,6 +298,7 @@ static void usage(char *me)
                "\t-G,--proxy-purge\t enable automatic purge on proxy service (disabled by default)\n"
                "\t-I,--rss-time\t age (in seconds) of job states published via RSS\n"
                "\t-l,--policy\tauthorization policy file\n"
+               "\t-E,--exclusive-zombies-off\twith 'exclusive' flag, allow reusing IDs of purged jobs\n"
 
        ,me);
 }
@@ -509,6 +512,8 @@ int main(int argc, char *argv[])
                          break;
                case 'l': policy_file = strdup(optarg);
                          break;
+               case 'E': exclusive_zombies = 0;
+                         break;
                case '?': usage(name); return 1;
        }
 
@@ -609,7 +614,7 @@ int main(int argc, char *argv[])
        if (mode & SERVICE_SERVER) {
                if ( fake_host )
                {
-                       char    *p = strchr(fake_host,':');
+                       char    *p = strrchr(fake_host,':');
 
                        if (p)
                        {
@@ -1277,6 +1282,7 @@ int bk_handle_connection(int conn, struct timeval *timeout, void *data)
        }
        ctx->strict_locking = strict_locking;
        ctx->greyjobs = greyjobs;
+       ctx->exclusive_zombies = exclusive_zombies;
 
        return 0;
 }
@@ -1576,7 +1582,7 @@ int bk_accept_serve(int conn, struct timeval *timeout, void *cdata)
                return err;
        }
 
-       if (httpErr == HTTP_BADREQ)
+       if (httpErr == HTTP_BADREQ && body)
                err = try_accept_ws(conn, timeout, cdata, body, strlen(body) + 1);
        if (httpErr != HTTP_BADREQ || err)
                edg_wll_DoneHTTP(ctx, resp, hdrOut, bodyOut);
@@ -1833,13 +1839,6 @@ static int asyn_gethostbyaddr(char **name, char **service, const struct sockaddr
        int     err = NETDB_INTERNAL;
        struct sockaddr_in      v4;
 
-/* start timer */
-        gettimeofday(&start_time,0);
-
-/* ares init */
-        if ( ares_init(&channel) != ARES_SUCCESS ) return(NETDB_INTERNAL);
-       memset((void *) &ar, 0, sizeof(ar));
-
        if (addr->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)addr)->sin6_addr)) {
                v4.sin_family = AF_INET;
                v4.sin_port = ((struct sockaddr_in6 *)addr)->sin6_port;
@@ -1848,6 +1847,18 @@ static int asyn_gethostbyaddr(char **name, char **service, const struct sockaddr
                len = sizeof(v4);
        } 
 
+       if (!numeric && addr->sa_family == AF_INET6) {
+               /* don't bother, c-ares up to version 1.7.3 has fatal bug */
+               return NETDB_INTERNAL;
+       }
+
+/* start timer */
+        gettimeofday(&start_time,0);
+
+/* ares init */
+        if ( ares_init(&channel) != ARES_SUCCESS ) return(NETDB_INTERNAL);
+       memset((void *) &ar, 0, sizeof(ar));
+
 /* query DNS server asynchronously */
        if (name) flags |= ARES_NI_LOOKUPHOST | ( numeric? ARES_NI_NUMERICHOST : 0);
        if (service) flags |= ARES_NI_LOOKUPSERVICE | ( numeric? ARES_NI_NUMERICSERV : 0);
@@ -1886,7 +1897,14 @@ static int asyn_gethostbyaddr(char **name, char **service, const struct sockaddr
         }
 
        if (ar.err == NETDB_SUCCESS) {
-               if (name) *name = ar.host;
+               if (name) {
+                       if (numeric && addr->sa_family == AF_INET6) {
+                               asprintf(name,"[%s]",ar.host);
+                               free(ar.host);
+                       } else {
+                               *name = ar.host;
+                       }
+               }
                if (service) *service = ar.service;
        }
        err = ar.err;
index ff44b33..9aaca27 100644 (file)
@@ -123,7 +123,7 @@ edg_wll_NotifSend(edg_wll_Context       context,
        long                    filepos;
        char               *ulm_data,
                                   *reg_id_s,
-                                  *event_file;
+                                  *event_file = NULL;
 
        if((ret=notif_create_ulm(context, 
                                 reg_id, 
@@ -158,8 +158,9 @@ edg_wll_NotifSend(edg_wll_Context       context,
        ret = 0;
 
 out:
-       if(ulm_data) free(ulm_data);
-       if(reg_id_s) free(reg_id_s);
+       free(event_file);
+       free(ulm_data);
+       free(reg_id_s);
        if(ret) edg_wll_UpdateError(context, ret, "edg_wll_NotifSend()");
        return(ret);
 }
index ef067c8..fa75a56 100644 (file)
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
-
+#ident "$Header$"
 
 #include <inttypes.h>
 #include <stdio.h>
index cfba7a2..8dc453a 100644 (file)
@@ -671,10 +671,11 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
 
        /* GET /[jobId]: Job Status */
                else if (*requestPTR=='/'
-                       && strncmp(requestPTR, "/RSS", strlen("/RSS")) 
-                       && strncmp(requestPTR, "/NOTIF", strlen("/NOTIF"))
-                       && *(requestPTR+strlen("/NOTIF")-1) != ':'
-                       && !isspace(*(requestPTR+strlen("/NOTIF")-1))) {
+                       && strncmp(requestPTR, "/RSS:", strlen("/RSS:")) 
+                       && ( strncmp(requestPTR, "/NOTIF", strlen("/NOTIF"))
+                            || *(requestPTR+strlen("/NOTIF")) != ':'
+                               && !isspace(*(requestPTR+strlen("/NOTIF"))))
+                       ) {
                        edg_wlc_JobId jobId = NULL;
                        char *pom1,*fullid = NULL;
                        edg_wll_JobStat stat;
@@ -940,7 +941,9 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                        memset(&request,0,sizeof(request));
                        memset(&result,0,sizeof(result));
 
-                       if ( !parsePurgeRequest(ctx,messageBody,(int (*)()) edg_wll_StringToStat,&request) ) {
+                       if (parsePurgeRequest(ctx,messageBody,(int (*)()) edg_wll_StringToStat,&request))
+                               ret = HTTP_BADREQ;
+                       else {
                                /* do throttled purge on background if requested */
                                if ((request.flags & EDG_WLL_PURGE_BACKGROUND)) {
                                        retval = fork();
@@ -1190,15 +1193,15 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                else if (!strncmp(requestPTR,KEY_STATS_REQUEST,sizeof(KEY_STATS_REQUEST)-1)) {
                        char *function;
                        edg_wll_QueryRec **conditions;
-                       edg_wll_JobStatCode major = EDG_WLL_JOB_UNDEF;
+                       edg_wll_JobStatCode base = EDG_WLL_JOB_UNDEF;
+                       edg_wll_JobStatCode final = EDG_WLL_JOB_UNDEF;
                        time_t from, to;
                        int i, j, minor, res_from, res_to;
-                       float rate = 0, duration = 0;
-                       
-                       
+                       float *rates = NULL, *durations = NULL , *dispersions = NULL;
+                       char **groups = NULL;
                        
                        if (parseStatsRequest(ctx, messageBody, &function, &conditions, 
-                                               &major, &minor, &from, &to))
+                                               &base, &final, &minor, &from, &to))
                                ret = HTTP_BADREQ;
                        else {
                                int     fatal = 0, err = 0;
@@ -1207,12 +1210,20 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                                // navratove chyby nejsou zname, nutno predelat dle aktualni situace
                                if (!strcmp(function,"Rate")) 
                                        err = edg_wll_StateRateServer(ctx,
-                                               conditions[0], major, minor, 
-                                               &from, &to, &rate, &res_from, &res_to); 
+                                               conditions[0], base, minor, 
+                                               &from, &to, &rates, &groups, 
+                                               &res_from, &res_to); 
                                else if (!strcmp(function,"Duration"))
                                        err = edg_wll_StateDurationServer(ctx,
-                                               conditions[0], major, minor, 
-                                               &from, &to, &duration, &res_from, &res_to); 
+                                               conditions[0], base, minor, 
+                                               &from, &to, &durations, &groups,
+                                               &res_from, &res_to); 
+                               else if (!strcmp(function, "DurationFromTo"))
+                                       err = edg_wll_StateDurationFromToServer(
+                                               ctx, conditions[0], base, final,
+                                                minor, &from, &to, &durations,
+                                                &dispersions, &groups, 
+                                               &res_from, &res_to);
                                
                                switch (err) {
                                        case 0: if (html) ret = HTTP_NOTIMPL;
@@ -1229,9 +1240,19 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                                }
                                /* glue errors (if eny) to XML responce */ 
                                if (!html && !fatal)
-                                       if (edg_wll_StatsResultToXML(ctx, from, to, rate, 
-                                                       duration, res_from, res_to, &message))
+                                       if (edg_wll_StatsResultToXML(ctx, from,
+                                               to, rates, durations, 
+                                               dispersions, groups,
+                                               res_from, res_to, &message))
                                                ret = HTTP_INTERNAL;
+                               if (rates) free(rates);
+                               if (durations) free(durations);
+                               if (dispersions) free(dispersions);
+                               if (groups){
+                                       for(i = 0; groups[i]; i++)
+                                               free(groups[i]);
+                                       free(groups);
+                               }
                        }
                        
                        free(function);
index 73f274d..773ee2a 100644 (file)
@@ -442,7 +442,7 @@ static void startStatsRequest(void *data, const char *el, const char **attr)
                case 1: if (!strcasecmp(el,"and")) {
                                XMLCtx->jobQueryRec_begin = XML_GetCurrentByteIndex(XMLCtx->p);
                        }
-                       else if ( (strcasecmp(el,"major")) && (strcasecmp(el,"minor")) && 
+                       else if ( (strcasecmp(el,"base_state")) && (strcasecmp(el,"final_state")) && (strcasecmp(el,"minor")) && 
                                (strcasecmp(el,"from")) && (strcasecmp(el,"to")) ) unexp()
                        break;
                case 2: /* fall through */
@@ -919,10 +919,14 @@ static void endStatsRequest(void *data, const char *el UNUSED_VAR)
         edg_wll_XML_ctx *XMLCtx = data;
 
         if (XMLCtx->level == 2) {
-                if (!strcmp(XMLCtx->element,"major")) {
-                       XMLCtx->statsMajor = 
+                if (!strcmp(XMLCtx->element,"base_state")) {
+                       XMLCtx->statsBaseState = 
                                edg_wll_from_string_to_edg_wll_JobStatCode(XMLCtx);
                }
+               else if (!strcmp(XMLCtx->element,"final_state")) {
+                        XMLCtx->statsFinalState =
+                                edg_wll_from_string_to_edg_wll_JobStatCode(XMLCtx);
+                }
                else if (!strcmp(XMLCtx->element,"minor")) {
                        XMLCtx->statsMinor = edg_wll_from_string_to_int(XMLCtx);
                }
@@ -1284,7 +1288,7 @@ int parseLoadRequest(edg_wll_Context ctx, char *messageBody, edg_wll_LoadRequest
 
 
 /* parse Stats request from client */
-int parseStatsRequest(edg_wll_Context ctx, char *messageBody, char **function, edg_wll_QueryRec ***conditions, edg_wll_JobStatCode *major, int *minor, time_t *from, time_t *to) 
+int parseStatsRequest(edg_wll_Context ctx, char *messageBody, char **function, edg_wll_QueryRec ***conditions, edg_wll_JobStatCode *base_state, edg_wll_JobStatCode *final_state, int *minor, time_t *from, time_t *to) 
 {
        int     ret;
        edg_wll_XML_ctx         XMLCtx;
@@ -1294,7 +1298,8 @@ int parseStatsRequest(edg_wll_Context ctx, char *messageBody, char **function, e
        /* returns emty variables as default; only some variables will be filled in */
        /* depending on vaule of XMLCtx.notifFunction */
        *function = NULL;
-       *major = EDG_WLL_JOB_UNDEF;
+       *base_state = EDG_WLL_JOB_UNDEF;
+       *final_state = EDG_WLL_JOB_UNDEF;
        *minor = 0;
        *from = 0;
        *to = 0;
@@ -1340,7 +1345,8 @@ int parseStatsRequest(edg_wll_Context ctx, char *messageBody, char **function, e
 
                *function = NULL;
                *conditions = NULL;
-               *major = EDG_WLL_JOB_UNDEF;
+               *base_state = EDG_WLL_JOB_UNDEF;
+               *final_state = EDG_WLL_JOB_UNDEF;
                *minor = 0;
                *from = 0;
                *to = 0;
@@ -1348,7 +1354,8 @@ int parseStatsRequest(edg_wll_Context ctx, char *messageBody, char **function, e
        else {
                *function = XMLCtx.statsFunction;
                *conditions = XMLCtx.statsConditions;
-               *major = XMLCtx.statsMajor;
+               *base_state = XMLCtx.statsBaseState;
+               *final_state = XMLCtx.statsFinalState;
                *minor = XMLCtx.statsMinor;
                *from = XMLCtx.statsFrom;
                *to = XMLCtx.statsTo;
@@ -2066,22 +2073,36 @@ int edg_wll_StatsResultToXML(
                 edg_wll_Context ctx,
                time_t from,
                time_t to,
-               float rate,
-               float duration,
+               float *rates,
+               float *durations,
+               float *dispersions,
+               char  **groups,
                int res_from,
                int res_to,
                 char **message)
 {
         char *pomA, *pomB;
-
+       int i;
 
        pomA = strdup("");
        edg_wll_add_time_t_to_XMLBody(&pomA, from, "from", -1);
        edg_wll_add_time_t_to_XMLBody(&pomA, to, "to", -1);
-       edg_wll_add_float_to_XMLBody(&pomA, rate, "rate", 0);
-       edg_wll_add_float_to_XMLBody(&pomA, duration, "duration", 0);
        edg_wll_add_int_to_XMLBody(&pomA, res_from, "res_from", -1);
-       edg_wll_add_int_to_XMLBody(&pomA, res_to, "res_to", -1);
+        edg_wll_add_int_to_XMLBody(&pomA, res_to, "res_to", -1);
+
+       if (groups) for (i = 0; groups[i]; i++){
+               asprintf(&pomB, "%s\t\t<stat>\n", pomA);
+               pomA = pomB;
+               edg_wll_add_string_to_XMLBody(&pomA, groups[i], "group", NULL);
+               if (rates)
+                       edg_wll_add_float_to_XMLBody(&pomA, rates[i], "rate", -1.0f);
+               if (durations)
+                       edg_wll_add_float_to_XMLBody(&pomA, durations[i], "duration", -1.0f);
+               if (dispersions)
+                       edg_wll_add_float_to_XMLBody(&pomA, dispersions[i], "dispersion", -1.0f);
+               asprintf(&pomB, "%s\t\t</stat>\n", pomA);
+               pomA = pomB;
+       }
 
        if (ctx->errDesc || ctx->errCode)
                trio_asprintf(&pomB,"%s code=\"%d\" desc=\"%|Xs\">\r\n%s%s",
@@ -2089,7 +2110,7 @@ int edg_wll_StatsResultToXML(
        else
                trio_asprintf(&pomB,"%s>\r\n%s%s", STATS_RESULT_BEGIN, pomA, STATS_RESULT_END);
        free(pomA);
-
+printf("XXX %s XXX\n", pomB);
         *message = pomB;
         return 0;
 }
index 4096062..fc92bdd 100644 (file)
@@ -50,9 +50,9 @@ int edg_wll_IndexedAttrsToXML(edg_wll_Context ctx, char **message);
 int edg_wll_NotifResultToXML(edg_wll_Context ctx, time_t validity, char **message);
 int edg_wll_QuerySequenceCodeResultToXML(edg_wll_Context ctx, char *source, char **message);
 
-int edg_wll_StatsResultToXML(edg_wll_Context,time_t,time_t,float,float,int,int,char **);
+int edg_wll_StatsResultToXML(edg_wll_Context,time_t,time_t,float*,float*,float*,char**,int,int,char **);
 
-int parseStatsRequest(edg_wll_Context,char *,char **,edg_wll_QueryRec ***,edg_wll_JobStatCode *,int *,time_t *,time_t *);
+int parseStatsRequest(edg_wll_Context,char *,char **,edg_wll_QueryRec ***,edg_wll_JobStatCode *,edg_wll_JobStatCode *,int *,time_t *,time_t *);
 
 
 #ifdef __cplusplus
index 1d0b9f1..a8fe6fa 100644 (file)
@@ -126,7 +126,7 @@ int edg_wll_NotifMatch(edg_wll_Context ctx, const edg_wll_JobStat *oldstat, cons
                        free(ju); ju = NULL;
 
                        dest = strdup(jobc[1]);
-                       if ( !(aux = strchr(dest, ':')) )
+                       if ( !(aux = strrchr(dest, ':')) )
                        {
                                edg_wll_SetError(ctx, EINVAL, "Can't parse notification destination");
                                free(dest);
@@ -225,9 +225,9 @@ static int notif_match_conditions(edg_wll_Context ctx,const edg_wll_JobStat *old
  */
 static int notif_check_acl(edg_wll_Context ctx,const edg_wll_JobStat *stat,const char *recip, int *authz_flags)
 {
-       edg_wll_Acl     acl = calloc(1,sizeof *acl);
        int             ret;
        struct _edg_wll_GssPrincipal_data princ;
+       edg_wll_Acl     acl = NULL;
 
        memset(&princ, 0, sizeof(princ));
        *authz_flags = 0;
@@ -240,6 +240,7 @@ static int notif_check_acl(edg_wll_Context ctx,const edg_wll_JobStat *stat,const
                return 1;
 
        if (stat->acl) {
+               acl =  calloc(1,sizeof *acl);
                ret = edg_wll_DecodeACL(stat->acl,&acl->value);
                if (ret) {
                        edg_wll_FreeAcl(acl);
index 34e9bc8..e36b6c5 100644 (file)
@@ -125,6 +125,7 @@ int edg_wll_NotifNewServer(
                        goto cleanup;
                }
                if ( !strncmp(address_override, "0.0.0.0", aux-address_override) || 
+                    !strncmp(address_override, "[::]", aux-address_override) ||
                     !strncmp(address_override, "::", aux-address_override) )
                        trio_asprintf(&addr_s, "%s:%s", ctx->connections->serverConnection->peerName, aux+1);
        }
@@ -248,6 +249,7 @@ int edg_wll_NotifBindServer(
                                goto rollback;
                        }
                        if ( !strncmp(address_override, "0.0.0.0", aux-address_override) ||
+                            !strncmp(address_override, "[::]", aux-address_override) ||
                             !strncmp(address_override, "::", aux-address_override) )
                                trio_asprintf(&addr_s, "%s:%s", ctx->connections->serverConnection->peerName, aux+1);
                }
@@ -669,7 +671,7 @@ static int update_notif(
        }
        if ( dest )
        {
-               host = strchr(dest, ':');
+               host = strrchr(dest, ':');
                port = atoi(host+1);
                if ( !(host = strndup(dest, host-dest)) )
                {
index 4319c7e..f727591 100644 (file)
@@ -25,6 +25,7 @@ limitations under the License.
 #include <stdio.h>
 #include <errno.h>
 #include <time.h>
+#include <math.h>
 
 #include "glite/lb/events.h"
 #include "glite/lb/jobstat.h"
@@ -35,11 +36,12 @@ limitations under the License.
 #include "glite/jobid/strmd5.h"
 
 #include "stats.h"
-#include "authz_policy.h"
+
+#define GROUPS_HASHTABLE_SIZE 1000
+
 static int stats_inc_counter(edg_wll_Context,const edg_wll_JobStat *,edg_wll_Stats *);
 static int stats_record_duration(edg_wll_Context,const edg_wll_JobStat *,const edg_wll_JobStat *,edg_wll_Stats *);
-
-#define dprintf(x) { printf("[%d] ",getpid()); printf x; }
+static int stats_record_duration_fromto(edg_wll_Context ctx, const edg_wll_JobStat *from, const edg_wll_JobStat *to, edg_wll_Stats *stats);
 
 /* XXX: should be configurable at run time */
 static struct _edg_wll_StatsArchive default_archives[] = { 
@@ -55,13 +57,18 @@ static edg_wll_QueryRec default_group[2] = {
 };
 
 static edg_wll_Stats default_stats[] = {
-       { STATS_COUNT, default_group, EDG_WLL_JOB_READY, 0, default_archives },
-       { STATS_COUNT, default_group, EDG_WLL_JOB_SCHEDULED, 0, default_archives },
-       { STATS_COUNT, default_group, EDG_WLL_JOB_RUNNING, 0, default_archives },
-       { STATS_COUNT, default_group, EDG_WLL_JOB_DONE, EDG_WLL_STAT_OK, default_archives },
-       { STATS_COUNT, default_group, EDG_WLL_JOB_DONE, EDG_WLL_STAT_FAILED, default_archives },
-       { STATS_DURATION, default_group, EDG_WLL_JOB_SCHEDULED, 0, default_archives },
-       { STATS_DURATION, default_group, EDG_WLL_JOB_RUNNING, 0, default_archives },
+       { STATS_COUNT, default_group, EDG_WLL_JOB_READY, 0, 0, default_archives },
+       { STATS_COUNT, default_group, EDG_WLL_JOB_SCHEDULED, 0, 0, default_archives },
+       { STATS_COUNT, default_group, EDG_WLL_JOB_RUNNING, 0, 0, default_archives },
+       { STATS_COUNT, default_group, EDG_WLL_JOB_DONE, 0, EDG_WLL_STAT_OK, default_archives },
+       { STATS_COUNT, default_group, EDG_WLL_JOB_DONE, 0, EDG_WLL_STAT_FAILED, default_archives },
+       { STATS_DURATION, default_group, EDG_WLL_JOB_SCHEDULED, 0, 0, default_archives },
+       { STATS_DURATION, default_group, EDG_WLL_JOB_RUNNING, 0, 0, default_archives },
+       { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_RUNNING, 0, default_archives },
+       { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_DONE, EDG_WLL_STAT_OK, default_archives },
+        { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_DONE, EDG_WLL_STAT_FAILED, default_archives },
+        { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_RUNNING, EDG_WLL_JOB_DONE, EDG_WLL_STAT_OK, default_archives },
+        { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_RUNNING, EDG_WLL_JOB_DONE, EDG_WLL_STAT_FAILED, default_archives },
        { STATS_UNDEF, }
        
 };
@@ -96,6 +103,17 @@ int edg_wll_InitStatistics(edg_wll_Context ctx)
                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, 
                        "stats: using %s",fname);
                unlink(fname);
+
+               stats[i].htab = (struct hsearch_data*)malloc(sizeof(*(stats[i].htab)));
+               memset(stats[i].htab, 0, sizeof(*(stats[i].htab)));
+               stats[i].htab_size = GROUPS_HASHTABLE_SIZE;
+               if (!hcreate_r(stats[i].htab_size, stats[i].htab)){
+                        glite_common_log(LOG_CATEGORY_CONTROL, 
+                               LOG_PRIORITY_WARN,
+                               "Cannot create hash table for stats!");
+                       free(stats[i].htab);
+                       stats[i].htab = NULL;
+               }
        }
        return 0;
 }
@@ -116,7 +134,7 @@ int edg_wll_UpdateStatistics(
        for (i=0; stats[i].type; i++) switch (stats[i].type) {
                case STATS_COUNT:
                        if (!to) continue;
-                       if (to->state == stats[i].major && (!from || from->state != to->state)) {
+                       if (to->state == stats[i].base_state && (!from || from->state != to->state)) {
                                switch (to->state) {
                                        case EDG_WLL_JOB_DONE:
                                                if (to->done_code != stats[i].minor) continue;
@@ -128,13 +146,63 @@ int edg_wll_UpdateStatistics(
                        break;
                case STATS_DURATION:
                        if (!to || !from) continue;
-                       if (from->state == stats[i].major && from->state != to->state) 
+                       if (from->state == stats[i].base_state && from->state != to->state) 
                                stats_record_duration(ctx,from,to,stats+i);
+                       break;
+               case STATS_DURATION_FROMTO:
+                       if (!from) continue;
+                       if ((to->state == stats[i].final_state) && (from->state != to->state)){
+                               switch (to->state) {
+                                        case EDG_WLL_JOB_DONE:
+                                                if (to->done_code != stats[i].minor) continue;
+                                                break;
+                                        default: break;
+                                }
+                               stats_record_duration_fromto(ctx, from, to, stats+i);
+                       }
+                       break;
                default: break;
        }
        return 0;
 }
 
+static int stats_double_htable(edg_wll_Stats *stats){
+        struct edg_wll_stats_group *g;
+       ENTRY   search, *found;
+        int     i;
+
+       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_INFO,
+               "Hash table full, refilling.");
+        hdestroy_r(stats->htab);
+       memset(stats->htab, 0, sizeof(*(stats->htab)));
+       stats->htab_size *= 2;
+       if (!hcreate_r(stats->htab_size, stats->htab)){
+               glite_common_log(LOG_CATEGORY_LB_SERVER,
+                                LOG_PRIORITY_WARN,
+                                "Cannot enlarge hash table for stats! Using linear search instead.");
+                        free(stats->htab);
+                        stats->htab = NULL;
+                       return -1;
+                }
+       for (i=0; i<stats->grpno; i++) {
+               g = (struct edg_wll_stats_group *) (
+                       ((char *) stats->map) + stats->grpsize * i
+                );
+               search.key = strdup(g->sig);
+               search.data = (void*)g;
+               if (! hsearch_r(search, ENTER, &found, stats->htab)){
+                       glite_common_log(LOG_CATEGORY_LB_SERVER,
+                               LOG_PRIORITY_WARN,
+                                "Unexpected error in hsearch_r, switching to linear search!");
+                        hdestroy_r(stats->htab);
+                       free(stats->htab);
+                        stats->htab = NULL;
+                       return -1;
+               }
+       }
+       return 0;
+}
+
 static struct edg_wll_stats_archive *archive_skip(
                const struct edg_wll_stats_archive *a,
                int     len)
@@ -148,6 +216,10 @@ static struct edg_wll_stats_archive *archive_skip(
 
 static int stats_remap(edg_wll_Stats *stats)
 {
+       struct edg_wll_stats_group *g;
+       ENTRY   search, *found;
+       int     i;
+
        int newgrpno = stats->map->grpno;
        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
                "stats_remap: size changed (%d != %d), remap",
@@ -160,21 +232,152 @@ static int stats_remap(edg_wll_Stats *stats)
                return -1;
        }
        assert(stats->map->grpno == newgrpno);
+
+       if (stats->htab){
+               while (newgrpno*100 > stats->htab_size*80)
+                       stats_double_htable(stats);
+               for (i = stats->grpno; i < newgrpno; i++){
+                       g = (struct edg_wll_stats_group *) (
+                                ((char *) stats->map) + stats->grpsize * i );
+                       search.key = strdup(g->sig);
+                       search.data = (void*)g;
+                       if (!hsearch_r(search, ENTER, &found, stats->htab)){
+                               /* This should never happen */
+                               glite_common_log(LOG_CATEGORY_LB_SERVER,
+                                       LOG_PRIORITY_ERROR,
+                                       "Cannot insert new element into stats hash table. Switching to linear search.");
+                               hdestroy_r(stats->htab);
+                               free(stats->htab);
+                               stats->htab = NULL;
+                               break;
+                       }
+               }
+       }
+
        stats->grpno = newgrpno;
        return 0;
 }
 
+static void stats_search_existing_group(edg_wll_Stats *stats, struct edg_wll_stats_group **g, char *sig)
+{
+       ENTRY   search, *found;
+       int     i;
+       if (stats->htab){
+                search.key = sig;
+                hsearch_r(search, FIND, &found, stats->htab);
+                if (found && strcmp(sig, found->key) == 0)
+                        *g = (struct edg_wll_stats_group*)found->data;
+                else
+                        *g = NULL;
+        }
+        else{
+                for (i=0; i<stats->grpno; i++) {
+                       *g = (struct edg_wll_stats_group *) (
+                                ((char *) stats->map) + stats->grpsize * i
+                        );
+                        if (!strcmp(sig,(*g)->sig)) break;
+                }
+                if (i == stats->grpno)
+                        *g = NULL;
+        }
+} 
+
+static int stats_search_group(edg_wll_Context ctx, const edg_wll_JobStat *jobstat,edg_wll_Stats *stats, struct edg_wll_stats_group **g)
+{
+       int     i, j;
+       char    *sig = NULL;
+       struct edg_wll_stats_archive    *a;
+       ENTRY   search, *found;
+
+       sig = str2md5base64(jobstat->destination);
+
+       stats_search_existing_group(stats, g, sig);
+
+       /* not found, initialize new */
+        if (*g == NULL) {
+                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                        "group %s not found",sig);
+                if (stats->grpno) {
+                        char    *zero = calloc(1,stats->grpsize);
+                        munmap(stats->map,stats->grpno * stats->grpsize);
+                        lseek(stats->fd,0,SEEK_END);
+                        write(stats->fd,zero,stats->grpsize);
+                        free(zero);
+                        stats->map = mmap(NULL,(stats->grpno+1) * stats->grpsize,
+                                        PROT_READ|PROT_WRITE,MAP_SHARED,stats->fd,0);
+
+                        if (stats->map == MAP_FAILED) {
+                               free(sig);
+                                edg_wll_SetError(ctx,errno,"mmap()");
+                               return -1;
+                        }
+                }
+                stats->grpno++;
+                stats->map->grpno++;
+                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                        "allocated");
+
+                *g = (struct edg_wll_stats_group *) (
+                                ((char *) stats->map) + stats->grpsize * (stats->grpno-1));
+
+                /* invalidate all cells in all archives */
+                a = (*g)->archive;
+                for (i=0; stats->archives[i].interval; i++) {
+                        for (j=0; j<stats->archives[i].length; j++) a->cells[j].cnt = -1;
+                        a = archive_skip(a,stats->archives[i].length);
+                }
+
+                strcpy((*g)->sig,sig);
+               strncpy((*g)->destination, jobstat->destination, STATS_DEST_SIZE); // redundant, no string larger than STATS_DEST_SIZE should pass here
+                (*g)->last_update = jobstat->stateEnterTime.tv_sec; //now;
+
+               if (stats->grpno*100 > stats->htab_size*80)
+                       stats_double_htable(stats);
+               if (stats->htab){
+                       search.key = strdup(sig);
+                       search.data = (void*)(*g);
+                       if (!hsearch_r(search, ENTER, &found, stats->htab)){
+                               /* This should never happen */
+                                glite_common_log(LOG_CATEGORY_LB_SERVER,
+                                        LOG_PRIORITY_ERROR,
+                                        "Cannot insert new element into stats hash table. Switching to linear search.");
+                               hdestroy_r(stats->htab);
+                                free(stats->htab);
+                                stats->htab = NULL;
+                       }
+               }
+        }
+        else
+                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                        "group %s found", sig);
+
+       free(sig);
+
+       return 0;
+}
 
 static int stats_inc_counter(edg_wll_Context ctx,const edg_wll_JobStat *jobstat,edg_wll_Stats *stats)
 {
        int     i,j;
-       char    *sig = NULL;
        struct edg_wll_stats_group      *g;
        struct edg_wll_stats_archive    *a;
        time_t  now = jobstat->stateEnterTime.tv_sec;
 
        /* XXX: we support destination grouping only */
-       if (!jobstat->destination) return 0;
+       if (!jobstat->destination){ 
+               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_WARN,
+                       "Only grouping by destination is supported!");
+               return 0;
+       }
+
+       /* XXX: we support destination length up to STATS_DEST_SIZE only */
+       if (strlen(jobstat->destination) >= STATS_DEST_SIZE){
+               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_WARN,
+                       "Destination %s omitted from statistics (only size smaller that %i characters supported)!", jobstat->destination, STATS_DEST_SIZE);
+               return 0;
+       }
+
        edg_wll_ResetError(ctx);
 
        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
@@ -189,55 +392,9 @@ static int stats_inc_counter(edg_wll_Context ctx,const edg_wll_JobStat *jobstat,
                goto cleanup;
        }
 
-       sig = str2md5base64(jobstat->destination);
-
-       for (i=0; i<stats->grpno; i++) {
-               g = (struct edg_wll_stats_group *) (
-                               ((char *) stats->map) + stats->grpsize * i
-                       );
-               if (!strcmp(sig,g->sig)) break;
-       }
-
-       /* not found, initialize new */
-       if (i == stats->grpno) {
-               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
-                       "group %s not found",sig);
-               if (stats->grpno) {
-                       char    *zero = calloc(1,stats->grpsize);
-                       munmap(stats->map,stats->grpno * stats->grpsize);
-                       lseek(stats->fd,0,SEEK_END);
-                       write(stats->fd,zero,stats->grpsize);
-                       free(zero);
-                       stats->map = mmap(NULL,(stats->grpno+1) * stats->grpsize,
-                                       PROT_READ|PROT_WRITE,MAP_SHARED,stats->fd,0);
-
-                       if (stats->map == MAP_FAILED) {
-                               edg_wll_SetError(ctx,errno,"mmap()");
-                               goto cleanup;
-                       }
-               }
-               stats->grpno++;
-               stats->map->grpno++;
-               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
-                       "allocated");
-
-               g = (struct edg_wll_stats_group *) (
-                               ((char *) stats->map) + stats->grpsize * i);
-
-               /* invalidate all cells in all archives */
-               a = g->archive;
-               for (i=0; stats->archives[i].interval; i++) {
-                       for (j=0; j<stats->archives[i].length; j++) a->cells[j].cnt = -1;
-                       a = archive_skip(a,stats->archives[i].length);
-               }
-
-               strcpy(g->sig,sig);
-               g->last_update = now;
-       }
-       else 
-               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
-                       "group %s found at %d", sig, i);
-
+       if (stats_search_group(ctx, jobstat, stats, &g))
+               goto cleanup;
        a = g->archive;
        for (i=0; stats->archives[i].interval; i++) {
                time_t  pt = g->last_update;
@@ -274,7 +431,6 @@ static int stats_inc_counter(edg_wll_Context ctx,const edg_wll_JobStat *jobstat,
 
 
 cleanup:
-       free(sig);
        flock(stats->fd,LOCK_UN);
        return edg_wll_Error(ctx,NULL,NULL);
 }
@@ -288,87 +444,163 @@ static int stats_record_duration(
        return 0;
 }
 
-int edg_wll_StateRateServer(
-       edg_wll_Context ctx,
-       const edg_wll_QueryRec  *group,
-       edg_wll_JobStatCode     major,
-       int                     minor,
-       time_t  *from, 
-       time_t  *to,
-       float   *rate,
-       int     *res_from,
-       int     *res_to
-)
+static int stats_record_duration_fromto(
+                edg_wll_Context ctx,
+                const edg_wll_JobStat *from,
+                const edg_wll_JobStat *to,
+                edg_wll_Stats *stats)
 {
-       edg_wll_Stats *stats = default_stats;   /* XXX: hardcoded */
-       struct edg_wll_stats_group      *g;
-       struct edg_wll_stats_archive    *a;
-       int     i,j,matchi;
-       char    *sig = NULL;
-       time_t  afrom,ato;
-       long    match;
-       struct _edg_wll_GssPrincipal_data princ;
+       struct edg_wll_stats_group      *g;
+        struct edg_wll_stats_archive    *a;
+       int i, j;
+       time_t  now = to->stateEnterTime.tv_sec;
 
-        princ.name = ctx->peerName;
-        princ.fqans = ctx->fqans;
+       /* XXX: we support destination grouping only */
+        if (!to->destination) return 0;
 
-       edg_wll_ResetError(ctx);
+       /* XXX: we support destination length up to STATS_DEST_SIZE only */
+        if (strlen(to->destination) >= STATS_DEST_SIZE){
+                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_WARN,
+                        "Destination %s omitted from statistics (only size smaller that %i characters supported)!", to->destination, STATS_DEST_SIZE);
+                return 0;
+        }
 
-       switch (ctx->count_statistics) {
-               case 0: return edg_wll_SetError(ctx,ENOSYS,NULL);
-               case 1: if (!ctx->noAuth && !check_authz_policy(&ctx->authz_policy, &princ, GET_STATISTICS)) return edg_wll_SetError(ctx,EPERM,NULL);
-                       break;
-               case 2: break;
-               default: abort();
-       }
+        edg_wll_ResetError(ctx);
 
-       if (group[0].attr != EDG_WLL_QUERY_ATTR_DESTINATION
-               || group[1].attr != EDG_WLL_QUERY_ATTR_UNDEF)
-                       return edg_wll_SetError(ctx,ENOSYS,
-                               "the only supported grouping is by destination");
+       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                "record_duration_fromto: destination %s, stats %d",
+                to->destination, (int) (stats - (edg_wll_Stats *) default_stats));
 
-       if (*from >= *to) return edg_wll_SetError(ctx,EINVAL,"from >= to");
+       if (flock(stats->fd,LOCK_EX)) return edg_wll_SetError(ctx,errno,"flock()");
 
-       for (;stats->type; stats++) {
-               if (stats->type != STATS_COUNT || stats->major != major) continue;
-               switch (major) {
-                       case EDG_WLL_JOB_DONE:
-                               if (stats->minor != minor) continue;
-                               break;
-                       default: break;
-               }
-               break;
-       }
+        /* remap the file if someone changed its size */
+        if (stats->map->grpno != stats->grpno && stats_remap(stats)) {
+                edg_wll_SetError(ctx,errno,"shmem remap failed");
+                goto cleanup;
+        }
 
-       if (!stats->type) return edg_wll_SetError(ctx,ENOENT,"no matching state counter");
+       if (stats_search_group(ctx, to, stats, &g))
+               goto cleanup;
 
-       /* remap the file if someone changed its size */
-       if (stats->map->grpno != stats->grpno)
-       {       
-               if (flock(stats->fd,LOCK_EX)) return edg_wll_SetError(ctx,errno,"flock()");
-               if (stats_remap(stats)) {
-                       edg_wll_SetError(ctx,errno,"shmem remap failed");
-                       goto cleanup;
+       time_t base = to->stateEnterTimes[stats->base_state+1];
+       time_t final =  to->stateEnterTimes[stats->final_state+1];
+       time_t timedif = final-base;
+       if (base && final){  /* final should be always not null*/
+               a = g->archive;
+
+               for (i=0; stats->archives[i].interval; i++) {
+                       time_t  pt = g->last_update;
+
+                       pt -= pt % stats->archives[i].interval;
+       
+                       /* nothing happened longer than is history of this archive */
+                       if (now-pt > stats->archives[i].interval * stats->archives[i].length) {
+                               for (j=0; j<stats->archives[i].length; j++) a->cells[j].cnt = 0;
+                               a->ptr = 0;
+                       }
+                       /* catch up eventually, cleaning not touched cells */
+                       else for (pt += stats->archives[i].interval; pt < now;
+                                       pt += stats->archives[i].interval)
+                       {
+                               if (++(a->ptr) == stats->archives[i].length) a->ptr = 0;
+                               a->cells[a->ptr].cnt = 0;
+                       }
+       
+                       /* validate an unused cell */
+                       if (a->cells[a->ptr].cnt < 0) a->cells[a->ptr].cnt = 0;
+
+                       /* now we can do IT */
+                       a->cells[a->ptr].cnt++;
+                       a->cells[a->ptr].value += (float)timedif;
+                       a->cells[a->ptr].value2 += (float)timedif * (float)timedif;
+                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                               "update archive %d, cell %d incremented to %f",
+                               i, a->ptr, a->cells[a->ptr].value);
+
+                       /* go to next archive */
+                       a = archive_skip(a,stats->archives[i].length);
                }
        }
+       
+       g->last_update = now;
+cleanup:
+       flock(stats->fd,LOCK_UN);
+        return edg_wll_Error(ctx,NULL,NULL);
+}
 
-       if (flock(stats->fd,LOCK_SH)) return edg_wll_SetError(ctx,errno,"flock()");
+static int findStat(
+       edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base_state,
+        edg_wll_JobStatCode     final_state,
+        int                     minor,
+       time_t                  *from,
+        time_t                 *to,
+       edg_wll_Stats           **stats
+)
+{
+       edg_wll_JobStatCode later_state;
 
-       /* XXX */
-       sig = str2md5base64(group->value.c);
+       switch (ctx->count_statistics) {
+                case 0: return edg_wll_SetError(ctx,ENOSYS,NULL);
+                case 1: if (!ctx->noAuth) return edg_wll_SetError(ctx,EPERM,NULL);
+                        break;
+                case 2: break;
+                default: abort();
+        }
+
+        if (group[0].attr != EDG_WLL_QUERY_ATTR_DESTINATION
+                || group[1].attr != EDG_WLL_QUERY_ATTR_UNDEF)
+                        return edg_wll_SetError(ctx,ENOSYS,
+                                "the only supported grouping is by destination");
+
+        if (*from >= *to) return edg_wll_SetError(ctx,EINVAL,"from >= to");
+
+        for (;(*stats)->type; (*stats)++) {
+                //if ((*stats)->type != STATS_COUNT || (*stats)->base_state != base_state || (*stats)->final_state != final_state) continue;
+               if ((*stats)->type == STATS_COUNT){
+                       if ((*stats)->base_state != base_state) continue;
+                       else later_state = base_state;
+               }
+               if ((*stats)->type == STATS_DURATION_FROMTO){
+                       if((*stats)->base_state != base_state || (*stats)->final_state != final_state) continue;
+                       else later_state = final_state;
+               }
+               if  ((*stats)->type == STATS_DURATION){
+                       continue;
+               } 
+                switch (later_state) {
+                        case EDG_WLL_JOB_DONE:
+                                if ((*stats)->minor != minor) continue;
+                                break;
+                        default: break;
+                }
+                break;
+        }
+
+       if (!(*stats)->type) return edg_wll_SetError(ctx,ENOENT,"no matching state counter");
 
+       return 0;
+}
 
-       for (i=0, g=stats->map; i<stats->grpno; i++) {
-               if (!strcmp(sig,g->sig)) break;
-               g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
-       }
+static int stateRateRequest(
+       edg_wll_Context ctx,
+       edg_wll_Stats *stats,
+       struct edg_wll_stats_group    *g,
+       time_t  *from, 
+        time_t  *to,
+        float   *rate,
+        int     *res_from,
+        int     *res_to
+)
+{
+       struct edg_wll_stats_archive    *a;
+        int     i,j,matchi;
+       time_t  afrom,ato;
+        long    match, diff;
 
-       if (i == stats->grpno) {
-               glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, 
-                       "no match: %s\n",sig);
-               edg_wll_SetError(ctx,ENOENT,"no matching group");
-               goto cleanup;
-       }
+       edg_wll_ResetError(ctx);
 
        match = 0;
        matchi = -1;
@@ -395,12 +627,6 @@ int edg_wll_StateRateServer(
                "best match: archive %d, interval %ld", matchi, match);
 
        if (matchi < 0) {
-               if (*from > g->last_update) {
-                       /* special case -- we are sure that nothing arrived */
-                       *rate = 0;
-                       *res_from = *res_to = stats->archives[0].interval;
-                       goto cleanup;
-               }
                edg_wll_SetError(ctx,ENOENT,"no data available");
                goto cleanup;
        }
@@ -423,7 +649,6 @@ int edg_wll_StateRateServer(
        *rate = 0;
        match = 0;
 
-
        for (j=0; j<stats->archives[matchi].length; j++,afrom += i) {
                struct edg_wll_stats_cell       *c = a->cells + ((a->ptr+j+1) % stats->archives[matchi].length);
 
@@ -436,44 +661,128 @@ int edg_wll_StateRateServer(
                }
 
                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
-                       "search %ld in %ld, %ld", *from, afrom, afrom+i);
+                        "search %ld in %ld, %ld", *from, afrom, afrom+i);
+
+                // (from, to) is inside (afrom, afrom+i)
+                if (*from >= afrom && *to < afrom+i) {
+                        diff = *to - *from;
+                }
+                // (afrom, afrom+i) is inside (from, to)
+                else if (*from < afrom && *to >= afrom+i) {
+                        diff = i;
+                }
+                // from is in (afrom, afrom+i)
+                else if (*from >= afrom && *from < afrom+i) {
+                        diff = afrom+i - *from;
+                }
+                // to is in (afrom, afrom+i)
+                else if (*to >= afrom && *to < afrom+i) {
+                        diff = afrom+i - *to;
+                }
+                match += diff;
+                *rate += c->cnt * (float)diff/i;
+
+                if (*to >= afrom && *to < afrom+i) {
+                        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %d, rate %f", match, *rate);
+                        break;
+                }
+       }
 
-               if (*from >= afrom && *from < afrom+i) {
-                       match += *from - afrom;
-                       *rate += c->cnt * (1.0 - ((float) *from-afrom)/i);
-                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched from: match %ld, rate %f", match, *rate);
-               }
-               else if (*from < afrom && *to >= afrom) {
-                       match += i;
-                       *rate += c->cnt;
-                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched in: match %ld, rate %f", match, *rate);
+       if (match > 0)
+               *rate /= match;
+
+cleanup:
+        return edg_wll_Error(ctx,NULL,NULL);
+}
+
+int edg_wll_StateRateServer(
+       edg_wll_Context ctx,
+       const edg_wll_QueryRec  *group,
+       edg_wll_JobStatCode     major,
+       int                     minor,
+       time_t  *from, 
+       time_t  *to,
+       float   **rates,
+       char    ***groups,
+       int     *res_from,
+       int     *res_to
+)
+{
+       edg_wll_Stats *stats = default_stats;   /* XXX: hardcoded */
+       struct edg_wll_stats_group    *g;
+       int     i;
+       char    *sig = NULL;    
+       int     err;
+
+       edg_wll_ResetError(ctx);
+       *rates = NULL; *groups = NULL;
+
+       if ((err = findStat(ctx, group, major, EDG_WLL_JOB_UNDEF, minor, from, to, &stats))) return err;
+
+       /* remap the file if someone changed its size */
+       if (stats->map->grpno != stats->grpno)
+       {       
+               if (flock(stats->fd,LOCK_EX)) return edg_wll_SetError(ctx,errno,"flock()");
+               if (stats_remap(stats)) {
+                       edg_wll_SetError(ctx,errno,"shmem remap failed");
+                       goto cleanup;
                }
+       }
 
-               if (*to >= afrom && *to < afrom+i) {
-                       match -= i-(*to-afrom);
-                       *rate -= c->cnt * (((float) i)-(*to - afrom))/i;
+       if (flock(stats->fd,LOCK_SH)) return edg_wll_SetError(ctx,errno,"flock()");
 
-                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %ld, rate %f", match, *rate);
+       if (group->value.c){
+               /* single group */
+               sig = str2md5base64(group->value.c);
 
-               /* asi blbost 
-                       if (j == stats->archives[matchi].length - 1
-                               && *to > g->last_update)
-                       {
-                               match -= *to - g->last_update;
-                               *rate -= c->cnt * (((float) *to) - g->last_update)/i;
-                               dprintf(("corrected wrt. last_update: match %ld, rate %f\n",match,*rate));
-                       }
-               */
+               *rates = (float*)malloc(2*sizeof((*rates)[0])); 
+               (*rates)[0] = (*rates)[1] = 0;
+               *groups = (char**)malloc(2*sizeof((*groups)[0])); 
+               (*groups)[0] = (*groups)[1] = NULL;
 
-                       break;
+               stats_search_existing_group(stats, &g, sig);
+
+               if (g == NULL) {
+                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, 
+                               "no match: %s\n",sig);
+                       edg_wll_SetError(ctx,ENOENT,"no matching group");
+                       free(*rates); *rates = NULL;
+                       free(*groups); *groups = NULL;
+                       goto cleanup;
+               }
+
+               if ((err = stateRateRequest(ctx, stats, g, from, to, &((*rates)[0]), res_from, res_to))){
+                       free(*rates);
+                        free(*groups);
+                       goto cleanup;
+               }
+               (*groups)[0] = strdup(g->destination); 
+       }
+       else{
+               /* all groups */
+               *rates = (float*)malloc(stats->grpno * sizeof((*rates)[0]));
+               *groups = (char**)malloc((stats->grpno+1) * sizeof((*groups)[0]));
+               for (i=0, g=stats->map; i<stats->grpno; i++) {
+                       (*rates)[i] = 0;
+                       (*groups)[i] = NULL;
+                       if ((err = stateRateRequest(ctx, stats, g, from, to, &((*rates)[i]), res_from, res_to)))
+                               continue; //TODO in fact breaks results here
+                       (*groups)[i] = strdup(g->destination);
+                       g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
+                }
+               (*groups)[i] = NULL;
+               if (i == 0){
+                       edg_wll_SetError(ctx,ENOENT,"no matching group");
+                        free(*rates); *rates = NULL;
+                        free(*groups); *groups = NULL;
+                        goto cleanup;
                }
        }
-       *rate /= match;
 
 cleanup:
-       free(sig);
-       flock(stats->fd,LOCK_UN);
-       return edg_wll_Error(ctx,NULL,NULL);
+        free(sig);
+        flock(stats->fd,LOCK_UN);
+        return edg_wll_Error(ctx,NULL,NULL);
 }
 
 int edg_wll_StateDurationServer(
@@ -483,7 +792,8 @@ int edg_wll_StateDurationServer(
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *duration,
+       float   **duration,
+       char    ***groups,
        int     *res_from,
        int     *res_to
 )
@@ -491,3 +801,225 @@ int edg_wll_StateDurationServer(
        return edg_wll_SetError(ctx,ENOSYS,NULL);
 }
 
+static int stateDurationFromToRequest(
+        edg_wll_Context ctx,
+        edg_wll_Stats *stats,
+        struct edg_wll_stats_group    *g,
+        time_t  *from,
+        time_t  *to,
+        float   *duration,
+       float   *dispersion,
+        int     *res_from,
+        int     *res_to
+)
+{
+       struct edg_wll_stats_archive    *a;
+        int     i,j,matchi;
+        time_t  afrom,ato;
+        long    match, diff;
+       float   rate;
+
+       edg_wll_ResetError(ctx);
+
+       match = 0;
+        matchi = -1;
+        /* XXX: assumes decreasing resolution of archives */
+        for (j=0; stats->archives[j].interval; j++) {
+                afrom = ato = g->last_update;
+
+                ato += stats->archives[j].interval - ato % stats->archives[j].interval;
+                afrom -= afrom % stats->archives[j].interval;
+                afrom -= stats->archives[j].interval * (stats->archives[j].length-1);
+
+                /* intersection of [from,to] and [afrom,ato] */
+                if (afrom < *from) afrom = *from;
+                if (ato > *to) ato = *to;
+
+                /* find the best match */
+                if (ato-afrom > match) {
+                        match = ato - afrom;
+                        matchi = j;
+                }
+        }
+
+         glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                "best match: archive %d, interval %ld", matchi, match);
+
+        if (matchi < 0) {
+                edg_wll_SetError(ctx,ENOENT,"no data available");
+                goto cleanup;
+        }
+
+        *res_from = *res_to = stats->archives[matchi].interval;
+
+        a = g->archive;
+        for (j=0; j<matchi; j++) a = archive_skip(a,stats->archives[j].length);
+
+        i = stats->archives[matchi].interval;
+        afrom = g->last_update - g->last_update % i
+                        - (stats->archives[matchi].length-1)*i;
+
+        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                "archive from %ld = %s", afrom, ctime(&afrom));
+
+        if (afrom > *from) *from = afrom;
+        if (afrom + stats->archives[matchi].length * i < *to) *to = afrom + stats->archives[matchi].length * i;
+
+        rate = 0.0f;
+        *duration = 0.0f;
+        *dispersion = 0.0f;
+        match = 0;
+
+       for (j=0; j<stats->archives[matchi].length; j++,afrom += i) {
+                struct edg_wll_stats_cell       *c = a->cells + ((a->ptr+j+1) % stats->archives[matchi].length);
+
+                 glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                        "cell %d (abs %d): ",
+                        j, (a->ptr+j+1) % stats->archives[matchi].length);
+                if (c->cnt < 0) {
+                        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "invalid");
+                        continue; /* invalid cell */
+                }
+
+                glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                        "search %ld in %ld, %ld", *from, afrom, afrom+i);
+
+                // (from, to) is inside (afrom, afrom+i)
+                if (*from >= afrom && *to < afrom+i) {
+                        diff = *to - *from;
+                }
+                // (afrom, afrom+i) is inside (from, to)
+                else if (*from < afrom && *to >= afrom+i) {
+                        diff = i;
+                }
+                // from is in (afrom, afrom+i)
+                else if (*from >= afrom && *from < afrom+i) {
+                        diff = afrom+i - *from;
+                }
+                // to is in (afrom, afrom+i)
+                else if (*to >= afrom && *to < afrom+i) {
+                        diff = afrom+i - *to;
+                }
+                match += diff;
+                rate += c->cnt * (float)diff;
+                if (c->cnt)
+                        *duration += (float)diff * c->value/c->cnt;
+                *dispersion += (float)diff * c->value2;
+
+                if (*to >= afrom && *to < afrom+i) {
+                        glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %d, duration %f, dispersion %f", match, *duration, *dispersion);
+                        break;
+                }
+        }
+       if (match > 0){
+               *duration /= match;
+               *dispersion /= match;
+               rate /= match;
+               if (rate > 1)
+                       *dispersion = sqrtf(1/(rate-1) * ((*dispersion) - rate*((*duration)*(*duration))));
+               else
+                       *dispersion = 0;
+       }
+
+cleanup:
+        return edg_wll_Error(ctx,NULL,NULL);
+}
+
+int edg_wll_StateDurationFromToServer(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base_state,
+       edg_wll_JobStatCode     final_state,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   **durations,
+       float   **dispersions,
+       char    ***groups,
+        int     *res_from,
+        int     *res_to
+)
+{
+       edg_wll_Stats *stats = default_stats;   /* XXX: hardcoded */
+        struct edg_wll_stats_group      *g;
+        char    *sig = NULL;
+       int     err;
+       int     i;
+
+        edg_wll_ResetError(ctx);
+       *durations = NULL;
+       *dispersions = NULL;
+       *groups = NULL;
+
+       if ((err = findStat(ctx, group, base_state, final_state, minor, from, to, &stats))) return err;
+
+       /* remap the file if someone changed its size */
+        if (stats->map->grpno != stats->grpno)
+        {       
+                if (flock(stats->fd,LOCK_EX)) return edg_wll_SetError(ctx,errno,"flock()");
+                if (stats_remap(stats)) {
+                        edg_wll_SetError(ctx,errno,"shmem remap failed");
+                        goto cleanup;
+                }
+        }
+
+        if (flock(stats->fd,LOCK_SH)) return edg_wll_SetError(ctx,errno,"flock()");
+
+       if (group->value.c){
+               /* single group */
+               sig = str2md5base64(group->value.c);
+               *durations = (float*)malloc(1*sizeof((*durations)[0]));
+                (*durations)[0] = 0;
+               *dispersions = (float*)malloc(1*sizeof((*dispersions)[0]));
+                (*dispersions)[0] = 0;
+               *groups = (char**)malloc(2*sizeof((*groups)[0]));
+                (*groups)[0] = (*groups)[1] = NULL;
+
+               stats_search_existing_group(stats, &g, sig);
+
+               if (g == NULL) {
+                       glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
+                               "no match: %s\n",sig);
+                       edg_wll_SetError(ctx,ENOENT,"no matching group");
+                       goto cleanup;
+               }
+
+               if ((err = stateDurationFromToRequest(ctx, stats, g, from, to, &((*durations)[0]), &((*dispersions)[0]), res_from, res_to))){
+                       free(*durations);
+                       free(*dispersions);
+                       free(*groups);
+                       goto cleanup;
+               }
+               (*groups)[0] = strdup(g->destination);
+       }
+       else{
+               /* all groups */
+               *durations = (float*)malloc(stats->grpno * sizeof((*durations)[0]));
+               *dispersions = (float*)malloc(stats->grpno * sizeof((*dispersions)[0]));
+               *groups = (char**)malloc((stats->grpno+1) * sizeof((*groups)[0]));
+
+               for (i=0, g=stats->map; i<stats->grpno; i++) {
+                       (*durations)[i] = 0;
+                       (*dispersions)[i] = 0;
+                       (*groups)[i] = NULL;
+                       if ((err = stateDurationFromToRequest(ctx, stats, g, from, to, &((*durations)[i]), &((*dispersions)[i]), res_from, res_to)))
+                               continue; //TODO in fact breaks results here
+                       (*groups)[i] = strdup(g->destination);
+                       g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
+               }
+               (*groups)[i] = NULL;
+                if (i == 0){
+                        edg_wll_SetError(ctx,ENOENT,"no matching group");
+                        free(*durations); *durations = NULL;
+                       free(*dispersions); *dispersions = NULL;
+                        free(*groups); *groups = NULL;
+                        goto cleanup;
+                }
+       }
+
+cleanup:
+       free(sig);
+        flock(stats->fd,LOCK_UN);
+        return edg_wll_Error(ctx,NULL,NULL);
+}
+
index aad067e..30963d5 100644 (file)
@@ -19,12 +19,18 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include<search.h>
 
 #include "glite/lb/context.h"
 #include "glite/lb/events.h"
 #include "glite/lb/jobstat.h"
 #include "glite/lb/query_rec.h"
 
+#define STATS_DEST_SIZE 256
+
 int edg_wll_InitStatistics(edg_wll_Context);
 
 int edg_wll_UpdateStatistics(
@@ -37,6 +43,7 @@ int edg_wll_UpdateStatistics(
 struct edg_wll_stats_cell {
        int     cnt;
        float   value;
+       float   value2;
 };
 
 struct edg_wll_stats_archive {
@@ -47,15 +54,17 @@ struct edg_wll_stats_archive {
 struct edg_wll_stats_group {
        int     grpno;
        char    sig[33];
+       char    destination[STATS_DEST_SIZE];
        time_t  last_update;
        struct edg_wll_stats_archive    archive[1];
 };
 
 
 typedef struct {
-       enum { STATS_UNDEF = 0, STATS_COUNT, STATS_DURATION }   type;
+       enum { STATS_UNDEF = 0, STATS_COUNT, STATS_DURATION, STATS_DURATION_FROMTO }    type;
        edg_wll_QueryRec        *group;
-       edg_wll_JobStatCode     major;
+       edg_wll_JobStatCode     base_state;
+       edg_wll_JobStatCode     final_state;
        int                     minor;
        struct _edg_wll_StatsArchive {
                int     interval,length;
@@ -64,6 +73,8 @@ typedef struct {
        int     fd;
        struct edg_wll_stats_group      *map;
        int     grpno,grpsize;
+       unsigned htab_size;
+       struct hsearch_data *htab;
 } edg_wll_Stats;
 
 int edg_wll_StateRateServer(
@@ -73,7 +84,8 @@ int edg_wll_StateRateServer(
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *rate,
+       float   **rates,
+       char    ***groups,
        int     *res_from,
        int     *res_to
 );
@@ -86,9 +98,25 @@ int edg_wll_StateDurationServer(
        int                     minor,
        time_t  *from, 
        time_t  *to,
-       float   *duration,
+       float   **duration,
+       char    ***groups,
        int     *res_from,
        int     *res_to
 );
 
+int edg_wll_StateDurationFromToServer(
+        edg_wll_Context ctx,
+        const edg_wll_QueryRec  *group,
+        edg_wll_JobStatCode     base_state,
+        edg_wll_JobStatCode     final_state,
+        int                     minor,
+        time_t  *from,
+        time_t  *to,
+        float   **duration,
+       float   **dispersion,
+       char    ***groups,
+        int     *res_from,
+        int     *res_to
+);
+
 #endif /* GLITE_LB_STATS_H */
index e72a773..cfbc7a5 100644 (file)
@@ -282,7 +282,7 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event, int *regis
 {
        char            *unique = edg_wlc_JobIdGetUnique(event->any.jobId);
        char            *q = NULL, *userid = NULL, *subj = NULL, *owner = NULL;
-       glite_lbu_Statement    stmt = NULL;
+       glite_lbu_Statement    stmt = NULL, stmt_zomb = NULL;
        int             nar, grey = 0;
        char            *can_peername = NULL;
        int             local_job = is_job_local(ctx, event->any.jobId);
@@ -310,7 +310,6 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event, int *regis
        if (nar < 0) goto err;
        else if (nar == 0) {
                /* Job not stored yet */
-
                if (event->any.type == EDG_WLL_EVENT_REGJOB) {
 
                /* XXX: directness is checked by any.user == peerName. Not perfect but better than event flags. */
@@ -320,6 +319,18 @@ int store_job_server_proxy(edg_wll_Context ctx, edg_wll_Event *event, int *regis
                                goto err;
 
                        }
+                       if ((event->any.priority & EDG_WLL_LOGLFLAG_EXCL) && ctx->exclusive_zombies) {
+                               trio_asprintf(&q,"select jobid from zombie_jobs "
+                                       "where zombie_jobs.jobid='%|Ss'",unique);
+
+                               if (edg_wll_ExecSQL(ctx,q,&stmt_zomb) > 0) {
+                                       edg_wll_SetError(ctx,EEXIST,"Zombie job with given jobid already exists. Rejecting event.");
+                                       goto err;
+                               }
+                               if (stmt_zomb) { glite_lbu_FreeStmt(&stmt_zomb); stmt_zomb = NULL; }
+                               free (q); q = NULL;
+                       }
+
                        /* else OK */
                }
                else {
@@ -653,6 +664,7 @@ edg_wll_ErrorCode intJobStat_embryonic(
        stat->pub.jobtype = EDG_WLL_STAT_SIMPLE;
        stat->pub.stateEnterTimes[1 + EDG_WLL_JOB_SUBMITTED] = (int)e->timestamp.tv_sec;
        stat->pub.lastUpdateTime = e->timestamp;
+       stat->pub.stateEnterTime = e->timestamp;
 
 err:
        return edg_wll_Error(ctx,NULL,NULL);
index 2fde846..de3b47d 100644 (file)
@@ -22,7 +22,7 @@ SUFFIXES = .T
 
 DEBUG:=-g -O0 -Wall
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${DEBUG} \
        -I${classads_prefix}/include -I${classads_prefix}/include/classad \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
@@ -88,7 +88,7 @@ install:
 clean:
        rm -rvf .libs *.o *.lo ${PLUGIN_LIB} ${MACHINE_LIB}
        rm -rfv job_attrs.h job_attrs2.h lb-job-attrs2.xsd glite-jpis-config.xml
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 check:
        @echo No tests yet
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 32b4be6..d640a5f 100644 (file)
 
 1.1.1-1
 - JDL status field for CREAM jobs too (for notifications)
+
+1.1.1-2
+- Module rebuilt
+
+1.1.2-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+
+1.1.2-2
+- Module rebuilt
+
index 5e05b1d..efd56c0 100644 (file)
@@ -28,6 +28,6 @@ install: compile
        
 clean:
        rm -vf at3
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/glite-lb-types.spec rpmbuild/ RPMS/ tgz/ debian/
 
 check:
index 8f92219..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 1188b8e..0926bea 100644 (file)
        _optional_
 
 @type Suspend          Job execution (queuing) was suspended.
-       int     status_code     Classification of the attempt to suspend the job (REQ, REFUSE, DONE or ABORT).
-       _code_  REQ             The request was acknowledged.
-       _code_  REFUSE          The request was declined by this component.
-       _code_  DONE            The request was completed by whole system.
-       _code_  ABORT           The request was refused by whole system.
        string  reason          Reason for the suspend.
        _optional_
 
 @type Resume           Job execution (queuing) was resumed.
-       int     status_code     Classification of the attempt to resume the job (REQ, REFUSE, DONE or ABORT).
-       _code_  REQ             The request was acknowledged.
-       _code_  REFUSE          The request was declined by this component.
-       _code_  DONE            The request was completed by whole system.
-       _code_  ABORT           The request was refused by whole system.
        string  reason          Reason for the resume.
        _optional_
 
        string LRMS_jobid       jobId from the LRMS
        _optional_
 
+@type CREAMSuspend             Job execution (queuing) was suspended.
+       int     status_code     Classification of the attempt to suspend the job (REQ, REFUSE, DONE or ABORT).
+       _code_  REQ             The request was acknowledged.
+       _code_  REFUSE          The request was declined by this component.
+       _code_  DONE            The request was completed by whole system.
+       _code_  ABORT           The request was refused by whole system.
+       string  reason          Reason for the suspend.
+       _optional_
+
+@type CREAMResume              Job execution (queuing) was resumed.
+       int     status_code     Classification of the attempt to resume the job (REQ, REFUSE, DONE or ABORT).
+       _code_  REQ             The request was acknowledged.
+       _code_  REFUSE          The request was declined by this component.
+       _code_  DONE            The request was completed by whole system.
+       _code_  ABORT           The request was refused by whole system.
+       string  reason          Reason for the resume.
+       _optional_
+
+
 @flesh Transfer
 
 @type FileTransferRegister     register file transfer
index dde4b63..b7bcd31 100644 (file)
 - Support for CREAM jobs
 - Type comments made complete
 
+1.0.2-1
+- Fix build with binary version of this module
+
+1.1.1-1
+- Fixed handling of target 'clean' in the Makefile
+
+1.1.2-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+- Backward compatibility fixes in event types
+
+1.1.2-2
+- Module rebuilt
+
index 1ef4b00..41326f7 100644 (file)
@@ -1,2 +1,3 @@
-module.version=1.1.0
-module.age=1
+# $Header$
+module.version=1.1.2
+module.age=2
index a8cd8c8..6583a49 100644 (file)
@@ -26,7 +26,7 @@ SUFFIXES = .T
 
 DEBUG:=-g -O0 -Wall
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${WS_CFLAGS} ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
@@ -35,7 +35,7 @@ CFLAGS:= \
        -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
        ${COVERAGE_FLAGS} \
        -D_GNU_SOURCE
-LDFLAGS:=-L${stagedir}/${libdir}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir}  ${LDFLAGS} 
@@ -110,8 +110,8 @@ install:
        done
 
 clean:
-       rm -rfv ${ALLUTILS} ${MAN_GZ} ${MAN8_GZ} *.{lo,o} .libs/
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rfv ${ALLUTILS} ${MAN_GZ} ${MAN8_GZ} *.lo *.o .libs/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.o: %.c
        ${COMPILE} -c $<
index 8f92219..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 7aaad2f..55a352c 100644 (file)
 2.0.4-1
 - man page update
 
+2.0.4-2
+- Module rebuilt
+
+2.0.5-1
+- Fixed target 'clean' in the Makefile to handle debian builds and improve portability
+- Handle situations with no jobs while purging
+
+2.0.6-1
+- Hostname parsing adjusted to handle IPv6 addresses
+
index 6cf7a4c..5aa2b4e 100755 (executable)
@@ -1,3 +1,3 @@
 # $Header$
-module.version=2.0.4
+module.version=2.0.6
 module.age=1
index 783a3c5..0bba745 100644 (file)
@@ -131,7 +131,7 @@ int main(int argc,char *argv[])
        edg_wll_InitContext(&ctx);
        if ( server )
        {
-               char *p = strchr(server, ':');
+               char *p = strrchr(server, ':');
                if ( p )
                {
                        edg_wll_SetParam(ctx, EDG_WLL_PARAM_QUERY_SERVER_PORT, atoi(p+1));
index 1431d2f..db2cd16 100644 (file)
@@ -104,7 +104,7 @@ int main(int argc,char *argv[])
        edg_wll_InitContext(&ctx);
        if ( server )
        {
-               char *p = strchr(server, ':');
+               char *p = strrchr(server, ':');
                if ( p )
                {
                        edg_wll_SetParam(ctx, EDG_WLL_PARAM_QUERY_SERVER_PORT, atoi(p+1));
index db3b1c1..4c7ac92 100644 (file)
@@ -244,6 +244,11 @@ int main(int argc,char *argv[])
                } else {
                        dprintf(("yes.\n"));
                }
+               if (!jobs) {
+                       dprintf(("File empty.\n"));
+                       goto main_end;
+               }
+
                request->jobs = jobs;
        }
 
@@ -269,7 +274,7 @@ int main(int argc,char *argv[])
 
        if ( server )
        {
-               char *p = strchr(server, ':');
+               char *p = strrchr(server, ':');
                if ( p )
                {
                        edg_wll_SetParam(ctx, EDG_WLL_PARAM_QUERY_SERVER_PORT, atoi(p+1));
@@ -371,7 +376,7 @@ static int read_jobIds(const char *file, char ***jobs_out)
                }
                 jobs[cnt++] = strdup(buf);
         }
-       jobs[cnt] = NULL;
+       if (jobs) jobs[cnt] = NULL;
 
         fclose(jobIds);
        *jobs_out = jobs;
index f4494b7..03da05d 100644 (file)
@@ -57,8 +57,8 @@ install:
 #      fi
 
 clean:
-       rm -rvf *.h *.html *.xml *.wsdl
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -vf *.h *.html *.xml *.wsdl glue2-copy.xsd
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.xml: %.xml.T
        rm -f $@
index 8f92219..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 4070291..691fcbb 100644 (file)
 - Primitive AGU compatibility
 - Support for CREAM jobs
 
+3.1.1-1
+- Fixed handling of target 'clean' in the Makefile
+
+3.1.2-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+
+3.1.2-2
+- Module rebuilt
+
index bb6d4b3..e419693 100644 (file)
@@ -26,7 +26,7 @@ default all: ${CEXAMPLES}
 VPATH=${top_srcdir}/examples
 CC=gcc
 DEBUG:=-g -O0 -Wall
-CFLAGS=-I${gsoap_prefix}/include -I${gsoap_prefix}/ \
+CFLAGS:=${CFLAGS} -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
        -I${globus_prefix}/include/${nothrflavour} \
        ${DEBUG}
@@ -69,9 +69,8 @@ install:
        done
 
 clean:
-       rm -rf .libs LB.xh *.xml ${GSOAP_FILES_PREFIX}* *.o *.lo *.nsmap soap_version.h ${CEXAMPLES}
-       
-
+       rm -rvf .libs LB.xh *.xml ${GSOAP_FILES_PREFIX}* *.o *.lo *.nsmap soap_version.h ${CEXAMPLES}
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 LB.xh: ws_typemap.dat ${stagedir}/interface/LB.wsdl
        ${gsoap_bin_prefix}/wsdl2h -c -t ${top_srcdir}/examples/ws_typemap.dat -I${stagedir}/interface -o $@ ${stagedir}/interface/LB.wsdl
index 8f92219..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 5338f8d..7ce1441 100644 (file)
 1.0.1-3
 - Module repacked
 
+1.0.2-1
+- Flavor libdir in Makefile
+
 1.1.0-1
 - Primitive AGU compatibility
 
+1.1.1-1
+- LB 4 AGU fixes
+- Updated WS error handling
+
+1.1.2-1
+- Fixed handling of target 'clean' in the Makefile
+
+1.1.3-1
+- Fixed target 'clean' in the Makefile to handle debian builds
+
+1.1.3-2
+- Module rebuilt
+
index 16bd6e6..5375e4c 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.0
-module.age=1
+module.version=1.1.3
+module.age=2
index e51ba78..9102a2d 100644 (file)
@@ -27,5 +27,6 @@ stage:
 check:
 
 clean:
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 .PHONY: default all check stage clean
index 765eb59..7fd270c 100644 (file)
@@ -1,3 +1,51 @@
 ### Default values to some glite-LB variables
+
+#
+# system settings
+#
+
 # backward compatible default location of GLITE_LOCATION_VAR
 GLITE_LOCATION_VAR=/var/glite
+# query timeout
+GLITE_WMS_QUERY_TIMEOUT=300
+# CA certificates directory
+X509_CERT_DIR='/etc/grid-security/certificates'
+# VOMS directory
+X509_VOMS_DIR='/etc/grid-security/vomsdir'
+
+#
+# purge and exports
+#
+
+# purge timeouts
+GLITE_LB_EXPORT_PURGE_ARGS='--cleared 2d --aborted 15d --cancelled 15d --other 60d'
+# enable export of the purged jobs to the Job Provenance
+GLITE_LB_EXPORT_ENABLED='false'
+# Job Provenance server
+GLITE_LB_EXPORT_JPPS=
+# prefix to the Job Provenance installation (if different from $GLITE_LOCATION)
+GLITE_JP_LOCATION=
+
+#
+# L&B configuration
+#
+
+# L&B super users (separated by comma)
+GLITE_LB_SUPER_USERS=
+# L&B service type (server/proxy/both), overrided by YAIM when needed
+GLITE_LB_TYPE=
+# configure glite-LB to be used with Real Time Monitor (harvester)
+GLITE_LB_RTM_ENABLED='false'
+# Real Time Monitoring identities (separated by comma)
+GLITE_LB_RTM_DN='/C=UK/O=eScience/OU=Imperial/L=Physics/CN=heppc24.hep.ph.ic.ac.uk/Email=janusz.martyniak@imperial.ac.uk'
+
+#
+# additional options
+#
+
+# bkserver additional options
+GLITE_LB_SERVER_OTHER_OPTIONS=
+# notification interlogger additional options
+GLITE_LB_NOTIF_IL_OTHER_OPTIONS=
+# proxy interlogger additional options
+GLITE_LB_PROXY_IL_OTHER_OPTIONS=
index aa42b85..ca6c1b7 100644 (file)
@@ -11,22 +11,63 @@ function config_glite_lb_setenv(){
     yaimlog ERROR "The home directory of ${GLITE_USER} doesn't exist. Check whether the user ${GLITE_USER} was properly created"
     exit ${YEX_NOSUCHFILE}
   fi
-  yaimgridenv_set GLITE_JP_LOCATION ${GLITE_JP_LOCATION:-}
-  yaimgridenv_set GLITE_WMS_QUERY_TIMEOUT ${GLITE_WMS_QUERY_TIMEOUT:-300}
+  yaimgridenv_set GLITE_WMS_QUERY_TIMEOUT "${GLITE_WMS_QUERY_TIMEOUT}"
   yaimgridenv_set GLITE_HOST_CERT ${GLITE_HOME_DIR:-/home/glite}/.certs/hostcert.pem
   yaimgridenv_set GLITE_HOST_KEY ${GLITE_HOME_DIR:-/home/glite}/.certs/hostkey.pem
-  yaimgridenv_set X509_CERT_DIR /etc/grid-security/certificates
-  yaimgridenv_set X509_VOMS_DIR /etc/grid-security/vomsdir
+  yaimgridenv_set X509_CERT_DIR "${X509_CERT_DIR}"
+  yaimgridenv_set X509_VOMS_DIR "${X509_VOMS_DIR}"
 
   yaimgridenv_set GLITE_LB_EXPORT_ENABLED ${GLITE_LB_EXPORT_ENABLED:-false}
-  yaimgridenv_set GLITE_LB_EXPORT_PURGE_ARGS "${GLITE_LB_EXPORT_PURGE_ARGS:---cleared 2d --aborted 15d --cancelled 15d --other 60d}"
+  yaimgridenv_set GLITE_LB_EXPORT_PURGE_ARGS "${GLITE_LB_EXPORT_PURGE_ARGS}"
   yaimgridenv_set GLITE_LB_EXPORT_JPPS ${GLITE_LB_EXPORT_JPPS:-}
-  yaimgridenv_set GLITE_LB_RTM_ENABLED ${GLITE_LB_RTM_ENABLED:-false}
-  yaimgridenv_set GLITE_LB_RTM_DN "${GLITE_LB_RTM_DN:-/C=UK/O=eScience/OU=Imperial/L=Physics/CN=heppc24.hep.ph.ic.ac.uk/Email=janusz.martyniak@imperial.ac.uk}"
-  yaimgridenv_set GLITE_LB_SUPER_USERS "${GLITE_LB_SUPER_USERS:-}"
-  yaimgridenv_set GLITE_LB_HARVESTER_ENABLED ${GLITE_LB_HARVESTER_ENABLED:-false}
-  yaimgridenv_set GLITE_LB_HARVESTER_MSG_OPTIONS "${GLITE_LB_HARVESTER_MSG_OPTIONS:---wlcg}"
-
+  yaimgridenv_set GLITE_JP_LOCATION "${GLITE_JP_LOCATION}"
+
+  yaimgridenv_set GLITE_LB_SERVER_OTHER_OPTIONS "${GLITE_LB_SERVER_OTHER_OPTIONS}"
+  yaimgridenv_set GLITE_LB_NOTIF_IL_OTHER_OPTIONS "${GLITE_LB_NOTIF_IL_OTHER_OPTIONS}"
+  yaimgridenv_set GLITE_LB_PROXY_IL_OTHER_OPTIONS "${GLITE_LB_PROXY_IL_OTHER_OPTIONS}"
+
+  #
+  # default L&B mode (proxy/server/both) according to the node list,
+  # admin can specify GLITE_LB_TYPE, the value is overrided as needed
+  #
+  # behaviour:
+  #   LB:       default 'server', no overriding
+  #   WMS:      default 'proxy', override to 'both' if needed
+  #   WMS & LB: default 'both', override to 'both' if needed
+  #
+  use_proxy=0
+  use_server=0
+  case "$NODE_TYPE_LIST" in
+    *WMS*) use_proxy=1 ;;
+  esac
+  case "$NODE_TYPE_LIST" in
+    *LB*) use_server=1 ;;
+  esac
+  if [ "x${GLITE_LB_TYPE}" = "x" ]; then
+    # default
+    if [ $use_server -eq 1 ]; then
+      if [ $use_proxy -eq 1 ]; then
+        GLITE_LB_TYPE=both
+      else
+        GLITE_LB_TYPE=server
+      fi
+    else
+      if [ $use_proxy -eq 1 ]; then
+        GLITE_LB_TYPE=proxy
+      fi
+    fi
+  else
+    # override if needed
+    if [ $use_proxy -eq 1 ]; then
+      case "$GLITE_LB_TYPE" in
+        *proxy*|*both*)
+          ;;
+        *)
+          yaimlog WARNING "Overriding L&B mode from '$GLITE_LB_TYPE' to 'both'"
+          GLITE_LB_TYPE=both
+      esac
+    fi
+  fi
   yaimgridenv_set GLITE_LB_TYPE ${GLITE_LB_TYPE:-server}
 
   cares_prefix=${INSTALL_ROOT:-/opt}/c-ares
@@ -63,7 +104,7 @@ action "ADMIN_ACCESS" {
 $superusers
 }
 
-action "STATUS_FOR_MONITORING" {
+action "READ_ALL" {
 $rtm
 }
 
@@ -121,6 +162,8 @@ function config_glite_lb() {
        
   HOSTNAME=`hostname -f`
 
+  yaimlog INFO "Configuring nodes [$NODE_TYPE_LIST], using L&B mode: $GLITE_LB_TYPE"
+
   # Redefine GLITE_HOME_DIR to make sure we retrieve the correct HOME directory of user glite
   GLITE_HOME_DIR=`getent passwd ${GLITE_USER} | cut -d: -f6`
   if [ "x${GLITE_HOME_DIR}" = "x" ]; then
@@ -159,6 +202,18 @@ function config_glite_lb() {
     fi
   fi
 
+  # disable network, restart mysql, if needd
+  grep "skip-networking" /etc/my.cnf > /dev/null
+  if [ ! $? = 0 ]; then
+    mv /etc/my.cnf /etc/my.cnf.orig
+    sed 's/\[mysqld\]/[mysqld]\nskip-networking/' /etc/my.cnf.orig > /etc/my.cnf
+    rm -f /etc/my.cnf.orig
+    ps ax | grep -v grep |grep mysqld_safe > /dev/null 2>&1
+    if [ $? = 0 ] ; then
+      /etc/init.d/mysqld stop
+    fi
+  fi
+
   /sbin/chkconfig mysqld on
   ps ax | grep -v grep |grep mysqld_safe > /dev/null 2>&1
   if [ ! $? = 0 ] ; then
index 9154391..3b84361 100644 (file)
@@ -49,8 +49,8 @@ SERVICE_LC=lbserver
 
 SERVICE_HOST=`hostname -f`
 
-if [ ! -f ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf.template ]; then
-  yaimlog ERROR "The template file for glite-info-service-${SERVICE_LC}.conf.template was not found in ${INFO_SERVICE_CONFIG}."
+if [ ! -f ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf.template ]; then
+  yaimlog ERROR "The template file for glite-info-glue2-${SERVICE_LC}.conf.template was not found in ${INFO_SERVICE_CONFIG}."
   exit 1
 fi
 
@@ -60,10 +60,10 @@ if [ ! -f ${INFO_SERVICE_SCRIPT}/glite-info-service ]; then
 fi
 
 yaimlog DEBUG "Delete a previous version of the glite-info-service-${SERVICE_LC}.conf if it exists"
-rm -rf ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf
+rm -rf ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf
 
-yaimlog DEBUG "Create the glite-info-service-${SERVICE_LC}.conf file out of the template file"
-cp ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf.template ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf
+yaimlog DEBUG "Create the glite-info-glue2-${SERVICE_LC}.conf file out of the template file"
+cp ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf.template ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf
 
 # Note: the configuration file may need to be altered if non standard values have been used. 
 
@@ -78,8 +78,8 @@ cat << EOF > ${INFO_PROVIDER_PATH}/glite-info-provider-service-${SERVICE_LC}-wra
 #!/bin/sh
 export PATH=$PATH:${INFO_SERVICE_SCRIPT}
 export ${SERVICE}_HOST=${SERVICE_HOST}
-${INFO_SERVICE_SCRIPT}/glite-info-service ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf $SITE_NAME
-${INFO_SERVICE_SCRIPT}/glite-info-service-glue2 ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE_LC}.conf $SITE_NAME
+${INFO_SERVICE_SCRIPT}/glite-info-service ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf $SITE_NAME
+${INFO_SERVICE_SCRIPT}/glite-info-glue2-simple ${INFO_SERVICE_CONFIG}/glite-info-glue2-${SERVICE_LC}.conf $SITE_NAME
 EOF
 
 chmod +x ${INFO_PROVIDER_PATH}/glite-info-provider-service-${SERVICE_LC}-wrapper 
index 71ff6f0..0d662fe 100644 (file)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 9d2762e..54a28e3 100644 (file)
 
 4.2.8-1
 - Updated autorization policy format
+
+4.2.9-1
+- Fixed handling of target 'clean' in the Makefile
+- Configuration tuned to improve support for collocated WMS/L&B and standalone WMS scenarios
+
+4.2.10-1
+- Makefile modified to fix debian builds
+- DB listens on internal address
+- Publishing L&B service in GLUE 2.0
+
+4.2.11-1
+- Inteligent post-configuration restarting of MySQL
+- Using glue2 template for BDII
+
index c70ca5d..0d662fe 100755 (executable)
@@ -77,8 +77,8 @@ my %extern_prefix = (
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -90,7 +90,7 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 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/], 
@@ -98,6 +98,7 @@ my %lbmodules = (
        '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/ ],
        );
 
 
@@ -240,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -262,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -335,7 +335,7 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
@@ -353,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -365,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -425,10 +426,11 @@ for my $jar (keys %need_jars) {
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
        'lbjp-common.gss' =>  [ qw// ],
@@ -463,6 +465,8 @@ for my $jar (keys %need_jars) {
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -491,8 +495,31 @@ for my $ext (keys %deps_aux) {
        'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
 );
 
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -524,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -592,6 +619,19 @@ BEGIN{
                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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -608,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -633,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -700,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -830,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 3d2b49d..e2da9ea 100644 (file)
@@ -166,7 +166,7 @@ usage: $0 -b <branch> [-c configuration] module.name
 
        system("chmod +x \"$TMPDIR/etics-tag-$module.$branch.sh\"");
 
-       printf("\n\n---------\nFinished!\n\nExecution script written in:\t$TMPDIR/etics-tag-$module.$branch.sh\n");
+       printf("\n\n---------\nDone!\n\nExecution script written in:\t$TMPDIR/etics-tag-$module.$branch.sh\n");
        printf("Old configuration stored in:\t$TMPDIR/$currentconfig.ini.$$\n") if (defined $opt_g);
        printf("New configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
 
diff --git a/org.glite.lb/etics-tag-gridsite.pl b/org.glite.lb/etics-tag-gridsite.pl
new file mode 100644 (file)
index 0000000..b2efbc3
--- /dev/null
@@ -0,0 +1,195 @@
+#!/usr/bin/perl
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+# See http://www.eu-egee.org/partners for details on the copyright holders.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use Getopt::Std;
+use Switch;
+use File::Basename;
+
+$TMPDIR=$ENV{'TMPDIR'};
+$GLITE_LB_LOCATION=dirname $0;
+
+if ($TMPDIR eq "") {$TMPDIR="/tmp";}
+
+getopts('i:c:m:gh');
+
+$module='org.gridsite.core';
+
+$usage = qq{
+usage: $0 -c <new configuration> 
+       -c      Use this configuration (\d+\.\d+\.\d+-\S+) 
+       -h      Display this help
+
+};
+
+# **********************************
+# Interpret cmdline options
+# **********************************
+
+if (defined $opt_h) {die $usage};
+die $usage unless $module;
+
+
+if (defined $opt_c) {
+
+       # **********************************
+       # Parse the tag supplied by the user 
+       # **********************************
+
+       if ($opt_c=~/(\d+)\.(\d+)\.(\d+)-(\S+?)/) {
+                       $major=$1;
+                       $minor=$2;
+                       $revision=$3;
+                       $age=$4;
+       }
+       else {die ("tag not stated properly")};
+}
+else {
+       die $usage;
+}
+
+printf("Tag: $tag\n\tprefix: $prefix\n\t major: $major\n\t minor: $minor\n\t   rev: $revision\n\t   age: $age\n");
+
+
+# **********************************
+# Create the execution script
+# **********************************
+
+open EXEC, ">", "$TMPDIR/etics-tag-gridsite.$major.$minor.$revision-$age.sh" or die $!;
+
+printf (EXEC "#This script registers tags for the $module module, version $major.$minor.$revision-$age\n#Generated automatically by $0\n\n"); 
+
+# **********************************
+# Update version.properties
+# **********************************
+
+## printf(EXEC "#Generate new version.properties\ncat >$module/project/version.properties <<EOF\n# generated for LB configure --mode=etics only\nmodule.version=$major.$minor.$revision\nmodule.age=$age\nEOF\n\n");
+
+# **********************************
+# Etics configuration prepare / modify / upload
+# **********************************
+
+$newconfig="$module" . "_R_$major" . "_$minor" . "_$revision" . "_$age";
+$newconfig=~s/^org.//;
+$newconfig=~s/\./-/g;
+
+$module=~/([^\.]+?)\.([^\.]+?)$/;
+$subsysname=$1;
+$modulename=$2;
+
+printf("Module=$module\nname=$modulename\nsubsys=$subsysname\n");
+system("$GLITE_LB_LOCATION/configure --mode=etics --module $subsysname.$modulename --output $TMPDIR/$newconfig.ini.$$ --version $major.$minor.$revision-$age");
+
+printf(EXEC "\n#Add new configuration\netics-configuration add -i $TMPDIR/$newconfig.ini.$$ -c $newconfig $module\n"); 
+
+$version="${major}_${minor}_${revision}_${age}";
+
+$template = qq{
+[Configuration-gridsite-MODULE_R_$version]
+profile = None
+moduleName = org.gridsite.MODULE
+displayName = gridsite-MODULE_R_$version
+description = gridsite-MODULE_R_$version
+projectName = org.glite
+age = $age
+vcsroot = None
+tag = None
+version = $major.$minor.$revision
+path = \${projectName}/org.gridsite.core/\${version}/\${platformName}/gridsite-core-\${version}-\${age}.tar.gz
+
+[Platform-default:VcsCommand]
+displayName = None
+description = None
+tag = None
+branch = None
+commit = None
+checkout = echo No checkout required
+
+[Platform-default:BuildCommand]
+checkstyle = None
+packaging = echo "building nothing, org.gridsite.core make rpm step will create this"
+displayName = None
+description = None
+doc = None
+publish = None
+postpublish = None
+compile = echo "building nothing, org.gridsite.core make rpm step will create this"
+init = None
+install = None
+prepublish = None
+test = None
+clean = None
+configure = None
+
+[Platform-default:DynamicDependency]
+org.glite|org.gridsite.core = B
+};
+
+
+for $mod (qw/apache commands shared/) {
+       $conf = $template;
+       $conf =~ s/MODULE/$mod/g;
+
+       open CONF,">$TMPDIR/$subsysname-${mod}_R_$version.ini.$$";
+       print CONF $conf;
+       close CONF;
+
+       print EXEC "etics-configuration add -i $TMPDIR/$subsysname-${mod}_R_$version.ini.$$\n";
+}
+
+printf(EXEC "etics-commit\n");
+
+open CONF,">$TMPDIR/${subsysname}_R_$version.ini.$$";
+
+print CONF qq{
+[Configuration-gridsite_R_$version]
+profile = None
+moduleName = org.gridsite
+displayName = gridsite_R_$version
+description = gridsite_R_$version
+projectName = org.glite
+age = $age
+vcsroot = None
+tag = None
+version = $major.$minor.$revision
+path = None
+
+[Hierarchy]
+org.gridsite.apache = gridsite-apache_R_$version
+org.gridsite.shared = gridsite-shared_R_$version
+org.gridsite.commands = gridsite-commands_R_$version
+org.gridsite.core = gridsite-core_R_$version
+};
+
+close CONF;
+
+print EXEC "etics-configuration add -i $TMPDIR/${subsysname}_R_$version.ini.$$\n";
+
+printf(EXEC "etics-commit\n");
+
+
+# **********************************
+# Final bows
+# **********************************
+
+close(EXEC);
+
+system("chmod +x \"$TMPDIR/etics-tag-gridsite.$major.$minor.$revision-$age.sh\"");
+
+printf("\n\n---------\nDone!\n\nExecution script written in:\t$TMPDIR/etics-tag-gridsite.$major.$minor.$revision-$age.sh\n");
+printf("New configuration written in:\t$TMPDIR/${subsysname}_R_$version.ini.$$\n\n");
+
index 6831824..0345bb4 100644 (file)
@@ -195,5 +195,5 @@ usage: $0 -b <branch> [-c configuration] subsystem.name
 
         system("chmod +x \"$TMPDIR/etics-tag-with-subsystems-${subsysname}_$branch.sh\"");
 
-        printf("\n\n---------\nFinished!\n\nExecution script written in:\t$TMPDIR/etics-tag-with-subsystems-${subsysname}_$branch.sh\nNew configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
+        printf("\n\n---------\nDone!\n\nExecution script written in:\t$TMPDIR/etics-tag-with-subsystems-${subsysname}_$branch.sh\nNew configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
 
index 685e116..08ab660 100755 (executable)
@@ -308,5 +308,5 @@ usage: $0 [-c <current configuration>] module.name
 
        system("chmod +x \"$TMPDIR/tag-with-subsystems-$module.$major.$minor.$revision-$age.sh\"");
 
-       printf("\n\n---------\nFinished!\n\nExecution script written in:\t$TMPDIR/tag-with-subsystems-$module.$major.$minor.$revision-$age.sh\nNew configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
+       printf("\n\n---------\nDone!\n\nExecution script written in:\t$TMPDIR/tag-with-subsystems-$module.$major.$minor.$revision-$age.sh\nNew configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
 
index 0b0bc89..223acf4 100755 (executable)
@@ -201,6 +201,7 @@ usage: $0 [-i maj|min|rev|age|none|<sigle_word_age>] [-g] [-c <current configura
                system("cp $module/project/ChangeLog $tmpChangeLog");
 
                unless ($increment eq "n") {system("echo $major.$minor.$revision-$age >> $tmpChangeLog");}
+               if ($increment eq "a") {system("echo \"- Module rebuilt\" >> $tmpChangeLog"); system("echo \"\" >> $tmpChangeLog");}
 
                $ChangeLogRet=system("vim $tmpChangeLog");
 
@@ -314,7 +315,7 @@ usage: $0 [-i maj|min|rev|age|none|<sigle_word_age>] [-g] [-c <current configura
 
        system("chmod +x \"$TMPDIR/etics-tag-$module.$major.$minor.$revision-$age.sh\"");
 
-       printf("\n\n---------\nFinished!\n\nExecution script written in:\t$TMPDIR/etics-tag-$module.$major.$minor.$revision-$age.sh\nChangeLog candidate written in:\t$tmpChangeLog\n");
+       printf("\n\n---------\nDone!\n\nExecution script written in:\t$TMPDIR/etics-tag-$module.$major.$minor.$revision-$age.sh\nChangeLog candidate written in:\t$tmpChangeLog\n");
        printf("Old configuration stored in:\t$TMPDIR/$currentconfig.ini.$$\n") if (defined $opt_g);
        printf("New configuration written in:\t$TMPDIR/$newconfig.ini.$$\n\n");
 
diff --git a/org.glite.lb/generate-properties.pl b/org.glite.lb/generate-properties.pl
new file mode 100644 (file)
index 0000000..bfe7d4f
--- /dev/null
@@ -0,0 +1,147 @@
+#!/usr/bin/perl
+#
+# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+# See http://www.eu-egee.org/partners for details on the copyright holders.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use Getopt::Std;
+use Switch;
+
+$TMPDIR=$ENV{'TMPDIR'};
+
+if ($TMPDIR eq "") {$TMPDIR="/tmp";}
+
+
+
+$usage = qq{
+usage: $0 [-p] -a|module.name [module.name ...]|-c configuration [configuration ...]
+
+        -h      Display this help
+       -p      Single line output for Etics web interface
+       -a      Process all subdirectories in . rather than getting lists
+       -c      Download subsystem configurations from Etics and parse hierarchy
+
+};
+
+if ($#ARGV < 0) {die $usage};
+
+getopts('phac');
+
+if (defined $opt_h) {die $usage};
+if (defined $opt_p) {
+       $eq_separator = "=";
+       $pair_separator_back = " "; 
+       $pair_separator_front = "-p "; }
+else {
+       $eq_separator = " = ";
+       $pair_separator_back = "\n"; 
+       $pair_separator_front = ""; }
+
+sub GetDefault {
+       # **********************************
+       # Determine the most recent tag and its components from version.properties 
+       # **********************************
+       my($mname) = @_;
+
+       unless (open VP, "$mname/project/version.properties") {
+               unless (defined $opt_a) { die "$mname/project/version.properties: $?\n"; }
+               else { return 1; }
+       }
+
+       while ($_ = <VP>) {
+               chomp;
+
+               if(/module\.version\s*=\s*(\d*)\.(\d*)\.(\d*)/) {
+                       $current_major=$1;
+                       $current_minor=$2;
+                       $current_revision=$3;
+               }
+               if(/module\.age\s*=\s*(\S+)/) {
+                       $current_age=$1;
+               }
+       }
+       close (VP);
+
+       $current_prefix=$mname;
+       $current_prefix=~s/^org\.//;
+       $current_prefix=~s/\./-/g;
+       $current_prefix="$current_prefix" . "_R_";
+       $current_tag="$current_prefix" . "$current_major" . "_$current_minor" . "_$current_revision" . "_$current_age";
+
+       printf "$pair_separator_front$mname.DEFAULT$eq_separator$current_tag$pair_separator_back";
+
+}
+
+if (defined $opt_a) { # All subdirectories
+       opendir(LOCAL, ".");
+       @contents = readdir(LOCAL);
+       closedir(LOCAL); 
+
+       foreach $f (@contents) {
+               unless ( ($f eq ".") || ($f eq "..") ) {
+                       if (-d $f) {
+                               GetDefault ($f);
+                       }
+               }
+       }
+}
+else { 
+if (defined $opt_c) { # Configurations
+       my $output = "";
+       while ($subsys = shift) {
+               $module = $subsys;
+               $module =~ s/_[a-zA-Z]*_.*//;   
+               $module =~ s/glite-/glite\./;   
+               $module =~ s/gridsite-/gridsite\./;     
+               system("etics-configuration prepare -o $TMPDIR/subsys.INI.$$.tmp -c $subsys org.$module");
+               open FILE, "$TMPDIR/subsys.INI.$$.tmp" or die $!;
+               $hierarchy = 0;
+               while (my $line = <FILE>) {
+                       if ($line =~ /^\[Hierarchy\]/) { $hierarchy = 1; }
+                       else {
+                               if ($line =~ /^\[.*\]/) { $hierarchy = 0; }
+                               else {
+                                       if ($hierarchy eq 1) {
+                                               $line =~ /^(\S*)\s*=\s*(\S*)$/;
+                                               unless ($1 eq "") {
+                                                       $output = $output . "$pair_separator_front$1.DEFAULT$eq_separator$2$pair_separator_back";
+                                               }
+                                       }
+                               }
+                       }
+               }
+               close FILE,
+               system("rm -f $TMPDIR/subsys.INI.$$.tmp");
+       }
+       print $output;
+}
+else {
+# Listed subsystems 
+       while ($module = shift) {
+               chomp($module);
+               #Clean possible trailing '/' (even multiple occurrences :-) from module name
+               $module=~s/\/+$//;
+               $module=~/\.([^\.]+?)$/;        
+
+               @modules=split(/\s+/, `PATH=\$PATH:./:./org.glite.lb configure --listmodules $1`);
+
+               foreach $m (@modules) {
+                       GetDefault ($m);
+               }
+       }
+} }
+
+if (defined $opt_p) { printf "\n"; }
index 2080095..12e3107 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.7
+module.version=2.1.13
 module.age=1
index 0639deb..1d9b3ee 100644 (file)
@@ -38,7 +38,7 @@ MYSQL_CPPFLAGS:=-I${mysql-devel_prefix}/include -I${mysql-devel_prefix}/include/
 PSQL_CPPFLAGS:=-I${postgresql_prefix}/include -I${postgresql_prefix}/include/postgresql
 
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
@@ -62,7 +62,7 @@ endif
 TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
 TEST_INC:=-I${cppunit_prefix}/include
 
-LDFLAGS:=-L${stagedir}/${libdir} ${COVERAGE_FLAGS}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} ${COVERAGE_FLAGS}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 COMPILEXX:=libtool --mode=compile ${CXX} ${CFLAGS}
@@ -132,7 +132,7 @@ timezone: timezone.lo libglite_lbu_db.la
 compile: libglite_lbu_db.la
 
 check: timezone
-       ./timezone
+       LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${log4c_prefix}/${libdir} ./timezone
 
 test_coverage:
        -mkdir coverage
@@ -175,7 +175,7 @@ install: all
 
 clean:
        rm -rvf *.o *.lo *.loT .libs lib* *.c *.h *.dox C/ CPP/
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
        rm -rvf db_expire db_test db_test_mysql db_test_psql timezone
 
 db-mysql.o db-mysql.lo: db-mysql.c
index 1c41dd1..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 63688d7..2a167f4 100644 (file)
 2.0.2-1
 - Fixed timezone handling
 
+2.0.3-1
+- More timezone handling fixes and optimization
+- Unit test
+
+2.0.3-2
+- Module rebuilt
+
+2.0.4-1
+- Fixed target 'clean' in the Makefile
+
+2.0.4-2
+- Module rebuilt
+
index 401155f..864f172 100644 (file)
@@ -1,3 +1,3 @@
 : /cvs/jra1mw/org.glite.lbjp-common.db/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
-module.version=2.0.2
-module.age=1
+module.version=2.0.4
+module.age=2
index 6b1976d..d1ce72e 100644 (file)
@@ -75,14 +75,14 @@ endif
 #      DEBUG:=${DEBUG} -DCHECK_GSOAP_VERSION
 #endif
 
-CFLAGS:= ${DEBUG} \
+CFLAGS:= ${CFLAGS} ${DEBUG} \
        -DVERSION=\"${version}\" \
        -DWITH_NONAMESPACES \
        -I. -I${top_srcdir}/interface \
        -I${stagedir}/include \
        ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION -DWITH_IPV6
 
-LDFLAGS:=${COVERAGE_FLAGS}
+LDFLAGS:=${LDFLAGS} ${COVERAGE_FLAGS}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 COMPILEXX:=libtool --mode=compile ${CXX} ${CFLAGS}
index d02462c..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -89,9 +93,9 @@ my %deps_type;
 my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -336,8 +341,9 @@ BEGIN{
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -360,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -375,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -384,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -392,27 +398,30 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
@@ -424,8 +433,9 @@ for my $jar (keys %need_jars) {
        'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -436,20 +446,20 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
@@ -481,6 +491,8 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
 );
 
 %cvs_prefix = (
@@ -521,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -583,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -598,9 +611,12 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
 
@@ -657,7 +673,7 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
@@ -667,7 +683,8 @@ sub mode_etics {
        if ($branch) {
                $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
                $conftag = $branch;
-               $age = '0dev'; }
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
                $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
@@ -734,6 +751,13 @@ 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}";
+       }
+
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
@@ -753,7 +777,7 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
@@ -898,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index dc8b50b..78d41a1 100644 (file)
@@ -46,13 +46,13 @@ default: all
 DEBUG:=-g -O0 -W -Wall -Wno-unused-parameter
 # not for globus, gsoap: -Werror
 
-CFLAGS:= ${DEBUG} \
+CFLAGS:= ${CFLAGS} ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I. -I${top_srcdir}/interface \
        -I${stagedir}/include \
        ${COVERAGE_FLAGS} -D_GNU_SOURCE -DDATAGRID_EXTENSION
 
-LDFLAGS:=${COVERAGE_FLAGS}
+LDFLAGS:=${LDFLAGS} ${COVERAGE_FLAGS}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} 
index d02462c..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -89,9 +93,9 @@ my %deps_type;
 my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -336,8 +341,9 @@ BEGIN{
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -360,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -375,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -384,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -392,27 +398,30 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
@@ -424,8 +433,9 @@ for my $jar (keys %need_jars) {
        'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -436,20 +446,20 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
@@ -481,6 +491,8 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
 );
 
 %cvs_prefix = (
@@ -521,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -583,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -598,9 +611,12 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
 
@@ -657,7 +673,7 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
@@ -667,7 +683,8 @@ sub mode_etics {
        if ($branch) {
                $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
                $conftag = $branch;
-               $age = '0dev'; }
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
                $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
 
@@ -734,6 +751,13 @@ 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}";
+       }
+
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
@@ -753,7 +777,7 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
@@ -898,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 4970556..310ff8d 100644 (file)
@@ -25,7 +25,7 @@ version=${module.version}
 VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/project:${jpproject}
 
 DEBUG:=-g -O0 -W -Wno-sign-compare
-CFLAGS:=${DEBUG} -D_GNU_SOURCE -I. -I${top_srcdir}/interface -I${stagedir}/include
+CFLAGS:=${CFLAGS} ${DEBUG} -D_GNU_SOURCE -I. -I${top_srcdir}/interface -I${stagedir}/include
 
 # In order to use libtool versioning correcty, we must have:
 #
@@ -93,7 +93,8 @@ install:
 
 clean:
        rm -rvf *.o *.lo .libs lib*
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
+       rm -vf type_test type_test.xml
        rm -f glite jp
 
 %.thr.lo: %.c
index 8f92219..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 0a69f99..f2b52a6 100644 (file)
 2.0.0-1
 - Fixed library version numbering
 
+2.0.1-1
+- Fixed target 'clean' in the Makefile
+2.0.2-1
+- Fixed target 'clean' in the Makefile
+- Fixed format of the package description file
+
+2.0.2-2
+- Module rebuilt
+
index e01f457..24890ec 100644 (file)
@@ -1,2 +1 @@
-Definiton of interfaces required to build plugins for JP services
-and implementation of minimal library of support functions.
+Definiton of interfaces required to build plugins for JP services and implementation of minimal library of support functions.
index 6171333..be4ad82 100644 (file)
@@ -1,3 +1,3 @@
 #: /cvs/jra1mw/org.glite.lbjp-common.jp-interface/project/version.properties,v 1.1.1.1 2009/01/21 14:43:52 zsustr Exp $
-module.version=2.0.0
-module.age=1
+module.version=2.0.2
+module.age=2
index f06bb75..80846d0 100644 (file)
@@ -23,13 +23,13 @@ LOG4C_LIBS:=-L${log4c_prefix}/${libdir} -L${log4c_prefix}/lib -llog4c
 
 DEBUG:=-g -O0 -W -Wall
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${DEBUG} \
        -I${stagedir}/include -I${top_srcdir}/src \
        -I${top_srcdir}/interface \
        ${LOG4C_CFLAGS}
 
-LDFLAGS:=-L${stagedir}/${libdir}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} 
@@ -76,7 +76,7 @@ install: compile
 
 clean:
        rm -rvf *.o *.lo .libs lib*
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 check:
 
index 71ff6f0..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,6 +325,7 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
@@ -330,14 +335,15 @@ BEGIN{
        'lb.harvester' => [ qw// ],
        'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap: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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -477,10 +491,35 @@ for my $ext (keys %deps_aux) {
 
 %obsoletes = (
        'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
 );
 
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -494,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -512,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -556,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -571,11 +611,27 @@ BEGIN{
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
+               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/],
        );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
+       );
 };
 
 sub mode_etics {
@@ -592,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -617,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -684,34 +777,49 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-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
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
 };
        for (@{$obsoletes{"$subsys.$module"}}) {
                print C "package.obsoletes = $_\n";
                print C "package.replaces = $_\n";
        }
 
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
+
        print C qq{
 [Platform-default:DynamicDependency]
 };
@@ -814,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 1bd5bd5..53c36dc 100644 (file)
@@ -9,3 +9,12 @@
 1.0.2-1
 - A new logging category added for notification interlogger
 
+1.0.2-2
+- Module rebuilt
+
+1.0.3-1
+- Fixed target 'clean' in the Makefile
+
+1.0.3-2
+- Module rebuilt
+
index fc2d308..c8f9ece 100644 (file)
@@ -26,7 +26,7 @@ VPATH=${top_srcdir}/interface:${top_srcdir}/src:${top_srcdir}/examples
 
 DEBUG:=-g -O0 -W -Wall
 
-CFLAGS:= \
+CFLAGS:= ${CFLAGS} \
        ${DEBUG} \
        -DVERSION=\"${version}\" \
        -I${stagedir}/include -I${top_srcdir}/src -I. \
@@ -34,7 +34,7 @@ CFLAGS:= \
        ${COVERAGE_FLAGS} \
        -D_GNU_SOURCE
 
-LDFLAGS:=-L${stagedir}/${libdir} ${COVERAGE_FLAGS}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} ${COVERAGE_FLAGS}
 
 COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
 LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} 
@@ -94,7 +94,7 @@ install: all
 
 clean:
        rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.o %.lo: %.c
        ${COMPILE} -c $<
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index afe6cfe..d5486a5 100644 (file)
 - Fixed library version numbering
 - Improved portability
 
+2.0.0-2
+- Module rebuilt
+
+2.0.1-1
+- Fixed target 'clean' in the Makefile
+
+2.0.1-2
+- Module rebuilt
+
index 19638f0..66b27cf 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.lbjp-common.maildir/project/version.properties,v 1.1 2007/11/01 20:17:45 valtri Exp $
-module.version=2.0.0
-module.age=1
+module.version=2.0.1
+module.age=2
index 44854e0..9d8dce5 100644 (file)
@@ -17,11 +17,11 @@ version=${module.version}
 VPATH=${top_srcdir}/src:${top_srcdir}/examples
 
 DEBUG:=-g -O0 -Wall
-CFLAGS:= ${DEBUG} \
+CFLAGS:= ${CFLAGS} ${DEBUG} \
        -I${top_srcdir}/interface \
        -I${stagedir}/include \
        -D_GNU_SOURCE 
-LDFLAGS:=-L${stagedir}/${libdir}
+LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
 
 ifdef LB_PROF
        CFLAGS:= ${CFLAGS} -pg -g
@@ -91,7 +91,7 @@ install:
 
 clean:
        rm -rvf *.o *.lo .libs lib* srv_example cnt_example
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
 
 %.o: %.c
        ${COMPILE} -c $<
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index 5e529ac..ff50e6e 100644 (file)
 - Improved portability
 - IPv6 compliance
 
+2.0.0-2
+- Module rebuilt
+
+2.0.1-1
+- Fixed format of the package description file
+- Fixed target 'clean' in the Makefile
+
+2.0.1-2
+- Module rebuilt
+
index 5ed9543..d8df41e 100644 (file)
@@ -1,2 +1 @@
-Multi-process network server.
-A server listening on multiple ports, passing inbound requests to slaves and maintaining connections to specific slaves if possible. The library provides callback handles on connection init, incoming request, etc.
+Multi-process network server. A server listening on multiple ports, passing inbound requests to slaves and maintaining connections to specific slaves if possible. The library provides callback handles on connection init, incoming request, etc.
index 3812f39..8bfed77 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.lbjp-common.server-bones/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
-module.version=2.0.0
-module.age=1
+module.version=2.0.1
+module.age=2
index e73f97d..dd257cd 100644 (file)
@@ -719,6 +719,7 @@ static int do_sendmsg(int to_sock, int sock, unsigned long clnt_dispatched, int
        sendiov.iov_base = sendbuf;
        sendiov.iov_len = sizeof(sendbuf);
 
+       memset(buf, 0, sizeof(buf));
        msg.msg_control = buf;
        msg.msg_controllen = sizeof buf;
 
index 74e87b8..838de1e 100644 (file)
@@ -21,7 +21,7 @@ CC=gcc
 
 DEBUG:=-g -O0 -Wall
 
-CFLAGS:=${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface -I. -DDATAGRID_EXTENSION
+CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface -I. -DDATAGRID_EXTENSION
 
 COMPILE:=libtool --mode=compile ${CC}
 LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} 
@@ -82,7 +82,6 @@ runtest: trio_test
 trio_test: trio_test.cpp
        ${CXX} -c ${CFLAGS} ${TEST_INC} $<
        ${LINKXX} -o $@ trio_test.o ${LTLIB} ${TEST_LIBS}
-       
 
 dist: distsrc distbin
 
@@ -108,7 +107,8 @@ install: all
 
 clean:
        rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/
-       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
+       rm -vf trio_test
+       rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
        
 %.o: %.c
        ${COMPILE} ${CFLAGS} -c $<
index a26cf89..0d662fe 100755 (executable)
@@ -45,7 +45,7 @@ my $sec_tag = '';
 my $jobid_tag = '';
 my $libdir = getlibdir();
 
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+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;
 
@@ -55,6 +55,7 @@ my %extern_prefix = (
        cppunit => '/usr',
        expat => '/usr',
        globus => '/opt/globus',
+       myproxy => '/opt/myproxy',
        gsoap => '/usr',
        mysql => '/usr',
        'mysql-devel' => '',
@@ -69,12 +70,15 @@ my %extern_prefix = (
        libtar => '/usr',
        axis => '/usr',
        log4c => '/usr',
-       postgresql => '/usr'
+       postgresql => '/usr',
+       activemq => '/opt/activemq-cpp-library',
+       apr => '/opt/apr',
+       aprutil => '/opt/apr-util'
 );
 
 my %jar = (
-       'commons-codec' => '/usr/share/java/commons-codec.jar',
-       'commons-lang' => '/usr/share/java/commons-lang.jar',
+       'jakarta-commons-codec' => '/usr/share/java/commons-codec.jar',
+       'jakarta-commons-lang' => '/usr/share/java/commons-lang.jar',
 );
 
 
@@ -86,14 +90,15 @@ my %extrafull;
 my %extranodmod;
 my %deps;
 my %deps_type;
-my %topbuild;
+my %buildroot;
 
 my %lbmodules = (
-       'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/], 
-       'security' => [qw/gss gsoap-plugin/],
-       'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/],
+       '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/],
+       '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/ ],
        );
 
 
@@ -236,17 +241,16 @@ sub mode_build {
        
        for (@modules) {
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
-               print MAK "\tcd $full$build && \${MAKE} clean\n"
+               print MAK "\tcd $full/$buildroot{$_} && \${MAKE} clean\n"
        }
        
        print MAK "\ndistclean:\n";
        
        for (@modules) {
                my $full = full($_);
-               print MAK $topbuild{$_} ?
-                       "\tcd $full$build && \${MAKE} distclean\n" :
-                       "\trm -rf $full$build\n"
+               print MAK $buildroot{$_} eq '' ?
+                       "\tcd $full && \${MAKE} distclean\n" :
+                       "\trm -rf $full/$buildroot{$_}\n"
        }
        
        print MAK "\n";
@@ -258,9 +262,9 @@ sub mode_build {
                my @dnames = $module ? () : keys %ldeps;
        
                my $full = full($_);
-               my $build = $topbuild{$_} ? '': '/build';
+               my $build = $buildroot{$_};
        
-               print MAK "$_: @dnames\n\tcd $full$build && \${MAKE} && \${MAKE} install\n\n";
+               print MAK "$_: @dnames\n\tcd $full/$build && \${MAKE} && \${MAKE} install\n\n";
        }
        
        close MAK;
@@ -321,23 +325,25 @@ BEGIN{
        'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
        'lb.doc' => [],
        'lb.logger' => [ qw/cppunit:B/ ],
+       'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
        'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
        'lb.state-machine' => [ qw/classads/ ],
        'lb.utils' => [ qw/cppunit:B/ ],
        'lb.ws-interface' => [],
        'lb.ws-test' => [ qw/gsoap:B/ ],
        'lb.types' => [ qw// ],
-       'lb.harvester' => [ qw/postgresql:R/ ],
-       'lb.yaim' => [ qw/glite-yaim-core:R/ ],
+       'lb.harvester' => [ qw// ],
+       'lb.yaim' => [ qw/yaim_core:R/ ],
        'lb.glite-LB' => [ qw/fetchcrl:R gpt:R gip_release:R gip_service:R bdii:R glite_version:R glite_info_templates:R glue_schema:R/ ],
-       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ],
+       'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B cppunit:B log4c:B/ ],
        'lbjp-common.log' => [ qw/log4c/ ],
        'lbjp-common.maildir' => [ qw// ],
        'lbjp-common.server-bones' => [ qw// ],
        'lbjp-common.trio' => [ qw/cppunit:B/ ],
-       'lbjp-common.jp-interface' => [ qw/cppunit:B/ ],
-       'security.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
-       'security.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
+       '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/ ],
@@ -347,6 +353,7 @@ BEGIN{
         'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ],
         'jp.server-common' => [],
         'jp.ws-interface' => [],
+       'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
 );
 
 for my $ext (keys %need_externs_aux) {
@@ -359,8 +366,8 @@ for my $ext (keys %need_externs_aux) {
 }
 
 %need_jars = (
-       'jobid.api-java' => [ qw/commons-codec/ ],
-       'lb.client-java' => [ qw/commons-lang/ ],
+       'jobid.api-java' => [ qw/jakarta-commons-codec/ ],
+       'lb.client-java' => [ qw/jakarta-commons-lang/ ],
 );
 
 for my $jar (keys %need_jars) {
@@ -374,7 +381,7 @@ for my $jar (keys %need_jars) {
                lb.types:B lb.common
                lbjp-common.trio
                jobid.api-cpp:B jobid.api-c
-               security.gss
+               lbjp-common.gss
        / ],
        'lb.client-java' => [ qw/
                lb.types:B
@@ -383,7 +390,7 @@ for my $jar (keys %need_jars) {
        / ],
        'lb.common' => [ qw/
                jobid.api-cpp:B jobid.api-c
-               lb.types:B lbjp-common.trio security.gss
+               lb.types:B lbjp-common.trio lbjp-common.gss
        / ],
        'lb.doc' => [ qw/lb.types:B/ ],
        'lb.logger' => [ qw/
@@ -391,39 +398,44 @@ for my $jar (keys %need_jars) {
                lbjp-common.log
                jobid.api-c
                lb.common
-               security.gss
+               lbjp-common.gss
+       / ],
+       'lb.logger-msg' => [ qw/
+               lb.logger
        / ],
        'lb.server' => [ qw/
                lb.ws-interface lb.types:B lb.common lb.state-machine
                lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
                jobid.api-c
-               security.gsoap-plugin security.gss
+               lbjp-common.gsoap-plugin lbjp-common.gss
        / ],
-       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ],
+       'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface lbjp-common.gss/ ],
        'lb.utils' => [ qw/
                lbjp-common.jp-interface
                jobid.api-c
                lbjp-common.trio lbjp-common.maildir
                lb.client lb.state-machine
        / ],
-       'lb.ws-test' => [ qw/security.gsoap-plugin lb.ws-interface/ ],
+       'lb.ws-test' => [ qw/lbjp-common.gsoap-plugin lb.ws-interface/ ],
        'lb.ws-interface' => [ qw/lb.types:B/ ],
        'lb.types' => [ qw// ],
        'lb.harvester' => [ qw/
                jobid.api-c lbjp-common.trio lbjp-common.db lb.common lb.client
-               security.gss lbjp-common.log
+               lbjp-common.gss lbjp-common.log
        / ],
        'lb.yaim' => [ qw// ],
        'lb.glite-LB' => [ qw/
                lb.logger:R lb.server:R lb.utils:R lb.doc:R
-               lb.ws-test:R lb.harvester:R lb.yaim:R
+               lb.ws-test:R lb.harvester:R lb.yaim:R lb.client-java:R
        / ],
        'lbjp-common.db' => [ qw/lbjp-common.trio lbjp-common.log/ ],
        'lbjp-common.maildir' => [ qw// ],
+       'lbjp-common.log' => [ qw// ],
        'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ],
        'lbjp-common.trio' => [ qw// ],
-       'security.gss' =>  [ qw// ],
-       'security.gsoap-plugin' =>  [ qw/security.gss/ ],
+       '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// ],
@@ -434,25 +446,27 @@ for my $jar (keys %need_jars) {
                 jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.maildir
                 jobid.api-c
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.doc' => [ qw// ],
        'jp.index' => [ qw/
                 jp.server-common jp.ws-interface
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.primary' => [ qw/
                 jobid.api-c
                 jp.server-common jp.ws-interface
                 lb.state-machine
                 lbjp-common.jp-interface lbjp-common.trio lbjp-common.db lbjp-common.server-bones
-                security.gsoap-plugin
+                lbjp-common.gsoap-plugin
         / ],
        'jp.server-common' => [ qw/ 
                 lbjp-common.jp-interface lbjp-common.db
         / ],
        'jp.ws-interface' => [ qw// ],
+
+       'gridsite.core' => [ qw/build.common-cpp:B/ ],
 );
 
 for my $ext (keys %deps_aux) {
@@ -475,8 +489,37 @@ for my $ext (keys %deps_aux) {
        jpclient => 'jp.client',
 );
 
+%obsoletes = (
+       'lb.yaim' => [ qq/glite-yaim-lb/ ],
+       'lbjp-common.gss' => [ qq/glite-security-gss/ ],
+       'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
+);
+
+%cvs_prefix = (
+       'lb' => 'org.glite',
+       'jp' => 'org.glite',
+       'jobid' => 'org.glite',
+       'lbjp-common' => 'org.glite',
+       'gridsite' => 'org',
+       'security' => 'org.glite',
+);
+
+%conf_prefix = (
+       'lb' => 'glite-',
+       'jp' => 'glite-',
+       'jobid' => 'glite-',
+       'lbjp-common' => 'glite-',
+       'gridsite' => '',
+       'security' => 'glite-',
+);
+
+my @k = keys %deps_aux;
+@buildroot{@k} = ('build') x ($#k+1);
+
 my @t = qw/lb.client-java jobid.api-java lb.types/;
-@topbuild{@t} = (1) x ($#t+1);
+@buildroot{@t} = ('') x ($#t+1);
+
+$buildroot{'gridsite.core'} = 'src';
 }
 
 sub full
@@ -490,8 +533,8 @@ sub mkinc
        my %aux;
        undef %aux;
        my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim
-security.gss security.gsoap-plugin
+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
 jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
@@ -508,19 +551,19 @@ jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
 
        my $build = '';
        
-       unless ($topbuild{$_}) {
-               $build = '/build';
-               unless (-d "$full/build") {
-                       mkdir "$full/build" or die "mkdir $full/build: $!\n";
+       unless ($buildroot{$_} eq '') {
+               $build = "/$buildroot{$_}";
+               unless (-d "$full/$buildroot{$_}") {
+                       mkdir "$full/$buildroot{$_}" or die "mkdir $full/$buildroot{$_}: $!\n";
                }
-               unlink "$full/build/Makefile";
-               symlink "../Makefile","$full/build/Makefile" or die "symlink ../Makefile $full/build/Makefile: $!\n";
+               unlink "$full/$buildroot{$_}/Makefile";
+               symlink "../Makefile","$full/$buildroot{$_}/Makefile" or die "symlink ../Makefile $full/$buildroot{$_}/Makefile: $!\n";
        }
 
-       open MKINC,">$full$build/Makefile.inc"
-               or die "$full$build/Makefile.inc: $!\n";
+       open MKINC,">$full/$buildroot{$_}/Makefile.inc"
+               or die "$full/$buildroot{$_}/Makefile.inc: $!\n";
 
-       print "Creating $full$build/Makefile.inc\n";
+       print "Creating $full/$buildroot{$_}/Makefile.inc\n";
 
        print MKINC qq{
 PREFIX = $prefix
@@ -552,6 +595,7 @@ BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
                globus=>'globus',
+               myproxy=>'myproxy',
                cares=>'c-ares',
                voms=>'org.glite.security.voms-api-cpp',
                gridsite=>'org.gridsite.shared',
@@ -566,10 +610,27 @@ BEGIN{
                glite_version=>'glite-version',
                glite_info_templates=>'glite-info-templates',
                glue_schema=>'glue-schema',
+               yaim_core=>'org.glite.yaim.core',
+               activemq=>'activemq-cpp-library',
+               apr=>'apr-dev',
+               aprutil=>'aprutil-dev',
        );
        %etics_projects = (
-               vdt=>[qw/globus globus_essentials/],
-               'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema/],
+               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/],
+       );
+
+       %platform_properties = (
+               'gridsite.core' => {
+                       sl5_x86_64_gcc412 => { aprSuffix => '1' },
+                       sl5_ia32_gcc412 => { aprSuffix => '1' },
+                       deb5_x86_64_gcc432 => { aprSuffix => '1.0' },
+                       deb5_ia32_gcc432 => { aprSuffix => '1.0' },
+                       slc4_x86_64_gcc346 => { aprSuffix => '0' },
+                       slc4_ia32_gcc346 => { aprSuffix => '0' },
+                       default => { 
+                       }
+               },
        );
 };
 
@@ -587,8 +648,8 @@ sub mode_etics {
                ($major,$minor,$rev,$age) = ($1,$2,$3,$4);
        }
        else { 
-               open V,"org.glite.$subsys.$module/project/version.properties"
-                       or die "org.glite.$subsys.$module/project/version.properties: $!\n";
+               open V,"$cvs_prefix{$subsys}.$subsys.$module/project/version.properties"
+                       or die "$cvs_prefix{$subsys}.$subsys.$module/project/version.properties: $!\n";
        
                while ($_ = <V>) {
                        chomp;
@@ -612,61 +673,98 @@ sub mode_etics {
        for (@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
 
-               push @copts,"--with-$_ \${$eext.location}/$_*.jar";
+               push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
        }
 
        my $conf;
        my $conftag;
 
+       $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
        if ($branch) {
-               $conf = "glite-${subsys}-${module}_$branch"; 
-               $conftag = $branch; 
-               $dwpath = ""; }
+               $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch"; 
+               $conftag = $branch;
+               # forced low age number
+               $age = $branch eq 'HEAD' ? '0head' : '0dev'; }
        else {
-               $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
-               $conftag = $conf; 
-               $dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n"; }
-#      my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+               $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; 
+
+# XXX: gridsite hack
+               $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
        my $file = $output ? $output : "$conf.ini";
        open C,">$file" or die "$file: $!\n";
 
-       my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build";
+       my $buildroot = $buildroot{"$subsys.$module"} eq '' ? '#no build.root' : "build.root = " . $buildroot{"$subsys.$module"};
 
-       my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..';
+       my $confdir = $buildroot{"$subsys.$module"} eq '' ? '..' : '../..';
 
        my $package_description = "";
        my $package_summary = "";
 
-       if (-e "org.glite.$subsys.$module/project/package.description") {
-               open V, "org.glite.$subsys.$module/project/package.description";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.description") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.description";
                $package_description = join ("", <V>);
                close V;
                chomp $package_description;
                $package_description =~ s/\n/\\n/g; 
-               $package_description = "package.description = $package_description";
+               $package_description = "package.description = $package_description\n";
        } 
        else { 
                print STDERR "package.description not found for $subsys.$module!\n"; }
 
-       if (-e "org.glite.$subsys.$module/project/package.summary") {
-               open V, "org.glite.$subsys.$module/project/package.summary";
+       if (-e "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary") {
+               open V, "$cvs_prefix{$subsys}.$subsys.$module/project/package.summary";
                $package_summary = join ("", <V>);
                close V;
                chomp $package_summary;
                $package_summary =~ s/\n/\\n/g; 
-               $package_summary = "package.summary = $package_summary";
+               $package_summary = "package.summary = $package_summary\n";
        } 
        else { 
                print STDERR "package.summary not found for $subsys.$module!\n"; }
 
+       my %cmd;
+       @cmd{qw/configure compile test install packaging clean/} = ('None') x 6;
+       $cmd{clean} = 'make clean';
+
+       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"';
+
+                       $cmd{compile} = "make $flags build";
+                       $cmd{install} = "make $flags install";
+                       $cmd{packaging} = "make $flags rpm";
+               }
+               else {
+                       $cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
+               }
+       }
+       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";
+               $cmd{compile} = 'make';
+               $cmd{test} = 'make check';
+               $cmd{install} = 'make install';
+       }
+
+       my $defprops = '';
+
+       for my $p (keys %{$platform_properties{"$subsys.$module"}->{default}}) {
+               $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}";
+       }
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = org.glite.$subsys.$module
+moduleName = $cvs_prefix{$subsys}.$subsys.$module
 displayName = $conf
-description = org.glite.$subsys.$module
+description = $cvs_prefix{$subsys}.$subsys.$module
 projectName = org.glite
 age = $age
 deploymentType = None
@@ -679,31 +777,51 @@ description = None
 tag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}
 branch = None
 commit = None
-checkout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}
+checkout = $checkoutcmd
 
 [Platform-default:BuildCommand]
 postpublish = None
-packaging = None
+packaging = $cmd{packaging}
 displayName = None
 description = None
 doc = None
 prepublish = None
 publish = None
-compile = make
+compile = $cmd{compile}
 init = None
-install = make install
-clean = make clean
-test = make check
-configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts
+install = $cmd{install}
+clean = $cmd{clean}
+test = $cmd{test}
+configure = $cmd{configure}
 checkstyle = None
 
 [Platform-default:Property]
 $buildroot
-$package_description
-$package_summary
+aprSuffix = 0
+package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
+$package_description$package_summary$defprops
+};
+       for (@{$obsoletes{"$subsys.$module"}}) {
+               print C "package.obsoletes = $_\n";
+               print C "package.replaces = $_\n";
+       }
 
-[Platform-default:DynamicDependency]
+       for my $pp (keys %{$platform_properties{"$subsys.$module"}}) {
+               next if $pp eq 'default';
+               print C "[Platform-$pp:Property]\n$buildroot\n";
+
+               for my $p (keys %{$platform_properties{"$subsys.$module"}->{$pp}}) {
+                       print C $p . ' = ' . $platform_properties{"$subsys.$module"}->{$pp}->{$p} . "\n";
+               }
+               print C q{package.RPMSLocation = ${moduleDir}/RPMTMP/RPMS
+package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
+};
+               print C "$package_description$package_summary\n";
+       }
 
+       print C qq{
+[Platform-default:DynamicDependency]
 };
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
@@ -804,6 +922,8 @@ General options (defaults in []):
   --thrflavour=flavour
   --nothrflavour=flavour       threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg]
   --listmodules=subsys          list modules of a subsystem
+  --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
   
 Mode of operation:
index d0856c0..939658e 100644 (file)
 2.0.0-1
 - Fixed library version numbering
 
+2.0.1-1
+- Fixed target 'clean' in the Makefile
+
+2.0.2-1
+- Fixed format of the package description file
+- Fixed target 'clean' in the Makefile
+
+2.0.2-2
+- Module rebuilt
+
index e9239d7..a0fc741 100644 (file)
@@ -1,2 +1 @@
-Standalone extended implementation of printf and scanf. Provides specialized
-formating options used by LB and JP.
+Standalone extended implementation of printf and scanf. Provides specialized formating options used by LB and JP.
index 95977c1..eb077ec 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/jra1mw/org.glite.lbjp-common.trio/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
-module.version=2.0.0
-module.age=1
+module.version=2.0.2
+module.age=2
index 5b50a78..a8cbc6a 100644 (file)
@@ -1,3 +1,3 @@
 # : /cvs/glite/org.glite.lbjp-common/project/version.properties,v 1.1 2009/01/21 12:57:26 akrenek Exp $
-module.version=2.0.3
-module.age=1
+module.version=2.0.5
+module.age=2