# Default values
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
+
CC:=gcc
CXX:=g++
-include Makefile.inc
-include ../project/version.properties
+PREFIX?=${glite_location}
+
version=${module.version}
VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/doc
AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
GENSAM=${top_srcdir}/examples/gen_sample_job
+CHECK_VERSION:=VERSION=${version} VERSION_AHEAD=0 perl ${top_srcdir}/project/check_version.pl
SUFFIXES = .T .l
# version_info=-version-info `echo ${version} | cut -d. -f1,2 | tr . :`
-# counted minor versions: 2.1
-offset=1
+# counted minor versions:
+offset=0
version_info:=-version-info ${shell \
perl -e '$$,=":"; @F=split "\\.","${version}"; print $$F[0]+$$F[1]+${offset},$$F[2],$$F[1]' }
${LIB}: ${LIBOBJS}
- ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${glite_location}/lib \
+ ${LINK} ${version_info} -o $@ ${LIBLOBJS} -rpath ${PREFIX}/lib \
${COMMON_LIB} \
-lglite_security_gss_${nothrflavour}
${THRLIB}: ${LIBTHROBJS}
- ${LINK} ${version_info} -o $@ ${LIBTHRLOBJS} -rpath ${glite_location}/lib \
+ ${LINK} ${version_info} -o $@ ${LIBTHRLOBJS} -rpath ${PREFIX}/lib \
${COMMON_LIB_THR} \
-lglite_security_gss_${thrflavour}
${FAKELIB}: ${FAKELIBOBJS}
- ${LINK} ${version_info} -o $@ ${FAKELIBLOBJS} -rpath ${glite_location}/lib \
+ ${LINK} ${version_info} -o $@ ${FAKELIBLOBJS} -rpath ${PREFIX}/lib \
${COMMON_LIB} \
-lglite_security_gss_${nothrflavour}
${FAKETHRLIB}: ${FAKELIBTHROBJS}
- ${LINK} ${version_info} -o $@ ${FAKELIBTHRLOBJS} -rpath ${glite_location}/lib \
+ ${LINK} ${version_info} -o $@ ${FAKELIBTHRLOBJS} -rpath ${PREFIX}/lib \
${COMMON_LIB_THR} \
-lglite_security_gss_${thrflavour}
${PLUSLIB}: ${PLUSOBJS}
- ${LINK} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${glite_location}/lib ${LIB}
+ ${LINK} ${version_info} -o $@ ${PLUSLOBJS} -rpath ${PREFIX}/lib ${LIB}
${THRPLUSLIB}: ${PLUSTHROBJS}
- ${LINK} ${version_info} -o $@ ${PLUSTHRLOBJS} -rpath ${glite_location}/lib ${THRLIB}
+ ${LINK} ${version_info} -o $@ ${PLUSTHRLOBJS} -rpath ${PREFIX}/lib ${THRLIB}
logevent: logevent.o args.o
${LINK} -o $@ logevent.o args.o ${LIB} ${EXT_LIB}
clean:
check_version:
- @perl -ne '/#define GLITE_LB_CLIENT_INTERFACE "(\d+)\.\d+\.\d+"/; \
- $$iface=$$1; \
- $$_="${version}"; /(\d+)\.\d+\.\d+/; \
- if ($$iface != $$1) { \
- print "error: Major version of the interface ($$iface) does not match implementation ($$1)\n" ;\
- exit 1; \
- } \
- ' ${stagedir}/include/glite/lb/interface_version.h
+ ${CHECK_VERSION} ${stagedir}/include/glite/lb/interface_version.h
.PHONY: default all compile examples fake check stage dist distsrc distbin install clean check_version
Revision history:
$Log$
+ Revision 1.6.20.1 2006/09/21 13:21:40 jpospi
+ use check_version.pl
+
+ Revision 1.6 2005/05/26 15:13:40 zurek
+ inserted module.build.file
+
Revision 1.5 2004/10/18 19:16:09 zsalvet
RPM descriptions
<include name="at3" />
<include name="*.T" />
<include name="*.pm" />
+ <include name="check_version.pl" />
</fileset>
</copy>
<antcall target="lbmakefiles" />
do
case "$1" in
"-m") shift; BKSERVER_HOST="$1" ;;
- "-x") LBPROXY="-x -S $1" ;;
+ "-x") LBPROXY="-x" ;;
"-X") shift; LBPROXY="-x"; LBPROXY_STORE_SOCK="-S $1" ;;
"-j") shift; EDG_JOBID="$1" ;;
"-l") shift; LARGE_STRESS="-l $1" ;;
static void
usage(char *name)
{
- fprintf(stderr,"Usage: %s job_id [-x lb_proxy_serve_sock] [-fasthist|-fullhist] [job_id [...]]\n", name);
+ fprintf(stderr,"Usage: %s [-x lb_proxy_serve_sock] [-fasthist|-fullhist] [job_id [...]]\n", name);
fprintf(stderr," %s -all\n", name);
}
static void printstat(edg_wll_JobStat stat, int level)
{
- char *s, *j, ind[10];
+ char *s, *j1,*j2, ind[10];
int i;
s = edg_wll_StatToString(stat.state);
/* print whole flat structure */
printf("%sstate : %s\n", ind, s);
- printf("%sjobId : %s\n", ind, j = edg_wlc_JobIdUnparse(stat.jobId));
+ printf("%sjobId : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.jobId));
printf("%sowner : %s\n", ind, stat.owner);
switch (stat.jobtype) {
case EDG_WLL_STAT_SIMPLE:
break;
}
printf("%sparent_job : %s\n", ind,
- j = edg_wlc_JobIdUnparse(stat.parent_job));
+ j2 = edg_wlc_JobIdUnparse(stat.parent_job));
if (stat.jobtype) {;
printf("%sseed : %s\n", ind, stat.seed);
printf("%schildren_num : %d\n", ind, stat.children_num);
printf("\n");
- free(j);
+ free(j1);
+ free(j2);
free(s);
}
Revision history:
$Log$
+ Revision 1.8.2.1 2006/11/28 20:24:00 akrenek
+ PREFIX is set to stage by default
+ - fix build in the old glite fashion
+ - should not break build in etics
+
+ Revision 1.8 2006/09/20 10:50:08 zsalvet
+ Remove CVS conflict section.
+
Revision 1.7 2006/09/19 20:27:40 akrenek
Builds after merge _RC31
globalprefix=${global.prefix}
lbprefix=${subsystem.prefix}
package=${module.package.name}
-PREFIX=${install.dir}
+# PREFIX=${install.dir}
version=${module.version}
glite_location=${with.glite.location}
globus_prefix=${with.globus.prefix}
int handle_gss_failures(edg_wll_Context ctx, int code, edg_wll_GssStatus *gss_code, const char *text)
{
static char err[256];
- int ret = 0;
+ int myerrno, ret;
+
+ myerrno = errno;
+ ret = 0;
edg_wll_ResetError(ctx);
ret = edg_wll_SetError(ctx,ENOTCONN,err);
break;
case EDG_WLL_GSS_ERROR_ERRNO:
- snprintf(err, sizeof(err), "%s;; GSS Error: system error occured;", text);
- ret = edg_wll_SetError(ctx,ENOTCONN,err);
+ {
+ const char *msg1;
+ char *msg2;
+ msg1 = strerror(myerrno);
+ asprintf(&msg2, "%s;; System Error: %s", text, msg1);
+ ret = edg_wll_SetError(ctx,ENOTCONN,msg2);
+ free(msg2);
+ }
break;
case EDG_WLL_GSS_ERROR_GSS:
snprintf(err, sizeof(err), "%s;; GSS Error: GSS failure occured", text);
{
const char *msg1;
char *msg2;
- msg1 = hstrerror(errno);
+ msg1 = hstrerror(myerrno);
asprintf(&msg2, "%s;; GSS Error: %s", text, msg1);
ret = edg_wll_SetError(ctx,EDG_WLL_ERROR_DNS, msg2);
free(msg2);
int len;
len = edg_wll_plain_read_full(data->conn, buffer, max_len, &data->ctx->p_tmp_timeout);
- if(len < 0)
- edg_wll_SetError(data->ctx, EDG_WLL_IL_PROTO, "plain_reader(): error reading message data");
+ if(len < 0) {
+ edg_wll_SetError(data->ctx, errno, "edg_wll_plain_read_full()");
+ edg_wll_UpdateError(data->ctx, EDG_WLL_IL_PROTO, "plain_reader(): error reading message data");
+ }
return(len);
}
data.conn = conn;
code = read_il_data(&data, &msg, gss_reader);
if(code < 0) {
- edg_wll_SetError(ctx, EDG_WLL_IL_PROTO, "get_reply_gss(): error reading reply");
+ edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO, "get_reply_gss(): error reading reply");
goto get_reply_gss_end;
}
if(decode_il_reply(code_maj, code_min, buf, msg) < 0) {
- edg_wll_SetError(ctx, EDG_WLL_IL_PROTO, "get_reply_gss(): error decoding reply");
+ char *et;
+ asprintf(&et,"get_reply_gss(): error decoding reply \"%s\"", msg);
+ edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO, et);
+ if (et) free(et);
goto get_reply_gss_end;
}
len = encode_il_msg(&buffer, &ll);
}
if(len < 0) {
- edg_wll_SetError(ctx,ENOMEM,"edg_wll_log_proxy_write(): error encoding message");
+ edg_wll_SetError(ctx,errno,"encode_il_msg()");
+ edg_wll_UpdateError(ctx,ENOMEM,"edg_wll_log_proto_client_proxy(): error encoding message");
return -1;
}
fprintf(stderr,"edg_wll_log_proxy_write: sending message\n");
#endif
if ((count = edg_wll_plain_write_full(conn, buffer, len, &ctx->p_tmp_timeout)) < 0) {
- edg_wll_SetError(ctx, EDG_WLL_IL_PROTO,"edg_wll_log_proxy_write(): error sending message to socket");
+ edg_wll_SetError(ctx, errno, "edg_wll_plain_write_full()");
+ edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO,"edg_wll_log_proto_client_proxy(): error sending message to socket");
return -1;
}
len = encode_il_msg(&buffer, &ll);
}
if(len < 0) {
- edg_wll_SetError(ctx, ENOMEM, "edg_wll_log_direct_write(): error encoding message");
+ edg_wll_SetError(ctx, errno, "encode_il_msg()");
+ edg_wll_UpdateError(ctx, ENOMEM, "edg_wll_log_proto_client_direct(): error encoding message");
return -1;
}
#ifdef EDG_WLL_LOG_STUB
fprintf(stderr,"edg_wll_log_direct_read: reading answer from bkserver\n");
#endif
if ((err = get_reply_gss(ctx, con, &answer, &lbproto_code, &code)) != 0 ) {
- edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO,"edg_wll_log_direct_read(): error reading answer from bkserver");
+ edg_wll_UpdateError(ctx, EDG_WLL_IL_PROTO,"edg_wll_log_proto_client_direct(): error reading answer from L&B direct server");
if (answer) free(answer);
return -1;
} else {