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