diff --git a/.gitignore b/.gitignore index ddf92ff..18b1a16 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -libmicrohttpd-0.4.6.tar.gz +/libmicrohttpd-0.9.5* +.build* +/noarch +/x86_64 diff --git a/libmicrohttpd-0.9.5-fix-basic-auth.patch b/libmicrohttpd-0.9.5-fix-basic-auth.patch new file mode 100644 index 0000000..82185dd --- /dev/null +++ b/libmicrohttpd-0.9.5-fix-basic-auth.patch @@ -0,0 +1,19 @@ +diff -urN libmicrohttpd-0.9.5/src/daemon/digestauth.c libmicrohttpd-0.9.5.fix-basic-auth/src/daemon/digestauth.c +--- libmicrohttpd-0.9.5/src/daemon/digestauth.c 2011-01-10 14:06:56.000000000 +0100 ++++ libmicrohttpd-0.9.5.fix-basic-auth/src/daemon/digestauth.c 2011-01-24 21:24:52.204949568 +0100 +@@ -723,12 +723,12 @@ + struct MHD_Response *response) + { + int ret; +- size_t hlen = strlen(realm) + strlen("Basic realm=\"\"") + 1; +- char header[hlen]; ++ size_t hlen = strlen(realm) + strlen("Basic realm=\"\""); ++ char header[hlen + 1]; + + if (hlen != + snprintf(header, +- sizeof(header), ++ hlen + 1, + "Basic realm=\"%s\"", + realm)) + { diff --git a/libmicrohttpd-0.9.5-no-abort.patch b/libmicrohttpd-0.9.5-no-abort.patch new file mode 100644 index 0000000..947a002 --- /dev/null +++ b/libmicrohttpd-0.9.5-no-abort.patch @@ -0,0 +1,12 @@ +diff -urN libmicrohttpd-0.9.5/src/daemon/internal.h libmicrohttpd-0.9.5.no-abort/src/daemon/internal.h +--- libmicrohttpd-0.9.5/src/daemon/internal.h 2010-12-25 22:32:15.000000000 +0100 ++++ libmicrohttpd-0.9.5.no-abort/src/daemon/internal.h 2011-01-24 21:01:13.519614064 +0100 +@@ -33,7 +33,7 @@ + #include + #endif + +-#define EXTRA_CHECKS MHD_YES ++#define EXTRA_CHECKS MHD_NO + + #define MHD_MAX(a,b) ((a)<(b)) ? (b) : (a) + #define MHD_MIN(a,b) ((a)<(b)) ? (a) : (b) diff --git a/libmicrohttpd.spec b/libmicrohttpd.spec index fc520e0..ed525d8 100644 --- a/libmicrohttpd.spec +++ b/libmicrohttpd.spec @@ -1,6 +1,6 @@ Summary: Lightweight library for embedding a webserver in applications Name: libmicrohttpd -Version: 0.4.6 +Version: 0.9.5 Release: 1%{?dist} Group: Development/Libraries License: LGPLv2+ @@ -8,9 +8,20 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://www.gnu.org/software/libmicrohttpd/ Source0: ftp://ftp.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz +Patch0: %{name}-0.9.5-no-abort.patch +Patch1: %{name}-0.9.5-fix-basic-auth.patch + +BuildRequires: autoconf, automake, libtool +%if 0%{?rhel} == 5 +BuildRequires: curl-devel +%endif +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 BuildRequires: libcurl-devel -BuildRequires: graphviz -BuildRequires: doxygen +%endif +BuildRequires: gnutls-devel +BuildRequires: libgcrypt-devel +BuildRequires: graphviz +BuildRequires: doxygen Requires(post): info Requires(preun): info @@ -30,19 +41,19 @@ Key features that distinguish libmicrohttpd from other projects are: * Three different threading models %package devel -Summary: Development files for libmicrohttpd -Group: %{group} -Requires: %{name} = %{version}-%{release} +Summary: Development files for libmicrohttpd +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} %description devel Development files for libmicrohttpd %package doc -Summary: Documentation for libmicrohttpd -Group: Documentation -Requires: %{name} = %{version}-%{release} -%if 0%{?fedora} >= 11 -BuildArch: noarch +Summary: Documentation for libmicrohttpd +Group: Documentation +Requires: %{name} = %{version}-%{release} +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6 +BuildArch: noarch %endif %description doc @@ -50,6 +61,8 @@ Doxygen documentation for libmicrohttpd and some example source code %prep %setup -q +%patch0 -p1 -b .no-abort +%patch1 -p1 -b .fix-basic-auth # The doxygen file contains references to /home/grothoff/svn/libmicrohttpd/... replace these with . sed s/\\/home\\/grothoff\\/svn\\/libmicrohttpd/./ doc/Doxyfile > tmp @@ -57,12 +70,16 @@ unlink doc/Doxyfile mv tmp doc/Doxyfile %build -%configure --disable-static --enable-messages --enable-https +# Required because patches modify .am files +# autoreconf --force +%configure --disable-static --with-gnutls make %{?_smp_mflags} doxygen doc/Doxyfile -%check -make check %{?_smp_mflags} +# Disabled for now due to problems reported at +# https://gnunet.org/bugs/view.php?id=1619 +#check +#make check %{?_smp_mflags} %install rm -rf %{buildroot} @@ -71,7 +88,7 @@ make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_libdir}/libmicrohttpd.la rm -f %{buildroot}%{_infodir}/dir -# Install some examples in /usr/share/doc/libmicrohttpd-%{version}/examples +# Install some examples in /usr/share/doc/libmicrohttpd-${version}/examples mkdir examples install -m 644 src/examples/*.c examples @@ -83,20 +100,21 @@ rm -rf %{buildroot} %post doc /sbin/install-info %{_infodir}/microhttpd.info.gz %{_infodir}/dir || : +/sbin/install-info %{_infodir}/microhttpd-tutorial.info.gz %{_infodir}/dir || : %preun doc if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/microhttpd.info.gz %{_infodir}/dir || : +/sbin/install-info --delete %{_infodir}/microhttpd-tutorial.info.gz %{_infodir}/dir || : fi %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - + %files %defattr(-,root,root,-) %doc COPYING -%{_libdir}/libmicrohttpd.so.5 -%{_libdir}/libmicrohttpd.so.5.2.1 +%{_libdir}/libmicrohttpd.so.* %files devel %defattr(-,root,root,-) @@ -108,11 +126,27 @@ fi %defattr(-,root,root,-) %{_mandir}/man3/libmicrohttpd.3.gz %{_infodir}/microhttpd.info.gz +%{_infodir}/microhttpd-tutorial.info.gz %doc AUTHORS README ChangeLog %doc examples %doc html %changelog +* Mon Jan 24 2011 Tim Niemueller - 0.9.5-1 +- Update to new upstream release 0.9.5 + +* Tue Nov 16 2010 Tim Niemueller - 0.9.2-3 +- Add missing BR gnutls-devel and libgcrypt-devel +- Added patch to fix test apps (NSS instead of GnuTLS/OpenSSL curl, + implicit DSO linking) +- Disable test cases for now due to false errors, reported upstream + +* Tue Nov 16 2010 Tim Niemueller - 0.9.2-2 +- Re-enable HTTPS, configure flags had unexpected result + +* Sun Nov 7 2010 Tim Niemueller - 0.9.2-1 +- Update to 0.9.2 + * Sun Jun 4 2010 Erik van Pienbroek - 0.4.6-1 - Update to 0.4.6 diff --git a/libmicrohttpd_64bit_fix.patch b/libmicrohttpd_64bit_fix.patch deleted file mode 100644 index 0f8442b..0000000 --- a/libmicrohttpd_64bit_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/testcurl/daemontest_large_put.c.orig 2009-02-27 22:58:16.926062599 +0100 -+++ src/testcurl/daemontest_large_put.c 2009-02-27 22:58:20.776312622 +0100 -@@ -274,7 +274,7 @@ - 1082, - NULL, NULL, &ahc_echo, &done_flag, - MHD_OPTION_CONNECTION_MEMORY_LIMIT, -- PUT_SIZE * 4, MHD_OPTION_END); -+ (size_t) PUT_SIZE * 4, MHD_OPTION_END); - if (d == NULL) - return 256; - c = curl_easy_init (); diff --git a/sources b/sources index b8cfe5f..eff36ed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61698da6aa04744ea076c327f66fc05a libmicrohttpd-0.4.6.tar.gz +ade829961dfb17a0b3c54cf51ad34ccd libmicrohttpd-0.9.5.tar.gz