Building gLExec and its gLite dependencies from SVN source

From PDP/Grid Wiki
Jump to navigationJump to search

NOTE: THIS PAGE IS DEPRECATED AND NO LONGER MAINTAINED.

Building gLExec and its dependencies can most easily be done using its source RPM (https://software.nikhef.nl/dist/mwsec/rpm/) or distribution tarball (https://software.nikhef.nl/security/glexec/).

See Building_gLExec_from_src_rpm for (less outdated) information.



Introduction

This page explains the steps needed to build gLite tools, in particular gLExec and its LCMAPS and LCAS dependencies directly from the source in CVS. Note that the order in which these packages are described below ensures that all the dependencies are resolved.

We also provide an example script which builds all the different tools consecutively and which have been used as the source for this wiki page. Typical usage:

./sac_from_source.sh \
    -c emi1rc.config \
    -F prefix=/usr,libdir=/usr/lib64,sysconfdir=/etc \
    -o stdout.txt -e stderr.txt \
    lcmaps_interface glexec

This would download lcmaps-interface and glexec into /tmp/source, build them and install them using a make DESTDIR=/tmp/build install sequence.

If one wants to change the configure lines, the easiest is to go to /tmp/source/glexec and do a reconfigure with the right options, or change the -F options above. There are quite a few of them possible, for example, the location where components look for lcmaps can be specified using lcmaps-prefix=<directory>

Upon completion, two files are created (by default in the source dir):

  • failedcomps.txt - containing a list of components that failed building
  • configflag.txt - containing the used flags. This can be used as input instead of the -F by specifying -f<file>

Use ./sac_from_source.sh -h for help


Note that this is work in progress, hence comments, suggestions etc. are highly appreciated.

Prerequisites: Globus and global settings

First define the build and runtime installation paths:

export source=/tmp/source           # Where to download sources
export globus=/tmp/build/globus     # Where to install/find globus
export gridsite=/tmp/build/gridsite # Where to install/find gridsite
export glite=/tmp/build/glite       # Where to find glite builds
export prefix=${glite}              # Where to install glite builds

Make sure ${source} exists. Set the correct CVSROOT for gLite downloads:

export CVSROOT=:pserver:anonymous@glite.cvs.cern.ch:/cvs/glite  # anonymous CVS root

Note that instead of using the anonymous CVS checkout commands below

cvs co -r TAG COMPONENT

one can also download and untar a tarball from

wget -nv -O - http://glite.cvs.cern.ch/cgi-bin/glite.cgi/COMPONENT.tar.gz\?view=tar\&pathrev=TAG | tar -zxvf -

or, for the default HEAD tag:

wget -nv -O - http://glite.cvs.cern.ch/cgi-bin/glite.cgi/COMPONENT.tar.gz\?view=tar | tar -zxvf -

In that case the CVSROOT does not need to be set.

There are currently two ways to get a working globus library.

Binary Globus installation

For the following OSes it can be found in the Etics repositories:

Since all these tarballs assume installation in /opt/globus unpack and 'relocate' as follows:

mkdir -p ${globus} && \
cd ${globus} && \
tar -zxf <globus tarball> && \
find -type f -name \*.la|while read file;do
    sed s+/opt/globus+${globus}+g ${file} > ${file}.new && \
        mv -f ${file}.new ${file}
done

Set one of the following exports, depending on 32 or 64 bit platform:

export globus_flav=gcc32dbg
or
export globus_flav=gcc64dbg

Globus installation from source

Download the gt4.0.8-all-source-installer.tar.bz2 source tarball, unpack and go to the created gt4.0.8-all-source-installer directory.

./configure --prefix=${globus} \
            --disable-gridftp --disable-gsiopenssh --disable-myproxy \
            --disable-rls --disable-drs --disable-rendezvous --disable-tests \
            --disable-prewsgram --disable-wsgram --disable-wsjava --disable-wsc \
            --disable-wsmds --disable-wsdel --disable-wsrft --disable-wscas \
            --disable-wstests --disable-webmds
make globus-gsi
make install

In case you want to build the LCAS LCMAPS GT4 interface, you will also need to add the build targets globus_gridmap_callout_error and globus_authz

make globus-gsi globus_gridmap_callout_error globus_authz
make install

Now set the correct globus flavour, e.g.:

export globus_flav=unset
if [ -f "${globus}/etc/globus_core/flavor_gcc64dbg.gpt" ];then
    globus_flav=gcc64dbg
elif [ -f "${globus}/etc/globus_core/flavor_gcc64.gpt" ];then
    globus_flav=gcc64
elif [ -f "${globus}/etc/globus_core/flavor_gcc32dbg.gpt" ];then
    globus_flav=gcc32dbg
elif [ -f "${globus}/etc/globus_core/flavor_gcc32.gpt" ];then
    globus_flav=gcc32
fi

Globus Toolkit 5

Although not certified, pre-certification shows gLExec works with GT5.

In order to build using GT5, download the source gt5.0.1-all-source-installer.tar.bz2 and build the same way as for GT4 above.

VOMS API

Dependencies: Globus

cd ${source}
cvs co -r glite-security-voms_R_1_9_16_2 org.glite.security.voms
cd org.glite.security.voms
./configure --prefix=${prefix} --with-globus-prefix=${globus} --disable-java --with-api-only
make && make install

LCMAPS

Dependencies: Globus, VOMS API

Also note that we use the same value for both globus*flavor options. This is only relevant when building globus from source, since we only (need to) build the non-threading globus library. However, the voms test, defined in the glite_security.m4 macros, uses an include path based on the threaded globus library.

cd ${source}
cvs co org.glite.build.common-cpp
cvs co org.glite.security.lcmaps
cd org.glite.security.lcmaps
cp -p ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project
./bootstrap
./configure --prefix=${prefix} \
            --with-glite-location=${glite} \
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav} --with-globus-nothr-flavor=${globus_flav}
make && make install

LCAS

Dependencies: Globus

Note: glite-build-common-cpp is also checked out under LCMAPS.

cd ${source}
cvs co org.glite.build.common-cpp
cvs co org.glite.security.lcas
cd org.glite.security.lcas
cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project
./bootstrap && \
./configure --prefix=${prefix} \
            --with-glite-location=${glite} \
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCAS interface

cd ${source}
cvs co org.glite.security.lcas-interface
cd org.glite.security.lcas-interface
cp -p ../org.glite.build.common-cpp/m4/glite.m4 ./project
./bootstrap
./configure --prefix=${prefix}
make install

gLExec

Dependencies: Globus, LCMAPS, LCAS, LCAS interface

Note: for Debian-5 set the following extra export:

export LDFLAGS="-Wl,-rpath -Wl,${globus}/lib"

Note: the HEAD version of gLExec has a new configure option --with-glexec-conf to allow setting the fixed location of the configuration file, which defaults to /opt/glite/etc/glexec.conf. In older versions (including production), it is possible to do this by setting the following export before calling configure. Note the particular combination of single quotes and escaped double quotes:

export CPPFLAGS=-DGLEXEC_CONFIG_FILE='\"'${prefix}/etc/myglexec.conf'\"'
cd ${source}
cvs co org.glite.security.glexec
cd org.glite.security.glexec
cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project
./bootstrap
./configure --prefix=${prefix} \
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCMAPS plugins basic

Dependencies: Globus, LCMAPS

cd ${source}
cvs co org.glite.security.lcmaps-plugins-basic
cd org.glite.security.lcmaps-plugins-basic
cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps,gridlist}.m4 ./project
./bootstrap
./configure --prefix=${prefix}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCMAPS plugins verify-proxy

Dependencies: LCMAPS

cd ${source}
cvs co org.glite.security.lcmaps-plugins-verify-proxy
cd org.glite.security.lcmaps-plugins-verify-proxy
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project
./bootstrap
./configure --prefix=${prefix} --with-glite-location=${glite}
make && make install

LCMAPS plugins voms

Dependencies: Globus, VOMS API, LCMAPS

cd ${source}
cvs co org.glite.security.lcmaps-plugins-voms
cd org.glite.security.lcmaps-plugins-voms
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,lcmaps,gridlist}.m4 ./project
./bootstrap
./configure --prefix=${glite}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCMAPS plugins afs

Dependencies: Globus, LCMAPS

cd ${source}
cvs co org.glite.security.lcmaps-plugins-afs
cd org.glite.security.lcmaps-plugins-afs
cp -p ../org.glite.build.common-cpp/m4/{glite,globus}.m4 ./project
./bootstrap
./configure --prefix=${glite}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCMAPS plugins GUMS

Dependencies: Globus, LCMAPS

cd ${source}
cvs co org.glite.security.lcmaps-plugins-gums
cd org.glite.security.lcmaps-plugins-gums
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus}.m4 ./project
./bootstrap
./configure --prefix=${glite}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

PEP-C Library

Note: the way the PEP-C library determines the library path is not fully compatible with the way LCMAPS does it. To fix this, define:

export pepclibdir=${glite}/<libdir used by LCMAPS>
cd ${source}
svn co http://svnweb.cern.ch/guest/glxa/pep-c-lib/tags/1_3_0 org.glite.authz.pep-c
cd org.glite.authz.pep-c
./autotools.sh
./configure --prefix=${glite} --libdir=${pepclibdir}
make && make html && make install

LCMAPS plugins C-pep

Dependencies: LCMAPS, PEP-C Library

cd ${source}
cvs co org.glite.security.lcmaps-plugins-c-pep
cd org.glite.security.lcmaps-plugins-c-pep
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project
./bootstrap
./configure --prefix=${glite} --with-glite-location=${glite}
make && make install

SAML2-XACML2 Library

Note: glite-build-common-cpp is also checked out under LCMAPS and/or LCAS

cd ${source} 
cvs co -r glite-build-common-cpp_R_3_2_7_1 org.glite.build.common-cpp
cvs co org.glite.security.saml2-xacml2-c-lib
cd org.glite.security.saml2-xacml2-c-lib
cp -v -p ../org.glite.build.common-cpp/m4/glite.m4 ./project
export CXXFLAGS=-fPIC 
cd gsoap-2.7
../autogen.sh
./configure --prefix=${glite}
make && make install
cd ../xacml-1.0
../autogen.sh
./configure --prefix=${glite} --with-gsoap=${glite}
make && make install

LCMAPS plugins SCAS client

Dependencies: LCMAPS, SAML2-XACML2 Library

cd ${source}
cvs co org.glite.security.lcmaps-plugins-scas-client
cd org.glite.security.lcmaps-plugins-scas-client
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,lcmaps}.m4 ./project
./bootstrap
./configure --prefix=${glite} --with-glite-location=${glite}
make && make install

SCAS

Dependencies: Globus, LCMAPS, LCAS, LCAS interface

cd ${source}
cvs co org.glite.security.scas
cd org.glite.security.scas
cp -p ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project
./bootstrap
./configure --prefix=${prefix} \
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCAS plugins basic

Dependencies: Globus, LCAS

cd ${source}
cvs co org.glite.security.lcas-plugins-basic
cd org.glite.security.lcas-plugins-basic
cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project
./bootstrap
./configure --prefix=${glite}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

LCAS plugins check-executable

Dependencies: Globus, LCAS

cd ${source}
cvs co org.glite.security.lcas-plugins-check-executable
cd org.glite.security.lcas-plugins-check-executable
cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project
./bootstrap
./configure --prefix=${glite}
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install

GridSite Core

Dependencies: global settings

Note: GridSite Core needs to know the library path (lib or lib64), therefore

export gridsitelibdir=<libdir used by LCAS>
cd ${source}
cvs co org.gridsite.core
cd org.gridsite.core/src
make prefix=${gridsite} libdir=${gridsitelibdir}
make prefix=${gridsite} install

LCAS plugins voms

Dependencies: Globus, VOMS, LCAS, GridSite Core

cd ${source}
cvs co org.glite.security.lcas-plugins-voms
cd org.glite.security.lcas-plugins-voms
cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,gridsite,gridlist}.m4 ./project
./bootstrap
./configure --prefix=${glite} --with-glite-location=${glite} \
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
            --with-gridsite-prefix=${gridsite} --with-gridsite-ssl=system
make && make install

LCAS LCMAPS GT4 interface

Dependencies: Globus, LCMAPS, LCAS, LCAS interface

Note: only this component needs the extra build targets globus_gridmap_callout_error globus_authz for building globus from source.

cd ${source}
cvs co org.glite.security.lcas-lcmaps-gt4-interface
cd org.glite.security.lcas-lcmaps-gt4-interface
cp -p ../org.glite.build.common-cpp/m4/{globus,glite,lcmaps}.m4 ./project
./bootstrap
./configure --prefix=${prefix} \
            --with-glite-location=${glite}
            --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav}
make && make install