EMI changes in configure (differences only for etics mode):
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 15 Dec 2010 18:16:32 +0000 (18:16 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 15 Dec 2010 18:16:32 +0000 (18:16 +0000)
- different project/configuration names
- checkout to ${moduleName} directory
- tuning dependencies
- using pkg-config in gridsite flags

org.glite.lb/configure

index 598d569..69f5d43 100755 (executable)
@@ -44,6 +44,8 @@ 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 %enable_nodes;
@@ -55,7 +57,7 @@ my %externs = (
                pkg => 'libcares'
        },
        classads => {
-               prefix=> '/opt/classads',
+               prefix=> '/usr',
                pkg => 'classads'
        },
        cppunit => {
@@ -189,11 +191,12 @@ GetOptions @opts or die "Errors parsing command line\n";
 
 $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 ($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;
 }
@@ -236,7 +239,7 @@ if ($mode eq 'build') { for my $ext (keys %externs) {
                        $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";
                }
        }
 } }
@@ -691,6 +694,7 @@ libdir = $libdir
 
 my %etics_externs;
 my %etics_projects;
+my %etics_externs_emi;
 BEGIN{
        %etics_externs = (
                globus_essentials=>'vdt_globus_essentials',
@@ -712,6 +716,12 @@ BEGIN{
                glue_schema=>'glue-schema',
                yaim_core=>'org.glite.yaim.core',
        );
+       %etics_externs_emi = (
+               globus_essentials=>'globus-gssapi-gsi',
+               globus=>'globus-gssapi-gsi-devel',
+               gridsite=>'emi.gridsite.shared',
+               yaim_core=>'emi.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/],
@@ -730,6 +740,11 @@ BEGIN{
                },
        );
 };
+if ($emi) {
+       for $_ (keys %etics_externs_emi) {
+               $etics_externs{$_} = $etics_externs_emi{$_};
+       }
+}
 
 sub mode_etics {
        $fmod = shift;
@@ -781,12 +796,14 @@ sub mode_etics {
 
        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"; 
@@ -841,7 +858,13 @@ sub mode_etics {
 
        if ($subsys eq 'gridsite') {
                if ($module eq 'core') {
-                       my $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       my $flags;
+
+                       if ($emi) {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=`pkg-config gsoap --variable=prefix` OPENSSL_GLOBUS_FLAGS=`pkg-config globus-openssl --cflags` OPENSSL_GLOBUS_LIBS=`pkg-config globus-openssl --libs` FLAVOR_GLOBUS_EXT= HTTPD_FLAGS="-I/usr/include/httpd -I/usr/include/apache2 -I/usr/include/apr-${aprSuffix} -I/usr/include/pcre"';
+                       } else {
+                               $flags = 'RELEASE_VERSION=${age}.${platformFamily} prefix=${prefix} libdir=${libdir} GSOAPDIR=${gsoap.location} OPENSSL_GLOBUS_FLAGS=-I${globus.location}/include/${globus.dbg.nothr.flavor} OPENSSL_GLOBUS_LIBS=-L${globus.location}/${libdir}/ FLAVOR_GLOBUS_EXT=_${globus.dbg.nothr.flavor} HTTPD_FLAGS="-I${httpd-devel.location}/include/httpd -I${httpd-devel.location}/include/apache2 -I${httpd-devel.location}/include/apr-${aprSuffix} -I${httpd-devel.location}/include/pcre"';
+                       }
 
                        $cmd{compile} = "make $flags build";
                        $cmd{install} = "make $flags install";
@@ -865,21 +888,17 @@ sub mode_etics {
                $defprops .= $p . ' = ' . $platform_properties{"$subsys.$module"}->{default}->{$p} . "\n";
        }
 
-       my $checkoutcmd;
-       if ($conftag eq 'HEAD') {
-               $checkoutcmd = "cvs -d \${vcsroot} co -A \${moduleName}";
-       } else {
-               $checkoutcmd = "cvs -d \${vcsroot} co -r \${tag} \${moduleName}";
-       }
+       my $checkoutcmd = "cvs -d \${vcsroot} co -d \${moduleName} ".($conftag eq 'HEAD' ? '-A' : '-r ${tag}')." $cvs_prefix{$subsys}.$subsys.$module";
+       $checkoutcmd .= "; ln -s \${moduleName} $cvs_prefix{$subsys}.$subsys.$module 2>/dev/null || true" if ($emi);
 
        print STDERR "Writing $file\n";
        print C qq{
 [Configuration-$conf]
 profile = None
-moduleName = $cvs_prefix{$subsys}.$subsys.$module
+moduleName = $projectname.$subsys.$module
 displayName = $conf
 description = $cvs_prefix{$subsys}.$subsys.$module
-projectName = org.glite
+projectName = $projectname
 age = $age
 deploymentType = None
 tag = $conftag
@@ -943,6 +962,9 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
                my $proj = 'externals';
                for my $p (keys %etics_projects) {
+                       if ($emi and $p eq 'org.glite') {
+                               $p = $projectname;
+                       }
                        for $m (@{$etics_projects{$p}}) {
                                $proj = $p if $m eq $_;
                        }
@@ -954,7 +976,7 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
 
        for (@{$deps{"$subsys.$module"}}) {
                my $type = $deps_type{"$subsys.$module"}->{$_};
-               print C "org.glite|org.glite.$_ = $type\n";
+               print C "$projectname|$projectname.$_ = $type\n";
        }
 
        close C;