From 9184a9c6f2270a74daacc4ed5874617d1bf45ba0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Mon, 15 Mar 2010 14:35:07 +0000 Subject: [PATCH] Merge 20.2: - Merge from branch_2_0 to HEAD --- org.glite.jobid.api-c/Makefile | 8 +- org.glite.jobid.api-c/configure | 39 +-- org.glite.jobid.api-c/project/ChangeLog | 3 + org.glite.jobid.api-cpp/configure | 124 ++++++++-- org.glite.jobid.api-java/configure | 231 +++++++++++++++--- org.glite.lb.client-java/configure | 164 +++++++++++-- org.glite.lb.client-java/src_c/Makefile | 9 +- org.glite.lb.client/Makefile | 21 +- org.glite.lb.client/configure | 124 ++++++++-- org.glite.lb.client/m4/glite_lb_client.m4 | 6 +- org.glite.lb.client/project/ChangeLog | 2 + org.glite.lb.client/project/version.properties | 2 +- org.glite.lb.client/src/connection.c | 8 +- org.glite.lb.client/src/notify.c | 19 +- org.glite.lb.client/src/prod_proto.c | 9 +- org.glite.lb.common/Makefile | 14 +- org.glite.lb.common/configure | 124 ++++++++-- org.glite.lb.common/interface/events.h.T | 2 +- org.glite.lb.common/project/ChangeLog | 9 + org.glite.lb.common/project/version.properties | 4 +- org.glite.lb.common/src/connpool.c | 3 + org.glite.lb.common/test/il_int_test.cpp | 1 + org.glite.lb.common/test/il_msg_test.cpp | 1 + org.glite.lb.common/test/il_string_test.cpp | 1 + org.glite.lb.common/test/parse.cpp.T | 3 + org.glite.lb.doc/configure | 124 ++++++++-- org.glite.lb.doc/src/LBAG-Installation.tex | 26 +- org.glite.lb.doc/src/LBDG-Introduction.tex | 4 +- org.glite.lb.doc/src/LBTP-Abstract.tex | 2 +- org.glite.lb.doc/src/LBTP-Tests.tex | 11 + org.glite.lb.harvester/configure | 41 ++-- org.glite.lb.logger/Makefile | 4 +- org.glite.lb.logger/configure | 124 ++++++++-- org.glite.lb.logger/project/ChangeLog | 2 + org.glite.lb.logger/project/version.properties | 2 +- org.glite.lb.server/Makefile | 44 ++-- org.glite.lb.server/configure | 124 ++++++++-- org.glite.lb.server/project/ChangeLog | 12 + org.glite.lb.server/project/version.properties | 4 +- org.glite.lb.server/test/test_query_events.cpp | 2 + org.glite.lb.server/test/test_soap_conv.cpp | 2 + org.glite.lb.server/test/test_xml.cpp.T | 2 + org.glite.lb.state-machine/Makefile | 16 +- org.glite.lb.state-machine/configure | 124 ++++++++-- org.glite.lb.state-machine/project/ChangeLog | 8 + .../project/version.properties | 4 +- org.glite.lb.state-machine/src/process_event.c | 1 - org.glite.lb.types/configure | 124 ++++++++-- org.glite.lb.utils/Makefile | 12 +- org.glite.lb.utils/configure | 124 ++++++++-- org.glite.lb.utils/project/ChangeLog | 2 + org.glite.lb.utils/project/version.properties | 2 +- org.glite.lb.ws-interface/configure | 124 ++++++++-- org.glite.lb.ws-test/Makefile | 9 +- org.glite.lb.ws-test/configure | 124 ++++++++-- org.glite.lb/configure | 31 ++- org.glite.lb/egee_license_check.sh | 267 +++++++++++++++++++++ org.glite.lb/etics-tag-branch.pl | 170 +++++++++++++ org.glite.lb/etics-tag-with-subsystems-branch.pl | 198 +++++++++++++++ org.glite.lb/etics-tag-with-subsystems.pl | 7 +- org.glite.lb/etics-tag.pl | 1 + org.glite.lb/project/version.properties | 2 +- org.glite.lbjp-common.db/Makefile | 30 +-- org.glite.lbjp-common.db/configure | 124 ++++++++-- org.glite.lbjp-common.db/interface/db.h | 1 + org.glite.lbjp-common.db/project/ChangeLog | 10 + .../project/version.properties | 2 +- org.glite.lbjp-common.db/src/db.c | 2 + org.glite.lbjp-common.jp-interface/Makefile | 10 +- org.glite.lbjp-common.jp-interface/configure | 124 ++++++++-- .../project/ChangeLog | 2 + .../project/version.properties | 2 +- .../test/type_test.cpp | 2 + org.glite.lbjp-common.log/configure | 124 ++++++++-- org.glite.lbjp-common.maildir/Makefile | 8 +- org.glite.lbjp-common.maildir/configure | 124 ++++++++-- org.glite.lbjp-common.maildir/project/ChangeLog | 2 + .../project/version.properties | 2 +- org.glite.lbjp-common.server-bones/configure | 124 ++++++++-- .../project/ChangeLog | 2 + .../project/version.properties | 2 +- org.glite.lbjp-common.trio/Makefile | 8 +- org.glite.lbjp-common.trio/configure | 124 ++++++++-- org.glite.lbjp-common.trio/project/ChangeLog | 6 + .../project/version.properties | 2 +- org.glite.security.gsoap-plugin/configure | 152 ++++++++++-- org.glite.security.gss/configure | 152 ++++++++++-- 87 files changed, 3369 insertions(+), 583 deletions(-) create mode 100644 org.glite.lb/egee_license_check.sh create mode 100644 org.glite.lb/etics-tag-branch.pl create mode 100644 org.glite.lb/etics-tag-with-subsystems-branch.pl diff --git a/org.glite.jobid.api-c/Makefile b/org.glite.jobid.api-c/Makefile index cdeeda2..7813f71 100644 --- a/org.glite.jobid.api-c/Makefile +++ b/org.glite.jobid.api-c/Makefile @@ -34,7 +34,7 @@ LIBLOBJS:=${LIBOBJS:.o=.lo} LIB:=libglite_jobid.la -TEST_LIBS:=-L${cppunit_prefix}/lib -lcppunit -ldl +TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit -ldl TEST_INC:=-I${cppunit_prefix}/include compile all: ${LIB} @@ -44,7 +44,7 @@ version_info:=-version-info ${shell \ perl -e '$$,=":"; @F=split /\./,"${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } ${LIB}: ${LIBOBJS} - ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/lib + ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/${libdir} check: compile base64_test ./base64_test base64_test.xml @@ -58,9 +58,9 @@ clean: rm -rvf log.xml project rpmbuild RPMS tgz install: ${LIB} - mkdir -p ${PREFIX}/lib + mkdir -p ${PREFIX}/${libdir} mkdir -p ${PREFIX}/include/${globalprefix}/${jobidprefix} - ${INSTALL} -m 644 ${LIB} ${PREFIX}/lib + ${INSTALL} -m 644 ${LIB} ${PREFIX}/${libdir} (cd ${top_srcdir}/interface; ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${jobidprefix}) diff --git a/org.glite.jobid.api-c/configure b/org.glite.jobid.api-c/configure index 80b119c..6158a8e 100755 --- a/org.glite.jobid.api-c/configure +++ b/org.glite.jobid.api-c/configure @@ -20,6 +20,7 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,7 +312,7 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + 'lbjp-common.log' => [ qw/log4c/ ], 'lbjp-common.maildir' => [ qw// ], 'lbjp-common.server-bones' => [ qw// ], 'lbjp-common.trio' => [ qw/cppunit:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,8 +582,18 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; @@ -625,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None diff --git a/org.glite.jobid.api-c/project/ChangeLog b/org.glite.jobid.api-c/project/ChangeLog index 008dac5..fdc70ac 100644 --- a/org.glite.jobid.api-c/project/ChangeLog +++ b/org.glite.jobid.api-c/project/ChangeLog @@ -7,6 +7,9 @@ 1.0.0-4 - configure script update +1.0.0-5 +- install libraries into $libdir + 1.0.1-1 - additional includes in base64_test to fix build on Deb5 diff --git a/org.glite.jobid.api-cpp/configure b/org.glite.jobid.api-cpp/configure index 80097bd..6158a8e 100755 --- a/org.glite.jobid.api-cpp/configure +++ b/org.glite.jobid.api-cpp/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.jobid.api-java/configure b/org.glite.jobid.api-java/configure index f6c3ac2..6158a8e 100755 --- a/org.glite.jobid.api-java/configure +++ b/org.glite.jobid.api-java/configure @@ -20,13 +20,16 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; +my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; +my $libdir = getlibdir(); -my @nodes = qw/client server logger utils client-java doc ws-test/; +my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; my %disable_nodes; @@ -38,15 +41,23 @@ my %extern_prefix = ( globus => '/opt/globus', gsoap => '/usr', mysql => '/usr', + 'mysql-devel' => '', + 'mysql-server' => '', voms => '/opt/glite', gridsite => '/opt/glite', lcas => '/opt/glite', + trustmanager => '/opt/glite', ant => '/usr', jdk => '/usr', + libtar => '/usr', + axis => '/usr', + log4c => '/usr', + postgresql => '/usr' ); my %jar = ( - 'commons-codec' => '/usr/share/java/commons-codec-1.3.jar', + 'commons-codec' => '/usr/share/java/commons-codec.jar', + 'commons-lang' => '/usr/share/java/commons-lang.jar', ); @@ -61,10 +72,11 @@ my %deps_type; my %topbuild; my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test/], + 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester/], 'security' => [qw/gss gsoap-plugin/], - 'lbjp-common' => [qw/db maildir server-bones trio jp-interface/], + 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/], 'jobid' => [qw/api-c api-cpp api-java/], + 'jp' => [ qw/client doc index primary server-common ws-interface/ ], ); @@ -77,13 +89,16 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, 'lbjp-common-tag=s' => \$lbjp_tag, + 'jp-tag=s' => \$jp_tag, 'security-tag=s' => \$sec_tag, 'jobid-tag=s' => \$jobid_tag, 'help' => \$help, + 'libdir=s' => \$libdir, ); for (@nodes) { @@ -101,6 +116,9 @@ my @keeparg = @ARGV; GetOptions @opts or die "Errors parsing command line\n"; +$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq ''; +$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq ''; + if ($help) { usage(); exit 0; } if ($listmodules) { @@ -109,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -124,7 +142,7 @@ die "--enable-* and --disable-* are mutually exclusive\n" die "--module cannot be used with --enable-* or --disable-*\n" if $module && ($en || $dis); -die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}}; +die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}}; if ($dis) { for (@nodes) { @@ -150,10 +168,11 @@ my @modules; my %aux; if ($module) { +# push @modules,split(/[,.]+/,$module); push @modules,$module; } else { - @modules = map 'lb.'.($extranodmod{$_} ? $extranodmod{$_} : $_),keys %enable_nodes; + @modules = map(($extranodmod{$_} ? $extranodmod{$_} : 'lb.'.$_),(keys %enable_nodes)); my $n; @@ -219,7 +238,7 @@ sub mode_build { my %ldeps; undef %ldeps; @ldeps{@{$deps{$_}}} = 1; for my $x (split /,/,$staged) { delete $ldeps{$x}; } - my @dnames = keys %ldeps; + my @dnames = $module ? () : keys %ldeps; my $full = full($_); my $build = $topbuild{$_} ? '': '/build'; @@ -248,6 +267,13 @@ sub mode_checkout() { } } } + if ($jp_tag){ + for (@{$lbmodules{'jp'}}){ + if ("jp.".$_ eq $module){ + $tag = '-r '.$jp_tag; + } + } + } if ($sec_tag){ for (@{$lbmodules{security}}){ if ("security.".$_ eq $module){ @@ -274,26 +300,34 @@ sub mode_checkout() { BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], - 'lb.client-java' => [ qw/ant:B/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], 'lb.logger' => [ qw/cppunit:B/ ], - 'lb.server' => [ qw/globus expat cares mysql cppunit:B gsoap:B classads voms lcas gridsite/ ], + '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// ], - 'lbjp-common.db' => [ qw/mysql/ ], + 'lb.harvester' => [ qw/postgresql:R/ ], + 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql: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 cares cppunit:B/ ], - 'security.gsoap-plugin' => [ qw/cppunit:B globus cares gsoap: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/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], + 'jp.client' => [ qw/gsoap libtar globus_essentials:R globus:B/ ], + 'jp.doc' => [], + 'jp.index' => [ qw/gsoap globus_essentials:R globus:B/ ], + 'jp.primary' => [ qw/classads gsoap libtar globus_essentials:R globus:B/ ], + 'jp.server-common' => [], + 'jp.ws-interface' => [], ); for my $ext (keys %need_externs_aux) { @@ -307,6 +341,7 @@ for my $ext (keys %need_externs_aux) { %need_jars = ( 'jobid.api-java' => [ qw/commons-codec/ ], + 'lb.client-java' => [ qw/commons-lang/ ], ); for my $jar (keys %need_jars) { @@ -319,31 +354,33 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ lb.types:B + lb.ws-interface:B jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], 'lb.logger' => [ qw/ lbjp-common.trio + lbjp-common.log jobid.api-c lb.common security.gss / ], '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.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log jobid.api-c security.gsoap-plugin security.gss / ], - 'lb.state-machine' => [ qw/lb.common lbjp-common.jp-interface security.gss/ ], + 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ], 'lb.utils' => [ qw/ lbjp-common.jp-interface jobid.api-c @@ -353,9 +390,13 @@ for my $jar (keys %need_jars) { 'lb.ws-test' => [ qw/security.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.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -364,6 +405,30 @@ for my $jar (keys %need_jars) { 'jobid.api-java' => [ qw// ], 'lbjp-common.jp-interface' => [ qw/lbjp-common.db jobid.api-c/ ], + + 'jp.client' => [ qw/ + jp.ws-interface + lbjp-common.jp-interface lbjp-common.maildir + jobid.api-c + security.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 + / ], + '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 + / ], + 'jp.server-common' => [ qw/ + lbjp-common.jp-interface lbjp-common.db + / ], + 'jp.ws-interface' => [ qw// ], ); for my $ext (keys %deps_aux) { @@ -378,7 +443,13 @@ for my $ext (keys %deps_aux) { %extrafull = ( gridsite=>'org.gridsite.core'); -# %extranodmod = ( java => 'client-java' ); +#( java => 'client-java' ); +%extranodmod = ( + db => 'lbjp-common.db', + jpprimary => 'jp.primary', + jpindex => 'jp.index', + jpclient => 'jp.client', +); my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); @@ -395,10 +466,11 @@ 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.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 security.gss security.gsoap-plugin jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface +lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface +jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface /; @aux{@m} = (1) x ($#m+1); @@ -431,6 +503,7 @@ PREFIX = $prefix stagedir = $stagedir thrflavour = $thrflavour nothrflavour = $nothrflavour +libdir = $libdir }; for (@{$need_externs{$short}}) { @@ -453,14 +526,16 @@ my %etics_externs; my %etics_projects; BEGIN{ %etics_externs = ( - globus=>'vdt_globus_essentials', + globus_essentials=>'vdt_globus_essentials', + globus=>'globus', cares=>'c-ares', voms=>'org.glite.security.voms-api-cpp', gridsite=>'org.gridsite.shared', lcas=>'org.glite.security.lcas', + trustmanager=>'org.glite.security.trustmanager', ); %etics_projects = ( - vdt=>[qw/globus/], + vdt=>[qw/globus globus_essentials/], 'org.glite'=>[qw/voms gridsite lcas/], ); }; @@ -495,8 +570,10 @@ sub mode_etics { @ge{@{$etics_projects{'org.glite'}}} = (1) x ($#{$etics_projects{'org.glite'}}+1); for (@{$need_externs{"$subsys.$module"}}) { + if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) { my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; + } } for (@{$need_jars{"$subsys.$module"}}) { @@ -505,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -524,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -549,11 +661,13 @@ 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} --module $subsys.$module @copts +configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -594,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; @@ -607,7 +770,8 @@ General options (defaults in []): --staged=module,module,... what is already in PREFIX (specify without org.glite.) --thrflavour=flavour --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] - --listmodules=subsys list modules of a subsystem + --listmodules=subsys list modules of a subsystem + --libdir=libdir typically [lib,lib64] postfix Mode of operation: --mode={checkout|build|etics} what to do [build] @@ -618,6 +782,7 @@ What to build: @{$lbmodules{lb}},@{$lbmodules{security}} --disable-NODE don't build this node --lb-tag=tag checkout LB modules with specific tag + --jp-tag=tag checkout JP modules with specific tag --lbjp-common-tag=tag checkout lbjp-common modules with specific tag --security-tag=tag checkout security modules with specific tag --jobid-tag=tag checkout jobid modules with specific tag diff --git a/org.glite.lb.client-java/configure b/org.glite.lb.client-java/configure index 9a7e696..6158a8e 100755 --- a/org.glite.lb.client-java/configure +++ b/org.glite.lb.client-java/configure @@ -20,14 +20,16 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; 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/; +my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; my %disable_nodes; @@ -39,16 +41,23 @@ my %extern_prefix = ( globus => '/opt/globus', gsoap => '/usr', mysql => '/usr', + 'mysql-devel' => '', + 'mysql-server' => '', voms => '/opt/glite', gridsite => '/opt/glite', lcas => '/opt/glite', + trustmanager => '/opt/glite', ant => '/usr', jdk => '/usr', libtar => '/usr', + axis => '/usr', + log4c => '/usr', + postgresql => '/usr' ); my %jar = ( - 'commons-codec' => '/usr/share/java/commons-codec-1.3.jar', + 'commons-codec' => '/usr/share/java/commons-codec.jar', + 'commons-lang' => '/usr/share/java/commons-lang.jar', ); @@ -63,9 +72,9 @@ my %deps_type; my %topbuild; my %lbmodules = ( - 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test/], + 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester/], 'security' => [qw/gss gsoap-plugin/], - 'lbjp-common' => [qw/db maildir server-bones trio jp-interface/], + 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/], 'jobid' => [qw/api-c api-cpp api-java/], 'jp' => [ qw/client doc index primary server-common ws-interface/ ], ); @@ -80,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -88,6 +98,7 @@ my @opts = ( 'security-tag=s' => \$sec_tag, 'jobid-tag=s' => \$jobid_tag, 'help' => \$help, + 'libdir=s' => \$libdir, ); for (@nodes) { @@ -105,6 +116,9 @@ my @keeparg = @ARGV; GetOptions @opts or die "Errors parsing command line\n"; +$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq ''; +$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq ''; + if ($help) { usage(); exit 0; } if ($listmodules) { @@ -113,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -286,23 +300,25 @@ sub mode_checkout() { BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], - 'lb.client-java' => [ qw/ant:B/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], 'lb.logger' => [ qw/cppunit:B/ ], - 'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql cppunit:B gsoap:B classads voms lcas gridsite/ ], + '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// ], - 'lbjp-common.db' => [ qw/mysql/ ], + 'lb.harvester' => [ qw/postgresql:R/ ], + 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql: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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -325,6 +341,7 @@ for my $ext (keys %need_externs_aux) { %need_jars = ( 'jobid.api-java' => [ qw/commons-codec/ ], + 'lb.client-java' => [ qw/commons-lang/ ], ); for my $jar (keys %need_jars) { @@ -337,31 +354,33 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ lb.types:B + lb.ws-interface:B jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], 'lb.logger' => [ qw/ lbjp-common.trio + lbjp-common.log jobid.api-c lb.common security.gss / ], '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.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log jobid.api-c security.gsoap-plugin security.gss / ], - 'lb.state-machine' => [ qw/lb.common lbjp-common.jp-interface security.gss/ ], + 'lb.state-machine' => [ qw/lb.types:B lb.common lbjp-common.jp-interface security.gss/ ], 'lb.utils' => [ qw/ lbjp-common.jp-interface jobid.api-c @@ -371,9 +390,13 @@ for my $jar (keys %need_jars) { 'lb.ws-test' => [ qw/security.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.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -443,10 +466,10 @@ 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.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 security.gss security.gsoap-plugin jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface +lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface /; @aux{@m} = (1) x ($#m+1); @@ -480,6 +503,7 @@ PREFIX = $prefix stagedir = $stagedir thrflavour = $thrflavour nothrflavour = $nothrflavour +libdir = $libdir }; for (@{$need_externs{$short}}) { @@ -508,6 +532,7 @@ BEGIN{ voms=>'org.glite.security.voms-api-cpp', gridsite=>'org.gridsite.shared', lcas=>'org.glite.security.lcas', + trustmanager=>'org.glite.security.trustmanager', ); %etics_projects = ( vdt=>[qw/globus globus_essentials/], @@ -545,8 +570,10 @@ sub mode_etics { @ge{@{$etics_projects{'org.glite'}}} = (1) x ($#{$etics_projects{'org.glite'}}+1); for (@{$need_externs{"$subsys.$module"}}) { + if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) { my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_; push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}"; + } } for (@{$need_jars{"$subsys.$module"}}) { @@ -555,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -574,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -599,11 +661,13 @@ 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} --module $subsys.$module @copts +configure = cd $confdir && \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -644,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; @@ -658,6 +771,7 @@ General options (defaults in []): --thrflavour=flavour --nothrflavour=flavour threaded and non-treaded flavours [gcc64dbgpthr,gcc64dbg] --listmodules=subsys list modules of a subsystem + --libdir=libdir typically [lib,lib64] postfix Mode of operation: --mode={checkout|build|etics} what to do [build] diff --git a/org.glite.lb.client-java/src_c/Makefile b/org.glite.lb.client-java/src_c/Makefile index ea08cc3..6e76ae4 100755 --- a/org.glite.lb.client-java/src_c/Makefile +++ b/org.glite.lb.client-java/src_c/Makefile @@ -1,3 +1,6 @@ +-include ../Makefile.inc +-include ../../Makefile.inc + CC=gcc PATH_TO_JAVA=${JAVA_HOME} @@ -9,14 +12,14 @@ VPATH=${topdir}/src_c compile: ${LIB} ${LIB}: ${OBJ} - libtool --mode=link ${CC} -rpath ${PREFIX}/lib -o $@ ${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 $< install: compile - -mkdir -p ${PREFIX}/lib - libtool --mode=install install -m 755 ${LIB} ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} + libtool --mode=install install -m 755 ${LIB} ${PREFIX}/${libdir} clean: rm -rf ${OBJ} .libs ${LIB} diff --git a/org.glite.lb.client/Makefile b/org.glite.lb.client/Makefile index 4954218..1528f1e 100644 --- a/org.glite.lb.client/Makefile +++ b/org.glite.lb.client/Makefile @@ -187,26 +187,26 @@ generate: ${GEN_HDRS} default: all ${LIB}: ${LIBOBJS} - ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/lib \ + ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/${libdir} \ ${COMMON_LIB} ${TRIO_LIB} \ -lglite_security_gss_${nothrflavour} ${THRLIB}: ${LIBTHROBJS} - ${LINK} ${version_info} -o $@ ${LIBTHRLOBJS} -rpath ${PREFIX}/lib \ + ${LINK} ${version_info} -o $@ ${LIBTHRLOBJS} -rpath ${PREFIX}/${libdir} \ ${COMMON_LIB_THR} ${TRIO_LIB} \ -lglite_security_gss_${thrflavour} ${PLUSLIB}: ${PLUSOBJS} ${LIB} - ${LINKXX} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/lib ${LIB} ${PLUS_EXTRA_LIB} + ${LINKXX} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/${libdir} ${LIB} ${PLUS_EXTRA_LIB} ${THRPLUSLIB}: ${PLUSTHROBJS} ${THRLIB} - ${LINKXX} ${version_info} -o $@ ${PLUSTHRLOBJS} -rpath ${PREFIX}/lib ${THRLIB} ${PLUS_EXTRA_LIB} + ${LINKXX} ${version_info} -o $@ ${PLUSTHRLOBJS} -rpath ${PREFIX}/${libdir} ${THRLIB} ${PLUS_EXTRA_LIB} logevent: logevent.o args.o ${LINK} -o $@ logevent.o args.o ${LIB} ${EXT_LIB} notify: notify.o - ${LINKXX} -o $@ notify.o ${PLUSLIB} ${EXT_LIB} + ${LINKXX} -o $@ notify.o ${PLUSLIB} ${EXT_LIB} ${PLUS_EXTRA_LIB} register_sandbox: %: %.o ${LINK} -o $@ $@.o ${LIB} ${EXT_LIB} @@ -322,7 +322,7 @@ install: mkdir -p ${PREFIX}/bin mkdir -p ${PREFIX}/sbin mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} - mkdir -p ${PREFIX}/lib + mkdir -p ${PREFIX}/${libdir} mkdir -p ${PREFIX}/share/doc/${package}-${version}/api mkdir -p ${PREFIX}/share/doc/${package}-${version}/examples mkdir -p ${PREFIX}/share/man/man1 @@ -330,10 +330,10 @@ install: mkdir -p ${PREFIX}/share/man/man8 mkdir -p ${PREFIX}/share/build/m4 ifdef LB_STANDALONE - ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/lib + ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/${libdir} else - ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${PREFIX}/lib - ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/lib + ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${PREFIX}/${libdir} + ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/${libdir} endif ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} ( cd ${top_srcdir}/project && ${INSTALL} -m 644 ChangeLog package.description package.summary ${PREFIX}/share/doc/${package}-${version} ) @@ -364,7 +364,8 @@ 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 - ${INSTALL} -m 644 ${top_srcdir}/m4/*.m4 ${PREFIX}/share/build/m4/ + 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/ clean: rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h *.dox producer_test notify C/ CPP/ diff --git a/org.glite.lb.client/configure b/org.glite.lb.client/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.client/configure +++ b/org.glite.lb.client/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.client/m4/glite_lb_client.m4 b/org.glite.lb.client/m4/glite_lb_client.m4 index 878d59f..f04dca8 100755 --- a/org.glite.lb.client/m4/glite_lb_client.m4 +++ b/org.glite.lb.client/m4/glite_lb_client.m4 @@ -19,15 +19,15 @@ AC_DEFUN([AC_GLITE_LB], dnl dnl dnl - ac_glite_lb_lib="-L$ac_glite_lb_prefix/lib" + 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/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/%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="" diff --git a/org.glite.lb.client/project/ChangeLog b/org.glite.lb.client/project/ChangeLog index b7545e4..f08813f 100644 --- a/org.glite.lb.client/project/ChangeLog +++ b/org.glite.lb.client/project/ChangeLog @@ -58,3 +58,5 @@ - Minor fixes in example builds - stats extended for any job state +4.0.3-2 +- install libraries into $libdir diff --git a/org.glite.lb.client/project/version.properties b/org.glite.lb.client/project/version.properties index 0e08a6c..9f4af8d 100644 --- a/org.glite.lb.client/project/version.properties +++ b/org.glite.lb.client/project/version.properties @@ -1,3 +1,3 @@ # $Header$ module.version=4.0.3 -module.age=1 +module.age=2 diff --git a/org.glite.lb.client/src/connection.c b/org.glite.lb.client/src/connection.c index 074651c..3bc75f1 100644 --- a/org.glite.lb.client/src/connection.c +++ b/org.glite.lb.client/src/connection.c @@ -323,6 +323,10 @@ int edg_wll_open(edg_wll_Context ctx, int* connToUse) #endif *connToUse = index; + + //Lock the select connection, unlock the rest of the pool + edg_wll_connectionTryLock(ctx, index); + edg_wll_poolUnlock(); /* Old Comment: support anonymous connections, perhaps add a flag to the connPool * struct specifying whether or not this connection shall be authenticated @@ -430,7 +434,9 @@ ok: end: - edg_wll_poolUnlock(); /* One way or the other, there are no more pool-wide operations */ +// edg_wll_poolUnlock(); /* One way or the other, there are no more pool-wide operations */ +// ZS, 2 Feb 2010: Overall pool lock replaced with a connection-specific +// lock for the most part // xxxxx diff --git a/org.glite.lb.client/src/notify.c b/org.glite.lb.client/src/notify.c index b3ebff0..8e8893c 100644 --- a/org.glite.lb.client/src/notify.c +++ b/org.glite.lb.client/src/notify.c @@ -134,12 +134,11 @@ int main(int argc,char **argv) edg_wll_JobStatCode single_code; int statno, stdelims, sti; - - - conditions = (edg_wll_QueryRec **)calloc(7,sizeof(edg_wll_QueryRec *)); +#define MAX_NEW_CONDS 7 + conditions = (edg_wll_QueryRec **)calloc(MAX_NEW_CONDS + 1,sizeof(edg_wll_QueryRec *)); conditions[0] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec)); - while ((c = getopt_long(argc-1,argv+1,"j:o:v:n:s:a:t:f:cOS:",long_options,&option_index)) > 0) switch (c) { + while ((c = getopt_long(argc-1,argv+1,"j:o:v:n:s:a:t:f:cOS:",long_options,&option_index)) > 0) { switch (c) { case 'j': conditions[i] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec)); conditions[i][0].attr = EDG_WLL_QUERY_ATTR_JOBID; @@ -233,6 +232,10 @@ int main(int argc,char **argv) break; default: usage("new"); return EX_USAGE; + } + if (i > MAX_NEW_CONDS) { + usage("new"); return EX_USAGE; + } } if ( !edg_wll_NotifNew(ctx, @@ -439,14 +442,16 @@ receive_err: } conditions = (edg_wll_QueryRec **)calloc(2,sizeof(edg_wll_QueryRec *)); - conditions[0] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec)); - conditions[1] = (edg_wll_QueryRec *)calloc(3, sizeof(edg_wll_QueryRec)); + conditions[0] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec)); conditions[0][0].attr = EDG_WLL_QUERY_ATTR_JOBID; conditions[0][0].op = EDG_WLL_QUERY_OP_EQUAL; conditions[0][0].value.j = jid; - /*conditions[1][0].attr = EDG_WLL_QUERY_ATTR_STATUS; + conditions[1] = NULL; + + /*conditions[1] = (edg_wll_QueryRec *)calloc(3, sizeof(edg_wll_QueryRec)); + conditions[1][0].attr = EDG_WLL_QUERY_ATTR_STATUS; conditions[1][0].op = EDG_WLL_QUERY_OP_EQUAL; conditions[1][0].value.i = EDG_WLL_JOB_DONE; diff --git a/org.glite.lb.client/src/prod_proto.c b/org.glite.lb.client/src/prod_proto.c index c233bca..3d1a2ff 100644 --- a/org.glite.lb.client/src/prod_proto.c +++ b/org.glite.lb.client/src/prod_proto.c @@ -268,6 +268,10 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) ctx->connections->connPool[index].peerPort,index); #endif + // Unlock the pool here but lock the connection in question + edg_wll_connectionTryLock(ctx, index); + edg_wll_poolUnlock(); + #if 0 /* acquire gss credentials */ ret = edg_wll_gss_acquire_cred_gsi( @@ -346,7 +350,10 @@ edg_wll_log_connect_err: edg_wll_log_connect_end: if (index >= 0) edg_wll_connectionTryLock(ctx, index); - edg_wll_poolUnlock(); +// edg_wll_poolUnlock(); +// ZS, 2 Feb 2010: Overall pool lock replaced with a connection-specific +// lock for the most part + #ifdef EDG_WLL_LOG_STUB if (answer) { diff --git a/org.glite.lb.common/Makefile b/org.glite.lb.common/Makefile index c28306c..d6901e1 100644 --- a/org.glite.lb.common/Makefile +++ b/org.glite.lb.common/Makefile @@ -79,8 +79,8 @@ ifdef LB_PROF endif COMPILE:=libtool --mode=compile ${CC} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} INSTALL:=libtool --mode=install install OBJS:=${JOBID_OBJS} ${PERF_OBJS} lb_plain_io.o events.o mini_http.o query_rec.o \ @@ -167,13 +167,13 @@ mkreports: -mkdir -p ${REPORTS} check.parse: test_parse - ./test_parse ${REPORTS}/parse.xml + LD_LIBRARY_PATH=${cares_prefix}/${libdir}:${classads_prefix}/${libdir}:${LD_LIBRARY_PATH} ./test_parse ${REPORTS}/parse.xml test_parse: parse.o test_main.cpp ${LINKXX} -o test_parse parse.o ${LTLIB} ${TEST_LIBS} ${EXT_LIBS} check.il: il_test - ./il_test ${REPORTS}/il.xml + LD_LIBRARY_PATH=${cares_prefix}/${libdir}:${classads_prefix}/${libdir}:${LD_LIBRARY_PATH} ./il_test ${REPORTS}/il.xml il_test: il_test.o il_int_test.o il_string_test.o il_msg_test.o ${LINKXX} -o $@ $+ ${LTLIB} ${TEST_LIBS} ${EXT_LIBS} @@ -201,16 +201,16 @@ olddoc: generate events.tex status.tex doxygen CPP.dox install: - mkdir -p ${PREFIX}/lib + mkdir -p ${PREFIX}/${libdir} mkdir -p ${PREFIX}/share/doc/${package}-${version}/examples - ${INSTALL} -m 644 ${LTLIB} ${THRLTLIB} ${MAILDIR_LIB} ${PREFIX}/lib + ${INSTALL} -m 644 ${LTLIB} ${THRLTLIB} ${MAILDIR_LIB} ${PREFIX}/${libdir} ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} ( cd ${top_srcdir}/project && ${INSTALL} -m 644 ChangeLog package.description package.summary ${PREFIX}/share/doc/${package}-${version} ) # cp -r C CPP ${PREFIX}/share/doc/${package}-${version} mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} ; (cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix}) ; ${INSTALL} -m 644 ${GEN_HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix} ; - ${INSTALL} -m 644 ${STATICLIB} ${THRSTATICLIB} ${PREFIX}/lib; + ${INSTALL} -m 644 ${STATICLIB} ${THRSTATICLIB} ${PREFIX}/${libdir}; if [ x${LB_STANDALONE} = xyes ]; then \ mkdir -p ${PREFIX}/include/glite/wmsutils/jobid ; \ ${INSTALL} -m 644 glite/wmsutils/jobid/*.h ${PREFIX}/include/glite/wmsutils/jobid/ ; \ diff --git a/org.glite.lb.common/configure b/org.glite.lb.common/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.common/configure +++ b/org.glite.lb.common/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.common/interface/events.h.T b/org.glite.lb.common/interface/events.h.T index 4f64049..dc94115 100644 --- a/org.glite.lb.common/interface/events.h.T +++ b/org.glite.lb.common/interface/events.h.T @@ -312,7 +312,7 @@ for ($event->getFieldsOrdered) { my $f = selectField $event $_; my $fn = $f->{name}; my $tn = $f->getType; - gen $indent."$tn\t\t$fn;\t\\\n"; + gen $indent."$tn\t\t$fn /**<< $f->{comment} */;\t\\\n"; } gen "\n"; @@@} diff --git a/org.glite.lb.common/project/ChangeLog b/org.glite.lb.common/project/ChangeLog index 93cc697..7fe4f97 100644 --- a/org.glite.lb.common/project/ChangeLog +++ b/org.glite.lb.common/project/ChangeLog @@ -45,3 +45,12 @@ 7.0.3-1 - Support for background purge funcionality +7.0.3-2 +- install libraries into $libdir +- buildtime dependency on c-ares + +7.0.4-1 +- Fixed test initiation in Makefile + +7.0.4-2 +- Buildtime dependency on c-ares diff --git a/org.glite.lb.common/project/version.properties b/org.glite.lb.common/project/version.properties index 753ec92..84c41d9 100644 --- a/org.glite.lb.common/project/version.properties +++ b/org.glite.lb.common/project/version.properties @@ -1,3 +1,3 @@ # $Header$ -module.version=7.0.3 -module.age=1 +module.version=7.0.4 +module.age=2 diff --git a/org.glite.lb.common/src/connpool.c b/org.glite.lb.common/src/connpool.c index 1515cee..c39c410 100644 --- a/org.glite.lb.common/src/connpool.c +++ b/org.glite.lb.common/src/connpool.c @@ -267,6 +267,8 @@ edg_wll_Connections* edg_wll_initConnections() { printf("Entering edg_wll_initConnections\n"); #endif + edg_wll_poolLock(); + if((connectionsHandle.connPool == NULL) && (connectionsHandle.poolSize > 0)) { /* We need to allocate memory for the connPool and connectionLock arrays */ @@ -294,6 +296,7 @@ edg_wll_Connections* edg_wll_initConnections() { connectionsHandle.serverConnection = (edg_wll_ConnPool *) calloc(1, sizeof(edg_wll_ConnPool)); } + edg_wll_poolUnlock(); return (&connectionsHandle); } diff --git a/org.glite.lb.common/test/il_int_test.cpp b/org.glite.lb.common/test/il_int_test.cpp index cb9f93a..7dc7fbf 100644 --- a/org.glite.lb.common/test/il_int_test.cpp +++ b/org.glite.lb.common/test/il_int_test.cpp @@ -16,6 +16,7 @@ limitations under the License. */ #include +#include extern "C" { diff --git a/org.glite.lb.common/test/il_msg_test.cpp b/org.glite.lb.common/test/il_msg_test.cpp index 1f588f9..36dd432 100644 --- a/org.glite.lb.common/test/il_msg_test.cpp +++ b/org.glite.lb.common/test/il_msg_test.cpp @@ -17,6 +17,7 @@ limitations under the License. #include #include +#include extern "C" { #include diff --git a/org.glite.lb.common/test/il_string_test.cpp b/org.glite.lb.common/test/il_string_test.cpp index 0c95f33..4701d53 100644 --- a/org.glite.lb.common/test/il_string_test.cpp +++ b/org.glite.lb.common/test/il_string_test.cpp @@ -16,6 +16,7 @@ limitations under the License. */ #include +#include extern "C" { #include diff --git a/org.glite.lb.common/test/parse.cpp.T b/org.glite.lb.common/test/parse.cpp.T index b0f886d..fa67b01 100644 --- a/org.glite.lb.common/test/parse.cpp.T +++ b/org.glite.lb.common/test/parse.cpp.T @@ -16,6 +16,9 @@ limitations under the License. */ #include +#include +#include +//#include #include #include diff --git a/org.glite.lb.doc/configure b/org.glite.lb.doc/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.doc/configure +++ b/org.glite.lb.doc/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.doc/src/LBAG-Installation.tex b/org.glite.lb.doc/src/LBAG-Installation.tex index 7c13cd7..f6ff88a 100644 --- a/org.glite.lb.doc/src/LBAG-Installation.tex +++ b/org.glite.lb.doc/src/LBAG-Installation.tex @@ -237,6 +237,7 @@ mysql -u lbserver lbserver20 \ \subsubsection{Migration to \LB 2.0} +\label{inst:migrate20} The migration process of existing \LB 1.x database to the \LB 2.0 is not handled automatically. The database schema change is required due to support of merged \LB server and proxy services using single @@ -400,11 +401,30 @@ disk separate from OS and MySQL log files (\texttt{innodb\_log\_group\_home\_dir \subsection{\LB proxy} \label{inst:LBproxy} -TODO: Describe LB Proxy migration here. +% TODO: Describe LB Proxy migration here. -All necessary configuration of standalone \LB proxy is done by YAIM, -previous \LB server section applies to merged server+proxy setups (\LBnew only). +All necessary configuration of \LB proxy is done by YAIM, +and described with gLite WMS installation elsewhere. +Previous \LB server section applies to merged server+proxy setups (\LBnew only). + +A~special care must be taken when an existing \LB proxy database +is migrated to \LBnew. +In general, this is not a~typical scenario -- \LBnew server in proxy mode +on WMS node is introduced with a~major WMS upgrade, and it is expeced +to be installed from scratch rather than migrated, preserving \LB proxy data. + +If the migration is really needed, \verb'glite-lb-migrate_db2version20' +script should be run with~\verb'-p' (Sect~\ref{inst:migrate20}). +However, the \LB database name remains \verb'lbproxy' while +the \LBnew binaries expect unified \verb'lbserver20' by default. +Because renaming a~MySQL database is a~non-trivial, error prone task, +the recommended workaround is to add the following variable setting + +\verb'GLITE_LB_SERVER_OTHER_OPTIONS="--mysql lbserver/@localhost:lbproxy"' + +into the gLite startup environment (\verb'/opt/glite/etc/profile.d') instead. +This setting makes \LB server use the \verb'lbproxy' database instead of the default. \subsection{\LB logger} diff --git a/org.glite.lb.doc/src/LBDG-Introduction.tex b/org.glite.lb.doc/src/LBDG-Introduction.tex index 8a22f35..1ce619d 100644 --- a/org.glite.lb.doc/src/LBDG-Introduction.tex +++ b/org.glite.lb.doc/src/LBDG-Introduction.tex @@ -567,13 +567,13 @@ library): using namespace glite::jobid; glite_jobid_t cjobid; -JobId *jobid = new JobId(cjobid); +JobId jobid(cjobid); \end{lstlisting} \emph{Note:} This creates copy of the structure, the original structure has to be deallocated as usual. \item parsed from the string: \begin{lstlisting} -JobId jobid(std::string("https://some.host:9000/OirOgeWh_F9sfMZjnIPYhQ")); +JobId jobid("https://some.host:9000/OirOgeWh_F9sfMZjnIPYhQ"); \end{lstlisting} \item from the components: \begin{lstlisting} diff --git a/org.glite.lb.doc/src/LBTP-Abstract.tex b/org.glite.lb.doc/src/LBTP-Abstract.tex index 80e9d9b..4025c1b 100644 --- a/org.glite.lb.doc/src/LBTP-Abstract.tex +++ b/org.glite.lb.doc/src/LBTP-Abstract.tex @@ -20,4 +20,4 @@ This test plan document explains how to test the Logging and Bookkeeping (\LB) service. Two major categories of tests are described: integration tests (include installation, configuration and basic service ping tests) and system tests (basic functionality tests, performance and stress tests, -interoperability tests and security tests). \ No newline at end of file +interoperability tests and security tests). diff --git a/org.glite.lb.doc/src/LBTP-Tests.tex b/org.glite.lb.doc/src/LBTP-Tests.tex index e277359..871b2e4 100644 --- a/org.glite.lb.doc/src/LBTP-Tests.tex +++ b/org.glite.lb.doc/src/LBTP-Tests.tex @@ -435,6 +435,17 @@ In all above cases: Watch the life cycle. Check the resulting state (\emph{Clear \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 number of jobs to generate may be specified using the \texttt{-n} argument + +\note\ Job submissions are limited to VOCE CEs in normal circumstances. Use the \texttt{-w} argument to override. + +\note\ Due to the nature of grid computing, this test may take hours to complete! + + + \section{Regression testing} \subsection{Publishing Correct Service Version over BDII} diff --git a/org.glite.lb.harvester/configure b/org.glite.lb.harvester/configure index 4ee7639..6158a8e 100755 --- a/org.glite.lb.harvester/configure +++ b/org.glite.lb.harvester/configure @@ -20,6 +20,7 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,9 +312,9 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + 'lbjp-common.log' => [ qw/log4c/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw/log4c/ ], + '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/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,8 +582,18 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; @@ -625,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None diff --git a/org.glite.lb.logger/Makefile b/org.glite.lb.logger/Makefile index 856aa9a..9623224 100644 --- a/org.glite.lb.logger/Makefile +++ b/org.glite.lb.logger/Makefile @@ -48,10 +48,10 @@ CFLAGS:=${DEBUG} \ ${COVERAGE_FLAGS} \ ${VERSION} ${LB_STANDALONE_FLAGS} ${LB_PERF_FLAGS} -LDFLAGS:=-L${stagedir}/lib \ +LDFLAGS:=-L${stagedir}/${libdir} \ ${COVERAGE_FLAGS} LINK:=libtool --mode=link ${CC} ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} INSTALL:=libtool --mode=install install #ifneq (${expat_prefix},/usr) diff --git a/org.glite.lb.logger/configure b/org.glite.lb.logger/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.logger/configure +++ b/org.glite.lb.logger/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.logger/project/ChangeLog b/org.glite.lb.logger/project/ChangeLog index 4eae228..b9eae69 100644 --- a/org.glite.lb.logger/project/ChangeLog +++ b/org.glite.lb.logger/project/ChangeLog @@ -49,3 +49,5 @@ 2.0.4-1 - Man page update +2.0.4-2 +- install libraries into $libdir diff --git a/org.glite.lb.logger/project/version.properties b/org.glite.lb.logger/project/version.properties index 6cf7a4c..f217dfa 100644 --- a/org.glite.lb.logger/project/version.properties +++ b/org.glite.lb.logger/project/version.properties @@ -1,3 +1,3 @@ # $Header$ module.version=2.0.4 -module.age=1 +module.age=2 diff --git a/org.glite.lb.server/Makefile b/org.glite.lb.server/Makefile index 745828e..e810a2d 100644 --- a/org.glite.lb.server/Makefile +++ b/org.glite.lb.server/Makefile @@ -87,20 +87,20 @@ CFLAGS:= \ CXXFLAGS:=${CFLAGS} ifdef LB_PROF - SRVBONES_LIB:= ${stagedir}/lib/libglite_lbu_server_bones.la - LB_COMMON_LIB:=${stagedir}/lib/libglite_lb_common_${nothrflavour}.la - LB_UTILS_DB_LIB:=${stagedir}/lib/libglite_lbu_db.la + SRVBONES_LIB:= ${stagedir}/${libdir}/libglite_lbu_server_bones.la + LB_COMMON_LIB:=${stagedir}/${libdir}/libglite_lb_common_${nothrflavour}.la + LB_UTILS_DB_LIB:=${stagedir}/${libdir}/libglite_lbu_db.la CFLAGS:=${CFLAGS} -pg -g LDFLAGS:=${LDFLAGS} -pg else - SRVBONES_LIB:= -L${stagedir}/lib -lglite_lbu_server_bones - LB_COMMON_LIB:=-L${stagedir}/lib -lglite_lb_common_${nothrflavour} - LB_UTILS_DB_LIB:=-L${stagedir}/lib -lglite_lbu_db - LDFLAGS:= -L${stagedir}/lib -L${stagedir}/${libdir} + 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} endif -# LB_MACHINE_LIB:=${stagedir}/lib/libglite_lb_statemachine.a -LB_MACHINE_LIB:=-L${stagedir}/lib -lglite_lb_statemachine +# LB_MACHINE_LIB:=${stagedir}/${libdir}/libglite_lb_statemachine.a +LB_MACHINE_LIB:=-L${stagedir}/${libdir} -lglite_lb_statemachine ifdef LBS_DB_PROFILE CFLAGS:=${CFLAGS} -DLBS_DB_PROFILE @@ -111,11 +111,11 @@ TEST_INC:=-I${cppunit_prefix}/include COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} +SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/${libdir} # XXX: not used? LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} INSTALL:=libtool --mode=install install -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} XSLTPROC:=xsltproc --novalid #ifeq ($(shell ls ${gsoap_prefix}/bin/soapcpp2),${gsoap_prefix}/bin/soapcpp2) @@ -163,7 +163,7 @@ EXT_LIBS:= \ ${LCAS_LIBS} \ ${VOMS_LIBS} -COMMON_LIBS:= -L${stagedir}/lib -lglite_lb_common_${nothrflavour} -lglite_security_gss_${nothrflavour} -lglite_lbu_trio -lglite_lbu_maildir -lglite_lbu_log +COMMON_LIBS:= -L${stagedir}/${libdir} -lglite_lb_common_${nothrflavour} -lglite_security_gss_${nothrflavour} -lglite_lbu_trio -lglite_lbu_maildir -lglite_lbu_log BKSERVER_BASE_OBJS:= \ bkserverd.o il_lbproxy.o get_events.o index.o jobstat.o jobstat_supp.o \ @@ -224,10 +224,10 @@ WS_CLIENT_OBJS:= $(GSOAP_FILES_PREFIX)C.o $(GSOAP_FILES_PREFIX)Client.o ws_fault WS_CLIENT_LIBS:= ${GSOAP_LIB} -lglite_lb_common_${nothrflavour} \ -lglite_lb_common_${nothrflavour} -# WS_CLIENT_LIBS:= -L${stagedir}/lib \ +# WS_CLIENT_LIBS:= -L${stagedir}/${libdir} \ # -lglite_lb_client_${nothrflavour} \ # -lglite_lb_common_${nothrflavour} \ -# -L${gsoap_prefix}/lib -lgsoap \ +# -L${gsoap_prefix}/${libdir} -lgsoap \ # -lglite_security_gsoap_plugin_${nothrflavour} \ # ${EXT_LIBS} # @@ -296,7 +296,7 @@ LB.xh: ws_typemap.dat ${stagedir}/interface/LB.wsdl ${gsoap_bin_prefix}/wsdl2h -c -t ${top_srcdir}/src/ws_typemap.dat -I${stagedir}/interface -o $@ ${stagedir}/interface/LB.wsdl test.xml: test_xml - ./test_xml + LD_LIBRARY_PATH=${cares_prefix}/${libdir}:${classads_prefix}/${libdir}:${LD_LIBRARY_PATH} ./test_xml test_xml: test_xml.cpp ${CXX} -c ${CFLAGS} ${TEST_INC} $< @@ -314,7 +314,7 @@ test_query_events: ${query_events_objs} ${TEST_LIBS} ${LB_COMMON_LIB} ${LB_MACHINE_LIB} ${classadslib} -lglite_lbu_log test.soapconv: test_soap_conv - ./test_soap_conv + LD_LIBRARY_PATH=${cares_prefix}/${libdir}:${classads_prefix}/${libdir}:${LD_LIBRARY_PATH} ./test_soap_conv test_soap_conv: test_soap_conv.cpp ${WS_CLIENT_OBJS} ${CXX} -c ${CFLAGS} ${TEST_INC} $< @@ -344,7 +344,7 @@ install: -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d ${PREFIX}/interface -mkdir -p ${PREFIX}/share/doc/${package}-${version} -mkdir -p ${PREFIX}/share/man/man1 - -mkdir -p ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} -mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} mkdir -p ${PREFIX}/share/man/man8 ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} @@ -353,9 +353,9 @@ install: for p in bkserverd bkindex mon-db; do \ ${INSTALL} -m 755 "glite-lb-$$p" "${PREFIX}/bin/glite-lb-$$p"; \ done - -mkdir -p ${PREFIX}/lib/modules - ${INSTALL} -m 755 ${LCAS_PLUGIN_LIB} ${PREFIX}/lib/modules - ln -sf liblcas_lb.so ${PREFIX}/lib/modules/lcas_lb.mod + -mkdir -p ${PREFIX}/${libdir}/modules + ${INSTALL} -m 755 ${LCAS_PLUGIN_LIB} ${PREFIX}/${libdir}/modules + ln -sf liblcas_lb.so ${PREFIX}/${libdir}/modules/lcas_lb.mod for f in dbsetup.sql index.conf.template; do \ ${INSTALL} -m 644 ${top_srcdir}/config/"glite-lb-$$f" ${PREFIX}/etc; \ @@ -366,7 +366,7 @@ install: mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} (cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix}) - install -m 644 ${STATIC_LIB_BK} ${PREFIX}/lib + install -m 644 ${STATIC_LIB_BK} ${PREFIX}/${libdir} ${INSTALL} -m 644 ${top_srcdir}/interface/srv_perf.h ${PREFIX}/include/${globalprefix}/${lbprefix} ${INSTALL} -m 644 ${MAN_GZ} ${PREFIX}/share/man/man8 ifdef LB_PERF diff --git a/org.glite.lb.server/configure b/org.glite.lb.server/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.server/configure +++ b/org.glite.lb.server/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.server/project/ChangeLog b/org.glite.lb.server/project/ChangeLog index 62fbfb2..62b4165 100644 --- a/org.glite.lb.server/project/ChangeLog +++ b/org.glite.lb.server/project/ChangeLog @@ -90,7 +90,19 @@ - Memleak fixes - Support for background purge funcionality +2.0.3-2 +- Rebuild with lb.state-machine 1.0.2-1 + +--- +Crystal ball: 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.) + +2.0.3-3 +- install libraries into $libdir +- buildtime dependency pn c-ares diff --git a/org.glite.lb.server/project/version.properties b/org.glite.lb.server/project/version.properties index 0051b5e..69f2f17 100644 --- a/org.glite.lb.server/project/version.properties +++ b/org.glite.lb.server/project/version.properties @@ -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.0.4 -module.age=1 +module.version=2.0.3 +module.age=3 diff --git a/org.glite.lb.server/test/test_query_events.cpp b/org.glite.lb.server/test/test_query_events.cpp index 5ffaebf..de03732 100644 --- a/org.glite.lb.server/test/test_query_events.cpp +++ b/org.glite.lb.server/test/test_query_events.cpp @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include +#include #include #include diff --git a/org.glite.lb.server/test/test_soap_conv.cpp b/org.glite.lb.server/test/test_soap_conv.cpp index 6622548..e6e727a 100644 --- a/org.glite.lb.server/test/test_soap_conv.cpp +++ b/org.glite.lb.server/test/test_soap_conv.cpp @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include +#include #include #include diff --git a/org.glite.lb.server/test/test_xml.cpp.T b/org.glite.lb.server/test/test_xml.cpp.T index 16aff96..edd7510 100644 --- a/org.glite.lb.server/test/test_xml.cpp.T +++ b/org.glite.lb.server/test/test_xml.cpp.T @@ -16,6 +16,8 @@ limitations under the License. */ #include +#include +#include #include #include diff --git a/org.glite.lb.state-machine/Makefile b/org.glite.lb.state-machine/Makefile index 8f7f9cf..2fde846 100644 --- a/org.glite.lb.state-machine/Makefile +++ b/org.glite.lb.state-machine/Makefile @@ -29,11 +29,11 @@ CFLAGS:= \ -I${top_srcdir}/interface COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} +SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/${libdir} LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} INSTALL:=libtool --mode=install install -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} XSLTPROC:=xsltproc --novalid ifneq (${classads_prefix},/usr) @@ -43,8 +43,8 @@ endif classadslib := ${classadslib} -lclassad EXT_LIBS:= -COMMON_LIBS:= -L${stagedir}/lib -lglite_lb_common_${nothrflavour} -lglite_security_gss_${nothrflavour} -PLUGIN_LIBS:= -L${stagedir}/lib -lglite_lb_common_${nothrflavour}\ +COMMON_LIBS:= -L${stagedir}/${libdir} -lglite_lb_common_${nothrflavour} -lglite_security_gss_${nothrflavour} +PLUGIN_LIBS:= -L${stagedir}/${libdir} -lglite_lb_common_${nothrflavour}\ ${classadslib} -lstdc++ ${expatlib} -lexpat\ PLUGIN_LOBJS:=seqcode_aux.lo process_event.lo process_event_pbs.lo process_event_condor.lo process_event_cream.lo lb_plugin.lo process_event_file_transfer.lo process_event_file_transfer_collection.lo @@ -73,9 +73,9 @@ stage: compile $(MAKE) install PREFIX=${stagedir} install: - -mkdir -p ${PREFIX}/lib ${PREFIX}/interface ${PREFIX}/include/glite/lb - install -m 644 ${MACHINE_LIB} ${PREFIX}/lib - ${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} ${PREFIX}/interface ${PREFIX}/include/glite/lb + install -m 644 ${MACHINE_LIB} ${PREFIX}/${libdir} + ${INSTALL} -m 755 ${PLUGIN_LIB} ${PREFIX}/${libdir} install -m 644 ${top_srcdir}/interface/lb-job-attrs.xsd ${PREFIX}/interface install -m 644 lb-job-attrs2.xsd ${PREFIX}/interface install -m 644 ${top_srcdir}/interface/lb-job-record.xsd ${PREFIX}/interface diff --git a/org.glite.lb.state-machine/configure b/org.glite.lb.state-machine/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.state-machine/configure +++ b/org.glite.lb.state-machine/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.state-machine/project/ChangeLog b/org.glite.lb.state-machine/project/ChangeLog index 00ba903..aa9379f 100644 --- a/org.glite.lb.state-machine/project/ChangeLog +++ b/org.glite.lb.state-machine/project/ChangeLog @@ -21,3 +21,11 @@ - Makefile relies on the libdir variable - New configure script +1.0.1-1 +- Recompute state for unknown jobs to allow purging + +1.0.2-1 +- Do not override network server endpoint with data from transfer event + +1.0.2-2 +- install libraries into $libdir diff --git a/org.glite.lb.state-machine/project/version.properties b/org.glite.lb.state-machine/project/version.properties index 5fd4d01..03e254a 100644 --- a/org.glite.lb.state-machine/project/version.properties +++ b/org.glite.lb.state-machine/project/version.properties @@ -1,3 +1,3 @@ # $Header$ -module.version=1.0.0 -module.age=7 +module.version=1.0.2 +module.age=2 diff --git a/org.glite.lb.state-machine/src/process_event.c b/org.glite.lb.state-machine/src/process_event.c index c30d823..20fcb21 100644 --- a/org.glite.lb.state-machine/src/process_event.c +++ b/org.glite.lb.state-machine/src/process_event.c @@ -431,7 +431,6 @@ static int processEvent_glite(intJobStat *js, edg_wll_Event *e, int ev_seq, int switch (e->accepted.source) { case EDG_WLL_SOURCE_NETWORK_SERVER: rep(js->pub.ui_host, e->accepted.from_host); - rep(js->pub.network_server,e->any.host); break; /* no WM id */ case EDG_WLL_SOURCE_LOG_MONITOR: rep(js->pub.condorId, e->accepted.local_jobid); break; diff --git a/org.glite.lb.types/configure b/org.glite.lb.types/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.types/configure +++ b/org.glite.lb.types/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.utils/Makefile b/org.glite.lb.utils/Makefile index b834a70..36af59e 100644 --- a/org.glite.lb.utils/Makefile +++ b/org.glite.lb.utils/Makefile @@ -35,14 +35,14 @@ CFLAGS:= \ -I${gsoap_prefix}/include -I${gsoap_prefix}/ \ ${COVERAGE_FLAGS} \ -D_GNU_SOURCE -LDFLAGS:=-L${stagedir}/lib +LDFLAGS:=-L${stagedir}/${libdir} COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} -SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} +SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/${libdir} LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} INSTALL:=libtool --mode=install install -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} XSLTPROC:=xsltproc --novalid ifneq (${expat_prefix},/usr) @@ -76,7 +76,7 @@ statistics: ${STATISTICS_OBJS} ${LINK} -rdynamic -o $@ ${STATISTICS_OBJS} ${COMMON_LIB} ${JP_LIBS} ${EXT_LIBS} state_history: state_history.o - ${LINK} -o $@ state_history.o -L${stagedir}/lib -lglite_lb_statemachine ${PLUS_LIB} + ${LINK} -o $@ state_history.o -lglite_lb_statemachine ${PLUS_LIB} check: compile @@ -94,7 +94,7 @@ stage: compile install: -mkdir -p ${PREFIX}/bin - -mkdir -p ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} -mkdir -p ${PREFIX}/share/doc/${package}-${version} -mkdir -p ${PREFIX}/share/man/man1 -mkdir -p ${PREFIX}/share/man/man8 diff --git a/org.glite.lb.utils/configure b/org.glite.lb.utils/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.utils/configure +++ b/org.glite.lb.utils/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.utils/project/ChangeLog b/org.glite.lb.utils/project/ChangeLog index f2508fe..b3ea5d3 100644 --- a/org.glite.lb.utils/project/ChangeLog +++ b/org.glite.lb.utils/project/ChangeLog @@ -17,3 +17,5 @@ - Man page update - Support for background purge funcionality +2.0.3-2 +- install libraries into $libdir diff --git a/org.glite.lb.utils/project/version.properties b/org.glite.lb.utils/project/version.properties index 368e298..8513689 100755 --- a/org.glite.lb.utils/project/version.properties +++ b/org.glite.lb.utils/project/version.properties @@ -1,3 +1,3 @@ # $Header$ module.version=2.0.3 -module.age=1 +module.age=2 diff --git a/org.glite.lb.ws-interface/configure b/org.glite.lb.ws-interface/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.ws-interface/configure +++ b/org.glite.lb.ws-interface/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb.ws-test/Makefile b/org.glite.lb.ws-test/Makefile index 3cccdc1..5076ef9 100644 --- a/org.glite.lb.ws-test/Makefile +++ b/org.glite.lb.ws-test/Makefile @@ -32,7 +32,7 @@ CFLAGS=-I${gsoap_prefix}/include -I${gsoap_prefix}/ \ ${DEBUG} COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} INSTALL:=libtool --mode=install install GSOAP_FILES_PREFIX:= bk_ws_ @@ -40,7 +40,10 @@ dotless_gsoap_ver:=${shell echo ${gsoap_default_version} | tr -d . } ifeq ($(shell test -f ${stagedir}/lib/libglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}_c.so && echo ok),ok) langflavour:=_c endif -GSOAP_LIB:=-L${stagedir}/lib -lglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}${langflavour} +ifeq ($(shell test -f ${stagedir}/${libdir}/libglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}_c.so && echo ok),ok) + langflavour:=_c +endif +GSOAP_LIB:=-L${stagedir}/${libdir} -L${stagedir}/lib -lglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}${langflavour} WS_CLIENT_OBJS:= $(GSOAP_FILES_PREFIX)C.o $(GSOAP_FILES_PREFIX)Client.o ws_fault.o # ws_typeref.o @@ -69,7 +72,7 @@ install: done clean: - rm -rf .libs LB.xh *.xml ${GSOAP_FILES_PREFIX}* *.o *.lo LoggingAndBookkeeping.nsmap soap_version.h ${CEXAMPLES} + rm -rf .libs LB.xh *.xml ${GSOAP_FILES_PREFIX}* *.o *.lo *.nsmap soap_version.h ${CEXAMPLES} diff --git a/org.glite.lb.ws-test/configure b/org.glite.lb.ws-test/configure index 80097bd..6158a8e 100755 --- a/org.glite.lb.ws-test/configure +++ b/org.glite.lb.ws-test/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lb/configure b/org.glite.lb/configure index 838219a..6158a8e 100755 --- a/org.glite.lb/configure +++ b/org.glite.lb/configure @@ -20,6 +20,7 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,7 +301,7 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], 'lb.logger' => [ qw/cppunit:B/ ], '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/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -580,8 +582,18 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; @@ -625,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None diff --git a/org.glite.lb/egee_license_check.sh b/org.glite.lb/egee_license_check.sh new file mode 100644 index 0000000..f592100 --- /dev/null +++ b/org.glite.lb/egee_license_check.sh @@ -0,0 +1,267 @@ +#!/bin/bash +#$Header +# +# 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. +# +# ----------------------------------------------------------------------- +# This script searches source files for occurrence of EGEE copyright and +# license. In case of either of them missing, the appropriate text is +# added as comments. +# +# Argument (optional): +# Directory to search. Default is '.' +# +# Modify the final section to search for other types of files. +# +# - ZS - +# + +if [ "$1" = "" ]; then + echo "No directory given. Using \".\"" + DIR="." +else + DIR=$1 +fi + +if [ "$TMPDIR" = "" ]; then + echo TMPDIR not set. Using /tmp + TMPDIR="/tmp" +fi + +TOTALFOUND=0 +TOTALFIXEDLIC=0 +TOTALFIXEDCOP=0 + +# Check is a specific binary exists +function check_exec() +{ + if [ -z $1 ]; then + set_error "No binary to check" + return $TEST_ERROR + fi + local ret=`which $1 2> /dev/null` + if [ -n "$ret" -a -x "$ret" ]; then + return $TEST_OK + else + return $TEST_ERROR + fi +} + + +# Check the list of required binaries +function check_binaries() +{ + local ret=$TEST_OK + for file in $@ + do + printf "$file... " + check_exec $file + if [ $? -gt 0 ]; then + echo "$file not found" > /dev/stderr + ret=1 + else + echo "OK" + fi + + done + return $ret +} + +function check_file() +{ +file=$1 + +# strip file +# - comment mark at the beginning of a line +# - comment mark at the end of a line +# - dates +# - spaces + +stripped_contents=`cat ${file} | +sed --posix --regexp-extended \ + -e 's:^[[:space:]]*(\#|//|/\*|\*)[[:space:]]*::' \ + -e 's:[[:space:]]*(\#|//|\*/|\*)[[:space:]]*$::' \ + -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | +tr -d '[[:space:]]'` + +# is copyright present? +echo ${stripped_contents} | grep -q ${stripped_copyright} 2>/dev/null +r1=$? + +# is license present? +echo ${stripped_contents} | grep -q ${stripped_license} 2>/dev/null +r2=$? + +ret=$(( r1 + r2 * 2 )) + +#echo ${file}:$((1 - r1)):$((1 - r2)) +return $ret +} + +function fix_c_style_sources() +{ + +filelist=`find $DIR -type f -name "$1"` +for srcfile in $filelist +do + check_file $srcfile + checkresult=$? + let TOTALFOUND=$TOTALFOUND+1 + + if [ "$checkresult" -gt "0" ]; then + + + lineno=`grep -n -E "\$H[e]ader: /cvs" $srcfile | sed 's/:.*$//'` + if [ "$lineno" == "" ]; then + lineno=0 + fi + let nextlineno=$lineno+1 + + printf "$srcfile: Needs fixing ($checkresult), lineno $lineno, $nextlineno\n" + + head -n $lineno $srcfile > $TMPDIR/egee_license.$$.swp + printf "/*\n" >> $TMPDIR/egee_license.$$.swp + if [ "$checkresult" == "1" ] || [ "$checkresult" == "3" ]; then + printf "$COPYRIGHT\n\n" >> $TMPDIR/egee_license.$$.swp + let TOTALFIXEDCOP=$TOTALFIXEDCOP+1 + fi + if [ "$checkresult" -gt "1" ]; then + printf "$LICENSE\n" >> $TMPDIR/egee_license.$$.swp + let TOTALFIXEDLIC=$TOTALFIXEDLIC+1 + fi + printf "*/\n\n" >> $TMPDIR/egee_license.$$.swp + tail -n +$nextlineno $srcfile >> $TMPDIR/egee_license.$$.swp + + cp -f $TMPDIR/egee_license.$$.swp $srcfile + else + printf "$srcfile $checkresult [OK]\n" + fi +done +} + +function fix_sh_style_sources() +{ +filelist=`find $DIR -type f -name "$1"` +prefix=$2 +for srcfile in $filelist +do + check_file $srcfile + checkresult=$? + let TOTALFOUND=$TOTALFOUND+1 + + if [ "$checkresult" -gt "0" ]; then + + lineno=`grep -n -E "\$H[e]ader: /cvs" $srcfile | sed 's/:.*$//'` + shlineno=`head -n 1 $srcfile | grep -n '^#! */' | sed 's/:.*$//'` + if [ "$lineno" == "" ]; then + lineno=0 + fi + if [ "$shlineno" == "" ]; then + shlineno=0 + fi + if [ "$shlineno" -gt "$lineno" ]; then + lineno=$shlineno + fi + + let nextlineno=$lineno+1 + + printf "$srcfile: Needs fixing ($checkresult), lineno $lineno, $nextlineno\n" + + head -n $lineno $srcfile > $TMPDIR/egee_license.$$.swp + printf "$prefix\n" >> $TMPDIR/egee_license.$$.swp + if [ "$checkresult" == "1" ] || [ "$checkresult" == "3" ]; then + printf "$COPYRIGHT\n\n" | sed "s/^/$prefix /" >> $TMPDIR/egee_license.$$.swp + let TOTALFIXEDCOP=$TOTALFIXEDCOP+1 + fi + if [ "$checkresult" -gt "1" ]; then + printf "$LICENSE\n" | sed "s/^/$prefix /" >> $TMPDIR/egee_license.$$.swp + let TOTALFIXEDLIC=$TOTALFIXEDLIC+1 + fi + printf "$prefix\n" >> $TMPDIR/egee_license.$$.swp + tail -n +$nextlineno $srcfile >> $TMPDIR/egee_license.$$.swp + + cp -f $TMPDIR/egee_license.$$.swp $srcfile + else + printf "$srcfile $checkresult [OK]\n" + fi +done +} + + +################################################## +# This is where the actual execution starts +################################################## + +echo Checking binaries + +check_binaries head tail find grep sed tr cat + +if [ $? -gt 0 ]; then + echo "$0: Unable to find all binaries" > /dev/stderr + exit 1 +fi; + +LICENSE='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.' + +COPYRIGHT='Copyright (c) Members of the EGEE Collaboration. 2004-2010. +See http://www.eu-egee.org/partners for details on the copyright holders.' + +stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[[:space:]]'` +stripped_license=`printf "$LICENSE" | tr -d '[[:space:]]'` + +#ANSI C files +echo Processing ANSI C files +fix_c_style_sources "*.[ch]" + +#CPP files +echo Processing C++ files +fix_c_style_sources "*.cpp" + +#Java files +echo Processing Java files +fix_c_style_sources "*.java" + +#c.T and h.T files +echo Processing c.T and h.T files +fix_c_style_sources "*.[ch].T" + +#cpp.T files +echo Processing cpp.T files +fix_c_style_sources "*.cpp.T" + +#sh files +echo Processing shell files +fix_sh_style_sources "*.sh" '#' + +#TeX files +echo Processing TeX files +fix_sh_style_sources "*.tex" '%%' + +#Perl files +echo Processing Perl files +fix_sh_style_sources "*.pl" '#' + +printf "\n\nTotal files found:\t $TOTALFOUND\nTotal copyrights fixed:\t $TOTALFIXEDCOP\nTotal licenses fixed:\t $TOTALFIXEDLIC\n"; diff --git a/org.glite.lb/etics-tag-branch.pl b/org.glite.lb/etics-tag-branch.pl new file mode 100644 index 0000000..8a599cd --- /dev/null +++ b/org.glite.lb/etics-tag-branch.pl @@ -0,0 +1,170 @@ +#!/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'}; +$GLITE_LB_LOCATION="./org.glite.lb"; + +if ($TMPDIR eq "") {$TMPDIR="/tmp";} + +getopts('b:c:h'); + +$module = shift; + +$usage = qq{ +usage: $0 -b [-c configuration] module.name + + -b Name of the 'b'ranch to base the configuration on. + The branch must already exist in CVS! + + -c Use this configuration (\d+\.\d+\.\d+-\S+) rather than parsing + version.properties. Bear in mind that this will only be used + to set up the version and age in your configuration. + Also, the existence of the branch will not be tested. with the + -c option. + + -h Display this help + +}; + + # ********************************** + # Interpret cmdline options + # ********************************** + + if (defined $opt_h) {die $usage}; + die $usage unless $module; + + #Clean possible trailing '/' (even multiple occurrences :-) from module name + $module=~s/\/+$//; + + if (!(defined $opt_b)) {die "Mandatory argument -b missing"}; + $branch=$opt_b; + + if (defined $opt_c) { + + # ********************************** + # Parse the tag supplied by the user + # ********************************** + + if ($opt_c=~/(\d+)\.(\d+)\.(\d+)-(\S+?)/) { + $current_major=$1; + $current_minor=$2; + $current_revision=$3; + $current_age=$4; + } + else {die ("tag not stated properly")}; + + } + else { + + # ********************************** + # Determine the most recent tag and its components from version.properties + # ********************************** + + open VP, "$module/project/version.properties" or die "$module/project/version.properties: $?\n"; + + while ($_ = ) { + 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=$module; + $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"; + + + # ********************************** + # Make sure the branch exists + # ********************************** + + die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch"); + + } + + printf("Current tag: $current_tag\n\tprefix: $current_prefix\n\t major: $current_major\n\t minor: $current_minor\n\t rev: $current_revision\n\t age: $current_age\n\tbranch: $branch\n"); + + # ********************************** + # Create the execution script + # ********************************** + + open EXEC, ">", "$TMPDIR/etics-tag-$module.$branch.sh" or die $!; + + printf (EXEC "#This script creates creates a _dev configuration for the $module module, branch $branch\n#Generated automatically by $0\n\n"); + + + # ********************************** + # Etics configuration prepare / modify / upload + # ********************************** + + $currentconfig="$module_$module" . "_R_$current_major" . "_$current_minor" . "_$current_revision" . "_$current_age"; + $currentconfig=~s/^org.//; + $currentconfig=~s/\./-/g; + $newconfig="$module_$module" . "_$branch"; + $newconfig=~s/^org.//; + $newconfig=~s/\./-/g; + + $module=~/([^\.]+?)\.([^\.]+?)$/; + $subsysname=$1; + $modulename=$2; + + # ********************************** + # Etics configuration prepare / modify / upload + # ********************************** + + printf("Module=$module\nname=$modulename\nsubsys=$subsysname\n"); + system("$GLITE_LB_LOCATION/configure --mode=etics --module $subsysname.$modulename --output $TMPDIR/$newconfig.ini.$$ --version $current_major.$current_minor.$current_revision-$current_age --branch $branch"); + + printf (EXEC "#Find out if the configuration already exists in etics\n"); + printf (EXEC "echo Check if configuration exists\n\n"); + printf (EXEC "existconf=`etics-list-configuration $module | grep -w glite-$subsysname-${modulename}_$branch`\n\n"); + printf (EXEC "echo Found: \$existconf\n"); + printf (EXEC "if [ \"\$existconf\" = \"\" ]; then\n"); + printf (EXEC " echo New congiguration ... call etics-configuration add\n"); + printf (EXEC " etics-configuration add -i $TMPDIR/$newconfig.ini.$$\n"); + printf (EXEC "else\n"); + printf (EXEC " echo Congiguration already exists ... call etics-configuration modify\n"); + printf (EXEC " etics-configuration modify -i $TMPDIR/$newconfig.ini.$$\n"); + printf (EXEC "fi\n\n"); + printf (EXEC "etics-commit\n\n"); + + + # ********************************** + # Final bows + # ********************************** + + close(EXEC); + + 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("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-with-subsystems-branch.pl b/org.glite.lb/etics-tag-with-subsystems-branch.pl new file mode 100644 index 0000000..1a22f3f --- /dev/null +++ b/org.glite.lb/etics-tag-with-subsystems-branch.pl @@ -0,0 +1,198 @@ +#!/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'}; +$GLITE_LB_LOCATION="./org.glite.lb"; + +if ($TMPDIR eq "") {$TMPDIR="/tmp";} + +getopts('b:c:h'); + +$module = shift; + +$usage = qq{ +usage: $0 -b [-c configuration] subsystem.name + + -b Name of the 'b'ranch to base the configuration on. + The branch must already exist in CVS! + + -c Use this configuration (\d+\.\d+\.\d+-\S+) rather than parsing + version.properties. Bear in mind that this will only be used + to set up the version and age in your configuration. + Also, the existence of the branch will not be tested. with the + -c option. + + -h Display this help + +}; + + # ********************************** + # Interpret cmdline options + # ********************************** + + if (defined $opt_h) {die $usage}; + die $usage unless $module; + + #Clean possible trailing '/' (even multiple occurrences :-) from module name + $module=~s/\/+$//; + + if (!(defined $opt_b)) {die "Mandatory argument -b missing"}; + $branch=$opt_b; + + if (defined $opt_c) { + + # ********************************** + # Parse the tag supplied by the user + # ********************************** + + if ($opt_c=~/(\d+)\.(\d+)\.(\d+)-(\S+?)/) { + $current_major=$1; + $current_minor=$2; + $current_revision=$3; + $current_age=$4; + } + else {die ("tag not stated properly")}; + + } + else { + + # ********************************** + # Determine the most recent tag and its components from version.properties + # ********************************** + + open VP, "$module/project/version.properties" or die "$module/project/version.properties: $?\n"; + + while ($_ = ) { + 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=$module; + $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"; + + + # ********************************** + # Make sure the branch exists + # ********************************** + + die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch"); + + } + + printf("Current tag: $current_tag\n\tprefix: $current_prefix\n\t major: $current_major\n\t minor: $current_minor\n\t rev: $current_revision\n\t age: $current_age\n\tbranch: $branch\n"); + + + $module=~/\.([^\.]+?)$/; + + $subsysname=$1; + + @modules=split(/\s+/, `PATH=\$PATH:./:./org.glite.lb configure --listmodules $subsysname`); + + $newconfig="glite-$subsysname" . "_$branch"; + + # ********************************** + # Create the execution script + # ********************************** + + open EXEC, ">", "$TMPDIR/etics-tag-with-subsystems-${subsysname}_$branch.sh" or die $!; + + printf (EXEC "#This script creates creates a _dev configuration for the $module subsystem, branch $branch\n#Generated automatically by $0\n\n"); + + + printf("\nNew configuration:\t$newconfig\n\nPreparing...\n"); + + open NEWCONF, ">", "$TMPDIR/$newconfig.ini.$$" or die $!; + + printf (NEWCONF "[Configuration-$newconfig]\nprofile = None\nmoduleName = $module\ndisplayName = $newconfig\ndescription = None\nprojectName = org.glite\nage = $current_age\ntag = $branch\nversion = $current_major.$current_minor.$current_revision\npath = None\n\n"); + +# printf (NEWCONF "[Platform-default:VcsCommand]\ndisplayName = None\ndescription = HEAD CVS commands\ntag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}\nbranch = None\ncommit = None\ncheckout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}\n\n"); + +# printf (NEWCONF "[Platform-default:Environment]\nHOME = \${workspaceDir}"); + + printf (NEWCONF "\n\n[Hierarchy]\n"); + + foreach $m (@modules) { + open MOD, "$m/project/version.properties" or die "$m/project/version.properties: $?\n"; + + $m_major=0; $m_minor=0; $m_revision=0; $m_age=0; + + while ($_ = ) { + chomp; + + if(/module\.version\s*=\s*(\d*)\.(\d*)\.(\d*)/) { + $m_major=$1; + $m_minor=$2; + $m_revision=$3; + } + if(/module\.age\s*=\s*(\S+)/) { + $m_age=$1; + } + } + + $modconfig="$m_$m" . "_$branch"; + $modconfig=~s/^org.//; + $modconfig=~s/\./-/g; + +# system("echo $m = $modconfig >> $TMPDIR/$newconfig.ini.$$"); + printf(NEWCONF "$m = $modconfig\n"); + + close (MOD); + } + + close(NEWCONF); + + + printf (EXEC "#Find out if the configuration already exists in etics\n"); + printf (EXEC "echo Check if configuration exists\n\n"); + printf (EXEC "existconf=`etics-list-configuration $module | grep -w glite-${subsysname}_$branch`\n\n"); + printf (EXEC "echo Found: \$existconf\n"); + printf (EXEC "if [ \"\$existconf\" = \"\" ]; then\n"); + printf (EXEC " echo New congiguration ... call etics-configuration add\n"); + printf (EXEC " etics-configuration add -i $TMPDIR/$newconfig.ini.$$\n"); + printf (EXEC "else\n"); + printf (EXEC " echo Congiguration already exists ... call etics-configuration modify\n"); + printf (EXEC " etics-configuration modify -i $TMPDIR/$newconfig.ini.$$\n"); + printf (EXEC "fi\n\n"); + printf(EXEC "etics-commit\n"); + + + # ********************************** + # Final bows + # ********************************** + + close(EXEC); + + 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"); + diff --git a/org.glite.lb/etics-tag-with-subsystems.pl b/org.glite.lb/etics-tag-with-subsystems.pl index 92b91da..685e116 100755 --- a/org.glite.lb/etics-tag-with-subsystems.pl +++ b/org.glite.lb/etics-tag-with-subsystems.pl @@ -260,9 +260,11 @@ usage: $0 [-c ] module.name printf (NEWCONF "[Configuration-$newconfig]\nprofile = None\nmoduleName = $module\ndisplayName = $newconfig\ndescription = None\nprojectName = org.glite\nage = $age\ntag = $tag\nversion = $major.$minor.$revision\npath = None\n\n"); - printf (NEWCONF "[Platform-default:VcsCommand]\ndisplayName = None\ndescription = HEAD CVS commands\ntag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}\nbranch = None\ncommit = None\ncheckout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}\n\n"); +# printf (NEWCONF "[Platform-default:VcsCommand]\ndisplayName = None\ndescription = HEAD CVS commands\ntag = cvs -d \${vcsroot} tag -R \${tag} \${moduleName}\nbranch = None\ncommit = None\ncheckout = cvs -d \${vcsroot} co -r \${tag} \${moduleName}\n\n"); - printf (NEWCONF "[Platform-default:Environment]\nHOME = \${workspaceDir}\n\n[Hierarchy]\n"); +# printf (NEWCONF "[Platform-default:Environment]\nHOME = \${workspaceDir}"); + + printf (NEWCONF "\n\n[Hierarchy]\n"); foreach $m (@modules) { open MOD, "$m/project/version.properties" or die "$m/project/version.properties: $?\n"; @@ -295,6 +297,7 @@ usage: $0 [-c ] module.name close(NEWCONF); printf(EXEC "\n#Add new configuration\netics-configuration add -i $TMPDIR/$newconfig.ini.$$ -c $newconfig $module\n"); + printf(EXEC "etics-commit\n"); # ********************************** diff --git a/org.glite.lb/etics-tag.pl b/org.glite.lb/etics-tag.pl index 761bc38..0b0bc89 100755 --- a/org.glite.lb/etics-tag.pl +++ b/org.glite.lb/etics-tag.pl @@ -303,6 +303,7 @@ usage: $0 [-i maj|min|rev|age|none|] [-g] [-c > C.dox + echo "PROJECT_NUMBER = ${version}" >> C.dox doxygen C.dox stage: compile @@ -149,23 +149,23 @@ stage: compile dist: distsrc distbin distsrc: - mkdir -p ${top_srcdir}/${package}-${module.version} - cd ${top_srcdir} && GLOBIGNORE="${package}-${module.version}" && cp -Rf * ${package}-${module.version} - cd ${top_srcdir} && tar -czf ${distdir}/${package}-${module.version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${module.version} - rm -rf ${top_srcdir}/${package}-${module.version} + mkdir -p ${top_srcdir}/${package}-${version} + cd ${top_srcdir} && GLOBIGNORE="${package}-${version}" && cp -Rf * ${package}-${version} + cd ${top_srcdir} && tar -czf ${distdir}/${package}-${version}_src.tar.gz --exclude-from=project/tar_exclude ${package}-${version} + rm -rf ${top_srcdir}/${package}-${version} distbin: $(MAKE) install PREFIX=`pwd`/tmpbuilddir${stagedir} - save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${module.version}_bin.tar.gz *; cd $$save_dir + save_dir=`pwd`; cd tmpbuilddir${stagedir} && tar -czf $$save_dir/${top_srcdir}/${distdir}/${package}-${version}_bin.tar.gz *; cd $$save_dir rm -rf tmpbuilddir install: all - -mkdir -p ${PREFIX}/lib - -mkdir -p ${PREFIX}/share/doc/${package}-${module.version} + -mkdir -p ${PREFIX}/${libdir} + -mkdir -p ${PREFIX}/share/doc/${package}-${version} -mkdir -p ${PREFIX}/include/${globalprefix}/${lbutilsprefix} - ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${module.version} - -cp -r C ${PREFIX}/share/doc/${package}-${module.version} - ${INSTALL} -m 755 "libglite_lbu_db.la" "${PREFIX}/lib/libglite_lbu_db.la"; \ + ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} + -cp -r C ${PREFIX}/share/doc/${package}-${version} + ${INSTALL} -m 755 "libglite_lbu_db.la" "${PREFIX}/${libdir}/libglite_lbu_db.la"; \ ${INSTALL} -m 644 ${top_srcdir}/interface/${HDRS} ${PREFIX}/include/${globalprefix}/${lbutilsprefix} clean: diff --git a/org.glite.lbjp-common.db/configure b/org.glite.lbjp-common.db/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.db/configure +++ b/org.glite.lbjp-common.db/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.db/interface/db.h b/org.glite.lbjp-common.db/interface/db.h index c1cea78..de1b8a9 100644 --- a/org.glite.lbjp-common.db/interface/db.h +++ b/org.glite.lbjp-common.db/interface/db.h @@ -1,3 +1,4 @@ +#ident "$Header$" /* Copyright (c) Members of the EGEE Collaboration. 2004-2010. See http://www.eu-egee.org/partners for details on the copyright holders. diff --git a/org.glite.lbjp-common.db/project/ChangeLog b/org.glite.lbjp-common.db/project/ChangeLog index a4e8938..aa3f576 100644 --- a/org.glite.lbjp-common.db/project/ChangeLog +++ b/org.glite.lbjp-common.db/project/ChangeLog @@ -29,3 +29,13 @@ 1.0.1-3 - Module repacked. +1.0.1-4 +- install libraries into $libdir + +2.0.0-1 +- Multiple DB backends supported +- API enhanced to support multiple database backends + +2.0.0-2 +- Repacked, configuration depends on newer postgres version + diff --git a/org.glite.lbjp-common.db/project/version.properties b/org.glite.lbjp-common.db/project/version.properties index b40a2b3..2ec18a2 100644 --- a/org.glite.lbjp-common.db/project/version.properties +++ b/org.glite.lbjp-common.db/project/version.properties @@ -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=1.0.1 -module.age=3 +module.age=4 diff --git a/org.glite.lbjp-common.db/src/db.c b/org.glite.lbjp-common.db/src/db.c index 93d3df5..525a07a 100644 --- a/org.glite.lbjp-common.db/src/db.c +++ b/org.glite.lbjp-common.db/src/db.c @@ -1,3 +1,4 @@ +#ident "$Header$" /* Copyright (c) Members of the EGEE Collaboration. 2004-2010. See http://www.eu-egee.org/partners for details on the copyright holders. @@ -15,6 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + #include #include #include diff --git a/org.glite.lbjp-common.jp-interface/Makefile b/org.glite.lbjp-common.jp-interface/Makefile index b754a23..3603e6f 100644 --- a/org.glite.lbjp-common.jp-interface/Makefile +++ b/org.glite.lbjp-common.jp-interface/Makefile @@ -43,7 +43,7 @@ version_info:=-version-info ${shell \ perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' } -LINK:=libtool --mode=link ${CC} ${LDFLAGS} -rpath ${stagedir}/lib ${version_info} +LINK:=libtool --mode=link ${CC} ${LDFLAGS} -rpath ${stagedir}/${libdir} ${version_info} LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} INSTALL:=libtool --mode=install install COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} @@ -53,13 +53,13 @@ HDRS:=types.h context.h attr.h known_attr.h backend.h builtin_plugins.h file_plu SRCS:=context.c attr.c utils.c indexdb.c OBJS:=${SRCS:.c=.lo} THROBJS:=${OBJS:.o=.thr.lo} -LIBS:=-L${stagedir}/lib -lglite_jobid -lglite_lbu_db +LIBS:=-L${stagedir}/${libdir} -lglite_jobid -lglite_lbu_db THRLIBS:=${LIBS} commonlib:= libglite_jp_common_${nothrflavour}.la commonlib_thr:= libglite_jp_common_${thrflavour}.la -TEST_LIBS:=-L${cppunit_prefix}/lib -lcppunit -ldl +TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit -ldl TEST_INC:=-I${cppunit_prefix}/include @@ -88,8 +88,8 @@ stage: compile install: -mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix} cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${jpprefix} - -mkdir -p ${PREFIX}/lib - ${INSTALL} -m 755 ${commonlib} ${commonlib_thr} ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} + ${INSTALL} -m 755 ${commonlib} ${commonlib_thr} ${PREFIX}/${libdir} clean: rm -rvf *.o *.lo .libs lib* diff --git a/org.glite.lbjp-common.jp-interface/configure b/org.glite.lbjp-common.jp-interface/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.jp-interface/configure +++ b/org.glite.lbjp-common.jp-interface/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.jp-interface/project/ChangeLog b/org.glite.lbjp-common.jp-interface/project/ChangeLog index 8537bb9..e9afcec 100644 --- a/org.glite.lbjp-common.jp-interface/project/ChangeLog +++ b/org.glite.lbjp-common.jp-interface/project/ChangeLog @@ -16,3 +16,5 @@ 1.0.0-6 - Module repacked. +1.0.0-7 +- install libraries into $libdir diff --git a/org.glite.lbjp-common.jp-interface/project/version.properties b/org.glite.lbjp-common.jp-interface/project/version.properties index 11299ee..191f733 100644 --- a/org.glite.lbjp-common.jp-interface/project/version.properties +++ b/org.glite.lbjp-common.jp-interface/project/version.properties @@ -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=1.0.0 -module.age=6 +module.age=7 diff --git a/org.glite.lbjp-common.jp-interface/test/type_test.cpp b/org.glite.lbjp-common.jp-interface/test/type_test.cpp index 3d190fd..e8a6faf 100644 --- a/org.glite.lbjp-common.jp-interface/test/type_test.cpp +++ b/org.glite.lbjp-common.jp-interface/test/type_test.cpp @@ -17,6 +17,8 @@ limitations under the License. #include #include +#include +#include #include #include diff --git a/org.glite.lbjp-common.log/configure b/org.glite.lbjp-common.log/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.log/configure +++ b/org.glite.lbjp-common.log/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.maildir/Makefile b/org.glite.lbjp-common.maildir/Makefile index 0c3b3e7..fc2d308 100644 --- a/org.glite.lbjp-common.maildir/Makefile +++ b/org.glite.lbjp-common.maildir/Makefile @@ -34,10 +34,10 @@ CFLAGS:= \ ${COVERAGE_FLAGS} \ -D_GNU_SOURCE -LDFLAGS:=-L${stagedir}/lib ${COVERAGE_FLAGS} +LDFLAGS:=-L${stagedir}/${libdir} ${COVERAGE_FLAGS} COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} -LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/lib ${LDFLAGS} +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} INSTALL:=libtool --mode=install install EXT_LIBS:= @@ -86,10 +86,10 @@ stage: compile $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes install: all - -mkdir -p ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} -mkdir -p ${PREFIX}/share/doc/${package}-${version} -mkdir -p ${PREFIX}/include/${globalprefix}/${lbutilsprefix} - ${INSTALL} -m 755 "libglite_lbu_maildir.la" "${PREFIX}/lib/libglite_lbu_maildir.la"; \ + ${INSTALL} -m 755 "libglite_lbu_maildir.la" "${PREFIX}/${libdir}/libglite_lbu_maildir.la"; \ ${INSTALL} -m 644 ${top_srcdir}/interface/${HDRS} ${PREFIX}/include/${globalprefix}/${lbutilsprefix} clean: diff --git a/org.glite.lbjp-common.maildir/configure b/org.glite.lbjp-common.maildir/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.maildir/configure +++ b/org.glite.lbjp-common.maildir/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.maildir/project/ChangeLog b/org.glite.lbjp-common.maildir/project/ChangeLog index 241af0a..08b6ad0 100644 --- a/org.glite.lbjp-common.maildir/project/ChangeLog +++ b/org.glite.lbjp-common.maildir/project/ChangeLog @@ -7,3 +7,5 @@ 1.0.0-3 - configure script update +1.0.0-4 +- install libraries into $libdir diff --git a/org.glite.lbjp-common.maildir/project/version.properties b/org.glite.lbjp-common.maildir/project/version.properties index af720aa..95b4198 100644 --- a/org.glite.lbjp-common.maildir/project/version.properties +++ b/org.glite.lbjp-common.maildir/project/version.properties @@ -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=1.0.0 -module.age=3 +module.age=4 diff --git a/org.glite.lbjp-common.server-bones/configure b/org.glite.lbjp-common.server-bones/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.server-bones/configure +++ b/org.glite.lbjp-common.server-bones/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.server-bones/project/ChangeLog b/org.glite.lbjp-common.server-bones/project/ChangeLog index 1d25f18..2d9aabf 100644 --- a/org.glite.lbjp-common.server-bones/project/ChangeLog +++ b/org.glite.lbjp-common.server-bones/project/ChangeLog @@ -7,3 +7,5 @@ 1.0.0-4 - configure script update +1.0.0-5 +- install libraries into $libdir diff --git a/org.glite.lbjp-common.server-bones/project/version.properties b/org.glite.lbjp-common.server-bones/project/version.properties index 78dfc90..82c4e39 100644 --- a/org.glite.lbjp-common.server-bones/project/version.properties +++ b/org.glite.lbjp-common.server-bones/project/version.properties @@ -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=1.0.0 -module.age=4 +module.age=5 diff --git a/org.glite.lbjp-common.trio/Makefile b/org.glite.lbjp-common.trio/Makefile index 471b708..49d2789 100644 --- a/org.glite.lbjp-common.trio/Makefile +++ b/org.glite.lbjp-common.trio/Makefile @@ -24,8 +24,8 @@ DEBUG:=-g -O0 -Wall 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}/lib ${LDFLAGS} -LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/lib ${LDFLAGS} +LINK:=libtool --mode=link ${CC} -rpath ${stagedir}/${libdir} ${LDFLAGS} +LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS} INSTALL:=libtool --mode=install install REPORTS:=${top_srcdir}/reports @@ -98,11 +98,11 @@ distbin: rm -rf tmpbuilddir install: all - -mkdir -p ${PREFIX}/lib + -mkdir -p ${PREFIX}/${libdir} -mkdir -p ${PREFIX}/share/doc/${package}-${version} -mkdir -p ${PREFIX}/include/${globalprefix}/${lbutilsprefix} -mkdir -p ${PREFIX}/include/${globalprefix}/${lbuprefix} - ${INSTALL} -m 644 ${LTLIB} ${STATICLIB} ${PREFIX}/lib + ${INSTALL} -m 644 ${LTLIB} ${STATICLIB} ${PREFIX}/${libdir} ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version} (cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbuprefix}) diff --git a/org.glite.lbjp-common.trio/configure b/org.glite.lbjp-common.trio/configure index 80097bd..6158a8e 100755 --- a/org.glite.lbjp-common.trio/configure +++ b/org.glite.lbjp-common.trio/configure @@ -20,13 +20,14 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; @@ -88,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -125,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -299,10 +301,10 @@ BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], - 'lb.logger' => [ qw/cppunit:B log4c/ ], - '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 log4c/ ], + 'lb.logger' => [ qw/cppunit:B/ ], + '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' => [], @@ -310,13 +312,13 @@ BEGIN{ 'lb.types' => [ qw// ], 'lb.harvester' => [ qw/postgresql:R/ ], 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql:B/ ], - 'lbjp-common.log' => [ qw// ], + '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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -352,7 +354,7 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ @@ -361,7 +363,7 @@ for my $jar (keys %need_jars) { jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], @@ -394,7 +396,7 @@ for my $jar (keys %need_jars) { / ], 'lbjp-common.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -449,7 +451,7 @@ for my $ext (keys %deps_aux) { jpclient => 'jp.client', ); -my @t = qw/lb.client-java jobid.api-java lb.types lbjp-common.log/; +my @t = qw/lb.client-java jobid.api-java lb.types/; @topbuild{@t} = (1) x ($#t+1); } @@ -580,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -599,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -629,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -669,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.lbjp-common.trio/project/ChangeLog b/org.glite.lbjp-common.trio/project/ChangeLog index f12d6ac..5b525d2 100644 --- a/org.glite.lbjp-common.trio/project/ChangeLog +++ b/org.glite.lbjp-common.trio/project/ChangeLog @@ -10,6 +10,12 @@ 1.0.0-5 - configure script update +1.0.0-6 +- install libraries into $libdir + 1.0.1-1 - Fixed build with newer gcc versions +1.0.2-1 +- Fixed syntax error + diff --git a/org.glite.lbjp-common.trio/project/version.properties b/org.glite.lbjp-common.trio/project/version.properties index 5dbb8ed..d4b1abd 100644 --- a/org.glite.lbjp-common.trio/project/version.properties +++ b/org.glite.lbjp-common.trio/project/version.properties @@ -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=1.0.1 +module.version=1.0.2 module.age=1 diff --git a/org.glite.security.gsoap-plugin/configure b/org.glite.security.gsoap-plugin/configure index b3a5b00..6158a8e 100755 --- a/org.glite.security.gsoap-plugin/configure +++ b/org.glite.security.gsoap-plugin/configure @@ -20,15 +20,16 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); -my @nodes = qw/client server logger utils doc ws-test db jpprimary jpindex jpclient/; +my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; my %disable_nodes; @@ -38,7 +39,6 @@ my %extern_prefix = ( cppunit => '/usr', expat => '/usr', globus => '/opt/globus', - jglobus => '/opt/globus', gsoap => '/usr', mysql => '/usr', 'mysql-devel' => '', @@ -46,13 +46,18 @@ my %extern_prefix = ( voms => '/opt/glite', gridsite => '/opt/glite', lcas => '/opt/glite', + trustmanager => '/opt/glite', ant => '/usr', jdk => '/usr', libtar => '/usr', + axis => '/usr', + log4c => '/usr', + postgresql => '/usr' ); my %jar = ( - 'commons-codec' => '/usr/share/java/commons-codec-1.3.jar', + 'commons-codec' => '/usr/share/java/commons-codec.jar', + 'commons-lang' => '/usr/share/java/commons-lang.jar', ); @@ -67,10 +72,10 @@ my %deps_type; my %topbuild; my %lbmodules = ( - 'lb' => [ qw/client common doc logger server state-machine types utils ws-interface ws-test/], + 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester/], 'security' => [qw/gss gsoap-plugin/], - 'lbjp-common' => [qw/db maildir server-bones trio jp-interface/], - 'jobid' => [qw/api-c api-cpp/], + 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/], + 'jobid' => [qw/api-c api-cpp api-java/], 'jp' => [ qw/client doc index primary server-common ws-interface/ ], ); @@ -84,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -121,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -294,8 +300,8 @@ sub mode_checkout() { BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], - 'lb.client-java' => [ qw/ant:B jglobus jdk:B/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], 'lb.logger' => [ qw/cppunit:B/ ], '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/ ], @@ -304,13 +310,15 @@ BEGIN{ 'lb.ws-interface' => [], 'lb.ws-test' => [ qw/gsoap:B/ ], 'lb.types' => [ qw// ], - 'lbjp-common.db' => [ qw/mysql:R mysql-devel:B/ ], + 'lb.harvester' => [ qw/postgresql:R/ ], + 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql: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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -333,6 +341,7 @@ for my $ext (keys %need_externs_aux) { %need_jars = ( 'jobid.api-java' => [ qw/commons-codec/ ], + 'lb.client-java' => [ qw/commons-lang/ ], ); for my $jar (keys %need_jars) { @@ -345,27 +354,29 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ lb.types:B + lb.ws-interface:B jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], 'lb.logger' => [ qw/ lbjp-common.trio + lbjp-common.log jobid.api-c lb.common security.gss / ], '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.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log jobid.api-c security.gsoap-plugin security.gss / ], @@ -379,9 +390,13 @@ for my $jar (keys %need_jars) { 'lb.ws-test' => [ qw/security.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.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -451,10 +466,10 @@ 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.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 security.gss security.gsoap-plugin jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface +lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface /; @aux{@m} = (1) x ($#m+1); @@ -517,6 +532,7 @@ BEGIN{ voms=>'org.glite.security.voms-api-cpp', gridsite=>'org.gridsite.shared', lcas=>'org.glite.security.lcas', + trustmanager=>'org.glite.security.trustmanager', ); %etics_projects = ( vdt=>[qw/globus globus_essentials/], @@ -566,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -585,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -615,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -655,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; diff --git a/org.glite.security.gss/configure b/org.glite.security.gss/configure index b3a5b00..6158a8e 100755 --- a/org.glite.security.gss/configure +++ b/org.glite.security.gss/configure @@ -20,15 +20,16 @@ my $mode = 'build'; my $help = 0; my $listmodules; my $version; +my $branch; my $output; my $lb_tag = ''; my $lbjp_tag = ''; my $jp_tag = ''; my $sec_tag = ''; my $jobid_tag = ''; -my $libdir = 'lib'; +my $libdir = getlibdir(); -my @nodes = qw/client server logger utils doc ws-test db jpprimary jpindex jpclient/; +my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/; my %enable_nodes; my %disable_nodes; @@ -38,7 +39,6 @@ my %extern_prefix = ( cppunit => '/usr', expat => '/usr', globus => '/opt/globus', - jglobus => '/opt/globus', gsoap => '/usr', mysql => '/usr', 'mysql-devel' => '', @@ -46,13 +46,18 @@ my %extern_prefix = ( voms => '/opt/glite', gridsite => '/opt/glite', lcas => '/opt/glite', + trustmanager => '/opt/glite', ant => '/usr', jdk => '/usr', libtar => '/usr', + axis => '/usr', + log4c => '/usr', + postgresql => '/usr' ); my %jar = ( - 'commons-codec' => '/usr/share/java/commons-codec-1.3.jar', + 'commons-codec' => '/usr/share/java/commons-codec.jar', + 'commons-lang' => '/usr/share/java/commons-lang.jar', ); @@ -67,10 +72,10 @@ my %deps_type; my %topbuild; my %lbmodules = ( - 'lb' => [ qw/client common doc logger server state-machine types utils ws-interface ws-test/], + 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester/], 'security' => [qw/gss gsoap-plugin/], - 'lbjp-common' => [qw/db maildir server-bones trio jp-interface/], - 'jobid' => [qw/api-c api-cpp/], + 'lbjp-common' => [qw/db log maildir server-bones trio jp-interface/], + 'jobid' => [qw/api-c api-cpp api-java/], 'jp' => [ qw/client doc index primary server-common ws-interface/ ], ); @@ -84,6 +89,7 @@ my @opts = ( 'mode=s' => \$mode, 'listmodules=s' => \$listmodules, 'version=s' => \$version, + 'branch=s' => \$branch, 'output=s' => \$output, 'stage=s' => \$stagedir, 'lb-tag=s' => \$lb_tag, @@ -121,8 +127,8 @@ if ($listmodules) { exit 0; } -warn "$0: --version and --output make sense only in --mode=etics\n" - if ($version || $output) && $mode ne 'etics'; +warn "$0: --version, --branch and --output make sense only in --mode=etics\n" + if ($version || $output || $branch) && $mode ne 'etics'; my $en; for (keys %enable_nodes) { $en = 1 if $enable_nodes{$_}; } @@ -294,8 +300,8 @@ sub mode_checkout() { BEGIN{ %need_externs_aux = ( 'lb.client' => [ qw/cppunit:B classads/ ], - 'lb.client-java' => [ qw/ant:B jglobus jdk:B/ ], - 'lb.common' => [ qw/expat cppunit:B classads/ ], + 'lb.client-java' => [ qw/ant:B jdk:B axis:B trustmanager/ ], + 'lb.common' => [ qw/expat cares:B cppunit:B classads/ ], 'lb.doc' => [], 'lb.logger' => [ qw/cppunit:B/ ], '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/ ], @@ -304,13 +310,15 @@ BEGIN{ 'lb.ws-interface' => [], 'lb.ws-test' => [ qw/gsoap:B/ ], 'lb.types' => [ qw// ], - 'lbjp-common.db' => [ qw/mysql:R mysql-devel:B/ ], + 'lb.harvester' => [ qw/postgresql:R/ ], + 'lbjp-common.db' => [ qw/mysql:B mysql-devel:B postgresql: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 gsoap:B/ ], + 'security.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ], 'jobid.api-c' => [ qw/cppunit:B/ ], 'jobid.api-cpp' => [ qw/cppunit:B/ ], 'jobid.api-java' => [ qw/ant:B jdk:B/ ], @@ -333,6 +341,7 @@ for my $ext (keys %need_externs_aux) { %need_jars = ( 'jobid.api-java' => [ qw/commons-codec/ ], + 'lb.client-java' => [ qw/commons-lang/ ], ); for my $jar (keys %need_jars) { @@ -345,27 +354,29 @@ for my $jar (keys %need_jars) { 'lb.client' => [ qw/ lb.types:B lb.common lbjp-common.trio - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c security.gss / ], 'lb.client-java' => [ qw/ lb.types:B + lb.ws-interface:B jobid.api-java / ], 'lb.common' => [ qw/ - jobid.api-cpp jobid.api-c + jobid.api-cpp:B jobid.api-c lb.types:B lbjp-common.trio security.gss / ], 'lb.doc' => [ qw/lb.types:B/ ], 'lb.logger' => [ qw/ lbjp-common.trio + lbjp-common.log jobid.api-c lb.common security.gss / ], '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.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log jobid.api-c security.gsoap-plugin security.gss / ], @@ -379,9 +390,13 @@ for my $jar (keys %need_jars) { 'lb.ws-test' => [ qw/security.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.db' => [ qw/lbjp-common.trio/ ], 'lbjp-common.maildir' => [ qw// ], - 'lbjp-common.server-bones' => [ qw// ], + 'lbjp-common.server-bones' => [ qw/lbjp-common.log/ ], 'lbjp-common.trio' => [ qw// ], 'security.gss' => [ qw// ], 'security.gsoap-plugin' => [ qw/security.gss/ ], @@ -451,10 +466,10 @@ 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.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 security.gss security.gsoap-plugin jobid.api-c jobid.api-cpp jobid.api-java -lbjp-common.db lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface +lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface /; @aux{@m} = (1) x ($#m+1); @@ -517,6 +532,7 @@ BEGIN{ voms=>'org.glite.security.voms-api-cpp', gridsite=>'org.gridsite.shared', lcas=>'org.glite.security.lcas', + trustmanager=>'org.glite.security.trustmanager', ); %etics_projects = ( vdt=>[qw/globus globus_essentials/], @@ -566,15 +582,51 @@ sub mode_etics { push @copts,"--with-$_ \${$eext.location}/$_*.jar"; } - - my $conf = "glite-$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; + my $conf; + my $conftag; + + if ($branch) { + $conf = "glite-${subsys}-${module}_$branch"; + $conftag = $branch; + $dwpath = ""; } + 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}"; my $file = $output ? $output : "$conf.ini"; open C,">$file" or die "$file: $!\n"; - my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build\n"; + my $buildroot = $topbuild{"$subsys.$module"} ? '' : "build.root = build"; my $confdir = $topbuild{"$subsys.$module"} ? '..' : '../..'; + my $package_description = ""; + my $package_summary = ""; + + if (-e "org.glite.$subsys.$module/project/package.description") { + open V, "org.glite.$subsys.$module/project/package.description"; + $package_description = join ("", ); + close V; + chomp $package_description; + $package_description =~ s/\n/\\n/g; + $package_description = "package.description = $package_description"; + } + 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"; + $package_summary = join ("", ); + close V; + chomp $package_summary; + $package_summary =~ s/\n/\\n/g; + $package_summary = "package.summary = $package_summary"; + } + else { + print STDERR "package.summary not found for $subsys.$module!\n"; } + + print STDERR "Writing $file\n"; print C qq{ [Configuration-$conf] @@ -585,10 +637,9 @@ description = org.glite.$subsys.$module projectName = org.glite age = $age deploymentType = None -tag = $conf +tag = $conftag version = $major.$minor.$rev -path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz - +$dwpath [Platform-default:VcsCommand] displayName = None description = None @@ -615,6 +666,8 @@ checkstyle = None [Platform-default:Property] $buildroot +$package_description +$package_summary [Platform-default:DynamicDependency] @@ -655,6 +708,55 @@ sub gsoap_version { return $gsoap_version; } +sub getlibdir { + if ( -e "/etc/debian_version") { # We are on Debian + $lib64="lib"; + $lib32="lib32"; } + else { # Another distribution + $lib64="lib64"; + $lib32="lib"; } + $libdir=$lib32; + + open INP, "uname -s | "; # Check kernel name + $kname= ; + chomp($kname); + close INP; + + if ( $kname == "Linux") { + $arch = ("x86_64\npowerpc\nppc64\n"); + + open INP, "uname -p | "; # Check processor type + $procname= ; + chomp($procname); + close INP; + + if ($arch =~/^$procname\n/) { + return ($lib64); } + + open INP, "uname -m | "; # Check machine hardware + $machname= ; + chomp($machname); + close INP; + + if ($arch =~/^$machname\n/) { + return ($lib64); } + + # special cases (hyperlink lib64, Debian) + if (-l "/usr/lib64") { + $libdir=$lib32; } + + # if /usr/lib64 doesn't exist at all (AIX) + unless ( -e "/usr/lib64" ) { + $libdir=$lib32; } + } + + if ( $kname == "SunOS") { + if (-e "/usr/lib/64") { + $libdir="lib/64"; } + } + + return $libdir; +} sub usage { my @ext = keys %extern_prefix; -- 1.8.2.3