diff --git a/libxml2-largefile64.patch b/libxml2-largefile64.patch new file mode 100644 index 0000000..168a83d --- /dev/null +++ b/libxml2-largefile64.patch @@ -0,0 +1,14 @@ +Index: libxml2-2.7.7/libxml.h +=================================================================== +--- libxml2-2.7.7.orig/libxml.h ++++ libxml2-2.7.7/libxml.h +@@ -13,6 +13,9 @@ + #ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE + #endif ++#ifndef _LARGEFILE64_SOURCE ++#define _LARGEFILE64_SOURCE ++#endif + #ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 + #endif diff --git a/libxml2-python.spec b/libxml2-python.spec index eeafd9f..d2f25e3 100644 --- a/libxml2-python.spec +++ b/libxml2-python.spec @@ -25,7 +25,7 @@ Group: Development/Libraries/Python AutoReqProv: on Summary: Python Bindings for libxml2 Version: 2.7.7 -Release: 3 +Release: 6 Source: libxml2-%{version}.tar.bz2 Source1: libxml2-python-rpmlintrc %py_requires diff --git a/libxml2.changes b/libxml2.changes index c79fbba..5f42322 100644 --- a/libxml2.changes +++ b/libxml2.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Sep 17 16:28:46 UTC 2010 - puzel@novell.com + +- add libxml2-largefile64.patch (fixes build) + - debian bug#439843 + +------------------------------------------------------------------- +Wed Jul 14 20:05:00 UTC 2010 - jw@novell.com + +- added noxref.patch, + this implements a new --noxref option, which turns + validation errors about missing xrefs into warnings. + Upstreamed as https://bugzilla.gnome.org/show_bug.cgi?id=624386 + ------------------------------------------------------------------- Sat Apr 24 09:50:01 UTC 2010 - coolo@novell.com diff --git a/libxml2.spec b/libxml2.spec index 89eac8b..6c47a5e 100644 --- a/libxml2.spec +++ b/libxml2.spec @@ -25,9 +25,11 @@ Group: System/Libraries Summary: A Library to Manipulate XML Files Url: http://xmlsoft.org Version: 2.7.7 -Release: 3 +Release: 6 Source: %{name}-%{version}.tar.bz2 Source2: baselibs.conf +Patch1: noxref.patch +Patch2: libxml2-largefile64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # bug437293 %ifarch ppc64 @@ -99,6 +101,8 @@ progress. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %build %configure \ diff --git a/noxref.patch b/noxref.patch new file mode 100644 index 0000000..fb148f8 --- /dev/null +++ b/noxref.patch @@ -0,0 +1,81 @@ +--- libxml2-2.7.7/valid.c.orig 2010-07-14 20:53:09.000000000 +0200 ++++ libxml2-2.7.7/valid.c 2010-07-14 21:59:41.708128513 +0200 +@@ -6469,10 +6469,16 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt + } else if (attr->atype == XML_ATTRIBUTE_IDREF) { + id = xmlGetID(ctxt->doc, name); + if (id == NULL) { +- xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID, +- "IDREF attribute %s references an unknown ID \"%s\"\n", +- attr->name, name, NULL); +- ctxt->valid = 0; ++ if (ctxt->doc->parseFlags & XML_PARSE_NOXREF) { ++ xmlErrValidWarning(ctxt, attr->parent, XML_DTD_UNKNOWN_ID, ++ "IDREF attribute %s references an unknown ID \"%s\"\n", ++ attr->name, name, NULL); ++ } else { ++ xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID, ++ "IDREF attribute %s references an unknown ID \"%s\"\n", ++ attr->name, name, NULL); ++ ctxt->valid = 0; ++ } + } + } else if (attr->atype == XML_ATTRIBUTE_IDREFS) { + xmlChar *dup, *str = NULL, *cur, save; +--- libxml2-2.7.7/parser.c.orig 2010-03-15 10:11:40.000000000 +0100 ++++ libxml2-2.7.7/parser.c 2010-07-14 21:53:25.903128498 +0200 +@@ -14381,6 +14381,12 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtP + ctxt->sax->fatalError = NULL; + options -= XML_PARSE_NOERROR; + } ++#ifdef LIBXML_VALID_ENABLED ++ if (options & XML_PARSE_NOXREF) { ++ options -= XML_PARSE_NOXREF; ++ ctxt->options |= XML_PARSE_NOXREF; ++ } ++#endif /* LIBXML_VALID_ENABLED */ + #ifdef LIBXML_SAX1_ENABLED + if (options & XML_PARSE_SAX1) { + ctxt->sax->startElement = xmlSAX2StartElement; +--- libxml2-2.7.7/include/libxml/parser.h.orig 2010-03-15 11:40:03.000000000 +0100 ++++ libxml2-2.7.7/include/libxml/parser.h 2010-07-14 20:39:57.161550835 +0200 +@@ -1106,7 +1106,8 @@ typedef enum { + XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ + XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ + XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */ +- XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */ ++ XML_PARSE_OLDSAX = 1<<20, /* parse using SAX2 interface from before 2.7.0 */ ++ XML_PARSE_NOXREF = 1<<21 /* turn idref errors into warnings */ + } xmlParserOption; + + XMLPUBFUN void XMLCALL +--- libxml2-2.7.7/xmllint.c.orig 2010-07-14 20:31:34.000000000 +0200 ++++ libxml2-2.7.7/xmllint.c 2010-07-14 20:44:16.940128662 +0200 +@@ -141,6 +141,7 @@ static int oldout = 0; + #endif /* LIBXML_OUTPUT_ENABLED */ + #ifdef LIBXML_VALID_ENABLED + static int valid = 0; ++static int noxref = 0; + static int postvalid = 0; + static char * dtdvalid = NULL; + static char * dtdvalidfpi = NULL; +@@ -2979,6 +2980,7 @@ static void usage(const char *name) { + printf("\t--nowrap : do not put HTML doc wrapper\n"); + #ifdef LIBXML_VALID_ENABLED + printf("\t--valid : validate the document in addition to std well-formed check\n"); ++ printf("\t--noxref : turn IDREF linkend errors into warnings\n"); + printf("\t--postvalid : do a posteriori validation, i.e after parsing\n"); + printf("\t--dtdvalid URL : do a posteriori validation against a given DTD\n"); + printf("\t--dtdvalidfpi FPI : same but name the DTD with a Public Identifier\n"); +@@ -3179,6 +3181,12 @@ main(int argc, char **argv) { + postvalid++; + loaddtd++; + options |= XML_PARSE_DTDLOAD; ++ } else if ((!strcmp(argv[i], "-noxref")) || ++ (!strcmp(argv[i], "--noxref")) || ++ (!strcmp(argv[i], "-noidref")) || ++ (!strcmp(argv[i], "--noidref"))) { ++ noxref++; ++ options |= XML_PARSE_NOXREF; + } else if ((!strcmp(argv[i], "-dtdvalid")) || + (!strcmp(argv[i], "--dtdvalid"))) { + i++;