- use nonthr common library
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2004 12:07:41 +0000 (12:07 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 7 Jul 2004 12:07:41 +0000 (12:07 +0000)
- build without VOMS & GACL

org.glite.lb.server/Makefile
org.glite.lb.server/build.xml
org.glite.lb.server/src/bkserverd.c
org.glite.lb.server/src/lb_authz.c
org.glite.lb.server/src/lb_authz.h
org.glite.lb.server/src/lbs_db.c
org.glite.lb.server/src/notif_match.c
org.glite.lb.server/src/srv_purge.c

index b3a55bd..dff25cb 100644 (file)
@@ -1,45 +1,71 @@
-include Makefile.inc
+# defaults
+top_srcdir=.
+builddir=build
+top_builddir=${top_srcdir}/${builddir}
+stagedir=.
+distdir=.
+globalprefix=glite
+lbprefix=lb
+package=glite-lb-client
+version=0.0.0
+PREFIX=/opt/glite
+
+glite_location=/opt/glite
+globus_prefix=/opt/globus
+nothrflavour=gcc32
+thrflavour=gcc32pthr
+expat_prefix=/opt/expat
+ares_prefix=/opt/ares
+
+-include Makefile.inc
 
 YACC=bison -y
 
-VPATH:=${src} 
-AT3:=perl -I${lbconfig} ${lbproject}/at3
+VPATH=${top_srcdir}/src
+AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
+
 SUFFIXES = .T 
 
 DEBUG:=-g -O0 
-CFLAGS:=${DEBUG} -I${stageinc} -I${src} -I. \
-       -I${repository}/${voms}/include \
-       -I${repository}/${gacl}/include \
-       -I${repository}/${expat}/include \
-       -I${repository}/${mysql}/include \
-       -I/usr/include/libxml2 \
-       -I${repository}/${globus}/include/${globusflavour} \
-       -I${repository}/${globus}/include/${globusflavour}/openssl
+# not yet
+#      -I${voms}/include \
+#      -I${gacl}/include \
+#      -I/usr/include/libxml2 \
+
+# -DNO_VOMS -DNO_GACL to be removed when voms/gridsite are available
+CFLAGS:= -DNO_VOMS -DNO_GACL \
+       ${DEBUG} -I${stagedir}/include -I${top_srcdir}/src -I. \
+       -I${expat_prefix}/include \
+       -I${mysql_prefix}/include \
+       -I${globus_prefix}/include/${nothrflavour} \
+       -I${globus_prefix}/include/${nothrflavour}/openssl
 
 LINK:=libtool --mode=link ${CC} ${LDFLAGS} 
 INSTALL:=libtool --mode=install install
 
 # assisst & gss due to VOMS only
+#      -lglobus_gss_assist_${nothrflavour} \
+#      -lglobus_gssapi_gsi_${nothrflavour} \
 
-GLOBUS_LIBS:= -L${repository}/${globus}/lib \
-       -lglobus_gss_assist_${globusflavour} \
-       -lglobus_gssapi_gsi_${globusflavour} \
-       -lglobus_common_${globusflavour} \
-       -lssl_${globusflavour}
+GLOBUS_LIBS:= -L${globus_prefix}/lib \
+       -lglobus_common_${nothrflavour} \
+       -lssl_${nothrflavour}
 
 
 # XXX: our vomsc.la depends on badly installed expat
 
-EXT_LIBS:= -L${repository}/${ares}/lib -lares \
-       -L${repository}/${mysql}/lib -lmysqlclient \
-       -L${repository}/${gacl}/lib -lgacl \
-       ${repository}/${voms}/lib/libvomsc.a \
-       -L${repository}/${expat}/lib -lexpat \
+# not yet
+#      -L${repository}/${gacl}/lib -lgacl \
+#      ${repository}/${voms}/lib/libvomsc.a \
+
+EXT_LIBS:= -L${ares_prefix}/lib -lares \
+       -L${mysql_prefix}/lib -lmysqlclient -lz\
+       -L${expat_prefix}/lib -lexpat \
        ${GLOBUS_LIBS}
 
-COMMON_LIB:= -L${stagelib} -lglite_lb_common
+COMMON_LIB:= -L${stagedir}/lib -lglite_lb_common_${nothrflavour}
 
-HELPERS:= -L${stagelib} -lglite_wms_tls_ssl_helpers
+HELPERS:= -L${stagedir}/lib -lglite_wms_tls_ssl_helpers
 
 
 SERVER_OBJS:= bkserverd.o get_events.o index.o jobstat.o jobstat_supp.o \
@@ -63,7 +89,7 @@ glite_lb_bkindex: ${INDEX_OBJS}
        ${LINK} -o $@ ${INDEX_OBJS} ${COMMON_LIB} ${HELPERS} ${EXT_LIBS}
 
 all stage export: compile
-       ${INSTALL} -m 755 glite_lb_bkserverd glite_lb_bkindex ${stagebin}
+       ${INSTALL} -m 755 glite_lb_bkserverd glite_lb_bkindex ${stagedir}/bin
 
 
 %.c: %.c.T
index 4aa4105..94e131c 100755 (executable)
 <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+       Copyright (c) 2004 on behalf of the EU EGEE Project: 
+       The European Organization for Nuclear Research (CERN), 
+       Istituto Nazionale di Fisica Nucleare (INFN), Italy
+       Datamat Spa, Italy
+       Centre National de la Recherche Scientifique (CNRS), France
+       CS Systeme d'Information (CSSI), France
+       Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
+       Universiteit van Amsterdam (UvA), Netherlands
+       University of Helsinki (UH.HIP), Finland
+       University of Bergen (UiB), Norway
+       Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
 
-<project name="lb" default="dist">
+       Build file for the GLite LB Client module
        
+       Authors: Ales Krenek <ljocha@ics.muni.cz>
+       Version info: $Id$
+       Release: $Name$
+
+       Revision history:
+       $Log$
+       Revision 1.3  2004/07/06 17:45:30  flammer
+       Update of classpath definitions, targets & configure file.
+       
+       Revision 1.2  2004/06/23 00:29:33  dimeglio
+       Added standard comments and handling of support files
+       
+-->
+
+<project name="server" default="compile">
+       
+       <!-- =========================================
+                Builds the GLite LB Client Module
+            ========================================= -->
+       
+       <!-- =========================================
+            Import properties (order is important)
+            ========================================= -->
+
+       <!-- import baseline & user properties -->
        <import file="../org.glite/project/baseline.properties.xml" />
+
+       <!-- import component build properties,
+                       component properties &
+                       component common properties -->
        <import file="./project/properties.xml"/>
+       
+       <!-- import subsystem build properties,
+                       subsystem properties &
+                       subsystem common properties -->
        <import file="${subsystem.properties.file}"/>
-       <import file="${global.properties.file}" />
 
+       <!-- import global build properties &
+                       global properties -->
+       <import file="${global.properties.file}" />
+               
+       <!-- =========================================
+                Load dependency property files (order is important)
+            ========================================= -->
        <property file="${user.dependencies.file}"/>
        <property file="${component.dependencies.file}" />
        <property file="${subsystem.dependencies.file}" />
        <property file="${global.dependencies.file}"/>
        
+       <!-- =========================================
+                Load configure options (order is important)
+            ========================================= -->
+       <import file="${global.configure.options.file}"/>
+       <import file="${component.configure.options.file}"/>
+
+       <!-- =========================================
+                Import task definitions (order is important)
+            ========================================= -->
        <import file="${subsystem.taskdefs.file}" />
        <import file="${global.taskdefs.file}" />
+                       
+       <!-- =========================================
+                Load common targets
+            ========================================= -->
+       <import file="${global.targets-simple_make.file}" />
 
-       <import file="${global.targets-external-dependencies.file}"/>   
-       <import file="${global.targets-make.file}" />
-               
+       <!-- =========================================
+                Load version file 
+            ========================================= -->
        <property file="${module.version.file}"/>
-
+               
+       <!-- ==============================================
+                Local private targets
+            ============================================== -->
+       
        <target name="localinit"
                description="Module specific initialization tasks">
-               <antcall target="lbmakefiles"/>
+        <!-- Copy support files from the subsystem project to the component project-->
+               <copy toDir="${module.project.dir}">
+                       <fileset dir="${subsystem.project.dir}">
+                               <include name="at3" />
+                               <include name="*.T" />
+                               <include name="*.pm" />
+                       </fileset>
+               </copy> 
+               <antcall target="lbmakefiles" />
        </target>
-
+               
        <target name="localcompile"
                description="Module specific compile tasks">
        </target>
        
        <target name="localclean"
                description="Module specific cleaning tasks">
+               <delete>
+                       <fileset dir="${module.project.dir}">
+                               <include name="at3" />
+                               <include name="*.T" />
+                               <include name="*.pm" />
+                       </fileset>
+               </delete>       
        </target>
        
 </project>             
index 1d22296..bae5a04 100644 (file)
@@ -35,6 +35,8 @@
 #include "glite/lb/purge.h"
 #include "glite/lb/context.h"
 #include "glite/lb/mini_http.h"
+#include "glite/lb/context-int.h"
+
 #include "lb_http.h"
 #include "lb_proto.h"
 #include "index.h"
index 3f4c39b..c249f47 100644 (file)
@@ -5,6 +5,8 @@
 #include <errno.h>
 #include <syslog.h>
 
+#ifndef NO_VOMS
+
 #include <voms_apic.h>
 #include <openssl/ssl.h>
 #include <libxml/parser.h> 
@@ -137,6 +139,17 @@ edg_wll_FreeVomsGroups(edg_wll_VomsGroups *groups)
    }
 }
 
+#else /* NO_VOMS */
+
+int
+edg_wll_GetVomsGroups() { return 0; }
+
+void edg_wll_FreeVomsGroups() {}
+
+#endif
+
+
+#if !defined(NO_VOMS) && !defined(NO_GACL)
 
 static int
 parse_creds(edg_wll_VomsGroups *groups, char *subject, GACLuser **gacl_user)
@@ -763,3 +776,19 @@ end:
 
        return edg_wll_Error(ctx, NULL, NULL);
 }
+
+#else /* VOMS & GACL */
+
+
+int edg_wll_CheckACL() { return EPERM; }
+int edg_wll_EncodeACL() { return 0; }
+int edg_wll_DecodeACL() { return 0; }
+int edg_wll_InitAcl() { return 0; }
+int edg_wll_FreeAcl() { return 0; }
+int edg_wll_HandleCounterACL() { return 0; }
+int edg_wll_UpdateACL() { return 0; }
+int edg_wll_GetACL() { return 0; }
+
+
+#endif
+
index 43ffc1a..87af429 100644 (file)
@@ -1,28 +1,33 @@
 #ifndef LB_AUTHZ_H
 #define LB_AUTHZ_H
 
-#include <stdio.h>
+#ifndef NO_GACL
 #include <gacl.h>
-
-#include "glite/lb/context-int.h"
+#endif 
 
 typedef struct _edg_wll_Acl {
+#ifndef NO_GACL
        GACLacl *value;
+#else
+       void    *value; /* XXX */
+#endif
        char    *string;
 } _edg_wll_Acl;
 typedef struct _edg_wll_Acl *edg_wll_Acl;
 
-extern int
-edg_wll_InitAcl(edg_wll_Acl *);
+#ifndef NO_VOMS
 
-extern void
-edg_wll_FreeAcl(edg_wll_Acl);
+# ifndef NO_GACL
+
+#include <stdio.h>
+
+#include "glite/lb/context-int.h"
 
 extern int
-edg_wll_GetVomsGroups(edg_wll_Context, char *, char *);
+edg_wll_InitAcl(edg_wll_Acl *);
 
 extern void
-edg_wll_FreeVomsGroups(edg_wll_VomsGroups *);
+edg_wll_FreeAcl(edg_wll_Acl);
 
 extern int
 edg_wll_UpdateACL(edg_wll_Context, edg_wlc_JobId, char *, int, int, int, int);
@@ -39,4 +44,14 @@ edg_wll_EncodeACL(GACLacl *, char **);
 extern int
 edg_wll_GetACL(edg_wll_Context, edg_wlc_JobId, edg_wll_Acl *);
 
+#endif /* NO_GACL */
+
+extern int
+edg_wll_GetVomsGroups(edg_wll_Context, char *, char *);
+
+extern void
+edg_wll_FreeVomsGroups(edg_wll_VomsGroups *);
+
+#endif /* NO_VOMS */
+
 #endif
index 53809d2..ebe6362 100644 (file)
@@ -1,8 +1,8 @@
 #ident "$Header$"
 
-#include "mysql/mysql.h"       // MySql header file
-#include "mysql/mysqld_error.h"
-#include "mysql/errmsg.h"
+#include "mysql.h"     // MySql header file
+#include "mysqld_error.h"
+#include "errmsg.h"
 
 #include <stdio.h>
 #include <string.h>
index d50de60..10d97d4 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "glite/lb/producer.h"
 #include "glite/lb/consumer.h"
-#include "glite/lb/context.h"
+#include "glite/lb/context-int.h"
 #include "glite/lb/trio.h"
 
 #include "lbs_db.h"
@@ -142,7 +142,8 @@ static int notif_match_conditions(edg_wll_Context ctx,const edg_wll_JobStat *sta
 static int notif_check_acl(edg_wll_Context ctx,const edg_wll_JobStat *stat,const char *recip)
 {
        edg_wll_Acl     acl = calloc(1,sizeof *acl);
-       GACLacl         *gacl;
+/* XXX: NO_GACL        GACLacl         *gacl; */
+       void            *gacl;
        int             ret;
 
        edg_wll_ResetError(ctx);
index 822d9c5..c7144b4 100644 (file)
@@ -8,11 +8,12 @@
 #include <assert.h>
 #include <string.h>
 #include <time.h>
+#include <errno.h>
 
 #include "glite/wms/jobid/cjobid.h"
 
 #include "glite/lb/trio.h"
-#include "glite/lb/context.h"
+#include "glite/lb/context-int.h"
 #include "glite/lb/events_parse.h"
 #include "glite/lb/mini_http.h"
 #include "glite/lb/ulm_parse.h"