Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libxml2 for openSUSE:Factory checked in at 2021-10-30 23:13:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libxml2 (Old) and /work/SRC/openSUSE:Factory/.libxml2.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxml2" Sat Oct 30 23:13:14 2021 rev:107 rq:927311 version:2.9.12 Changes: -------- --- /work/SRC/openSUSE:Factory/libxml2/libxml2.changes 2021-06-04 22:42:32.535061663 +0200 +++ /work/SRC/openSUSE:Factory/.libxml2.new.1890/libxml2.changes 2021-10-30 23:14:19.087083542 +0200 @@ -1,0 +2,6 @@ +Wed Oct 20 17:54:57 UTC 2021 - Matej Cepl <mc...@suse.com> + +- Rewrite package to the single-spec %python_subpackage_only style and + eliminate unnecessary multibuild. + +------------------------------------------------------------------- Old: ---- _multibuild ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxml2.spec ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.519083889 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.519083889 +0200 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package libxml2 # # Copyright (c) 2021 SUSE LLC # @@ -17,34 +17,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# Define "python" as a package in _multibuild file -%global flavor @BUILD_FLAVOR@%{nil} -%if "%{flavor}" == "python" -%global pprefix python- %define oldpython python -%bcond_without python -%bcond_without python2 -%else -%global pprefix %{nil} -%bcond_with python -%endif %define bname libxml2 %define lname libxml2-2 -Name: %{pprefix}%{bname} +Name: libxml2 Version: 2.9.12 Release: 0 -%if !%{with python} -Summary: A Library to Manipulate XML Files License: MIT -%else -Summary: Python Bindings for libxml2 -License: MIT -%endif +Summary: A Library to Manipulate XML Files URL: http://xmlsoft.org Source: ftp://xmlsoft.org/libxml2/%{bname}-%{version}.tar.gz Source1: ftp://xmlsoft.org/libxml2/%{bname}-%{version}.tar.gz.asc Source2: baselibs.conf Source3: libxml2.keyring +# PATCH-FIX-UPSTREAM libxml2-python3-unicode-errors.patch bsc#1064286 mc...@suse.com +# remove segfault after doc.freeDoc() Patch1: libxml2-python3-unicode-errors.patch # PATCH-FIX-UPSTREAM libxml2-python3-string-null-check.patch bsc#1065270 mgo...@suse.com # https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/15 @@ -54,43 +41,23 @@ # PATCH-FIX-UPSTREAM https://gitlab.gnome.org/GNOME/libxml2/-/issues/255 Patch4: libxml2-fix-lxml-corrupted-subtree-structures.patch Patch5: libxml2-fix-regression-in-xmlNodeDumpOutputInternal.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: python-rpm-macros -%if !%{with python} BuildRequires: readline-devel BuildRequires: pkgconfig(liblzma) -BuildRequires: pkgconfig(zlib) -%else -BuildRequires: %{python_module devel} -BuildRequires: %{python_module xml} BuildRequires: pkgconfig(libxml-2.0) -Requires: %{lname} = %{version} -Provides: python-libxml2-python = %{version}-%{release} -Obsoletes: %{bname}-python < %{version}-%{release} -Obsoletes: python-libxml2-python < %{version}-%{release} -%if "%{python_flavor}" == "python2" -Provides: %{bname}-python = %{version}-%{release} -Provides: %{oldpython}-libxml2 = %{version}-%{release} -Obsoletes: %{oldpython}-libxml2 < %{version}-%{release} -%endif -%endif +BuildRequires: pkgconfig(zlib) +# TW: generate subpackages for every python3 flavor +%define python_subpackage_only 1 %python_subpackages %description The XML C library was initially developed for the GNOME project. It is now used by many programs to load and save extensible data structures or manipulate any kind of XML files. -%if %{with python} -This package contains a module that permits -applications written in the Python programming language to use the -interface supplied by the libxml2 library to manipulate XML files. - -This library allows manipulation of XML files. It includes support for -reading, modifying, and writing XML and HTML files. There is DTD -support that includes parsing and validation even with complex DTDs, -either at parse time or later once the document has been modified. -%endif %package -n %{lname} Summary: A Library to Manipulate XML Files @@ -121,9 +88,11 @@ %package devel Summary: Development files for libxml2, an XML manipulation library +Requires: %{bname} = %{version} Requires: %{bname}-tools = %{version} Requires: %{lname} = %{version} Requires: glibc-devel +Requires: libxml2 = %{version} Requires: readline-devel Requires: xz-devel Requires: zlib-devel @@ -147,16 +116,35 @@ now used by many programs to load and save extensible data structures or manipulate any kind of XML files. +%package -n python-%{name} +Summary: Python Bindings for %{name} +Requires: %{lname} = %{version} +Requires: python-extras +Requires: python-testtools >= 1.8.0 +Provides: %{bname}-python = %{version}-%{release} +Provides: python-libxml2-python = %{version}-%{release} +Obsoletes: %{bname}-python < %{version}-%{release} +Obsoletes: python-libxml2-python < %{version}-%{release} +%if "%{python_flavor}" == "python2" +Provides: %{bname}-python = %{version}-%{release} +Provides: %{oldpython}-libxml2 = %{version}-%{release} +Obsoletes: %{oldpython}-libxml2 < %{version}-%{release} +%endif + +%description -n python-%{name} +This package contains a module that permits +applications written in the Python programming language to use the +interface supplied by the libxml2 library to manipulate XML files. + +This library allows manipulation of XML files. It includes support for +reading, modifying, and writing XML and HTML files. There is DTD +support that includes parsing and validation even with complex DTDs, +either at parse time or later once the document has been modified. + %prep -%setup -q -n libxml2-%{version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%autosetup -p1 -n libxml2-%{version} %build -%if !%{with python} export CFLAGS="%{optflags} -fno-strict-aliasing" %configure \ --disable-silent-rules \ @@ -174,14 +162,11 @@ --with-http %make_build BASE_DIR="%{_docdir}" DOC_MODULE="%{bname}" -%else pushd python %python_build popd -%endif %install -%if !%{with python} %make_install BASE_DIR="%{_docdir}" DOC_MODULE="%{bname}" find %{buildroot} -type f -name "*.la" -delete -print mkdir -p "%{buildroot}/%{_docdir}/%{bname}" @@ -190,23 +175,19 @@ # Remove duplicated file Copyright as not found by fdupes rm -fr %{buildroot}%{_docdir}/%{bname}/Copyright %fdupes %{buildroot}%{_datadir} -%else + pushd python %python_install popd chmod a-x python/tests/*.py %python_expand %fdupes %{buildroot}%{$python_sitearch} -%endif %check -%if !%{with python} # qemu-arm can't keep up atm, disabling check for arm %ifnarch %{arm} %make_build check %endif -%endif -%if !%{with python} %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig @@ -244,9 +225,7 @@ %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html -%else - -%files %{python_files} +%files %{python_files %{name}} %doc python/TODO %doc python/libxml2class.txt %doc doc/*.py @@ -254,6 +233,4 @@ %pycache_only %{python_sitearch}/__pycache__/*libxml2* %{python_sitearch}/*libxml2* -%endif - %changelog ++++++ libxml2-fix-lxml-corrupted-subtree-structures.patch ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.555083918 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.555083918 +0200 @@ -13,12 +13,10 @@ Fixes #255. --- - HTMLtree.c | 46 ++++++++++++++++++++++++++++------------------ - xmlsave.c | 31 +++++++++++++++++++++---------- + HTMLtree.c | 46 ++++++++++++++++++++++++++++------------------ + xmlsave.c | 31 +++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 28 deletions(-) -diff --git a/HTMLtree.c b/HTMLtree.c -index 24434d45..bdd639c7 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -744,7 +744,7 @@ void @@ -30,7 +28,7 @@ xmlAttrPtr attr; const htmlElemDesc * info; -@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer } root = cur; @@ -38,7 +36,7 @@ while (1) { switch (cur->type) { case XML_HTML_DOCUMENT_NODE: -@@ -762,13 +763,25 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -762,7 +763,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer if (((xmlDocPtr) cur)->intSubset != NULL) { htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL); } @@ -49,10 +47,10 @@ cur = cur->children; continue; } - break; +@@ -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. @@ -62,10 +60,11 @@ + break; + } + - /* ++ /* * Get specific HTML info for that node. */ -@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, + if (cur->ns == NULL) +@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer (cur->name != NULL) && (cur->name[0] != 'p')) /* p, pre, param */ xmlOutputBufferWriteString(buf, "\n"); @@ -73,7 +72,7 @@ cur = cur->children; continue; } -@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer (info != NULL) && (!info->isinline)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE) && @@ -86,7 +85,7 @@ xmlOutputBufferWriteString(buf, "\n"); } -@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer break; if (((cur->name == (const xmlChar *)xmlStringText) || (cur->name != (const xmlChar *)xmlStringTextNoenc)) && @@ -99,7 +98,7 @@ xmlChar *buffer; buffer = xmlEncodeEntitiesReentrant(doc, cur->content); -@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer break; } @@ -116,7 +115,7 @@ if ((cur->type == XML_HTML_DOCUMENT_NODE) || (cur->type == XML_DOCUMENT_NODE)) { -@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, +@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBuffer (cur->next != NULL)) { if ((cur->next->type != HTML_TEXT_NODE) && (cur->next->type != HTML_ENTITY_REF_NODE) && @@ -129,11 +128,9 @@ xmlOutputBufferWriteString(buf, "\n"); } } -diff --git a/xmlsave.c b/xmlsave.c -index 61a40459..aedbd5e7 100644 --- a/xmlsave.c +++ b/xmlsave.c -@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPt static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { int format = ctxt->format; @@ -142,7 +139,7 @@ xmlAttrPtr attr; xmlChar *start, *end; xmlOutputBufferPtr buf; -@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr buf = ctxt->buf; root = cur; @@ -150,7 +147,7 @@ while (1) { switch (cur->type) { case XML_DOCUMENT_NODE: -@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr break; case XML_DOCUMENT_FRAG_NODE: @@ -161,7 +158,7 @@ cur = cur->children; continue; } -@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr break; case XML_ELEMENT_NODE: @@ -181,7 +178,7 @@ xmlOutputBufferWrite(buf, ctxt->indent_size * (ctxt->level > ctxt->indent_nr ? ctxt->indent_nr : ctxt->level), -@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr xmlOutputBufferWrite(buf, 1, ">"); if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n"); if (ctxt->level >= 0) ctxt->level++; @@ -189,7 +186,7 @@ cur = cur->children; continue; } -@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr break; } @@ -206,6 +203,3 @@ if (cur->type == XML_ELEMENT_NODE) { if (ctxt->level > 0) ctxt->level--; --- -GitLab - ++++++ libxml2-fix-regression-in-xmlNodeDumpOutputInternal.patch ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.563083924 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.563083924 +0200 @@ -6,14 +6,12 @@ Commit 85b1792e could cause additional whitespace if xmlNodeDump was called with a non-zero starting level. --- - xmlsave.c | 14 +++++++------- + xmlsave.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -diff --git a/xmlsave.c b/xmlsave.c -index aedbd5e7..489505f4 100644 --- a/xmlsave.c +++ b/xmlsave.c -@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { +@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr break; case XML_ELEMENT_NODE: @@ -27,7 +25,7 @@ /* * 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 ctxt, xmlNodePtr cur) { +@@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr break; } @@ -41,6 +39,3 @@ xmlOutputBufferWrite(buf, 1, "<"); if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); --- -GitLab - ++++++ libxml2-make-XPATH_MAX_NODESET_LENGTH-configurable.patch ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.571083931 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.571083931 +0200 @@ -1,6 +1,10 @@ ---- libxml2-2.9.4/xpath.c -+++ libxml2-2.9.4/xpath.c -@@ -129,14 +129,32 @@ +--- + xpath.c | 40 +++++++++++++++++++++++++++++----------- + 1 file changed, 29 insertions(+), 11 deletions(-) + +--- a/xpath.c ++++ b/xpath.c +@@ -126,14 +126,32 @@ #define XPATH_MAX_STACK_DEPTH 1000000 /* @@ -38,7 +42,7 @@ /* * XPATH_MAX_RECRUSION_DEPTH: -@@ -3672,7 +3690,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, +@@ -3683,7 +3701,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; @@ -47,7 +51,7 @@ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } -@@ -3727,7 +3745,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xm +@@ -3739,7 +3757,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xm } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; @@ -56,7 +60,7 @@ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } -@@ -3781,7 +3799,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr c +@@ -3794,7 +3812,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr c } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; @@ -65,7 +69,7 @@ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } -@@ -3897,7 +3915,7 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, +@@ -3911,7 +3929,7 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, } else if (val1->nodeNr == val1->nodeMax) { xmlNodePtr *temp; @@ -74,7 +78,7 @@ xmlXPathErrMemory(NULL, "merging nodeset hit limit\n"); return(NULL); } -@@ -4008,7 +4026,7 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetP +@@ -3997,7 +4015,7 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetP } else if (set1->nodeNr >= set1->nodeMax) { xmlNodePtr *temp; @@ -83,7 +87,7 @@ xmlXPathErrMemory(NULL, "merging nodeset hit limit\n"); return(NULL); } -@@ -4096,7 +4114,7 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlN +@@ -4051,7 +4069,7 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlN } else if (set1->nodeNr >= set1->nodeMax) { xmlNodePtr *temp; ++++++ libxml2-python3-string-null-check.patch ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.579083937 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.579083937 +0200 @@ -8,11 +8,9 @@ NULL. Fixes a NULL pointer dereference when reporting an error with an invalid string. --- - python/types.c | 4 ++++ + python/types.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/python/types.c b/python/types.c -index 124af565..50951ba3 100644 --- a/python/types.c +++ b/python/types.c @@ -150,6 +150,10 @@ libxml_charPtrConstWrap(const char *str) @@ -26,6 +24,3 @@ return (ret); } --- -2.18.0 - ++++++ libxml2-python3-unicode-errors.patch ++++++ --- /var/tmp/diff_new_pack.e9Kq4l/_old 2021-10-30 23:14:19.587083944 +0200 +++ /var/tmp/diff_new_pack.e9Kq4l/_new 2021-10-30 23:14:19.587083944 +0200 @@ -1,8 +1,10 @@ -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 +--- + python/libxml.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/python/libxml.c ++++ b/python/libxml.c +@@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU PyObject *message; PyObject *result; char str[1000]; @@ -10,7 +12,7 @@ #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);