From 8ace1c856c43a64c4ea955f78b1d7e490692ede1625125cc1cdeb4825da159b4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 28 Jan 2016 19:29:50 +0000 Subject: [PATCH] moar patches OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=46 --- gsoap-00-builtsource.diff | 1 + gsoap-02-typepuns.diff | 2 +- gsoap-03-seqpoint.diff | 1 + gsoap-allocator.diff | 2 ++ gsoap-mindeflateratio.diff | 1 + gsoap-no-tcpfastopen-fail.diff | 29 +++++++++++++++++ gsoap-reset-error-code.diff | 58 ++++++++++++++++++++++++++++++++++ gsoap.spec | 4 ++- 8 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 gsoap-no-tcpfastopen-fail.diff create mode 100644 gsoap-reset-error-code.diff diff --git a/gsoap-00-builtsource.diff b/gsoap-00-builtsource.diff index ec317c8..ad3eeae 100644 --- a/gsoap-00-builtsource.diff +++ b/gsoap-00-builtsource.diff @@ -1,5 +1,6 @@ From: Jan Engelhardt Date: 2016-01-28 19:30:10.973606466 +0100 +References: http://sf.net/p/gsoap2/patches/156/ Every .c/.cpp file which is updated/created needs to be in BUILT_SOURCES. diff --git a/gsoap-02-typepuns.diff b/gsoap-02-typepuns.diff index 45803ea..a807506 100644 --- a/gsoap-02-typepuns.diff +++ b/gsoap-02-typepuns.diff @@ -1,4 +1,4 @@ -References: https://sourceforge.net/p/gsoap2/patches/124/attachment/gsoap-aliasing.patch +References: https://sf.net/p/gsoap2/patches/124/ --- gsoap/plugin/wsaapi.c | 2 +- diff --git a/gsoap-03-seqpoint.diff b/gsoap-03-seqpoint.diff index 1aac9d5..41d97b4 100644 --- a/gsoap-03-seqpoint.diff +++ b/gsoap-03-seqpoint.diff @@ -1,5 +1,6 @@ From: Jan Engelhardt Date: 2016-01-28 19:19:57.092815111 +0100 +References: http://sf.net/p/gsoap2/patches/157/ In file included from stdsoap2_ssl.c:60:0: stdsoap2_ssl.c: In function ‘soap_getgziphdr’: diff --git a/gsoap-allocator.diff b/gsoap-allocator.diff index 462d19b..d81c8cf 100644 --- a/gsoap-allocator.diff +++ b/gsoap-allocator.diff @@ -1,3 +1,5 @@ +References: http://sf.net/p/gsoap2/bugs/1007/ + --- gsoap/stdsoap2.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gsoap-mindeflateratio.diff b/gsoap-mindeflateratio.diff index e4fe859..d9598cf 100644 --- a/gsoap-mindeflateratio.diff +++ b/gsoap-mindeflateratio.diff @@ -1,4 +1,5 @@ From: Jan Engelhardt +References: http://sf.net/p/gsoap2/patches/158/ gsoap has a weird "protection": if content is compressed too well, it is considered evil and dropped. diff --git a/gsoap-no-tcpfastopen-fail.diff b/gsoap-no-tcpfastopen-fail.diff new file mode 100644 index 0000000..e9f080b --- /dev/null +++ b/gsoap-no-tcpfastopen-fail.diff @@ -0,0 +1,29 @@ +From: Folkert van Heusden / Jan Engelhardt +References: http://sf.net/p/gsoap2/patches/159/ + +setsockopt TCP_FASTOPEN can fail with -ENOPROTOSUPPORT if the kernel +can't do it, and then all of gsoap aborts :( +Ignore return value, so that the zarafa-server still starts even +in the absence of TCP_FASTOPEN. + +--- + gsoap/stdsoap2.cpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +Index: gsoap-2.8.22/gsoap/stdsoap2.cpp +=================================================================== +--- gsoap-2.8.22.orig/gsoap/stdsoap2.cpp ++++ gsoap-2.8.22/gsoap/stdsoap2.cpp +@@ -5140,11 +5140,7 @@ soap_bind(struct soap *soap, const char + } + #endif + #ifdef TCP_FASTOPEN +- if (!(soap->omode & SOAP_IO_UDP) && setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int))) +- { soap->errnum = soap_socket_errno(soap->master); +- soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_FASTOPEN failed in soap_bind()", SOAP_TCP_ERROR); +- return SOAP_INVALID_SOCKET; +- } ++ if (!(soap->omode & SOAP_IO_UDP)) setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int)); + #endif + #endif + #endif diff --git a/gsoap-reset-error-code.diff b/gsoap-reset-error-code.diff new file mode 100644 index 0000000..0c613a6 --- /dev/null +++ b/gsoap-reset-error-code.diff @@ -0,0 +1,58 @@ +References: https://sf.net/p/gsoap2/bugs/1025/ + +--- + gsoap/stdsoap2.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: gsoap-2.8.22/gsoap/stdsoap2.cpp +=================================================================== +--- gsoap-2.8.22.orig/gsoap/stdsoap2.cpp ++++ gsoap-2.8.22/gsoap/stdsoap2.cpp +@@ -4074,6 +4074,7 @@ again: + #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; ++ soap->error = 0; + goto again; + } + #endif +@@ -4284,6 +4285,7 @@ again: + #ifdef WITH_IPV6 + if (err == SOAP_ECONNREFUSED && res->ai_next) + { soap->fclosesocket(soap, sk); ++ soap->error = 0; + res = res->ai_next; + goto again; + } +@@ -4309,6 +4311,7 @@ again: + #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; ++ soap->error = 0; + goto again; + } + freeaddrinfo(ressave); +@@ -4323,6 +4326,7 @@ again: + #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; ++ soap->error = 0; + goto again; + } + freeaddrinfo(ressave); +@@ -4341,6 +4345,7 @@ again: + #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; ++ soap->error = 0; + goto again; + } + freeaddrinfo(ressave); +@@ -4351,6 +4356,7 @@ again: + #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; ++ soap->error = 0; + soap->fclosesocket(soap, sk); + goto again; + } diff --git a/gsoap.spec b/gsoap.spec index bb683c2..74df443 100644 --- a/gsoap.spec +++ b/gsoap.spec @@ -35,6 +35,8 @@ Patch2: gsoap-02-typepuns.diff Patch3: gsoap-03-seqpoint.diff Patch4: gsoap-mindeflateratio.diff Patch5: gsoap-allocator.diff +Patch6: gsoap-no-tcpfastopen-fail.diff +Patch7: gsoap-reset-error-code.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -95,7 +97,7 @@ symlinks for libgsoap. %prep %setup -q cmp gsoap/stdsoap2.cpp gsoap/stdsoap2.c -%patch -P 13 -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -p1 +%patch -P 13 -P 0 -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -P 7 -p1 ln -fs stdsoap2.cpp stdsoap2.c %build