[voms/el5] Update the gsoap patch

Mattias Ellert ellert at fedoraproject.org
Thu Jul 3 07:24:20 UTC 2014


commit 61f853adb1294558a024111f2b639230e6a0e16f
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Jul 3 09:23:30 2014 +0200

    Update the gsoap patch

 voms-gsoap.patch |  190 ++++++++++++++++++++++++++++++++++++++++++++++--------
 voms.spec        |    7 ++-
 2 files changed, 169 insertions(+), 28 deletions(-)
---
diff --git a/voms-gsoap.patch b/voms-gsoap.patch
index bf6cf3c..44a3395 100644
--- a/voms-gsoap.patch
+++ b/voms-gsoap.patch
@@ -1,50 +1,175 @@
-diff -ur voms-2.0.2.orig/src/server/Makefile.am voms-2.0.2/src/server/Makefile.am
---- voms-2.0.2.orig/src/server/Makefile.am	2011-04-27 15:14:41.000000000 +0200
-+++ voms-2.0.2/src/server/Makefile.am	2011-05-30 11:50:48.147654668 +0200
-@@ -9,14 +9,31 @@
+diff --git a/configure.ac b/configure.ac
+index 98b6934..6b82309 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,6 +21,7 @@ AC_SUBST(WORKDIR)
+ AC_PROG_CXX
+ AC_PROG_AWK
+ AC_PROG_CC
++AM_PROG_CC_C_O
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+@@ -30,23 +31,34 @@ AC_PROG_YACC
+ AC_PROG_LEX
+ AC_COMPILER
+ 
+-# Checks for libraries.
+-AC_OPENSSL
++PKG_CHECK_MODULES([OPENSSL], [openssl])
+ 
+-# check for dependencies based on project/*m4
+-AC_EXPAT([], have_expat=yes, have_expat=no)        # taken from org.glite
++PKG_CHECK_MODULES([GSOAP],[gsoap >= 2.7])
++PKG_CHECK_MODULES([GSOAP_PP],[gsoap++ >= 2.7])
++PKG_CHECK_MODULES([GSOAP_SSL],[gsoapssl >= 2.7])
++PKG_CHECK_MODULES([GSOAP_SSL_PP],[gsoapssl++ >= 2.7])
+ 
+-AC_ENABLE_DOCS
++AC_CHECK_HEADER([expat.h], 
++    [], 
++    [AC_MSG_ERROR("Could not find expat.h. Please install the expat development package.")],
++    [])
++
++AC_CHECK_LIB([expat],
++    [XML_ParserCreate],
++    [EXPAT_LIBS=-lexpat],
++    [AC_MSG_ERROR("Error checking libexpat. Please install the expat development package.")]
++    )
+ 
++AC_SUBST(EXPAT_LIBS)
++
++AC_WSDL2H
++AC_ENABLE_DOCS
+ 
+ # Checks for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS([fcntl.h libintl.h limits.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h termios.h unistd.h malloc.h openssl/e_os.h openssl/e_os2.h wchar.h])
+-AC_LANG_PUSH(C++)
+-AC_CHECK_HEADERS(strstream strstream.h)
+-AC_LANG_POP(C++)
++AC_CHECK_HEADERS([fcntl.h libintl.h limits.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h termios.h unistd.h malloc.h wchar.h])
+ 
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_HEADER_STDBOOL
+diff --git a/m4/wsdl2h.m4 b/m4/wsdl2h.m4
+new file mode 100644
+index 0000000..4db40ce
+--- /dev/null
++++ b/m4/wsdl2h.m4
+@@ -0,0 +1,63 @@
++dnl Copyright (c) Istituto Nazionale di Fisica Nucleare (INFN). 2006-2013.
++dnl
++dnl Licensed under the Apache License, Version 2.0 (the "License");
++dnl you may not use this file except in compliance with the License.
++dnl You may obtain a copy of the License at
++dnl
++dnl     http://www.apache.org/licenses/LICENSE-2.0
++dnl
++dnl Unless required by applicable law or agreed to in writing, software
++dnl distributed under the License is distributed on an "AS IS" BASIS,
++dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++dnl See the License for the specific language governing permissions and
++dnl limitations under the License.
++
++AC_DEFUN([AC_WSDL2H],
++[
++	
++	AC_ARG_WITH(gsoap-wsdl2h,
++        	[  --with-gsoap-wsdl2h=CMD     the wsdl2h command that should be used. (/usr)],
++        	[with_gsoap_wsdl2h="$withval"],
++        	[with_gsoap_wsdl2h="/usr/bin/wsdl2h"])
++	
++	dnl SOAPCPP flags in addition to what is already set by gsoap
++	SOAPCPP2="/usr/bin/soapcpp2"
++	AC_SUBST(SOAPCPP2)
++	
++	dnl wsdl2h macros. we try to udnerstand which flags need to be used depending
++	dnl on wsdl2h version
++	AC_MSG_CHECKING([wsdl2h version])
++
++	WSDL2H="$with_gsoap_wsdl2h"
++	
++	if ! test -e "$WSDL2H"; then
++		AC_MSG_ERROR("wsdl2h executable: $WSDL2H does not exist.")
++	fi
++
++	if ! test -x "$WSDL2H"; then
++		AC_MSG_ERROR("wsdl2h executable: $WSDL2H cannot be executed.")
++	fi
++	
++	dnl The ridicoulous escaping with quadrigraph is needed as square brakets
++	dnl confuse m4. 
++	dnl 
++	dnl @<:@  becomes [
++	dnl @:>@  becomes ]
++	wsdl2h_version=$($WSDL2H -help 2>&1 | grep -o '@<:@0-9@:>@\.@<:@0-9@:>@\.@<:@0-9@:>@*$')
++	
++	normalized_version=$(printf "%02d%02d%02d" $(echo $wsdl2h_version | tr '.' ' '))
++
++	WSDL2H_FLAGS=""
++
++	if test "$normalized_version" -ge "010216"; then
++		WSDL2H_FLAGS="-z1"
++	elif test "$normalized_version" -ge "010200"; then
++		WSDL2H_FLAGS="-z"
++	else
++		AC_MSG_ERROR([unsupported wsdl2h version: $wsdl2h_version])
++	fi
++
++	AC_MSG_RESULT([yes. wsdl2h version $wsdl2h_version detected.])
++	AC_SUBST(WSDL2H)
++	AC_SUBST(WSDL2H_FLAGS)
++])
+diff --git a/src/server/Makefile.am b/src/server/Makefile.am
+index 7457d39..ab36fe7 100644
+--- a/src/server/Makefile.am
++++ b/src/server/Makefile.am
+@@ -9,13 +9,25 @@ voms_SOURCES = \
  	attribute.h \
  	uuid.c \
  	uuid.h \
 -	attribute.cc \
+-	soapC.c \
+-	stdsoap2.c
 +	attribute.cc
+ 
+-EXTRA_DIST = soapH.h soapdefs.h stdsoap2.h soapStub.h
 +nodist_voms_SOURCES = \
- 	soapC.c \
--	stdsoap2.c
++	soapC.cpp \
 +	soapH.h \
 +	soapStub.h
  
--EXTRA_DIST = soapH.h soapdefs.h stdsoap2.h soapStub.h
+-#	$(top_builddir)/src/sslutils/libssl_utils_nog.la 
 +vomsd.$(OBJEXT) vomsd-rest.$(OBJEXT): soapH.h
 +voms-vomsd.$(OBJEXT) voms-vomsd-rest.$(OBJEXT): soapH.h
-+soapH.h soapStub.h: soapC.c
- 
--#	$(top_builddir)/src/sslutils/libssl_utils_nog.la 
-+soapC.c: VOMSAC.h
-+	soapcpp2 -c VOMSAC.h
- 
-+VOMSAC.h: VOMSAC.wsdl
-+	wsdl2h -c VOMSAC.wsdl
-+
-+EXTRA_DIST = VOMSAC.wsdl
++soapH.h soapStub.h: soapC.cpp
 +
-+CLEANFILES = soap* VOMSAC.h
++soapC.cpp: VOMSAC.h
++	$(SOAPCPP2) VOMSAC.h
 +
-+GSOAP_CFLAGS = $(shell pkg-config --cflags gsoapssl) -DHAVE_OPENSSL_SSL_H
-+GSOAP_LIBS = -lgsoapssl
++VOMSAC.h: VOMSAC.wsdl
++	$(WSDL2H) $(WSDL2H_FLAGS) -s VOMSAC.wsdl
 +
-+voms_CFLAGS = $(GSOAP_CFLAGS)
-+voms_CXXFLAGS = $(GSOAP_CFLAGS)
++EXTRA_DIST= VOMSAC.wsdl
++CLEANFILES= soap* VOMSAC.h vomsSOAP*
+ 
  voms_LDADD = \
  	$(top_builddir)/src/socklib/libsock_nog.la \
- 	$(top_builddir)/src/common/libutilities_nog.la \
-@@ -25,14 +42,11 @@
+@@ -25,14 +37,16 @@ voms_LDADD = \
  	$(top_builddir)/src/replib/librep.la \
  	$(top_builddir)/src/log/liblog.la \
  	$(top_builddir)/src/api/ccapi/libvomsapi.la \
 -	$(OPENSSL_LIBS) $(EXPAT_LIBS) -ldl
--
++	$(GSOAP_SSL_PP_LIBS) \
++	$(OPENSSL_LIBS) \
++	$(EXPAT_LIBS) \
++	-ldl 
+ 
 -voms_LDFLAGS =
-+	$(GSOAP_LIBS) $(OPENSSL_LIBS) $(EXPAT_LIBS) -ldl
++voms_CFLAGS = $(GSOAP_SSL_PP_CFLAGS) -DHAVE_OPENSSL_SSL_H
  
  AM_CPPFLAGS = \
  	-I$(top_srcdir)/src/include \
@@ -53,3 +178,16 @@ diff -ur voms-2.0.2.orig/src/server/Makefile.am voms-2.0.2/src/server/Makefile.a
  	$(NO_GLOBUS_FLAGS)
  
  endif
+diff --git a/src/server/vomsd-rest.cc b/src/server/vomsd-rest.cc
+index cff2c93..960b937 100644
+--- a/src/server/vomsd-rest.cc
++++ b/src/server/vomsd-rest.cc
+@@ -117,7 +117,7 @@ makeACREST(struct soap *soap, const std::string& command, const std::string& ord
+   if (unknown)
+     vr.setError(WARN_UNKNOWN_COMMAND, "Unknown parameters in the request were ignored!");
+ 
+-  (void)makeACSSL(vr, soap->ssl, command, orderstring, targets, requested, selfpointer);
++  (void)makeACSSL(vr, (SSL*)soap->ssl, command, orderstring, targets, requested, selfpointer);
+ 
+   int value;
+   std::string output = vr.makeRESTAnswer(value);
diff --git a/voms.spec b/voms.spec
index 581f8bc..84c7bd3 100644
--- a/voms.spec
+++ b/voms.spec
@@ -5,7 +5,7 @@
 Name:		voms
 Version:	2.0.11
 %global tagver %(tr . _ <<< %{version})
-Release:	6%{?dist}
+Release:	7%{?dist}
 Summary:	Virtual Organization Membership Service
 
 Group:		System Environment/Libraries
@@ -127,7 +127,7 @@ administrate it remotely using command line tools or a web interface.
 %patch2 -p1
 
 # Remove embedded gsoap sources
-rm src/server/stdsoap2.c src/server/stdsoap2.h src/server/soap*
+rm src/server/stdsoap2.c src/server/stdsoap2.h src/server/soap* m4/expat.m4
 
 # rebootstrap
 ./autogen.sh
@@ -270,6 +270,9 @@ fi
 %doc README.Fedora
 
 %changelog
+* Wed Jul 02 2014 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.0.11-7
+- Update the gsoap patch
+
 * Thu Jun 26 2014 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.0.11-6
 - Clean up SHA2 patch
 


More information about the scm-commits mailing list