.gear/rules | 2 + .gear/tags/list | 1 + Makefile.am | 13 +- error.c | 44 ++-- libxml2.lds | 7 + libxml2.spec | 681 +++++++++++++++++++++++++++++++++++++++++++++ libxml2.syms | 4 + python/Makefile.am | 2 +- python/tests/Makefile.am | 2 +- testStructuredErrorFunc.c | 69 +++++ xpath.c | 2 +- 11 files changed, 793 insertions(+), 34 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..3120b14 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: v2.7.8-7-gfec31bc:. name=libxml2-v2.7.8-7-gfec31bc +diff: v2.7.8-7-gfec31bc:. . name=libxml2-@version@-@release@.patch diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..8f5c021 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +fec31bcd452e77c10579467ca87a785b41115de6 v2.7.8-7-gfec31bc diff --git a/Makefile.am b/Makefile.am index b8cbb4a..84147d2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAG noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ testThreads testC14N testAutomata testRegexp \ testReader testapi testModule runtest runsuite testchar \ - testdict runxmlconf testrecurse + testStructuredErrorFunc testdict runxmlconf testrecurse bin_PROGRAMS = xmllint xmlcatalog @@ -21,7 +21,7 @@ lib_LTLIBRARIES = libxml2.la libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ if USE_VERSION_SCRIPT -LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms +LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms -Wl,libxml2.lds else LIBXML2_VERSION_SCRIPT = endif @@ -177,6 +177,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) @@ -188,7 +193,7 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_LDADD= $(LDADDS) runtests: - $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) + $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) && $(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testStructuredErrorFunc$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT) && $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT) @(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \ $(MAKE) MAKEFLAGS+=--silent tests ; fi) @@ -1160,7 +1165,7 @@ dist-source: distdir dist-test: distdir (mkdir -p $(distdir)) (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn xstc/Tests) | (cd $(distdir); tar xf -) - tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(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 $(distdir)/README.tests $(distdir)/AUTHORS $(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/error.c b/error.c index 7508d41..4555aec 100644 --- a/error.c +++ b/error.c @@ -452,6 +452,8 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, xmlErrorPtr to = &xmlLastError; xmlNodePtr baseptr = NULL; + if (code == XML_ERR_OK) + return; if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING)) return; if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) || @@ -459,8 +461,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) { ctxt = (xmlParserCtxtPtr) ctx; if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) && - (ctxt->sax->initialized == XML_SAX2_MAGIC)) + (ctxt->sax->initialized == XML_SAX2_MAGIC) && + (ctxt->sax->serror != NULL)) { schannel = ctxt->sax->serror; + data = ctxt->userData; + } } /* * Check if structured error handler set @@ -473,16 +478,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, if (schannel != NULL) data = xmlStructuredErrorContext; } - if ((domain == XML_FROM_VALID) && - ((channel == xmlParserValidityError) || - (channel == xmlParserValidityWarning))) { - ctxt = (xmlParserCtxtPtr) ctx; - if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) && - (ctxt->sax->initialized == XML_SAX2_MAGIC)) - schannel = ctxt->sax->serror; - } - if (code == XML_ERR_OK) - return; /* * Formatting the message */ @@ -589,30 +584,25 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, if (to != &xmlLastError) xmlCopyError(to,&xmlLastError); + if (schannel != NULL) { + schannel(data, to); + return; + } + /* * Find the callback channel if channel param is NULL */ - if ((ctxt != NULL) && (channel == NULL) && - (xmlStructuredError == NULL) && (ctxt->sax != NULL)) { + if ((channel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL)) { if (level == XML_ERR_WARNING) channel = ctxt->sax->warning; else channel = ctxt->sax->error; - data = ctxt->userData; - } else if (channel == NULL) { - if ((schannel == NULL) && (xmlStructuredError != NULL)) { - schannel = xmlStructuredError; - data = xmlStructuredErrorContext; - } else { - channel = xmlGenericError; - if (!data) { - data = xmlGenericErrorContext; - } - } + if (channel != NULL) + data = ctxt->userData; } - if (schannel != NULL) { - schannel(data, to); - return; + if (channel == NULL) { + channel = xmlGenericError; + data = xmlGenericErrorContext; } if (channel == NULL) return; diff --git a/libxml2.lds b/libxml2.lds new file mode 100644 index 0000000..502c82d --- /dev/null +++ b/libxml2.lds @@ -0,0 +1,7 @@ +"xmlParseInNodeContext@LIBXML2_2.6.13" = xmlParseInNodeContext; +"xmlSchemaGetFacetValueAsULong@LIBXML2_2.6.13" = xmlSchemaGetFacetValueAsULong; +"xmlSchemaGetParserErrors@LIBXML2_2.6.13" = xmlSchemaGetParserErrors; +"xmlSchemaGetValidErrors@LIBXML2_2.6.13" = xmlSchemaGetValidErrors; +"xmlSchemaValPredefTypeNodeNoNorm@LIBXML2_2.6.13" = xmlSchemaValPredefTypeNodeNoNorm; +"xmlSchemaValidateLengthFacet@LIBXML2_2.6.13" = xmlSchemaValidateLengthFacet; +"xmlXPathContextSetCache@LIBXML2_2.6.26" = xmlXPathContextSetCache; diff --git a/libxml2.spec b/libxml2.spec new file mode 100644 index 0000000..70ed1c2 --- /dev/null +++ b/libxml2.spec @@ -0,0 +1,681 @@ +Name: libxml2 +Version: 2.7.8 +Release: alt3.M50P.1 +Epoch: 1 + +Summary: The library for manipulating XML files +License: MIT +Group: System/Libraries +Url: http://xmlsoft.org/ + +%def_disable static +%define srcname libxml2-v2.7.8-7-gfec31bc + +Source: %srcname.tar +Patch: libxml2-%version-%release.patch + +Requires: xml-common + +# Automatically added by buildreq on Thu Oct 07 2010 +BuildRequires: python-devel python-modules-compiler python-modules-xml zlib-devel + +%package devel +Summary: Development environment for building applications manipulating XML files +Group: Development/C +Requires: %name = %epoch:%version-%release +Requires: zlib-devel + +%package devel-static +Summary: Static library for building applications manipulating XML files +Group: Development/C +Requires: %name-devel = %epoch:%version-%release + +%package -n xml-utils +Summary: Various XML utilities +Group: Text tools +Requires: %name = %epoch:%version-%release +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 = %epoch:%version-%release +Provides: libxml2-python = %epoch:%version, python-modules-%name = %epoch:%version +Obsoletes: libxml2-python < %epoch:%version, python-modules-%name < %epoch:%version + +%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 doc +This package contains documentation on the XML C library. + +%prep +%setup -q -n %srcname +%patch -p1 + +%build +export ac_cv_path_WGET=/usr/bin/wget \ + ac_cv_path_XMLLINT=/usr/bin/xmllint \ + ac_cv_path_XSLTPROC=/usr/bin/xsltproc +mkdir -p m4 +%autoreconf +%configure \ + --with-python \ + --with-html-dir=%_docdir \ + --with-html-subdir=%name-%version \ + %{subst_enable static} + +# SMP-incompatible. +make + +%check +make check + +%install +%makeinstall_std + +mv %buildroot%_datadir/aclocal/libxml{,2}.m4 + +%define pkgdocdir %_docdir/%name-%version +install -p -m644 AUTHORS Copyright NEWS README %buildroot%pkgdocdir/ +install -p -m644 doc/*.html %buildroot%pkgdocdir/ + +%files +%_libdir/*.so.* +%dir %pkgdocdir +%pkgdocdir/AUTHORS +%pkgdocdir/Copyright +%pkgdocdir/NEWS +%pkgdocdir/README + +%files -n xml-utils +%_bindir/xmllint +%_bindir/xmlcatalog +%_man1dir/xmllint.* +%_man1dir/xmlcatalog.* + +%files devel +%_bindir/*-config +%_libdir/*.so +%_libdir/*.sh +%_includedir/* +%_libdir/pkgconfig/* +%_datadir/aclocal/* +%_man1dir/*-config* +%_man3dir/* + +%if_enabled static +%files devel-static +%_libdir/*.a +%endif #enabled static + +%files -n python-module-%name +%python_sitelibdir/* +%dir %pkgdocdir +%dir %pkgdocdir/python +%pkgdocdir/python/TODO +%pkgdocdir/python/examples + +%files doc +%dir %pkgdocdir +%pkgdocdir/*.html +%pkgdocdir/*.gif +%pkgdocdir/*.png +%pkgdocdir/*.xml +%pkgdocdir/*.xsl +%pkgdocdir/*.c +%pkgdocdir/*.res +%pkgdocdir/html +%pkgdocdir/examples +%pkgdocdir/tutorial +%doc %_datadir/gtk-doc/html/libxml2/ + +%changelog +* Thu Jan 20 2011 Andrey Cherepanov 1:2.7.8-alt3.M50P.1 +- backport to p5 branch (fixes CVE-2010-4494) + +* Wed Jan 12 2011 Dmitry V. Levin 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 1:2.7.8-alt3 +- Updated to v2.7.8-7-gfec31bc (fixes CVE-2010-4494). + +* Wed Dec 15 2010 Dmitry V. Levin 1:2.7.8-alt2 +- Build without libbfd-devel. + +* Fri Nov 05 2010 Dmitry V. Levin 1:2.7.8-alt1 +- Updated to v2.7.8-1-g0081987. + +* Thu Oct 07 2010 Alexey Tourbin 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) 1:2.7.3-alt2.1 +- Rebuilt with python 2.6 + +* Mon Aug 17 2009 Dmitry V. Levin 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 1:2.7.3-alt1 +- 2.7.2+svn3803 -> 2.7.3 + +* Tue Nov 25 2008 Alexey Tourbin 1:2.7.2-alt2 +- updated to svn revision 3803 (fixes CVE-2008-4225, CVE-2008-4226) + +* Tue Oct 07 2008 Alexey Tourbin 1:2.7.2-alt1 +- 2.6.32 -> 2.7.2 +- made libxml2-doc subpackage noarch + +* Mon Sep 01 2008 Alexey Tourbin 1:2.6.32-alt3 +- upstream update for CVE-2008-3281 to avoid ABI issues + +* Thu Aug 21 2008 Alexey Tourbin 1:2.6.32-alt2 +- applied upstream fix for recursive evaluation of entities (CVE-2008-3281) + +* Tue Apr 22 2008 Alexey Tourbin 1:2.6.32-alt1 +- 2.6.31 -> 2.6.32 + +* Sat Feb 09 2008 Grigory Batalov 1:2.6.31-alt1.1 +- Rebuilt with python-2.5. + +* Mon Jan 14 2008 Alexey Tourbin 1:2.6.31-alt1 +- 2.6.30+svn3661 -> 2.6.31 (fixes CVE-2007-6284) + +* Fri Oct 26 2007 Alexey Tourbin 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 1:2.6.30-alt1 +- 2.6.29+svn3647 -> 2.6.30+svn3659 (20070904) + +* Sun Aug 05 2007 Alexey Tourbin 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 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 1:2.6.28-alt1 +- updated to 2.6.28 release +- linked libxml2mod.so python module with libpython + +* Sun Mar 18 2007 Alexey Tourbin 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 1:2.6.27-alt3 +- updated to svn revision 3586 (20070216) + +* Sun Jan 07 2007 Alexey Tourbin 1:2.6.27-alt2 +- updated to 20061214 cvs snapshot + +* Mon Oct 30 2006 Alexey Tourbin 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 1:2.6.26-alt2 +- Patch2: unescape file URIs for I/O, leave others intact + +* Thu Jun 08 2006 Mikhail Zabaluev 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 1:2.6.24-alt1 +- Release 2.6.24 +- Patch1 went upstream +- Patch2: fix a typo in configure + +* Tue Apr 18 2006 Mikhail Zabaluev 1:2.6.23-alt2 +- Patch1: honor --nonet when --postvalid is given (GNOME bug 337483) + +* Thu Feb 02 2006 ALT QA Team Robot 1:2.6.23-alt1.1 +- Rebuilt for new pkg-config dependencies. + +* Sun Jan 08 2006 Mikhail Zabaluev 1:2.6.23-alt1 +- 2.6.23 + +* Thu Sep 15 2005 Mikhail Zabaluev 1:2.6.22-alt1 +- 2.6.22 +- Added gtk-doc files to the doc package +- buildreq + +* Mon Sep 05 2005 Mikhail Zabaluev 1:2.6.21-alt1 +- New upstream release + +* Tue Jul 12 2005 Mikhail Zabaluev 1:2.6.20-alt1 +- New upstream release + +* Tue Apr 05 2005 Mikhail Zabaluev 1:2.6.19-alt1 +- New upstream release + +* Mon Mar 14 2005 Mikhail Zabaluev 1:2.6.18-alt1 +- New upstream release +- Built with new Python + +* Mon Jan 17 2005 Mikhail Zabaluev 1:2.6.17-alt1 +- New upstream release + +* Thu Dec 16 2004 Mikhail Zabaluev 1:2.6.16-alt2 +- Fixed docs install +- Patch0 considered harmful + +* Thu Nov 11 2004 Mikhail Zabaluev 1:2.6.16-alt1 +- New upstream release + +* Sun Oct 31 2004 Mikhail Zabaluev 1:2.6.15-alt1 +- New upstream release +- Patch1 is obsolete + +* Wed Oct 27 2004 Mikhail Zabaluev 1:2.6.14-alt2 +- Fixes for buffer overflows from SuSE, provided by LDV [Patch1] + +* Fri Oct 01 2004 Mikhail Zabaluev 1:2.6.14-alt1 +- New upstream release + +* Mon Sep 20 2004 Mikhail Zabaluev 1:2.6.13-alt1 +- New upstream release + +* Tue Aug 24 2004 Mikhail Zabaluev 1:2.6.12-alt1 +- New upstream release +- Grouped xml-utils under 'Text tools' + +* Thu Jul 15 2004 Mikhail Zabaluev 1:2.6.11-alt2 +- Python package renamed to comply with the New Policy + +* Thu Jul 08 2004 Mikhail Zabaluev 1:2.6.11-alt1 +- New upstream release + +* Mon Apr 19 2004 Mikhail Zabaluev 1:2.6.9-alt1 +- New upstream release + +* Sun Mar 28 2004 Mikhail Zabaluev 1:2.6.8-alt1 +- New upstream release + +* Tue Feb 24 2004 Mikhail Zabaluev 1:2.6.7-alt1 +- New upstream release + +* Fri Feb 13 2004 Mikhail Zabaluev 1:2.6.6-alt1 +- New upstream release +- Patch1 gone upstream + +* Wed Feb 04 2004 Mikhail Zabaluev 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 1:2.6.5-alt1 +- New upstream release +- Patch1 gone upstream +- Disable check because test target is broken + +* Wed Jan 21 2004 Mikhail Zabaluev 1:2.6.4-alt3 +- Buildreq against Python 2.3 + +* Thu Jan 01 2004 Mikhail Zabaluev 1:2.6.4-alt2 +- Fix XInclude bugs [Patch1] +- buildreq + +* Wed Dec 31 2003 Mikhail Zabaluev 1:2.6.4-alt1 +- New upstream release +- Patch1 gone upstream +- Happy New Year :) + +* Thu Dec 25 2003 Mikhail Zabaluev 1:2.6.3-alt2 +- CVS patch to fix an XInclude problem (GNOME bug #129932) [Patch1] + +* Thu Dec 11 2003 Mikhail Zabaluev 1:2.6.3-alt1 +- New upstream release +- Patch1 is obsolete +- Patch2 gone upstream + +* Thu Dec 11 2003 Mikhail Zabaluev 1:2.6.2-alt3 +- Bugfix from CVS for Gnome Bugzilla bug #126817 [Patch2] + +* Thu Nov 27 2003 Alexey Tourbin 1:2.6.2-alt2 +- Do not package .la files. + +* Mon Nov 10 2003 Mikhail Zabaluev 1:2.6.2-alt1 +- Updated to 2.6.2 +- Make the tests pass [Patch1] + +* Tue Sep 16 2003 Mikhail Zabaluev 1:2.5.11-alt1 +- Upstream release 2.5.11 + +* Mon Aug 18 2003 Mikhail Zabaluev 1:2.5.10-alt1 +- New version +- Eliminated duplication of doc files + +* Sat Jul 12 2003 Mikhail Zabaluev 1:2.5.8-alt1 +- New version + +* Sat Jun 21 2003 Mikhail Zabaluev 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 1:2.5.7-alt1 +- New version + +* Fri Apr 04 2003 Mikhail Zabaluev 1:2.5.6-alt1 +- 2.5.6 + +* Fri Jan 17 2003 Mikhail Zabaluev 1:2.5.1-alt1 +- Updated to 2.5.1 +- Manpage patch gone upstream + +* Fri Dec 13 2002 Dmitry V. Levin 1:2.4.30-alt1 +- Updated to 2.4.30 + +* Thu Dec 05 2002 Dmitry V. Levin 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 1:2.4.28-alt1 +- 2.4.28 +- doc subpackage + +* Thu Nov 21 2002 Dmitry V. Levin 1:2.4.27-alt1 +- 2.4.27 +- Added dependence on xml-common. + +* Sun Nov 03 2002 Mikhail Zabaluev 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 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 1:2.4.24-alt1 +- rollback to 2.4.24: new version is too buggy. + +* Mon Oct 07 2002 Dmitry V. Levin 2.4.25-alt1 +- 2.4.25 +- Fixed doc installation. + +* Thu Sep 12 2002 Mikhail Zabaluev 2.4.24-alt1 +- 2.4.24 + +* Mon Jul 22 2002 Mikhail Zabaluev 2.4.23-alt1 +- 2.4.23 +- Fixed doc installation + +* Sat Jun 08 2002 Mikhail Zabaluev 2.4.22-alt1 +- 2.4.22 + +* Sat May 04 2002 Mikhail Zabaluev 2.4.21-alt1 +- 2.4.21 +- Fixed BuildRequires +- postun_ldconfig + +* Sat Apr 27 2002 Dmitry V. Levin 2.4.20-alt1 +- 2.4.20 + +* Tue Mar 19 2002 Dmitry V. Levin 2.4.18-alt1 +- 2.4.18. +- Repackaged docs. + +* Wed Feb 20 2002 Dmitry V. Levin 2.4.16-alt1 +- 2.4.16. + +* Tue Feb 12 2002 Dmitry V. Levin 2.4.15-alt1 +- 2.4.15. + +* Mon Feb 11 2002 Dmitry V. Levin 2.4.14-alt1 +- 2.4.14. +- Added python subpackage. + +* Wed Jan 16 2002 Dmitry V. Levin 2.4.13-alt1 +- 2.4.13 + +* Tue Nov 27 2001 Dmitry V. Levin 2.4.11-alt1 +- 2.4.11 + +* Mon Nov 12 2001 Dmitry V. Levin 2.4.10-alt1 +- 2.4.10 + +* Tue Nov 06 2001 Dmitry V. Levin 2.4.8-alt1 +- 2.4.8 +- Renamed xmllint subpackage to xml-utils. + +* Mon Nov 05 2001 Dmitry V. Levin 2.4.7-alt1 +- 2.4.7 +- Packaged xmlcatalog. +- Packaged %_libdir/pkgconfig/* files. + +* Fri Oct 12 2001 Dmitry V. Levin 2.4.6-alt1 +- 2.4.6 + +* Mon Sep 24 2001 Dmitry V. Levin 2.4.5-alt1 +- 2.4.5 + +* Thu Sep 13 2001 Dmitry V. Levin 2.4.4-alt1 +- 2.4.4 + +* Mon Aug 27 2001 Dmitry V. Levin 2.4.3-alt1 +- 2.4.3 + +* Fri Aug 17 2001 Dmitry V. Levin 2.4.2-alt2 +- Rebuilt. + +* Thu Aug 16 2001 Dmitry V. Levin 2.4.2-alt1 +- 2.4.2 + +* Thu Jul 26 2001 Dmitry V. Levin 2.4.1-alt1 +- 2.4.1 + +* Wed Jul 11 2001 Dmitry V. Levin 2.4.0-alt1 +- 2.4.0 + +* Thu Jul 05 2001 Dmitry V. Levin 2.3.13-alt1 +- 2.3.13 + +* Mon Jun 18 2001 Dmitry V. Levin 2.3.11-alt1 +- 2.3.11 + +* Mon Jun 04 2001 Dmitry V. Levin 2.3.10-alt1 +- 2.3.10 + +* Tue May 22 2001 Dmitry V. Levin 2.3.9-alt1 +- 2.3.9 +- Moved static library to devel-static subpackage. + +* Sat May 05 2001 Rider 2.3.8-alt1 +- 2.3.8 + +* Tue Mar 27 2001 Dmitry V. Levin 2.3.5-alt1 +- 2.3.5 + +* Sun Mar 11 2001 Dmitry V. Levin 2.3.4-ipl1mdk +- 2.3.4 + +* Sun Mar 04 2001 Dmitry V. Levin 2.3.3-ipl1mdk +- 2.3.3 + +* Mon Feb 26 2001 Dmitry V. Levin 2.3.2-ipl1mdk +- 2.3.2 + +* Sat Feb 17 2001 Dmitry V. Levin 2.3.1-ipl1mdk +- 2.3.1 + +* Sun Feb 11 2001 Dmitry V. Levin 2.3.0-ipl2mdk +- Provides libxml.so.2 for compatibility. + +* Fri Feb 09 2001 Dmitry V. Levin 2.3.0-ipl1mdk +- 2.3.0 +- Removed "Conflicts: libxml-devel" tag from %name-devel package. + +* Sat Jan 27 2001 Dmitry V. Levin 2.2.12-ipl1mdk +- 2.2.12 + +* Sun Jan 07 2001 Dmitry V. Levin 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 +- build for RE + +* Tue Nov 14 2000 Geoffrey Lee 2.2.8-1mdk +- bump up the version. + +* Fri Nov 03 2000 Geoffrey Lee 2.2.7-1mdk +- new and shiny version. + +* Sun Oct 29 2000 Geoffrey Lee 2.2.6-1mdk +- shiny version. + +* Sun Oct 15 2000 Geoffrey Lee 2.2.4-1mdk +- very new and shiny version. + +* Sat Aug 26 2000 Yoann Vandoorselaere 2.2.2-2mdk +- corrected bug reported by + Reinhard Katzmann : + Requires : %name = {PACKAGE_VERSION} + +* Tue Aug 22 2000 Yoann Vandoorselaere 2.2.2-1mdk +- updated to libxml version 2.2.2 + +* Mon Aug 07 2000 Frederic Lepied 1.8.9-3mdk +- automatically added BuildRequires + +* Fri Jul 28 2000 Geoffrey Lee 1.8.9-2mdk +- rebuild + +* Sat Jul 22 2000 Geoffrey Lee 1.8.9-1mdk +- new version +- big move + +* Thu Jul 6 2000 dam's 1.8.8-4mdk +- spec cleanup. + +* Thu Jul 06 2000 Geoffrey Lee 1.8.8-3mdk +- use some macros + +* Tue Jul 4 2000 dam's 1.8.8-2mdk +- moved xml-config to devel package. Thanx to Stefan + +* Tue Jul 4 2000 dam's 1.8.8-1mdk +- updated. +- spec cleanup. + +* Tue Apr 18 2000 Lenny Cartier 1.8.7-1mdk +- fix release tag + +* Sun Apr 16 2000 Daouda Lo 1.8.7-1mdk +- release from helix stuffs. + +* Wed Mar 22 2000 Lenny Cartier 1.8.6-2mdk +- fix group + +* Sun Feb 20 2000 Axalon Bloodstone 1.8.6-1mdk +- 1.8.6 + +* Sun Oct 31 1999 Axalon Bloodstone +- SMP build/check +- 1.7.3 + +* Fri Sep 24 1999 Axalon Bloodstone +- 1.7.1 + +* Thu Jul 22 1999 Chmouel Boudjnah +- 1.4. + +* Wed Jun 30 1999 Chmouel Boudjnah +- 1.2.0. + +* Tue May 11 1999 Bernhard Rosenkränzer +- Mandrake adaptions + +* Thu Mar 04 1999 Michael Fulbright +- version 1.0.0 + +* Fri Feb 12 1999 Michael Fulbright +- version 0.99.5 built against gnome-libs-0.99.8 + +* Wed Feb 03 1999 Michael Fulbright +- version 0.99.5 + +* Wed Jan 06 1999 Michael Fulbright +- made clean section work again + +* Wed Dec 16 1998 Michael Fulbright +- bumped to 0.99.0 for GNOME freeze + +* Sun Oct 4 1998 Daniel Veillard +- Added xml-config to the package + +* Thu Sep 24 1998 Michael Fulbright +- Built release 0.30 diff --git a/libxml2.syms b/libxml2.syms index 5a95175..89b7118 100644 --- a/libxml2.syms +++ b/libxml2.syms @@ -12,6 +12,10 @@ # change the soname # +# Compatibility with older ALT Linux versioning +LIBXML2_2.6.13 {}; +LIBXML2_2.6.26 {}; + LIBXML2_2.4.30 { global: diff --git a/python/Makefile.am b/python/Makefile.am index d2a2253..5106e42 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -9,7 +9,7 @@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/$(subdir) -docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) +docsdir = @HTML_DIR@/python # libxml2class.txt is generated dist_docs_DATA = TODO diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 52c89fc..140c917 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -1,4 +1,4 @@ -exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples +exampledir = @HTML_DIR@/python/examples dist_example_DATA = $(PYTESTS) $(XMLS) PYTESTS= \ diff --git a/testStructuredErrorFunc.c b/testStructuredErrorFunc.c new file mode 100644 index 0000000..645334c --- /dev/null +++ b/testStructuredErrorFunc.c @@ -0,0 +1,69 @@ +#include +#include + +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/xpath.c b/xpath.c index 8b56189..8812969 100644 --- a/xpath.c +++ b/xpath.c @@ -2762,7 +2762,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; }