Accepting request 317166 from devel:libraries:c_c++

- fux build for SLES11:
 * explicitly require libgnutls-devel in -devel package

- fix build for SLES11:
 * update disable-stalling-test.patch: Instead of disabling testcase
   in Makefile disable testcases in code, this could be even better
   we can disable only broken test but not the whole testcase.
 * add libmicrohttpd_test_session.patch: Disable test relying on
   available libcurl version
   (see https://gnunet.org/bugs/view.php?id=3893 for details) 
 * wrap libmicrosdpy into macro to disable building on
   systems with openssl < 1.0.1
- update to 0.9.42:
 * fix off-by-one in MHD_start_daemon_va() error handling logic
 * fix #3784: actually implement MHD_CONNECTION_INFO_SOCKET_CONTEXT

OBS-URL: https://build.opensuse.org/request/show/317166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libmicrohttpd?expand=0&rev=15
This commit is contained in:
Stephan Kulow 2015-07-20 13:14:17 +00:00 committed by Git OBS Bridge
commit 767895f2c2
9 changed files with 122 additions and 30 deletions

View File

@ -1,13 +1,26 @@
# This test deadlocks too often in OBS
Index: libmicrohttpd-0.9.39/src/testcurl/Makefile.am
Index: libmicrohttpd-0.9.42/src/testcurl/test_start_stop.c
===================================================================
--- libmicrohttpd-0.9.39.orig/src/testcurl/Makefile.am
+++ libmicrohttpd-0.9.39/src/testcurl/Makefile.am
@@ -24,7 +24,6 @@ endif
--- libmicrohttpd-0.9.42.orig/src/testcurl/test_start_stop.c
+++ libmicrohttpd-0.9.42/src/testcurl/test_start_stop.c
@@ -108,21 +108,6 @@ main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
if HAVE_CURL
check_PROGRAMS = \
- test_start_stop \
test_get \
test_get_sendfile \
test_urlparse \
- errorCount += testInternalGet (0);
- errorCount += testMultithreadedGet (0);
- errorCount += testMultithreadedPoolGet (0);
- errorCount += testExternalGet ();
- if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL))
- {
- errorCount += testInternalGet(MHD_USE_POLL);
- errorCount += testMultithreadedGet(MHD_USE_POLL);
- errorCount += testMultithreadedPoolGet(MHD_USE_POLL);
- }
- if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL))
- {
- errorCount += testInternalGet(MHD_USE_EPOLL_LINUX_ONLY);
- errorCount += testMultithreadedPoolGet(MHD_USE_EPOLL_LINUX_ONLY);
- }
if (errorCount != 0)
fprintf (stderr, "Error (code: %u)\n", errorCount);
return errorCount != 0; /* 0 == pass */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9798be637d4a1d76a377e1d805d142e6edcfd3ec99c443926448f647af1a7a7c
size 1234550

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:00352073367003da40607319e4090a6a8308748b59246ae80e9871f34dad7d5b
size 1232516

Binary file not shown.

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Jul 15 16:42:35 UTC 2015 - matwey.kornilov@gmail.com
- fux build for SLES11:
* explicitly require libgnutls-devel in -devel package
-------------------------------------------------------------------
Mon Jul 13 13:01:26 UTC 2015 - matwey.kornilov@gmail.com
- fix build for SLES11:
* update disable-stalling-test.patch: Instead of disabling testcase
in Makefile disable testcases in code, this could be even better
we can disable only broken test but not the whole testcase.
* add libmicrohttpd_test_session.patch: Disable test relying on
available libcurl version
(see https://gnunet.org/bugs/view.php?id=3893 for details)
* wrap libmicrosdpy into macro to disable building on
systems with openssl < 1.0.1
- update to 0.9.42:
* fix off-by-one in MHD_start_daemon_va() error handling logic
* fix #3784: actually implement MHD_CONNECTION_INFO_SOCKET_CONTEXT
-------------------------------------------------------------------
Sun May 3 10:26:32 UTC 2015 - astieger@suse.com

View File

@ -17,10 +17,16 @@
#
%if 0%{?suse_version} >= 1220
# libmicrosdpy requires openssl >= 1.0.1
# that is in openSUSE >= 12.2 or SLES >= 12.0
%define enable_libmicrospdy 1
%endif
%global libmicrohttpd libmicrohttpd10
%global libmicrospdy libmicrospdy0
Name: libmicrohttpd
Version: 0.9.41
Version: 0.9.42
Release: 0
Summary: Small Embeddable HTTP Server Library
License: LGPL-2.1+
@ -31,16 +37,19 @@ Source1: http://ftpmirror.gnu.org/libmicrohttpd/%{name}-%{version}.tar.gz
Source2: libmicrohttpd.keyring
# PATCH-WORKAROUND-OPENSUSE: the threads have a problem deadlocking (in OBS)
Patch1: disable-stalling-test.patch
# Autotools only due to above patch
Patch2: libmicrohttpd_test_data.patch
BuildRequires: autoconf
BuildRequires: automake
# PATCH-FIX-OPENSUSE libmicrohttpd_test_session.patch - matwey.kornilov@gmail.com https://gnunet.org/bugs/view.php?id=3893
Patch3: libmicrohttpd_test_session.patch
BuildRequires: libcurl-devel
BuildRequires: libgcrypt-devel >= 1.2.4
BuildRequires: libgnutls-devel
BuildRequires: libtasn1-devel
BuildRequires: libtool
%if 0%{?enable_libmicrospdy}
BuildRequires: openssl-devel >= 1.0.1
%else
BuildRequires: openssl-devel
%endif
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -77,6 +86,7 @@ Group: System/libraries
%description -n %{libmicrohttpd}
Shared library for %{name} (%{summary}).
%if 0%{?enable_libmicrospdy}
%package -n %{libmicrospdy}
Summary: Small embeddable http server library
Group: System/libraries
@ -88,11 +98,13 @@ WARNING: Additionally, a second, still very experimental library is provided
for SPDY (the base for HTTP 2.0) support. libmicrospdy provides a compact API
and implementation of SPDY server. libmicrospdy currently only implements
partially version 3 of SPDY.
%endif
%package devel
Summary: Small Embeddable HTTP Server Library
Group: Development/Libraries/C and C++
Requires: %{libmicrohttpd} = %{version}
Requires: libgnutls-devel
Requires(post): info
Requires(preun): info
@ -100,6 +112,7 @@ Requires(preun): info
Headers, pkg-config files, so link and other development files for %{name}
(%{summary}).
%if 0%{?enable_libmicrospdy}
%package -n libmicrospdy-devel
Summary: Small Embeddable HTTP Server Library
Group: Development/Libraries/C and C++
@ -117,27 +130,36 @@ Translates incoming SPDY requests to http server on
localhost.
* Uses libcurl.
* No error handling for curl requests.
%endif
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -vi
%configure \
--enable-bauth --enable-dauth \
--enable-epoll \
--enable-messages --enable-postprocessor \
--enable-https --enable-gnutls \
--disable-static \
--enable-curl \
--enable-spdy
%if 0%{?enable_libmicrospdy}
--enable-spdy \
%else
--disable-spdy \
%endif
--enable-curl
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%if !0%{?enable_libmicrospdy}
# Workaround for https://gnunet.org/bugs/view.php?id=3892
rm %{buildroot}%{_libdir}/pkgconfig/libmicrospdy.pc
%endif
%check
make -j1 check
@ -146,9 +168,11 @@ make -j1 check
%postun -n %{libmicrohttpd} -p /sbin/ldconfig
%if 0%{?enable_libmicrospdy}
%post -n %{libmicrospdy} -p /sbin/ldconfig
%postun -n %{libmicrospdy} -p /sbin/ldconfig
%endif
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
@ -171,6 +195,7 @@ make -j1 check
%{_infodir}/%{name}*.info*
%{_mandir}/man3/%{name}.3*
%if 0%{?enable_libmicrospdy}
%files -n %{libmicrospdy}
%defattr(-,root,root)
%{_libdir}/libmicrospdy.so.*
@ -184,5 +209,6 @@ make -j1 check
%files -n microspdy2http
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/microspdy2http
%endif
%changelog

View File

@ -1,7 +1,7 @@
Index: libmicrohttpd-0.9.39/src/testcurl/https/test_https_sni.c
Index: libmicrohttpd-0.9.42/src/testcurl/https/test_https_sni.c
===================================================================
--- libmicrohttpd-0.9.39.orig/src/testcurl/https/test_https_sni.c
+++ libmicrohttpd-0.9.39/src/testcurl/https/test_https_sni.c
--- libmicrohttpd-0.9.42.orig/src/testcurl/https/test_https_sni.c
+++ libmicrohttpd-0.9.42/src/testcurl/https/test_https_sni.c
@@ -186,7 +186,7 @@ do_get (const char *url)
size_t len;
struct curl_slist *dns_info;
@ -20,10 +20,10 @@ Index: libmicrohttpd-0.9.39/src/testcurl/https/test_https_sni.c
{
fprintf (stderr, "Error: local file & received file differ.\n");
free (cbc.buf);
Index: libmicrohttpd-0.9.39/src/testcurl/https/tls_test_common.c
Index: libmicrohttpd-0.9.42/src/testcurl/https/tls_test_common.c
===================================================================
--- libmicrohttpd-0.9.39.orig/src/testcurl/https/tls_test_common.c
+++ libmicrohttpd-0.9.39/src/testcurl/https/tls_test_common.c
--- libmicrohttpd-0.9.42.orig/src/testcurl/https/tls_test_common.c
+++ libmicrohttpd-0.9.42/src/testcurl/https/tls_test_common.c
@@ -74,7 +74,7 @@ test_daemon_get (void *cls,
char url[255];
size_t len;
@ -74,10 +74,10 @@ Index: libmicrohttpd-0.9.39/src/testcurl/https/tls_test_common.c
len) != 0) )
{
fprintf (stderr, "Error: local file & received file differ.\n");
Index: libmicrohttpd-0.9.39/src/testcurl/https/tls_test_common.h
Index: libmicrohttpd-0.9.42/src/testcurl/https/tls_test_common.h
===================================================================
--- libmicrohttpd-0.9.39.orig/src/testcurl/https/tls_test_common.h
+++ libmicrohttpd-0.9.39/src/testcurl/https/tls_test_common.h
--- libmicrohttpd-0.9.42.orig/src/testcurl/https/tls_test_common.h
+++ libmicrohttpd-0.9.42/src/testcurl/https/tls_test_common.h
@@ -34,7 +34,7 @@
#define DEAMON_TEST_PORT 4233

View File

@ -0,0 +1,31 @@
Index: libmicrohttpd-0.9.42/src/testcurl/https/test_https_session_info.c
===================================================================
--- libmicrohttpd-0.9.42.orig/src/testcurl/https/test_https_session_info.c
+++ libmicrohttpd-0.9.42/src/testcurl/https/test_https_session_info.c
@@ -90,6 +90,7 @@ query_session_ahc (void *cls, struct MHD
/**
* negotiate a secure connection with server & query negotiated security parameters
*/
+#if LIBCURL_VERSION_NUM >= 0x072200
static int
test_query_session ()
{
@@ -161,7 +162,7 @@ test_query_session ()
free (cbc.buf);
return 0;
}
-
+#endif
int
main (int argc, char *const *argv)
@@ -177,7 +178,9 @@ main (int argc, char *const *argv)
fprintf (stderr, "Error (code: %u)\n", errorCount);
return -1;
}
+#if LIBCURL_VERSION_NUM >= 0x072200
errorCount += test_query_session ();
+#endif
print_test_result (errorCount, argv[0]);
curl_global_cleanup ();
if (errorCount > 0)