Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37514996
en ru br
Репозитории ALT
S:2.10.4-alt1
5.1: 2.7.8-alt3.M50P.1
4.1: 2.7.2-alt1.M41.2
+updates:2.6.32-alt2.M41.2
4.0: 2.7.2-alt1.M40.1
+updates:2.6.31-alt1
3.0: 2.6.20-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libxml2

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: libxml2-2.10.3-alt1.patch
Скачать


 .gear/rules                                        |   3 +
 .../tags/096ae438216478f676df7ea7a8532d565132d22d  |   6 +
 .gear/tags/list                                    |   2 +
 .gear/upstream/remotes                             |   3 +
 HTMLtree.c                                         |   3 +-
 Makefile.am                                        |   9 +-
 buf.h                                              |   5 +
 configure.ac                                       |   9 +
 enc.h                                              |   5 +
 encoding.c                                         |   2 +-
 fuzz/Makefile.am                                   |   2 +-
 libxml.h                                           |   4 +
 libxml2.spec                                       | 813 +++++++++++++++++++++
 python/Makefile.am                                 |   4 +-
 python/libxml.c                                    |  11 +-
 python/types.c                                     |   4 +
 save.h                                             |   5 +
 testStructuredErrorFunc.c                          |  69 ++
 timsort.h                                          |   4 +
 xml2-config.in                                     |   8 +-
 xmlIO.c                                            |   3 +-
 xpath.c                                            |   2 +-
 xzlib.h                                            |   2 +
 23 files changed, 962 insertions(+), 16 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 00000000..cd8fa28a
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,3 @@
+tar: v@version@:.
+diff: v@version@:. . name=@name@-@version@-@release@.patch
+tar: xmlts:xmlconf name=xmlts base=xmlconf
diff --git a/.gear/tags/096ae438216478f676df7ea7a8532d565132d22d b/.gear/tags/096ae438216478f676df7ea7a8532d565132d22d
new file mode 100644
index 00000000..24836977
--- /dev/null
+++ b/.gear/tags/096ae438216478f676df7ea7a8532d565132d22d
@@ -0,0 +1,6 @@
+object f507d167f1755b7eaea09fb1a44d29aab828b6d1
+type commit
+tag v2.10.3
+tagger Nick Wellnhofer <wellnhofer@aevum.de> 1665751626 +0200
+
+Release v2.10.3
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 00000000..0baca541
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1,2 @@
+7a8ebc2a61021b118d39381b4af612a650601da9 xmlts
+096ae438216478f676df7ea7a8532d565132d22d v2.10.3
diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes
new file mode 100644
index 00000000..1da74b14
--- /dev/null
+++ b/.gear/upstream/remotes
@@ -0,0 +1,3 @@
+[remote "upstream"]
+	url = https://gitlab.gnome.org/GNOME/libxml2.git
+	fetch = +refs/heads/*:refs/remotes/upstream/*
diff --git a/HTMLtree.c b/HTMLtree.c
index 3dd78a91..29f16551 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -332,7 +332,8 @@ htmlIsBooleanAttr(const xmlChar *name)
  * private routine exported from xmlIO.c
  */
 xmlOutputBufferPtr
-xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder)
+	__attribute((visibility("hidden")));
 /************************************************************************
  *									*
  *			Output error handlers				*
diff --git a/Makefile.am b/Makefile.am
index 316109b1..d6dc60c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,7 @@ check_PROGRAMS = \
 	testThreads \
 	testapi \
 	testchar \
+	testStructuredErrorFunc \
 	testdict \
 	testlimits \
 	testrecurse
@@ -140,6 +141,11 @@ testapi_LDFLAGS =
 testapi_DEPENDENCIES = $(DEPS)
 testapi_LDADD= $(LDADDS)
 
+testStructuredErrorFunc_SOURCES=testStructuredErrorFunc.c
+testStructuredErrorFunc_LDFLAGS =
+testStructuredErrorFunc_DEPENDENCIES = $(DEPS)
+testStructuredErrorFunc_LDADD= $(LDADDS)
+
 runxmlconf_SOURCES=runxmlconf.c
 runxmlconf_LDFLAGS = 
 runxmlconf_DEPENDENCIES = $(DEPS)
@@ -156,6 +162,7 @@ check-local:
 	$(CHECKER) ./runtest$(EXEEXT)
 	$(CHECKER) ./testrecurse$(EXEEXT)
 	ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT)
+	$(CHECKER) ./testStructuredErrorFunc$(EXEEXT)
 	$(CHECKER) ./testchar$(EXEEXT)
 	$(CHECKER) ./testdict$(EXEEXT)
 	$(CHECKER) ./testModule$(EXEEXT)
@@ -371,7 +378,7 @@ dist-source: distdir
 dist-test: distdir
 	(mkdir -p $(distdir))
 	(cd $(srcdir) ; tar -cf - --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
-	tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests  $(distdir)/Makefile.tests $(distdir)/README.md $(distdir)/README.tests $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
+	tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests  $(distdir)/Makefile.tests $(distdir)/README.md $(distdir)/README.tests $(distdir)/testapi.c $(distdir)/testStructuredErrorFunc.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
 	@(rm -rf $(distdir)/xstc/Test)
 
 cleantar:
diff --git a/buf.h b/buf.h
index b7bcf61f..d7d1be09 100644
--- a/buf.h
+++ b/buf.h
@@ -15,6 +15,8 @@
 
 #include <libxml/tree.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -63,5 +65,8 @@ int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
 #ifdef __cplusplus
 }
 #endif
+
+#pragma GCC visibility pop
+
 #endif /* __XML_BUF_H__ */
 
diff --git a/configure.ac b/configure.ac
index 7f240368..141e36a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,6 +411,15 @@ else
                     LZMA_LIBS="-llzma"
                 fi])
             )
+    else
+	# we still need to check for lzma.h header
+        SAVE_CFLAGS="${CFLAGS}"
+        CFLAGS="${CFLAGS} ${LZMA_CFLAGS}"
+        AC_CHECK_HEADERS([lzma.h],, [
+            have_liblzma=no
+            LZMA_CFLAGS=
+            LZMA_LIBS=])
+        CFLAGS="${SAVE_CFLAGS}"
     fi
 fi
 
diff --git a/enc.h b/enc.h
index a69a5d03..3b7df247 100644
--- a/enc.h
+++ b/enc.h
@@ -14,6 +14,8 @@
 
 #include <libxml/tree.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -27,6 +29,9 @@ int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
 #ifdef __cplusplus
 }
 #endif
+
+#pragma GCC visibility pop
+
 #endif /* __XML_ENC_H__ */
 
 
diff --git a/encoding.c b/encoding.c
index 5465359f..d3f61103 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2070,7 +2070,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
  *     -2 if the transcoding fails (for *in is not valid utf8 string or
  *        the result of transformation can't fit into the encoding we want), or
  */
-int
+int __attribute((visibility("hidden")))
 xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
                        xmlBufferPtr in, int len) {
     int ret;
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am
index 6d598167..23fbbaea 100644
--- a/fuzz/Makefile.am
+++ b/fuzz/Makefile.am
@@ -4,7 +4,7 @@ check_PROGRAMS = testFuzzer
 EXTRA_DIST = html.dict regexp.dict schema.dict xml.dict xpath.dict \
 	     static_seed/uri static_seed/regexp fuzz.h
 CLEANFILES = $(EXTRA_PROGRAMS)
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir)/include
 DEPENDENCIES = $(top_builddir)/libxml2.la
 LDADD = $(top_builddir)/libxml2.la
 
diff --git a/libxml.h b/libxml.h
index 66f164d5..03d38ec0 100644
--- a/libxml.h
+++ b/libxml.h
@@ -74,6 +74,8 @@ int vfprintf(FILE *, const char *, va_list);
 #define ATTRIBUTE_NO_SANITIZE(arg)
 #endif
 
+#pragma GCC visibility push(hidden)
+
 /*
  * Internal variable indicating if a callback has been registered for
  * node creation/destruction. It avoids spending a lot of time in locking
@@ -110,6 +112,8 @@ int __xmlRandom(void);
 XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
 int xmlInputReadCallbackNop(void *context, char *buffer, int len);
 
+#pragma GCC visibility pop
+
 #if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
 #  define LIBXML_STATIC
 #endif
diff --git a/libxml2.spec b/libxml2.spec
new file mode 100644
index 00000000..4a0277bd
--- /dev/null
+++ b/libxml2.spec
@@ -0,0 +1,813 @@
+%define _unpackaged_files_terminate_build 1
+
+Name: libxml2
+Version: 2.10.3
+Release: alt1
+Epoch: 1
+
+Summary: The library for manipulating XML files
+License: MIT
+Group: System/Libraries
+Url: https://gitlab.gnome.org/GNOME/libxml2
+Vcs: https://gitlab.gnome.org/GNOME/libxml2.git
+
+%def_with python2
+%def_disable static
+%define srcname %name-%version
+
+Source: %srcname.tar
+# https://www.w3.org/XML/Test/xmlts20130923.tar.gz
+Source1: xmlts.tar
+Patch: %name-%version-%release.patch
+
+Requires: xml-common
+
+BuildRequires: liblzma-devel zlib-devel
+
+%if_with python2
+BuildRequires(pre): rpm-build-python
+BuildRequires: python-devel
+%endif
+
+BuildRequires(pre): rpm-build-python3
+BuildRequires: python3-devel
+
+%package devel
+Summary: Development environment for building applications manipulating XML files
+Group: Development/C
+Requires: %name = %EVR
+
+%package devel-static
+Summary: Static library for building applications manipulating XML files
+Group: Development/C
+Requires: %name-devel = %EVR
+
+%package -n xml-utils
+Summary: Various XML utilities
+Group: Text tools
+Requires: %name = %EVR
+Provides: xmllint = %epoch:%version
+Obsoletes: xmllint < %epoch:%version
+
+%package -n python-module-%name
+Summary: Python bindings for the %name library
+Group: Development/Python
+Requires: %name = %EVR
+Provides: libxml2-python = %epoch:%version, python-modules-%name = %epoch:%version
+Obsoletes: libxml2-python < %epoch:%version, python-modules-%name < %epoch:%version
+
+%package -n python3-module-%name
+Summary: Python3 bindings for the %name library
+Group: Development/Python3
+Requires: %name = %EVR
+
+%package doc
+Summary: Documentation for the %name library
+Group: Development/C
+Conflicts: %name < %epoch:%version, %name > %epoch:%version
+BuildArch: noarch
+
+%description
+This library allows to manipulate XML files.  It includes support
+to read, modify and write XML and HTML files.  There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified.  The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select subnodes or ranges.  A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+This package contains the shared library required to run
+applications manipulating XML files.
+
+%description devel
+This library allows to manipulate XML files.  It includes support
+to read, modify and write XML and HTML files.  There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified.  The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select subnodes or ranges.  A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+This package contains the libraries, include and other files
+you can use to develop applications manipulating XML files.
+
+%description devel-static
+This library allows to manipulate XML files.  It includes support
+to read, modify and write XML and HTML files.  There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified.  The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select subnodes or ranges.  A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+This package contains the static library you can use to develop
+statically linked applications manipulating XML files.
+
+%description -n xml-utils
+This package contains xml tools:
++ xmllint - utility for parsing and validating XML files;
++ xmlcatalog - command line tool to parse and manipulate XML or SGML
+catalog files.
+
+%description -n python-module-%name
+This package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the %name library to manipulate XML files.
+
+This library allows to manipulate XML files.  It includes support
+to read, modify and write XML and HTML files.  There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%description -n python3-module-%name
+This package contains a module that permits applications
+written in the Python3 programming language to use the interface
+supplied by the %name library to manipulate XML files.
+
+This library allows to manipulate XML files.  It includes support
+to read, modify and write XML and HTML files.  There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%description doc
+This package contains documentation on the XML C library.
+
+%prep
+%setup -n %srcname -a1
+%patch -p1
+
+%build
+export ac_cv_path_WGET=/usr/bin/wget
+export ac_cv_path_XMLLINT=/usr/bin/xmllint
+export ac_cv_path_XSLTPROC=/usr/bin/xsltproc
+# disable dependency on binutils-devel
+export ac_cv_header_ansidecl_h=no
+mkdir -p m4
+%autoreconf
+mkdir build
+pushd build
+ln -s ../xmlconf
+mkdir -p fuzz
+%define _configure_script ../configure
+export PYTHON="%__python3"
+%configure \
+    --with-python \
+    %{subst_enable static} \
+    --disable-silent-rules
+%make_build DOC_MODULE=%name-%version
+popd
+%if_with python2
+mkdir python2
+pushd python2
+export PYTHON="%__python"
+%configure \
+	--with-python \
+	--disable-static \
+	--disable-silent-rules
+cp -la ../build/{*.la,.libs} .
+%make_build -C python
+popd
+%endif
+
+%check
+%make_build DOC_MODULE=%name-%version -k check -C build
+
+%install
+%makeinstall_std DOC_MODULE=%name-%version -C build
+%if_with python2
+%makeinstall_std -C python2/python
+%endif
+find %buildroot -type f -name '*.la' -print -delete
+mv %buildroot%_datadir/aclocal/libxml{,2}.m4
+
+%define pkgdocdir %_docdir/%name-%version
+mv %buildroot%_defaultdocdir/%name %buildroot%pkgdocdir
+install -p -m644 Copyright NEWS README.md %buildroot%pkgdocdir/
+rm -rf %buildroot%_defaultdocdir/%name
+
+%files
+%_libdir/*.so.*
+%dir %pkgdocdir
+%pkgdocdir/Copyright
+%pkgdocdir/NEWS
+%pkgdocdir/README.md
+
+%files -n xml-utils
+%_bindir/xmllint
+%_bindir/xmlcatalog
+%_man1dir/xmllint.*
+%_man1dir/xmlcatalog.*
+
+%files devel
+%_bindir/*-config
+%_libdir/*.so
+%_includedir/*
+%_pkgconfigdir/*
+%_libdir/cmake/*
+%_aclocaldir/*
+%_man1dir/*-config*
+
+%if_enabled static
+%files devel-static
+%_libdir/*.a
+%endif	#enabled static
+
+%if_with python2
+%files -n python-module-%name
+%python_sitelibdir/*
+%endif
+
+%files -n python3-module-%name
+%python3_sitelibdir/*
+
+%files doc
+%dir %pkgdocdir
+%pkgdocdir/*.html
+%pkgdocdir/examples
+%pkgdocdir/tutorial
+%pkgdocdir/python
+%_datadir/gtk-doc/html/libxml2
+
+%changelog
+* Fri Oct 14 2022 Alexey Shabalin <shaba@altlinux.org> 1:2.10.3-alt1
+- 2.10.3 (Fixes: CVE-2022-40303,CVE-2022-40304)
+
+* Wed Aug 17 2022 Alexey Shabalin <shaba@altlinux.org> 1:2.10.0-alt1
+- 2.10.0 (Fixes: CVE-2022-2309)
+
+* Mon May 02 2022 Alexey Shabalin <shaba@altlinux.org> 1:2.9.14-alt1
+- 2.9.14 (Fixes: CVE-2022-29824, CVE-2022-23308)
+
+* Tue Jun 15 2021 Alexey Shabalin <shaba@altlinux.org> 1:2.9.12-alt1
+- 2.9.12 (Fixes: CVE-2021-3516, CVE-2021-3517, CVE-2021-3518, CVE-2021-3537, CVE-2021-3541)
+
+* Sun Feb 14 2021 Ivan A. Melnikov <iv@altlinux.org> 1:2.9.10-alt6
+- Address upstream #132 by cherry-picking the fix from master; see:
+  + https://gitlab.gnome.org/GNOME/libxml2/-/issues/132
+  + https://github.com/shlomif/perl-XML-LibXSLT/issues/2
+
+* Wed Jan 27 2021 Grigory Ustinov <grenka@altlinux.org> 1:2.9.10-alt5
+- Add patch for python3.9 support.
+
+* Fri Nov 06 2020 Aleksei Nikiforov <darktemplar@altlinux.org> 1:2.9.10-alt4
+- Applied security fixes from upstream (Fixes: CVE-2019-20388, CVE-2020-7595,
+  CVE-2020-24977).
+
+* Mon Dec 23 2019 Ivan A. Melnikov <iv@altlinux.org> 1:2.9.10-alt3
+- Fix building without python-base.
+
+* Sat Nov 02 2019 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.10-alt2
+- xml2-config: fixed regressions introduced in v2.9.10.
+
+* Fri Nov 01 2019 Alexey Shabalin <shaba@altlinux.org> 1:2.9.10-alt1
+- Updated to v2.9.10
+
+* Wed May 22 2019 Alexey Shabalin <shaba@altlinux.org> 1:2.9.9.0.52.f824-alt1
+- v2.9.4-12-ge905f08 -> v2.9.9-52-gf824a4bd
+  (fixes: CVE-2017-9047, CVE-2017-9048, CVE-2017-9049, CVE-2017-9050,
+  CVE-2017-5969, CVE-2018-14404, CVE-2018-9251, CVE-2018-14567).
+
+* Thu Mar 22 2018 Aleksei Nikiforov <darktemplar@altlinux.org> 1:2.9.4.0.12.e905-alt1.1
+- (NMU) Rebuilt with python-3.6.4.
+
+* Fri Mar 03 2017 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.4.0.12.e905-alt1
+- v2.9.3-5-g65112cb -> v2.9.4-12-ge905f08
+  (fixes: CVE-2016-1833, CVE-2016-1834, CVE-2016-1835, CVE-2016-1836,
+  CVE-2016-1837, CVE-2016-1838, CVE-2016-1839, CVE-2016-1840,
+  CVE-2016-3627, CVE-2016-3705, CVE-2016-4449, CVE-2016-4483,
+  CVE-2016-4658, CVE-2016-5131).
+
+* Fri Apr 08 2016 Ivan Zakharyaschev <imz@altlinux.org> 1:2.9.3.0.5.6511-alt1.1.1
+- (NMU) Rebuild with python3-3.5.1-alt3 to get rid of the meaningless __pycache__/ dep
+  (it is meaningless because arbitrary packages package that dir).
+
+* Thu Mar 17 2016 Ivan Zakharyaschev <imz@altlinux.org> 1:2.9.3.0.5.6511-alt1.1
+- (NMU) rebuild with python3-3.5 & rpm-build-python3-0.1.10
+  (for ABI dependence and new python3(*) reqs)
+
+* Fri Mar 11 2016 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.3.0.5.6511-alt1
+- v2.9.3 -> v2.9.3-5-g65112cb.
+
+* Fri Nov 20 2015 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.3-alt1
+- Updated to v2.9.3.
+
+* Wed Nov 12 2014 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.2-alt1
+- Updated to v2.9.2-5-g7580ce0 (closes: #30267).
+- Built and packaged python3-module-%name.
+
+* Wed Mar 27 2013 Dmitry V. Levin <ldv@altlinux.org> 1:2.9.0-alt1
+- Updated to v2.9.0-42-gf7aeda2.
+
+* Tue Jul 17 2012 Dmitry V. Levin <ldv@altlinux.org> 1:2.8.0-alt1
+- Updated to v2.8.0-3-g549f06a.
+- Unexported 13 internal functions which are not supposed to be exported.
+
+* Thu Feb 09 2012 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt8
+- Updated to v2.7.8-48-gca03efc.
+
+* Thu Jan 12 2012 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt7
+- Updated to v2.7.8-41-g81809d5.
+- tests: added w3.org xmlts testsuite for runxmlconf.
+
+* Fri Oct 21 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 1:2.7.8-alt6.1
+- Rebuild with Python-2.7
+
+* Mon Apr 25 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt6
+- Updated to v2.7.8-15-gd7958b2.
+
+* Sun Feb 27 2011 Alexey Tourbin <at@altlinux.ru> 1:2.7.8-alt5
+- Disabled dependency on zlib-devel.
+
+* Mon Feb 07 2011 Alexey Tourbin <at@altlinux.ru> 1:2.7.8-alt4.1
+- Rebuilt for debuginfo.
+
+* Wed Jan 12 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt4
+- Fixed structured error handlers interoperability regression introduced
+  between 2.7.3 and 2.7.4 libxml2 releases (closes: #24379).
+
+* Mon Dec 27 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt3
+- Updated to v2.7.8-7-gfec31bc (fixes CVE-2010-4494).
+
+* Wed Dec 15 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt2
+- Build without libbfd-devel.
+
+* Fri Nov 05 2010 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.8-alt1
+- Updated to v2.7.8-1-g0081987.
+
+* Thu Oct 07 2010 Alexey Tourbin <at@altlinux.ru> 1:2.7.7-alt1
+- 2.7.3 -> v2.7.7-11-gd2190fa
+- libxml2.lds: fixup transition to upstream ABI versioning
+
+* Fri Nov 06 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1:2.7.3-alt2.1
+- Rebuilt with python 2.6
+
+* Mon Aug 17 2009 Dmitry V. Levin <ldv@altlinux.org> 1:2.7.3-alt2
+- Applied FICORA #245608 patches for CVE-2009-2414 and CVE-2009-2416.
+- xmlversion.h: Removed ATTRIBUTE_PRINTF redefinition.
+- Fixed some compiler warnings.
+
+* Sat Mar 07 2009 Alexey Tourbin <at@altlinux.ru> 1:2.7.3-alt1
+- 2.7.2+svn3803 -> 2.7.3
+
+* Tue Nov 25 2008 Alexey Tourbin <at@altlinux.ru> 1:2.7.2-alt2
+- updated to svn revision 3803 (fixes CVE-2008-4225, CVE-2008-4226)
+
+* Tue Oct 07 2008 Alexey Tourbin <at@altlinux.ru> 1:2.7.2-alt1
+- 2.6.32 -> 2.7.2
+- made libxml2-doc subpackage noarch
+
+* Mon Sep 01 2008 Alexey Tourbin <at@altlinux.ru> 1:2.6.32-alt3
+- upstream update for CVE-2008-3281 to avoid ABI issues
+
+* Thu Aug 21 2008 Alexey Tourbin <at@altlinux.ru> 1:2.6.32-alt2
+- applied upstream fix for recursive evaluation of entities (CVE-2008-3281)
+
+* Tue Apr 22 2008 Alexey Tourbin <at@altlinux.ru> 1:2.6.32-alt1
+- 2.6.31 -> 2.6.32
+
+* Sat Feb 09 2008 Grigory Batalov <bga@altlinux.ru> 1:2.6.31-alt1.1
+- Rebuilt with python-2.5.
+
+* Mon Jan 14 2008 Alexey Tourbin <at@altlinux.ru> 1:2.6.31-alt1
+- 2.6.30+svn3661 -> 2.6.31 (fixes CVE-2007-6284)
+
+* Fri Oct 26 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.30-alt2
+- 2.6.30+svn3659 -> 2.6.30+svn3661 (20071016)
+- python-module-libxml2: removed manual dependency on python
+
+* Tue Oct 02 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.30-alt1
+- 2.6.29+svn3647 -> 2.6.30+svn3659 (20070904)
+
+* Sun Aug 05 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.29-alt2
+- 2.6.29+svn3644 -> 2.6.29+svn3647 (20070801)
+- enabled 'make check' by default, except for W3C XML Schema tests
+
+* Thu Jul 19 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.29-alt1
+- updated to svn revision 3644 (20070718)
+- changed src.rpm packaging to keep separate tarball with svn snapshot
+
+* Thu Apr 19 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.28-alt1
+- updated to 2.6.28 release
+- linked libxml2mod.so python module with libpython
+
+* Sun Mar 18 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.27-alt4
+- updated to svn revision 3591 (20070314)
+- renamed python-modules-libxml2 package to python-module-libxml2,
+  to match python policy
+
+* Tue Feb 20 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.27-alt3
+- updated to svn revision 3586 (20070216)
+
+* Sun Jan 07 2007 Alexey Tourbin <at@altlinux.ru> 1:2.6.27-alt2
+- updated to 20061214 cvs snapshot
+
+* Mon Oct 30 2006 Alexey Tourbin <at@altlinux.ru> 1:2.6.27-alt1
+- 2.6.26 -> 2.6.27+
+- imported cvs sources into git and built with gear
+- introduced symbol versioning for the shared library, starting with
+  2.6.13 release (LIBXML2_2.6.13, LIBXML2_2.6.14, ..., LIBXML2_2.6.27)
+- removed libxml.so.2 provides and symlink
+- ChangeLog not packaged, NEWS is just good enough
+
+* Sun Jun 11 2006 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.26-alt2
+- Patch2: unescape file URIs for I/O, leave others intact
+
+* Thu Jun 08 2006 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.26-alt1
+- Release 2.6.26
+- Patch1: in libxml-2.0.pc, move internally used libraries to Libs.private
+  (bug 9448)
+- Patch2 has gone upstream
+
+* Thu Jun 01 2006 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.24-alt1
+- Release 2.6.24
+- Patch1 went upstream
+- Patch2: fix a typo in configure
+
+* Tue Apr 18 2006 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.23-alt2
+- Patch1: honor --nonet when --postvalid is given (GNOME bug 337483)
+
+* Thu Feb 02 2006 ALT QA Team Robot <qa-robot@altlinux.org> 1:2.6.23-alt1.1
+- Rebuilt for new pkg-config dependencies.
+
+* Sun Jan 08 2006 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.23-alt1
+- 2.6.23
+
+* Thu Sep 15 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.22-alt1
+- 2.6.22
+- Added gtk-doc files to the doc package
+- buildreq
+
+* Mon Sep 05 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.21-alt1
+- New upstream release
+
+* Tue Jul 12 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.20-alt1
+- New upstream release
+
+* Tue Apr 05 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.19-alt1
+- New upstream release
+
+* Mon Mar 14 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.18-alt1
+- New upstream release
+- Built with new Python
+
+* Mon Jan 17 2005 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.17-alt1
+- New upstream release
+
+* Thu Dec 16 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.16-alt2
+- Fixed docs install
+- Patch0 considered harmful
+
+* Thu Nov 11 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.16-alt1
+- New upstream release
+
+* Sun Oct 31 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.15-alt1
+- New upstream release
+- Patch1 is obsolete
+
+* Wed Oct 27 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.14-alt2
+- Fixes for buffer overflows from SuSE, provided by LDV [Patch1]
+
+* Fri Oct 01 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.14-alt1
+- New upstream release
+
+* Mon Sep 20 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.13-alt1
+- New upstream release
+
+* Tue Aug 24 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.12-alt1
+- New upstream release
+- Grouped xml-utils under 'Text tools'
+
+* Thu Jul 15 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.11-alt2
+- Python package renamed to comply with the New Policy
+
+* Thu Jul 08 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.11-alt1
+- New upstream release
+
+* Mon Apr 19 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.9-alt1
+- New upstream release
+
+* Sun Mar 28 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.8-alt1
+- New upstream release
+
+* Tue Feb 24 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.7-alt1
+- New upstream release
+
+* Fri Feb 13 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.6-alt1
+- New upstream release
+- Patch1 gone upstream
+
+* Wed Feb 04 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.5-alt2
+- Patch from CVS to prevent an XInclude-related crash in the XML::LibXML
+  test suite and elsewhere (GNOME bug #133106) [Patch1]
+
+* Tue Jan 27 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.5-alt1
+- New upstream release
+- Patch1 gone upstream
+- Disable check because test target is broken
+
+* Wed Jan 21 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.4-alt3
+- Buildreq against Python 2.3
+
+* Thu Jan 01 2004 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.4-alt2
+- Fix XInclude bugs [Patch1]
+- buildreq
+
+* Wed Dec 31 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.4-alt1
+- New upstream release
+- Patch1 gone upstream
+- Happy New Year :)
+
+* Thu Dec 25 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.3-alt2
+- CVS patch to fix an XInclude problem (GNOME bug #129932) [Patch1]
+
+* Thu Dec 11 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.3-alt1
+- New upstream release
+- Patch1 is obsolete
+- Patch2 gone upstream
+
+* Thu Dec 11 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.2-alt3
+- Bugfix from CVS for Gnome Bugzilla bug #126817 [Patch2]
+
+* Thu Nov 27 2003 Alexey Tourbin <at@altlinux.ru> 1:2.6.2-alt2
+- Do not package .la files.
+
+* Mon Nov 10 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.6.2-alt1
+- Updated to 2.6.2
+- Make the tests pass [Patch1]
+
+* Tue Sep 16 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.11-alt1
+- Upstream release 2.5.11
+
+* Mon Aug 18 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.10-alt1
+- New version
+- Eliminated duplication of doc files
+
+* Sat Jul 12 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.8-alt1
+- New version
+
+* Sat Jun 21 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.7-alt2
+- Fixed up the anachronistic aclocal m4 file, by request from Alexey Morozov.
+  Renamed the file libxml2.m4
+
+* Mon May 05 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.7-alt1
+- New version
+
+* Fri Apr 04 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.6-alt1
+- 2.5.6
+
+* Fri Jan 17 2003 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.5.1-alt1
+- Updated to 2.5.1
+- Manpage patch gone upstream
+
+* Fri Dec 13 2002 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.30-alt1
+- Updated to 2.4.30
+
+* Thu Dec 05 2002 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.28-alt2
+- Applied cvs patch from Marcus Clarke fixing a problem in entities
+  parsing that was detected in KDe documentations environment.
+
+* Sat Nov 30 2002 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.4.28-alt1
+- 2.4.28
+- doc subpackage
+
+* Thu Nov 21 2002 Dmitry V. Levin <ldv@altlinux.org> 1:2.4.27-alt1
+- 2.4.27
+- Added dependence on xml-common.
+
+* Sun Nov 03 2002 Mikhail Zabaluev <mhz@altlinux.ru> 1:2.4.26-alt0.1
+- 2.4.26, I hope it will behave now
+- disable static build by default
+
+* Wed Oct 09 2002 Stanislav Ievlev <inger@altlinux.ru> 1:2.4.24-alt2
+- increase release to satisfy rpm
+  (rpm ignore serial if version and release of old and new package a same)
+
+* Wed Oct 09 2002 Stanislav Ievlev <inger@altlinux.ru> 1:2.4.24-alt1
+- rollback to 2.4.24: new version is too buggy.
+
+* Mon Oct 07 2002 Dmitry V. Levin <ldv@altlinux.org> 2.4.25-alt1
+- 2.4.25
+- Fixed doc installation.
+
+* Thu Sep 12 2002 Mikhail Zabaluev <mhz@altlinux.ru> 2.4.24-alt1
+- 2.4.24
+
+* Mon Jul 22 2002 Mikhail Zabaluev <mhz@altlinux.ru> 2.4.23-alt1
+- 2.4.23
+- Fixed doc installation
+
+* Sat Jun 08 2002 Mikhail Zabaluev <mhz@altlinux.ru> 2.4.22-alt1
+- 2.4.22
+
+* Sat May 04 2002 Mikhail Zabaluev <mhz@altlinux.ru> 2.4.21-alt1
+- 2.4.21
+- Fixed BuildRequires
+- postun_ldconfig
+
+* Sat Apr 27 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.20-alt1
+- 2.4.20
+
+* Tue Mar 19 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.18-alt1
+- 2.4.18.
+- Repackaged docs.
+
+* Wed Feb 20 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.16-alt1
+- 2.4.16.
+
+* Tue Feb 12 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.15-alt1
+- 2.4.15.
+
+* Mon Feb 11 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.14-alt1
+- 2.4.14.
+- Added python subpackage.
+
+* Wed Jan 16 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.13-alt1
+- 2.4.13
+
+* Tue Nov 27 2001 Dmitry V. Levin <ldv@alt-linux.org> 2.4.11-alt1
+- 2.4.11
+
+* Mon Nov 12 2001 Dmitry V. Levin <ldv@alt-linux.org> 2.4.10-alt1
+- 2.4.10
+
+* Tue Nov 06 2001 Dmitry V. Levin <ldv@alt-linux.org> 2.4.8-alt1
+- 2.4.8
+- Renamed xmllint subpackage to xml-utils.
+
+* Mon Nov 05 2001 Dmitry V. Levin <ldv@alt-linux.org> 2.4.7-alt1
+- 2.4.7
+- Packaged xmlcatalog.
+- Packaged %_libdir/pkgconfig/* files.
+
+* Fri Oct 12 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.6-alt1
+- 2.4.6
+
+* Mon Sep 24 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.5-alt1
+- 2.4.5
+
+* Thu Sep 13 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.4-alt1
+- 2.4.4
+
+* Mon Aug 27 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.3-alt1
+- 2.4.3
+
+* Fri Aug 17 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.2-alt2
+- Rebuilt.
+
+* Thu Aug 16 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.2-alt1
+- 2.4.2
+
+* Thu Jul 26 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.1-alt1
+- 2.4.1
+
+* Wed Jul 11 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.0-alt1
+- 2.4.0
+
+* Thu Jul 05 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.3.13-alt1
+- 2.3.13
+
+* Mon Jun 18 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.3.11-alt1
+- 2.3.11
+
+* Mon Jun 04 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.3.10-alt1
+- 2.3.10
+
+* Tue May 22 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.3.9-alt1
+- 2.3.9
+- Moved static library to devel-static subpackage.
+
+* Sat May 05 2001 Rider <rider@altlinux.ru> 2.3.8-alt1
+- 2.3.8
+
+* Tue Mar 27 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.3.5-alt1
+- 2.3.5
+
+* Sun Mar 11 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.4-ipl1mdk
+- 2.3.4
+
+* Sun Mar 04 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.3-ipl1mdk
+- 2.3.3
+
+* Mon Feb 26 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.2-ipl1mdk
+- 2.3.2
+
+* Sat Feb 17 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.1-ipl1mdk
+- 2.3.1
+
+* Sun Feb 11 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.0-ipl2mdk
+- Provides libxml.so.2 for compatibility.
+
+* Fri Feb 09 2001 Dmitry V. Levin <ldv@fandra.org> 2.3.0-ipl1mdk
+- 2.3.0
+- Removed "Conflicts: libxml-devel" tag from %name-devel package.
+
+* Sat Jan 27 2001 Dmitry V. Levin <ldv@fandra.org> 2.2.12-ipl1mdk
+- 2.2.12
+
+* Sun Jan 07 2001 Dmitry V. Levin <ldv@fandra.org> 2.8.11-ipl3mdk
+- 2.8.11
+- Moved xmllint to separate subpackage.
+- Specfile cleanup; updated URL, summaries and descriptions.
+- Added libxml.m4 and manpages.
+- Relocated html documentation.
+
+* Wed Nov 29 2000 AEN <aen@logic.ru>
+- build for RE
+
+* Tue Nov 14 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.8-1mdk
+- bump up the version.
+
+* Fri Nov 03 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.7-1mdk
+- new and shiny version.
+
+* Sun Oct 29 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.6-1mdk
+- shiny version.
+
+* Sun Oct 15 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.4-1mdk
+- very new and shiny version.
+
+* Sat Aug 26 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 2.2.2-2mdk
+- corrected bug reported by
+  Reinhard Katzmann <reinhard.katzmann@neckar-alb.de> :
+  Requires : %name = {PACKAGE_VERSION}
+
+* Tue Aug 22 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 2.2.2-1mdk
+- updated to libxml version 2.2.2
+
+* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.8.9-3mdk
+- automatically added BuildRequires
+
+* Fri Jul 28 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.8.9-2mdk
+- rebuild
+
+* Sat Jul 22 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 1.8.9-1mdk
+- new version
+- big move
+
+* Thu Jul  6 2000 dam's <damien@mandrakesoft.com> 1.8.8-4mdk
+- spec cleanup.
+
+* Thu Jul 06 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 1.8.8-3mdk
+- use some macros
+
+* Tue Jul  4 2000 dam's <damien@mandrakesoft.com> 1.8.8-2mdk
+- moved xml-config to devel package. Thanx to Stefan
+
+* Tue Jul  4 2000 dam's <damien@mandrakesoft.com> 1.8.8-1mdk
+- updated.
+- spec cleanup.
+
+* Tue Apr 18 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.8.7-1mdk
+- fix release tag
+
+* Sun Apr 16 2000 Daouda Lo <daouda@mandrakesoft.com> 1.8.7-1mdk
+- release from helix stuffs.
+
+* Wed Mar 22 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.8.6-2mdk
+- fix group
+
+* Sun Feb 20 2000 Axalon Bloodstone <axalon@mandrakesoft.com> 1.8.6-1mdk
+- 1.8.6
+
+* Sun Oct 31 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
+- SMP build/check
+- 1.7.3
+
+* Fri Sep 24 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
+- 1.7.1
+
+* Thu Jul 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
+- 1.4.
+
+* Wed Jun 30 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
+- 1.2.0.
+
+* Tue May 11 1999 Bernhard Rosenkrц╓nzer <bero@mandrakesoft.com>
+- Mandrake adaptions
+
+* Thu Mar 04 1999 Michael Fulbright <drmike@redhat.com>
+- version 1.0.0
+
+* Fri Feb 12 1999 Michael Fulbright <drmike@redhat.com>
+- version 0.99.5 built against gnome-libs-0.99.8
+
+* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
+- version 0.99.5
+
+* Wed Jan 06 1999 Michael Fulbright <drmike@redhat.com>
+- made clean section work again
+
+* Wed Dec 16 1998 Michael Fulbright <drmike@redhat.com>
+- bumped to 0.99.0 for GNOME freeze
+
+* Sun Oct  4 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+- Added xml-config to the package
+
+* Thu Sep 24 1998 Michael Fulbright <msf@redhat.com>
+- Built release 0.30
diff --git a/python/Makefile.am b/python/Makefile.am
index cc1419a1..3f170345 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -25,8 +25,8 @@ libxml2mod_la_LIBADD = $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD)
 
 BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
 
-python_PYTHON = drv_libxml2.py
-nodist_python_PYTHON = libxml2.py
+pyexec_PYTHON = drv_libxml2.py
+nodist_pyexec_PYTHON = libxml2.py
 
 API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
 GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
diff --git a/python/libxml.c b/python/libxml.c
index e071e824..9d476f4f 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
     PyObject *message;
     PyObject *result;
     char str[1000];
+    unsigned char *ptr = (unsigned char *)str;
 
 #ifdef DEBUG_ERROR
     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
@@ -1637,12 +1638,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
 	    str[999] = 0;
         va_end(ap);
 
+#if PY_MAJOR_VERSION >= 3
+        /* Ensure the error string doesn't start at UTF8 continuation. */
+        while (*ptr && (*ptr & 0xc0) == 0x80)
+            ptr++;
+#endif
+
         list = PyTuple_New(2);
         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
-        message = libxml_charPtrConstWrap(str);
+        message = libxml_charPtrConstWrap(ptr);
         PyTuple_SetItem(list, 1, message);
         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+        /* Forget any errors caused in the error handler. */
+        PyErr_Clear();
         Py_XDECREF(list);
         Py_XDECREF(result);
     }
diff --git a/python/types.c b/python/types.c
index 27ad5008..08ef6dc3 100644
--- a/python/types.c
+++ b/python/types.c
@@ -274,6 +274,10 @@ libxml_charPtrConstWrap(const char *str)
         return (Py_None);
     }
     ret = PY_IMPORT_STRING(str);
+    if (ret == NULL) {
+        Py_INCREF(Py_None);
+        return (Py_None);
+    }
     return (ret);
 }
 
diff --git a/save.h b/save.h
index 192b6741..ce8d41d0 100644
--- a/save.h
+++ b/save.h
@@ -14,6 +14,8 @@
 
 #include <libxml/tree.h>
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -32,5 +34,8 @@ xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
 #ifdef __cplusplus
 }
 #endif
+
+#pragma GCC visibility pop
+
 #endif /* __XML_SAVE_H__ */
 
diff --git a/testStructuredErrorFunc.c b/testStructuredErrorFunc.c
new file mode 100644
index 00000000..645334c1
--- /dev/null
+++ b/testStructuredErrorFunc.c
@@ -0,0 +1,69 @@
+#include <string.h>
+#include <libxml/SAX2.h>
+
+xmlStructuredErrorFunc called_func;
+static void *called_data;
+#define	unset_code	((xmlStructuredErrorFunc) 0xbadc0ded)
+#define	unset_data	((void *) 0x8badf00d)
+
+static void ctxt_error_func(void *p, xmlErrorPtr e ATTRIBUTE_UNUSED)
+{
+	called_func = ctxt_error_func;
+	called_data = p;
+}
+#define ctxt_error_data	((void *) 0xdeadbeef)
+
+static void structured_error_func(void *p, xmlErrorPtr e ATTRIBUTE_UNUSED)
+{
+	called_func = structured_error_func;
+	called_data = p;
+}
+#define	structured_error_data	((void *) 0xcafebabe)
+
+static int test_error_handler(int set_cef, int set_sef)
+{
+	xmlStructuredErrorFunc expected_func = unset_code;
+	void *expected_data = unset_data;
+	int rc;
+
+	xmlParserCtxtPtr ctxt = xmlCreateDocParserCtxt((const xmlChar *) "1");
+	if (!ctxt) {
+		perror("xmlCreateMemoryParserCtxt");
+		return 1;
+	}
+
+	memset(ctxt->sax, 0, sizeof(*ctxt->sax));
+	ctxt->sax->initialized = XML_SAX2_MAGIC;
+
+	if (set_cef) {
+		expected_func = ctxt->sax->serror = ctxt_error_func;
+		expected_data = ctxt->userData = ctxt_error_data;
+	}
+
+	if (set_sef) {
+		xmlSetStructuredErrorFunc(structured_error_data,
+			structured_error_func);
+		if (!set_cef) {
+			expected_func = structured_error_func;
+			expected_data = structured_error_data;
+		}
+	} else
+		xmlSetStructuredErrorFunc(NULL, NULL);
+
+	called_func = unset_code;
+	called_data = unset_data;
+	xmlParseDocument(ctxt);
+	rc = expected_func != called_func || expected_data != called_data;
+
+	if (ctxt->myDoc)
+		xmlFreeDoc(ctxt->myDoc);
+	xmlFreeParserCtxt(ctxt);
+
+	return rc;
+}
+
+int main(void)
+{
+	return test_error_handler(0, 0) + test_error_handler(0, 1) +
+		test_error_handler(1, 0) + test_error_handler(1, 1);
+}
diff --git a/timsort.h b/timsort.h
index 383584fb..87377991 100644
--- a/timsort.h
+++ b/timsort.h
@@ -40,6 +40,8 @@
 typedef unsigned __int64 uint64_t;
 #endif
 
+#pragma GCC visibility push(hidden)
+
 #ifndef SORT_NAME
 #error "Must declare SORT_NAME"
 #endif
@@ -599,3 +601,5 @@ void TIM_SORT(SORT_TYPE *dst, const size_t size) {
 #undef TIM_SORT_COLLAPSE
 #undef TIM_SORT_RUN_T
 #undef TEMP_STORAGE_T
+
+#pragma GCC visibility pop
diff --git a/xml2-config.in b/xml2-config.in
index bda32211..b47d53d6 100644
--- a/xml2-config.in
+++ b/xml2-config.in
@@ -17,7 +17,6 @@ Known values for OPTION are:
   --prefix=DIR		change libxml prefix [default $prefix]
   --exec-prefix=DIR	change libxml exec prefix [default $exec_prefix]
   --libs		print library linking information
-                        add --dynamic to print only shared libraries
   --cflags		print pre-processor and compiler flags
   --modules		module support enabled
   --help		display this help and exit
@@ -82,12 +81,7 @@ while test $# -gt 0; do
        	;;
 
     --libs)
-        if [ "$2" = "--dynamic" ]; then
-            shift
-            libs="@XML_LIBS@"
-        else
-            libs="@XML_LIBS@ @XML_PRIVATE_LIBS@ @MODULE_PLATFORM_LIBS@ @LIBS@"
-        fi
+        libs="@XML_LIBS@"
 
         if [ "@XML_LIBDIR@" != "-L/usr/lib" -a "@XML_LIBDIR@" != "-L/usr/lib64" ]; then
             libs="@XML_LIBDIR@ $libs"
diff --git a/xmlIO.c b/xmlIO.c
index 16c29f57..18727fac 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -113,7 +113,8 @@ static int xmlOutputCallbackNr = 0;
 static int xmlOutputCallbackInitialized = 0;
 
 xmlOutputBufferPtr
-xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder)
+	__attribute((visibility("hidden")));
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /************************************************************************
diff --git a/xpath.c b/xpath.c
index fbee6a52..aa1ce0dd 100644
--- a/xpath.c
+++ b/xpath.c
@@ -3240,7 +3240,7 @@ xmlXPathFormatNumber(double number, char buffer[], int buffersize)
 
 	    /* Finally copy result back to caller */
 	    size = strlen(work) + 1;
-	    if (size > buffersize) {
+	    if (size > buffersize && buffersize < sizeof(work)) {
 		work[buffersize - 1] = 0;
 		size = buffersize;
 	    }
diff --git a/xzlib.h b/xzlib.h
index 7b1df15c..38150f19 100644
--- a/xzlib.h
+++ b/xzlib.h
@@ -11,9 +11,11 @@
 #define LIBXML2_XZLIB_H
 typedef void *xzFile;           /* opaque lzma file descriptor */
 
+#pragma GCC visibility push(hidden)
 xzFile __libxml2_xzopen(const char *path, const char *mode);
 xzFile __libxml2_xzdopen(int fd, const char *mode);
 int __libxml2_xzread(xzFile file, void *buf, unsigned len);
 int __libxml2_xzclose(xzFile file);
 int __libxml2_xzcompressed(xzFile f);
+#pragma GCC visibility pop
 #endif /* LIBXML2_XZLIB_H */
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin