Building and packaging on Fedora:
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 24 Jul 2012 11:20:07 +0000 (11:20 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 24 Jul 2012 11:20:07 +0000 (11:20 +0000)
- more strict linking - added missing libraries
- fix some warnings

org.glite.px.proxyrenewal/Makefile
org.glite.px.proxyrenewal/src/api.c
org.glite.px.proxyrenewal/src/client.c
org.glite.px.proxyrenewal/src/common.c
org.glite.px.proxyrenewal/src/renewal_core.c
org.glite.px.proxyrenewal/src/voms.c

index e0d27a7..691e79f 100644 (file)
@@ -55,6 +55,8 @@ GLOBUS_NOTHR_INC:= -I${globus_prefix}/include/${nothrflavour}
 GLOBUS_THR_INC:= -I${globus_prefix}/include/${thrflavour}
 GLOBUS_NOTHR_LIBS:=-L${globus_prefix}/lib \
        -lglobus_common_${nothrflavour}
+GLOBUS_THR_LIBS:=-L${globus_prefix}/lib \
+       -lglobus_common_${thrflavour}
 
 myproxy_prefix=${myproxy-devel_prefix}
 myproxy_prefix?=${globus_prefix}
@@ -121,10 +123,16 @@ ifeq (${thrflavour},)
 lib_LTLIBRARIES=${LIB} ${LIB_CORE}
 default_libcore=${LIB_CORE}
 default_lib=${LIB}
+GLOBUS_EXTRA_LIBS=-lglobus_gsi_proxy_core -lglobus_gsi_credential \
+       -lglobus_gsi_cert_utils -lglobus_common
 else
 lib_LTLIBRARIES=${NOTHRLIB} ${THRLIB} ${LIB_CORE_NOTHR}
 default_libcore=${LIB_CORE_NOTHR}
 default_lib=${NOTHRLIB}
+GLOBUS_EXTRA_LIBS=-lglobus_gsi_proxy_core_${nothrflavour} \
+       -lglobus_gsi_credential_${nothrflavour} \
+       -lglobus_gsi_cert_utils_${nothrflavour} \
+       -lglobus_common_${nothrflavour}
 endif
 
 DAEMON:=glite-proxy-renewd
@@ -146,7 +154,7 @@ ${LIB}: ${LIBOBJ}
        ${LINK} ${version_info} -o $@ ${LIBLOBJ} -rpath ${prefix}/${libdir}
 
 ${LIB_CORE}: ${LIB_CORE_OBJS}
-       ${LINK} ${version_info} -o $@ ${LIB_CORE_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIBS} ${VOMS_LIBS}
+       ${LINK} ${version_info} -o $@ ${LIB_CORE_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIBS} ${VOMS_LIBS} ${GLOBUS_GSSAPI_GSI_LIBS} -lglobus_gsi_proxy_core
 else
 ${NOTHRLIB}: ${LIBOBJ}
        ${LINK} ${version_info} -o $@ ${LIBLOBJ} -rpath ${prefix}/${libdir}
@@ -155,14 +163,14 @@ ${THRLIB}: ${THRLIBOBJ}
        ${LINK} ${version_info} -o $@ ${THRLIBLOBJ} -rpath ${prefix}/${libdir}
 
 ${LIB_CORE_NOTHR}: ${LIB_CORE_OBJS}
-       ${LINK} ${version_info} -o $@ ${LIB_CORE_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIB_NOTHR} ${VOMS_LIBS_NOTHR}
+       ${LINK} ${version_info} -o $@ ${LIB_CORE_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIB_NOTHR} ${VOMS_LIBS_NOTHR} ${GLOBUS_NOTHR_LIBS} -lglobus_gsi_proxy_core_${nothrflavour}
 
 ${LIB_CORE_THR}: ${LIB_CORE_THR_OBJS}
-       ${LINK} ${version_info} -o $@ ${LIB_CORE_THR_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIB_THR} ${VOMS_LIBS_THR}
+       ${LINK} ${version_info} -o $@ ${LIB_CORE_THR_LOBJS} -rpath ${prefix}/${libdir} ${MYPROXY_LIB_THR} ${VOMS_LIBS_THR} ${GLOBUS_THR_LIBS} -lglobus_gsi_proxy_core_${thrflavour}
 endif
 
 ${DAEMON}: ${DAEMONOBJ} ${default_libcore}
-       ${LINK} -o $@ ${DAEMONOBJ} ${default_libcore}
+       ${LINK} -o $@ ${DAEMONOBJ} ${default_libcore} ${GLOBUS_GSSAPI_GSI_LIBS} ${GLOBUS_EXTRA_LIBS}
 
 ${CLIENT}: ${CLIENTOBJ} ${default_lib}
        ${LINK} -o $@ ${CLIENTOBJ} ${default_lib} ${GLOBUS_GSSAPI_GSI_LIBS}
index 9e254ed..5ca221e 100644 (file)
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+#include <sys/time.h>
 #include "renewal.h"
 #include "renewal_locl.h"
 
index 4ef0984..36882fc 100644 (file)
@@ -37,7 +37,7 @@ static struct option const long_options[] = {
 static char short_options[] = "hvs:p:f:j:";
 
 static void
-usage(exit_code)
+usage(int exit_code)
 {
    fprintf(stdout, "Usage: edg-wl-renew [option] operation\n"
           "\t-s myproxy_server [-p port] -f filename -j jobid start |\n"
index 1b1463c..71f1447 100644 (file)
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+#include <sys/time.h>
 #include "renewal_locl.h"
 
 #ident "$Header$"
index 8074aa0..9349a47 100644 (file)
@@ -16,6 +16,9 @@
  * limitations under the License.
  */
 
+#define _GNU_SOURCE
+#include <stdio.h>
+
 #include <myproxy.h>
 #include <myproxy_delegation.h>
 
@@ -293,8 +296,7 @@ glite_renewal_core_destroy_ctx(glite_renewal_core_context context)
 {
    if (context == NULL)
       return 0;
-   if (context->err_message);
-      free(context->err_message);
+   free(context->err_message);
    free(context);
    return 0;
 }
index 934d912..098748f 100644 (file)
@@ -159,7 +159,7 @@ get_voms_ac(glite_renewal_core_context ctx, char *server, int port,
            char *server_subj, char *cmd, struct vomsdata *vd, AC **ac)
 {
     int ret, voms_error = 0, voms_version;
-    unsigned char *p;
+    const unsigned char *p;
     void *buf = NULL;
     int buf_len;
     char *err_msg;