Hello community, here is the log from the commit of package libxml2 for openSUSE:Factory checked in at 2019-09-13 14:56:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libxml2 (Old) and /work/SRC/openSUSE:Factory/.libxml2.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxml2" Fri Sep 13 14:56:54 2019 rev:94 rq:729358 version:2.9.9 Changes: -------- --- /work/SRC/openSUSE:Factory/libxml2/libxml2.changes 2019-02-04 21:10:14.511894228 +0100 +++ /work/SRC/openSUSE:Factory/.libxml2.new.7948/libxml2.changes 2019-09-13 14:56:55.481273692 +0200 @@ -1,0 +2,35 @@ +Mon Sep 9 08:24:40 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Do not depend on setuptools to keep the depgraph small and + avoid build cycles + +------------------------------------------------------------------- +Fri Aug 2 13:08:40 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Use python[23]-libmxl2 as python names not python-libxml2-python + which is kinda confusing + +------------------------------------------------------------------- +Thu Aug 1 10:53:13 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Do not ship libtool archive anymore + +------------------------------------------------------------------- +Wed Jul 31 12:27:10 UTC 2019 - Pedro Monreal Gonzalez <[email protected]> + +- Enable tests also in the python subpackages + +------------------------------------------------------------------- +Thu Jul 4 08:52:14 UTC 2019 - Pedro Monreal Gonzalez <[email protected]> + +- Added a new configurable variable XPATH_DEFAULT_MAX_NODESET_LENGTH + to avoid nodeset limit when processing large XML files [bsc#1135123] + * Added libxml2-make-XPATH_MAX_NODESET_LENGTH-configurable.patch + +------------------------------------------------------------------- +Mon Feb 25 08:40:16 UTC 2019 - Pedro Monreal Gonzalez <[email protected]> + +- Merge python-libxml2-python spec and changes files into the + libxml2 ones using _multibuild [bsc#1126499, bsc#1123919] + +------------------------------------------------------------------- @@ -35,0 +71,3 @@ +- Add libxml2-python3-string-null-check.patch: fix NULL pointer + dereference when parsing invalid data (bsc#1065270 + glgo#libxml2!15).). @@ -48,0 +87 @@ +- Drop patch python3.6-verify_fd.patch merged upstream @@ -91,0 +131,21 @@ +Sat Nov 11 15:30:27 UTC 2017 - [email protected] + +- clean with spec-cleaner + +------------------------------------------------------------------- +Thu Oct 26 14:10:55 UTC 2017 - [email protected] + +- libxml2-python3-unicode-errors.patch: work around an issue with + libxml2 supplied error strings being undecodable UTF-8 (bsc#1065270) + +------------------------------------------------------------------- +Mon Oct 2 15:59:57 UTC 2017 - [email protected] + +- convert to singlespec, build a python 3 version +- change build instructions to use setup.py (and %python_build macros) + instead of makefile-based approach +- add python3.6-verify_fd.patch that fixes libxml2 on python 3.6 +- rename to python-libxml2-python to conform to package naming policy + (PyPI name is "libxml2-python") + +------------------------------------------------------------------- @@ -289,0 +350,5 @@ +Sun Jul 7 06:00:42 UTC 2013 - [email protected] + +- buildignore python to avoid build cycle + +------------------------------------------------------------------- @@ -336 +401 @@ - * please se ChangeLog for more info + * please see ChangeLog for more info @@ -372,0 +438,5 @@ +Sat Feb 25 08:47:58 UTC 2012 - [email protected] + +- fix version + +------------------------------------------------------------------- @@ -378,0 +449,6 @@ +Thu Feb 23 11:00:21 UTC 2012 - [email protected] + +- renamed to python-libxml2 to follow python naming expectations +- do not require python but let rpm figure it out + +------------------------------------------------------------------- @@ -427,0 +504,5 @@ +Mon Dec 6 09:05:53 UTC 2010 - [email protected] + +- buildrequire python-xml to fix build + +------------------------------------------------------------------- @@ -474,0 +556,5 @@ +Wed Apr 7 16:34:29 UTC 2010 - [email protected] + +- fix build + +------------------------------------------------------------------- @@ -486,0 +573,5 @@ + +------------------------------------------------------------------- +Tue Dec 15 12:19:16 CET 2009 - [email protected] + +- enable parallel building Old: ---- python-libxml2-python.changes python-libxml2-python.spec New: ---- _multibuild libxml2-make-XPATH_MAX_NODESET_LENGTH-configurable.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxml2.spec ++++++ --- /var/tmp/diff_new_pack.3q3GMs/_old 2019-09-13 14:56:56.241273725 +0200 +++ /var/tmp/diff_new_pack.3q3GMs/_new 2019-09-13 14:56:56.245273725 +0200 @@ -16,24 +16,57 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +# Define "python" as a package in _multibuild file +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "python" +%define pysuffix -python +%define oldpython python +%bcond_without python +%else +%define pysuffix %{nil} +%bcond_with python +%endif +%define bname libxml2 %define lname libxml2-2 -Name: libxml2 +Name: %{bname}%{pysuffix} Version: 2.9.9 Release: 0 Summary: A Library to Manipulate XML Files License: MIT Group: Development/Libraries/C and C++ -Url: http://xmlsoft.org -Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz -Source1: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz.asc +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: %{name}.keyring +Source3: libxml2.keyring Patch0: fix-perl.diff +Patch1: libxml2-python3-unicode-errors.patch +# PATCH-FIX-UPSTREAM libxml2-python3-string-null-check.patch bsc#1065270 [email protected] +# don't return a NULL string for an invalid UTF-8 conversion. +Patch2: libxml2-python3-string-null-check.patch +# PATCH-FIX-SUSE bsc#1135123 Added a new configurable variable XPATH_DEFAULT_MAX_NODESET_LENGTH to avoid nodeset limit +Patch3: libxml2-make-XPATH_MAX_NODESET_LENGTH-configurable.patch BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: readline-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(zlib) +%if %{with python} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module xml} +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(libxml-2.0) +Requires: libxml2-2 = %{version} +%if "%{python_flavor}" == "python2" +Obsoletes: %{bname}-python < %{version} +Provides: %{bname}-python = %{version} +Obsoletes: %{oldpython}-libxml2 < %{version} +Provides: %{oldpython}-libxml2 = %{version} +%endif +%endif %description The XML C library was initially developed for the GNOME project. It is @@ -63,8 +96,8 @@ %package tools Summary: Tools using libxml Group: Productivity/Text/Utilities -Provides: %{name} = %{version}-%{release} -Obsoletes: %{name} < %{version}-%{release} +Provides: %{bname} = %{version}-%{release} +Obsoletes: %{bname} < %{version}-%{release} %description tools This package contains xmllint, a very useful tool proving libxml's power. @@ -72,10 +105,12 @@ %package devel Summary: Development files for libxml2, an XML manipulation library Group: Development/Libraries/C and C++ +Requires: %{bname}-tools = %{version} Requires: %{lname} = %{version} -Requires: %{name}-tools = %{version} Requires: glibc-devel Requires: readline-devel +Requires: xz-devel +Requires: zlib-devel Requires: pkgconfig(liblzma) Requires: pkgconfig(zlib) @@ -97,19 +132,57 @@ now used by many programs to load and save extensible data structures or manipulate any kind of XML files. +%package -n python2-libxml2 +Summary: Python 2 Bindings for libxml2 +Group: Development/Libraries/Python +Obsoletes: libxml2-python +Provides: python2-libxml2-python +Obsoletes: python2-libxml2-python + +%description -n python2-libxml2 +The python2-libxml2 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. + +%package -n python3-libxml2 +Summary: Python 3 Bindings for libxml2 +Group: Development/Libraries/Python +Obsoletes: libxml2-python +Provides: python3-libxml2-python +Obsoletes: python3-libxml2-python + +%description -n python3-libxml2 +The python3-libxml2 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 +%setup -q -n libxml2-%{version} %patch0 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build +export CFLAGS="%{optflags} -fno-strict-aliasing" %configure \ --disable-silent-rules \ --disable-static \ - --docdir=%{_docdir}/%{name} \ - --with-html-dir=%{_docdir}/%{name}/html \ + --docdir=%{_docdir}/%{bname} \ + --with-html-dir=%{_docdir}/%{bname}/html \ + --without-python \ --with-fexceptions \ --with-history \ - --without-python \ --enable-ipv6 \ --with-sax1 \ --with-regexps \ @@ -117,14 +190,30 @@ --with-reader \ --with-http -make %{?_smp_mflags} BASE_DIR="%{_docdir}" DOC_MODULE="%{name}" +make %{?_smp_mflags} BASE_DIR="%{_docdir}" DOC_MODULE="%{bname}" +%if %{with python} +pushd python +%python_build +popd +%endif %install -%make_install BASE_DIR="%{_docdir}" DOC_MODULE="%{name}" -mkdir -p "%{buildroot}/%{_docdir}/%{name}" -cp -a AUTHORS NEWS README TODO* %{buildroot}%{_docdir}/%{name}/ +%if !%{with python} +%make_install BASE_DIR="%{_docdir}" DOC_MODULE="%{bname}" +find %{buildroot} -type f -name "*.la" -delete -print +mkdir -p "%{buildroot}/%{_docdir}/%{bname}" +cp -a AUTHORS NEWS README TODO* %{buildroot}%{_docdir}/%{bname}/ ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml +# 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 # qemu-arm can't keep up atm, disabling check for arm @@ -132,14 +221,15 @@ make %{?_smp_mflags} check %endif +%if !%{with python} %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %files -n %{lname} %{_libdir}/lib*.so.* %license COPYING* Copyright -%doc %dir %{_docdir}/%{name} -%doc %{_docdir}/%{name}/[ANRCT]* +%doc %dir %{_docdir}/%{bname} +%doc %{_docdir}/%{bname}/[ANRCT]* %files tools %{_bindir}/xmllint @@ -154,8 +244,6 @@ %{_includedir}/libxml %{_includedir}/libxml2 %{_libdir}/lib*.so -# libxml2.la is needed for the python-libxml2 build. Deleting it breaks build of python-libxml2. -%{_libdir}/libxml2.la %{_libdir}/*.sh %{_libdir}/pkgconfig/*.pc %{_libdir}/cmake @@ -164,10 +252,35 @@ %files doc %{_datadir}/gtk-doc/html/* -%doc %{_docdir}/%{name}/examples -%doc %{_docdir}/%{name}/html +%doc %{_docdir}/%{bname}/examples +%doc %{_docdir}/%{bname}/html # owning these directories prevents gtk-doc <-> libxml2 build loop: %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html +%else +%files -n python2-libxml2 +%doc python/TODO +%doc python/libxml2class.txt +%doc doc/*.py +%doc doc/python.html +%{python2_sitearch}/libxml2.py* +%{python2_sitearch}/drv_libxml2.py* +%{python2_sitearch}/libxml2mod*.so +%{python2_sitearch}/*.egg-info + +%files -n python3-libxml2 +%doc python/TODO +%doc python/libxml2class.txt +%doc doc/*.py +%doc doc/python.html +%{python3_sitearch}/libxml2.py +%{python3_sitearch}/__pycache__/libxml2.* +%{python3_sitearch}/drv_libxml2.py +%{python3_sitearch}/__pycache__/drv_libxml2.* +%{python3_sitearch}/libxml2mod*.so +%{python3_sitearch}/*.egg-info + +%endif + %changelog ++++++ _multibuild ++++++ <multibuild> <package>python</package> </multibuild> ++++++ libxml2-make-XPATH_MAX_NODESET_LENGTH-configurable.patch ++++++ --- libxml2-2.9.4/xpath.c +++ libxml2-2.9.4/xpath.c @@ -119,14 +119,32 @@ #define XPATH_MAX_STACK_DEPTH 1000000 /* - * XPATH_MAX_NODESET_LENGTH: + * XPATH_DEFAULT_MAX_NODESET_LENGTH: * when evaluating an XPath expression nodesets are created and we - * arbitrary limit the maximum length of those node set. 10000000 is - * an insanely large value which should never be reached under normal - * circumstances, one would first need to construct an in memory tree + * arbitrary limit the maximum length of those node set. Default value is + * 10000000, an insanely large value which should never be reached under + * normal circumstances, one would first need to construct an in memory tree * with more than 10 millions nodes. + * + * Adjustable via LIBXML_MAX_NODESET_LENGTH env variable. + * Absolute maximum is INT_MAX. */ -#define XPATH_MAX_NODESET_LENGTH 10000000 +#define XPATH_DEFAULT_MAX_NODESET_LENGTH 10000000 + +int +get_max_nodeset_len() { + const char *max_nodeset_len_str = getenv("LIBXML_MAX_NODESET_LENGTH"); + int max_nodeset_len = XPATH_DEFAULT_MAX_NODESET_LENGTH; + + if (max_nodeset_len_str != NULL) { + max_nodeset_len = strtol(max_nodeset_len_str, NULL, 10); + + if (max_nodeset_len <= 0 || max_nodeset_len > INT_MAX) + max_nodeset_len = XPATH_DEFAULT_MAX_NODESET_LENGTH; + } + + return max_nodeset_len; +} /* * TODO: @@ -3672,7 +3690,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; - if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (cur->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } @@ -3727,7 +3745,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xm } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; - if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (cur->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } @@ -3781,7 +3799,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr c } else if (cur->nodeNr == cur->nodeMax) { xmlNodePtr *temp; - if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (cur->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "growing nodeset hit limit\n"); return(-1); } @@ -3897,7 +3915,7 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, } else if (val1->nodeNr == val1->nodeMax) { xmlNodePtr *temp; - if (val1->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (val1->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "merging nodeset hit limit\n"); return(NULL); } @@ -4008,7 +4026,7 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetP } else if (set1->nodeNr >= set1->nodeMax) { xmlNodePtr *temp; - if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (set1->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "merging nodeset hit limit\n"); return(NULL); } @@ -4096,7 +4114,7 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlN } else if (set1->nodeNr >= set1->nodeMax) { xmlNodePtr *temp; - if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) { + if (set1->nodeMax >= get_max_nodeset_len()) { xmlXPathErrMemory(NULL, "merging nodeset hit limit\n"); return(NULL); }
