From 28d67b0ae3729edc6cecf43f46e83f24043645c4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 26 Jan 2009 22:45:14 +0000 Subject: [PATCH 01/69] 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/69] 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/69] 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/69] - 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/69] - 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/69] 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/69] - 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/69] - 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/69] 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/69] - 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/69] 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/69] - 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/69] 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/69] 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/69] 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/69] 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/69] - 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/69] 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/69] 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/69] - 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/69] 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/69] 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/69] 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/69] 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/69] 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) From 423cd948d8280c61df41c3807bbc5ee9dd82bbbe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 6 Mar 2012 14:14:36 +0000 Subject: [PATCH 26/69] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 3ac1596abce8181168fbf935ff68e7cd7c73fa3c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 6 Mar 2012 21:51:30 +0200 Subject: [PATCH 27/69] Renamed the source package to mingw-libxml2 (#800440) --- mingw32-libxml2.spec => mingw-libxml2.spec | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) rename mingw32-libxml2.spec => mingw-libxml2.spec (93%) diff --git a/mingw32-libxml2.spec b/mingw-libxml2.spec similarity index 93% rename from mingw32-libxml2.spec rename to mingw-libxml2.spec index 6f1fc35..b5f1816 100644 --- a/mingw32-libxml2.spec +++ b/mingw-libxml2.spec @@ -5,9 +5,9 @@ %global __find_provides %{_mingw32_findprovides} %define __debug_install_post %{_mingw32_debug_install_post} -Name: mingw32-libxml2 +Name: mingw-libxml2 Version: 2.7.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -37,19 +37,25 @@ BuildRequires: mingw32-gettext BuildRequires: mingw32-win-iconv BuildRequires: mingw32-zlib -Requires: pkgconfig - %description MinGW Windows libxml2 XML processing library. -%package static +%package -n mingw32-libxml2 +Summary: MinGW Windows libxml2 XML processing library +Requires: pkgconfig + +%description -n mingw32-libxml2 +MinGW Windows libxml2 XML processing library. + + +%package -n mingw32-libxml2-static Summary: Static version of the MinGW Windows XML processing library -Requires: %{name} = %{version}-%{release} +Requires: mingw32-libxml2 = %{version}-%{release} Group: Development/Libraries -%description static +%description -n mingw32-libxml2-static Static version of the MinGW Windows XML processing library. @@ -109,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/ rm -rf $RPM_BUILD_ROOT -%files +%files -n mingw32-libxml2 %defattr(-,root,root,-) %{_mingw32_bindir}/libxml2-2.dll %{_mingw32_bindir}/xml2-config @@ -123,12 +129,15 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/aclocal/* -%files static +%files -n mingw32-libxml2-static %defattr(-,root,root,-) %{_mingw32_libdir}/libxml2.a %changelog +* Tue Mar 06 2012 Kalev Lember - 2.7.8-5 +- Renamed the source package to mingw-libxml2 (#800440) + * Mon Feb 27 2012 Erik van Pienbroek - 2.7.8-4 - Rebuild against the mingw-w64 toolchain From 559bd78dbeac68a792e58bda20447a5234b54642 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 6 Mar 2012 21:53:40 +0200 Subject: [PATCH 28/69] Modernize the spec file --- mingw-libxml2.spec | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index b5f1816..e492dc4 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,5 @@ %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: mingw-libxml2 @@ -14,7 +11,6 @@ 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 @@ -28,7 +24,7 @@ Patch1002: libxml2-gnome-bug-561340-fix.patch BuildArch: noarch -BuildRequires: mingw32-filesystem >= 52 +BuildRequires: mingw32-filesystem BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -59,7 +55,7 @@ Group: Development/Libraries Static version of the MinGW Windows XML processing library. -%{_mingw32_debug_package} +%{?_mingw32_debug_package} %prep @@ -89,8 +85,6 @@ popd %install -rm -rf $RPM_BUILD_ROOT - # First install all the files belonging to the shared build make -C build_shared DESTDIR=$RPM_BUILD_ROOT install @@ -111,12 +105,7 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir} rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/ -%clean -rm -rf $RPM_BUILD_ROOT - - %files -n mingw32-libxml2 -%defattr(-,root,root,-) %{_mingw32_bindir}/libxml2-2.dll %{_mingw32_bindir}/xml2-config %{_mingw32_bindir}/xmlcatalog.exe @@ -130,13 +119,13 @@ rm -rf $RPM_BUILD_ROOT %files -n mingw32-libxml2-static -%defattr(-,root,root,-) %{_mingw32_libdir}/libxml2.a %changelog * Tue Mar 06 2012 Kalev Lember - 2.7.8-5 - Renamed the source package to mingw-libxml2 (#800440) +- Modernize the spec file * Mon Feb 27 2012 Erik van Pienbroek - 2.7.8-4 - Rebuild against the mingw-w64 toolchain From 5103b975c1f3d37b60143006032548eff957d362 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 6 Mar 2012 21:54:31 +0200 Subject: [PATCH 29/69] Use mingw macros without leading underscore --- mingw-libxml2.spec | 47 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index e492dc4..927cd5c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,6 +1,6 @@ -%global __strip %{_mingw32_strip} -%global __objdump %{_mingw32_objdump} -%define __debug_install_post %{_mingw32_debug_install_post} +%global __strip %{mingw32_strip} +%global __objdump %{mingw32_objdump} +%define __debug_install_post %{mingw32_debug_install_post} Name: mingw-libxml2 Version: 2.7.8 @@ -55,7 +55,7 @@ Group: Development/Libraries Static version of the MinGW Windows XML processing library. -%{?_mingw32_debug_package} +%{?mingw32_debug_package} %prep @@ -72,14 +72,14 @@ Static version of the MinGW Windows XML processing library. mkdir build_static pushd build_static LDFLAGS="-no-undefined" \ - %{_mingw32_configure} --without-python --with-modules --enable-static --disable-shared --with-threads=win32 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=win32 + %{mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=win32 make %{?_smp_mflags} popd @@ -91,41 +91,42 @@ 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} +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 +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 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/ +rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw32_docdir} +rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/ %files -n mingw32-libxml2 -%{_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/libxml-2.0.pc -%{_mingw32_libdir}/xml2Conf.sh -%{_mingw32_includedir}/libxml2 -%{_mingw32_datadir}/aclocal/* +%{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/libxml-2.0.pc +%{mingw32_libdir}/xml2Conf.sh +%{mingw32_includedir}/libxml2 +%{mingw32_datadir}/aclocal/* %files -n mingw32-libxml2-static -%{_mingw32_libdir}/libxml2.a +%{mingw32_libdir}/libxml2.a %changelog * Tue Mar 06 2012 Kalev Lember - 2.7.8-5 - Renamed the source package to mingw-libxml2 (#800440) - Modernize the spec file +- Use mingw macros without leading underscore * Mon Feb 27 2012 Erik van Pienbroek - 2.7.8-4 - Rebuild against the mingw-w64 toolchain @@ -186,7 +187,7 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/gtk-doc/ - 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 +- 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 73a99a949895884e9934be83039616ef651f9d0c Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Fri, 9 Mar 2012 17:11:10 +0100 Subject: [PATCH 30/69] Dropped .la files --- mingw-libxml2.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 927cd5c..e6edb82 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -4,7 +4,7 @@ Name: mingw-libxml2 Version: 2.7.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -93,9 +93,6 @@ make -C build_shared DESTDIR=$RPM_BUILD_ROOT install 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 @@ -104,6 +101,9 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} rm -rf $RPM_BUILD_ROOT%{mingw32_docdir} rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/ +# Drop all .la files +find $RPM_BUILD_ROOT -name "*.la" -delete + %files -n mingw32-libxml2 %{mingw32_bindir}/libxml2-2.dll @@ -111,7 +111,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/ %{mingw32_bindir}/xmlcatalog.exe %{mingw32_bindir}/xmllint.exe %{mingw32_libdir}/libxml2.dll.a -%{mingw32_libdir}/libxml2.la %{mingw32_libdir}/pkgconfig/libxml-2.0.pc %{mingw32_libdir}/xml2Conf.sh %{mingw32_includedir}/libxml2 @@ -123,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/ %changelog +* Fri Mar 09 2012 Erik van Pienbroek - 2.7.8-6 +- Dropped .la files + * Tue Mar 06 2012 Kalev Lember - 2.7.8-5 - Renamed the source package to mingw-libxml2 (#800440) - Modernize the spec file From 7467d92e08a06e5aa0317761ddd725c6fb81289b Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 10 Mar 2012 22:23:39 +0100 Subject: [PATCH 31/69] Added win64 support --- mingw-libxml2.spec | 89 +++++++++++++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 24 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index e6edb82..c4be53b 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,10 +1,11 @@ -%global __strip %{mingw32_strip} -%global __objdump %{mingw32_objdump} -%define __debug_install_post %{mingw32_debug_install_post} +%?mingw_package_header + +%global mingw_build_win32 1 +%global mingw_build_win64 1 Name: mingw-libxml2 Version: 2.7.8 -Release: 6%{?dist} +Release: 7%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -24,20 +25,26 @@ Patch1002: libxml2-gnome-bug-561340-fix.patch BuildArch: noarch -BuildRequires: mingw32-filesystem +BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils - -BuildRequires: mingw32-dlfcn BuildRequires: mingw32-gettext BuildRequires: mingw32-win-iconv BuildRequires: mingw32-zlib +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc +BuildRequires: mingw64-binutils +BuildRequires: mingw64-gettext +BuildRequires: mingw64-win-iconv +BuildRequires: mingw64-zlib + %description MinGW Windows libxml2 XML processing library. +# Win32 %package -n mingw32-libxml2 Summary: MinGW Windows libxml2 XML processing library Requires: pkgconfig @@ -45,7 +52,6 @@ Requires: pkgconfig %description -n mingw32-libxml2 MinGW Windows libxml2 XML processing library. - %package -n mingw32-libxml2-static Summary: Static version of the MinGW Windows XML processing library Requires: mingw32-libxml2 = %{version}-%{release} @@ -54,8 +60,24 @@ Group: Development/Libraries %description -n mingw32-libxml2-static Static version of the MinGW Windows XML processing library. +# Win64 +%package -n mingw64-libxml2 +Summary: MinGW Windows libxml2 XML processing library +Requires: pkgconfig + +%description -n mingw64-libxml2 +MinGW Windows libxml2 XML processing library. + +%package -n mingw64-libxml2-static +Summary: Static version of the MinGW Windows XML processing library +Requires: mingw64-libxml2 = %{version}-%{release} +Group: Development/Libraries + +%description -n mingw64-libxml2-static +Static version of the MinGW Windows XML processing library. + -%{?mingw32_debug_package} +%?mingw_debug_package %prep @@ -69,29 +91,26 @@ Static version of the MinGW Windows XML processing library. %build # 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 --with-threads=win32 CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" - make %{?_smp_mflags} -popd +export LDFLAGS="-no-undefined" +export CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" +MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32 +unset CFLAGS +MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32 -mkdir build_shared -pushd build_shared - LDFLAGS="-no-undefined" \ - %{mingw32_configure} --without-python --with-modules --disable-static --enable-shared --with-threads=win32 - make %{?_smp_mflags} -popd +MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags} +MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags} %install # First install all the files belonging to the shared build -make -C build_shared DESTDIR=$RPM_BUILD_ROOT install +MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install DESTDIR=$RPM_BUILD_ROOT # 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 +MINGW_BUILDDIR_SUFFIX=static %mingw_make_install DESTDIR=$RPM_BUILD_ROOT/build_static + mv $RPM_BUILD_ROOT/build_static%{mingw32_libdir}/*.a $RPM_BUILD_ROOT%{mingw32_libdir} +mv $RPM_BUILD_ROOT/build_static%{mingw64_libdir}/*.a $RPM_BUILD_ROOT%{mingw64_libdir} # Drop the folder which was temporary used for installing the static bits rm -rf $RPM_BUILD_ROOT/build_static @@ -101,10 +120,15 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} rm -rf $RPM_BUILD_ROOT%{mingw32_docdir} rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/ +rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw64_docdir} +rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/ + # Drop all .la files find $RPM_BUILD_ROOT -name "*.la" -delete +# Win32 %files -n mingw32-libxml2 %{mingw32_bindir}/libxml2-2.dll %{mingw32_bindir}/xml2-config @@ -116,12 +140,29 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %{mingw32_includedir}/libxml2 %{mingw32_datadir}/aclocal/* - %files -n mingw32-libxml2-static %{mingw32_libdir}/libxml2.a +# Win64 +%files -n mingw64-libxml2 +%{mingw64_bindir}/libxml2-2.dll +%{mingw64_bindir}/xml2-config +%{mingw64_bindir}/xmlcatalog.exe +%{mingw64_bindir}/xmllint.exe +%{mingw64_libdir}/libxml2.dll.a +%{mingw64_libdir}/pkgconfig/libxml-2.0.pc +%{mingw64_libdir}/xml2Conf.sh +%{mingw64_includedir}/libxml2 +%{mingw64_datadir}/aclocal/* + +%files -n mingw64-libxml2-static +%{mingw64_libdir}/libxml2.a + %changelog +* Sat Mar 10 2012 Erik van Pienbroek - 2.7.8-7 +- Added win64 support + * Fri Mar 09 2012 Erik van Pienbroek - 2.7.8-6 - Dropped .la files From 6e3a17f7dd458e591a7a4d1fa5328ea15a677b45 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Wed, 23 May 2012 22:21:18 +0200 Subject: [PATCH 32/69] Update to 2.8.0 --- .gitignore | 1 + libxml2-2.7.7-xpath-double-free.patch | 22 ---------------------- libxml2-gnome-bug-561340-fix.patch | 11 ----------- mingw-libxml2.spec | 21 ++++++--------------- sources | 2 +- 5 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 libxml2-2.7.7-xpath-double-free.patch delete mode 100644 libxml2-gnome-bug-561340-fix.patch diff --git a/.gitignore b/.gitignore index a9e0040..7f698ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libxml2-2.7.6.tar.gz /libxml2-2.7.8.tar.gz +/libxml2-2.8.0.tar.gz diff --git a/libxml2-2.7.7-xpath-double-free.patch b/libxml2-2.7.7-xpath-double-free.patch deleted file mode 100644 index c5dbbee..0000000 --- a/libxml2-2.7.7-xpath-double-free.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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 30aa5c4..0000000 --- a/libxml2-gnome-bug-561340-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/mingw-libxml2.spec b/mingw-libxml2.spec index c4be53b..8301cc0 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,11 +1,8 @@ -%?mingw_package_header - -%global mingw_build_win32 1 -%global mingw_build_win64 1 +%{?mingw_package_header} Name: mingw-libxml2 -Version: 2.7.8 -Release: 7%{?dist} +Version: 2.8.0 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -13,16 +10,9 @@ Group: Development/Libraries URL: http://xmlsoft.org/ Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz -# Not required for MinGW. -#Patch0: libxml2-multilib.patch -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 >= 95 @@ -83,9 +73,7 @@ Static version of the MinGW Windows XML processing library. %prep %setup -q -n libxml2-%{version} -%patch2 -p1 -b .CVE-2010-4494 %patch1001 -p0 -%patch1002 -p0 %build @@ -160,6 +148,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Wed May 23 2012 Erik van Pienbroek - 2.8.0-1 +- Update to 2.8.0 + * Sat Mar 10 2012 Erik van Pienbroek - 2.7.8-7 - Added win64 support diff --git a/sources b/sources index 4e904ff..caedfc9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8127a65e8c3b08856093099b52599c86 libxml2-2.7.8.tar.gz +c62106f02ee00b6437f0fb9d370c1093 libxml2-2.8.0.tar.gz From 531d2557f5a45e3581d6cb2709d55ea358d246bd Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 20:37:40 -0500 Subject: [PATCH 33/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 8301cc0..7eb66dd 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -148,6 +148,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Jul 20 2012 Fedora Release Engineering - 2.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed May 23 2012 Erik van Pienbroek - 2.8.0-1 - Update to 2.8.0 From b0b25fd293dfed2ba9444c6620dca6b352da7152 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 22 Sep 2012 17:28:07 +0200 Subject: [PATCH 34/69] Update to 2.9.0 --- .gitignore | 1 + mingw-libxml2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7f698ba..781b6f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.7.8.tar.gz /libxml2-2.8.0.tar.gz +/libxml2-2.9.0.tar.gz diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 7eb66dd..1c4ed43 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.8.0 -Release: 2%{?dist} +Version: 2.9.0 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -148,6 +148,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Sep 22 2012 Erik van Pienbroek - 2.9.0-1 +- Update to 2.9.0 + * Fri Jul 20 2012 Fedora Release Engineering - 2.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index caedfc9..07cc6d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c62106f02ee00b6437f0fb9d370c1093 libxml2-2.8.0.tar.gz +5b9bebf4f5d2200ae2c4efe8fa6103f7 libxml2-2.9.0.tar.gz From 6cb5bdef89f0b93e1b0799568e4e0b66a535f289 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 01:07:32 -0600 Subject: [PATCH 35/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 1c4ed43..8dc233c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -148,6 +148,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 2.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sat Sep 22 2012 Erik van Pienbroek - 2.9.0-1 - Update to 2.9.0 From 53c2093a6b8477cd6509fddfa76297e978ef5346 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sun, 14 Apr 2013 16:46:42 +0200 Subject: [PATCH 36/69] Throw off LDFLAGS and CFLAGS settings (#951472) and simplified static libraries installation --- mingw-libxml2.spec | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 8dc233c..cb9e11c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -79,10 +79,11 @@ Static version of the MinGW Windows XML processing library. %build # LibXML2 can't build static and shared libraries in one go, so we # build LibXML2 twice here -export LDFLAGS="-no-undefined" -export CFLAGS="$CFLAGS -DLIBXML_STATIC_FOR_DLL" +MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" +MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32 -unset CFLAGS +MINGW32_CPPFLAGS= +MINGW64_CPPFLAGS= MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32 MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags} @@ -93,15 +94,9 @@ MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags} # First install all the files belonging to the shared build MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install DESTDIR=$RPM_BUILD_ROOT -# Install all the files from the static build in a seperate folder -# and move the static libraries to the right location -MINGW_BUILDDIR_SUFFIX=static %mingw_make_install DESTDIR=$RPM_BUILD_ROOT/build_static - -mv $RPM_BUILD_ROOT/build_static%{mingw32_libdir}/*.a $RPM_BUILD_ROOT%{mingw32_libdir} -mv $RPM_BUILD_ROOT/build_static%{mingw64_libdir}/*.a $RPM_BUILD_ROOT%{mingw64_libdir} - -# Drop the folder which was temporary used for installing the static bits -rm -rf $RPM_BUILD_ROOT/build_static +# Then manually install the static libraries to the right location +install -m 0644 build_win32static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw32_libdir}/ +install -m 0644 build_win64static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw64_libdir}/ # Remove documentation which duplicates Fedora native. rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} @@ -148,6 +143,10 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Apr 12 2013 Nicola Fontana - 2.9.0-3 +- Throw off LDFLAGS and CFLAGS settings (#951472) +- Simplified static libraries installation + * Thu Feb 14 2013 Fedora Release Engineering - 2.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From bf4c62c167f478347f639cad681ae6da5fc2b93d Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 20 Apr 2013 01:02:36 +0200 Subject: [PATCH 37/69] Update to 2.9.1 --- .gitignore | 1 + mingw-libxml2.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 781b6f6..06a6c43 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.7.8.tar.gz /libxml2-2.8.0.tar.gz /libxml2-2.9.0.tar.gz +/libxml2-2.9.1.tar.gz diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index cb9e11c..b404873 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.0 -Release: 3%{?dist} +Version: 2.9.1 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -143,6 +143,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Apr 20 2013 Erik van Pienbroek - 2.9.1-1 +- Update to 2.9.1 + * Fri Apr 12 2013 Nicola Fontana - 2.9.0-3 - Throw off LDFLAGS and CFLAGS settings (#951472) - Simplified static libraries installation diff --git a/sources b/sources index 07cc6d6..446b233 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5b9bebf4f5d2200ae2c4efe8fa6103f7 libxml2-2.9.0.tar.gz +9c0cfef285d5c4a5c80d00904ddab380 libxml2-2.9.1.tar.gz From 2151ec95fb5154274c8725083904090e995f4bbd Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 05:54:44 -0500 Subject: [PATCH 38/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index b404873..9626d50 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -143,6 +143,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 2.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Sat Apr 20 2013 Erik van Pienbroek - 2.9.1-1 - Update to 2.9.1 From c94d54b74b2e8925ce294995b2e13c6b4ec47b81 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 3 Aug 2013 21:37:43 +0200 Subject: [PATCH 39/69] Added the license and other %doc files (RHBZ #980288) --- mingw-libxml2.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 9626d50..ccaf97a 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -113,6 +113,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete # Win32 %files -n mingw32-libxml2 +%doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS %{mingw32_bindir}/libxml2-2.dll %{mingw32_bindir}/xml2-config %{mingw32_bindir}/xmlcatalog.exe @@ -128,6 +129,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete # Win64 %files -n mingw64-libxml2 +%doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS %{mingw64_bindir}/libxml2-2.dll %{mingw64_bindir}/xml2-config %{mingw64_bindir}/xmlcatalog.exe @@ -143,6 +145,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Aug 3 2013 Erik van Pienbroek - 2.9.1-3 +- Added the license and other %%doc files (RHBZ #980288) + * Sat Aug 03 2013 Fedora Release Engineering - 2.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From b6c6603eb109ea42b569dad100cfc866aa1f366c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 05:01:05 -0500 Subject: [PATCH 40/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index ccaf97a..a60349c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -145,6 +145,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 2.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat Aug 3 2013 Erik van Pienbroek - 2.9.1-3 - Added the license and other %%doc files (RHBZ #980288) From 47ad62add5888cb5be7b2781b0197d4201b151a0 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Tue, 23 Dec 2014 15:19:42 +0100 Subject: [PATCH 41/69] Update to 2.9.2 --- .gitignore | 1 + libxml2-2.9.2-catalog-revert.patch | 31 ++++++++++++++++++++++++++++++ mingw-libxml2.spec | 17 +++++++++++++--- sources | 2 +- 4 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 libxml2-2.9.2-catalog-revert.patch diff --git a/.gitignore b/.gitignore index 06a6c43..7ec75b0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.8.0.tar.gz /libxml2-2.9.0.tar.gz /libxml2-2.9.1.tar.gz +/libxml2-2.9.2.tar.gz diff --git a/libxml2-2.9.2-catalog-revert.patch b/libxml2-2.9.2-catalog-revert.patch new file mode 100644 index 0000000..b3de004 --- /dev/null +++ b/libxml2-2.9.2-catalog-revert.patch @@ -0,0 +1,31 @@ +From 0e6659ec960734b0b01aad196d4bdb4a3800b493 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Thu, 16 Oct 2014 19:10:59 +0200 +Subject: [PATCH] Revert "Missing initialization for the catalog module" + +It's not correct to always load the default catalog. +https://bugzilla.redhat.com/show_bug.cgi?id=1153753 + +This reverts commit 054c716ea1bf001544127a4ab4f4346d1b9947e7. + +--- + parser.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/parser.c b/parser.c +index 1d93967..67c9dfd 100644 +--- a/parser.c ++++ b/parser.c +@@ -14830,9 +14830,6 @@ xmlInitParser(void) { + #ifdef LIBXML_XPATH_ENABLED + xmlXPathInit(); + #endif +-#ifdef LIBXML_CATALOG_ENABLED +- xmlInitializeCatalog(); +-#endif + xmlParserInitialized = 1; + #ifdef LIBXML_THREAD_ENABLED + } +-- +1.9.3 + diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index a60349c..619f42a 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.1 -Release: 4%{?dist} +Version: 2.9.2 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -10,6 +10,10 @@ Group: Development/Libraries URL: http://xmlsoft.org/ Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz +# Avoid corrupting the xml catalogs +# https://bugzilla.redhat.com/show_bug.cgi?id=1153753 +Patch0: libxml2-2.9.2-catalog-revert.patch + # MinGW-specific patches. Patch1001: mingw32-libxml2-static-build-compile-fix.patch @@ -72,7 +76,7 @@ Static version of the MinGW Windows XML processing library. %prep %setup -q -n libxml2-%{version} - +%patch0 -p1 %patch1001 -p0 @@ -119,6 +123,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %{mingw32_bindir}/xmlcatalog.exe %{mingw32_bindir}/xmllint.exe %{mingw32_libdir}/libxml2.dll.a +%{mingw32_libdir}/cmake/libxml2/ %{mingw32_libdir}/pkgconfig/libxml-2.0.pc %{mingw32_libdir}/xml2Conf.sh %{mingw32_includedir}/libxml2 @@ -135,6 +140,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %{mingw64_bindir}/xmlcatalog.exe %{mingw64_bindir}/xmllint.exe %{mingw64_libdir}/libxml2.dll.a +%{mingw64_libdir}/cmake/libxml2/ %{mingw64_libdir}/pkgconfig/libxml-2.0.pc %{mingw64_libdir}/xml2Conf.sh %{mingw64_includedir}/libxml2 @@ -145,6 +151,11 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Tue Dec 23 2014 Erik van Pienbroek - 2.9.2-1 +- Update to 2.9.2 +- Avoid corrupting the xml catalogs +- Fix CVE-2014-0191 (RHBZ #1107557) + * Sat Jun 07 2014 Fedora Release Engineering - 2.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 446b233..d562ac4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9c0cfef285d5c4a5c80d00904ddab380 libxml2-2.9.1.tar.gz +9e6a9aca9d155737868b3dc5fd82f788 libxml2-2.9.2.tar.gz From 6034d5d1583628cdf37fef119d1dba46fc9ce405 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 20:29:20 +0000 Subject: [PATCH 42/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 619f42a..f61a126 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -151,6 +151,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 2.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Tue Dec 23 2014 Erik van Pienbroek - 2.9.2-1 - Update to 2.9.2 - Avoid corrupting the xml catalogs From 2aa4692c1f6fd676a3fa445bd8e646ff92d44201 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 08:18:01 +0000 Subject: [PATCH 43/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index f61a126..f39496b 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -151,6 +151,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 2.9.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 2.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 4ee905d7f17f9451f00d763fabf05483a5e874f2 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Sat, 6 Feb 2016 17:04:14 +0100 Subject: [PATCH 44/69] Update to 2.9.3 --- .gitignore | 1 + libxml2-2.9.2-catalog-revert.patch | 31 ------------------------------ mingw-libxml2.spec | 15 ++++++++------- sources | 2 +- 4 files changed, 10 insertions(+), 39 deletions(-) delete mode 100644 libxml2-2.9.2-catalog-revert.patch diff --git a/.gitignore b/.gitignore index 7ec75b0..9af8829 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.0.tar.gz /libxml2-2.9.1.tar.gz /libxml2-2.9.2.tar.gz +/libxml2-2.9.3.tar.gz diff --git a/libxml2-2.9.2-catalog-revert.patch b/libxml2-2.9.2-catalog-revert.patch deleted file mode 100644 index b3de004..0000000 --- a/libxml2-2.9.2-catalog-revert.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0e6659ec960734b0b01aad196d4bdb4a3800b493 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Thu, 16 Oct 2014 19:10:59 +0200 -Subject: [PATCH] Revert "Missing initialization for the catalog module" - -It's not correct to always load the default catalog. -https://bugzilla.redhat.com/show_bug.cgi?id=1153753 - -This reverts commit 054c716ea1bf001544127a4ab4f4346d1b9947e7. - ---- - parser.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/parser.c b/parser.c -index 1d93967..67c9dfd 100644 ---- a/parser.c -+++ b/parser.c -@@ -14830,9 +14830,6 @@ xmlInitParser(void) { - #ifdef LIBXML_XPATH_ENABLED - xmlXPathInit(); - #endif --#ifdef LIBXML_CATALOG_ENABLED -- xmlInitializeCatalog(); --#endif - xmlParserInitialized = 1; - #ifdef LIBXML_THREAD_ENABLED - } --- -1.9.3 - diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index f39496b..fe2cb99 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.2 -Release: 3%{?dist} +Version: 2.9.3 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -10,10 +10,6 @@ Group: Development/Libraries URL: http://xmlsoft.org/ Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz -# Avoid corrupting the xml catalogs -# https://bugzilla.redhat.com/show_bug.cgi?id=1153753 -Patch0: libxml2-2.9.2-catalog-revert.patch - # MinGW-specific patches. Patch1001: mingw32-libxml2-static-build-compile-fix.patch @@ -76,7 +72,6 @@ Static version of the MinGW Windows XML processing library. %prep %setup -q -n libxml2-%{version} -%patch0 -p1 %patch1001 -p0 @@ -151,6 +146,12 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat Feb 6 2016 Erik van Pienbroek - 2.9.3-1 +- Update to 2.9.3 +- Fixes various CVE's: + RHBZ #1213960, #1262853, #1262854, #1274225, #1274226, #1276299 + RHBZ #1276300, #1277149, #1277150, #1281952, #1281953 + * Thu Feb 04 2016 Fedora Release Engineering - 2.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index d562ac4..8ad103b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e6a9aca9d155737868b3dc5fd82f788 libxml2-2.9.2.tar.gz +daece17e045f1c107610e137ab50c179 libxml2-2.9.3.tar.gz From cf716cca21fbb4d903a0ef0c9135d65769a5fede Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 21:13:57 +0000 Subject: [PATCH 45/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index fe2cb99..d590fae 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2.9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Sat Feb 6 2016 Erik van Pienbroek - 2.9.3-1 - Update to 2.9.3 - Fixes various CVE's: From b313488209603072a97ecefcdc453160aaaff007 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 21:43:24 +0000 Subject: [PATCH 46/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index d590fae..a48d177 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2.9.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 2.9.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 7e47d2bc20bf44b2f7a1ef1c4360ac5ba77f10ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Feb 2018 02:23:39 +0000 Subject: [PATCH 47/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index a48d177..43304fc 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Feb 08 2018 Fedora Release Engineering - 2.9.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 2.9.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 0f73d4f7ac26a178e818aa45f21aa862f80a41da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 10:31:45 +0000 Subject: [PATCH 48/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 43304fc..36dccc9 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2.9.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Feb 08 2018 Fedora Release Engineering - 2.9.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From a46e29f11b02a9c2813506fe0f3354c51190cc8a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:54 +0100 Subject: [PATCH 49/69] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- mingw-libxml2.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 36dccc9..443a78f 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -6,7 +6,6 @@ Release: 5%{?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 @@ -45,7 +44,6 @@ MinGW Windows libxml2 XML processing library. %package -n mingw32-libxml2-static Summary: Static version of the MinGW Windows XML processing library Requires: mingw32-libxml2 = %{version}-%{release} -Group: Development/Libraries %description -n mingw32-libxml2-static Static version of the MinGW Windows XML processing library. @@ -61,7 +59,6 @@ MinGW Windows libxml2 XML processing library. %package -n mingw64-libxml2-static Summary: Static version of the MinGW Windows XML processing library Requires: mingw64-libxml2 = %{version}-%{release} -Group: Development/Libraries %description -n mingw64-libxml2-static Static version of the MinGW Windows XML processing library. From 0206104699373fc15bf1adadc21cbe4c86deb04a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 10:44:42 +0000 Subject: [PATCH 50/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 443a78f..f358339 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -143,6 +143,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2.9.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 2.9.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 591125df172cd543384bc51945e5297ddb84cb49 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 7 Mar 2019 13:05:10 +0000 Subject: [PATCH 51/69] Resync with Fedora Rawhide libxml2 2.9.9-2. Use autosetup. --- .gitignore | 1 + libxml2-2.9.8-python3-unicode-errors.patch | 34 ++++++++++++++++++++++ libxml2-multilib.patch | 24 +++++++++++++++ mingw-libxml2.spec | 17 +++++++---- sources | 2 +- 5 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 libxml2-2.9.8-python3-unicode-errors.patch create mode 100644 libxml2-multilib.patch diff --git a/.gitignore b/.gitignore index 9af8829..f5ce246 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.1.tar.gz /libxml2-2.9.2.tar.gz /libxml2-2.9.3.tar.gz +/libxml2-2.9.9.tar.gz diff --git a/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2-2.9.8-python3-unicode-errors.patch new file mode 100644 index 0000000..e87dcde --- /dev/null +++ b/libxml2-2.9.8-python3-unicode-errors.patch @@ -0,0 +1,34 @@ +Index: libxml2-2.9.5/python/libxml.c +=================================================================== +--- libxml2-2.9.5.orig/python/libxml.c ++++ libxml2-2.9.5/python/libxml.c +@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + PyObject *message; + PyObject *result; + char str[1000]; ++ unsigned char *ptr = (unsigned char *)str; + + #ifdef DEBUG_ERROR + printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); +@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + str[999] = 0; + va_end(ap); + ++#if PY_MAJOR_VERSION >= 3 ++ /* Ensure the error string doesn't start at UTF8 continuation. */ ++ while (*ptr && (*ptr & 0xc0) == 0x80) ++ ptr++; ++#endif ++ + list = PyTuple_New(2); + PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); + Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); +- message = libxml_charPtrConstWrap(str); ++ message = libxml_charPtrConstWrap(ptr); + PyTuple_SetItem(list, 1, message); + result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list); ++ /* Forget any errors caused in the error handler. */ ++ PyErr_Clear(); + Py_XDECREF(list); + Py_XDECREF(result); + } diff --git a/libxml2-multilib.patch b/libxml2-multilib.patch new file mode 100644 index 0000000..138d38f --- /dev/null +++ b/libxml2-multilib.patch @@ -0,0 +1,24 @@ +*** XML/xml2-config.in.orig 2006-06-06 16:35:56.000000000 +0200 +--- XML/xml2-config.in 2006-06-06 16:36:24.000000000 +0200 +*************** +*** 3,9 **** + prefix=@prefix@ + exec_prefix=@exec_prefix@ + includedir=@includedir@ +! libdir=@libdir@ + + usage() + { +--- 3,14 ---- + prefix=@prefix@ + exec_prefix=@exec_prefix@ + includedir=@includedir@ +! if [ "`ldd /bin/sh | grep lib64`" = "" ] +! then +! libdir=${exec_prefix}/lib +! else +! libdir=${exec_prefix}/lib64 +! fi + + usage() + { diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index f358339..108501c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,16 +1,20 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.3 -Release: 6%{?dist} +Version: 2.9.9 +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT URL: http://xmlsoft.org/ Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz +Patch0: libxml2-multilib.patch +# Patch from openSUSE. +# See: https://bugzilla.gnome.org/show_bug.cgi?id=789714 +Patch1: libxml2-2.9.8-python3-unicode-errors.patch # MinGW-specific patches. -Patch1001: mingw32-libxml2-static-build-compile-fix.patch +#Patch1001: mingw32-libxml2-static-build-compile-fix.patch BuildArch: noarch @@ -68,8 +72,7 @@ Static version of the MinGW Windows XML processing library. %prep -%setup -q -n libxml2-%{version} -%patch1001 -p0 +%autosetup -p1 -n libxml2-%{version} %build @@ -143,6 +146,10 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Mar 07 2019 Richard W.M. Jones - 2.9.9-2 +- Resync with Fedora Rawhide libxml2 2.9.9-2. +- Use autosetup. + * Fri Feb 01 2019 Fedora Release Engineering - 2.9.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 8ad103b..bd52436 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -daece17e045f1c107610e137ab50c179 libxml2-2.9.3.tar.gz +SHA512 (libxml2-2.9.9.tar.gz) = cb7784ba4e72e942614e12e4f83f4ceb275f3d738b30e3b5c1f25edf8e9fa6789e854685974eed95b362049dbf6c8e7357e0327d64c681ed390534ac154e6810 From 897e0d14d07c69db84ac6d93c42bce59a4d395b2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 16:58:11 +0000 Subject: [PATCH 52/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 108501c..d6ace87 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.9.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Mar 07 2019 Richard W.M. Jones - 2.9.9-2 - Resync with Fedora Rawhide libxml2 2.9.9-2. - Use autosetup. From aa19cd4c892b84ba46c5d6d3de7af3562dab5f40 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 13:15:06 +0000 Subject: [PATCH 53/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index d6ace87..6d96517 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -146,6 +146,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2.9.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 2.9.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 48b6bc7dfdce57526861e44716540ec3c28160ea Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 23 Apr 2020 12:39:44 +0100 Subject: [PATCH 54/69] Update to 2.9.10 Fix CVE-2019-19956 (#1788858). Fix CVE-2019-20388 (#1799738). Fix CVE-2020-7595 (#1799788). --- .gitignore | 1 + mingw-libxml2-2.9.10-CVE-2019-20388.patch | 33 +++++++++++++++++++ mingw-libxml2-2.9.10-CVE-2020-7595.patch | 32 ++++++++++++++++++ ...relaxed-approach-to-nested-documents.patch | 33 +++++++++++++++++++ mingw-libxml2.spec | 19 ++++++++--- ...w32-libxml2-static-build-compile-fix.patch | 11 ------- sources | 2 +- 7 files changed, 114 insertions(+), 17 deletions(-) create mode 100644 mingw-libxml2-2.9.10-CVE-2019-20388.patch create mode 100644 mingw-libxml2-2.9.10-CVE-2020-7595.patch create mode 100644 mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch delete mode 100644 mingw32-libxml2-static-build-compile-fix.patch diff --git a/.gitignore b/.gitignore index f5ce246..654f66c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.2.tar.gz /libxml2-2.9.3.tar.gz /libxml2-2.9.9.tar.gz +/libxml2-2.9.10.tar.gz diff --git a/mingw-libxml2-2.9.10-CVE-2019-20388.patch b/mingw-libxml2-2.9.10-CVE-2019-20388.patch new file mode 100644 index 0000000..3763354 --- /dev/null +++ b/mingw-libxml2-2.9.10-CVE-2019-20388.patch @@ -0,0 +1,33 @@ +From 6088a74bcf7d0c42e24cff4594d804e1d3c9fbca Mon Sep 17 00:00:00 2001 +From: Zhipeng Xie +Date: Tue, 20 Aug 2019 16:33:06 +0800 +Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream + +When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun +alloc a new schema for ctxt->schema and set vctxt->xsiAssemble +to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize +vctxt->xsiAssemble to 0 again which cause the alloced schema +can not be freed anymore. + +Found with libFuzzer. + +Signed-off-by: Zhipeng Xie +--- + xmlschemas.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/xmlschemas.c b/xmlschemas.c +index 301c8449..39d92182 100644 +--- a/xmlschemas.c ++++ b/xmlschemas.c +@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { + vctxt->nberrors = 0; + vctxt->depth = -1; + vctxt->skipDepth = -1; +- vctxt->xsiAssemble = 0; + vctxt->hasKeyrefs = 0; + #ifdef ENABLE_IDC_NODE_TABLES_TEST + vctxt->createIDCNodeTables = 1; +-- +2.24.1 + diff --git a/mingw-libxml2-2.9.10-CVE-2020-7595.patch b/mingw-libxml2-2.9.10-CVE-2020-7595.patch new file mode 100644 index 0000000..3dd6774 --- /dev/null +++ b/mingw-libxml2-2.9.10-CVE-2020-7595.patch @@ -0,0 +1,32 @@ +From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 +From: Zhipeng Xie +Date: Thu, 12 Dec 2019 17:30:55 +0800 +Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities + +When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef +return NULL which cause a infinite loop in xmlStringLenDecodeEntities + +Found with libFuzzer. + +Signed-off-by: Zhipeng Xie +--- + parser.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/parser.c b/parser.c +index d1c31963..a34bb6cd 100644 +--- a/parser.c ++++ b/parser.c +@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, + else + c = 0; + while ((c != 0) && (c != end) && /* non input consuming loop */ +- (c != end2) && (c != end3)) { ++ (c != end2) && (c != end3) && ++ (ctxt->instate != XML_PARSER_EOF)) { + + if (c == 0) break; + if ((c == '&') && (str[1] == '#')) { +-- +2.24.1 + diff --git a/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch b/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch new file mode 100644 index 0000000..0a63636 --- /dev/null +++ b/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch @@ -0,0 +1,33 @@ +From 0815302dee2b78139832c2080348086a0564836b Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Fri, 6 Dec 2019 12:27:29 +0100 +Subject: [PATCH] Fix freeing of nested documents + +Apparently, some libxslt RVTs can contain nested document nodes, see +issue #132. I'm not sure how this happens exactly but it can cause a +segfault in xmlFreeNodeList after the changes in commit 0762c9b6. + +Make sure not to touch the (nonexistent) `content` member of xmlDocs. +--- + tree.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tree.c b/tree.c +index 070670f1..0d7fc98c 100644 +--- a/tree.c ++++ b/tree.c +@@ -3708,6 +3708,11 @@ xmlFreeNodeList(xmlNodePtr cur) { + (cur->type != XML_XINCLUDE_START) && + (cur->type != XML_XINCLUDE_END) && + (cur->type != XML_ENTITY_REF_NODE) && ++ (cur->type != XML_DOCUMENT_NODE) && ++#ifdef LIBXML_DOCB_ENABLED ++ (cur->type != XML_DOCB_DOCUMENT_NODE) && ++#endif ++ (cur->type != XML_HTML_DOCUMENT_NODE) && + (cur->content != (xmlChar *) &(cur->properties))) { + DICT_FREE(cur->content) + } +-- +2.22.0 + diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 6d96517..b2c33ca 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.9 -Release: 4%{?dist} +Version: 2.9.10 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -12,9 +12,12 @@ Patch0: libxml2-multilib.patch # Patch from openSUSE. # See: https://bugzilla.gnome.org/show_bug.cgi?id=789714 Patch1: libxml2-2.9.8-python3-unicode-errors.patch - -# MinGW-specific patches. -#Patch1001: mingw32-libxml2-static-build-compile-fix.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1780573 +Patch2: mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1799738 +Patch3: mingw-libxml2-2.9.10-CVE-2019-20388.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1799788 +Patch4: mingw-libxml2-2.9.10-CVE-2020-7595.patch BuildArch: noarch @@ -146,6 +149,12 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Apr 23 2020 David King - 2.9.10-1 +- Update to 2.9.10 +- Fix CVE-2019-19956 (#1788858) +- Fix CVE-2019-20388 (#1799738) +- Fix CVE-2020-7595 (#1799788) + * Wed Jan 29 2020 Fedora Release Engineering - 2.9.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/mingw32-libxml2-static-build-compile-fix.patch b/mingw32-libxml2-static-build-compile-fix.patch deleted file mode 100644 index d153092..0000000 --- a/mingw32-libxml2-static-build-compile-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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/sources b/sources index bd52436..9aa6848 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libxml2-2.9.9.tar.gz) = cb7784ba4e72e942614e12e4f83f4ceb275f3d738b30e3b5c1f25edf8e9fa6789e854685974eed95b362049dbf6c8e7357e0327d64c681ed390534ac154e6810 +SHA512 (libxml2-2.9.10.tar.gz) = 0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed From 9bb36c514b07f9e25e629bb7339162e8898e8d21 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 07:48:26 +0000 Subject: [PATCH 55/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index b2c33ca..3138d92 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -149,6 +149,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 2.9.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Apr 23 2020 David King - 2.9.10-1 - Update to 2.9.10 - Fix CVE-2019-19956 (#1788858) From 4a4dfe850ed05c81ea90d4165962494c94f8be6d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 11 Sep 2020 08:47:15 +0100 Subject: [PATCH 56/69] Add fix for CVE-2020-24977 (RHBZ#1877788, RHBZ#1877789). --- libxml2-2.9.10-CVE-2020-24977.patch | 41 +++++++++++++++++++++++++++++ mingw-libxml2.spec | 7 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 libxml2-2.9.10-CVE-2020-24977.patch diff --git a/libxml2-2.9.10-CVE-2020-24977.patch b/libxml2-2.9.10-CVE-2020-24977.patch new file mode 100644 index 0000000..b5a7bec --- /dev/null +++ b/libxml2-2.9.10-CVE-2020-24977.patch @@ -0,0 +1,41 @@ +From 8e7c20a1af8776677d7890f30b7a180567701a49 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 3 Aug 2020 17:30:41 +0200 +Subject: [PATCH] Fix integer overflow when comparing schema dates + +Found by OSS-Fuzz. +--- + xmlschemastypes.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/xmlschemastypes.c b/xmlschemastypes.c +index 4249d700..d6b9f924 100644 +--- a/xmlschemastypes.c ++++ b/xmlschemastypes.c +@@ -3691,6 +3691,8 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y) + minday = 0; + maxday = 0; + } else { ++ if (myear > LONG_MAX / 366) ++ return -2; + /* FIXME: This doesn't take leap year exceptions every 100/400 years + into account. */ + maxday = 365 * myear + (myear + 3) / 4; +@@ -4079,6 +4081,14 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) + if ((x == NULL) || (y == NULL)) + return -2; + ++ if ((x->value.date.year > LONG_MAX / 366) || ++ (x->value.date.year < LONG_MIN / 366) || ++ (y->value.date.year > LONG_MAX / 366) || ++ (y->value.date.year < LONG_MIN / 366)) { ++ /* Possible overflow when converting to days. */ ++ return -2; ++ } ++ + if (x->value.date.tz_flag) { + + if (!y->value.date.tz_flag) { +-- +2.28.0.rc2 + diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 3138d92..82f44d8 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -18,6 +18,8 @@ Patch2: mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.pa Patch3: mingw-libxml2-2.9.10-CVE-2019-20388.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1799788 Patch4: mingw-libxml2-2.9.10-CVE-2020-7595.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1877788 +Patch6: libxml2-2.9.10-CVE-2020-24977.patch BuildArch: noarch @@ -149,6 +151,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Sep 11 2020 Richard W.M. Jones - 2.9.10-7 +- Add fix for CVE-2020-24977 (RHBZ#1877788, RHBZ#1877789). + * Tue Jul 28 2020 Fedora Release Engineering - 2.9.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From c1929c8a1a6ca14c21a7b2ccb2328c5051a85bcd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Nov 2020 13:33:18 +0000 Subject: [PATCH 57/69] Add correct fix for CVE-2020-24977 (RHBZ#1877788), thanks: Jan de Groot. (cherry picked from commit 36ce67f6dcbbc1ac6fca872b99dab9675813c10d) --- libxml2-2.9.10-CVE-2020-24977.patch | 61 +++++++++++------------ libxml2-2.9.10-fix-integer-overflow.patch | 41 +++++++++++++++ mingw-libxml2.spec | 6 ++- 3 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 libxml2-2.9.10-fix-integer-overflow.patch diff --git a/libxml2-2.9.10-CVE-2020-24977.patch b/libxml2-2.9.10-CVE-2020-24977.patch index b5a7bec..67ef0ac 100644 --- a/libxml2-2.9.10-CVE-2020-24977.patch +++ b/libxml2-2.9.10-CVE-2020-24977.patch @@ -1,41 +1,36 @@ -From 8e7c20a1af8776677d7890f30b7a180567701a49 Mon Sep 17 00:00:00 2001 +From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer -Date: Mon, 3 Aug 2020 17:30:41 +0200 -Subject: [PATCH] Fix integer overflow when comparing schema dates +Date: Fri, 7 Aug 2020 21:54:27 +0200 +Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' -Found by OSS-Fuzz. +Make sure that truncated UTF-8 sequences don't cause an out-of-bounds +array access. + +Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for +the report. + +Fixes #178. --- - xmlschemastypes.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) + xmllint.c | 6 ++++++ + 1 file changed, 6 insertions(+) -diff --git a/xmlschemastypes.c b/xmlschemastypes.c -index 4249d700..d6b9f924 100644 ---- a/xmlschemastypes.c -+++ b/xmlschemastypes.c -@@ -3691,6 +3691,8 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y) - minday = 0; - maxday = 0; - } else { -+ if (myear > LONG_MAX / 366) -+ return -2; - /* FIXME: This doesn't take leap year exceptions every 100/400 years - into account. */ - maxday = 365 * myear + (myear + 3) / 4; -@@ -4079,6 +4081,14 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) - if ((x == NULL) || (y == NULL)) - return -2; - -+ if ((x->value.date.year > LONG_MAX / 366) || -+ (x->value.date.year < LONG_MIN / 366) || -+ (y->value.date.year > LONG_MAX / 366) || -+ (y->value.date.year < LONG_MIN / 366)) { -+ /* Possible overflow when converting to days. */ -+ return -2; -+ } -+ - if (x->value.date.tz_flag) { +diff --git a/xmllint.c b/xmllint.c +index f6a8e463..c647486f 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -528,6 +528,12 @@ static void + xmlHTMLEncodeSend(void) { + char *result; - if (!y->value.date.tz_flag) { ++ /* ++ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might ++ * end with a truncated UTF-8 sequence. This is a hack to at least avoid ++ * an out-of-bounds read. ++ */ ++ memset(&buffer[sizeof(buffer)-4], 0, 4); + result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); + if (result) { + xmlGenericError(xmlGenericErrorContext, "%s", result); -- 2.28.0.rc2 diff --git a/libxml2-2.9.10-fix-integer-overflow.patch b/libxml2-2.9.10-fix-integer-overflow.patch new file mode 100644 index 0000000..b5a7bec --- /dev/null +++ b/libxml2-2.9.10-fix-integer-overflow.patch @@ -0,0 +1,41 @@ +From 8e7c20a1af8776677d7890f30b7a180567701a49 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Mon, 3 Aug 2020 17:30:41 +0200 +Subject: [PATCH] Fix integer overflow when comparing schema dates + +Found by OSS-Fuzz. +--- + xmlschemastypes.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/xmlschemastypes.c b/xmlschemastypes.c +index 4249d700..d6b9f924 100644 +--- a/xmlschemastypes.c ++++ b/xmlschemastypes.c +@@ -3691,6 +3691,8 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y) + minday = 0; + maxday = 0; + } else { ++ if (myear > LONG_MAX / 366) ++ return -2; + /* FIXME: This doesn't take leap year exceptions every 100/400 years + into account. */ + maxday = 365 * myear + (myear + 3) / 4; +@@ -4079,6 +4081,14 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) + if ((x == NULL) || (y == NULL)) + return -2; + ++ if ((x->value.date.year > LONG_MAX / 366) || ++ (x->value.date.year < LONG_MIN / 366) || ++ (y->value.date.year > LONG_MAX / 366) || ++ (y->value.date.year < LONG_MIN / 366)) { ++ /* Possible overflow when converting to days. */ ++ return -2; ++ } ++ + if (x->value.date.tz_flag) { + + if (!y->value.date.tz_flag) { +-- +2.28.0.rc2 + diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 82f44d8..121fc1e 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -18,8 +18,9 @@ Patch2: mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.pa Patch3: mingw-libxml2-2.9.10-CVE-2019-20388.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1799788 Patch4: mingw-libxml2-2.9.10-CVE-2020-7595.patch +Patch6: libxml2-2.9.10-fix-integer-overflow.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1877788 -Patch6: libxml2-2.9.10-CVE-2020-24977.patch +Patch7: libxml2-2.9.10-CVE-2020-24977.patch BuildArch: noarch @@ -151,6 +152,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Wed Nov 11 2020 Richard W.M. Jones - 2.9.10-8 +- Add correct fix for CVE-2020-24977 (RHBZ#1877788), thanks: Jan de Groot. + * Fri Sep 11 2020 Richard W.M. Jones - 2.9.10-7 - Add fix for CVE-2020-24977 (RHBZ#1877788, RHBZ#1877789). From d52daf35adf074fc787a09d968b475f91de36cf4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Nov 2020 13:37:07 +0000 Subject: [PATCH 58/69] Forgot to bump release number. --- mingw-libxml2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 121fc1e..f2ed8f8 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 3%{?dist} +Release: 8%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT From 245afb9fff740daf9b7857af70f31a410ebd08a6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 6 Jan 2021 21:59:07 +0000 Subject: [PATCH 59/69] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- mingw-libxml2.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index f2ed8f8..4821181 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -24,6 +24,7 @@ Patch7: libxml2-2.9.10-CVE-2020-24977.patch BuildArch: noarch +BuildRequires: make BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils From 69f3d9243bcce494632ded58d04c3ebace8f377c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 20:09:06 +0000 Subject: [PATCH 60/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 4821181..a4b0fcd 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 8%{?dist} +Release: 9%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -153,6 +153,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.9.10-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Nov 11 2020 Richard W.M. Jones - 2.9.10-8 - Add correct fix for CVE-2020-24977 (RHBZ#1877788), thanks: Jan de Groot. From fe1f40772fe84db523ed44e9c9f38f7c824c6083 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 14:40:31 +0000 Subject: [PATCH 61/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index a4b0fcd..d989f9c 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 9%{?dist} +Release: 10%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -153,6 +153,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2.9.10-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jan 26 2021 Fedora Release Engineering - 2.9.10-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 556b043c7e97f1c63c6ff142d92d9a8cc8104c46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 19:38:40 +0000 Subject: [PATCH 62/69] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index d989f9c..4cac1d3 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.10 -Release: 10%{?dist} +Release: 11%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -153,6 +153,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.9.10-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 2.9.10-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 1d696f0403493f4b80c577649fbf83b091f33407 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 18 Feb 2022 21:40:13 +0100 Subject: [PATCH 63/69] Update to 2.9.12 --- .gitignore | 1 + libxml2-2.9.10-CVE-2020-24977.patch | 36 ---- libxml2-2.9.10-fix-integer-overflow.patch | 41 ---- ...ml2-2.9.12-fix-formatting-regression.patch | 31 +++ libxml2-2.9.12-fix-lxml-corrupted-tree.patch | 188 ++++++++++++++++++ libxml2-2.9.8-python3-unicode-errors.patch | 11 +- libxml2-multilib.patch | 24 --- mingw-libxml2-2.9.10-CVE-2019-20388.patch | 33 --- mingw-libxml2-2.9.10-CVE-2020-7595.patch | 32 --- ...relaxed-approach-to-nested-documents.patch | 33 --- mingw-libxml2.spec | 38 ++-- sources | 2 +- 12 files changed, 247 insertions(+), 223 deletions(-) delete mode 100644 libxml2-2.9.10-CVE-2020-24977.patch delete mode 100644 libxml2-2.9.10-fix-integer-overflow.patch create mode 100644 libxml2-2.9.12-fix-formatting-regression.patch create mode 100644 libxml2-2.9.12-fix-lxml-corrupted-tree.patch delete mode 100644 libxml2-multilib.patch delete mode 100644 mingw-libxml2-2.9.10-CVE-2019-20388.patch delete mode 100644 mingw-libxml2-2.9.10-CVE-2020-7595.patch delete mode 100644 mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch diff --git a/.gitignore b/.gitignore index 654f66c..f9a6ee3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.3.tar.gz /libxml2-2.9.9.tar.gz /libxml2-2.9.10.tar.gz +/libxml2-v2.9.12.tar.bz2 diff --git a/libxml2-2.9.10-CVE-2020-24977.patch b/libxml2-2.9.10-CVE-2020-24977.patch deleted file mode 100644 index 67ef0ac..0000000 --- a/libxml2-2.9.10-CVE-2020-24977.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Fri, 7 Aug 2020 21:54:27 +0200 -Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' - -Make sure that truncated UTF-8 sequences don't cause an out-of-bounds -array access. - -Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for -the report. - -Fixes #178. ---- - xmllint.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/xmllint.c b/xmllint.c -index f6a8e463..c647486f 100644 ---- a/xmllint.c -+++ b/xmllint.c -@@ -528,6 +528,12 @@ static void - xmlHTMLEncodeSend(void) { - char *result; - -+ /* -+ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might -+ * end with a truncated UTF-8 sequence. This is a hack to at least avoid -+ * an out-of-bounds read. -+ */ -+ memset(&buffer[sizeof(buffer)-4], 0, 4); - result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); - if (result) { - xmlGenericError(xmlGenericErrorContext, "%s", result); --- -2.28.0.rc2 - diff --git a/libxml2-2.9.10-fix-integer-overflow.patch b/libxml2-2.9.10-fix-integer-overflow.patch deleted file mode 100644 index b5a7bec..0000000 --- a/libxml2-2.9.10-fix-integer-overflow.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8e7c20a1af8776677d7890f30b7a180567701a49 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Mon, 3 Aug 2020 17:30:41 +0200 -Subject: [PATCH] Fix integer overflow when comparing schema dates - -Found by OSS-Fuzz. ---- - xmlschemastypes.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/xmlschemastypes.c b/xmlschemastypes.c -index 4249d700..d6b9f924 100644 ---- a/xmlschemastypes.c -+++ b/xmlschemastypes.c -@@ -3691,6 +3691,8 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y) - minday = 0; - maxday = 0; - } else { -+ if (myear > LONG_MAX / 366) -+ return -2; - /* FIXME: This doesn't take leap year exceptions every 100/400 years - into account. */ - maxday = 365 * myear + (myear + 3) / 4; -@@ -4079,6 +4081,14 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y) - if ((x == NULL) || (y == NULL)) - return -2; - -+ if ((x->value.date.year > LONG_MAX / 366) || -+ (x->value.date.year < LONG_MIN / 366) || -+ (y->value.date.year > LONG_MAX / 366) || -+ (y->value.date.year < LONG_MIN / 366)) { -+ /* Possible overflow when converting to days. */ -+ return -2; -+ } -+ - if (x->value.date.tz_flag) { - - if (!y->value.date.tz_flag) { --- -2.28.0.rc2 - diff --git a/libxml2-2.9.12-fix-formatting-regression.patch b/libxml2-2.9.12-fix-formatting-regression.patch new file mode 100644 index 0000000..6419a76 --- /dev/null +++ b/libxml2-2.9.12-fix-formatting-regression.patch @@ -0,0 +1,31 @@ +diff -rupN --no-dereference libxml2-v2.9.12/xmlsave.c libxml2-v2.9.12-new/xmlsave.c +--- libxml2-v2.9.12/xmlsave.c 2022-02-18 21:00:14.226540564 +0100 ++++ libxml2-v2.9.12-new/xmlsave.c 2022-02-18 21:00:14.229540592 +0100 +@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + break; + + case XML_ELEMENT_NODE: ++ if ((cur != root) && (ctxt->format == 1) && ++ (xmlIndentTreeOutput)) ++ xmlOutputBufferWrite(buf, ctxt->indent_size * ++ (ctxt->level > ctxt->indent_nr ? ++ ctxt->indent_nr : ctxt->level), ++ ctxt->indent); ++ + /* + * Some users like lxml are known to pass nodes with a corrupted + * tree structure. Fall back to a recursive call to handle this +@@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + break; + } + +- if ((ctxt->level > 0) && (ctxt->format == 1) && +- (xmlIndentTreeOutput)) +- xmlOutputBufferWrite(buf, ctxt->indent_size * +- (ctxt->level > ctxt->indent_nr ? +- ctxt->indent_nr : ctxt->level), +- ctxt->indent); +- + xmlOutputBufferWrite(buf, 1, "<"); + if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { + xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); diff --git a/libxml2-2.9.12-fix-lxml-corrupted-tree.patch b/libxml2-2.9.12-fix-lxml-corrupted-tree.patch new file mode 100644 index 0000000..97722d7 --- /dev/null +++ b/libxml2-2.9.12-fix-lxml-corrupted-tree.patch @@ -0,0 +1,188 @@ +diff -rupN --no-dereference libxml2-v2.9.12/HTMLtree.c libxml2-v2.9.12-new/HTMLtree.c +--- libxml2-v2.9.12/HTMLtree.c 2021-05-13 20:56:16.000000000 +0200 ++++ libxml2-v2.9.12-new/HTMLtree.c 2022-02-18 21:00:14.021538664 +0100 +@@ -744,7 +744,7 @@ void + htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, + xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED, + int format) { +- xmlNodePtr root; ++ xmlNodePtr root, parent; + xmlAttrPtr attr; + const htmlElemDesc * info; + +@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + } + + root = cur; ++ parent = cur->parent; + while (1) { + switch (cur->type) { + case XML_HTML_DOCUMENT_NODE: +@@ -762,7 +763,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + if (((xmlDocPtr) cur)->intSubset != NULL) { + htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL); + } +- if (cur->children != NULL) { ++ /* Always validate cur->parent when descending. */ ++ if ((cur->parent == parent) && (cur->children != NULL)) { ++ parent = cur; + cur = cur->children; + continue; + } +@@ -770,6 +773,16 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + + case XML_ELEMENT_NODE: + /* ++ * Some users like lxml are known to pass nodes with a corrupted ++ * tree structure. Fall back to a recursive call to handle this ++ * case. ++ */ ++ if ((cur->parent != parent) && (cur->children != NULL)) { ++ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format); ++ break; ++ } ++ ++ /* + * Get specific HTML info for that node. + */ + if (cur->ns == NULL) +@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + (cur->name != NULL) && + (cur->name[0] != 'p')) /* p, pre, param */ + xmlOutputBufferWriteString(buf, "\n"); ++ parent = cur; + cur = cur->children; + continue; + } +@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + (info != NULL) && (!info->isinline)) { + if ((cur->next->type != HTML_TEXT_NODE) && + (cur->next->type != HTML_ENTITY_REF_NODE) && +- (cur->parent != NULL) && +- (cur->parent->name != NULL) && +- (cur->parent->name[0] != 'p')) /* p, pre, param */ ++ (parent != NULL) && ++ (parent->name != NULL) && ++ (parent->name[0] != 'p')) /* p, pre, param */ + xmlOutputBufferWriteString(buf, "\n"); + } + +@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + break; + if (((cur->name == (const xmlChar *)xmlStringText) || + (cur->name != (const xmlChar *)xmlStringTextNoenc)) && +- ((cur->parent == NULL) || +- ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) && +- (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) { ++ ((parent == NULL) || ++ ((xmlStrcasecmp(parent->name, BAD_CAST "script")) && ++ (xmlStrcasecmp(parent->name, BAD_CAST "style"))))) { + xmlChar *buffer; + + buffer = xmlEncodeEntitiesReentrant(doc, cur->content); +@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + break; + } + +- /* +- * The parent should never be NULL here but we want to handle +- * corrupted documents gracefully. +- */ +- if (cur->parent == NULL) +- return; +- cur = cur->parent; ++ cur = parent; ++ /* cur->parent was validated when descending. */ ++ parent = cur->parent; + + if ((cur->type == XML_HTML_DOCUMENT_NODE) || + (cur->type == XML_DOCUMENT_NODE)) { +@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer + (cur->next != NULL)) { + if ((cur->next->type != HTML_TEXT_NODE) && + (cur->next->type != HTML_ENTITY_REF_NODE) && +- (cur->parent != NULL) && +- (cur->parent->name != NULL) && +- (cur->parent->name[0] != 'p')) /* p, pre, param */ ++ (parent != NULL) && ++ (parent->name != NULL) && ++ (parent->name[0] != 'p')) /* p, pre, param */ + xmlOutputBufferWriteString(buf, "\n"); + } + } +diff -rupN --no-dereference libxml2-v2.9.12/xmlsave.c libxml2-v2.9.12-new/xmlsave.c +--- libxml2-v2.9.12/xmlsave.c 2021-05-13 20:56:16.000000000 +0200 ++++ libxml2-v2.9.12-new/xmlsave.c 2022-02-18 21:00:14.022538674 +0100 +@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPt + static void + xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { + int format = ctxt->format; +- xmlNodePtr tmp, root, unformattedNode = NULL; ++ xmlNodePtr tmp, root, unformattedNode = NULL, parent; + xmlAttrPtr attr; + xmlChar *start, *end; + xmlOutputBufferPtr buf; +@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + buf = ctxt->buf; + + root = cur; ++ parent = cur->parent; + while (1) { + switch (cur->type) { + case XML_DOCUMENT_NODE: +@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + break; + + case XML_DOCUMENT_FRAG_NODE: +- if (cur->children != NULL) { ++ /* Always validate cur->parent when descending. */ ++ if ((cur->parent == parent) && (cur->children != NULL)) { ++ parent = cur; + cur = cur->children; + continue; + } +@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + break; + + case XML_ELEMENT_NODE: +- if ((cur != root) && (ctxt->format == 1) && (xmlIndentTreeOutput)) ++ /* ++ * Some users like lxml are known to pass nodes with a corrupted ++ * tree structure. Fall back to a recursive call to handle this ++ * case. ++ */ ++ if ((cur->parent != parent) && (cur->children != NULL)) { ++ xmlNodeDumpOutputInternal(ctxt, cur); ++ break; ++ } ++ ++ if ((ctxt->level > 0) && (ctxt->format == 1) && ++ (xmlIndentTreeOutput)) + xmlOutputBufferWrite(buf, ctxt->indent_size * + (ctxt->level > ctxt->indent_nr ? + ctxt->indent_nr : ctxt->level), +@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + xmlOutputBufferWrite(buf, 1, ">"); + if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n"); + if (ctxt->level >= 0) ctxt->level++; ++ parent = cur; + cur = cur->children; + continue; + } +@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr + break; + } + +- /* +- * The parent should never be NULL here but we want to handle +- * corrupted documents gracefully. +- */ +- if (cur->parent == NULL) +- return; +- cur = cur->parent; ++ cur = parent; ++ /* cur->parent was validated when descending. */ ++ parent = cur->parent; + + if (cur->type == XML_ELEMENT_NODE) { + if (ctxt->level > 0) ctxt->level--; diff --git a/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2-2.9.8-python3-unicode-errors.patch index e87dcde..adbc097 100644 --- a/libxml2-2.9.8-python3-unicode-errors.patch +++ b/libxml2-2.9.8-python3-unicode-errors.patch @@ -1,8 +1,7 @@ -Index: libxml2-2.9.5/python/libxml.c -=================================================================== ---- libxml2-2.9.5.orig/python/libxml.c -+++ libxml2-2.9.5/python/libxml.c -@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU +diff -rupN --no-dereference libxml2-v2.9.12/python/libxml.c libxml2-v2.9.12-new/python/libxml.c +--- libxml2-v2.9.12/python/libxml.c 2021-05-13 20:56:16.000000000 +0200 ++++ libxml2-v2.9.12-new/python/libxml.c 2022-02-18 21:00:13.813536737 +0100 +@@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU PyObject *message; PyObject *result; char str[1000]; @@ -10,7 +9,7 @@ Index: libxml2-2.9.5/python/libxml.c #ifdef DEBUG_ERROR printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); -@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU +@@ -1637,12 +1638,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU str[999] = 0; va_end(ap); diff --git a/libxml2-multilib.patch b/libxml2-multilib.patch deleted file mode 100644 index 138d38f..0000000 --- a/libxml2-multilib.patch +++ /dev/null @@ -1,24 +0,0 @@ -*** XML/xml2-config.in.orig 2006-06-06 16:35:56.000000000 +0200 ---- XML/xml2-config.in 2006-06-06 16:36:24.000000000 +0200 -*************** -*** 3,9 **** - prefix=@prefix@ - exec_prefix=@exec_prefix@ - includedir=@includedir@ -! libdir=@libdir@ - - usage() - { ---- 3,14 ---- - prefix=@prefix@ - exec_prefix=@exec_prefix@ - includedir=@includedir@ -! if [ "`ldd /bin/sh | grep lib64`" = "" ] -! then -! libdir=${exec_prefix}/lib -! else -! libdir=${exec_prefix}/lib64 -! fi - - usage() - { diff --git a/mingw-libxml2-2.9.10-CVE-2019-20388.patch b/mingw-libxml2-2.9.10-CVE-2019-20388.patch deleted file mode 100644 index 3763354..0000000 --- a/mingw-libxml2-2.9.10-CVE-2019-20388.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 6088a74bcf7d0c42e24cff4594d804e1d3c9fbca Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Tue, 20 Aug 2019 16:33:06 +0800 -Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream - -When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun -alloc a new schema for ctxt->schema and set vctxt->xsiAssemble -to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize -vctxt->xsiAssemble to 0 again which cause the alloced schema -can not be freed anymore. - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - xmlschemas.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xmlschemas.c b/xmlschemas.c -index 301c8449..39d92182 100644 ---- a/xmlschemas.c -+++ b/xmlschemas.c -@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { - vctxt->nberrors = 0; - vctxt->depth = -1; - vctxt->skipDepth = -1; -- vctxt->xsiAssemble = 0; - vctxt->hasKeyrefs = 0; - #ifdef ENABLE_IDC_NODE_TABLES_TEST - vctxt->createIDCNodeTables = 1; --- -2.24.1 - diff --git a/mingw-libxml2-2.9.10-CVE-2020-7595.patch b/mingw-libxml2-2.9.10-CVE-2020-7595.patch deleted file mode 100644 index 3dd6774..0000000 --- a/mingw-libxml2-2.9.10-CVE-2020-7595.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Thu, 12 Dec 2019 17:30:55 +0800 -Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities - -When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef -return NULL which cause a infinite loop in xmlStringLenDecodeEntities - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - parser.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/parser.c b/parser.c -index d1c31963..a34bb6cd 100644 ---- a/parser.c -+++ b/parser.c -@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - else - c = 0; - while ((c != 0) && (c != end) && /* non input consuming loop */ -- (c != end2) && (c != end3)) { -+ (c != end2) && (c != end3) && -+ (ctxt->instate != XML_PARSER_EOF)) { - - if (c == 0) break; - if ((c == '&') && (str[1] == '#')) { --- -2.24.1 - diff --git a/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch b/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch deleted file mode 100644 index 0a63636..0000000 --- a/mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0815302dee2b78139832c2080348086a0564836b Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer -Date: Fri, 6 Dec 2019 12:27:29 +0100 -Subject: [PATCH] Fix freeing of nested documents - -Apparently, some libxslt RVTs can contain nested document nodes, see -issue #132. I'm not sure how this happens exactly but it can cause a -segfault in xmlFreeNodeList after the changes in commit 0762c9b6. - -Make sure not to touch the (nonexistent) `content` member of xmlDocs. ---- - tree.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tree.c b/tree.c -index 070670f1..0d7fc98c 100644 ---- a/tree.c -+++ b/tree.c -@@ -3708,6 +3708,11 @@ xmlFreeNodeList(xmlNodePtr cur) { - (cur->type != XML_XINCLUDE_START) && - (cur->type != XML_XINCLUDE_END) && - (cur->type != XML_ENTITY_REF_NODE) && -+ (cur->type != XML_DOCUMENT_NODE) && -+#ifdef LIBXML_DOCB_ENABLED -+ (cur->type != XML_DOCB_DOCUMENT_NODE) && -+#endif -+ (cur->type != XML_HTML_DOCUMENT_NODE) && - (cur->content != (xmlChar *) &(cur->properties))) { - DICT_FREE(cur->content) - } --- -2.22.0 - diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 4cac1d3..e8506c9 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,30 +1,27 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.10 -Release: 11%{?dist} +Version: 2.9.12 +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT URL: http://xmlsoft.org/ -Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz -Patch0: libxml2-multilib.patch +Source0: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v%{version}/libxml2-v%{version}.tar.bz2 + # Patch from openSUSE. # See: https://bugzilla.gnome.org/show_bug.cgi?id=789714 Patch1: libxml2-2.9.8-python3-unicode-errors.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1780573 -Patch2: mingw-libxml2-2.9.10-fix-relaxed-approach-to-nested-documents.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1799738 -Patch3: mingw-libxml2-2.9.10-CVE-2019-20388.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1799788 -Patch4: mingw-libxml2-2.9.10-CVE-2020-7595.patch -Patch6: libxml2-2.9.10-fix-integer-overflow.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1877788 -Patch7: libxml2-2.9.10-CVE-2020-24977.patch +# https://gitlab.gnome.org/GNOME/libxml2/-/issues/255 +Patch2: libxml2-2.9.12-fix-lxml-corrupted-tree.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1965662 +Patch3: libxml2-2.9.12-fix-formatting-regression.patch BuildArch: noarch -BuildRequires: make +BuildRequires: automake autoconf libtool +BuildRequires: make + BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -79,10 +76,12 @@ Static version of the MinGW Windows XML processing library. %prep -%autosetup -p1 -n libxml2-%{version} +%autosetup -p1 -n libxml2-v%{version} %build +NOCONFIGURE=1 ./autogen.sh + # LibXML2 can't build static and shared libraries in one go, so we # build LibXML2 twice here MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" @@ -119,7 +118,8 @@ find $RPM_BUILD_ROOT -name "*.la" -delete # Win32 %files -n mingw32-libxml2 -%doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS +%doc AUTHORS ChangeLog NEWS README README.tests TODO TODO_SCHEMAS +%license Copyright %{mingw32_bindir}/libxml2-2.dll %{mingw32_bindir}/xml2-config %{mingw32_bindir}/xmlcatalog.exe @@ -136,7 +136,8 @@ find $RPM_BUILD_ROOT -name "*.la" -delete # Win64 %files -n mingw64-libxml2 -%doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS +%doc AUTHORS ChangeLog NEWS README README.tests TODO TODO_SCHEMAS +%license Copyright %{mingw64_bindir}/libxml2-2.dll %{mingw64_bindir}/xml2-config %{mingw64_bindir}/xmlcatalog.exe @@ -153,6 +154,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Fri Feb 18 2022 Sandro Mani - 2.9.12-1 +- Update to 2.9.12 + * Thu Jan 20 2022 Fedora Release Engineering - 2.9.10-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 9aa6848..c79d231 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libxml2-2.9.10.tar.gz) = 0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed +SHA512 (libxml2-v2.9.12.tar.bz2) = 7d3c6f7dcfd528102f70fd81cb109351427865fb990163cd64e90a51902077902c2329ea46ebbe8d1fe973e3e78c5f322e0611d98b84d97a0cc46bef16848008 From cefff520c85db9b2d43ae8dabb19588d5fa7c8cb Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 22 Feb 2022 13:34:04 +0100 Subject: [PATCH 64/69] Update to 2.9.13 --- .gitignore | 1 + ...ml2-2.9.12-fix-formatting-regression.patch | 31 --- libxml2-2.9.12-fix-lxml-corrupted-tree.patch | 188 ------------------ libxml2-2.9.8-python3-unicode-errors.patch | 6 +- mingw-libxml2.spec | 47 ++--- sources | 2 +- 6 files changed, 24 insertions(+), 251 deletions(-) delete mode 100644 libxml2-2.9.12-fix-formatting-regression.patch delete mode 100644 libxml2-2.9.12-fix-lxml-corrupted-tree.patch diff --git a/.gitignore b/.gitignore index f9a6ee3..bdc9391 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.9.tar.gz /libxml2-2.9.10.tar.gz /libxml2-v2.9.12.tar.bz2 +/libxml2-v2.9.13.tar.bz2 diff --git a/libxml2-2.9.12-fix-formatting-regression.patch b/libxml2-2.9.12-fix-formatting-regression.patch deleted file mode 100644 index 6419a76..0000000 --- a/libxml2-2.9.12-fix-formatting-regression.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -rupN --no-dereference libxml2-v2.9.12/xmlsave.c libxml2-v2.9.12-new/xmlsave.c ---- libxml2-v2.9.12/xmlsave.c 2022-02-18 21:00:14.226540564 +0100 -+++ libxml2-v2.9.12-new/xmlsave.c 2022-02-18 21:00:14.229540592 +0100 -@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - break; - - case XML_ELEMENT_NODE: -+ if ((cur != root) && (ctxt->format == 1) && -+ (xmlIndentTreeOutput)) -+ xmlOutputBufferWrite(buf, ctxt->indent_size * -+ (ctxt->level > ctxt->indent_nr ? -+ ctxt->indent_nr : ctxt->level), -+ ctxt->indent); -+ - /* - * Some users like lxml are known to pass nodes with a corrupted - * tree structure. Fall back to a recursive call to handle this -@@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - break; - } - -- if ((ctxt->level > 0) && (ctxt->format == 1) && -- (xmlIndentTreeOutput)) -- xmlOutputBufferWrite(buf, ctxt->indent_size * -- (ctxt->level > ctxt->indent_nr ? -- ctxt->indent_nr : ctxt->level), -- ctxt->indent); -- - xmlOutputBufferWrite(buf, 1, "<"); - if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { - xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); diff --git a/libxml2-2.9.12-fix-lxml-corrupted-tree.patch b/libxml2-2.9.12-fix-lxml-corrupted-tree.patch deleted file mode 100644 index 97722d7..0000000 --- a/libxml2-2.9.12-fix-lxml-corrupted-tree.patch +++ /dev/null @@ -1,188 +0,0 @@ -diff -rupN --no-dereference libxml2-v2.9.12/HTMLtree.c libxml2-v2.9.12-new/HTMLtree.c ---- libxml2-v2.9.12/HTMLtree.c 2021-05-13 20:56:16.000000000 +0200 -+++ libxml2-v2.9.12-new/HTMLtree.c 2022-02-18 21:00:14.021538664 +0100 -@@ -744,7 +744,7 @@ void - htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, - xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED, - int format) { -- xmlNodePtr root; -+ xmlNodePtr root, parent; - xmlAttrPtr attr; - const htmlElemDesc * info; - -@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - } - - root = cur; -+ parent = cur->parent; - while (1) { - switch (cur->type) { - case XML_HTML_DOCUMENT_NODE: -@@ -762,7 +763,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - if (((xmlDocPtr) cur)->intSubset != NULL) { - htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL); - } -- if (cur->children != NULL) { -+ /* Always validate cur->parent when descending. */ -+ if ((cur->parent == parent) && (cur->children != NULL)) { -+ parent = cur; - cur = cur->children; - continue; - } -@@ -770,6 +773,16 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - - case XML_ELEMENT_NODE: - /* -+ * Some users like lxml are known to pass nodes with a corrupted -+ * tree structure. Fall back to a recursive call to handle this -+ * case. -+ */ -+ if ((cur->parent != parent) && (cur->children != NULL)) { -+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format); -+ break; -+ } -+ -+ /* - * Get specific HTML info for that node. - */ - if (cur->ns == NULL) -@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - (cur->name != NULL) && - (cur->name[0] != 'p')) /* p, pre, param */ - xmlOutputBufferWriteString(buf, "\n"); -+ parent = cur; - cur = cur->children; - continue; - } -@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - (info != NULL) && (!info->isinline)) { - if ((cur->next->type != HTML_TEXT_NODE) && - (cur->next->type != HTML_ENTITY_REF_NODE) && -- (cur->parent != NULL) && -- (cur->parent->name != NULL) && -- (cur->parent->name[0] != 'p')) /* p, pre, param */ -+ (parent != NULL) && -+ (parent->name != NULL) && -+ (parent->name[0] != 'p')) /* p, pre, param */ - xmlOutputBufferWriteString(buf, "\n"); - } - -@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - break; - if (((cur->name == (const xmlChar *)xmlStringText) || - (cur->name != (const xmlChar *)xmlStringTextNoenc)) && -- ((cur->parent == NULL) || -- ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) && -- (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) { -+ ((parent == NULL) || -+ ((xmlStrcasecmp(parent->name, BAD_CAST "script")) && -+ (xmlStrcasecmp(parent->name, BAD_CAST "style"))))) { - xmlChar *buffer; - - buffer = xmlEncodeEntitiesReentrant(doc, cur->content); -@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - break; - } - -- /* -- * The parent should never be NULL here but we want to handle -- * corrupted documents gracefully. -- */ -- if (cur->parent == NULL) -- return; -- cur = cur->parent; -+ cur = parent; -+ /* cur->parent was validated when descending. */ -+ parent = cur->parent; - - if ((cur->type == XML_HTML_DOCUMENT_NODE) || - (cur->type == XML_DOCUMENT_NODE)) { -@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer - (cur->next != NULL)) { - if ((cur->next->type != HTML_TEXT_NODE) && - (cur->next->type != HTML_ENTITY_REF_NODE) && -- (cur->parent != NULL) && -- (cur->parent->name != NULL) && -- (cur->parent->name[0] != 'p')) /* p, pre, param */ -+ (parent != NULL) && -+ (parent->name != NULL) && -+ (parent->name[0] != 'p')) /* p, pre, param */ - xmlOutputBufferWriteString(buf, "\n"); - } - } -diff -rupN --no-dereference libxml2-v2.9.12/xmlsave.c libxml2-v2.9.12-new/xmlsave.c ---- libxml2-v2.9.12/xmlsave.c 2021-05-13 20:56:16.000000000 +0200 -+++ libxml2-v2.9.12-new/xmlsave.c 2022-02-18 21:00:14.022538674 +0100 -@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPt - static void - xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { - int format = ctxt->format; -- xmlNodePtr tmp, root, unformattedNode = NULL; -+ xmlNodePtr tmp, root, unformattedNode = NULL, parent; - xmlAttrPtr attr; - xmlChar *start, *end; - xmlOutputBufferPtr buf; -@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - buf = ctxt->buf; - - root = cur; -+ parent = cur->parent; - while (1) { - switch (cur->type) { - case XML_DOCUMENT_NODE: -@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - break; - - case XML_DOCUMENT_FRAG_NODE: -- if (cur->children != NULL) { -+ /* Always validate cur->parent when descending. */ -+ if ((cur->parent == parent) && (cur->children != NULL)) { -+ parent = cur; - cur = cur->children; - continue; - } -@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - break; - - case XML_ELEMENT_NODE: -- if ((cur != root) && (ctxt->format == 1) && (xmlIndentTreeOutput)) -+ /* -+ * Some users like lxml are known to pass nodes with a corrupted -+ * tree structure. Fall back to a recursive call to handle this -+ * case. -+ */ -+ if ((cur->parent != parent) && (cur->children != NULL)) { -+ xmlNodeDumpOutputInternal(ctxt, cur); -+ break; -+ } -+ -+ if ((ctxt->level > 0) && (ctxt->format == 1) && -+ (xmlIndentTreeOutput)) - xmlOutputBufferWrite(buf, ctxt->indent_size * - (ctxt->level > ctxt->indent_nr ? - ctxt->indent_nr : ctxt->level), -@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - xmlOutputBufferWrite(buf, 1, ">"); - if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n"); - if (ctxt->level >= 0) ctxt->level++; -+ parent = cur; - cur = cur->children; - continue; - } -@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr - break; - } - -- /* -- * The parent should never be NULL here but we want to handle -- * corrupted documents gracefully. -- */ -- if (cur->parent == NULL) -- return; -- cur = cur->parent; -+ cur = parent; -+ /* cur->parent was validated when descending. */ -+ parent = cur->parent; - - if (cur->type == XML_ELEMENT_NODE) { - if (ctxt->level > 0) ctxt->level--; diff --git a/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2-2.9.8-python3-unicode-errors.patch index adbc097..77dbf03 100644 --- a/libxml2-2.9.8-python3-unicode-errors.patch +++ b/libxml2-2.9.8-python3-unicode-errors.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference libxml2-v2.9.12/python/libxml.c libxml2-v2.9.12-new/python/libxml.c ---- libxml2-v2.9.12/python/libxml.c 2021-05-13 20:56:16.000000000 +0200 -+++ libxml2-v2.9.12-new/python/libxml.c 2022-02-18 21:00:13.813536737 +0100 +diff -rupN --no-dereference libxml2-v2.9.13/python/libxml.c libxml2-v2.9.13-new/python/libxml.c +--- libxml2-v2.9.13/python/libxml.c 2022-02-19 19:26:42.000000000 +0100 ++++ libxml2-v2.9.13-new/python/libxml.c 2022-02-22 13:16:40.590376397 +0100 @@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU PyObject *message; PyObject *result; diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index e8506c9..ed8a02b 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,7 +1,7 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.12 +Version: 2.9.13 Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library @@ -12,10 +12,6 @@ Source0: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v%{version}/lib # Patch from openSUSE. # See: https://bugzilla.gnome.org/show_bug.cgi?id=789714 Patch1: libxml2-2.9.8-python3-unicode-errors.patch -# https://gitlab.gnome.org/GNOME/libxml2/-/issues/255 -Patch2: libxml2-2.9.12-fix-lxml-corrupted-tree.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1965662 -Patch3: libxml2-2.9.12-fix-formatting-regression.patch BuildArch: noarch @@ -82,43 +78,35 @@ Static version of the MinGW Windows XML processing library. %build NOCONFIGURE=1 ./autogen.sh -# LibXML2 can't build static and shared libraries in one go, so we -# build LibXML2 twice here -MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" -MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" +# LibXML2 can't build static and shared libraries in one go, so we build LibXML2 twice here +MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" \ +MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" \ MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32 -MINGW32_CPPFLAGS= -MINGW64_CPPFLAGS= MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32 -MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags} -MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags} +MINGW_BUILDDIR_SUFFIX=static %mingw_make_build +MINGW_BUILDDIR_SUFFIX=shared %mingw_make_build %install -# First install all the files belonging to the shared build -MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install DESTDIR=$RPM_BUILD_ROOT - -# Then manually install the static libraries to the right location -install -m 0644 build_win32static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw32_libdir}/ -install -m 0644 build_win64static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw64_libdir}/ +MINGW_BUILDDIR_SUFFIX=static %mingw_make_install +MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install # 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/ +rm -rf %{buildroot}%{mingw32_mandir} +rm -rf %{buildroot}%{mingw32_docdir} +rm -rf %{buildroot}%{mingw32_datadir}/gtk-doc/ -rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} -rm -rf $RPM_BUILD_ROOT%{mingw64_docdir} -rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/ +rm -rf %{buildroot}%{mingw64_mandir} +rm -rf %{buildroot}%{mingw64_docdir} +rm -rf %{buildroot}%{mingw64_datadir}/gtk-doc/ # Drop all .la files -find $RPM_BUILD_ROOT -name "*.la" -delete +find %{buildroot} -name "*.la" -delete # Win32 %files -n mingw32-libxml2 -%doc AUTHORS ChangeLog NEWS README README.tests TODO TODO_SCHEMAS %license Copyright %{mingw32_bindir}/libxml2-2.dll %{mingw32_bindir}/xml2-config @@ -136,7 +124,6 @@ find $RPM_BUILD_ROOT -name "*.la" -delete # Win64 %files -n mingw64-libxml2 -%doc AUTHORS ChangeLog NEWS README README.tests TODO TODO_SCHEMAS %license Copyright %{mingw64_bindir}/libxml2-2.dll %{mingw64_bindir}/xml2-config @@ -154,6 +141,10 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Tue Feb 22 2022 Sandro Mani - 2.9.13-1 +- Update to 2.9.13 +- Cleanup spec + * Fri Feb 18 2022 Sandro Mani - 2.9.12-1 - Update to 2.9.12 diff --git a/sources b/sources index c79d231..01da2e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libxml2-v2.9.12.tar.bz2) = 7d3c6f7dcfd528102f70fd81cb109351427865fb990163cd64e90a51902077902c2329ea46ebbe8d1fe973e3e78c5f322e0611d98b84d97a0cc46bef16848008 +SHA512 (libxml2-v2.9.13.tar.bz2) = 7e524b358cd817bdcb945c05c7bfd3b67123a6096671eb73e5466f5bb8e8f845654e3ccecf9bd29e6bfcbc2cc8b58c8cd9281d7415a7700417047ce4b6218b67 From dcad7c5a8f5e77f8cc21ec42329ef16690d4944f Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 15 Mar 2022 09:08:10 +0100 Subject: [PATCH 65/69] Rebuild --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index ed8a02b..98aef6e 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -141,6 +141,9 @@ find %{buildroot} -name "*.la" -delete %changelog +* Tue Mar 15 2022 Sandro Mani - 2.9.13-2 +- Rebuild + * Tue Feb 22 2022 Sandro Mani - 2.9.13-1 - Update to 2.9.13 - Cleanup spec From 870306e397496fdd1a010d24ad35004e1d6bf2cb Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 25 Mar 2022 14:30:02 +0100 Subject: [PATCH 66/69] Rebuild with mingw-gcc-12 --- mingw-libxml2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 98aef6e..cbfc7bb 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.13 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -141,6 +141,9 @@ find %{buildroot} -name "*.la" -delete %changelog +* Fri Mar 25 2022 Sandro Mani - 2.9.13-3 +- Rebuild with mingw-gcc-12 + * Tue Mar 15 2022 Sandro Mani - 2.9.13-2 - Rebuild From dfbce6d731a1de67d29994e8f5b84e3691d0c125 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 3 May 2022 11:41:28 +0200 Subject: [PATCH 67/69] Update to 2.9.13 --- libxml2-2.9.8-python3-unicode-errors.patch | 2 +- mingw-libxml2.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2-2.9.8-python3-unicode-errors.patch index 77dbf03..3c9d033 100644 --- a/libxml2-2.9.8-python3-unicode-errors.patch +++ b/libxml2-2.9.8-python3-unicode-errors.patch @@ -1,6 +1,6 @@ diff -rupN --no-dereference libxml2-v2.9.13/python/libxml.c libxml2-v2.9.13-new/python/libxml.c --- libxml2-v2.9.13/python/libxml.c 2022-02-19 19:26:42.000000000 +0100 -+++ libxml2-v2.9.13-new/python/libxml.c 2022-02-22 13:16:40.590376397 +0100 ++++ libxml2-v2.9.13-new/python/libxml.c 2022-05-03 11:40:49.210238037 +0200 @@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU PyObject *message; PyObject *result; diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index cbfc7bb..146ef48 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -2,7 +2,7 @@ Name: mingw-libxml2 Version: 2.9.13 -Release: 3%{?dist} +Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library License: MIT @@ -141,6 +141,9 @@ find %{buildroot} -name "*.la" -delete %changelog +* Tue May 03 2022 Sandro Mani - 2.9.13-1 +- Update to 2.9.13 + * Fri Mar 25 2022 Sandro Mani - 2.9.13-3 - Rebuild with mingw-gcc-12 From 4c17606ad9600d3d78e91af97a2c7ba911e6b0ba Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 3 May 2022 11:43:08 +0200 Subject: [PATCH 68/69] Update to 2.9.14 --- .gitignore | 1 + libxml2-2.9.8-python3-unicode-errors.patch | 6 +++--- mingw-libxml2.spec | 6 +++--- sources | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index bdc9391..642d6d0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ libxml2-2.7.6.tar.gz /libxml2-2.9.10.tar.gz /libxml2-v2.9.12.tar.bz2 /libxml2-v2.9.13.tar.bz2 +/libxml2-v2.9.14.tar.bz2 diff --git a/libxml2-2.9.8-python3-unicode-errors.patch b/libxml2-2.9.8-python3-unicode-errors.patch index 3c9d033..992a312 100644 --- a/libxml2-2.9.8-python3-unicode-errors.patch +++ b/libxml2-2.9.8-python3-unicode-errors.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference libxml2-v2.9.13/python/libxml.c libxml2-v2.9.13-new/python/libxml.c ---- libxml2-v2.9.13/python/libxml.c 2022-02-19 19:26:42.000000000 +0100 -+++ libxml2-v2.9.13-new/python/libxml.c 2022-05-03 11:40:49.210238037 +0200 +diff -rupN --no-dereference libxml2-v2.9.14/python/libxml.c libxml2-v2.9.14-new/python/libxml.c +--- libxml2-v2.9.14/python/libxml.c 2022-05-02 13:13:03.000000000 +0200 ++++ libxml2-v2.9.14-new/python/libxml.c 2022-05-03 11:42:49.237005241 +0200 @@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU PyObject *message; PyObject *result; diff --git a/mingw-libxml2.spec b/mingw-libxml2.spec index 146ef48..4019636 100644 --- a/mingw-libxml2.spec +++ b/mingw-libxml2.spec @@ -1,7 +1,7 @@ %{?mingw_package_header} Name: mingw-libxml2 -Version: 2.9.13 +Version: 2.9.14 Release: 1%{?dist} Summary: MinGW Windows libxml2 XML processing library @@ -141,8 +141,8 @@ find %{buildroot} -name "*.la" -delete %changelog -* Tue May 03 2022 Sandro Mani - 2.9.13-1 -- Update to 2.9.13 +* Tue May 03 2022 Sandro Mani - 2.9.14-1 +- Update to 2.9.14 * Fri Mar 25 2022 Sandro Mani - 2.9.13-3 - Rebuild with mingw-gcc-12 diff --git a/sources b/sources index 01da2e6..b9653f7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libxml2-v2.9.13.tar.bz2) = 7e524b358cd817bdcb945c05c7bfd3b67123a6096671eb73e5466f5bb8e8f845654e3ccecf9bd29e6bfcbc2cc8b58c8cd9281d7415a7700417047ce4b6218b67 +SHA512 (libxml2-v2.9.14.tar.bz2) = 15a2bcb1b353a047c03ae92dfdb83c298312f22dd630ef8bd93ece3f4cfac1f88b3e4440f1a8f40e89ed2c8d44976e035fa98d1146722fcd89ba86c2af9f73c7 From 82534891807a289f15bc176071e916e56d2cb385 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 23:27:33 +0300 Subject: [PATCH 69/69] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index b9653f7..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (libxml2-v2.9.14.tar.bz2) = 15a2bcb1b353a047c03ae92dfdb83c298312f22dd630ef8bd93ece3f4cfac1f88b3e4440f1a8f40e89ed2c8d44976e035fa98d1146722fcd89ba86c2af9f73c7