From 28d67b0ae3729edc6cecf43f46e83f24043645c4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 26 Jan 2009 22:45:14 +0000 Subject: [PATCH 01/25] Setup of module mingw32-libxml2 --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f857e9c --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: mingw32-libxml2 +# $Id$ +NAME := mingw32-libxml2 +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 7e463b22de26cc0ee20a7b306e7668fa6a63ba86 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 28 Jan 2009 11:49:16 +0000 Subject: [PATCH 02/25] Initial import. --- .cvsignore | 1 + import.log | 1 + mingw32-libxml2-2.7.2-with-modules.patch | 15 +++ mingw32-libxml2.spec | 127 +++++++++++++++++++++++ sources | 1 + 5 files changed, 145 insertions(+) create mode 100644 import.log create mode 100644 mingw32-libxml2-2.7.2-with-modules.patch create mode 100644 mingw32-libxml2.spec diff --git a/.cvsignore b/.cvsignore index e69de29..a20733b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +libxml2-2.7.2.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..79b6baf --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mingw32-libxml2-2_7_2-6_fc11:HEAD:mingw32-libxml2-2.7.2-6.fc11.src.rpm:1233143139 diff --git a/mingw32-libxml2-2.7.2-with-modules.patch b/mingw32-libxml2-2.7.2-with-modules.patch new file mode 100644 index 0000000..e26178c --- /dev/null +++ b/mingw32-libxml2-2.7.2-with-modules.patch @@ -0,0 +1,15 @@ +--- libxml2-2.7.2/configure.in~ 2008-10-03 08:09:55.000000000 +0100 ++++ libxml2-2.7.2/configure.in 2008-10-25 23:14:18.000000000 +0100 +@@ -751,6 +751,12 @@ + AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) + ]) + ;; ++ *-*-mingw*) ++ # If I configured --with-modules then I damn well want ++ # modules and don't try to second-guess me. ++ MODULE_EXTENSION=".dll" ++ WITH_MODULES=1 ++ ;; + *) + AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [ + AC_CHECK_LIB(dld, shl_load, [ diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec new file mode 100644 index 0000000..f9b2e0c --- /dev/null +++ b/mingw32-libxml2.spec @@ -0,0 +1,127 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-libxml2 +Version: 2.7.2 +Release: 6%{?dist} +Summary: MinGW Windows libxml2 XML processing library + +License: MIT +Group: Development/Libraries +URL: http://xmlsoft.org/ +Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# Not required for MinGW. +#Patch0: libxml2-multilib.patch + +# MinGW-specific patches. +Patch1000: mingw32-libxml2-2.7.2-with-modules.patch + +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 23 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils + +BuildRequires: mingw32-dlfcn +BuildRequires: mingw32-gettext +BuildRequires: mingw32-iconv +BuildRequires: mingw32-zlib + +BuildRequires: autoconf, automake, libtool + +Requires: pkgconfig + + +%description +MinGW Windows libxml2 XML processing library. + + +%prep +%setup -q -n libxml2-%{version} + +%patch1000 -p1 + +# Patched configure.in, so rebuild configure. +libtoolize --force --copy +autoreconf + + +%build +LDFLAGS="-no-undefined" \ +%{_mingw32_configure} --without-python --with-modules --disable-static +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR=$RPM_BUILD_ROOT install + +# Remove manpages which duplicate Fedora native. +rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/libxml2-2.dll +%{_mingw32_bindir}/xml2-config +%{_mingw32_bindir}/xmlcatalog.exe +%{_mingw32_bindir}/xmllint.exe +%{_mingw32_libdir}/libxml2.dll.a +%{_mingw32_libdir}/libxml2.la +%{_mingw32_libdir}/pkgconfig +%{_mingw32_libdir}/pkgconfig/libxml-2.0.pc +%{_mingw32_libdir}/xml2Conf.sh +%{_mingw32_includedir}/libxml2 +%{_mingw32_datadir}/aclocal/* +%{_mingw32_docdir}/libxml2-%{version}/ +%{_mingw32_datadir}/gtk-doc/html/libxml2/ + + +%changelog +* Mon Jan 26 2009 Richard W.M. Jones - 2.7.2-6 +- Rerun autoreconf after patching configure.in (Erik van Pienbroek). +- Rebuild libtool for Rawhide / libtool 2. +- Add BRs dlfcn and iconv. + +* Fri Jan 23 2009 Richard W.M. Jones - 2.7.2-5 +- Use _smp_mflags. +- Disable static libraries. + +* Tue Jan 13 2009 Richard W.M. Jones - 2.7.2-4 +- Requires pkgconfig. + +* Sat Oct 25 2008 Richard W.M. Jones - 2.7.2-3 +- Enable modules support for libxslt. + +* Fri Oct 17 2008 Richard W.M. Jones - 2.7.2-1 +- Resynch to native Fedora package + patch. + +* Wed Sep 24 2008 Richard W.M. Jones - 2.7.1-2 +- Rename mingw -> mingw32. + +* Mon Sep 22 2008 Daniel P. Berrange - 2.7.1-1 +- Update to 2.7.1 release + +* Sun Sep 21 2008 Richard W.M. Jones - 2.6.32-5 +- Remove manpages which duplicate Fedora native. + +* Wed Sep 10 2008 Richard W.M. Jones - 2.6.32-4 +- Remove static libraries. +- List libdir files explicitly. + +* Fri Sep 5 2008 Richard W.M. Jones - 2.6.32-3 +- Use RPM macros from mingw-filesystem. +- BuildArch is noarch. + +* Mon Jul 7 2008 Richard W.M. Jones - 2.6.32-1 +- Initial RPM release, largely based on earlier work from several sources. diff --git a/sources b/sources index e69de29..d73196d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +dc43ff7ae6aded45f578c87b7b0c8766 libxml2-2.7.2.tar.gz From f55512d15ec738f1434c32587aaee9a2b7d68698 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 20 Feb 2009 23:29:10 +0000 Subject: [PATCH 03/25] Rebuild for gcc 4.4 --- mingw32-libxml2.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index f9b2e0c..a190cdf 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,7 +6,7 @@ Name: mingw32-libxml2 Version: 2.7.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -23,7 +23,7 @@ Patch1000: mingw32-libxml2-2.7.2-with-modules.patch BuildArch: noarch -BuildRequires: mingw32-filesystem >= 23 +BuildRequires: mingw32-filesystem >= 49 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 20 2009 Richard W.M. Jones - 2.7.2-7 +- Rebuild for mingw32-gcc 4.4 + * Mon Jan 26 2009 Richard W.M. Jones - 2.7.2-6 - Rerun autoreconf after patching configure.in (Erik van Pienbroek). - Rebuild libtool for Rawhide / libtool 2. From ead2c21a08547076f47e1106bc9cc306bc744021 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 26 Feb 2009 01:17:29 +0000 Subject: [PATCH 04/25] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- mingw32-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index a190cdf..78098da 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,7 +6,7 @@ Name: mingw32-libxml2 Version: 2.7.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -88,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 2.7.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Fri Feb 20 2009 Richard W.M. Jones - 2.7.2-7 - Rebuild for mingw32-gcc 4.4 From bace0792d89b875a87294ee19c490dcee3be57cb Mon Sep 17 00:00:00 2001 From: epienbro Date: Tue, 14 Apr 2009 19:28:52 +0000 Subject: [PATCH 05/25] - Fixed %defattr line - Added -static subpackage. Applications which want to link against this static library needs to add -DLIBXML_STATIC to the CFLAGS - This package shouldn't own %%{_mingw32_libdir}/pkgconfig --- ...w32-libxml2-static-build-compile-fix.patch | 13 +++++ mingw32-libxml2.spec | 58 ++++++++++++++++--- 2 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 mingw32-libxml2-static-build-compile-fix.patch diff --git a/mingw32-libxml2-static-build-compile-fix.patch b/mingw32-libxml2-static-build-compile-fix.patch new file mode 100644 index 0000000..e4c32e4 --- /dev/null +++ b/mingw32-libxml2-static-build-compile-fix.patch @@ -0,0 +1,13 @@ +--- threads.c.orig 2009-04-03 19:12:55.382657819 +0200 ++++ threads.c 2009-04-03 19:13:10.362407937 +0200 +@@ -975,8 +975,8 @@ + */ + #if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) + #if defined(LIBXML_STATIC_FOR_DLL) +-BOOL XMLCALL +-xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ++int XMLCALL ++xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved) + #else + BOOL WINAPI + DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 78098da..db14fd3 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,7 +6,7 @@ Name: mingw32-libxml2 Version: 2.7.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -20,6 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch +Patch1001: mingw32-libxml2-static-build-compile-fix.patch BuildArch: noarch @@ -41,10 +42,20 @@ Requires: pkgconfig MinGW Windows libxml2 XML processing library. +%package static +Summary: Static version of the MinGW Windows XML processing library +Requires: %{name} = %{version}-%{release} +Group: Development/Libraries + +%description static +Static version of the MinGW Windows XML processing library. + + %prep %setup -q -n libxml2-%{version} %patch1000 -p1 +%patch1001 -p0 # Patched configure.in, so rebuild configure. libtoolize --force --copy @@ -52,15 +63,39 @@ autoreconf %build -LDFLAGS="-no-undefined" \ -%{_mingw32_configure} --without-python --with-modules --disable-static -make %{?_smp_mflags} +# LibXML2 can't build static and shared libraries in one go, so we +# build LibXML2 twice here +mkdir build_static +pushd build_static + LDFLAGS="-no-undefined" \ + %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" + make %{?_smp_mflags} +popd + +mkdir build_shared +pushd build_shared + LDFLAGS="-no-undefined" \ + %{_mingw32_configure} --without-python --with-modules --disable-static --enable-shared + make %{?_smp_mflags} +popd %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +# First install all the files belonging to the shared build +make -C build_shared DESTDIR=$RPM_BUILD_ROOT install + +# Install all the files from the static build in a seperate folder +# and move the static libraries to the right location +make -C build_static DESTDIR=$RPM_BUILD_ROOT/build_static install +mv $RPM_BUILD_ROOT/build_static%{_mingw32_libdir}/*.a $RPM_BUILD_ROOT%{_mingw32_libdir} + +# Manually merge the libtool files +sed -i s/"old_library=''"/"old_library='libxml2.a'"/ $RPM_BUILD_ROOT%{_mingw32_libdir}/libxml2.la + +# Drop the folder which was temporary used for installing the static bits +rm -rf $RPM_BUILD_ROOT/build_static # Remove manpages which duplicate Fedora native. rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir} @@ -71,14 +106,13 @@ rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_mingw32_bindir}/libxml2-2.dll %{_mingw32_bindir}/xml2-config %{_mingw32_bindir}/xmlcatalog.exe %{_mingw32_bindir}/xmllint.exe %{_mingw32_libdir}/libxml2.dll.a %{_mingw32_libdir}/libxml2.la -%{_mingw32_libdir}/pkgconfig %{_mingw32_libdir}/pkgconfig/libxml-2.0.pc %{_mingw32_libdir}/xml2Conf.sh %{_mingw32_includedir}/libxml2 @@ -87,7 +121,17 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/gtk-doc/html/libxml2/ +%files static +%defattr(-,root,root,-) +%{_mingw32_libdir}/libxml2.a + %changelog +* Fri Apr 3 2009 Erik van Pienbroek - 2.7.2-9 +- Fixed %%defattr line +- Added -static subpackage. Applications which want to link + against this static library needs to add -DLIBXML_STATIC to the CFLAGS +- This package shouldn't own %%{_mingw32_libdir}/pkgconfig + * Wed Feb 25 2009 Fedora Release Engineering - 2.7.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From a5a96b94b18ff008a84b368e6723dad88dd9dc43 Mon Sep 17 00:00:00 2001 From: epienbro Date: Mon, 4 May 2009 14:52:53 +0000 Subject: [PATCH 06/25] Update to 2.7.3 --- .cvsignore | 2 +- mingw32-libxml2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index a20733b..374863a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libxml2-2.7.2.tar.gz +libxml2-2.7.3.tar.gz diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index db14fd3..c3dd85c 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -5,8 +5,8 @@ %define __find_provides %{_mingw32_findprovides} Name: mingw32-libxml2 -Version: 2.7.2 -Release: 9%{?dist} +Version: 2.7.3 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -126,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libxml2.a %changelog +* Mon May 4 2009 Erik van Pienbroek - 2.7.3-1 +- Update to 2.7.3 + * Fri Apr 3 2009 Erik van Pienbroek - 2.7.2-9 - Fixed %%defattr line - Added -static subpackage. Applications which want to link diff --git a/sources b/sources index d73196d..3f929d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc43ff7ae6aded45f578c87b7b0c8766 libxml2-2.7.2.tar.gz +8f4fda3969237c2a33bdb1583b5d06b2 libxml2-2.7.3.tar.gz From 141e4380aff9cac4380d645d3f18edcb19f9f48e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 14:26:09 +0000 Subject: [PATCH 07/25] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- mingw32-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index c3dd85c..820cda8 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,7 +6,7 @@ Name: mingw32-libxml2 Version: 2.7.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -126,6 +126,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libxml2.a %changelog +* Sat Jul 25 2009 Fedora Release Engineering - 2.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Mon May 4 2009 Erik van Pienbroek - 2.7.3-1 - Update to 2.7.3 From b82745e314db836a2e3739b392ef346fd84828ec Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 10 Aug 2009 16:16:23 +0000 Subject: [PATCH 08/25] - two patches for parsing problems CVE-2009-2414 and CVE-2009-2416 Daniel --- libxml2-2.7.3-ficora-parse.patch | 159 +++++++++++++++++++++++++++++++ mingw32-libxml2.spec | 6 ++ 2 files changed, 165 insertions(+) create mode 100644 libxml2-2.7.3-ficora-parse.patch diff --git a/libxml2-2.7.3-ficora-parse.patch b/libxml2-2.7.3-ficora-parse.patch new file mode 100644 index 0000000..e239b21 --- /dev/null +++ b/libxml2-2.7.3-ficora-parse.patch @@ -0,0 +1,159 @@ +diff --git a/parser.c b/parser.c +index a476060..b404722 100644 +--- a/parser.c ++++ b/parser.c +@@ -5323,7 +5323,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { + if (name == NULL) { + xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, + "Name expected in NOTATION declaration\n"); +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + tmp = ret; + while (tmp != NULL) { +@@ -5339,7 +5340,10 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { + } + if (tmp == NULL) { + cur = xmlCreateEnumeration(name); +- if (cur == NULL) return(ret); ++ if (cur == NULL) { ++ xmlFreeEnumeration(ret); ++ return(NULL); ++ } + if (last == NULL) ret = last = cur; + else { + last->next = cur; +@@ -5350,9 +5354,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { + } while (RAW == '|'); + if (RAW != ')') { + xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); +- if ((last != NULL) && (last != ret)) +- xmlFreeEnumeration(last); +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + NEXT; + return(ret); +@@ -5407,7 +5410,10 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { + cur = xmlCreateEnumeration(name); + if (!xmlDictOwns(ctxt->dict, name)) + xmlFree(name); +- if (cur == NULL) return(ret); ++ if (cur == NULL) { ++ xmlFreeEnumeration(ret); ++ return(NULL); ++ } + if (last == NULL) ret = last = cur; + else { + last->next = cur; +@@ -5775,9 +5781,10 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { + } + + /** +- * xmlParseElementChildrenContentDecl: ++ * xmlParseElementChildrenContentDeclPriv: + * @ctxt: an XML parser context + * @inputchk: the input used for the current entity, needed for boundary checks ++ * @depth: the level of recursion + * + * parse the declaration for a Mixed Element content + * The leading '(' and spaces have been skipped in xmlParseElementContentDecl +@@ -5805,12 +5812,20 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { + * Returns the tree of xmlElementContentPtr describing the element + * hierarchy. + */ +-xmlElementContentPtr +-xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { ++static xmlElementContentPtr ++xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk, ++ int depth) { + xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL; + const xmlChar *elem; + xmlChar type = 0; + ++ if (((depth > 128) && ((ctxt->options & XML_PARSE_HUGE) == 0)) || ++ (depth > 2048)) { ++ xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, ++"xmlParseElementChildrenContentDecl : depth %d too deep, use XML_PARSE_HUGE\n", ++ depth); ++ return(NULL); ++ } + SKIP_BLANKS; + GROW; + if (RAW == '(') { +@@ -5819,7 +5834,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { + /* Recurse on first child */ + NEXT; + SKIP_BLANKS; +- cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); ++ cur = ret = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, ++ depth + 1); + SKIP_BLANKS; + GROW; + } else { +@@ -5951,7 +5967,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { + /* Recurse on second child */ + NEXT; + SKIP_BLANKS; +- last = xmlParseElementChildrenContentDecl(ctxt, inputid); ++ last = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, ++ depth + 1); + SKIP_BLANKS; + } else { + elem = xmlParseName(ctxt); +@@ -6062,6 +6079,44 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { + } + + /** ++ * ++ * xmlParseElementChildrenContentDecl: ++ * @ctxt: an XML parser context ++ * @inputchk: the input used for the current entity, needed for boundary checks ++ * @depth: the level of recursion ++ * ++ * parse the declaration for a Mixed Element content ++ * The leading '(' and spaces have been skipped in xmlParseElementContentDecl ++ * ++ * [47] children ::= (choice | seq) ('?' | '*' | '+')? ++ * ++ * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? ++ * ++ * [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' ++ * ++ * [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' ++ * ++ * [ VC: Proper Group/PE Nesting ] applies to [49] and [50] ++ * TODO Parameter-entity replacement text must be properly nested ++ * with parenthesized groups. That is to say, if either of the ++ * opening or closing parentheses in a choice, seq, or Mixed ++ * construct is contained in the replacement text for a parameter ++ * entity, both must be contained in the same replacement text. For ++ * interoperability, if a parameter-entity reference appears in a ++ * choice, seq, or Mixed construct, its replacement text should not ++ * be empty, and neither the first nor last non-blank character of ++ * the replacement text should be a connector (| or ,). ++ * ++ * Returns the tree of xmlElementContentPtr describing the element ++ * hierarchy. ++ */ ++xmlElementContentPtr ++xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { ++ /* stub left for API/ABI compat */ ++ return(xmlParseElementChildrenContentDeclPriv(ctxt, inputchk, 1)); ++} ++ ++/** + * xmlParseElementContentDecl: + * @ctxt: an XML parser context + * @name: the name of the element being defined. +@@ -6097,7 +6152,7 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name, + tree = xmlParseElementMixedContentDecl(ctxt, inputid); + res = XML_ELEMENT_TYPE_MIXED; + } else { +- tree = xmlParseElementChildrenContentDecl(ctxt, inputid); ++ tree = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, 1); + res = XML_ELEMENT_TYPE_ELEMENT; + } + SKIP_BLANKS; diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 820cda8..078fe84 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -17,6 +17,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Not required for MinGW. #Patch0: libxml2-multilib.patch +Patch1: libxml2-2.7.3-ficora-parse.patch # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch @@ -54,6 +55,8 @@ Static version of the MinGW Windows XML processing library. %prep %setup -q -n libxml2-%{version} +%patch1 -p1 + %patch1000 -p1 %patch1001 -p0 @@ -126,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libxml2.a %changelog +* Mon Aug 10 2009 Daniel Veillard - 2.7.3-3 +- two patches for parsing problems CVE-2009-2414 and CVE-2009-2416 + * Sat Jul 25 2009 Fedora Release Engineering - 2.7.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 02526187bd5c989d96f362a6dd440d9add727eb7 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 10 Aug 2009 16:17:22 +0000 Subject: [PATCH 09/25] Forgot to bump the release... Daniel --- mingw32-libxml2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 078fe84..da986d0 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,7 +6,7 @@ Name: mingw32-libxml2 Version: 2.7.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT From 256ef9f38642ddbd710ef1e2ff9114f08cadbb5e Mon Sep 17 00:00:00 2001 From: epienbro Date: Fri, 11 Sep 2009 16:37:19 +0000 Subject: [PATCH 10/25] - Update to 2.7.4 - Drop upstreamed libxml2-2.7.3-ficora-parse.patch patch - Drop upstreamed mingw32-libxml2-static-build-compile-fix.patch patch - Added a new patch to fix compatibility with the w32 port of pthreads - Use %global instead of %define - Automatically generate debuginfo subpackage (F12 only) --- .cvsignore | 2 +- libxml2-2.7.3-ficora-parse.patch | 159 ------------------ ...w32-libxml2-static-build-compile-fix.patch | 13 -- ...libxml2-win32-pthreads-compatibility.patch | 11 ++ mingw32-libxml2.spec | 34 ++-- sources | 2 +- 6 files changed, 35 insertions(+), 186 deletions(-) delete mode 100644 libxml2-2.7.3-ficora-parse.patch delete mode 100644 mingw32-libxml2-static-build-compile-fix.patch create mode 100644 mingw32-libxml2-win32-pthreads-compatibility.patch diff --git a/.cvsignore b/.cvsignore index 374863a..4c22ab6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libxml2-2.7.3.tar.gz +libxml2-2.7.4.tar.gz diff --git a/libxml2-2.7.3-ficora-parse.patch b/libxml2-2.7.3-ficora-parse.patch deleted file mode 100644 index e239b21..0000000 --- a/libxml2-2.7.3-ficora-parse.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff --git a/parser.c b/parser.c -index a476060..b404722 100644 ---- a/parser.c -+++ b/parser.c -@@ -5323,7 +5323,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { - if (name == NULL) { - xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED, - "Name expected in NOTATION declaration\n"); -- return(ret); -+ xmlFreeEnumeration(ret); -+ return(NULL); - } - tmp = ret; - while (tmp != NULL) { -@@ -5339,7 +5340,10 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { - } - if (tmp == NULL) { - cur = xmlCreateEnumeration(name); -- if (cur == NULL) return(ret); -+ if (cur == NULL) { -+ xmlFreeEnumeration(ret); -+ return(NULL); -+ } - if (last == NULL) ret = last = cur; - else { - last->next = cur; -@@ -5350,9 +5354,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { - } while (RAW == '|'); - if (RAW != ')') { - xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL); -- if ((last != NULL) && (last != ret)) -- xmlFreeEnumeration(last); -- return(ret); -+ xmlFreeEnumeration(ret); -+ return(NULL); - } - NEXT; - return(ret); -@@ -5407,7 +5410,10 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { - cur = xmlCreateEnumeration(name); - if (!xmlDictOwns(ctxt->dict, name)) - xmlFree(name); -- if (cur == NULL) return(ret); -+ if (cur == NULL) { -+ xmlFreeEnumeration(ret); -+ return(NULL); -+ } - if (last == NULL) ret = last = cur; - else { - last->next = cur; -@@ -5775,9 +5781,10 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { - } - - /** -- * xmlParseElementChildrenContentDecl: -+ * xmlParseElementChildrenContentDeclPriv: - * @ctxt: an XML parser context - * @inputchk: the input used for the current entity, needed for boundary checks -+ * @depth: the level of recursion - * - * parse the declaration for a Mixed Element content - * The leading '(' and spaces have been skipped in xmlParseElementContentDecl -@@ -5805,12 +5812,20 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { - * Returns the tree of xmlElementContentPtr describing the element - * hierarchy. - */ --xmlElementContentPtr --xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { -+static xmlElementContentPtr -+xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk, -+ int depth) { - xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL; - const xmlChar *elem; - xmlChar type = 0; - -+ if (((depth > 128) && ((ctxt->options & XML_PARSE_HUGE) == 0)) || -+ (depth > 2048)) { -+ xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, -+"xmlParseElementChildrenContentDecl : depth %d too deep, use XML_PARSE_HUGE\n", -+ depth); -+ return(NULL); -+ } - SKIP_BLANKS; - GROW; - if (RAW == '(') { -@@ -5819,7 +5834,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { - /* Recurse on first child */ - NEXT; - SKIP_BLANKS; -- cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid); -+ cur = ret = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, -+ depth + 1); - SKIP_BLANKS; - GROW; - } else { -@@ -5951,7 +5967,8 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { - /* Recurse on second child */ - NEXT; - SKIP_BLANKS; -- last = xmlParseElementChildrenContentDecl(ctxt, inputid); -+ last = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, -+ depth + 1); - SKIP_BLANKS; - } else { - elem = xmlParseName(ctxt); -@@ -6062,6 +6079,44 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr ctxt, int inputchk) { - } - - /** -+ * -+ * xmlParseElementChildrenContentDecl: -+ * @ctxt: an XML parser context -+ * @inputchk: the input used for the current entity, needed for boundary checks -+ * @depth: the level of recursion -+ * -+ * parse the declaration for a Mixed Element content -+ * The leading '(' and spaces have been skipped in xmlParseElementContentDecl -+ * -+ * [47] children ::= (choice | seq) ('?' | '*' | '+')? -+ * -+ * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? -+ * -+ * [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' -+ * -+ * [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' -+ * -+ * [ VC: Proper Group/PE Nesting ] applies to [49] and [50] -+ * TODO Parameter-entity replacement text must be properly nested -+ * with parenthesized groups. That is to say, if either of the -+ * opening or closing parentheses in a choice, seq, or Mixed -+ * construct is contained in the replacement text for a parameter -+ * entity, both must be contained in the same replacement text. For -+ * interoperability, if a parameter-entity reference appears in a -+ * choice, seq, or Mixed construct, its replacement text should not -+ * be empty, and neither the first nor last non-blank character of -+ * the replacement text should be a connector (| or ,). -+ * -+ * Returns the tree of xmlElementContentPtr describing the element -+ * hierarchy. -+ */ -+xmlElementContentPtr -+xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt, int inputchk) { -+ /* stub left for API/ABI compat */ -+ return(xmlParseElementChildrenContentDeclPriv(ctxt, inputchk, 1)); -+} -+ -+/** - * xmlParseElementContentDecl: - * @ctxt: an XML parser context - * @name: the name of the element being defined. -@@ -6097,7 +6152,7 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name, - tree = xmlParseElementMixedContentDecl(ctxt, inputid); - res = XML_ELEMENT_TYPE_MIXED; - } else { -- tree = xmlParseElementChildrenContentDecl(ctxt, inputid); -+ tree = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, 1); - res = XML_ELEMENT_TYPE_ELEMENT; - } - SKIP_BLANKS; diff --git a/mingw32-libxml2-static-build-compile-fix.patch b/mingw32-libxml2-static-build-compile-fix.patch deleted file mode 100644 index e4c32e4..0000000 --- a/mingw32-libxml2-static-build-compile-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- threads.c.orig 2009-04-03 19:12:55.382657819 +0200 -+++ threads.c 2009-04-03 19:13:10.362407937 +0200 -@@ -975,8 +975,8 @@ - */ - #if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) - #if defined(LIBXML_STATIC_FOR_DLL) --BOOL XMLCALL --xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -+int XMLCALL -+xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved) - #else - BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/mingw32-libxml2-win32-pthreads-compatibility.patch b/mingw32-libxml2-win32-pthreads-compatibility.patch new file mode 100644 index 0000000..bc965e3 --- /dev/null +++ b/mingw32-libxml2-win32-pthreads-compatibility.patch @@ -0,0 +1,11 @@ +--- testThreads.c.orig 2009-09-11 18:09:00.268640135 +0200 ++++ testThreads.c 2009-09-11 18:12:43.412653512 +0200 +@@ -107,7 +107,7 @@ + + for (i = 0; i < num_threads; i++) { + results[i] = NULL; +- tid[i] = (pthread_t) -1; ++ memset(&tid[i], 0, sizeof(pthread_t)); + } + + for (i = 0; i < num_threads; i++) { diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index da986d0..c553298 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -1,12 +1,13 @@ -%define __strip %{_mingw32_strip} -%define __objdump %{_mingw32_objdump} -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw32_findrequires} -%define __find_provides %{_mingw32_findprovides} +%global __strip %{_mingw32_strip} +%global __objdump %{_mingw32_objdump} +%global _use_internal_dependency_generator 0 +%global __find_requires %{_mingw32_findrequires} +%global __find_provides %{_mingw32_findprovides} +%define __debug_install_post %{_mingw32_debug_install_post} Name: mingw32-libxml2 -Version: 2.7.3 -Release: 3%{?dist} +Version: 2.7.4 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -17,15 +18,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Not required for MinGW. #Patch0: libxml2-multilib.patch -Patch1: libxml2-2.7.3-ficora-parse.patch # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch -Patch1001: mingw32-libxml2-static-build-compile-fix.patch +Patch1001: mingw32-libxml2-win32-pthreads-compatibility.patch BuildArch: noarch -BuildRequires: mingw32-filesystem >= 49 +BuildRequires: mingw32-filesystem >= 52 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -52,11 +52,12 @@ Group: Development/Libraries Static version of the MinGW Windows XML processing library. +%{_mingw32_debug_package} + + %prep %setup -q -n libxml2-%{version} -%patch1 -p1 - %patch1000 -p1 %patch1001 -p0 @@ -128,7 +129,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %{_mingw32_libdir}/libxml2.a + %changelog +* Fri Sep 11 2009 Erik van Pienbroek - 2.7.4-1 +- Update to 2.7.4 +- Drop upstreamed libxml2-2.7.3-ficora-parse.patch patch +- Drop upstreamed mingw32-libxml2-static-build-compile-fix.patch patch +- Added a new patch to fix compatibility with the w32 port of pthreads +- Use %%global instead of %%define +- Automatically generate debuginfo subpackage + * Mon Aug 10 2009 Daniel Veillard - 2.7.3-3 - two patches for parsing problems CVE-2009-2414 and CVE-2009-2416 diff --git a/sources b/sources index 3f929d0..75ea044 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8f4fda3969237c2a33bdb1583b5d06b2 libxml2-2.7.3.tar.gz +961cce07211049e3bb20c5b98a1281b4 libxml2-2.7.4.tar.gz From b2ef773d9a92f507605e3fa6bb52c91a0119d16c Mon Sep 17 00:00:00 2001 From: epienbro Date: Fri, 11 Sep 2009 17:15:00 +0000 Subject: [PATCH 11/25] Re-added mingw32-libxml2-static-build-compile-fix.patch Looks like it's still needed after all --- mingw32-libxml2-static-build-compile-fix.patch | 11 +++++++++++ mingw32-libxml2.spec | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 mingw32-libxml2-static-build-compile-fix.patch diff --git a/mingw32-libxml2-static-build-compile-fix.patch b/mingw32-libxml2-static-build-compile-fix.patch new file mode 100644 index 0000000..d153092 --- /dev/null +++ b/mingw32-libxml2-static-build-compile-fix.patch @@ -0,0 +1,11 @@ +--- threads.c.orig 2009-09-10 17:03:39.000000000 +0200 ++++ threads.c 2009-09-11 19:00:59.660192916 +0200 +@@ -993,7 +993,7 @@ + #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) + #if defined(LIBXML_STATIC_FOR_DLL) + BOOL XMLCALL +-xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ++xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved) + #else + BOOL WINAPI + DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index c553298..e3b900e 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -21,7 +21,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch -Patch1001: mingw32-libxml2-win32-pthreads-compatibility.patch +Patch1001: mingw32-libxml2-static-build-compile-fix.patch +Patch1002: mingw32-libxml2-win32-pthreads-compatibility.patch BuildArch: noarch @@ -60,6 +61,7 @@ Static version of the MinGW Windows XML processing library. %patch1000 -p1 %patch1001 -p0 +%patch1002 -p0 # Patched configure.in, so rebuild configure. libtoolize --force --copy @@ -134,7 +136,6 @@ rm -rf $RPM_BUILD_ROOT * Fri Sep 11 2009 Erik van Pienbroek - 2.7.4-1 - Update to 2.7.4 - Drop upstreamed libxml2-2.7.3-ficora-parse.patch patch -- Drop upstreamed mingw32-libxml2-static-build-compile-fix.patch patch - Added a new patch to fix compatibility with the w32 port of pthreads - Use %%global instead of %%define - Automatically generate debuginfo subpackage From 8939de86b058326fccb1825e6a49c1e6b64f7581 Mon Sep 17 00:00:00 2001 From: epienbro Date: Sat, 12 Sep 2009 18:51:28 +0000 Subject: [PATCH 12/25] - Always use the native win32 thread API even when pthreads is available - Dropped a patch which isn't necessary anymore --- mingw32-libxml2-win32-pthreads-compatibility.patch | 11 ----------- mingw32-libxml2.spec | 12 +++++++----- 2 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 mingw32-libxml2-win32-pthreads-compatibility.patch diff --git a/mingw32-libxml2-win32-pthreads-compatibility.patch b/mingw32-libxml2-win32-pthreads-compatibility.patch deleted file mode 100644 index bc965e3..0000000 --- a/mingw32-libxml2-win32-pthreads-compatibility.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- testThreads.c.orig 2009-09-11 18:09:00.268640135 +0200 -+++ testThreads.c 2009-09-11 18:12:43.412653512 +0200 -@@ -107,7 +107,7 @@ - - for (i = 0; i < num_threads; i++) { - results[i] = NULL; -- tid[i] = (pthread_t) -1; -+ memset(&tid[i], 0, sizeof(pthread_t)); - } - - for (i = 0; i < num_threads; i++) { diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index e3b900e..0b5eb57 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -22,7 +22,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch Patch1001: mingw32-libxml2-static-build-compile-fix.patch -Patch1002: mingw32-libxml2-win32-pthreads-compatibility.patch BuildArch: noarch @@ -61,7 +60,6 @@ Static version of the MinGW Windows XML processing library. %patch1000 -p1 %patch1001 -p0 -%patch1002 -p0 # Patched configure.in, so rebuild configure. libtoolize --force --copy @@ -74,14 +72,14 @@ autoreconf mkdir build_static pushd build_static LDFLAGS="-no-undefined" \ - %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" + %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared --with-threads=yes CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" make %{?_smp_mflags} popd mkdir build_shared pushd build_shared LDFLAGS="-no-undefined" \ - %{_mingw32_configure} --without-python --with-modules --disable-static --enable-shared + %{_mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=yes make %{?_smp_mflags} popd @@ -133,6 +131,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Sep 12 2009 Erik van Pienbroek - 2.7.4-2 +- Always use the native win32 thread API even when pthreads is available +- Dropped a patch which isn't necessary anymore + * Fri Sep 11 2009 Erik van Pienbroek - 2.7.4-1 - Update to 2.7.4 - Drop upstreamed libxml2-2.7.3-ficora-parse.patch patch From ff1c77cb0f1e20f0a3c9f907a3b12e78e7c08844 Mon Sep 17 00:00:00 2001 From: epienbro Date: Fri, 18 Sep 2009 21:50:26 +0000 Subject: [PATCH 13/25] Rebuild because of broken mingw32-gcc/mingw32-binutils --- mingw32-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 0b5eb57..58d978f 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -131,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 18 2009 Erik van Pienbroek - 2.7.4-3 +- Rebuild because of broken mingw32-gcc/mingw32-binutils + * Sat Sep 12 2009 Erik van Pienbroek - 2.7.4-2 - Always use the native win32 thread API even when pthreads is available - Dropped a patch which isn't necessary anymore From 36678e30d42109948e821a1dfd5a46cebb6c5619 Mon Sep 17 00:00:00 2001 From: epienbro Date: Thu, 24 Sep 2009 18:41:06 +0000 Subject: [PATCH 14/25] Update to 2.7.5 --- .cvsignore | 2 +- mingw32-libxml2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4c22ab6..86b48ea 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libxml2-2.7.4.tar.gz +libxml2-2.7.5.tar.gz diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 58d978f..f4ccaee 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,8 +6,8 @@ %define __debug_install_post %{_mingw32_debug_install_post} Name: mingw32-libxml2 -Version: 2.7.4 -Release: 3%{?dist} +Version: 2.7.5 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -131,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Sep 24 2009 Erik van Pienbroek - 2.7.5-1 +- Update to 2.7.5 + * Fri Sep 18 2009 Erik van Pienbroek - 2.7.4-3 - Rebuild because of broken mingw32-gcc/mingw32-binutils diff --git a/sources b/sources index 75ea044..8d180fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -961cce07211049e3bb20c5b98a1281b4 libxml2-2.7.4.tar.gz +2e29ca610579438714ebb1e4010a0ece libxml2-2.7.5.tar.gz From 004a02e881b1747ba3b4af8b3dbde6cb0caaa35d Mon Sep 17 00:00:00 2001 From: epienbro Date: Thu, 24 Sep 2009 22:22:23 +0000 Subject: [PATCH 15/25] Added a patch to fix GNOME bug #561340 --- libxml2-gnome-bug-561340-fix.patch | 11 +++++++++++ mingw32-libxml2.spec | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 libxml2-gnome-bug-561340-fix.patch diff --git a/libxml2-gnome-bug-561340-fix.patch b/libxml2-gnome-bug-561340-fix.patch new file mode 100644 index 0000000..5c78f1b --- /dev/null +++ b/libxml2-gnome-bug-561340-fix.patch @@ -0,0 +1,11 @@ +--- include/libxml/xmlexports.h 2009-09-25 00:00:03.511532978 +0200 ++++ include/libxml/xmlexports.h 2009-09-25 00:01:27.058533091 +0200 +@@ -115,7 +115,7 @@ + */ + #if !defined(LIBXML_STATIC) + #define XMLPUBFUN __declspec(dllexport) +- #define XMLPUBVAR __declspec(dllexport) ++ #define XMLPUBVAR __declspec(dllexport) extern + #else + #define XMLPUBFUN + #if !defined(LIBXML_STATIC) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index f4ccaee..c5cd56b 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -22,6 +22,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # MinGW-specific patches. Patch1000: mingw32-libxml2-2.7.2-with-modules.patch Patch1001: mingw32-libxml2-static-build-compile-fix.patch +Patch1002: libxml2-gnome-bug-561340-fix.patch BuildArch: noarch @@ -60,6 +61,7 @@ Static version of the MinGW Windows XML processing library. %patch1000 -p1 %patch1001 -p0 +%patch1002 -p0 # Patched configure.in, so rebuild configure. libtoolize --force --copy @@ -131,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 25 2009 Erik van Pienbroek - 2.7.5-2 +- Added a patch to fix GNOME bug #561340 + * Thu Sep 24 2009 Erik van Pienbroek - 2.7.5-1 - Update to 2.7.5 From e8c79212170fec92ba4b5feba61053fcadd8ed4e Mon Sep 17 00:00:00 2001 From: epienbro Date: Thu, 24 Sep 2009 22:24:19 +0000 Subject: [PATCH 16/25] Forgot to bump the release tag --- mingw32-libxml2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index c5cd56b..c4b51eb 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT From 3ca44fff2d6acb82881d8ae91b65614a3f10cec9 Mon Sep 17 00:00:00 2001 From: epienbro Date: Thu, 19 Nov 2009 23:30:10 +0000 Subject: [PATCH 17/25] - Update to 2.7.6 - Updated the configure arguments so that the native Win32 thread API will be used instead of pthreads --- .cvsignore | 2 +- mingw32-libxml2.spec | 13 +++++++++---- sources | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 86b48ea..f604503 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libxml2-2.7.5.tar.gz +libxml2-2.7.6.tar.gz diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index c4b51eb..134e27c 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,8 +6,8 @@ %define __debug_install_post %{_mingw32_debug_install_post} Name: mingw32-libxml2 -Version: 2.7.5 -Release: 2%{?dist} +Version: 2.7.6 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -74,14 +74,14 @@ autoreconf mkdir build_static pushd build_static LDFLAGS="-no-undefined" \ - %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared --with-threads=yes CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" + %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared --with-threads=win32 CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" make %{?_smp_mflags} popd mkdir build_shared pushd build_shared LDFLAGS="-no-undefined" \ - %{_mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=yes + %{_mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=win32 make %{?_smp_mflags} popd @@ -133,6 +133,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Nov 20 2009 Erik van Pienbroek - 2.7.6-1 +- Update to 2.7.6 +- Updated the configure arguments so that the native Win32 thread API + will be used instead of pthreads + * Fri Sep 25 2009 Erik van Pienbroek - 2.7.5-2 - Added a patch to fix GNOME bug #561340 diff --git a/sources b/sources index 8d180fc..6f53129 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2e29ca610579438714ebb1e4010a0ece libxml2-2.7.5.tar.gz +7740a8ec23878a2f50120e1faa2730f2 libxml2-2.7.6.tar.gz From d381c0fbd960a84c898561d0576225e8d27cecfd Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:18:49 +0000 Subject: [PATCH 18/25] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f857e9c..5f1794a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: mingw32-libxml2 -# $Id$ +# $Id: Makefile,v 1.1 2009/01/26 22:45:14 kevin Exp $ NAME := mingw32-libxml2 SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 4436ba2feb726cbbfa5471279fddc1940eb61d07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 03:21:33 +0000 Subject: [PATCH 19/25] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5f1794a..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: mingw32-libxml2 -# $Id: Makefile,v 1.1 2009/01/26 22:45:14 kevin Exp $ -NAME := mingw32-libxml2 -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 79b6baf..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -mingw32-libxml2-2_7_2-6_fc11:HEAD:mingw32-libxml2-2.7.2-6.fc11.src.rpm:1233143139 From 9ab5ba0d68afaa5d0909a507a773b6cce9dc6320 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 12:55:08 -0600 Subject: [PATCH 20/25] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- mingw32-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 134e27c..dc76cb8 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -133,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 2.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Fri Nov 20 2009 Erik van Pienbroek - 2.7.6-1 - Update to 2.7.6 - Updated the configure arguments so that the native Win32 thread API From 167ddb8b21b9ec7da7b48e598ba8077d93bdf3f7 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 23 May 2011 06:10:51 +0300 Subject: [PATCH 21/25] Don't install html documentation which duplicates what is in Fedora native --- mingw32-libxml2.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index dc76cb8..2974ad5 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -103,8 +103,10 @@ sed -i s/"old_library=''"/"old_library='libxml2.a'"/ $RPM_BUILD_ROOT%{_mingw32_l # Drop the folder which was temporary used for installing the static bits rm -rf $RPM_BUILD_ROOT/build_static -# Remove manpages which duplicate Fedora native. +# Remove documentation which duplicates Fedora native. rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir} +rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/ %clean @@ -123,8 +125,6 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/xml2Conf.sh %{_mingw32_includedir}/libxml2 %{_mingw32_datadir}/aclocal/* -%{_mingw32_docdir}/libxml2-%{version}/ -%{_mingw32_datadir}/gtk-doc/html/libxml2/ %files static @@ -133,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 23 2011 Kalev Lember - 2.7.6-3 +- Don't install html documentation which duplicates what is in Fedora native + * Tue Feb 08 2011 Fedora Release Engineering - 2.7.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 48c56302accbd06955cbfb3afdade196cf35aa17 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 23 May 2011 14:33:46 +0300 Subject: [PATCH 22/25] Update to 2.7.8 - Dropped upstreamed patches - Use the CVE-2010-4494 patch from Fedora native libxml2 (#665965) --- .gitignore | 1 + libxml2-2.7.7-xpath-double-free.patch | 22 ++++++++++++++++++++++ libxml2-gnome-bug-561340-fix.patch | 11 ----------- mingw32-libxml2-2.7.2-with-modules.patch | 15 --------------- mingw32-libxml2.spec | 21 +++++++++------------ sources | 2 +- 6 files changed, 33 insertions(+), 39 deletions(-) create mode 100644 libxml2-2.7.7-xpath-double-free.patch delete mode 100644 libxml2-gnome-bug-561340-fix.patch delete mode 100644 mingw32-libxml2-2.7.2-with-modules.patch diff --git a/.gitignore b/.gitignore index f604503..a9e0040 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ libxml2-2.7.6.tar.gz +/libxml2-2.7.8.tar.gz diff --git a/libxml2-2.7.7-xpath-double-free.patch b/libxml2-2.7.7-xpath-double-free.patch new file mode 100644 index 0000000..c5dbbee --- /dev/null +++ b/libxml2-2.7.7-xpath-double-free.patch @@ -0,0 +1,22 @@ +--- a/xpath.c ++++ a/xpath.c +@@ -11763,11 +11763,16 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, + + if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { + xmlXPathObjectPtr tmp; +- /* pop the result */ ++ /* pop the result if any */ + tmp = valuePop(ctxt); +- xmlXPathReleaseObject(xpctxt, tmp); +- /* then pop off contextObj, which will be freed later */ +- valuePop(ctxt); ++ if (tmp != contextObj) { ++ /* ++ * Free up the result ++ * then pop off contextObj, which will be freed later ++ */ ++ xmlXPathReleaseObject(xpctxt, tmp); ++ valuePop(ctxt); ++ } + goto evaluation_error; + } diff --git a/libxml2-gnome-bug-561340-fix.patch b/libxml2-gnome-bug-561340-fix.patch deleted file mode 100644 index 5c78f1b..0000000 --- a/libxml2-gnome-bug-561340-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- include/libxml/xmlexports.h 2009-09-25 00:00:03.511532978 +0200 -+++ include/libxml/xmlexports.h 2009-09-25 00:01:27.058533091 +0200 -@@ -115,7 +115,7 @@ - */ - #if !defined(LIBXML_STATIC) - #define XMLPUBFUN __declspec(dllexport) -- #define XMLPUBVAR __declspec(dllexport) -+ #define XMLPUBVAR __declspec(dllexport) extern - #else - #define XMLPUBFUN - #if !defined(LIBXML_STATIC) diff --git a/mingw32-libxml2-2.7.2-with-modules.patch b/mingw32-libxml2-2.7.2-with-modules.patch deleted file mode 100644 index e26178c..0000000 --- a/mingw32-libxml2-2.7.2-with-modules.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- libxml2-2.7.2/configure.in~ 2008-10-03 08:09:55.000000000 +0100 -+++ libxml2-2.7.2/configure.in 2008-10-25 23:14:18.000000000 +0100 -@@ -751,6 +751,12 @@ - AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) - ]) - ;; -+ *-*-mingw*) -+ # If I configured --with-modules then I damn well want -+ # modules and don't try to second-guess me. -+ MODULE_EXTENSION=".dll" -+ WITH_MODULES=1 -+ ;; - *) - AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [ - AC_CHECK_LIB(dld, shl_load, [ diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 2974ad5..25353aa 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -6,8 +6,8 @@ %define __debug_install_post %{_mingw32_debug_install_post} Name: mingw32-libxml2 -Version: 2.7.6 -Release: 3%{?dist} +Version: 2.7.8 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -18,11 +18,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Not required for MinGW. #Patch0: libxml2-multilib.patch +Patch2: libxml2-2.7.7-xpath-double-free.patch # MinGW-specific patches. -Patch1000: mingw32-libxml2-2.7.2-with-modules.patch Patch1001: mingw32-libxml2-static-build-compile-fix.patch -Patch1002: libxml2-gnome-bug-561340-fix.patch BuildArch: noarch @@ -35,8 +34,6 @@ BuildRequires: mingw32-gettext BuildRequires: mingw32-iconv BuildRequires: mingw32-zlib -BuildRequires: autoconf, automake, libtool - Requires: pkgconfig @@ -59,13 +56,8 @@ Static version of the MinGW Windows XML processing library. %prep %setup -q -n libxml2-%{version} -%patch1000 -p1 +%patch2 -p1 -b .CVE-2010-4494 %patch1001 -p0 -%patch1002 -p0 - -# Patched configure.in, so rebuild configure. -libtoolize --force --copy -autoreconf %build @@ -133,6 +125,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 23 2011 Kalev Lember - 2.7.8-1 +- Update to 2.7.8 +- Dropped upstreamed patches +- Use the CVE-2010-4494 patch from Fedora native libxml2 (#665965) + * Mon May 23 2011 Kalev Lember - 2.7.6-3 - Don't install html documentation which duplicates what is in Fedora native diff --git a/sources b/sources index 6f53129..4e904ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7740a8ec23878a2f50120e1faa2730f2 libxml2-2.7.6.tar.gz +8127a65e8c3b08856093099b52599c86 libxml2-2.7.8.tar.gz From b15f1efd45038048c5caf5da855d18a7cd237009 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 6 Jul 2011 20:22:23 +0300 Subject: [PATCH 23/25] Rebuilt against win-iconv --- mingw32-libxml2.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 25353aa..c22ca81 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -31,7 +31,7 @@ BuildRequires: mingw32-binutils BuildRequires: mingw32-dlfcn BuildRequires: mingw32-gettext -BuildRequires: mingw32-iconv +BuildRequires: mingw32-win-iconv BuildRequires: mingw32-zlib Requires: pkgconfig @@ -125,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jul 06 2011 Kalev Lember - 2.7.8-2 +- Rebuilt against win-iconv + * Mon May 23 2011 Kalev Lember - 2.7.8-1 - Update to 2.7.8 - Dropped upstreamed patches From cf8cac106392b04ea16097918bd074eaca01137b Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Fri, 6 Jan 2012 20:31:30 +0100 Subject: [PATCH 24/25] Fix DTD validation Re-added patch which was dropped in 2.7.8-1 as it is still needed to get DTD validation working (GNOME BZ #561340, #663588) --- libxml2-gnome-bug-561340-fix.patch | 11 +++++++++++ mingw32-libxml2.spec | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 libxml2-gnome-bug-561340-fix.patch diff --git a/libxml2-gnome-bug-561340-fix.patch b/libxml2-gnome-bug-561340-fix.patch new file mode 100644 index 0000000..30aa5c4 --- /dev/null +++ b/libxml2-gnome-bug-561340-fix.patch @@ -0,0 +1,11 @@ +--- include/libxml/xmlexports.h.orig 2010-10-12 08:25:32.000000000 +0200 ++++ include/libxml/xmlexports.h 2012-01-06 20:12:26.553304833 +0100 +@@ -115,7 +115,7 @@ + */ + #if defined(IN_LIBXML) && !defined(LIBXML_STATIC) + #define XMLPUBFUN __declspec(dllexport) +- #define XMLPUBVAR __declspec(dllexport) ++ #define XMLPUBVAR __declspec(dllexport) extern + #else + #define XMLPUBFUN + #if !defined(LIBXML_STATIC) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index c22ca81..0941d9c 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -23,6 +23,9 @@ Patch2: libxml2-2.7.7-xpath-double-free.patch # MinGW-specific patches. Patch1001: mingw32-libxml2-static-build-compile-fix.patch +# Patch is needed to get DTD validation working (GNOME BZ #663588) +Patch1002: libxml2-gnome-bug-561340-fix.patch + BuildArch: noarch BuildRequires: mingw32-filesystem >= 52 @@ -58,6 +61,7 @@ Static version of the MinGW Windows XML processing library. %patch2 -p1 -b .CVE-2010-4494 %patch1001 -p0 +%patch1002 -p0 %build @@ -125,6 +129,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 6 2012 Erik van Pienbroek - 2.7.8-3 +- Re-added patch which was dropped in 2.7.8-1 as it is still needed + to get DTD validation working (GNOME BZ #561340, #663588) + * Wed Jul 06 2011 Kalev Lember - 2.7.8-2 - Rebuilt against win-iconv From aa900bcbb4b789e4e96148232c738d20b245d39d Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Mon, 27 Feb 2012 23:30:17 +0100 Subject: [PATCH 25/25] Rebuild against the mingw-w64 toolchain --- mingw32-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-libxml2.spec b/mingw32-libxml2.spec index 0941d9c..6f1fc35 100644 --- a/mingw32-libxml2.spec +++ b/mingw32-libxml2.spec @@ -7,7 +7,7 @@ Name: mingw32-libxml2 Version: 2.7.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -129,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Feb 27 2012 Erik van Pienbroek - 2.7.8-4 +- Rebuild against the mingw-w64 toolchain + * Fri Jan 6 2012 Erik van Pienbroek - 2.7.8-3 - Re-added patch which was dropped in 2.7.8-1 as it is still needed to get DTD validation working (GNOME BZ #561340, #663588)