Hello community, here is the log from the commit of package libxml2 checked in at Fri Nov 28 15:29:54 CET 2008. -------- --- libxml2/libxml2.changes 2008-11-18 16:53:14.000000000 +0100 +++ libxml2/libxml2.changes 2008-11-25 16:01:32.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Nov 25 16:00:27 CET 2008 - prusnak@suse.cz + +- fix broken xmlsave (xmlsave.patch) [bnc#437203] + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- libxml2-2.7.1-xmlsave.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxml2-python.spec ++++++ --- /var/tmp/diff_new_pack.YV3218/_old 2008-11-28 15:29:16.000000000 +0100 +++ /var/tmp/diff_new_pack.YV3218/_new 2008-11-28 15:29:16.000000000 +0100 @@ -25,7 +25,7 @@ AutoReqProv: on Summary: Python Bindings for libxml2 Version: 2.7.1 -Release: 7 +Release: 8 Source: libxml2-%{version}.tar.bz2 Source1: libxml2-python-rpmlintrc %py_requires ++++++ libxml2.spec ++++++ --- /var/tmp/diff_new_pack.YV3218/_old 2008-11-28 15:29:16.000000000 +0100 +++ /var/tmp/diff_new_pack.YV3218/_new 2008-11-28 15:29:16.000000000 +0100 @@ -24,7 +24,7 @@ Group: System/Libraries Summary: A Library to Manipulate XML Files Version: 2.7.1 -Release: 7 +Release: 8 # bug437293 %ifarch ppc64 Obsoletes: libxml2-64bit @@ -44,6 +44,8 @@ Patch3: %{name}-%{version}-CVE-2008-4226.patch # PATCH-FIX-UPSTREAM libxml2-2.7.1-CVE-2008-4225.patch [bnc#445677] Patch4: %{name}-%{version}-CVE-2008-4225.patch +# PATCH-FIX-OPENSUSE libxml2-2.7.1-xmlsave.patch [bnc#437203] +Patch5: %{name}-%{version}-xmlsave.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://xmlsoft.org @@ -164,6 +166,7 @@ %patch2 %patch3 %patch4 +%patch5 %build %configure \ @@ -222,6 +225,8 @@ %dir %{_datadir}/gtk-doc/html %changelog +* Tue Nov 25 2008 prusnak@suse.cz +- fix broken xmlsave (xmlsave.patch) [bnc#437203] * Tue Nov 18 2008 prusnak@suse.cz - fixed CVE-2008-4225 [bnc#445677] * Thu Nov 06 2008 prusnak@suse.cz ++++++ libxml2-2.7.1-xmlsave.patch ++++++ --- include/libxml/xmlsave.h +++ include/libxml/xmlsave.h @@ -30,7 +30,10 @@ XML_SAVE_FORMAT = 1<<0, /* format save output */ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */ - XML_SAVE_NO_XHTML = 1<<3 /* disable XHTML1 specific rules */ + XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */ + XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */ + XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */ + XML_SAVE_AS_HTML = 1<<6 /* force HTML serialization on XML doc */ } xmlSaveOption; --- xmlsave.c +++ xmlsave.c @@ -757,8 +757,14 @@ return; } #ifdef LIBXML_HTML_ENABLED - if ((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && - (cur->doc->type == XML_HTML_DOCUMENT_NODE)) { + if (ctxt->options & XML_SAVE_XHTML) { + xhtmlNodeDumpOutput(ctxt, cur); + return; + } + if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && + (cur->doc->type == XML_HTML_DOCUMENT_NODE) && + ((ctxt->options & XML_SAVE_AS_XML) == 0)) || + (ctxt->options & XML_SAVE_AS_HTML)) { htmlNodeDumpOutputInternal(ctxt, cur); return; } @@ -953,7 +959,10 @@ xmlGetCharEncodingName((xmlCharEncoding) cur->charset); } - if (cur->type == XML_HTML_DOCUMENT_NODE) { + if (((cur->type == XML_HTML_DOCUMENT_NODE) && + ((ctxt->options & XML_SAVE_AS_XML) == 0) && + ((ctxt->options & XML_SAVE_XHTML) == 0)) || + (ctxt->options & XML_SAVE_AS_HTML)) { #ifdef LIBXML_HTML_ENABLED if (encoding != NULL) htmlSetMetaEncoding(cur, (const xmlChar *) encoding); @@ -981,7 +990,9 @@ #else return(-1); #endif - } else if (cur->type == XML_DOCUMENT_NODE) { + } else if ((cur->type == XML_DOCUMENT_NODE) || + (ctxt->options & XML_SAVE_AS_XML) || + (ctxt->options & XML_SAVE_XHTML)) { enc = xmlParseCharEncoding((const char*) encoding); if ((encoding != NULL) && (oldctxtenc == NULL) && (buf->encoder == NULL) && (buf->conv == NULL) && @@ -1032,6 +1043,8 @@ } #ifdef LIBXML_HTML_ENABLED + if (ctxt->options & XML_SAVE_XHTML) + is_xhtml = 1; if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) { dtd = xmlGetIntSubset(cur); if (dtd != NULL) { @@ -2123,6 +2136,7 @@ ctxt.format = format; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; #ifdef LIBXML_HTML_ENABLED dtd = xmlGetIntSubset(doc); @@ -2208,6 +2222,7 @@ ctxt.format = format; ctxt.encoding = (const xmlChar *) txt_encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; xmlDocContentDumpOutput(&ctxt, out_doc); xmlOutputBufferFlush(out_buff); if (out_buff->conv != NULL) { @@ -2326,6 +2341,7 @@ ctxt.format = format; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; xmlDocContentDumpOutput(&ctxt, cur); ret = xmlOutputBufferClose(buf); @@ -2375,6 +2391,7 @@ ctxt.format = 0; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; xmlDocContentDumpOutput(&ctxt, cur); ret = xmlOutputBufferClose(buf); return(ret); @@ -2414,6 +2431,7 @@ ctxt.format = format; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; xmlDocContentDumpOutput(&ctxt, cur); ret = xmlOutputBufferClose(buf); return (ret); @@ -2468,6 +2486,7 @@ ctxt.format = format; ctxt.encoding = (const xmlChar *) encoding; xmlSaveCtxtInit(&ctxt); + ctxt.options |= XML_SAVE_AS_XML; xmlDocContentDumpOutput(&ctxt, cur); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org