Merge branch 'master' into el5

Conflicts:
	.gitignore
	libmicrohttpd.spec
	sources
This commit is contained in:
Tim Niemueller 2011-01-25 00:58:25 +01:00
commit e180941f42
5 changed files with 83 additions and 20 deletions

5
.gitignore vendored
View File

@ -1 +1,4 @@
libmicrohttpd-0.4.6.tar.gz /libmicrohttpd-0.9.5*
.build*
/noarch
/x86_64

View File

@ -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))
{

View File

@ -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 <gnutls/gnutls.h>
#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)

View File

@ -1,6 +1,6 @@
Summary: Lightweight library for embedding a webserver in applications Summary: Lightweight library for embedding a webserver in applications
Name: libmicrohttpd Name: libmicrohttpd
Version: 0.4.6 Version: 0.9.5
Release: 1%{?dist} Release: 1%{?dist}
Group: Development/Libraries Group: Development/Libraries
License: LGPLv2+ License: LGPLv2+
@ -8,14 +8,20 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://www.gnu.org/software/libmicrohttpd/ URL: http://www.gnu.org/software/libmicrohttpd/
Source0: ftp://ftp.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz 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 %if 0%{?rhel} == 5
BuildRequires: curl-devel BuildRequires: curl-devel
%endif %endif
%if 0%{?fedora} %if 0%{?fedora}
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
%endif %endif
BuildRequires: graphviz BuildRequires: gnutls-devel
BuildRequires: doxygen BuildRequires: libgcrypt-devel
BuildRequires: graphviz
BuildRequires: doxygen
Requires(post): info Requires(post): info
Requires(preun): info Requires(preun): info
@ -35,19 +41,19 @@ Key features that distinguish libmicrohttpd from other projects are:
* Three different threading models * Three different threading models
%package devel %package devel
Summary: Development files for libmicrohttpd Summary: Development files for libmicrohttpd
Group: %{group} Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description devel %description devel
Development files for libmicrohttpd Development files for libmicrohttpd
%package doc %package doc
Summary: Documentation for libmicrohttpd Summary: Documentation for libmicrohttpd
Group: Documentation Group: Documentation
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%if 0%{?fedora} >= 11 %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
BuildArch: noarch BuildArch: noarch
%endif %endif
%description doc %description doc
@ -55,6 +61,8 @@ Doxygen documentation for libmicrohttpd and some example source code
%prep %prep
%setup -q %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 . # The doxygen file contains references to /home/grothoff/svn/libmicrohttpd/... replace these with .
sed s/\\/home\\/grothoff\\/svn\\/libmicrohttpd/./ doc/Doxyfile > tmp sed s/\\/home\\/grothoff\\/svn\\/libmicrohttpd/./ doc/Doxyfile > tmp
@ -62,12 +70,16 @@ unlink doc/Doxyfile
mv tmp doc/Doxyfile mv tmp doc/Doxyfile
%build %build
%configure --disable-static --enable-messages --enable-https # Required because patches modify .am files
# autoreconf --force
%configure --disable-static --with-gnutls
make %{?_smp_mflags} make %{?_smp_mflags}
doxygen doc/Doxyfile doxygen doc/Doxyfile
%check # Disabled for now due to problems reported at
make check %{?_smp_mflags} # https://gnunet.org/bugs/view.php?id=1619
#check
#make check %{?_smp_mflags}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
@ -76,7 +88,7 @@ make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/libmicrohttpd.la rm -f %{buildroot}%{_libdir}/libmicrohttpd.la
rm -f %{buildroot}%{_infodir}/dir 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 mkdir examples
install -m 644 src/examples/*.c examples install -m 644 src/examples/*.c examples
@ -88,20 +100,21 @@ rm -rf %{buildroot}
%post doc %post doc
/sbin/install-info %{_infodir}/microhttpd.info.gz %{_infodir}/dir || : /sbin/install-info %{_infodir}/microhttpd.info.gz %{_infodir}/dir || :
/sbin/install-info %{_infodir}/microhttpd-tutorial.info.gz %{_infodir}/dir || :
%preun doc %preun doc
if [ $1 = 0 ] ; then if [ $1 = 0 ] ; then
/sbin/install-info --delete %{_infodir}/microhttpd.info.gz %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/microhttpd.info.gz %{_infodir}/dir || :
/sbin/install-info --delete %{_infodir}/microhttpd-tutorial.info.gz %{_infodir}/dir || :
fi fi
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING %doc COPYING
%{_libdir}/libmicrohttpd.so.5 %{_libdir}/libmicrohttpd.so.*
%{_libdir}/libmicrohttpd.so.5.2.1
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -113,11 +126,27 @@ fi
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_mandir}/man3/libmicrohttpd.3.gz %{_mandir}/man3/libmicrohttpd.3.gz
%{_infodir}/microhttpd.info.gz %{_infodir}/microhttpd.info.gz
%{_infodir}/microhttpd-tutorial.info.gz
%doc AUTHORS README ChangeLog %doc AUTHORS README ChangeLog
%doc examples %doc examples
%doc html %doc html
%changelog %changelog
* Mon Jan 24 2011 Tim Niemueller <tim@niemueller.de> - 0.9.5-1
- Update to new upstream release 0.9.5
* Tue Nov 16 2010 Tim Niemueller <tim@niemueller.de> - 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 <tim@niemueller.de> - 0.9.2-2
- Re-enable HTTPS, configure flags had unexpected result
* Sun Nov 7 2010 Tim Niemueller <tim@niemueller.de> - 0.9.2-1
- Update to 0.9.2
* Sun Jun 4 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.4.6-1 * Sun Jun 4 2010 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.4.6-1
- Update to 0.4.6 - Update to 0.4.6

View File

@ -1 +1 @@
61698da6aa04744ea076c327f66fc05a libmicrohttpd-0.4.6.tar.gz ade829961dfb17a0b3c54cf51ad34ccd libmicrohttpd-0.9.5.tar.gz