my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.0.4-2
- Module rebuilt
+1.0.5-1
+- Makefile fix for use of jakarta-commons-* external modules
+
+1.0.5-2
+- Module rebuilt
+
+1.0.5-3
+- Module rebuilt
+
# $Header$
-module.version=1.0.4
-module.age=2
+module.version=1.0.5
+module.age=3
package=glite-lb-client
version=0.0.0
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-
CC:=gcc
CXX:=g++
LB_PERF_FLAGS:=-DLB_PERF
LB_PERF_TOOLS:=perftest_logjobs perftest_jobreg
endif
-COMMON_LIB:=-lglite_lb_common_${nothrflavour}
+COMMON_LIB_NOTHR:=-lglite_lb_common_${nothrflavour}
COMMON_LIB_THR:=-lglite_lb_common_${thrflavour}
+COMMON_LIB:=-lglite_lb_common
TRIO_LIB:=-lglite_lbu_trio
CFLAGS:=${CFLAGS} ${DEBUG} \
EXT_LIB:=
-TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
-TEST_INC:=-I${cppunit_prefix}/include
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} ${COVERAGE_FLAGS}
PLUSLOBJS:=${PLUSOBJS:.o=.lo}
PLUSTHRLOBJS:=${PLUSOBJS:.o=.thr.lo}
-LIB:=libglite_lb_client_${nothrflavour}.la
+NOTHRLIB:=libglite_lb_client_${nothrflavour}.la
THRLIB:=libglite_lb_client_${thrflavour}.la
-
-PLUSLIB:=libglite_lb_clientpp_${nothrflavour}.la
+LIB:=libglite_lb_client.la
+NOTHRPLUSLIB:=libglite_lb_clientpp_${nothrflavour}.la
THRPLUSLIB:=libglite_lb_clientpp_${thrflavour}.la
+PLUSLIB:=libglite_lb_clientpp.la
+ifeq (${thrflavour},)
+c_LIBRARIES=${LIB}
+plus_LIBRARIES=${PLUSLIB}
+default_clientlib=${LIB}
+default_clientpluslib=${PLUSLIB}
+default_commonlib=${COMMON_LIB}
+default_clientlib_thr=${LIB}
+default_commonlib_thr=${COMMON_LIB}
+else
+c_LIBRARIES=${NOTHRLIB} ${THRLIB}
+plus_LIBRARIES=${NOTHRPLUSLIB} ${THRPLUSLIB}
+default_clientlib=${NOTHRLIB}
+default_clientpluslib=${NOTHRPLUSLIB}
+default_commonlib=${COMMON_LIB_NOTHR}
+default_clientlib_thr=${THRLIB}
+default_commonlib_thr=${COMMON_LIB_THR}
+endif
+lib_LTLIBRARIES=${c_LIBRARIES} ${plus_LIBRARIES}
TOOLS:=${LB_PERF_TOOLS}
EXAMPLES_SRC:=log_usertag_proxy.c job_log.c job_reg.c feed_shark.c query_ext.c query_seq_code.c stats.c stats-duration-fromto.c abort_job.c change_acl.c stresslog.c flood_proxy.c dagids.c stress_context.c parse_eventsfile.c test_changed_jdl.c done_failed_events.c
EXAMPLES_CL_SRC:=user_jobs.c job_status.c multiple_user_jobs.c
EXAMPLES_CL:=${EXAMPLES_CL_SRC:.c=}
-EXAMPLES_CL_THR_SRC:=user_jobs_threaded.c
+EXAMPLES_CL_THR_SRC:=user_jobs_threaded.c job_status_threaded.c
EXAMPLES_CL_THR:=${EXAMPLES_CL_THR_SRC:.c=}
MAN_GZ:=glite-lb-logevent.1.gz glite-lb-notify.1.gz
perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' }
ifdef LB_STANDALONE
-compile all: generate ${LIB} ${THRLIB} ${TOOLS} logevent notify register_sandbox examples ${MAN_GZ} ${MAN8_GZ}
+compile all: generate ${c_LIBRARIES} ${TOOLS} logevent notify register_sandbox examples ${MAN_GZ} ${MAN8_GZ}
else
-compile all: check_version generate ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${TOOLS} logevent notify register_sandbox examples ${MAN_GZ} ${MAN8_GZ}
+compile all: check_version generate ${lib_LTLIBRARIES} ${TOOLS} logevent notify register_sandbox examples ${MAN_GZ} ${MAN8_GZ}
endif
generate: ${GEN_HDRS}
default: all
+ifeq (${thrflavour},)
${LIB}: ${LIBOBJS}
${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/${libdir} \
${COMMON_LIB} ${TRIO_LIB} \
+ -lglite_security_gss
+
+${PLUSLIB}: ${PLUSOBJS} ${LIB}
+ ${LINKXX} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/${libdir} ${LIB} ${PLUS_EXTRA_LIB}
+else
+${NOTHRLIB}: ${LIBOBJS}
+ ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/${libdir} \
+ ${COMMON_LIB_NOTHR} ${TRIO_LIB} \
-lglite_security_gss_${nothrflavour}
${THRLIB}: ${LIBTHROBJS}
${COMMON_LIB_THR} ${TRIO_LIB} \
-lglite_security_gss_${thrflavour}
-${PLUSLIB}: ${PLUSOBJS} ${LIB}
- ${LINKXX} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/${libdir} ${LIB} ${PLUS_EXTRA_LIB}
+${NOTHRPLUSLIB}: ${PLUSOBJS} ${NOTHRLIB}
+ ${LINKXX} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/${libdir} ${NOTHRLIB} ${PLUS_EXTRA_LIB}
${THRPLUSLIB}: ${PLUSTHROBJS} ${THRLIB}
${LINKXX} ${version_info} -o $@ ${PLUSTHRLOBJS} -rpath ${PREFIX}/${libdir} ${THRLIB} ${PLUS_EXTRA_LIB}
+endif
logevent: logevent.o args.o
- ${LINK} -o $@ logevent.o args.o ${LIB} ${EXT_LIB}
+ ${LINK} -o $@ logevent.o args.o ${default_clientlib} ${EXT_LIB}
notify: notify.o
- ${LINKXX} -o $@ notify.o ${PLUSLIB} ${EXT_LIB} ${PLUS_EXTRA_LIB}
+ ${LINKXX} -o $@ notify.o ${default_clientpluslib} ${EXT_LIB} ${PLUS_EXTRA_LIB}
register_sandbox: %: %.o
- ${LINK} -o $@ $@.o ${LIB} ${EXT_LIB}
+ ${LINK} -o $@ $@.o ${default_clientlib} ${EXT_LIB}
${TOOLS} ${EXAMPLES}: %: %.o
- ${LINK} -o $@ $< ${LIB} ${EXT_LIB}
+ ${LINK} -o $@ $< ${default_clientlib} ${EXT_LIB}
${EXAMPLES_CL}: %: %.o
- ${LINK} -o $@ $< ${LIB} ${COMMON_LIB} ${EXT_LIB}
+ ${LINK} -o $@ $< ${default_clientlib} ${default_commonlib} ${EXT_LIB}
${EXAMPLES_CL_THR}: %: %.o
- ${LINK} -o $@ $< ${THRLIB} ${COMMON_LIB_THR} ${EXT_LIB}
+ ${LINK} -o $@ $< ${default_clientlib_thr} ${default_commonlib_thr} ${EXT_LIB}
-${TOOLS}: ${LIB}
+${TOOLS}: ${default_clientlib}
${PLUSOBJS}: %.o: %.cpp
${CXXCOMPILE} -c $<
${PLUSTHROBJS}: %.thr.o: %.cpp
${CXXCOMPILE} -o $@ -c $<
-${EXAMPLES_PLUS}: ${PLUSLIB}
+${EXAMPLES_PLUS}: ${default_clientpluslib}
${EXAMPLES_PLUS}: %: %.o
- ${LINKXX} -o $@ $< ${PLUSLIB}
+ ${LINKXX} -o $@ $< ${default_clientpluslib}
${LIBOBJS}: %.o: %.c
${COMPILE} -c $<
./producer_test
producer_test: producer_test.o prod_proto_test.o
- ${LINKXX} -o $@ ${LIB} ${TEST_LIBS} $+ ${EXT_LIB}
+ ${LINKXX} -o $@ ${default_clientlib} ${CPPUNIT_LIBS} $+ ${EXT_LIB}
producer_test.o: %.o: %.cpp
- ${CXX} -c ${CXXFLAGS} ${TEST_INC} $<
+ ${CXX} -c ${CXXFLAGS} ${CPPUNIT_CFLAGS} $<
man: ${MAN_GZ} ${MAN8_GZ}
mkdir -p ${PREFIX}/share/man/man8
mkdir -p ${PREFIX}/share/build/m4
ifdef LB_STANDALONE
- ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/${libdir}
+ ${INSTALL} -m 644 ${c_LIBRARIES} ${PREFIX}/${libdir}
else
- ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PLUSLIB} ${THRPLUSLIB} ${PREFIX}/${libdir}
- ${INSTALL} -m 644 ${LIB} ${THRLIB} ${PREFIX}/${libdir}
+ ${INSTALL} -m 644 ${lib_LTLIBRARIES} ${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} )
clean:
rm -rvf *.o *.lo .libs lib* *.c *.cpp *.h *.dox producer_test notify C/ CPP/
- rm -rvf ${LIB} ${THRLIB} ${TOOLS} logevent register_sandbox ${PLUSLIB} ${THRPLUSLIB} ${MAN_GZ} ${MAN8_GZ}
+ rm -rvf ${lib_LTLIBRARIES} ${TOOLS} logevent register_sandbox ${MAN_GZ} ${MAN8_GZ}
rm -rvf ${EXAMPLES} ${EXAMPLES_CL} ${EXAMPLES_CL_THR} ${sh_PROGS}
rm -f EventAttrNames.pl
rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
--- /dev/null
+#ident "$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.
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+#include <pthread.h>
+#include <unistd.h>
+
+#include "glite/lb/context-int.h"
+#ifdef BUILDING_LB_CLIENT
+#include "consumer.h"
+#else
+#include "glite/lb/consumer.h"
+#endif
+#include "glite/lb/xml_conversions.h"
+#include "glite/lb/jobstat.h"
+
+static void dgerr(edg_wll_Context,char *);
+static void printstat_oneline(edg_wll_JobStat,int);
+
+static char *myname;
+
+void *thread_meat(char *jobid) {
+ edg_wll_Context ctx;
+ int result=0, retries;
+
+ if ( edg_wll_InitContext(&ctx) ) {
+ fprintf(stderr,"cannot initialize edg_wll_Context\n");
+ exit(1);
+ }
+
+ char *bserver;
+ edg_wlc_JobId job;
+ edg_wll_JobStat status;
+
+ memset(&status,0,sizeof status);
+
+ if (edg_wlc_JobIdParse(jobid,&job)) {
+ fprintf(stderr,"%s: %s: cannot parse jobId\n", myname,jobid); goto cleanup;
+ }
+ bserver = edg_wlc_JobIdGetServer(job);
+ if (!bserver) {
+ fprintf(stderr,"%s: %s: cannot extract bookkeeping server address\n", myname,jobid);
+ edg_wlc_JobIdFree(job); goto cleanup;
+ }
+ else free(bserver);
+
+ for (retries = 6; retries > 0; retries--) {
+ if (edg_wll_JobStatus(ctx, job, EDG_WLL_STAT_CLASSADS | EDG_WLL_STAT_CHILDREN | EDG_WLL_STAT_CHILDSTAT, &status)) {
+ dgerr(ctx,"edg_wll_JobStatus"); result = 1;
+ } else {
+ printstat_oneline(status,0);
+ break;
+ }
+ sleep(3);
+ }
+
+ if (job) edg_wlc_JobIdFree(job);
+// if (status.state) edg_wll_FreeStatus(&status);
+
+ cleanup:
+
+ edg_wll_FreeContext(ctx);
+}
+
+static void
+usage(char *name) {
+ fprintf(stderr,"Usage: %s [job_id [...]]\n", name);
+}
+
+static void
+dgerr(edg_wll_Context ctx,char *where) {
+ char *etxt,*edsc;
+
+ edg_wll_Error(ctx,&etxt,&edsc);
+ fprintf(stderr,"%s: %s: %s",myname,where,etxt);
+ if (edsc) fprintf(stderr," (%s)",edsc);
+ putc('\n',stderr);
+ free(etxt); free(edsc);
+}
+
+static void printstat_oneline(edg_wll_JobStat stat, int level) {
+ char *s, *j1;
+
+ s = edg_wll_StatToString(stat.state);
+ j1 = edg_wlc_JobIdUnparse(stat.jobId);
+ printf("%s\t%s\n", j1, s);
+
+ free(j1); free(s);
+}
+
+int main(int argc,char *argv[]) {
+ int i, rc;
+ pthread_t *threads;
+ pthread_attr_t attr;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+
+ void *jobid_arg;
+
+ myname = argv[0];
+ if ( argc < 2 || strcmp(argv[1],"--help") == 0 ) { usage(argv[0]); return 0; }
+
+ threads=(pthread_t*)calloc(sizeof(pthread_t), argc+1);
+
+ for ( i = 1; i < argc; i++ ) {
+ jobid_arg = (void *)argv[i];
+
+ rc = pthread_create(&(threads[i-1]), &attr, (void*)thread_meat, (void *)jobid_arg);
+ if (rc) {
+ printf("ERROR; return code from pthread_create() is %d\n", rc);
+ exit(-1);
+ }
+ }
+
+ pthread_attr_destroy(&attr);
+
+ for ( i = 1; i < argc; i++ ) {
+ pthread_join(threads[i-1],NULL);
+ }
+
+ free(threads);
+
+ return 0;
+}
+
to = now;
from = now - (time_t)era;
-/* not implemented yet
- if (edg_wll_StateDuration(ctx,group,EDG_WLL_JOB_SCHEDULED,0,
- &from,&to,&val,&from_res,&to_res))
- {
- char *et,*ed;
- edg_wll_Error(ctx,&et,&ed);
- fprintf(stderr,"edg_wll_StateDuration(): %s, %s\n",et,ed);
- return 1;
- }
-
- cfrom = strdup(ctime(&from));
- cto = strdup(ctime(&to));
- cfrom[strlen(cfrom)-1] = 0;
- cto[strlen(cto)-1] = 0;
-
- printf("Average queue traversal time at \"%s\": %f s\n"
- " Measuered from %s to %s\n"
- " With resolution from %d to %d s\n",
- argv[CEidx],val,cfrom,cto,from_res,to_res);
-
-*/
-
- to = now;
- from = now - 60;
-
if (edg_wll_StateRates(ctx,group,atoi(argv[MAJidx]),argc >= (argOK+1) ? atoi(argv[MINidx]) : 0,
&from,&to,&vals,&groups,&from_res,&to_res))
{
{
thread_code_args arguments = { NULL, 0, 0, 1, 1,NULL };
int i,rc,status,opt;
- int thr_num = 10; // default
+ int thr_num = 10;
while ((opt = getopt_long(argc,argv,get_opt_string,opts,NULL)) != EOF) switch (opt) {
)]
)
-LIBS="-lglite_lb_common_$GLOBUS_THR_FLAVOR $LIBS"
+LIBS="-lglite_lb_common $save_LIBS"
AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_COMMON_THR_LIBS], [-lglite_lb_common_$GLOBUS_THR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.common ($GLOBUS_THR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-LIBS="-lglite_lb_common_$GLOBUS_NOTHR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_COMMON_NOTHR_LIBS], [-lglite_lb_common_$GLOBUS_NOTHR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.common (GLOBUS_NOTHR_FLAVOR)])]
+ [
+ AC_SUBST([GLITE_LB_COMMON_LIBS], [-lglite_lb_common])
+ AC_SUBST([GLITE_LB_COMMON_THR_LIBS], [-lglite_lb_common])
+ AC_SUBST([GLITE_LB_COMMON_NOTHR_LIBS], [])
+ ],
+ [
+ LIBS="-lglite_lb_common_$GLOBUS_THR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_COMMON_THR_LIBS], [-lglite_lb_common_$GLOBUS_THR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.common ($GLOBUS_THR_FLAVOR)])]
+ )
+
+ LIBS="-lglite_lb_common_$GLOBUS_NOTHR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_COMMON_NOTHR_LIBS], [-lglite_lb_common_$GLOBUS_NOTHR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.common ($GLOBUS_NOTHR_FLAVOR)])]
+ )
+
+ AC_SUBST([GLITE_LB_COMMON_LIBS], [-lglite_lb_common_$GLOBUS_THR_FLAVOR])
+ ]
)
LIBS=$save_LIBS
dnl Usage:
dnl AC_GLITE_LB
+dnl - GLITE_LB_CLIENT_LIBS
+dnl - GLITE_LB_CLIENTPP_LIBS
+dnl - GLITE_LB_COMMON_LIBS
+dnl
dnl - GLITE_LB_THR_CLIENT_LIBS
dnl - GLITE_LB_THR_CLIENTPP_LIBS
dnl - GLITE_LB_THR_COMMON_LIBS
dnl - GLITE_LB_NOTHR_CLIENT_LIBS
dnl - GLITE_LB_NOTHR_CLIENTPP_LIBS
dnl - GLITE_LB_NOTHR_COMMON_LIBS
+dnl
dnl - GLITE_STATIC_LB_NOTHR_CLIENT_LIBS
dnl - GLITE_STATIC_LB_NOTHR_COMMON_LIBS
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/$ac_glite_lb_libdir/libglite_lb_client_$GLOBUS_NOTHR_FLAVOR.a"
GLITE_STATIC_LB_NOTHR_COMMON_LIBS="$ac_glite_lb_prefix/$ac_glite_lb_libdir/libglite_lb_common_$GLOBUS_NOTHR_FLAVOR.a $SEC_GSOAP_PLUGIN_GSS_STATIC_NOTHR_LIBS"
+ dnl default flavour
+ GLITE_LB_CLIENT_LIBS="$GLITE_LB_THR_CLIENT_LIBS"
+ GLITE_LB_CLIENTPP_LIBS="$GLITE_LB_THR_CLIENTPP_LIBS"
+ GLITE_LB_COMMON_LIBS="$GLITE_LB_THR_COMMON_LIBS"
+
+ dnl the flavoured ones not found
+ if ! test -f "$GLITE_STATIC_LB_NOTHR_CLIENT_LIBS"; then
+ GLITE_LB_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client"
+ GLITE_LB_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp"
+ GLITE_LB_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common $SEC_GSOAP_PLUGIN_GSS_THR_LIBS"
+ GLITE_LB_THR_CLIENT_LIBS="$ac_glite_lb_lib -lglite_lb_client"
+ GLITE_LB_THR_CLIENTPP_LIBS="$ac_glite_lb_lib -lglite_lb_clientpp"
+ GLITE_LB_THR_COMMON_LIBS="$ac_glite_lb_lib -lglite_lb_common $SEC_GSOAP_PLUGIN_GSS_THR_LIBS"
+ GLITE_LB_NOTHR_CLIENT_LIBS=""
+ GLITE_LB_NOTHR_CLIENTPP_LIBS=""
+ GLITE_LB_NOTHR_COMMON_LIBS=""
+ fi
ifelse([$2], , :, [$2])
else
GLITE_LB_THR_CLIENT_LIBS=""
GLITE_LB_NOTHR_COMMON_LIBS=""
GLITE_STATIC_LB_NOTHR_CLIENT_LIBS=""
GLITE_STATIC_LB_NOTHR_COMMON_LIBS=""
+ GLITE_LB_CLIENT_LIBS=""
+ GLITE_LB_CLIENTPP_LIBS=""
+ GLITE_LB_COMMON_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLITE_LB_NOTHR_COMMON_LIBS)
AC_SUBST(GLITE_STATIC_LB_NOTHR_CLIENT_LIBS)
AC_SUBST(GLITE_STATIC_LB_NOTHR_COMMON_LIBS)
+ dnl default flavour
+ AC_SUBST(GLITE_LB_CLIENT_LIBS)
+ AC_SUBST(GLITE_LB_CLIENTPP_LIBS)
+ AC_SUBST(GLITE_LB_COMMON_LIBS)
])
AC_DEFUN([GLITE_CHECK_LB_CLIENT],
-[AC_MSG_CHECKING([for org.glite.lb.client])
-save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $GLITE_CPPFLAGS"
-save_LDFLAGS=$LDFLAGS
-LDFLAGS="$LDFLAGS $GLITE_LDFLAGS -L$GLOBUS_LOCATION/lib"
-save_LIBS=$LIBS
+[AC_REQUIRE([AC_GLITE])
+AC_MSG_CHECKING([for org.glite.lb.client])
AC_LANG_PUSH([C])
+CPPFLAGS="$CPPFLAGS $GLITE_CPPFLAGS"
+CFLAGS="$CFLAGS $GLITE_CFLAGS"
+LDFLAGS="$LDFLAGS $GLITE_LDFLAGS -L$GLOBUS_LOCATION/lib"
+
# prepare the test program, to link against the different combinations
# of globus flavours
)]
)
-LIBS="-lglite_lb_client_$GLOBUS_THR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_CLIENT_THR_LIBS], [-lglite_lb_client_$GLOBUS_THR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_THR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-LIBS="-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR $LIBS"
+LIBS="-lglite_lb_client $save_LIBS"
AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_CLIENT_NOTHR_LIBS], [-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_NOTHR_FLAVOR)])]
+ [AC_SUBST([GLITE_LB_CLIENT_LIBS], [-lglite_lb_client])
+ AC_SUBST([GLITE_LB_CLIENT_THR_LIBS], [-lglite_lb_client])
+ AC_SUBST([GLITE_LB_CLIENT_NOTHR_LIBS], [])
+ ],
+ [
+ LIBS="-lglite_lb_client_$GLOBUS_THR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_CLIENT_THR_LIBS], [-lglite_lb_client_$GLOBUS_THR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_THR_FLAVOR)])]
+ )
+
+ LIBS="-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_CLIENT_NOTHR_LIBS], [-lglite_lb_client_$GLOBUS_NOTHR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.client ($GLOBUS_NOTHR_FLAVOR)])]
+ )
+
+ AC_SUBST([GLITE_LB_CLIENT_LIBS], [-lglite_lb_client_$GLOBUS_THR_FLAVOR])
+ ]
)
-LIBS=$save_LIBS
AC_LANG_POP([C])
AC_LANG_PUSH([C++])
+CPPFLAGS="$CPPFLAGS $GLITE_CPPFLAGS"
+CXXFLAGS="$CXXFLAGS $GLITE_CFLAGS"
+LDFLAGS="$LDFLAGS $GLITE_LDFLAGS -L$GLOBUS_LOCATION/lib"
+
# prepare the test program, to link against the different combinations
# of globus flavours
)]
)
-save_LIBS=$LIBS
-LIBS="-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR $LIBS"
-AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_CLIENTPP_THR_LIBS], [-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_THR_FLAVOR)])]
-)
-LIBS=$save_LIBS
-
-LIBS="-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR $LIBS"
+LIBS="-lglite_lb_clientpp $save_LIBS"
AC_LINK_IFELSE([],
- [AC_SUBST([GLITE_LB_CLIENTPP_NOTHR_LIBS], [-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR])],
- [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_NOTHR_FLAVOR)])]
+ [AC_SUBST([GLITE_LB_CLIENTPP_LIBS], [-lglite_lb_clientpp])
+ AC_SUBST([GLITE_LB_CLIENTPP_THR_LIBS], [-lglite_lb_clientpp])
+ AC_SUBST([GLITE_LB_CLIENTPP_NOTHR_LIBS], [])],
+ [
+ LIBS="-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_CLIENTPP_THR_LIBS], [-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_THR_FLAVOR)])]
+ )
+
+ LIBS="-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR $save_LIBS"
+ AC_LINK_IFELSE([],
+ [AC_SUBST([GLITE_LB_CLIENTPP_NOTHR_LIBS], [-lglite_lb_clientpp_$GLOBUS_NOTHR_FLAVOR])],
+ [AC_MSG_ERROR([cannot find org.glite.lb.client (C++ - $GLOBUS_NOTHR_FLAVOR)])]
+ )
+
+ AC_SUBST([GLITE_LB_CLIENTPP_LIBS], [-lglite_lb_clientpp_$GLOBUS_THR_FLAVOR])
+ ]
)
-LIBS=$save_LIBS
AC_LANG_POP([C++])
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS=$save_CPPFLAGS
-
AC_MSG_RESULT([yes])
])
4.1.3-1
- Hostname parsing adjusted to handle IPv6 addresses
+4.1.4-1
+- Memory handling fixes
+
+4.1.5-1
+- revision of the perl code generator (fixed jobid, notifid and timeval types, mainly in logging functions)
+- fixed toString perl method for logsrc (duplicated line)
+- new client API test (simple run for SEGV check)
+- Statistics example extended
+- Support for jobid type options in logevent
+- General code polishing
+
+4.1.5-2
+- Module rebuilt
+
+4.1.6-1
+- Makefile a configuration updated to work across org.glite & EMI
+- libdir detection introduced to glite.m4
+
+4.1.6-2
+- Module rebuilt
+
# $Header$
-module.version=4.1.3
-module.age=1
+module.version=4.1.6
+module.age=2
*(int*)o->value = v;
}
+static void read_jobid(const edg_wll_Args* o, char* arg, char* par)
+{
+ glite_jobid_t jobid = NULL;
+
+ if (glite_jobid_parse(par, &jobid) != 0) {
+ fprintf(stderr, "ERROR %s can't parse %s: %s\n", arg, par, strerror(errno));
+ exit(1);
+ }
+ if (o->value) *(glite_jobid_t *)o->value = jobid;
+ else glite_jobid_free(jobid);
+}
+
static void show_help(const edg_wll_Args* o, int prefix)
{
unsigned max = 0;
case EDG_WLL_ARGS_TIMEVAL:
read_timeval(o, arg, par);
break;
+ case EDG_WLL_ARGS_JOBID:
+ read_jobid(o, arg, par);
+ break;
default:
printf("FIXME: unhandle option type %d\n", o->type);
break;
#include "glite/lb/events.h"
#include "glite/lb/context.h"
#include "glite/lb/context-int.h"
+#include "glite/lb/ulm_parse.h"
#include "producer.h"
#include "args.h"
$event->getTypes) {
my $tu = uc $t;
- gen $indent."case EDG_WLL_EVENT_$tu :\n";
+ gen $indent."case EDG_WLL_EVENT_${tu}: {\n";
selectType $event $t;
my $argl = "";
+ my $values = "";
+ my $frees = "";
for ($event->getFieldsOrdered) {
my $f = selectField $event $_;
my $fn = $f->getName;
- my $ft;
-
-# gen { $fn $f->{codes} };
- if ($f->{codes}) {
-# $ft = "enum edg_wll\_$t" . ucfirst $fn;
- $ft = "char *";
+ my $fdecl = $f->{codes} ? 'char *' : $f->getType;
+ my $ft = $f->{type};
+
+ if ($ft eq 'timeval') {
+gen "\t char s_${fn}[ULM_DATE_STRING_LENGTH + 1];\n";
+ $values .= "\n\t ".$f->toString($fn, "s_${fn}");
+ $argl .= ", s_${fn}";
+ } elsif ($ft eq 'jobid' or $ft eq 'notifid' or $ULMasString{$ft}) {
+gen "\t char *s_${fn};\n";
+ $values .= "\n\t ".$f->toString($fn, "s_${fn}");
+ $frees .= "\n\t free(s_$fn);";
+ $argl .= ", s_${fn}";
} else {
- $ft = $f->getType;
+ $argl .= ", $fn";
}
-
- $fn = $f->getType()."ToString($fn)" if $ULMasString{$f->{type}};
-
- $argl = $argl . ", ";
- $argl = $argl . $fn;
}
-gen qq{\t //edg_wll_Log$t();
-\t err |= logev(ctx, EDG_WLL_EVENT_$tu, EDG_WLL_FORMAT_${tu}$argl);
+gen qq{$values
+\t //edg_wll_Log$t();
+\t err |= logev(ctx, EDG_WLL_EVENT_$tu, EDG_WLL_FORMAT_${tu}$argl);$frees
+\t \}
\t break;
};
}
goto err;
}
- free(name);
-
e = getnameinfo ((struct sockaddr *) ai->ai_addr, ai->ai_addrlen,
hostnum, sizeof(hostnum), NULL, 0, NI_NUMERICHOST );
if (e) {
#include "glite/security/glite_gss.h"
#include "glite/lb/context.h"
+#include "glite/lb/connpool.h"
#include "notification.h"
#include "stat_fields.h"
/* send the RegJob event message */
if ((err = edg_wll_LogEventMaster(ctx,flags,
EDG_WLL_EVENT_REGJOB, EDG_WLL_FORMAT_REGJOB,
- (char *)jdl,ns,parent,type_s,num_subjobs,seed,wms_dn_s)) != 0 ) {
+ (char *)jdl,ns,parent_s,type_s,num_subjobs,seed,wms_dn_s)) != 0 ) {
edg_wll_UpdateError(ctx,EINVAL,"edg_wll_RegisterJobMaster(): unable to register job");
goto edg_wll_registerjobmaster_end;
}
my $sfn = $fn;
my $ft = "const ";
my $fc = $f->getComment;
- if ($ULMasString{$f->{type}}) {
- $decl .= "\tchar *s_$fn = ".$f->getType()."ToString($fn);\n";
- $free .= "\tif (s_$fn) free(s_$fn);\n";
+ if ($f->{type} eq 'timeval') {
+ $decl .= "\tchar s_$fn".'[ULM_DATE_STRING_LENGTH + 1]; '.$f->toString($fn, "s_$fn")."\n";
+ $sfn = "s_$fn";
+ } elsif ($f->{type} eq 'jobid' or $f->{type} eq 'notifid' or $ULMasString{$f->{type}}) {
+ $decl .= "\tchar *s_$fn; ".$f->toString($fn, "s_$fn")."\n";
+ $free .= "\tfree(s_$fn);\n";
$sfn = "s_$fn";
}
if ($f->{codes}) {
#include <stdlib.h>
#include "glite/jobid/cjobid.h"
#include "producer.h"
+#include "glite/lb/ulm_parse.h"
@@@{
$PRINTPROTOTYPESONLY = 0;
--- /dev/null
+/*
+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.
+*/
+
+@@@LANG: C
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "glite/lbu/trio.h"
+#include "producer.h"
+#include "glite/lb/ulm_parse.h"
+
+#define edg_wll_LogEvent edg_wll_LogEventTest
+#define edg_wll_LogEventProxy edg_wll_LogEventTest
+
+int edg_wll_LogEventTest(edg_wll_Context context, edg_wll_EventCode event, char *fmt, ...) {
+ va_list fmt_args;
+ int ret;
+
+ va_start(fmt_args, fmt);
+ ret = trio_vprintf(fmt,fmt_args);
+ printf("\n");
+ va_end(fmt_args);
+ return ret;
+}
+
+@@@{
+use strict;
+require '../src/uiwrap.T';
+@@@}
+
+int main() {
+ edg_wll_Context ctx;
+
+@@@{
+
+#use strict;
+
+for my $e ($event->getTypesOrdered) {
+ my $E = uc $e;
+ my $func = "edg_wll_Log$e"; # name of generated function
+ my $funcproxy = $func . "Proxy";
+ my $p = "ctx";
+ my $values = "";
+ my $frees = "";
+
+gen "// $e\n{\n";
+
+ selectType $event $e;
+ for ($event->getFieldsOrdered) {
+ my $f = selectField $event $_;
+ my $fn = $f->getName;
+ my $fdecl = $f->getType;
+ my $ft = $f->{type};
+ my $value = undef;
+ my $free = "free($fn);";
+
+ if ($f->{codes}) {
+ $fdecl = "char *";
+ $value = "$fn = edg_wll_$e".ucfirst($fn)."ToString(EDG_WLL_${E}_$f->{codes}->[0]->{name});";
+ } elsif (($ft eq "int") || ($ft eq "port")) { $value = "$fn = 654;"; $free = ""; }
+ elsif (($ft eq "float") || ($ft eq "double")) { $value = "$fn = 3.14159265358979323846264;"; $free = ""; }
+ elsif ($ft eq "string") { $value = "$fn = strdup(\"teststring\");"; }
+ elsif ($ft eq "logsrc") { $value = "$fn = EDG_WLL_SOURCE_APPLICATION;"; $free = ""; }
+ elsif ($ft eq "jobid") { $value = "glite_jobid_parse(\"https://some.host:1234/x67qr549qc\",&$fn);"; $free = "glite_jobid_free($fn);"; }
+ elsif ($ft eq "notifid") { $value = "edg_wll_NotifIdParse(\"https://some.host:1234/NOTIF:x67qr549qc\",&$fn);"; $free = "edg_wll_NotifIdFree($fn);"; }
+ elsif ($ft eq "timeval") { $value = "$fn.tv_sec = 274492800; $fn.tv_usec = 1; //tpb rox! :-)"; $free = ""; }
+ else {
+gen "% FIXME: unknown type $ft for $fn \n";
+ }
+ $p .= ", $fn";
+ $values .= "\n\t$value";
+ if ($free) { $frees .= "\n\t$free"; }
+
+gen "\t$fdecl $fn;\n";
+ }
+gen "$values\n\tprintf(\"%s: \", \"$e\");\n\tedg_wll_Log$e($p);\n\t$frees\n";
+gen "}\n\n";
+}
+
+
+@@@}
+ edg_wll_LogSandboxOUTPUT(ctx, "tj", "cj");
+}
version=0.0.0
PREFIX=/opt/glite
-nothrflavour=gcc32
-thrflavour=gcc32pthr
expat_prefix=/opt/expat
-include Makefile.inc
PERF_HDRS:=lb_perftest.h
PERF_OBJS:=lb_perftest.o
-CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
- -I. \
- -I${top_srcdir}/test \
- -I${stagedir}/include \
- -I${expat_prefix}/include \
- -I${classads_prefix}/include \
- -I${classads_prefix}/include/classad \
- ${COVERAGE_FLAGS} \
- -D_GNU_SOURCE \
- -DDATAGRID_EXTENSION ${LB_STANDALONE_FLAGS} \
- -DBUILDING_LB_COMMON
ifneq (${expat_prefix},/usr)
- EXPAT_LIBS:=-L${expat_prefix}/${libdir} -L${expat_prefix}/lib
+ expatlib := -L${expat_prefix}/${libdir} -L${expat_prefix}/lib
endif
-
-EXPAT_LIBS:=${EXPAT_LIBS} -lexpat
-
ifneq (${classads_prefix},/usr)
classadslib := -L${classads_prefix}/${libdir} -L${classads_prefix}/lib
endif
-classadslib := ${classadslib} -lclassad
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
+EXPAT_CFLAGS?=-I${expat_prefix}/include
+EXPAT_LIBS?=${expatlib} -lexpat
+CLASSADS_CFLAGS?=-I${classads_prefix}/include -I${classads_prefix}/include/classad
+CLASSADS_LIBS?=${classadslib} -lclassad
+CFLAGS:=${CFLAGS} ${DEBUG} -I${top_srcdir}/src -I${top_srcdir}/interface \
+ -I. \
+ -I${top_srcdir}/test \
+ -I${stagedir}/include \
+ ${EXPAT_CFLAGS} \
+ ${CLASSADS_CFLAGS} \
+ ${COVERAGE_FLAGS} \
+ -D_GNU_SOURCE \
+ -DDATAGRID_EXTENSION ${LB_STANDALONE_FLAGS} \
+ -DBUILDING_LB_COMMON
LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir} -L${stagedir}/lib \
${COVERAGE_FLAGS}
-EXT_LIBS:= ${EXPAT_LIBS} ${JOBID_LIB} ${TRIO_LIB} ${classadslib}
-EXT_THRLIBS:= ${EXPAT_LIBS} ${JOBID_LIB} ${TRIO_LIB} ${classadslib}
-
-TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
-TEST_INC:=-I${cppunit_prefix}/include
+EXT_LIBS:= ${EXPAT_LIBS} ${JOBID_LIB} ${TRIO_LIB} ${CLASSADS_LIBS}
ifdef LB_PROF
CFLAGS:= ${CFLAGS} -pg -g
query_rec.h timeouts.h LoggingExceptions.h CountRef.h ${PERF_HDRS}
GEN_HDRS:=events.h jobstat.h common_version.h
-STATICLIB:=libglite_lb_common_${nothrflavour}.a
+NOTHRSTATICLIB:=libglite_lb_common_${nothrflavour}.a
THRSTATICLIB:=libglite_lb_common_${thrflavour}.a
-LTLIB:=libglite_lb_common_${nothrflavour}.la
+STATICLIB:=libglite_lb_common.a
+NOTHRLTLIB:=libglite_lb_common_${nothrflavour}.la
THRLTLIB:=libglite_lb_common_${thrflavour}.la
+LTLIB:=libglite_lb_common.la
REPORTS:=${top_srcdir}/reports
+ifeq (${thrflavour},)
+lib_LTLIBRARIES=${LTLIB}
+lib_LIBRARIES=${STATICLIB}
+default_commonlib=${LTLIB}
+else
+lib_LTLIBRARIES=${NOTHRLTLIB} ${THRLTLIB}
+lib_LIBRARIES=${NOTHRSTATICLIB} ${THRSTATICLIB}
+default_commonlib=${NOTHRLTLIB}
+endif
+
ifdef LB_PERF
STAGE_PERFTEST=mkdir -p ${PREFIX}/examples/perftest; \
${INSTALL} -m 644 ${top_srcdir}/examples/*.log ${PREFIX}/examples/perftest; \
common_version.h: ${top_srcdir}/project/version.properties
echo "#define GLITE_LB_COMMON_VERSION \"${version}\"" >$@
-all compile: generate ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB}
+all compile: generate ${lib_LTLIBRARIES} ${lib_LIBRARIES}
# In order to use libtool versioning correcty, we must have:
#
version_info:=-version-info ${shell \
perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' }
+ifeq (${thrflavour},)
${STATICLIB}: ${OBJS}
ar crv $@ ${OBJS}
ranlib $@
+${LTLIB}: ${OBJS}
+ ${LINKXX} ${version_info} -o $@ ${LOBJS} \
+ -lglite_security_gss \
+ ${EXT_LIBS} \
+ -lm
+else
+${NOTHRSTATICLIB}: ${OBJS}
+ ar crv $@ ${OBJS}
+ ranlib $@
+
${THRSTATICLIB}: ${THROBJS}
ar crv $@ ${THROBJS}
ranlib $@
-${LTLIB}: ${OBJS}
+${NOTHRLTLIB}: ${OBJS}
${LINKXX} ${version_info} -o $@ ${LOBJS} \
-lglite_security_gss_${nothrflavour} \
${EXT_LIBS} \
${THRLTLIB}: ${THROBJS}
${LINKXX} ${version_info} -o $@ ${THRLOBJS} \
-lglite_security_gss_${thrflavour} \
- ${EXT_THRLIBS} \
+ ${EXT_LIBS} \
-lm
+endif
stage: compile
$(MAKE) install PREFIX=${stagedir} DOSTAGE=yes
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}
+ ${LINKXX} -o test_parse parse.o ${default_commonlib} ${CPPUNIT_LIBS} ${EXT_LIBS}
check.il: il_test
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}
+ ${LINKXX} -o $@ $+ ${default_commonlib} ${CPPUNIT_LIBS} ${EXT_LIBS}
test_coverage:
-mkdir coverage
install:
mkdir -p ${PREFIX}/${libdir}
mkdir -p ${PREFIX}/share/doc/${package}-${version}/examples
- ${INSTALL} -m 644 ${LTLIB} ${THRLTLIB} ${MAILDIR_LIB} ${PREFIX}/${libdir}
+ ${INSTALL} -m 644 ${lib_LTLIBRARIES} ${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}/${libdir};
+ ${INSTALL} -m 644 ${lib_LIBRARIES} ${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/ ; \
${COMPILE} ${CFLAGS} -c $<
il_int_test.o il_string_test.o il_test.o il_msg_test.o parse.o: %.o: %.cpp test_main.cpp
- ${CXX} -c ${CFLAGS} ${TEST_INC} $<
+ ${CXX} -c ${CFLAGS} ${CPPUNIT_CFLAGS} $<
%.thr.o: %.c
${COMPILE} ${CFLAGS} -D_REENTRANT -DGLITE_LB_THREADED -o $@ -c $<
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
#include <sys/time.h> /* for ULCconvertDate */
#include <time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*========= DATA =====================================================*/
#define ULM_DATE_STRING_LENGTH 21
void edg_wll_ULMDateToTimeval( const char *s, struct timeval *tv );
extern int edg_wll_ULMTimevalToDate( long sec, long usec, char *dstr );
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GLITE_LB_ULM_PARSE_H */
7.1.4-1
- Hostname parsing adjusted to handle IPv6 addresses
+7.1.5-1
+- Makefile adopts compilation and linking flags from the environment
+
+7.1.6-1
+- revision of the perl code generator (fixed jobid, notifid and timeval types, mainly in logging functions)
+- fixed toString perl method for logsrc (duplicated line)
+- new client API test (simple run for SEGV check)
+
+7.1.6-2
+- Module rebuilt
+
+7.1.7-1
+- Makefile a configuration updated to work across org.glite & EMI
+- Connection pool initialization fixed for multi-threaded apps. (fix for bug #76175)
+
+7.1.7-2
+- Module rebuilt
+
# $Header$
-module.version=7.1.4
-module.age=1
+module.version=7.1.7
+module.age=2
#ifdef GLITE_LB_THREADED
printf("Thread %d ",pthread_self());
#endif
- printf("Initializng connections AND THE CONNECTION POOL\n");
+ printf("Initializing connections AND THE CONNECTION POOL\n");
#endif
+ edg_wll_gss_initialize();
connectionsHandle.connPool = (edg_wll_ConnPool *) calloc(connectionsHandle.poolSize, sizeof(edg_wll_ConnPool));
for (i=0; i<connectionsHandle.poolSize; i++) {
if(level <= log_level) {
fprintf(stderr, "[%6ld] ", (long) pthread_self());
- fprintf(stderr, err_text);
+ fprintf(stderr, "%s", err_text);
}
if(level <= LOG_ERR) {
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
+#include <string.h>
#include "context-int.h"
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.1.9-2
- Module rebuilt
+1.1.10-1
+- TestPlan tests documentation updated.
+
+1.1.10-2
+- Module rebuilt
+
+1.1.10-3
+- Module rebuilt
+
# $Header$
-module.version=1.1.9
-module.age=2
+module.version=1.1.10
+module.age=3
\hline
{\tt lb-test-statistics.sh} & Implemented & Test statistic functions provided by \LB \\
\hline
+{\tt lb-test-threaded.sh} & Implemented & Rudimentary test for threaded clients \LB \\
+\hline
\end{tabularx}
\subsubsection{Event logging examples}
\item Register jobs with \code{edg\_wll\_RegisterJob}
\item Log reasonable sequences of events with \code{edg\_wll\_Log*}, both through logger and/or proxy
\item Check with \code{edg\_wll\_JobLog} that the events got delivered afterwards (approx. 10s).
+\item Also check delivery and processing of events related to collections.
\end{enumerate}
\how\ \ctblb{lb-test-event-delivery.sh}
% - rename the script, tidy it
% - create some meaningful sequence of events for logEvents
-\note\ The test includes artificial delays. Takes approx. 25\,s to finish.
+\note\ The test includes artificial delays. Takes approx. 60\,s to finish.
\result\ All sub tests (API calls) should return 0. The same events that were logged must be returned.
-\begin{hints}
-There is approx. 1 min time window in which the local logger files exist.
-They can be grabbed and used for comparing the events later in~\ref{recover}.
-\end{hints}
-
-
\subsubsection{Job registration only}
\label{reg}
\what\ Register jobs with \code{edg\_wll\_RegisterJobProxy}, log events
using \code{edg\_wll\_LogEventProxy} and check the job states against
both lbproxy (using \code{edg\_wll\_JobStatusProxy}) and bkserver
-(using \code{edg\_wll\_JobStatus}). Pay special attention to job reaching final
+(using \code{edg\_wll\_JobStatus}). Also test job collections and registration, including registration of subjobs. Pay special attention to job reaching final
job status and to the automatic purge from proxy.
% - check the timeouts. - ??tam byly nejaky timeouty???
lbproxy and probably with a small delay also at the bkserver. Jobs that reach the final job state
are really purged from the proxy.
+\note\ The test includes artificial delays. Takes approx. 50\,s to finish.
\subsection{WS interface}
\result\ Meaningful values should be returned by both tests.
+\subsubsection{Multi-Threaded Operation}
+
+\req\ \LB\ server running
+
+\what\
+\begin{enumerate}
+\item Register a series of jobs.
+\item Run a client using multiple threads to query the server simultaneously.
+\item Check if all threads finished OK.
+\end{enumerate}
+
+\how\ \ctblb{lb-test-threaded.sh}
+
+\note\ The is not a thorough test. It is not capable of discovering rare or improbable problems but it will check the essentials of multi-threaded opration.
+
+\result\ The test must not hang. Meaningful results (albeit errors) must be returned by all threads.
\section{LB ``In the Wild''---Real-World WMS Test}
module.version=0.0.0
PREFIX=/opt/glite
globus_prefix=/opt/globus
-
-archlib:=lib
-thrflavour:=gcc32dbgpthr
-host_cpu:=${shell uname -m}
-ifeq (${host_cpu},x86_64)
- archlib:=lib64
- thrflavour:=gcc64dbgpthr
-endif
+libdir=lib
-include Makefile.inc
-include ${top_srcdir}/project/version.properties
CC=gcc
VPATH=${top_srcdir}/src:${top_srcdir}/doc
-GLOBUS_CPPFLAGS:=-I${globus_prefix}/include/${thrflavour}
CPPFLAGS:=-I${stagedir}/include -D_GNU_SOURCE -D_REENTRANT ${CPPFLAGS}
CFLAGS:=-W -Wall -g -O2 ${CFLAGS}
LDFLAGS:=${LDFLAGS}
-LIBS:=-L${stagedir}/${archlib} -L${stagedir}/lib \
+ifeq (${thrflavour},)
+LIBS:=-L${stagedir}/${libdir} \
+ -lglite_lb_common \
+ -lglite_lb_client \
+ -lpthread -lglite_security_gss
+else
+LIBS:=-L${stagedir}/${libdir} -L${stagedir}/lib \
-lglite_lb_common_${thrflavour} \
-lglite_lb_client_${thrflavour} \
-lpthread -lglite_security_gss_${thrflavour}
+endif
ifneq ($(GLITE_LB_HARVESTER_WITH_LBU_DB),no)
CPPFLAGS:=$(CPPFLAGS) -DWITH_LBU_DB=1
LIBS:=$(LIBS) -lglite_lbu_db
endif
ifeq ($(GLITE_LB_HARVESTER_WITH_OLD_LB),yes)
-CPPFLAGS:=${GLOBUS_CPPFLAGS} $(CPPFLAGS) -DWITH_OLD_LB=1
+GLOBUS_GSSAPI_GSI_CFLAGS?=-I${globus_prefix}/include/${thrflavour}
+CPPFLAGS:=${GLOBUS_GSSAPI_GSI_CFLAGS} $(CPPFLAGS) -DWITH_OLD_LB=1
LIBS:=$(LIBS) -lglite_wmsutils_cjobid
else
LIBS:=$(LIBS) -lglite_jobid -lglite_lbu_trio -lglite_lbu_log
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.0.8-2
- Module rebuilt
+1.0.9-1
+- Separated start-up script for L&B harvester.
+
+1.0.9-2
+- Module rebuilt
+
+1.0.10-1
+- Makefile a configuration updated to work across org.glite & EMI
+- BDII status reporting fixed
+
+1.0.10-2
+- Module rebuilt
+
-module.version=1.0.8
+module.version=1.0.10
module.age=2
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
version=0.0.0
PREFIX=/opt/glite
-nothrflavour=gcc32
-thrflavour=gcc32pthr
-
-include Makefile.inc
-include ../project/version.properties
WS_INTERLOGD:=glite-lb-ws-interlogd
endif
+ifeq (${thrflavour},)
+default_thrflavour=
+default_nothrflavour=
+else
+default_thrflavour=_${thrflavour}
+default_nothrflavour=_${nothrflavour}
+endif
+
DEBUG:=-g -O0
CFLAGS:=${CFLAGS} ${DEBUG} \
-I${stagedir}/include -I${top_srcdir}/src -I${top_srcdir}/interface \
GLITE_GSS_LIB:=-lglite_security_gss
-TEST_LIBS:=-L${cppunit_prefix}/lib -lcppunit
-TEST_INC:=-I${cppunit_prefix}/include
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
LOGD_OBJS:= logd_proto.o logd.o
all compile: $(LOGD) $(INTERLOGD) $(NOTIF_INTERLOGD) ${MAN_GZ}
glite-lb-logd: ${LOGD_OBJS}
- ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB}_${nothrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB}${default_nothrflavour} ${EXT_LIB}
glite-lb-logd-perf: ${LOGD_OBJS}
- ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB}_${nothrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${LOGD_OBJS} ${COMMON_LIB}${default_nothrflavour} ${EXT_LIB}
glite-lb-logd-nofile: ${LOGD_NOBJS}
- ${LINK} -o $@ ${LOGD_NOBJS} ${COMMON_LIB}_${nothrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${LOGD_NOBJS} ${COMMON_LIB}${default_nothrflavour} ${EXT_LIB}
glite-lb-logd-perf-nofile: ${LOGD_NOBJS}
- ${LINK} -o $@ ${LOGD_NOBJS} ${COMMON_LIB}_${nothrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${LOGD_NOBJS} ${COMMON_LIB}${default_nothrflavour} ${EXT_LIB}
glite-lb-interlogd: ${INTERLOG_OBJS}
- ${LINK} -o $@ ${INTERLOG_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${INTERLOG_OBJS} ${COMMON_LIB}${default_thrflavour} ${EXT_LIB}
glite-lb-notif-interlogd: ${INTERLOG_NOTIF_OBJS}
- ${LINK} -export-dynamic -o $@ ${INTERLOG_NOTIF_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+ ${LINK} -export-dynamic -o $@ ${INTERLOG_NOTIF_OBJS} ${COMMON_LIB}${default_thrflavour} ${EXT_LIB}
glite-lb-interlogd-perf: ${INTERLOG_PERF_OBJS}
- ${LINK} -o $@ ${INTERLOG_PERF_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${INTERLOG_PERF_OBJS} ${COMMON_LIB}${default_thrflavour} ${EXT_LIB}
glite-lb-interlogd-perf-empty: ${INTERLOG_EMPTY_OBJS}
- ${LINK} -o $@ ${INTERLOG_EMPTY_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${INTERLOG_EMPTY_OBJS} ${COMMON_LIB}${default_thrflavour} ${EXT_LIB}
glite-lb-ws-interlogd: ${INTERLOG_WS_OBJS}
- ${LINK} -o $@ ${INTERLOG_WS_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+ ${LINK} -o $@ ${INTERLOG_WS_OBJS} ${COMMON_LIB}${default_thrflavour} ${EXT_LIB}
#glite-lb-interlogd-perf-inline-empty: ${INTERLOG_INLINE_EMPTY_OBJS}
# ${LINK} -o $@ ${INTERLOG_INLINE_EMPTY_OBJS} \
-# ${COMMON_LIB}_${thrflavour}
+# ${COMMON_LIB}${default_thrflavour}
${MAN_GZ}: ${MAN}
rm -f ${MAN_GZ} ${MAN}
# check.ll check.il
#check.ll: logd_proto_test.o ll_test.o
-# ${LINKXX} -o $@ ${COMMON_LIB}_${nothrflavour} ${EXT_LIBS} ${TEST_LIBS} $+
+# ${LINKXX} -o $@ ${COMMON_LIB}${default_nothrflavour} ${EXT_LIBS} ${CPPUNIT_LIBS} $+
# ./check.ll
check.ll:
-echo commented out -- fix needed
check.il: ${INTERLOG_TEST_OBJS}
- ${LINKXX} -o $@ ${COMMON_LIB}_${thrflavour} ${TEST_LIBS} ${EXT_LIB} -lpthread $+
+ ${LINKXX} -o $@ ${COMMON_LIB}${default_thrflavour} ${CPPUNIT_LIBS} ${EXT_LIB} -lpthread $+
install:
-mkdir -p ${PREFIX}/bin
${CC} ${CFLAGS} -c $< -o $@
ll_test.o: %.o: %.cpp
- ${CXX} ${CFLAGS} ${TEST_INC} -c $< -o $@
+ ${CXX} ${CFLAGS} ${CPPUNIT_CFLAGS} -c $< -o $@
il_test.o IlTestBase.o server_msgTest.o event_queueTest.o input_queue_socketTest.o event_storeTest.o: %.o: %.cpp
- ${CXX} ${CFLAGS} ${TEST_INC} -c $< -o $@
+ ${CXX} ${CFLAGS} ${CPPUNIT_CFLAGS} -c $< -o $@
clean:
rm -rvf .libs/ *.o *.lo *.no ${LOGD} ${INTERLOGD} ${NOTIF_INTERLOGD} ${MAN_GZ}
local cmd="$3"
if [ -f "$pidfile" ]; then
- if kill -0 `cat $pidfile`; then
+ if ps p `cat $pidfile` >/dev/null 2>&1; then
return 0
fi
echo -n "Warning: stalled $pidfile for $name"
su - $GLITE_USER -c "$log4c $cmd" && echo " done" || echo " FAILED"
}
+status_daemon()
+{
+ local name="$1"
+ local pidfile="$2"
+
+ if [ -f "$pidfile" ]; then
+ pid=`cat "$pidfile"`
+ if ps p $pid >/dev/null 2>&1; then
+ echo "$name running as $pid"
+ else
+ echo "$name not running (stalled pidfile)"
+ return 1
+ fi
+ else
+ case "$GLITE_LB_TYPE" in
+ proxy)
+ echo "$name not running (disabled)"
+ return 0
+ ;;
+ *)
+ echo "$name not running"
+ return 1
+ ;;
+ esac
+ fi
+
+ return 0
+}
+
start()
{
case "$GLITE_LB_TYPE" in
# for L&B <= 2.0
LC_ALL=C
- if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_LB_LOGGER_PORT:-9002} .*LISTEN" >/dev/null 2>&1 ;then
+ if netstat -an --inet --inet6 | grep "^tcp .* \(::\|0.0.0.0\):${GLITE_LB_LOGGER_PORT:-9002} .*LISTEN" >/dev/null 2>&1 ;then
killall -9 glite-lb-logd
fi
if netstat -an --unix | grep "^unix .* LISTEN.* ${GLITE_LB_IL_SOCK:-/tmp/interlogger.sock}$" >/dev/null 2>&1 ;then
status()
{
- LC_ALL=C
- if netstat -an --inet | grep "^tcp .* 0.0.0.0:${GLITE_LB_LOGGER_PORT:-9002} .*LISTEN" >/dev/null 2>&1 ;then
- echo glite-lb-logd running
- else
- echo glite-lb-logd not running
- return 1
- fi
- if netstat -an --unix | grep "^unix .* LISTEN.* ${GLITE_LB_IL_SOCK:-/tmp/interlogger.sock}$" >/dev/null 2>&1 ;then
- echo glite-lb-interlogd running
- else
- echo glite-lb-interlogd not running
- return 1
- fi
+ retval=0
+
+ status_daemon "glite-lb-logd" "$LL_PIDFILE" || retval=1
+ status_daemon "glite-lb-interlogd" "$LL_PIDFILE" || retval=1
+
+ return $retval
}
case x$1 in
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.1.8-1
- Fixed propagation of error messages
+2.1.9-1
+- Makefile adopts compilation and linking flags from the environment.
+
+2.1.10-1
+- Use pidfiles for checking status of daemons rather than port scanning.
+
+2.1.10-2
+- Module rebuilt
+
+2.1.11-1
+- Makefile a configuration updated to work across org.glite & EMI
+- BDII status reporting fixed (ggus #62737)
+
+2.1.11-2
+- Module rebuilt
+
# $Header$
-module.version=2.1.8
-module.age=1
+module.version=2.1.11
+module.age=2
while(p) {
if((*cmp_func)(p->msg, data)) {
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " moving event at offset %d(%d) from %s:%d to %s:%d",
+ " moving event at offset %ld(%d) from %s:%d to %s:%d",
p->msg->offset, p->msg->generation, eq_s->dest_name, eq_s->dest_port,
eq_d ? eq_d->dest_name : "trash", eq_d ? eq_d->dest_port : -1);
/* il_log(LOG_DEBUG, " current: %x, next: %x\n", p, p->prev); */
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
" setting starting file position to %ld", last);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " bytes sent to logging server: %d", es->last_committed_ls);
+ " bytes sent to logging server: %ld", es->last_committed_ls);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " bytes sent to bookkeeping server: %d", es->last_committed_bs);
+ " bytes sent to bookkeeping server: %ld", es->last_committed_bs);
if(last > 0) {
int c;
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
" trying to cleanup event store %s", es->job_id_s);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " bytes sent to logging server: %d", es->last_committed_ls);
+ " bytes sent to logging server: %ld", es->last_committed_ls);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " bytes sent to bookkeeping server: %d", es->last_committed_bs);
+ " bytes sent to bookkeeping server: %ld", es->last_committed_bs);
/* preliminary check to avoid opening event file */
/* if the positions differ, some events still have to be sent */
last = ftell(ef);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " total bytes in file: %d", last);
+ " total bytes in file: %ld", last);
if(es->last_committed_ls < last) {
fclose(ef);
if((msg = server_msg_create(event, offset)) == NULL) {
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_WARN,
" handle_msg: error parsing event '%s': %s",
- event, error_get_msg());
+ event->data, error_get_msg());
return(0);
}
if (childpid == 0) {
ret = doit(client_fd,cred,prefix,noIPC,noParse);
if (client_fd) close(client_fd);
- glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_DEBUG,"Exiting.\n",
- CONNECTION_TIMEOUT);
+ glite_common_log(LOG_CATEGORY_CONTROL,LOG_PRIORITY_DEBUG,"Exiting.\n");
exit(0);
}
if (childpid > 0) {
break;
}
default:
- glite_common_log(LOG_CATEGORY_SECURITY,LOG_PRIORITY_ERROR,"%s: %s, unknown error occured\n");
+ glite_common_log(LOG_CATEGORY_SECURITY,LOG_PRIORITY_ERROR,"%s: %s, unknown error occured\n", func, text);
break;
}
return ret;
}
}
if (!unique) {
- glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_ERROR,"Cannot determine the unique long local-logger id (LLLID)!\n",lllid);
+ glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_ERROR,"Cannot determine the unique long local-logger id (LLLID %ld)!\n",lllid);
return EAGAIN;
}
glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_INFO,"Long local-logger id (LLLID): %ld ... [ok]\n",lllid);
goto edg_wll_log_proto_server_end_1;
} else glite_common_log(LOG_CATEGORY_ACCESS,LOG_PRIORITY_DEBUG,
"Sending via IPC (UNIX socket \"%s\")\n\t"
- "the message position %ld (%d bytes)... [ok]",
+ "the message position %ld (%ld bytes)... [ok]",
socket_path, filepos, sizeof(filepos));
if (event->any.priority & (EDG_WLL_LOGFLAG_SYNC|EDG_WLL_LOGFLAG_SYNC_COMPAT)) {
pthread_t my_id = pthread_self();
int me;
- glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_WARN, "thread %d exits", my_id);
+ glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_WARN, "thread %p exits", my_id);
/* unlock all held locks */
/* FIXME: check that the thread always exits when holding these locks;
return(1);
glite_common_log(IL_LOG_CATEGORY, LOG_PRIORITY_DEBUG,
- " trying to deliver event at offset %d for job %s",
+ " trying to deliver event at offset %ld for job %s",
msg->offset, msg->job_id_s);
#ifdef LB_PERF
# gridsite requires openssl libraries, we want to include the ones from globus
globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
expat_prefix=/opt/expat
cares_prefix=/opt/c-ares
gsoap_prefix=/opt/gsoap
DEBUG:=-g -O0 -Wall
-GRIDSITE_CFLAGS = -I${gridsite_prefix}/include `xml2-config --cflags`
-GRIDSITE_LIBS = -L${gridsite_prefix}/${libdir} -L${gridsite_prefix}/lib -lgridsite_globus `xml2-config --libs`
+ifeq (${thrflavour},)
+default_flavour=
+vomsflavour:=
+else
+default_flavour=_${nothrflavour}
+vomsflavour:=_${nothrflavour}
+ifeq (${nothrflavour},gcc32)
+ vomsflavour :=
+endif
+ifeq (${nothrflavour},gcc32dbg)
+ vomsflavour :=
+endif
+endif
-LCAS_CFLAGS=-I${lcas_prefix}/include
+GRIDSITE_CFLAGS?=-I${gridsite_prefix}/include `xml2-config --cflags`
+GRIDSITE_LIBS?=-L${gridsite_prefix}/${libdir} -L${gridsite_prefix}/lib -lgridsite_globus `xml2-config --libs`
+
+LCAS_CFLAGS?=-I${lcas_prefix}/include -I${lcas_prefix}/include/glite/security
+LCAS_LIBS?=-L${lcas_prefix}/${libdir} -llcas
+
+ifneq (${classads_prefix},/usr)
+ classads_libs := -L${classads_prefix}/${libdir} -L${classads_prefix}/lib
+endif
+CLASSADS_CFLAGS?=-I${classads_prefix}/include -I${classads_prefix}/include/classad
+CLASSADS_LIBS?=${classads_libs} -lclassad
+
+ifneq (${cares_prefix},/usr)
+ cares_libs := -L${cares_prefix}/${libdir} -L${cares_prefix}/lib
+endif
+LIBCARES_CFLAGS?=-I${cares_prefix}/include
+LIBCARES_LIBS?=${cares_libs} -lcares
+
+GSOAP_CFLAGS?=-I${gsoap_prefix}/include -I${gsoap_prefix}/
+EXPAT_CFLAGS?=-I${expat_prefix}/include
+GLOBUS_GSSAPI_GSI_CFLAGS?=-I${globus_prefix}/include/${nothrflavour}
+
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
+
+VOMS_CFLAGS?=-I${voms_prefix}/include -I${voms_prefix}/include/glite/security
+VOMS_LIBS?=-L${voms_prefix}/${libdir} -lvomsapi${vomsflavour}
CFLAGS:= ${CFLAGS} \
+ ${GLOBUS_GSSAPI_GSI_CFLAGS} \
${WS_CFLAGS} ${DEBUG} \
-DVERSION=\"${version}\" \
- -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
+ ${GSOAP_CFLAGS} \
-I${stagedir}/include -I${top_srcdir}/src -I. \
-I${top_srcdir}/interface \
- -I${expat_prefix}/include \
- -I${cares_prefix}/include \
- -I${classads_prefix}/include -I${classads_prefix}/include/classad \
- -I${voms_prefix}/include \
+ ${EXPAT_CFLAGS} \
+ ${LIBCARES_CFLAGS} \
+ ${CLASSADS_CFLAGS} \
+ ${VOMS_CFLAGS} \
${COVERAGE_FLAGS} \
$(GRIDSITE_CFLAGS) ${LCAS_CFLAGS} \
- -D_GNU_SOURCE ${LB_STANDALONE_FLAGS} ${LB_PERF_FLAGS} -DLB_EVENTS_BLOB \
- -I${globus_prefix}/include/${nothrflavour} #gridsite needs this
+ -D_GNU_SOURCE ${LB_STANDALONE_FLAGS} ${LB_PERF_FLAGS} -DLB_EVENTS_BLOB
CXXFLAGS:=${CFLAGS}
ifdef LB_PROF
SRVBONES_LIB:= ${stagedir}/${libdir}/libglite_lbu_server_bones.la
- LB_COMMON_LIB:=${stagedir}/${libdir}/libglite_lb_common_${nothrflavour}.la
+ LB_COMMON_LIB:=${stagedir}/${libdir}/libglite_lb_common${default_flavour}.la
LB_UTILS_DB_LIB:=${stagedir}/${libdir}/libglite_lbu_db.la
CFLAGS:=${CFLAGS} -pg -g
LDFLAGS:=${LDFLAGS} -pg
else
SRVBONES_LIB:= -L${stagedir}/${libdir} -lglite_lbu_server_bones
- LB_COMMON_LIB:=-L${stagedir}/${libdir} -lglite_lb_common_${nothrflavour}
+ LB_COMMON_LIB:=-L${stagedir}/${libdir} -lglite_lb_common${default_flavour}
LB_UTILS_DB_LIB:=-L${stagedir}/${libdir} -lglite_lbu_db
LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
endif
CFLAGS:=${CFLAGS} -DLBS_DB_PROFILE
endif
-TEST_LIBS:=-L${cppunit_prefix}/${libdir} -lcppunit
-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}/${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}/${libdir} ${LDFLAGS}
XSLTPROC:=xsltproc --novalid
-#ifeq ($(shell ls ${gsoap_prefix}/bin/soapcpp2),${gsoap_prefix}/bin/soapcpp2)
-# gsoap_bin_prefix := ${gsoap_prefix}/bin
-#else
-# gsoap_bin_prefix := ${gsoap_prefix}
-#endif
-
gsoap_bin_prefix:=${shell if [ -x ${gsoap_prefix}/bin/soapcpp2 ]; then echo ${gsoap_prefix}/bin; else echo ${gsoap_prefix}; fi }
-ifneq (${expat_prefix},/usr)
- expatlib := -L${expat_prefix}/${libdir} -L${expat_prefix}/lib
-endif
-
-vomsflavour := _${nothrflavour}
-ifeq (${nothrflavour},gcc32)
- vomsflavour :=
-endif
-ifeq (${nothrflavour},gcc32dbg)
- vomsflavour :=
-endif
-VOMS_LIBS:=-L${voms_prefix}/${libdir} -lvomsapi${vomsflavour}
-LCAS_LIBS:=-L${lcas_prefix}/${libdir} -llcas
-
-#EXT_LIBS:= \
-# ${expatlib} -lexpat \
-# ${GRIDSITE_LIBS} \
-# -lvomsc${vomsflavour} \
-
-ifneq (${classads_prefix},/usr)
- CLASSADS_LIBS := -L${classads_prefix}/${libdir} -L${classads_prefix}/lib
-endif
-CLASSADS_LIBS := ${CLASSADS_LIBS} -lclassad
-
-ifneq (${cares_prefix},/usr)
- CARES_LIBS := -L${cares_prefix}/${libdir} -L${cares_prefix}/lib
-endif
-CARES_LIBS := ${CARES_LIBS} -lcares
-
EXT_LIBS:= \
-lz \
${GRIDSITE_LIBS} \
${CLASSADS_LIBS} \
- ${CARES_LIBS} \
+ ${LIBCARES_LIBS} \
${LCAS_LIBS} \
${VOMS_LIBS}
-COMMON_LIBS:= -L${stagedir}/${libdir} -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${default_flavour} -lglite_security_gss${default_flavour} -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 \
gsoap_version ?= ${gsoap_default_version}
dotless_gsoap_ver:=${shell echo ${gsoap_version} | tr -d . }
-ifeq ($(shell test -f ${stagedir}/${libdir}/libglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}_c.so && echo ok),ok)
+ifeq ($(shell test -f ${stagedir}/${libdir}/libglite_security_gsoap_plugin_${dotless_gsoap_ver}${default_flavour}_c.so && echo ok),ok)
langflavour:=_c
endif
-GSOAP_LIB:=-L${stagedir}/${libdir} -lglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}${langflavour}
+GSOAP_LIB:=-L${stagedir}/${libdir} -lglite_security_gsoap_plugin_${dotless_gsoap_ver}${default_flavour}${langflavour}
ifeq ($(GLITE_LB_SERVER_WITH_WS),yes)
BKSERVER_OBJS:= \
${LB_COMMON_LIB} \
${LB_MACHINE_LIB} \
${LB_UTILS_DB_LIB} \
- -lglite_security_gss_${nothrflavour} \
+ -lglite_security_gss${default_flavour} \
${EXT_LIBS} \
${classadslib} \
-lglite_lbu_maildir \
INDEX_LIBS:= ${SRVBONES_LIB} ${COMMON_LIBS} ${LB_MACHINE_LIB} ${EXT_LIBS} ${LB_UTILS_DB_LIB}
WS_CLIENT_OBJS:= $(GSOAP_FILES_PREFIX)C.o $(GSOAP_FILES_PREFIX)Client.o ws_fault.o ws_typeref.o
-WS_CLIENT_LIBS:= ${GSOAP_LIB} -lglite_lb_common_${nothrflavour} \
- -lglite_lb_common_${nothrflavour}
-
-# WS_CLIENT_LIBS:= -L${stagedir}/${libdir} \
-# -lglite_lb_client_${nothrflavour} \
-# -lglite_lb_common_${nothrflavour} \
-# -L${gsoap_prefix}/${libdir} -lgsoap \
-# -lglite_security_gsoap_plugin_${nothrflavour} \
-# ${EXT_LIBS}
-#
+WS_CLIENT_LIBS:= ${GSOAP_LIB} -lglite_lb_common${default_flavour} \
+ -lglite_lb_common${default_flavour}
HDRS=index.h lb_authz.h store.h
LD_LIBRARY_PATH=${cares_prefix}/${libdir}:${classads_prefix}/${libdir}:${LD_LIBRARY_PATH} ./test_xml
test_xml: test_xml.cpp
- ${CXX} -c ${CFLAGS} ${TEST_INC} $<
- ${LINKXX} -o $@ test_xml.o lb_xml_parse.o ${LB_COMMON_LIB} ${TEST_LIBS}
+ ${CXX} -c ${CFLAGS} ${CPPUNIT_CFLAGS} $<
+ ${LINKXX} -o $@ test_xml.o lb_xml_parse.o ${LB_COMMON_LIB} ${CPPUNIT_LIBS}
test.query: test_query_events
# XXX coredumps ./test_query_events
test_query_events: ${query_events_objs}
${LINKXX} -o $@ ${query_events_objs} \
- ${TEST_LIBS} ${LB_COMMON_LIB} ${LB_MACHINE_LIB} ${classadslib} -lglite_lbu_log
+ ${CPPUNIT_LIBS} ${LB_COMMON_LIB} ${LB_MACHINE_LIB} ${classadslib} -lglite_lbu_log
test.soapconv: 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} $<
- ${LINKXX} -o $@ test_soap_conv.o ${WS_CLIENT_OBJS} ${WS_CLIENT_LIBS} ${TEST_LIBS}
+ ${CXX} -c ${CFLAGS} ${CPPUNIT_CFLAGS} $<
+ ${LINKXX} -o $@ test_soap_conv.o ${WS_CLIENT_OBJS} ${WS_CLIENT_LIBS} ${CPPUNIT_LIBS}
examples: ${EXAMPLES}
${CXXCOMPILE} -c $<
test_query_events.o: %.o: %.cpp
- ${CXX} -c ${CFLAGS} ${TEST_INC} $<
+ ${CXX} -c ${CFLAGS} ${CPPUNIT_CFLAGS} $<
%.lo: %.c
local cmd="$3"
if [ -f "$pidfile" ]; then
- if kill -0 `cat $pidfile`; then
+ if ps p `cat $pidfile` >/dev/null 2>&2; then
return 0
fi
echo -n "Warning: stalled $pidfile for $name"
echo -n Stopping $name \($pid\) ...
kill $pid
try=0
- while kill -0 $pid >/dev/null 2>&1; do
+ while ps p $pid >/dev/null 2>&1; do
sleep 1;
try=`expr $try + 1`
if [ $try = 20 ]; then
{
local name="$1"
local pidfile="$2"
+ local enabled="$3"
if [ -f "$pidfile" ]; then
pid=`cat "$pidfile"`
- if kill -0 $pid >/dev/null 2>&1; then
- echo $name running as $pid
+ if ps p $pid >/dev/null 2>&1; then
+ echo "$name running as $pid"
else
- echo $name not running
+ echo "$name not running (stalled pidfile)"
return 1
fi
else
- echo $name not running
- return 1
+ if test -n "$enabled" -a x"$enabled" = x"0"; then
+ echo "$name not running (disabled)"
+ return 0
+ else
+ echo "$name not running"
+ return 1
+ fi
fi
return 0
status()
{
retval=0
-
- status_daemon "glite-lb-notif-interlogd" "$NOTIF_IL_PIDFILE" || retval=1
- status_daemon "glite-lb-interlogd for proxy" "$PROXY_IL_PIDFILE" || retval=1
-
- status_daemon "glite-lb-bkserverd" "$BK_PIDFILE" || retval=1
- if test x"$GLITE_LB_EXPORT_ENABLED" = x"true"; then
- status_daemon "glite-jp-importer" "$jp_importer_pidfile" || retval=1
- fi
+ proxy=0
+ jp=0
+ test x"$GLITE_LB_TYPE" = x"proxy" -o x"$GLITE_LB_TYPE" = x"both" \
+ && proxy=1
+ test x"$GLITE_LB_EXPORT_ENABLED" = x"true" && jp=1
+
+ status_daemon "glite-lb-notif-interlogd" "$NOTIF_IL_PIDFILE" \
+ || retval=1
+ status_daemon "glite-lb-interlogd for proxy" "$PROXY_IL_PIDFILE" \
+ $proxy || retval=1
+ status_daemon "glite-lb-bkserverd" "$BK_PIDFILE" \
+ || retval=1
+ status_daemon "glite-jp-importer" "$jp_importer_pidfile" $jp \
+ || retval=1
return $retval
}
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
#ifndef NO_GACL
#include <gridsite.h>
#endif
-#include <glite/security/voms/voms_apic.h>
+#include <voms/voms_apic.h>
typedef struct _edg_wll_Acl {
#ifndef NO_GACL
2.1.10-1
- Fixed precedence in selecting IPv6/IPv4
+2.1.11-1
+- Makefile adopts compilation and linking flags from the environment.
+- Memory handling fixes
+- stateEnterTime initialization for collection jobs (fix for bug #71913).
+
+2.1.12-1
+- Fixed status reporting in the startup script
+- General code polishing
+- Fixes in statistics
+
+2.1.12-2
+- Module rebuilt
+
+2.1.13-1
+- Makefile, configuration and header includes updated to work across org.glite & EMI
+- BDII status reporting fixed (ggus #62737)
+
+2.1.13-2
+- Module rebuilt
+
# : /cvs/jra1mw/org.glite.lb.server/project/version.properties,v 1.185 2008/06/25 13:12:58 akrenek Exp $
-module.version=2.1.10
-module.age=1
+module.version=2.1.13
+module.age=2
name = strrchr(argv[0],'/');
if (name) name++; else name = argv[0];
- memset(host, 0, sizeof host);
- edg_wll_gss_gethostname(host,sizeof host);
- host[sizeof host - 1] = 0;
-
asprintf(&port, "%d", GLITE_JOBID_DEFAULT_PORT);
#ifdef GLITE_LB_SERVER_WITH_WS
asprintf(&ws_port, "%d", GLITE_JOBID_DEFAULT_PORT+3);
exit(1);
}
+ memset(host, 0, sizeof host);
+ edg_wll_gss_gethostname(host,sizeof host);
+ host[sizeof host - 1] = 0;
+
while ((opt = getopt_long(argc,argv,get_opt_string,opts,NULL)) != EOF) switch (opt) {
case 'A': enable_lcas = 1; break;
case 'a': fake_host = strdup(optarg); break;
case 'i': strcpy(pidfile,optarg); pidfile_forced = 1; break;
case 'R': add_root(ctx, optarg, ADMIN_ACCESS); break;
case 'F': glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL,
- "%s: Option --super-users-file is deprecated, specify policy using --policy instead");
+ "%s: Option --super-users-file is deprecated, specify policy using --policy instead", argv[0]);
return 1;
case 'x': noIndex = atoi(optarg);
if (noIndex < 0 || noIndex > 2) { usage(name); return 1; }
edg_wll_gss_release_cred(&mycred, NULL);
mycred = newcred;
} else {
- glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_WARN, "[%d] reloading credentials failed, using old ones");
+ glite_common_log(LOG_CATEGORY_SECURITY, LOG_PRIORITY_WARN, "[%d] reloading credentials failed, using old ones", getpid());
}
break;
case -1:
dbjob = edg_wlc_JobIdGetUnique(job);
trio_asprintf(&stmt,"select proxy,server from jobs where jobid = '%|Ss' for update",dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
ret = edg_wll_ExecSQL(ctx,stmt,&q);
if (ret <= 0) {
if (ret == 0) {
else
trio_asprintf(&stmt, "select * from jobs where jobid='%|Ss' lock in share mode", job);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ((nr = edg_wll_ExecSQL(ctx,stmt,&sh)) < 0) goto cleanup;
if (nr == 0) {
char *err;
"order by arrived",
ctx->srvName,ctx->srvPort,
from_s,to_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) < 0) goto clean;
edg_wll_ResetError(ctx);
trio_asprintf(&q, "select ulm from events_flesh where jobid = '%|Ss' and event = %d", jobid, n);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if ((ret=edg_wll_ExecSQL(ctx,q,&sh)) < 0) goto cleanup;
if (edg_wll_FetchRow(ctx,sh,1,NULL,&nameval[0]) == 1) {
trio_asprintf(&q,"select name,value from %s "
"where jobid = '%|Ss' and event = %d ",
tables[t],jobid,n);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
- q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
+ LOG_PRIORITY_DEBUG, q);
if ((ret=edg_wll_ExecSQL(ctx,q,&sh)) < 0) goto cleanup;
trio_asprintf(&stmt, "SELECT version,int_status,jobid FROM states WHERE parent_job='%|Ss'", md5_jobid);
if (stmt != NULL) {
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
num_sub = edg_wll_ExecSQL(ctx, stmt, &sh);
if (num_sub >=0 ) {
i = 0;
// Get child states from the database
trio_asprintf(&stmt, "SELECT version,status,jobid FROM states WHERE parent_job='%|Ss'", md5_jobid);
if (stmt != NULL) {
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
num_sub = edg_wll_ExecSQL(ctx, stmt, &sh);
if (num_sub >=0 ) {
while ((num_f = edg_wll_FetchRow(ctx, sh, sizeof(out_stat)/sizeof(out_stat[0]), NULL, out_stat)) == 3 ) {
"WHERE s.parent_job='%|Ss' AND s.jobid=j.jobid",
md5_jobid);
if (stmt != NULL) {
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
num_sub = edg_wll_ExecSQL(ctx, stmt, &sh);
if (num_sub >=0 ) {
while ((num_f = edg_wll_FetchRow(ctx, sh, sizeof(out)/sizeof(out[0]), NULL, out)) == 1 ) {
edg_wll_SetError(ctx,ENOMEM, NULL);
return NULL;
}
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) >= 0) {
f=edg_wll_FetchRow(ctx,sh,1,NULL,&out);
if (f == 0) {
edg_wll_SetError(ctx,ENOMEM, NULL);
goto err;
}
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0) goto err;
"(jobid,seq,name,value) values "
"('%|Ss',%d,'%|Ss','%|Ss')",
jobid_md5, seq, (*tagp).tag, (*tagp).value);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) {
parent_md5, icvalues,
jobid_md5);
free(icvalues);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ((dbret = edg_wll_ExecSQL(ctx,stmt,NULL)) < 0) goto cleanup;
free(stmt); stmt = NULL;
INTSTAT_VERSION, parent_md5, icvalues);
free(icnames); free(icvalues);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
free(stmt); stmt = NULL;
if (update) {
trio_asprintf(&stmt, "delete from status_tags "
"where jobid ='%|Ss' and seq<%d", jobid_md5, seq);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
free(stmt); stmt = NULL;
",parent_job%s) "
"values (%s)",
icnames, values);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto cleanup;
if (stmt == NULL) {
return edg_wll_SetError(ctx, ENOMEM, NULL);
}
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ((nstates = edg_wll_ExecSQL(ctx,stmt,&sh)) < 0) goto cleanup;
if (nstates == 0) {
if (stmt==NULL) {
return edg_wll_SetError(ctx,ENOMEM, NULL);
}
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) >= 0) {
f=edg_wll_FetchRow(ctx,sh,1,NULL,&out);
}
//printf ("\n\n\n Would like to run SQL statament: %s\n\n\n\n", stmt);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ((dbret = edg_wll_ExecSQL(ctx,stmt,NULL)) < 0) goto cleanup;
#include <unistd.h>
#include <errno.h>
-#include <glite/security/lcas/lcas_pem.h>
-#include "glite/security/voms/voms_apic.h"
+#include <openssl/x509.h>
+#include "lcas/lcas_pem.h"
+#include "voms/voms_apic.h"
#include "glite/lb/context-int.h"
#include "lb_authz.h"
#include "glite/lbu/log.h"
for ( ; ; )
{
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q1);
if ( edg_wll_ExecSQL(ctx, q1, NULL) > 0 )
goto end;
"update acls set refcnt = refcnt+%d "
"where aclid = '%|Ss'",
incr, aclid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q2);
if ( edg_wll_ExecSQL(ctx, q2, NULL) < 0 )
continue;
"where aclid='%|Ss' and refcnt>=%d",
-incr, aclid, -incr);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q1);
if ( edg_wll_ExecSQL(ctx, q1, NULL) > 0 )
{
"delete from acls "
"where aclid='%|Ss' and refcnt=0",
aclid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q2);
edg_wll_ExecSQL(ctx, q2, NULL);
}
trio_asprintf(&stmt,
"update jobs set aclid='%|Ss' where jobid='%|Ss' and ISNULL(aclid)",
new_aclid, md5_jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, stmt);
updated = edg_wll_ExecSQL(ctx, stmt, NULL);
free(stmt); stmt = NULL;
trio_asprintf(&q,
"select aclid from jobs where jobid = '%|Ss'", jobstr);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx, q, &stmt) < 0 ||
edg_wll_FetchRow(ctx, stmt, 1, NULL, &acl_id) < 0) {
trio_asprintf(&q,
"select value from acls where aclid = '%|Ss'", acl_id);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx, q, &stmt) < 0 ||
edg_wll_FetchRow(ctx, stmt, 1, NULL, &acl_str) < 0) {
"from notif_registrations "
"where userid='%s'",
user);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx, q, ¬ifs) < 0) goto err;
free(q); q = NULL;
"from notif_registrations "
"where notifid='%s'",
notifId);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx, q, ¬if) < 0) goto err;
free(q); q = NULL;
#include <stdlib.h>
#include <string.h>
-#include <glite/security/lcas/lcas_modules.h>
-#include <glite/security/lcas/lcas_utils.h>
-#include <glite/security/voms/voms_apic.h>
+#include "lcas/lcas_modules.h"
+#include "lcas/lcas_utils.h"
+#include "voms/voms_apic.h"
#include <glite/lb/context.h>
#include "authz_policy.h"
#include "lb_authz.h"
sprintf(errs, "Error parsing event at line %d", i);
if ( !edg_wll_Error(ctx,NULL,NULL) )
edg_wll_SetError(ctx, EINVAL, errs);
- fprintf(stderr, errs);
+ fprintf(stderr, "%s", errs);
continue;
}
edg_wll_ULMDateToTimeval(buff, &(event->any.arrived));
ju = edg_wlc_JobIdGetUnique(stat->jobId),NOTIF_ALL_JOBS,cond_where ? cond_where : "",cond_and_where ? cond_and_where : "");
free(ju); ju = NULL;
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, jobq);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, jobq);
if (edg_wll_ExecSQL(ctx,jobq,&jobs) < 0) goto err;
trio_asprintf(&dn,"delete from notif_registrations where notifid='%|Ss'",notif);
trio_asprintf(&dj,"delete from notif_jobs where notifid='%|Ss'",notif);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, dn);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, dj);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, dn);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, dj);
if (edg_wll_ExecSQL(ctx,dn,NULL) < 0 ||
edg_wll_ExecSQL(ctx,dj,NULL) < 0)
if ( !(aux = strrchr(address_override, ':')) )
{
- edg_wll_SetError(ctx, EINVAL, "Addres overrirde not in format host:port");
+ edg_wll_SetError(ctx, EINVAL, "Addres override not in format host:port");
goto cleanup;
}
if ( !strncmp(address_override, "0.0.0.0", aux-address_override) ||
"values ('%|Ss','%|Ss',%s,'%|Ss', '<and>%|Ss</and>', '%d')",
nid_s, addr_s? addr_s: address_override, time_s, owner, xml_conds, flags);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 )
goto rollback;
trio_asprintf(&q,
"insert into notif_jobs(notifid,jobid) values ('%|Ss','%|Ss')",
nid_s, jobs[i]);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 )
goto rollback;
else {
trio_asprintf(&q,"insert into notif_jobs(notifid,jobid) values ('%|Ss','%|Ss')",
nid_s,NOTIF_ALL_JOBS);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 ) goto rollback;
if ( !(aux = strrchr(address_override, ':')) )
{
- edg_wll_SetError(ctx, EINVAL, "Addres overrirde not in format host:port");
+ edg_wll_SetError(ctx, EINVAL, "Addres override not in format host:port");
goto rollback;
}
if ( !strncmp(address_override, "0.0.0.0", aux-address_override) ||
/* Format DB insert statement
*/
trio_asprintf(&q, "delete from notif_jobs where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 )
goto rollback;
trio_asprintf(&q,
"insert into notif_jobs(notifid,jobid) values ('%|Ss','%|Ss')",
nid_s, jobs[i]);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 )
{
/* XXX: Remove uncoplete registration?
*/
free(q);
trio_asprintf(&q, "delete from notif_jobs where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
edg_wll_ExecSQL(ctx, q, NULL);
free(q);
trio_asprintf(&q,"delete from notif_registrations where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
edg_wll_ExecSQL(ctx, q, NULL);
goto rollback;
}
}
can_peername = edg_wll_gss_normalize_subj(ctx->peerName, 0);
trio_asprintf(&q, "select userid from users where cert_subj='%|Ss'", can_peername);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, &stmt) < 0 )
goto cleanup;
free(q);
trio_asprintf(&q, "insert into users(userid,cert_subj) values ('%|Ss','%|Ss')",
userid, can_peername);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if ( edg_wll_ExecSQL(ctx, q, NULL) < 0 )
{
if ( edg_wll_Error(ctx,NULL,NULL) != EEXIST )
"select destination from notif_registrations "
"where notifid='%|Ss' and userid='%|Ss' FOR UPDATE",
nid_s, user);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ( (ret = edg_wll_ExecSQL(ctx, stmt, &s)) < 0 )
goto cleanup;
free(stmt);
trio_asprintf(&stmt,
"select notifid from notif_registrations where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
stmt);
ret = edg_wll_ExecSQL(ctx, stmt, NULL);
if ( ret == 0 )
trio_asprintf(&aux, "%s where notifid='%|Ss'", stmt, nid_s);
free(stmt);
stmt = aux;
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ( (ret = edg_wll_ExecSQL(ctx, stmt, NULL)) < 0 )
goto cleanup;
free(stmt);
trio_asprintf(&stmt,
"select notifid from notif_registrations where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
ret = edg_wll_ExecSQL(ctx, stmt, NULL);
if ( ret == 0 )
edg_wll_SetError(ctx, ENOENT, "Unknown notification ID");
goto rollback;
trio_asprintf(&stmt, "delete from notif_registrations where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ( edg_wll_ExecSQL(ctx, stmt, NULL) < 0 )
goto rollback;
free(stmt);
trio_asprintf(&stmt, "delete from notif_jobs where notifid='%|Ss'", nid_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ( edg_wll_ExecSQL(ctx, stmt, NULL) < 0 )
goto rollback;
edg_wll_NotifCancelRegId(ctx, nid);
}
trio_asprintf(&q, "select notifid from notif_registrations WHERE notifid='%|Ss' AND valid < %s", nid_s, time_s);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if ( (ret = edg_wll_ExecSQL(ctx, q, NULL)) < 0 )
goto cleanup;
else if ( !q )
q = qbase;
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
q);
ret = edg_wll_ExecSQL(ctx, q, &sh);
if ( limit )
else if ( !q )
q = qbase;
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG,
q);
ret = edg_wll_ExecSQL(ctx, q, &sh);
if ( limit )
"(s.suffix_id = j.suffix_id) AND (p.prefix_id = j.prefix_id)) AS result "
"WHERE %s", zomb_where);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, zquery);
j = edg_wll_ExecSQL(ctx,zquery,&sh);
if ( stmt == NULL ) return edg_wll_SetError(ctx, ENOMEM, NULL);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if ( (nstates = edg_wll_ExecSQL(ctx, stmt, &sh)) < 0 ) goto cleanup;
if ( nstates == 0 ) {
trio_asprintf(&stmt,"select value from server_state "
"where prefix = 'https://%|Ss:%d' and name = '%|Ss'",
ctx->srvName,ctx->srvPort,name);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
switch (edg_wll_ExecSQL(ctx,stmt,&q)) {
case 0: edg_wll_SetError(ctx,ENOENT,name); break;
trio_asprintf(&stmt,"insert into server_state (prefix,name,value) "
"values ('https://%|Ss:%d','%|Ss','%|Ss')",
ctx->srvName,ctx->srvPort,name,val);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
switch(edg_wll_ExecSQL(ctx,stmt,NULL)) {
case 1: break;
"where prefix = 'https://%|Ss:%d' "
"and name = '%|Ss'",
val,ctx->srvName,ctx->srvPort,name);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB,
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB,
LOG_PRIORITY_DEBUG, stmt);
edg_wll_ExecSQL(ctx,stmt,NULL);
}
purge_ctx_t prg;
struct _edg_wll_GssPrincipal_data princ;
+ memset(&princ, 0, sizeof princ);
princ.name = ctx->peerName;
princ.fqans = ctx->fqans;
if ( purge )
{
trio_asprintf(&stmt,"delete from jobs where jobid = '%|Ss'",dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto rollback;
free(stmt); stmt = NULL;
trio_asprintf(&stmt,"delete from states where jobid = '%|Ss'",dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto rollback;
free(stmt); stmt = NULL;
trio_asprintf(&stmt,"delete from status_tags where jobid = '%|Ss'",dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto rollback;
free(stmt); stmt = NULL;
}
// See if that prefix is already stored in the database
trio_asprintf(&stmt,"select prefix_id from zombie_prefixes where prefix = '%|Ss'", prefix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
sql_retval = edg_wll_ExecSQL(ctx,stmt,&q);
free(stmt); stmt = NULL;
glite_lbu_FreeStmt(&q);
trio_asprintf(&stmt,"insert into zombie_prefixes (prefix) VALUES ('%|Ss')", prefix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) <= 0) goto rollback;
// The record should exist now, however we need to look up the prefix_id
trio_asprintf(&stmt,"select prefix_id from zombie_prefixes where prefix = '%|Ss'", prefix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) <= 0) goto rollback;
free(stmt); stmt = NULL;
// See if that suffix is already stored in the database
trio_asprintf(&stmt,"select suffix_id from zombie_suffixes where suffix = '%|Ss'", suffix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
sql_retval = edg_wll_ExecSQL(ctx,stmt,&q);
free(stmt); stmt = NULL;
glite_lbu_FreeStmt(&q);
trio_asprintf(&stmt,"insert into zombie_suffixes (suffix) VALUES ('%|Ss')", suffix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) <= 0) goto rollback;
// The record should exist now, however we need to look up the suffix_id
trio_asprintf(&stmt,"select suffix_id from zombie_suffixes where suffix = '%|Ss'", suffix);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) <= 0) goto rollback;
free(stmt); stmt = NULL;
trio_asprintf(&stmt,"insert into zombie_jobs (jobid, prefix_id, suffix_id)"
" VALUES ('%|Ss', '%|Ss', '%|Ss')", root, prefix_id, suffix_id);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) < 0) {
if (edg_wll_Error(ctx, NULL, NULL) == EEXIST) {
"where jobid='%|Ss' "
"order by event", dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&q) < 0) goto rollback;
free(stmt); stmt = NULL;
dbjob = glite_jobid_getUnique(job);
trio_asprintf(&stmt,"update jobs set proxy='0' where jobid='%|Ss'", dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
free(dbjob);
return(edg_wll_ExecSQL(ctx,stmt,NULL));
dbjob = glite_jobid_getUnique(job);
trio_asprintf(&stmt,"update jobs set server='0' where jobid='%|Ss'", dbjob);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
free(dbjob);
return(edg_wll_ExecSQL(ctx,stmt,NULL));
{ 10, 60 },
{ 60, 30 },
{ 900, 12 },
+ { 3600, 168 },
{ 0, 0 }
};
{ STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_RUNNING, 0, default_archives },
{ STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_DONE, EDG_WLL_STAT_OK, default_archives },
{ STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SUBMITTED, EDG_WLL_JOB_DONE, EDG_WLL_STAT_FAILED, default_archives },
+ { STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_SCHEDULED, EDG_WLL_JOB_RUNNING, 0, default_archives },
{ STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_RUNNING, EDG_WLL_JOB_DONE, EDG_WLL_STAT_OK, default_archives },
{ STATS_DURATION_FROMTO, default_group, EDG_WLL_JOB_RUNNING, EDG_WLL_JOB_DONE, EDG_WLL_STAT_FAILED, default_archives },
{ STATS_UNDEF, }
((char *) stats->map) + stats->grpsize * i
);
search.key = strdup(g->sig);
- search.data = (void*)g;
+ search.data = (void*)((long)i);
if (! hsearch_r(search, ENTER, &found, stats->htab)){
glite_common_log(LOG_CATEGORY_LB_SERVER,
LOG_PRIORITY_WARN,
g = (struct edg_wll_stats_group *) (
((char *) stats->map) + stats->grpsize * i );
search.key = strdup(g->sig);
- search.data = (void*)g;
+ search.data = (void*)((long)i);
if (!hsearch_r(search, ENTER, &found, stats->htab)){
/* This should never happen */
glite_common_log(LOG_CATEGORY_LB_SERVER,
search.key = sig;
hsearch_r(search, FIND, &found, stats->htab);
if (found && strcmp(sig, found->key) == 0)
- *g = (struct edg_wll_stats_group*)found->data;
+ *g = (struct edg_wll_stats_group *) (
+ ((char *) stats->map) + stats->grpsize * (long)found->data);
else
*g = NULL;
}
struct edg_wll_stats_archive *a;
ENTRY search, *found;
+ //asprintf(&(jobstat->destination), "fake destination %i", rand()%10);
sig = str2md5base64(jobstat->destination);
stats_search_existing_group(stats, g, sig);
stats_double_htable(stats);
if (stats->htab){
search.key = strdup(sig);
- search.data = (void*)(*g);
+ search.data = (void*)((long)(stats->grpno-1));
if (!hsearch_r(search, ENTER, &found, stats->htab)){
/* This should never happen */
glite_common_log(LOG_CATEGORY_LB_SERVER,
time_t base = to->stateEnterTimes[stats->base_state+1];
time_t final = to->stateEnterTimes[stats->final_state+1];
time_t timedif = final-base;
- if (base && final){ /* final should be always not null*/
+ if (base && final && (final > base)){ /* final should be always not null*/
a = g->archive;
for (i=0; stats->archives[i].interval; i++) {
glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
"search %ld in %ld, %ld", *from, afrom, afrom+i);
+ diff = 0.0f;
+
// (from, to) is inside (afrom, afrom+i)
if (*from >= afrom && *to < afrom+i) {
diff = *to - *from;
*rate += c->cnt * (float)diff/i;
if (*to >= afrom && *to < afrom+i) {
- glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %d, rate %f", match, *rate);
+ glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %ld, rate %f", match, *rate);
break;
}
}
{
edg_wll_Stats *stats = default_stats; /* XXX: hardcoded */
struct edg_wll_stats_group *g;
- int i;
+ int i, shift;
char *sig = NULL;
int err;
}
if ((err = stateRateRequest(ctx, stats, g, from, to, &((*rates)[0]), res_from, res_to))){
- free(*rates);
- free(*groups);
+ free(*rates); *rates = NULL;
+ free(*groups); *groups = NULL;
goto cleanup;
}
(*groups)[0] = strdup(g->destination);
/* all groups */
*rates = (float*)malloc(stats->grpno * sizeof((*rates)[0]));
*groups = (char**)malloc((stats->grpno+1) * sizeof((*groups)[0]));
+ shift = 0;
for (i=0, g=stats->map; i<stats->grpno; i++) {
- (*rates)[i] = 0;
- (*groups)[i] = NULL;
- if ((err = stateRateRequest(ctx, stats, g, from, to, &((*rates)[i]), res_from, res_to)))
- continue; //TODO in fact breaks results here
- (*groups)[i] = strdup(g->destination);
+ (*rates)[i-shift] = 0;
+ (*groups)[i-shift] = NULL;
+ if ((err = stateRateRequest(ctx, stats, g, from, to, &((*rates)[i-shift]), res_from, res_to))){
+ shift++;
+ g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
+ continue;
+ }
+ (*groups)[i-shift] = strdup(g->destination);
g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
}
- (*groups)[i] = NULL;
+ (*groups)[i-shift] = NULL;
if (i == 0){
edg_wll_SetError(ctx,ENOENT,"no matching group");
free(*rates); *rates = NULL;
free(*groups); *groups = NULL;
goto cleanup;
}
+ else
+ edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked
}
cleanup:
glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG,
"search %ld in %ld, %ld", *from, afrom, afrom+i);
+ diff = 0.0f;
+
// (from, to) is inside (afrom, afrom+i)
if (*from >= afrom && *to < afrom+i) {
diff = *to - *from;
*dispersion += (float)diff * c->value2;
if (*to >= afrom && *to < afrom+i) {
- glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %d, duration %f, dispersion %f", match, *duration, *dispersion);
+ glite_common_log(LOG_CATEGORY_LB_SERVER, LOG_PRIORITY_DEBUG, "matched to: match %ld, duration %f, dispersion %f", match, *duration, *dispersion);
break;
}
}
struct edg_wll_stats_group *g;
char *sig = NULL;
int err;
- int i;
+ int i, shift;
edg_wll_ResetError(ctx);
*durations = NULL;
}
if ((err = stateDurationFromToRequest(ctx, stats, g, from, to, &((*durations)[0]), &((*dispersions)[0]), res_from, res_to))){
- free(*durations);
- free(*dispersions);
- free(*groups);
+ free(*durations); *durations = NULL;
+ free(*dispersions); *dispersions = NULL;
+ free(*groups); *groups = NULL;
goto cleanup;
}
(*groups)[0] = strdup(g->destination);
*durations = (float*)malloc(stats->grpno * sizeof((*durations)[0]));
*dispersions = (float*)malloc(stats->grpno * sizeof((*dispersions)[0]));
*groups = (char**)malloc((stats->grpno+1) * sizeof((*groups)[0]));
+ shift = 0;
for (i=0, g=stats->map; i<stats->grpno; i++) {
- (*durations)[i] = 0;
- (*dispersions)[i] = 0;
- (*groups)[i] = NULL;
- if ((err = stateDurationFromToRequest(ctx, stats, g, from, to, &((*durations)[i]), &((*dispersions)[i]), res_from, res_to)))
- continue; //TODO in fact breaks results here
- (*groups)[i] = strdup(g->destination);
+ (*durations)[i-shift] = 0;
+ (*dispersions)[i-shift] = 0;
+ (*groups)[i-shift] = NULL;
+ if ((err = stateDurationFromToRequest(ctx, stats, g, from, to, &((*durations)[i-shift]), &((*dispersions)[i-shift]), res_from, res_to))){
+ shift++;
+ g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
+ continue;
+ }
+ (*groups)[i-shift] = strdup(g->destination);
g = (struct edg_wll_stats_group *) (((char *) g) + stats->grpsize);
}
- (*groups)[i] = NULL;
+ (*groups)[i-shift] = NULL;
if (i == 0){
edg_wll_SetError(ctx,ENOENT,"no matching group");
free(*durations); *durations = NULL;
free(*groups); *groups = NULL;
goto cleanup;
}
+ else
+ edg_wll_ResetError(ctx); // reset error comming from stateDurationFromToRequest, some of them has worked
}
cleanup:
}
trio_asprintf(&stmt,"select userid from jobs where jobid='%|Ss'", jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0 || edg_wll_FetchRow(ctx,sh,1,NULL,&userid) < 0) goto clean;
if (sh) glite_lbu_FreeStmt(&sh);
ssrc,e->any.host,
stamp,e->any.timestamp.tv_usec,
e->any.level,userid, e->any.seqcode);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0) goto clean;
nr = edg_wll_FetchRow(ctx,sh,1,NULL,&dummy);
trio_asprintf(&stmt,
"select nevents from jobs "
"where jobid = '%|Ss'",jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0 ||
edg_wll_FetchRow(ctx,sh,1,NULL,&max) < 0) goto clean;
ssrc,e->any.host,
stamp,e->any.timestamp.tv_usec,
now_s, e->any.level,userid, e->any.seqcode);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto clean;
free(stmt); stmt = NULL;
trio_asprintf(&stmt,
"update jobs set nevents='%d'"
"where jobid = '%|Ss'", next+1, jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) goto clean;
free(stmt); stmt = NULL;
trio_asprintf(&stmt,"insert into users(userid,cert_subj) "
"values ('%|Ss','%|Ss')",userid,subj);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) {
if (edg_wll_Error(ctx,NULL,NULL) == EEXIST)
trio_asprintf(&stmt,"insert into jobs(jobid,dg_jobid,userid,proxy,server,grey) "
"values ('%|Ss','%|Ss','%|Ss', '%|Sd', '%|Sd', '%|Sd')",jobid,jobstr,userid,proxy,server,grey);
}
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) {
if (edg_wll_Error(ctx,NULL,NULL) == EEXIST && !update)
trio_asprintf(&q,"select proxy,server,grey from jobs where jobid='%|Ss' for update", unique);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
nar = edg_wll_ExecSQL(ctx,q,&stmt);
free(q); q = NULL;
{
trio_asprintf(&q,"select u.cert_subj from jobs j, users u "
"where j.jobid='%|Ss' and u.userid=j.userid",unique);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx,q,&stmt) < 0
|| edg_wll_FetchRow(ctx,stmt,1,NULL,&owner) < 0
if ( (!strcmp(res[0],"0") && ctx->isProxy) || (!strcmp(res[1],"0") && !ctx->isProxy) ) {
trio_asprintf(&q,"update jobs set server='1', proxy='1' where jobid='%|Ss'",
unique);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx,q,NULL) < 0) goto err;
free(q); q = NULL;
}
"values ('%|Ss',%d,'%|Ss','%|Ss')",
strlen(f[i].val) <= SHORT_LEN ? "short_fields" : "long_fields",
jobid,no,f[i].key,f[i].val);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) err = edg_wll_Error(ctx,NULL,NULL);
free(stmt);
trio_asprintf(&stmt,"insert into short_fields(jobid,event,name,value) "
"values ('%|Ss',%d,'SRC_INSTANCE','%|Ss')",
jobid,no,e->any.src_instance);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) err = edg_wll_Error(ctx,NULL,NULL);
free(stmt);
#else
if (!ulm) ulm = edg_wll_UnparseEvent(ctx, e);
trio_asprintf(&stmt, "insert into events_flesh (jobid, event, ulm) values ('%|Ss', %d, '%|Ss')", jobid, no, ulm);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,NULL) < 0) err = edg_wll_Error(ctx,NULL,NULL);
#endif
trio_asprintf(&q,"select u.cert_subj from jobs j, users u "
"where j.jobid='%|Ss' and u.userid=j.userid",jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx,q,&stmt) < 0
|| edg_wll_FetchRow(ctx,stmt,1,NULL,&owner) < 0
/* get userid of parent job */
jobid = edg_wlc_JobIdGetUnique(e->jobId);
trio_asprintf(&stmt,"select userid from jobs where jobid='%|Ss'", jobid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
if (edg_wll_ExecSQL(ctx,stmt,&sh) < 0 || edg_wll_FetchRow(ctx,sh,1,NULL,&userid) < 0) goto err;
trio_asprintf(&stmt,
"delete from short_fields where jobid='%|Ss' and event=%d",
jobid,event);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
edg_wll_ExecSQL(ctx,stmt,NULL);
free(stmt);
trio_asprintf(&stmt,
"delete from long_fields where jobid='%|Ss' and event=%d",
jobid,event);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
edg_wll_ExecSQL(ctx,stmt,NULL);
free(stmt);
trio_asprintf(&stmt,
"delete from events_flesh where jobid='%|Ss' and event=%d",
jobid,event);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
edg_wll_ExecSQL(ctx,stmt,NULL);
free(stmt);
trio_asprintf(&stmt,
"delete from events where jobid='%|Ss' and event=%d",
jobid,event);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
edg_wll_ExecSQL(ctx,stmt,NULL);
free (stmt);
if (sink_mode == GLITE_LB_SINK_PARSE) glite_wll_perftest_consumeEventIlMsg(buf);
else
#endif
- {
- glite_common_log(LOG_CATEGORY_LB_SERVER_REQUEST, LOG_PRIORITY_DEBUG,buf);
- handle_il_message(ctx, buf);
- }
+ {
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_REQUEST, LOG_PRIORITY_DEBUG, buf);
+ handle_il_message(ctx, buf);
+ }
free(buf);
if ( (len = create_reply(ctx, &buf)) > 0 ) {
free(can_peername);
trio_asprintf(&stmt,"select cert_subj from users where userid = '%|Ss'",userid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
switch (edg_wll_ExecSQL(ctx,stmt,&sth)) {
case 0: edg_wll_SetError(ctx,ENOENT,ctx->peerName);
free(res); res = NULL;
trio_asprintf(&stmt,"select dg_jobid from jobs where userid = '%|Ss' and grey='0'",userid);
- glite_common_log(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, stmt);
switch (njobs = edg_wll_ExecSQL(ctx,stmt,&sth)) {
case 0: edg_wll_SetError(ctx,ENOENT,ctx->peerName);
case -1: goto err;
SUFFIXES = .T
+ifneq (${classads_prefix},/usr)
+ classadslib := -L${classads_prefix}/${libdir} -L${classads_prefix}/lib
+endif
+ifneq (${expat_prefix},/usr)
+ expatlib := -L${expat_prefix}/${libdir} -L${expat_prefix}/lib
+endif
+CLASSADS_CFLAGS?=-I${classads_prefix}/include -I${classads_prefix}/include/classad
+CLASSADS_LIBS?=${classadslib} -lclassad
+EXPAT_CFLAGS?=
+EXPAT_LIBS?=${expatlib} -lexpat
+
DEBUG:=-g -O0 -Wall
CFLAGS:= ${CFLAGS} \
${DEBUG} \
- -I${classads_prefix}/include -I${classads_prefix}/include/classad \
+ ${CLASSADS_CFLAGS} \
-I${stagedir}/include -I${top_srcdir}/src -I. \
-I${top_srcdir}/interface
LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS}
XSLTPROC:=xsltproc --novalid
-ifneq (${classads_prefix},/usr)
- classadslib := -L${classads_prefix}/${libdir} -L${classads_prefix}/lib
+ifeq (${thrflavour},)
+default_flavour=
+else
+default_flavour=_${nothrflavour}
endif
-
-classadslib := ${classadslib} -lclassad
-
-EXT_LIBS:=
-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\
+COMMON_LIBS:= -L${stagedir}/${libdir} -lglite_lb_common${default_flavour} -lglite_security_gss${defaultflavour}
+PLUGIN_LIBS:= -L${stagedir}/${libdir} -lglite_lb_common${default_flavour} \
+ ${CLASSADS_LIBS} -lstdc++ ${EXPAT_LIBS}
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
MACHINE_OBJS:=seqcode_aux.o process_event.o process_event_pbs.o process_event_condor.o process_event_cream.o process_event_file_transfer.o process_event_file_transfer_collection.o
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.1.2-2
- Module rebuilt
+1.1.3-1
+- Makefile adopts compilation and linking flags from the environment.
+
+1.1.3-2
+- Module rebuilt
+
+1.1.4-1
+- Makefile, configuration and header includes updated to work across org.glite & EMI
+
+1.1.4-2
+- Module rebuilt
+
# $Header$
-module.version=1.1.2
+module.version=1.1.4
module.age=2
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.1.2-2
- Module rebuilt
+1.1.3-1
+- Fixed toString perl method for logsrc (duplicated line)
+
+1.1.3-2
+- Module rebuilt
+
+1.1.4-1
+- Configure updated to work across org.glite & EMI
+
# $Header$
-module.version=1.1.2
-module.age=2
+module.version=1.1.4
+module.age=1
notifid=>'qq{$dst = edg_wll_NotifIdUnparse($src);}',
# level=>'qq{$dst = edg_wll_LevelToString($src);}',
logsrc=>'qq{$dst = edg_wll_SourceToString($src);}',
- logsrc=>'qq{$dst = edg_wll_StringToSource($src);}',
cclassad=>'qq{$dst = NULL;}',
# strlist, intlist, stslist are used only in consumer API, they don't need toString method
}
version=0.0.0
PREFIX=/opt/glite
-nothrflavour=gcc32
-thrflavour=gcc32pthr
expat_prefix=/opt/expat
gsoap_prefix=/opt/gsoap
DEBUG:=-g -O0 -Wall
+ifneq (${expat_prefix},/usr)
+ expatlib := -L${expat_prefix}/${libdir} -L${expat_prefix}/lib
+endif
+EXPAT_CFLAGS?=-I${expat_prefix}/include
+EXPAT_LIB?=${expatlib} -lexpat
+GSOAP_CFLAGS?=-I${gsoap_prefix}/include -I${gsoap_prefix}/
+
CFLAGS:= ${CFLAGS} \
${WS_CFLAGS} ${DEBUG} \
-DVERSION=\"${version}\" \
-I${stagedir}/include -I${top_srcdir}/src -I. \
-I${top_srcdir}/interface \
- -I${expat_prefix}/include \
- -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
+ ${EXPAT_CFLAGS} \
+ ${GSOAP_CFLAGS} \
${COVERAGE_FLAGS} \
-D_GNU_SOURCE
LDFLAGS:=${LDFLAGS} -L${stagedir}/${libdir}
LINKXX:=libtool --mode=link ${CXX} -rpath ${stagedir}/${libdir} ${LDFLAGS}
XSLTPROC:=xsltproc --novalid
-ifneq (${expat_prefix},/usr)
- expatlib := -L${expat_prefix}/${libdir} -L${expat_prefix}/lib
-endif
+EXT_LIBS:= ${EXPAT_LIBS}
-EXT_LIBS:= \
- ${expatlib} -lexpat
+ifeq (${thrflavour},)
+COMMON_LIB:=-lglite_lb_common
+CLIENT_LIB:=-lglite_lb_client
+PLUS_LIB:=-lglite_lb_clientpp
+JP_LIBS:=-lglite_jp_common
+else
COMMON_LIB:=-lglite_lb_common_${nothrflavour}
CLIENT_LIB:=-lglite_lb_client_${nothrflavour}
PLUS_LIB:=-lglite_lb_clientpp_${nothrflavour}
JP_LIBS:=-lglite_jp_common_${nothrflavour}
+endif
UTILS:=mon purge dump load dump_exporter
ALLUTILS:=${UTILS} state_history statistics
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.6-1
- Hostname parsing adjusted to handle IPv6 addresses
+2.0.7-1
+- Makefile adopts compilation and linking flags from the environment.
+
+2.0.7-2
+- Module rebuilt
+
+2.0.8-1
+- Makefile a configuration updated to work across org.glite & EMI
+
# $Header$
-module.version=2.0.6
+module.version=2.0.8
module.age=1
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
3.1.2-2
- Module rebuilt
+3.1.2-3
+- Module rebuilt
+
+3.1.2-4
+- Module rebuilt
+
# $Header$
module.version=3.1.2
-module.age=2
+module.age=4
glite_location=/opt/glite
globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
expat_prefix=/opt/expat
cares_prefix=/opt/c-ares
gsoap_prefix=/opt/gsoap
default all: ${CEXAMPLES}
+GLOBUS_GSSAPI_GSI_CFLAGS?=-I${globus_prefix}/include/${nothrflavour}
+
+ifeq (${thrflavour},)
+default_flavour=
+else
+default_flavour=_${nothrflavour}
+endif
+
VPATH=${top_srcdir}/examples
CC=gcc
DEBUG:=-g -O0 -Wall
CFLAGS:=${CFLAGS} -I${gsoap_prefix}/include -I${gsoap_prefix}/ \
-I${stagedir}/include -I${top_srcdir}/src -I. \
- -I${globus_prefix}/include/${nothrflavour} \
+ ${GLOBUS_GSSAPI_GSI_CFLAGS} \
${DEBUG}
COMPILE:=libtool --mode=compile ${CC} ${CFLAGS}
GSOAP_FILES_PREFIX:= bk_ws_
dotless_gsoap_ver:=${shell echo ${gsoap_default_version} | tr -d . }
-ifeq ($(shell test -f ${stagedir}/${libdir}/libglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}_c.so && echo ok),ok)
+ifeq ($(shell test -f ${stagedir}/${libdir}/libglite_security_gsoap_plugin_${dotless_gsoap_ver}${default_flavour}_c.so && echo ok),ok)
langflavour:=_c
endif
-GSOAP_LIB:=-L${stagedir}/${libdir} -lglite_security_gsoap_plugin_${dotless_gsoap_ver}_${nothrflavour}${langflavour}
+GSOAP_LIB:=-L${stagedir}/${libdir} -lglite_security_gsoap_plugin_${dotless_gsoap_ver}${default_flavour}${langflavour}
WS_CLIENT_OBJS:= $(GSOAP_FILES_PREFIX)C.o $(GSOAP_FILES_PREFIX)Client.o ws_fault.o
# ws_typeref.o
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.1.3-2
- Module rebuilt
+1.1.4-1
+- Makefile adopts compilation and linking flags from the environment.
+
+1.1.4-2
+- Module rebuilt
+
+1.1.5-1
+- Makefile a configuration updated to work across org.glite & EMI
+
+1.1.5-2
+- Module rebuilt
+
# : /cvs/jra1mw/org.glite.lb.ws-test/project/version.properties,v 1.1 2009/01/15 15:49:26 zsustr Exp $
-module.version=1.1.3
+module.version=1.1.5
module.age=2
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
if ($TMPDIR eq "") {$TMPDIR="/tmp";}
-getopts('c:h');
+getopts('c:p:h');
$module = shift;
usage: $0 [-c <current configuration>] module.name
-c Use this configuration (\d+\.\d+\.\d+-\S+) rather than parsing version.properties
+ -p Specify project ("org.glite" / "emi"). Default: autodetect.
-h Display this help
};
$current_tag="$current_prefix" . "$current_major" . "_$current_minor" . "_$current_revision" . "_$current_age";
}
+ if (defined $opt_p) {
+ $project=$opt_p;
+ if (($project ne "emi")&&($project ne "org.glite")) {die "Only projects \"emi\" or \"org.glite\" are recognized";}
+ }
+ else {
+ system("etics-list-configuration > $TMPDIR/etics-tag-proj_configs.$$.tmp");
+
+ if ( !system("grep -x \"org.glite.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "org.glite"; }
+ else {
+ if ( !system("grep -x \"emi.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "emi"; }
+ else { die "Unable to autodetect project. Run from workspace root or specify by -p" }
+ }
+
+ system("rm $TMPDIR/etics-tag-proj_configs.$$.tmp");
+ }
+
+ if ($project eq "emi") { $proj_opt = " --emi"; $proj_suffix = "emi" }
+ else { $proj_opt = ""; }
+
+
# According to the documentation, symbolic names in the 'cvs log' output are sorted by age so this should be OK
#$current_tag=`cvs log -h $module/Makefile | grep \"_R_\" | head -n 1`;
#$current_tag=~s/^\s//;
$newconfig="$module_$module" . "_R_$major" . "_$minor" . "_$revision" . "_$age";
$newconfig=~s/^org.//;
$newconfig=~s/\./-/g;
+ if ( $project eq "emi" ) { $newconfig=~s/^glite/emi/; }
+ $moduleName=$module;
+ if ( $project eq "emi" ) { $moduleName=~s/^org.glite/emi/; }
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 = $age\ntag = $tag\nversion = $major.$minor.$revision\npath = None\n\n");
+ printf (NEWCONF "[Configuration-$newconfig]\nprofile = None\nmoduleName = $moduleName\ndisplayName = $newconfig\ndescription = None\nprojectName = $project\nage = $age$proj_suffix\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");
$modconfig="$m_$m" . "_R_$m_major" . "_$m_minor" . "_$m_revision" . "_$m_age";
$modconfig=~s/^org.//;
$modconfig=~s/\./-/g;
+ if ( $project eq "emi" ) { $modconfig=~s/^glite/emi/; }
# system("echo $m = $modconfig >> $TMPDIR/$newconfig.ini.$$");
printf(NEWCONF "$m = $modconfig\n");
if ($TMPDIR eq "") {$TMPDIR="/tmp";}
-getopts('i:c:m:gh');
+getopts('i:c:m:p:gh');
$module = shift;
-g Generate old configuration for comparison
-c Use this configuration (\d+\.\d+\.\d+-\S+) rather than parsing version.properties
-m Use this as a CVS commit message instead of the script's default.
+ -p Specify project ("org.glite" / "emi"). Default: autodetect.
-h Display this help
};
case "none" {$increment="n"}
else {$increment=$opt_i};
}
-
+
if (defined $opt_c) {
$current_tag="$current_prefix" . "$current_major" . "_$current_minor" . "_$current_revision" . "_$current_age";
}
+ if (defined $opt_p) {
+ $project=$opt_p;
+ if (($project ne "emi")&&($project ne "org.glite")) {die "Only projects \"emi\" or \"org.glite\" are recognized";}
+ }
+ else {
+ system("etics-list-configuration > $TMPDIR/etics-tag-proj_configs.$$.tmp");
+
+ if ( !system("grep -x \"org.glite.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "org.glite"; }
+ else {
+ if ( !system("grep -x \"emi.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "emi"; }
+ else { die "Unable to autodetect project. Run from workspace root or specify by -p" }
+ }
+
+ system("rm $TMPDIR/etics-tag-proj_configs.$$.tmp");
+ }
+
+ if ($project eq "emi") { $proj_opt = " --emi"; }
+ else { $proj_opt = ""; }
+
# According to the documentation, symbolic names in the 'cvs log' output are sorted by age so this should be OK
#$current_tag=`cvs log -h $module/Makefile | grep \"_R_\" | head -n 1`;
#$current_tag=~s/^\s//;
if (-r "$module/project/ChangeLog") { # ChangeLog exists (where expected). Proceed.
$tmpChangeLog="$TMPDIR/$module.ChangeLog.$$";
+ if ( $project eq "emi" ) { $tmpChangeLog=~s/org\.glite/emi/; }
system("cp $module/project/ChangeLog $tmpChangeLog");
$newconfig="$module_$module" . "_R_$major" . "_$minor" . "_$revision" . "_$age";
$newconfig=~s/^org.//;
$newconfig=~s/\./-/g;
+ if ( $project eq "emi" ) { $newconfig=~s/^glite/emi/; }
+
$module=~/([^\.]+?)\.([^\.]+?)$/;
$subsysname=$1;
$modulename=$2;
- printf("Module=$module\nname=$modulename\nsubsys=$subsysname\n");
- system("$GLITE_LB_LOCATION/configure --mode=etics --module $subsysname.$modulename --output $TMPDIR/$newconfig.ini.$$ --version $major.$minor.$revision-$age");
+ printf("Project=$project\nModule=$module\nname=$modulename\nsubsys=$subsysname\n");
+ system("$GLITE_LB_LOCATION/configure --mode=etics --module $subsysname.$modulename --output $TMPDIR/$newconfig.ini.$$ --version $major.$minor.$revision-$age $proj_opt");
# printf("\nCurrent configuration:\t$currentconfig\nNew configuration:\t$newconfig\n\nPreparing...\n");
#
# close(NEWCONF);
if ($increment eq "n") { # There was no version change and the configuration should already exist
- printf(EXEC "\n#Add new configuration\netics-configuration modify -i $TMPDIR/$newconfig.ini.$$ -c $newconfig $module\n"); }
+ printf(EXEC "\n#Modify new configuration\netics-configuration modify -i $TMPDIR/$newconfig.ini.$$\n"); }
else { # New configuration needs to be created
- printf(EXEC "\n#Add new configuration\netics-configuration add -i $TMPDIR/$newconfig.ini.$$ -c $newconfig $module\n"); }
+ printf(EXEC "\n#Add new configuration\netics-configuration add -i $TMPDIR/$newconfig.ini.$$\n"); }
printf(EXEC "etics-commit\n");
# : /cvs/glite/org.glite.lb/project/version.properties,v 1.164 2008/01/09 15:35:55 mmulac Exp $
-module.version=2.1.13
-module.age=1
+module.version=2.1.17
+module.age=2
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.4-2
- Module rebuilt
+2.0.4-3
+- Module rebuilt
+
: /cvs/jra1mw/org.glite.lbjp-common.db/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
module.version=2.0.4
-module.age=2
+module.age=3
Key_name = Seq_in_index = Column_name = Sub_part = -1;
asprintf(&sql, "show index from %s", table);
- glite_common_log(ctx_gen->log_category, LOG_PRIORITY_DEBUG, sql);
+ glite_common_log_msg(ctx_gen->log_category, LOG_PRIORITY_DEBUG, sql);
if (glite_lbu_ExecSQLMysql(ctx_gen,sql,&stmt)<0) {
free(sql);
return STATUS(ctx);
glite_lbu_FreeStmtMysql(&stmt);
trio_asprintf(&cmd, "SHOW CREATE TABLE %|Ss", table[0]);
- glite_common_log(ctx->log_category, LOG_PRIORITY_DEBUG, cmd);
+ glite_common_log_msg(ctx->log_category, LOG_PRIORITY_DEBUG, cmd);
if (glite_lbu_ExecSQLMysql(ctx, cmd, &stmt) <= 0 || (retval = glite_lbu_FetchRowMysql(stmt, 2, NULL, res)) < 0 ) goto quit;
if (retval != 2 || strcmp(res[0], table[0])) {
ERR(ctx, EIO, "unexpected show create result");
if (stmt->res) psql_module.PQclear(stmt->res);
if (stmt->name) {
asprintf(&sql, "DEALLOCATE %s", stmt->name);
- glite_common_log(ctx->generic.log_category, LOG_PRIORITY_DEBUG, sql);
+ glite_common_log_msg(ctx->generic.log_category, LOG_PRIORITY_DEBUG, sql);
stmt->res = psql_module.PQexec(ctx->conn, sql);
free(sql);
psql_module.PQclear(stmt->res);
asprintf(&stmt->name, "%s%d", prepared_names[i], ++ctx->prepared_counts[i]);
asprintf(&sqlPrep, "PREPARE %s AS %s", stmt->name, stmt->sql);
- glite_common_log(ctx_gen->log_category, LOG_PRIORITY_DEBUG, sqlPrep);
+ glite_common_log_msg(ctx_gen->log_category, LOG_PRIORITY_DEBUG, sqlPrep);
res = psql_module.PQexec(ctx->conn, sqlPrep);
if (psql_module.PQresultStatus(res) != PGRES_COMMAND_OK) {
asprintf(&s, "error preparing command: %s", psql_module.PQerrorMessage(ctx->conn));
}
if (n) strcat(sql, ")");
- glite_common_log(ctx->generic.log_category, LOG_PRIORITY_DEBUG, sql);
+ glite_common_log_msg(ctx->generic.log_category, LOG_PRIORITY_DEBUG, sql);
stmt->res = psql_module.PQexec(ctx->conn, sql);
status = psql_module.PQresultStatus(stmt->res);
if (status != PGRES_COMMAND_OK && status != PGRES_TUPLES_OK) {
trio_asprintf(&stmt, "insert into %|Ss(%|Ss) values %s;",
bi->table_name, bi->columns, vals);
- glite_common_log(bi->ctx->log_category, LOG_PRIORITY_DEBUG, stmt);
+ glite_common_log_msg(bi->ctx->log_category, LOG_PRIORITY_DEBUG, stmt);
if (glite_lbu_ExecSQL(bi->ctx,stmt,NULL) < 0) {
if (STATUS(bi->ctx) == EEXIST)
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+
+my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
pkg => 'libcares'
},
classads => {
- prefix=> '/opt/classads',
+ prefix=> '/usr',
pkg => 'classads'
},
cppunit => {
prefix=> '/opt/globus',
pkg => 'globus-gssapi-gsi'
},
- myproxy => {
- prefix=> '/opt/myproxy',
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
pkg => 'myproxy'
},
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
gsoap => {
prefix=> '/usr',
pkg => 'gsoap'
postgresql => {
prefix=> '/usr'
}
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/gss gsoap-plugin/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'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,
$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
if ($mode eq 'build') { for my $ext (keys %externs) {
if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
$flag=`pkg-config $pkg --libs`;
$externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
} else {
- print "(using default)\n";
+ print "(using default $externs{$ext}{prefix})\n";
}
}
} }
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
'lb.doc' => [],
'lb.logger' => [ qw/cppunit:B/ ],
+ 'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
'lb.state-machine' => [ qw/classads/ ],
'lb.utils' => [ qw/cppunit:B/ ],
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.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.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
- 'px.proxyrenewal' => [ qw/globus:B myproxy voms/ ],
- 'px.glite-PX' => [qw/myproxy:R fetchcrl:R gip_service:R bdii:R glite_version:R/],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
- 'px.myproxy-config' => [],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
lb.common
lbjp-common.gss
/ ],
+ 'lb.logger-msg' => [ qw/
+ lb.logger
+ / ],
'lb.server' => [ qw/
lb.ws-interface lb.types:B lb.common lb.state-machine
lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.gss' => [ qw// ],
- 'security.gsoap-plugin' => [ qw/security.gss/ ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
'px.proxyrenewal' => [ qw// ],
- 'px.glite-PX' => [qw/px.myproxy-yaim:R/],
- 'px.myproxy-yaim' => [],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
'px.myproxy-config' => [],
);
'lb.yaim' => [ qq/glite-yaim-lb/ ],
'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
- 'px.myproxy-config' => [ qq/myproxy-config/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
'px' => 'org.glite',
);
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
'px' => 'glite-',
);
'jobid' => 'emi-',
'lbjp-common' => 'emi-',
'gridsite' => '',
- 'security' => 'emi-',
'px' => 'emi-',
);
my %aux;
undef %aux;
my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
+lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
glite_info_templates=>'glite-info-templates',
glue_schema=>'glue-schema',
yaim_core=>'org.glite.yaim.core',
+ activemq=>'activemq-cpp-library',
+ apr=>'apr-dev',
+ aprutil=>'aprutil-dev',
+ );
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
);
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
my $conf;
my $conftag;
- my $confprefix;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
- if ($emi) { $confprefix = $emi_conf_prefix{$subsys} }
- else { $confprefix = $conf_prefix{$subsys} }
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
if ($branch) {
$conf = "$confprefix${subsys}-${module}_$branch";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
$cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
-my @nodes = qw/client server logger utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
+
+my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
pkg => 'libcares'
},
classads => {
- prefix=> '/opt/classads',
+ prefix=> '/usr',
pkg => 'classads'
},
cppunit => {
prefix=> '/opt/globus',
pkg => 'globus-gssapi-gsi'
},
- myproxy => {
- prefix=> '/opt/myproxy',
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
pkg => 'myproxy'
},
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
gsoap => {
prefix=> '/usr',
pkg => 'gsoap'
postgresql => {
prefix=> '/usr'
}
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/gss gsoap-plugin/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'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,
$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
if ($mode eq 'build') { for my $ext (keys %externs) {
if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
$flag=`pkg-config $pkg --libs`;
$externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
} else {
- print "(using default)\n";
+ print "(using default $externs{$ext}{prefix})\n";
}
}
} }
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lb.common' => [ qw/expat cares:B cppunit:B classads/ ],
'lb.doc' => [],
'lb.logger' => [ qw/cppunit:B/ ],
+ 'lb.logger-msg' => [ qw/cppunit:B activemq apr aprutil/ ],
'lb.server' => [ qw/globus_essentials:R globus:B expat cares mysql:R mysql-server:R mysql-devel:B cppunit:B gsoap:B classads voms lcas gridsite/ ],
'lb.state-machine' => [ qw/classads/ ],
'lb.utils' => [ qw/cppunit:B/ ],
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.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.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
- 'px.proxyrenewal' => [ qw/globus:B myproxy voms/ ],
- 'px.glite-PX' => [qw/myproxy:R fetchcrl:R gip_service:R bdii:R glite_version:R/],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
- 'px.myproxy-config' => [],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
lb.common
lbjp-common.gss
/ ],
+ 'lb.logger-msg' => [ qw/
+ lb.logger
+ / ],
'lb.server' => [ qw/
lb.ws-interface lb.types:B lb.common lb.state-machine
lbjp-common.db lbjp-common.server-bones lbjp-common.trio lbjp-common.maildir lbjp-common.log
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.gss' => [ qw// ],
- 'security.gsoap-plugin' => [ qw/security.gss/ ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
'px.proxyrenewal' => [ qw// ],
- 'px.glite-PX' => [qw/px.myproxy-yaim:R/],
- 'px.myproxy-yaim' => [],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
'px.myproxy-config' => [],
);
'lb.yaim' => [ qq/glite-yaim-lb/ ],
'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
- 'px.myproxy-config' => [ qq/myproxy-config/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
'px' => 'org.glite',
);
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
'px' => 'glite-',
);
'jobid' => 'emi-',
'lbjp-common' => 'emi-',
'gridsite' => '',
- 'security' => 'emi-',
'px' => 'emi-',
);
my %aux;
undef %aux;
my @m=qw/
-lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
-security.gss security.gsoap-plugin
+lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
+lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
glite_info_templates=>'glite-info-templates',
glue_schema=>'glue-schema',
yaim_core=>'org.glite.yaim.core',
+ activemq=>'activemq-cpp-library',
+ apr=>'apr-dev',
+ aprutil=>'aprutil-dev',
+ );
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
);
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
my $conf;
my $conftag;
- my $confprefix;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
- if ($emi) { $confprefix = $emi_conf_prefix{$subsys} }
- else { $confprefix = $conf_prefix{$subsys} }
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
if ($branch) {
$conf = "$confprefix${subsys}-${module}_$branch";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
$cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
PREFIX=/opt/glite
globus_prefix=/opt/globus
-nothrflavour=gcc32
-thrflavour=gcc32pthr
expat_prefix=/opt/expat
gsoap_prefix=/software/gsoap-2.6
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}/${libdir} -lcppunit -ldl
-TEST_INC:=-I${cppunit_prefix}/include
+CPPUNIT_LIBS?=-L${cppunit_prefix}/${libdir} -lcppunit -ldl
+CPPUNIT_CFLAGS?=-I${cppunit_prefix}/include
+commonlib_nothr:= libglite_jp_common_${nothrflavour}.la
+commonlib_thr:= libglite_jp_common_${thrflavour}.la
+commonlib:= libglite_jp_common.la
+ifeq (${thrflavour},)
+lib_LTLIBRARIES=${commonlib}
+default_commonlib=${commonlib}
+else
+lib_LTLIBRARIES=${commonlib_nothr} ${commonlib_thr}
+default_commonlib=${commonlib_nothr}
+endif
default all: compile
-compile: ${commonlib} ${commonlib_thr}
+compile: ${lib_LTLIBRARIES}
-${commonlib}: ${OBJS}
+${commonlib_nothr}: ${OBJS}
${LINK} -o $@ ${OBJS} ${LIBS}
${commonlib_thr}: ${THROBJS}
${LINK} -o $@ ${THROBJS} ${THRLIBS}
+${commonlib}: ${OBJS}
+ ${LINK} -o $@ ${OBJS} ${LIBS}
+
check: type_test
LD_LIBRARY_PATH=${log4c_prefix}/${libdir}:${log4c_prefix}/lib:${LD_LIBRARY_PATH} ./type_test type_test.xml
type_test: %: %.cpp compile
- ${CXX} -c ${CFLAGS} ${TEST_INC} $<
- ${LINKXX} -o $@ $@.o ${commonlib} ${TEST_LIBS}
+ ${CXX} -c ${CFLAGS} ${CPPUNIT_CFLAGS} $<
+ ${LINKXX} -o $@ $@.o ${default_commonlib} ${CPPUNIT_LIBS}
doc:
-mkdir -p ${PREFIX}/include/${globalprefix}/${jpprefix}
cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${jpprefix}
-mkdir -p ${PREFIX}/${libdir}
- ${INSTALL} -m 755 ${commonlib} ${commonlib_thr} ${PREFIX}/${libdir}
+ ${INSTALL} -m 755 ${lib_LTLIBRARIES} ${PREFIX}/${libdir}
clean:
rm -rvf *.o *.lo .libs lib*
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.2-2
- Module rebuilt
+2.0.3-1
+- Makefile a configuration updated to work across org.glite & EMI
+
#: /cvs/jra1mw/org.glite.lbjp-common.jp-interface/project/version.properties,v 1.1.1.1 2009/01/21 14:43:52 zsustr Exp $
-module.version=2.0.2
-module.age=2
+module.version=2.0.3
+module.age=1
version=${module.version}
CC=gcc
-VPATH=${top_srcdir}/interface:${top_srcdir}/src
+VPATH=${top_srcdir}/interface:${top_srcdir}/src:${top_srcdir}/tests
LOG4C_CFLAGS:=-I${log4c_prefix}/include
LOG4C_LIBS:=-L${log4c_prefix}/${libdir} -L${log4c_prefix}/lib -llog4c
rm -rvf *.o *.lo .libs lib*
rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/ debian/
-check:
+check: test
+ LOG4C_RCPATH=${top_srcdir}/tests ./test
${LTLIB}: ${LOBJS}
${LINK} ${version_info} -o $@ $+ ${LOG4C_LIBS}
+test: test.o
+ ${LINK} -o $@ $+ ${LTLIB} ${LOG4C_LIBS}
+
%.o %.lo: %.c
${COMPILE} -c $<
<log4c version="1.2.1">
<config>
- <bufsize>0</bufsize>
+ <bufsize>1024</bufsize>
<debug level="0"/>
<nocleanup>0</nocleanup>
</config>
<category name="CONTROL" priority="error" appender="syslog"/>
<category name="CONTROL" priority="fatal" appender="stderr"/>
- <!-- category name="LB" priority="debug" appender="stderr"/-->
+ <category name="LB" priority="error" appender="syslog"/>
+ <category name="LB.SERVER.DB" priority="fatal" appender="syslog"/>
+ <category name="LB.HARVESTER.DB" priority="fatal" appender="syslog"/>
<!-- category name="LB.LOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.INTERLOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.NOTIFINTERLOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.SERVER" priority="debug" appender="stderr"/-->
<!-- category name="LB.AUTHZ" priority="debug" appender="syslog"/-->
- <!-- category name="LB.HARVESTER" priority="*" appender="syslog"/-->
+ <!-- category name="LB.HARVESTER" priority="debug" appender="syslog"/-->
<!-- default appenders ===================================== -->
- <appender name="stdout" type="stream" layout="basic"/>
- <appender name="stderr" type="stream" layout="basic"/>
- <appender name="syslog" type="syslog" layout="dated"/>
+ <appender name="stdout" type="stream" layout="dated"/>
+ <appender name="stderr" type="stream" layout="dated"/>
+ <appender name="syslog" type="syslog" layout="basic"/>
<!-- default layouts ======================================= -->
<layout name="basic" type="basic"/>
<log4c version="1.2.1">
<config>
- <bufsize>0</bufsize>
+ <bufsize>1024</bufsize>
<debug level="0"/>
<nocleanup>0</nocleanup>
</config>
<category name="CONTROL" priority="debug" appender="stderr"/>
<category name="LB" priority="debug" appender="stderr"/>
- <!-- to debug only a particular LB component use: -->
+ <!-- to debug only a particular LB component, or to change priority, use: -->
<!-- category name="LB.LOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.INTERLOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.NOTIFINTERLOGD" priority="debug" appender="stderr"/-->
<!-- category name="LB.SERVER" priority="debug" appender="stderr"/-->
<!-- category name="LB.SERVER.DB" priority="debug" appender="stderr"/-->
<!-- category name="LB.SERVER.REQUEST" priority="debug" appender="stderr"/-->
+ <!-- category name="LB.HARVESTER.DB" priority="debug" appender="stderr"/-->
<!-- default appenders ===================================== -->
- <appender name="stdout" type="stream" layout="basic"/>
- <appender name="stderr" type="stream" layout="basic"/>
- <appender name="syslog" type="syslog" layout="dated"/>
+ <appender name="stdout" type="stream" layout="dated"/>
+ <appender name="stderr" type="stream" layout="dated"/>
+ <appender name="syslog" type="syslog" layout="basic"/>
<!-- default layouts ======================================= -->
<layout name="basic" type="basic"/>
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
1.0.3-2
- Module rebuilt
+1.0.4-1
+- Makefile adopts compilation and linking flags from the environment.
+
# $Header$
-module.version=1.0.3
-module.age=2
+module.version=1.0.4
+module.age=1
const log4c_category_t* a_category = log4c_category_get(catName);
if (log4c_category_is_priority_enabled(a_category, a_priority)) {
- log4c_category_log(log4c_category_get(catName), a_priority, msg);
+ log4c_category_log(log4c_category_get(catName), a_priority, "%s", msg);
}
#else
printf(msg);
* @param a_format Format specifier for the string to write in the log file.
* @param ... The arguments for a_format
**/
-extern void glite_common_log(char *catName,int a_priority, const char* a_format,...);
+extern void glite_common_log(char *catName,int a_priority, const char* a_format,...) __attribute__((format(printf, 3, 4)));
/**
* Returns priority as a string
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE log4c SYSTEM "">
+
+<log4c version="1.2.1">
+ <config>
+ <bufsize>512</bufsize>
+ <debug level="0"/>
+ <nocleanup>0</nocleanup>
+ </config>
+
+ <category name="root" priority="notice"/>
+ <category name="miaow" priority="debug" appender="stderr"/>
+ <appender name="stderr" type="stream" layout="basic"/>
+
+ <layout name="basic" type="basic"/>
+ <layout name="dated" type="dated"/>
+</log4c>
--- /dev/null
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "log.h"
+
+int main() {
+ char *line = NULL;
+ size_t i, n;
+ const char *testcat = "miaow";
+
+ n = 10000;
+ line = malloc(n);
+ for (i = 0; i < n; i++) line[i] = (i % 64) ? 'A' : '\n';
+ line[n - 3] = '#';
+ line[n - 2] = '\n';
+ line[n - 1] = '\0';
+
+
+ if (glite_common_log_init()) {
+ fprintf(stderr,"glite_common_log_init() failed, exiting.");
+ return 2;
+ }
+
+ glite_common_log(testcat, LOG_PRIORITY_ERROR, "%s", line);
+ glite_common_log(testcat, LOG_PRIORITY_DEBUG, "%s", line);
+ printf("%s\n", line);
+
+ glite_common_log_fini();
+
+ free(line);
+ return 0;
+}
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.1-2
- Module rebuilt
+2.0.2-1
+- Makefile adopts compilation and linking flags from the environment.
+
# : /cvs/jra1mw/org.glite.lbjp-common.maildir/project/version.properties,v 1.1 2007/11/01 20:17:45 valtri Exp $
-module.version=2.0.1
-module.age=2
+module.version=2.0.2
+module.age=1
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.1-2
- Module rebuilt
+2.0.2-1
+- Makefile adopts compilation and linking flags from the environment.
+- Memory handling fixes
+
# : /cvs/jra1mw/org.glite.lbjp-common.server-bones/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
-module.version=2.0.1
-module.age=2
+module.version=2.0.2
+module.age=1
}
fclose(fpid);
} else if (errno != ENOENT) {
- glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, pidfile);
+ glite_common_log_msg(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, pidfile);
free(pidfile);
return 0;
}
if (((fpid = fopen(pidfile, "w")) == NULL) ||
(fprintf(fpid, "%d", getpid()) <= 0) ||
(fclose(fpid) != 0)) {
- glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, pidfile);
+ glite_common_log_msg(LOG_CATEGORY_CONTROL, LOG_PRIORITY_FATAL, pidfile);
free(pidfile);
return 0;
}
my $lb_tag = '';
my $lbjp_tag = '';
my $jp_tag = '';
-my $sec_tag = '';
my $jobid_tag = '';
my $libdir = getlibdir();
+my $projectname;
+
my @nodes = qw/client server logger logger-msg utils client-java doc ws-test db jpprimary jpindex jpclient harvester/;
my %enable_nodes;
my %disable_nodes;
-my %extern_prefix = (
- cares => '/opt/c-ares',
- classads => '/opt/classads',
- cppunit => '/usr',
- expat => '/usr',
- globus => '/opt/globus',
- myproxy => '/opt/myproxy',
- gsoap => '/usr',
- mysql => '/usr',
- 'mysql-devel' => '',
- 'mysql-server' => '',
- voms => '/opt/glite',
- gridsite => '/opt/glite',
- lcas => '/opt/glite',
- trustmanager => '/opt/glite',
- utiljava => '/opt/glite',
- ant => '/usr',
- jdk => '/usr',
- libtar => '/usr',
- axis => '/usr',
- log4c => '/usr',
- postgresql => '/usr',
- activemq => '/opt/activemq-cpp-library',
- apr => '/opt/apr',
- aprutil => '/opt/apr-util'
+my %externs = (
+ cares => {
+ prefix => '/opt/c-ares',
+ pkg => 'libcares'
+ },
+ classads => {
+ prefix=> '/usr',
+ pkg => 'classads'
+ },
+ cppunit => {
+ prefix=> '/usr',
+ pkg => 'cppunit'
+ },
+ expat => {
+ prefix=> '/usr',
+ pkg => 'expat'
+ },
+ globus => {
+ prefix=> '/opt/globus',
+ pkg => 'globus-gssapi-gsi'
+ },
+ 'myproxy-essentials' => {
+ prefix=> '/opt/globus',
+ pkg => 'myproxy'
+ },
+ 'myproxy-server' => {
+ prefix=> '/opt/globus',
+ },
+ 'myproxy-client' => {
+ prefix=> '/opt/globus',
+ },
+ gsoap => {
+ prefix=> '/usr',
+ pkg => 'gsoap'
+ },
+ mysql => {
+ prefix=> '/usr'
+ },
+ 'mysql-devel' => {
+ prefix=> ''
+ },
+ 'mysql-server' => {
+ prefix => ''
+ },
+ voms => {
+ prefix => '/opt/glite',
+ pkg => 'voms-1.0'
+ },
+ gridsite => {
+ prefix => '/opt/glite'
+ },
+ lcas => {
+ prefix => '/opt/glite'
+ },
+ trustmanager => {
+ prefix => '/opt/glite'
+ },
+ utiljava => {
+ prefix=> '/opt/glite'
+ },
+ ant => {
+ prefix=> '/usr'
+ },
+ jdk => {
+ prefix=> '/usr'
+ },
+ libtar => {
+ prefix=> '/usr'
+ },
+ axis => {
+ prefix=> '/usr'
+ },
+ log4c => {
+ prefix=> '/usr'
+ },
+ postgresql => {
+ prefix=> '/usr'
+ }
+ activemq => {
+ prefix=>'/opt/activemq-cpp-library'
+ }
+ apr => {
+ prefix=>'/opt/apr',
+ pkg => 'apr-1'
+ }
+ aprutil => {
+ prefix=>'/opt/apr-util',
+ pkg => 'apr-util-1'
+ }
);
my %jar = (
my %deps;
my %deps_type;
my %buildroot;
+my (%etics_externs, %etics_projects, %etics_projects_emi, %etics_externs_emi);
my %lbmodules = (
- 'lb' => [ qw/client client-java common doc logger logger-msg server state-machine types utils ws-interface ws-test harvester yaim glite-LB/],
- 'security' => [qw/proxyrenewal/],
+ 'lb' => [ qw/client client-java common doc logger server state-machine types utils ws-interface ws-test harvester yaim glite-LB logger-msg/],
'lbjp-common' => [qw/db log maildir server-bones trio jp-interface gss gsoap-plugin/],
'jobid' => [qw/api-c api-cpp api-java/],
'jp' => [ qw/client doc index primary server-common ws-interface/ ],
'gridsite' => [ qw/apache shared commands core/ ],
+ 'px' => [ qw/proxyrenewal glite-PX myproxy-yaim myproxy-config/ ],
);
'prefix=s' => \$prefix,
'staged=s' => \$staged,
'module=s' => \$module,
- 'thrflavour=s' => \$thrflavour,
- 'nothrflavour=s' => \$nothrflavour,
+ 'thrflavour:s' => \$thrflavour,
+ 'nothrflavour:s' => \$nothrflavour,
'mode=s' => \$mode,
'listmodules=s' => \$listmodules,
'version=s' => \$version,
'lb-tag=s' => \$lb_tag,
'lbjp-common-tag=s' => \$lbjp_tag,
'jp-tag=s' => \$jp_tag,
- 'security-tag=s' => \$sec_tag,
'jobid-tag=s' => \$jobid_tag,
'help' => \$help,
'libdir=s' => \$libdir,
+ 'emi' => \$emi,
);
for (@nodes) {
push @opts,"enable-$_",\$enable_nodes{$_};
}
-push @opts,"with-$_=s",\$extern_prefix{$_} for keys %extern_prefix;
+push @opts,"with-$_=s",\$externs{$_}{withprefix} for keys %externs;
push @opts,"with-$_=s",\$jar{$_} for keys %jar;
my @keeparg = @ARGV;
GetOptions @opts or die "Errors parsing command line\n";
-$extern_prefix{'mysql-devel'}=$extern_prefix{mysql} if $extern_prefix{'mysql-devel'} eq '';
-$extern_prefix{'mysql-server'}=$extern_prefix{mysql} if $extern_prefix{'mysql-server'} eq '';
+$externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
+$projectname = $emi ? 'emi' : 'org.glite';
+if ($emi) {
+ for $_ (keys %etics_externs_emi) {
+ $etics_externs{$_} = $etics_externs_emi{$_};
+ }
+}
if ($help) { usage(); exit 0; }
if ($listmodules) {
- my @m = map "org.glite.$listmodules.$_",@{$lbmodules{$listmodules}};
+ my @m = map "$projectname.$listmodules.$_",@{$lbmodules{$listmodules}};
print "@m\n";
exit 0;
}
die "--module cannot be used with --enable-* or --disable-*\n"
if $module && ($en || $dis);
-die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},@{$lbmodules{security}},{$lbmodules{jp}};
+die "$module: unknown module\n" if $module && ! grep $module,@{$lbmodules{lb}},{$lbmodules{jp}};
+
+if ($mode eq 'build') { for my $ext (keys %externs) {
+ if (defined $externs{$ext}{withprefix}) { $externs{$ext}{prefix} = $externs{$ext}{withprefix}; }
+ elsif (defined $externs{$ext}{pkg}) {
+ my ($prefix, $flag);
+ my $pkg = $externs{$ext}{pkg};
+ my $flagname = uc $externs{$ext}{pkg};
+ $flagname =~ s/-[0-9\.]*$//;
+ $flagname =~ s/-/_/g;
+
+ print "Checking $pkg ... ";
+ `pkg-config "$pkg" --exists >/dev/null`;
+ if ($? == 0) {
+ $externs{$ext}{prefix}=`pkg-config $pkg --variable=prefix`;
+ chomp $externs{$ext}{prefix};
+ print "$externs{$ext}{prefix}\n";
+
+ $flag=`pkg-config $pkg --cflags`;
+ $externs{$ext}{flags} .= "${flagname}_CFLAGS=$flag" if ($flag);
+ $flag=`pkg-config $pkg --libs`;
+ $externs{$ext}{flags} .= "${flagname}_LIBS=$flag" if ($flag);
+ } else {
+ print "(using default $externs{$ext}{prefix})\n";
+ }
+ }
+} }
if ($dis) {
for (@nodes) {
if ($mode eq 'build') {
print "Writing config.status\n";
open CONF,">config.status" or die "config.status: $!\n";
- print CONF "$0 @keeparg\n";
+ print CONF "PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} $0 @keeparg\n";
close CONF;
}
@myjars = keys %aux;
print "\nRequired externals:\n";
- print "\t$_: $extern_prefix{$_}\n" for @ext;
+ print "\t$_: $externs{$_}{prefix}\n" for @ext;
print "\t$_: $jar{$_}\n" for @myjars;
+ for (@ext) { if (defined($externs{$_}{flags})) { print "$externs{$_}{flags}"; } };
print "\nThis is a poor-man configure, it's up to you to have sources and externals there\n\n";
mkinc($_) for @modules;
}
}
}
- if ($sec_tag){
- for (@{$lbmodules{security}}){
- if ("security.".$_ eq $module){
- $tag = '-r '.$sec_tag;
- }
- }
- }
if ($jobid_tag){
for (@{$lbmodules{jobid}}){
if ("jobid.".$_ eq $module){
'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B/ ],
'lbjp-common.gss' => [ qw/globus_essentials:R globus:B cares cppunit:B/ ],
'lbjp-common.gsoap-plugin' => [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B/ ],
- 'security.proxyrenewal' => [ qw/voms globus:B myproxy/ ],
'jobid.api-c' => [ qw/cppunit:B/ ],
'jobid.api-cpp' => [ qw/cppunit:B/ ],
'jobid.api-java' => [ qw/ant:B jdk:B/ ],
'jp.server-common' => [],
'jp.ws-interface' => [],
'gridsite.core' => [qw/httpd-devel:B gsoap:B globus:B/ ],
+ 'px.proxyrenewal' => [ qw/globus:B globus_essentials:R myproxy-essentials voms/ ],
+ 'px.glite-PX' => [qw/myproxy-server:R fetchcrl:R gip_service:R bdii:R glite_version:R gpt:R glue_schema:R/],
+ 'px.myproxy-yaim' => [ qw/yaim_core:R/ ],
+ 'px.myproxy-config' => [ qw/myproxy-client:R/ ], # in myproxy-config.spec
);
for my $ext (keys %need_externs_aux) {
'lbjp-common.trio' => [ qw// ],
'lbjp-common.gss' => [ qw// ],
'lbjp-common.gsoap-plugin' => [ qw/lbjp-common.gss/ ],
- 'security.proxyrenewal' => [ qw// ],
'jobid.api-c' => [ qw// ],
'jobid.api-cpp' => [ qw/jobid.api-c/ ],
'jobid.api-java' => [ qw// ],
'jp.ws-interface' => [ qw// ],
'gridsite.core' => [ qw/build.common-cpp:B/ ],
+
+ 'px.proxyrenewal' => [ qw// ],
+ 'px.glite-PX' => [qw/px.myproxy-yaim:R px.myproxy-config:R/],
+ 'px.myproxy-yaim' => [ qw/px.myproxy-config:R/ ],
+ 'px.myproxy-config' => [],
);
for my $ext (keys %deps_aux) {
%obsoletes = (
'lb.yaim' => [ qq/glite-yaim-lb/ ],
+ 'px.proxyrenewal' => [ qq/glite-security-proxyrenewal/ ],
+ 'px.myproxy-yaim' => [ qq/glite-yaim-myproxy/ ],
+ 'px.myproxy-config' => [ qq/myproxy-config/ ], # in myproxy-config.spec
'lbjp-common.gss' => [ qq/glite-security-gss/ ],
'lbjp-common.gsoap-plugin' => [ qq/glite-security-gsoap-plugin/ ],
);
'jobid' => 'org.glite',
'lbjp-common' => 'org.glite',
'gridsite' => 'org',
- 'security' => 'org.glite',
+ 'px' => 'org.glite',
);
%conf_prefix = (
'jobid' => 'glite-',
'lbjp-common' => 'glite-',
'gridsite' => '',
- 'security' => 'glite-',
+ 'px' => 'glite-',
+);
+
+%emi_conf_prefix = (
+ 'lb' => 'emi-',
+ 'jp' => 'emi-',
+ 'jobid' => 'emi-',
+ 'lbjp-common' => 'emi-',
+ 'gridsite' => '',
+ 'px' => 'emi-',
);
my @k = keys %deps_aux;
lb.client lb.doc lb.state-machine lb.ws-interface lb.logger lb.logger-msg lb.types lb.common lb.server lb.utils lb.ws-test lb.client-java lb.harvester lb.yaim lb.glite-LB
lbjp-common.gss lbjp-common.gsoap-plugin
jobid.api-c jobid.api-cpp jobid.api-java
-lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface
+lbjp-common.db lbjp-common.log lbjp-common.maildir lbjp-common.server-bones lbjp-common.trio lbjp-common.jp-interface lbjp-common.gss lbjp-common.gsoap-plugin
jp.client jp.doc jp.index jp.primary jp.server-common jp.ws-interface
+px.proxyrenewal px.myproxy-yaim px.glite-PX px.myproxy-config
/;
@aux{@m} = (1) x ($#m+1);
};
for (@{$need_externs{$short}}) {
- print MKINC "${_}_prefix = $extern_prefix{$_}\n"
+ print MKINC "${_}_prefix = $externs{$_}{prefix}\n";
+ print MKINC "$externs{$_}{flags}" if defined $externs{$_}{flags};
}
for (@{$need_jars{$short}}) {
close MKINC;
}
-my %etics_externs;
-my %etics_projects;
BEGIN{
%etics_externs = (
globus_essentials=>'vdt_globus_essentials',
globus=>'globus',
- myproxy=>'myproxy',
+ 'myproxy-essentials'=>'myproxy_essentials',
+ 'myproxy-server'=>'myproxy_server',
+ 'myproxy-client'=>'myproxy_client',
cares=>'c-ares',
voms=>'org.glite.security.voms-api-cpp',
gridsite=>'org.gridsite.shared',
apr=>'apr-dev',
aprutil=>'aprutil-dev',
);
+ %etics_externs_emi = (
+ globus_essentials=>'globus-gssapi-gsi',
+ globus=>'globus-gssapi-gsi-devel',
+ gridsite=>'emi.gridsite.shared',
+ yaim_core=>'emi.yaim.yaim-core'
+ );
%etics_projects = (
vdt=>[qw/globus globus_essentials myproxy/],
'org.glite'=>[qw/voms gridsite lcas gpt gip_release gip_service bdii glite_version glite_info_templates glue_schema yaim_core/],
);
+ %etics_projects_emi = (
+ vdt=>'externs',
+ 'org.glite'=>'emi',
+ );
%platform_properties = (
'gridsite.core' => {
for (@{$need_externs{"$subsys.$module"}}) {
if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ if ($emi) {
+ if ($ge{$_} and not defined $externs{$_}{pkg}) {
+ push @copts, "--with-$_=\${stageDir}";
+ }
+ } else {
+ push @copts,$ge{$_} ? "--with-$_=\${stageDir}" : "--with-$_=\${$eext.location}";
+ }
}
}
for (@{$need_jars{"$subsys.$module"}}) {
my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
- push @copts,"--with-$_ \${$eext.location}/usr/share/java/$_*.jar";
+ push @copts,"--with-$_ \${$eext.location}$jar{$_}" if (not $emi);
}
my $conf;
my $conftag;
+ my ($confprefix, $nameprefix);
$dwpath = "path = \${projectName}/\${moduleName}/\${version}/\${platformName}/\${packageName}-\${version}-\${age}.tar.gz\n";
+
+ $confprefix = $emi ? $emi_conf_prefix{$subsys} : $conf_prefix{$subsys};
+ $nameprefix = $confprefix;
+ $nameprefix =~ s/-$//;
+ $nameprefix =~ s/-/\./g;
+
if ($branch) {
- $conf = "$conf_prefix{$subsys}${subsys}-${module}_$branch";
+ $conf = "$confprefix${subsys}-${module}_$branch";
$conftag = $branch;
# forced low age number
$age = $branch eq 'HEAD' ? '0head' : '0dev'; }
else {
- $conf = "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
+ $conf = "$confprefix$subsys-${module}_R_${major}_${minor}_${rev}_${age}";
# XXX: gridsite hack
- $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" : $conf; }
+ $conftag = $subsys eq 'gridsite' ? "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}" :
+ "$conf_prefix{$subsys}$subsys-${module}_R_${major}_${minor}_${rev}_${age}"; }
+ if ($emi) {
+ $age = "${age}emi";
+ }
+
my $file = $output ? $output : "$conf.ini";
open C,">$file" or die "$file: $!\n";
if ($subsys eq 'gridsite') {
if ($module eq 'core') {
- my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ my $flags;
+
+ if ($emi) {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+ } else {
+ $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+ }
$cmd{compile} = "make $flags build";
$cmd{install} = "make $flags install";
$cmd{packaging} = "echo building nothing, org.gridsite.core make rpm step will create this";
}
}
+ elsif ($subsys eq 'px' and $module eq 'myproxy-config') {
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ $cmd{packaging} = "make rpm package=".$confprefix."$subsys-myproxy-config";
+ }
else {
- $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure --thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor} --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
+ my $flavours = $emi ? "--thrflavour= --nothrflavour=" : "--thrflavour=\${globus.thr.flavor} --nothrflavour=\${globus.nothr.flavor}";
+ $cmd{configure} = "cd $confdir && /usr/bin/perl \${moduleName}/configure $flavours --prefix=\${prefix} --stage=\${stageDir} --libdir=\${libdir} --module $subsys.$module @copts";
$cmd{compile} = 'make';
$cmd{test} = 'make check';
$cmd{install} = 'make install';
$defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
}
- my $checkoutcmd;
- if ($conftag eq 'HEAD') {
- $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
- } else {
- $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
- }
+ my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+ $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
print STDERR "Writing $file\n";
print C qq{
[Configuration-$conf]
profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
displayName = $conf
description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
age = $age
deploymentType = None
+vcsroot = :pserver:anonymous\@glite.cvs.cern.ch:/cvs/glite
tag = $conftag
version = $major.$minor.$rev
$dwpath
aprSuffix = 0
package.RPMSLocation = \${moduleDir}/RPMTMP/RPMS
package.SRPMSLocation = \${moduleDir}/RPMTMP/SRPMS
-$package_description$package_summary$defprops
-};
+package.preserve.libtool = false
+$package_description$package_summary$defprops};
+
for (@{$obsoletes{"$subsys.$module"}}) {
print C "package.obsoletes = $_\n";
print C "package.replaces = $_\n";
my $proj = 'externals';
for my $p (keys %etics_projects) {
+ if ($emi and defined $etics_projects_emi{$p}) {
+ $p = $etics_projects_emi{$p};
+ }
for $m (@{$etics_projects{$p}}) {
$proj = $p if $m eq $_;
}
for (@{$deps{"$subsys.$module"}}) {
my $type = $deps_type{"$subsys.$module"}->{$_};
- print C "org.glite|org.glite.$_ = $type\n";
+ print C "$projectname|$projectname.$_ = $type\n";
}
close C;
sub gsoap_version {
local $_;
my $gsoap_version;
- open S,"$extern_prefix{gsoap}/bin/soapcpp2 -v 2>&1 |" or die "$extern_prefix{gsoap}/bin/soapcpp2: $!\n";
+ open S,"$externs{gsoap}{prefix}/bin/soapcpp2 -v 2>&1 |" or die "$externs{gsoap}{prefix}/bin/soapcpp2: $!\n";
while ($_ = <S>) {
chomp;
$gsoap_version = $1 if /The gSOAP Stub and Skeleton Compiler for C and C\+\+ ([.[:digit:][:alpha:]]+)$/;
+ $gsoap_version = $1 if /The gSOAP code generator for C and C\+\+, soapcpp2 release ([.[:digit:][:alpha:]]+)$/;
}
close S;
return $gsoap_version;
}
sub usage {
- my @ext = keys %extern_prefix;
+ my @ext = keys %externs;
my @myjars, keys %jar;
print STDERR qq{
--version=maj.min.rev-age specify version here instead of reading version.properties
--branch=branch CVS branch/etics name suffix (HEAD, branch_2_1, ...)
--libdir=libdir typically [lib,lib64] postfix
+ --emi generate configurations with emi flavor in mode 'etics'
Mode of operation:
--mode={checkout|build|etics} what to do [build]
What to build:
--module=module build this module only (mostly in-Etics operation)
--enable-NODE build this "node" (set of modules) only. Available nodes are
- @{$lbmodules{lb}},@{$lbmodules{security}}
+ @{$lbmodules{lb}}
--disable-NODE don't build this node
--lb-tag=tag checkout LB modules with specific tag
--jp-tag=tag checkout JP modules with specific tag
--lbjp-common-tag=tag checkout lbjp-common modules with specific tag
- --security-tag=tag checkout security modules with specific tag
--jobid-tag=tag checkout jobid modules with specific tag
Dependencies:
2.0.2-2
- Module rebuilt
+2.0.3-1
+- Makefile adopts compilation and linking flags from the environment.
+
# : /cvs/jra1mw/org.glite.lbjp-common.trio/project/version.properties,v 1.2 2009/01/21 10:44:34 zsustr Exp $
-module.version=2.0.2
-module.age=2
+module.version=2.0.3
+module.age=1