head 1.9; access; symbols pkgsrc-2026Q1:1.9.0.8 pkgsrc-2026Q1-base:1.9 pkgsrc-2025Q4:1.9.0.6 pkgsrc-2025Q4-base:1.9 pkgsrc-2025Q3:1.9.0.4 pkgsrc-2025Q3-base:1.9 pkgsrc-2025Q2:1.9.0.2 pkgsrc-2025Q2-base:1.9 pkgsrc-2025Q1:1.8.0.8 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.8.0.6 pkgsrc-2024Q4-base:1.8 pkgsrc-2024Q3:1.8.0.4 pkgsrc-2024Q3-base:1.8 pkgsrc-2024Q2:1.8.0.2 pkgsrc-2024Q2-base:1.8 pkgsrc-2024Q1:1.7.0.2 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.6.0.2 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.5.0.6 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.4 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.2 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.4.0.8 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.6 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.4 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.2 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.3.0.4 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.2 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.2.0.14 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.12 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.10 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.8 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.6 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.2 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.4 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.1.0.8 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.6 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.4 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.2; locks; strict; comment @# @; 1.9 date 2025.04.17.21.37.53; author wiz; state Exp; branches; next 1.8; commitid kDWHqUtTen0x2sRF; 1.8 date 2024.06.17.18.48.25; author adam; state Exp; branches; next 1.7; commitid O8f2puSBNrBTRmeF; 1.7 date 2024.01.27.10.06.41; author wiz; state Exp; branches; next 1.6; commitid SCkLSbuXx3l6y4WE; 1.6 date 2023.11.15.15.53.41; author nia; state Exp; branches; next 1.5; commitid FLmBmqAJsJaMOIME; 1.5 date 2023.01.22.10.30.09; author wiz; state Exp; branches; next 1.4; commitid F6dGeuPItJIazwaE; 1.4 date 2022.03.12.07.33.22; author kim; state Exp; branches 1.4.8.1; next 1.3; commitid 3Bqh0LWyc66gKTvD; 1.3 date 2021.07.21.13.55.07; author tnn; state Exp; branches; next 1.2; commitid oEL8PrXDRvRfnR1D; 1.2 date 2019.11.06.13.19.43; author wiz; state Exp; branches; next 1.1; commitid bxtBDjS8kwbBdNJB; 1.1 date 2019.01.09.19.09.03; author adam; state Exp; branches 1.1.2.1; next ; commitid LaGInNPEhzCJO87B; 1.4.8.1 date 2023.03.04.12.54.51; author spz; state Exp; branches; next ; commitid qxQAmZic7GgH3OfE; 1.1.2.1 date 2019.01.09.19.09.03; author bsiegert; state dead; branches; next 1.1.2.2; commitid EEDBDfVeUgPARfcB; 1.1.2.2 date 2019.02.18.14.05.52; author bsiegert; state Exp; branches; next ; commitid EEDBDfVeUgPARfcB; desc @@ 1.9 log @libxml2: update to 2.14.2 v2.14.2: Apr 17 2025 ### Security - [CVE-2025-32415] schemas: Fix heap buffer overflow in xmlSchemaIDCFillNodeTables - [CVE-2025-32414] python: Read at most len/4 characters. (Maks Verver) ### Build - error: Fix initGenericErrorDefaultFunc compatibility macro - meson: don't link with pthreads on Windows (Benjamin Gilbert) - cmake, meson: Align Darwin version info with Autotools - globals: Fix --with-thread-alloc build - meson: ensure relaxng option supports minimum option (Lovell Fuller) v2.14.1: Apr 3 2025 ### Regressions - parser: Fix XML_PARSE_NOBLANKS dropping non-whitespace text ### Build systems - win32-legacy: Fix build (ThomasK) - meson: Fix build from tarball - cmake, meson: Change library filename to libxml2.so.16.0.0 v2.14.0: Mar 27 2025 ### Major changes The HTML tokenizer now conforms fully to HTML5. Several non-standard syntax warnings were removed. Note that HTML5 tree construction isn't implemented yet. Binary compatibility is restricted to versions 2.14 or newer. On ELF systems, the soname was bumped from libxml2.so.2 to libxml2.so.16. The serialization API will now take user-provided or default encodings into account when serializing attribute values, matching the serialization of text and avoiding unnecessary escaping. The XML parser won't try to merge consecutive CDATA sections as before to align with web standards. Each CDATA section will create exactly one node or SAX callback. Support for RELAX NG can now be disabled with a new configuration option independently of XML Schemas support. It is still enabled by default. The "legacy" configuration option won't enable support for HTTP and LZMA anymore. These features will be removed in the next release. Parts of the xmllint executable were refactored, allowing the combination of more options. OOM errors should be reported reliably now. Several improvements were made to the build systems. Meson is fully supported now. Parts of the buffering code were reworked and simplified. Overflow checks before reallocations were hardenend. Some unprefixed symbols were renamed to avoid namespace pollution. ### Other potentially incompatible changes Strings passed to the "characters" callback of the HTML SAX parser aren't null-terminated anymore, matching the behavior of the XML parser. Custom SAX parsers must use the "len" argument. xmlIOParseDTD doesn't allow null bytes at the end of the input anymore. Type and layout of conversion callbacks in struct xmlCharEncodingHandler were changed. Applications using libxml2's encoding conversion API should use functions xmlCharEncInFunc and xmlCharEncOutFunc instead of accessing the callbacks directly. ### New features Input callbacks can now be set on a parser context and an improved API to create parser input is available. The following new functions, taking a parser input object, were added: - xmlCtxtParseDocument - xmlCtxtParseContent as replacement for xmlParseBalancedChunkMemory and xmlParseInNodeContext - xmlCtxtParseDtd The xmlSave API now has additional options to replace global settings. Parser options XML_PARSE_UNZIP, XML_PARSE_NO_SYS_CATALOG and XML_PARSE_CATALOG_PI were added. An API function to install a custom character encoding converter is now available. This makes it possible to use ICU for encoding conversion even if libxml2 was compiled without ICU support, see example/icu.c. ### Deprecations Access to many public struct members is now deprecated. Several accessor functions were added to use instead. More internal functions were deprecated. ### Removals Metadata about the HTML4 content model was removed from the htmlElemDesc struct and related functions were deprecated. The FTP module and related functions were removed. Support for the range and point extensions of the xpointer() scheme was removed. The rest of the XPointer implementation isn't affected. The xpointer() scheme now behaves like the xpath1() scheme. Several legacy symbols and the functions in xmlunicode.h were removed. Some unprefixed, internal macros like ATTRIBUTE_UNUSED were removed from public headers. ELF version information was removed. The shell was moved from libxml2 to xmllint. Several related functions are no longer available. The libxml.m4 file containing autoconf macros was removed. The --with-tree configuration option was removed. The hack to detect single-threaded programs under glibc was removed. ### Planned removals Support for HTTP and LZMA compression is planned to be removed in the 2.15 release. The following features are considered for removal: - Modules API (xmlmodule.h) - Schematron support - Support for zlib compressed file I/O - Legacy Windows build system in win32 RELAX NG support is still in a bad state and a long-term removal candidate. v2.13.7: Mar 27 2025 ### Regressions - tree: Fix xmlTextMerge with NULL args - io: Fix `compressed` flag for uncompressed stdin - parser: Fix parsing of DTD content v2.13.6: Feb 18 2025 ### Security - [CVE-2025-24928] Fix stack-buffer-overflow in xmlSnprintfElements - [CVE-2024-56171] Fix use-after-free after xmlSchemaItemListAdd - pattern: Fix compilation of explicit child axis ### Regressions - xmllint: Support compressed input from stdin - uri: Fix handling of Windows drive letters - reader: Fix return value of xmlTextReaderReadString again - SAX2: Fix xmlSAX2ResolveEntity if systemId is NULL ### Portability - dict: Handle ENOSYS from getentropy gracefully - Fix compilation with uclibc (Dario Binacchi) - python: Declare init func with PyMODINIT_FUNC - tests: Fix sanitizer version check on old Apple clang - cmake: Work around broken sys/random.h in old macOS SDKs ### Build - autotools: Set AC_CONFIG_AUX_DIR - cmake: Always build Python module as shared library - cmake: add missing `Bcrypt` link on Windows (Saleem Abdulrasool) - cmake: Fix compatibility in package version file v2.13.5: Nov 12 2024 ### Regressions - xmlIO: Fix reading from non-regular files like pipes - xmlreader: Fix return value of xmlTextReaderReadString - parser: Fix loading of parameter entities in external DTDs - parser: Fix downstream code that swaps DTDs - parser: Fix detection of duplicate attributes - string: Fix va_copy fallback ### Bug fixes - xpath: Fix parsing of non-ASCII names v2.13.4: Sep 18 2024 ### Regressions - parser: Make unsupported encodings an error in declarations - io: don't set the executable bit when creating files (triallax) - xmlcatalog: Improved fix for #699 - Revert "catalog: Fetch XML catalog before dumping" - io: Add missing calls to xmlInitParser - tree: Restore return value of xmlNodeListGetString with NULL list - parser: Fix error handling after reaching limit - parser: Make xmlParseChunk return an error if parser was stopped ### Bug fixes - python: Fix SAX driver with character streams ### Improvements - xpath: Make recursion check work with xmlXPathCompile - parser: Report at least one fatal error ### Portability - include: Check whether _MSC_VER is defined v2.13.3: Jul 24 2024 ### Security - [CVE-2024-40896] Fix XXE protection in downstream code ### Regressions - autotools: Use AC_CHECK_DECL to check for getentropy - xinclude: Fix fallback for text includes - io: Don't call getcwd in xmlParserGetDirectory - io: Fix return value of xmlFileRead - parser: Fix error return of xmlParseBalancedChunkMemory ### Improvements - xinclude: Set error handler when parsing text - Undeprecate xmlKeepBlanksDefault v2.13.2: Jul 4 2024 ### Regressions - tree: Fix handling of empty strings in xmlNodeParseContent - valid: Restore ID lookup - parser: Reenable ctxt->directory - uri: Handle filesystem paths in xmlBuildRelativeURISafe - encoding: Make xmlFindCharEncodingHandler return UTF-8 handler - encoding: Fix encoding lookup with xmlOpenCharEncodingHandler - include: Define ATTRIBUTE_UNUSED for clang - uri: Fix xmlBuildURI with NULL base ### Improvements - uri: Enable Windows paths on Cygwin - tests: Clarify licence of test/intsubset2.xml v2.13.1: Jun 19 2024 ### Regressions - parser: Selectively reenable reading from "-" - reader: Fix xmlTextReaderReadString - xinclude: Set XPath context doc - xinclude: Load included documents with XML_PARSE_DTDLOAD - include: Don't redefine ATTRIBUTE_UNUSED - include: Readd circular dependency between tree.h and parser.h - xinclude: Add missing include (Jan Alexander Steffens (heftig)) - win32, msvc: fix missing linking against Bcrypt.lib (Miklos Vajna) - xinclude: Don't raise error on empty nodeset - parser: Make failure to load main document a warning - tree: Fix freeing entities via xmlFreeNode - parser: Pass global object to sax->setDocumentLocator ### Improvements - io: Fix resetting xmlParserInputBufferCreateFilename hook ### Documentation - Fix typo in NEWS (--with-html -> --with-http) (Ryan Carsten Schmidt) - doc: Don't mention xmlNewInputURL v2.13.0: Jun 12 2024 ### Major changes Most of the core code should now report malloc failures reliably. Some API functions were extended with versions that report malloc failures. New API functions for error handling were added: - xmlCtxtSetErrorHandler - xmlXPathSetErrorHandler - xmlXIncludeSetErrorHandler This makes it possible to register per-context error handlers without resorting to global handlers. A few error messages were improved and consolidated. Please update downstream test suites accordingly. A new parser option XML_PARSE_NO_XXE can be used to disable loading of external entities or DTDs. This is most useful in connection with XML_PARSE_NOENT. Support for HTTP POST was removed. Support for zlib, liblzma and HTTP is now disabled by default and has to be enabled by passing --with-zlib, --with-lzma or --with-http to configure. In legacy mode (--with-legacy) these options are enabled by default as before. Support for FTP will be removed in the next release. Support for the range and point extensions of the xpointer() scheme will be removed in the next release. The rest of the XPointer implementation won't be affected. The xpointer() scheme will behave like the xpath1() scheme. Several more legacy symbols were deprecated. Users of the old "SAX1" API functions are encouraged to upgrade to the new "SAX2" API, available since version 2.6.0 from 2003. Some deprecated global variables were made const: - htmlDefaultSAXHandler - oldXMLWDcompatibility - xmlDefaultSAXHandler - xmlDefaultSAXLocator - xmlParserDebugEntities ### Deprecations and removals - threads: Deprecate remaining ThrDef functions - unicode: Deprecate most xmlUCSIs* functions - memory: Remove memory debugging - tree: Deprecate xmlRegisterNodeDefault - tree: Deprecate xmlSetCompressMode - html: Deprecate htmlHandleOmittedElem - valid: Deprecate internal validation functions - valid: Deprecate old DTD serialization API - nanohttp: Deprecate public API - Remove VMS support - Remove Trio ### Bug fixes - parser: Fix base URI of internal parameter entities - tree: Handle predefined entities in xmlBufGetEntityRefContent - schemas: Allow unlimited length decimals, integers etc. (Tomáš Ženčák) - reader: Fix preservation of attributes - parser: Always decode entities in namespace URIs - relaxng: Fix tree corruption in xmlRelaxNGParseNameClass (Seiya Nakata) - schemas: Fix ADD_ANNOTATION - tree: Fix tree iteration in xmlDOMWrapRemoveNode - tree: Declare namespace on clone in xmlDOMWrapCloneNode - tree: Fix xmlAddSibling with last sibling - tree: Fix xmlDocSetRootElement with multiple top-level elements - catalog: Fetch XML catalog before dumping - html: Don't close fd in htmlCtxtReadFd ### Improvements - parser: Fix "Truncated multi-byte sequence" error - Add missing _cplusplus processing clause (Sadaf Ebrahimi) - parser: Rework handling of undeclared entities - SAX2: Warn if URI resolution failed - parser: Don't report error on invalid URI - xmllint: Clean up option handling - xmllint: Rework parsing - parser: Don't create undeclared entity refs in substitution mode - Make some globals const - reader: Make xmlTextReaderReadString non-recursive - reader: Rework xmlTextReaderRead{Inner,Outer}Xml - Remove redundant size check (Niels Dossche) - Remove redundant NULL check on cur (Niels Dossche) - Remove always-false check old == cur (Niels Dossche) - Remove redundant NULL check on cur (Niels Dossche) - tree: Don't return empty localname in xmlSplitQName{2,3} - xinclude: Don't try to fix base of non-elements - tree: Don't coalesce text nodes in xmlAdd{Prev,Next}Sibling - SAX2: Optimize appending children - tree: Align xmlAddChild with other node insertion functions - html: Use binary search in htmlEntityValueLookup - io: Allocate output buffer with XML_BUFFER_ALLOC_IO - encoding: Don't shrink input too early in xmlCharEncOutput - tree: Tighten source doc check in xmlDOMWrapAdoptNode - tree: Check destParent->doc in xmlDOMWrapCloneNode - tree: Refactor text node updates - tree: Refactor node insertion - tree: Refactor element creation and parsing of attribute values - tree: Simplify xmlNodeGetContent, xmlBufGetNodeContent - buf: Don't use default buffer size for small strings - string: Fix xmlStrncatNew(NULL, "") - entities: Don't allow null name in xmlNewEntity - html: Fix quadratic behavior in htmlNodeDump - tree: Rewrite xmlSetTreeDoc - valid: Rework xmlAddID - tree: Remove unused node types - tree: Make namespace comparison more consistent - tree: Don't allow NULL name in xmlSetNsProp - tree: Rework xmlNodeListGetString - tree: Rework xmlTextMerge - tree: Rework xmlNodeSetName - tree: Simplify xmlAddChild with text parent - tree: Disallow setting content of entity reference nodes - tree: Rework xmlReconciliateNs - schemas: fix spurious warning about truncated snprintf output (Benjamin Gilbert) - xmlschemastypes: Remove unreachable if statement (Maks Mishin) - relaxng: Remove useless if statement (Maks Mishin) - tree: Check for integer overflow in xmlStringGetNodeList - http: Improve error message for HTTPS redirects - catalog: Remove Windows hack - save: Move DTD serialization code to xmlsave.c - parser: Report fatal error if document entity couldn't be loaded - xpath: Fix return of empty node-set in xmlXPathNodeCollectAndTest - SAX2: Limit entity URI length to 2000 bytes - parser: Account for full size of non-well-formed entities - parser: Pop inputs if parsing DTD failed - parser: Fix quadratic behavior when copying entities - writer: Implement xmlTextWriterClose - parser: Avoid duplicate namespace errors - parser: Add XML_PARSE_NO_XXE parser option - parser: Make xmlParseContent more useful - error: Make xmlFormatError public - encoding: Check whether encoding handlers support input/output - SAX2: Enforce size limit in xmlSAX2Text with XML_PARSE_HUGE - parser: Lower maximum entity nesting depth - parser: Set depth limit to 2048 with XML_PARSE_HUGE - parser: Implement xmlCtxtSetOptions - parser: Always prefer option members over bitmask - parser: Don't modify SAX2 handler if XML_PARSE_SAX1 is set - parser: Rework parsing of attribute and entity values - save: Output U+FFFD replacement characters - parser: Simplify entity size accounting - parser: Avoid unwanted expansion of parameter entities - parser: Always copy content from entity to target - parser: Simplify control flow in xmlParseReference - parser: Remove xmlSetEntityReferenceFunc feature - parser: Push general entity input streams on the stack - parser: Move progressive flag into input struct - parser: Fix in-parameter-entity and in-external-dtd checks - xpath: Rewrite substring-before and substring-after - xinclude: Only set xml:base if necessary - xinclude: Allow empty nodesets - parser: Rework general entity parsing - io: Fix close error handling - io: Fix read/write error handling - io: More refactoring and unescaping fixes - io: Move some code from xmlIO.c to parserInternals.c - uri: Clean up special parsing modes - xinclude: Rework xml:base fixup - parser: Also set document properties when push parsing - include: Move non-generated parts from xmlversion.h.in - io: Remove support for HTTP POST - dict: Move local RNG state to global state - dict: Get random seed from system PRNG - io: Don't use "-" to read from stdin - io: Rework initialization - io: Consolidate error messages - xzlib: Fix harmless unsigned integer overflow - io: Always use unbuffered input - io: Fix detection of compressed streams - io: Pass error codes from xmlFileOpenReal to xmlNewInputFromFile - io: Rework default callbacks - error: Stop printing some errors by default - xpath: Don't free nodes of XSLT result value trees - valid: Fix handling of enumerations - parser: Allow recovery in xmlParseInNodeContext - encoding: Support ASCII in xmlLookupCharEncodingHandler - include: Remove useless 'const' from function arguments - Avoid EDG -Wignored-qualifiers warnings on wrong 'const *' to '* const' conversions (makise-homura) - Avoid EDG deprecation warnings for LCC compiler (makise-homura) - Avoid EDG -Woverflow warnings on truncating conversions by manually truncating operand (makise-homura) - Avoid EDG -Wtype-limits warnings on unsigned comparisons with zero by conversion from unsigned int to int (makise-homura) - Avoid using no_sanitize attribute on EDG even if compiler shows as GCC (makise-homura) ### Build systems - meson: convert boolean options to feature option (Rosen Penev) - meson: Pass LIBXML_STATIC in dependency (Andrew Potter) - meson: fix compilation with local binaries (Rosen Penev) - meson: don't use dl dependency on old meson (Rosen Penev) - meson: fix usage as a subproject (Rosen Penev) - autotools: Fix pthread detection on FreeBSD - build: Remove --with-fexceptions configuration option - autotools: Remove --with-coverage configuration option - build: Disable HTTP support by default - Stop defining _REENTRANT - doc: Don't install example code - meson: Initial commit (Vincent Torri) - build: Disable support for compression libraries by default - Set LIBXML2_FOUND if it has been properly configured (Michele Bianchi) - Makefile.am: omit $(top_builddir) from DEPS and LDADDS (Mike Dalessio) ### Test suite - runtest: Work around broken EUC-JP support in musl iconv - runtest: Check for IBM-1141 encoding handler - fuzz: Add xmllint fuzzer - fuzz: Add fuzzer for XML reader API - fuzz: New tree API fuzzer - tests: Remove testOOM - Don't let gentest.py cast types to 'const somethingPtr' to avoid -Wignored-qualifiers (makise-homura) @ text @$NetBSD: patch-configure,v 1.8 2024/06/17 18:48:25 adam Exp $ Add run-path to XML_LIBDIR. --- configure.orig 2025-04-17 11:32:34.000000000 +0000 +++ configure @@@@ -13729,7 +13729,7 @@@@ else fi fi -XML_LIBDIR='-L${libdir}' +XML_LIBDIR='@@COMPILER_RPATH_FLAG@@${libdir} -L${libdir}' XML_INCLUDEDIR='-I${includedir}/libxml2' XML_CFLAGS="" XML_STATIC_CFLAGS="" @ 1.8 log @libxml2 py-libxml2: updated to 2.12.8 v2.12.8: Jun 12 2024 Regressions - parser: Fix performance regression when parsing namespaces v2.12.7: May 13 2024 Security - [CVE-2024-34459] Fix buffer overread with `xmllint --htmlout` Regressions - xmllint: Fix --pedantic option - save: Handle invalid parent pointers in xhtmlNodeDumpOutput v2.12.6: Mar 15 2024 Regressions - parser: Fix detection of duplicate attributes in XML namespace - xmlreader: Fix xmlTextReaderConstEncoding - html: Fix htmlCreatePushParserCtxt with encoding - xmllint: Return error code if XPath returns empty nodeset v2.12.5: Feb 4 2024 Security - [CVE-2024-25062] xmlreader: Don't expand XIncludes when backtracking Regressions - parser: Fix crash in xmlParseInNodeContext with HTML documents @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.7 2024/01/27 10:06:41 wiz Exp $ d5 1 a5 1 --- configure.orig 2024-01-15 15:53:40.000000000 +0000 d7 1 a7 1 @@@@ -14249,7 +14249,7 @@@@ rm -f core conftest.err conftest.$ac_obj d15 1 a15 1 @ 1.7 log @*libxml2: update to 2.12.4 v2.12.4: Jan 15 2024 ### Regressions - parser: Fix regression parsing standalone declarations - autotools: Readd --with-xptr-locs configuration option - parser: Fix build --without-output - parser: Don't grow or shrink pull parser memory buffers - io: Fix memory lifetime issue with input buffers v2.12.3: Dec 12 2023 ### Regressions - parser: Fix namespaces redefined from default attributes ### Build fixes - include: Rename XML_EMPTY helper macro - include: Move declaration of xmlInitGlobals - include: Add missing includes - include: Move globals from xmlsave.h to parser.h - include: Readd circular dependency between tree.h and parser.h v2.12.2: Dec 5 2023 ### Regressions - parser: Fix invalid free in xmlParseBalancedChunkMemoryRecover - globals: Disable TLS in static Windows builds - html: Reenable buggy detection of XML declarations - tree: Fix regression when copying DTDs - parser: Make CRLF increment line number ### Build fixes - build: Disable compiler TLS by default - cmake: Update config.h.cmake.in - tests: Fix tests --with-valid --without-xinclude v2.12.1: Nov 23 2023 ### Regressions - hash: Fix deletion of entries during scan - parser: Only enable SAX2 if there are SAX2 element handlers ### Build fixes - autotools: Stop checking for snprintf - dict: Fix '__thread' before 'static' - fix: pthread weak references in globals.c (Mike Dalessio) - tests: Fix build with older MSVC v2.12.0: Nov 16 2023 ### Major changes Most of the known issues leading to quadratic behavior in the XML parser were fixed. Internal hash tables were rewritten to reduce memory consumption. Starting with this release, it should be enough to add the --with-legacy configuration option to provide maximum ABI compatibility. For example, if a code module was removed from the default configuration, the option will add stubs for the removed symbols. libxml2 will now store global variables in thread-local storage if supported by the compiler. This avoids allocating the data lazily which can result in a fatal error condition. A new API function xmlCheckThreadLocalStorage was added so the allocation can be checked earlier if compiler TLS is not supported. To prepare for future improvements, some API functions now expect or return a const xmlError struct. Several cyclic dependencies in public header files were fixed. As a result, certain headers won't include other headers as before. Refactoring of the encoding code has been mostly completed. Calling xmlSwitchEncoding from client code is now fully supported, for example to override the encoding for the push parser. When parsing data from memory, libxml2 will now stream data chunk by chunk instead of copying the whole buffer (possibly twice with encodings), reducing peak memory consumption considerably. A new API function xmlCtxtSetMaxAmplification was added to allow parsing of files that would otherwise trigger the billion laughs protection. Several bugs in the regex determinism checks were fixed. Invalid XML Schemas which previous versions erroneously accepted will now be rejected. ### Deprecations - globals: Deprecate xmlLastError - parser: Deprecate global parser options - win32: Deprecate old Windows build system ### Bug fixes - parser: Stop switching to ISO-8859-1 on encoding errors - parser: Support encoded external PEs in entity values - string: Fix UTF-8 validation in xmlGetUTF8Char - SAX2: Allow multiple top-level elements - parser: Update line number after coalescing text nodes - parser: Check for truncated multi-byte sequences ### Improvements - error: Make more xmlError structs constant - parser: Remove redundant IS_CHAR check in xmlCurrentChar - parser: Fix stack handling in xmlParseTryOrFinish - parser: Protect against quadratic default attribute expansion - parser: Missing checks for disableSAX - entities: Make xmlFreeEntity public - examples: Don't use sprintf - encoding: Suppress -Wcast-align warnings - parser: Use hash tables to avoid quadratic behavior - parser: Don't skip CR in xmlCurrentChar - dict: Rewrite dictionary hash table code - hash: Rewrite hash table code - malloc-fail: Report malloc failure in xmlFARegExec - malloc-fail: Report malloc failure in xmlRegEpxFromParse - parser: Simplify xmlStringCurrentChar - regexp: Fix status codes and handle invalid UTF-8 - error: Make xmlGetLastError return a const error - html: Fix logic in htmlAutoClose - globals: Move globals back to correct header files - globals: Use thread-local storage if available - globals: Rework global state destruction on Windows - globals: Define globals using macros - globals: Introduce xmlCheckThreadLocalStorage - globals: Make xmlGlobalState private - threads: Move library initialization code to threads.c - debug: Remove debugging code - globals: Move code from threads.c to globals.c - parser: Avoid undefined behavior in xmlParseStartTag2 - schemas: Fix memory leak of annotations in notations - dict: Update hash function - dict: Use thread-local storage for PRNG state - dict: Use xoroshiro64** as PRNG - xmllint: Fix error messages - parser: Fix detection of null bytes - parser: Improve error handling in push parser - parser: Don't check inputNr in xmlParseTryOrFinish - parser: Remove push parser debugging code - tree: Fix copying of DTDs - legacy: Add stubs for disabled modules - parser: Allow to set maximum amplification factor - entities: Don't change doc when encoding entities - parser: Never use UTF-8 encoding handler - encoding: Remove debugging code - malloc-fail: Fix unsigned integer overflow in xmlTextReaderPushData - html: Remove encoding hack in htmlCreateFileParserCtxt - parser: Decode all data in xmlCharEncInput - parser: Stream data when reading from memory - parser: Optimize xmlLoadEntityContent - parser: Don't overwrite EOF parser state - parser: Simplify input pointer updates - parser: Don't reinitialize parser input members - encoding: Move rawconsumed accounting to xmlCharEncInput - parser: Rework encoding detection - parser: Always create UTF-8 in xmlParseReference - html: Remove some debugging code in htmlParseTryOrFinish - malloc-fail: Fix memory leak in xmlCompileAttributeTest - parser: Recover more input from encoding errors - malloc-fail: Handle malloc failures in xmlAddEncodingAlias - malloc-fail: Fix null-deref with xmllint --copy - xpath: Ignore entity ref nodes when computing node hash - malloc-fail: Fix null deref after xmlXIncludeNewRef - SAX: Always validate xml:ids - Stop using sprintf - Fix compiler warning on GCC < 8 - regexp: Fix determinism checks - regexp: Fix checks for eliminated transitions - regexp: Simplify xmlFAReduceEpsilonTransitions - regexp: Fix cycle check in xmlFAReduceEpsilonTransitions - schemas: Fix filename in xmlSchemaValidateFile - schemas: Fix line numbers in streaming validation - writer: Add error check in xmlTextWriterEndDocument - encoding: Stop calling xmlEncodingErr - xmlIO: Remove some calls to xmlIOErr - parser: Improve handling of encoding and IO errors - parser: Move xmlFatalErr to parserInternals.c - encoding: Rework error codes - .gitignore: Split up and rearrange .gitignore files - .gitignore: Add runsuite.log - Stop calling xmlMemoryDump - examples: Don't call xmlCleanupParser and xmlMemoryDump - xpath: Remove remaining references to valueFrame ### Portability - python: Make it compatible with python3.12 (Daniel Garcia Moreno) ### Build systems - cmake: Check whether static linking dependencies found in config files (James Le Cuirot) - autotools: Make --with-minimum disable lzma support - build: Remove some GCC warnings - Handle NOCONFIG case when setting locations from CMake target properties (Markus Rickert) - cmake: Generate better pkg-config file for SYSROOT builds under CMake (James Le Cuirot) - autoconf: Include non-pkg-config dependency flags in the pkg-config file (James Le Cuirot) - autoconf: Don't bake build time CFLAGS into pkg-config file (James Le Cuirot) - build: Generate better pkg-config files for static-only builds (James Le Cuirot) - build: Generate better pkg-config file for SYSROOT builds (James Le Cuirot) - autoconf: Allow custom --with-icu configure option ### Tests - tests: Also test xmlNextChar in testchar.c - tests: Start with testparser.c for extra tests - fuzz: Raise rss_limit_mb - fuzz: Test xmlTextReaderRead after EOF or failure - fuzz: Test XML_PARSE_XINCLUDE | XML_PARSE_VALID - tests: Handle entities in SAX tests - fuzz: Disable XML_PARSE_SAX1 option in xml fuzzer - tests: Add more tests for redefined attributes - hash: Add hash table tests - tests: Add ATTRIBUTE_NO_SANITIZE_INTEGER macro - fuzz: Allow to fuzz without push, reader or output modules - gitlab-ci: Add a "medium" config build - python: Fix tests on MinGW - test: Add push parser test with overridden encoding - testapi: test_xmlSAXDefaultVersion() leaves xmlSAX2DefaultVersionValue set to 1 with LIBXML_SAX1_ENABLED (David Kilzer) - gitlab-ci: Lower _XOPEN_SOURCE value - testapi: Don't set http_proxy environment variable - test: Add push parser tests for split UTF-8 sequences - xinclude: Lower initial table size when fuzzing - tests: Test streaming schema validation - runtest: Skip element name in schema error messages ### Documentation - doc: Add notes about runtest to MAINTAINERS.md - doc: Don't document internal macros in xmlversion.h - doc: Allow 'unsigned' without 'int' - doc: Improve documentation of configuration options v2.11.6: Nov 16 2023 ### Regressions - threads: Fix --with-thread-alloc - xinclude: Fix 'last' pointer in xmlXIncludeCopyNode ### Bug fixes - parser: Fix potential use-after-free in xmlParseCharDataInternal v2.11.5: Aug 9 2023 ### Regressions - parser: Make xmlSwitchEncoding always skip the BOM - autotools: Improve iconv check ### Bug fixes - valid: Fix c1->parent pointer in xmlCopyDocElementContent - encoding: Always call ucnv_convertEx with flush set to false ### Portability - autotools: fix Python module file ext for cygwin/msys2 (Christoph Reiter) ### Tests - runtest: Fix compilation without LIBXML_HTML_ENABLED v2.11.4: May 18 2023 Fixes a serious regression. - parser: Fix regression when push parsing UTF-8 sequences v2.11.3: May 11 2023 Fixes more regressions. - xinclude: Fix false positives in inclusion loop detection - autotools: Fix ICU detection - parser: Fix "huge input lookup" error with push parser - xpath: Fix build without LIBXML_XPATH_ENABLED - hash: Fix possible startup crash with old libxslt versions - autoconf: fix iconv library paths (Mike Dalessio) v2.11.2: May 5 2023 Fix regressions. - threads: Fix startup crash with weak symbol hack - win32: Don't depend on removed .def file - schemas: Fix memory leak in xmlSchemaValidateStream v2.11.1: Apr 30 2023 Fixes build and ABI issues. - cmake: Fix va_copy detection (Luca Niccoli) - libxml.m4: Fix quoting - Link with --undefined-version - libxml2.syms: Revert removal of version information v2.11.0: Apr 28 2023 ### Major changes Protection against entity expansion attacks, also known as "billion laughs" has been greatly improved. Malicious files should be detected reliably now and false positives should be reduced. It is possible though that large documents which make heavy use of entities are rejected now. This release finally fixes symbol visibility on UNIX systems. Internal symbols will now be hidden. While these symbols were never declared in public headers, it was still possible to declare them manually. Now this won't work. All symbol information has been removed from the ELF version script to fix link errors with --no-undefined-version. The version nodes are kept so it should still be possible to run binaries linked against older versions. About 90 memory errors in code paths handling malloc failures have been fixed. While these issues shouldn't impact security, this improves robustness under memory pressure. The XInclude engine has been reworked to properly support nested includes. Several cases of quadratic behavior in the XML push parser have been fixed. Refactoring has begun on some buffering and encoding code with the goal of simplifying this part of the code base and improving error reporting. Other highlights: - Consolidated private header files. - Major rework of the autoconf build. - Deprecated several outdated and internal functions. Special thanks to Google's Open Source Security Subsidies program for sponsoring much of the work on this release! Ongoing work on libxml2 relies on funding. For a list of important open issues see ### Security - Fix use-after-free in xmlParseContentInternal() (David Kilzer) - xmllint: Fix use-after-free with --maxmem - parser: Fix OOB read when formatting error message - entities: Rework entity amplification checks ### Regressions - parser: Fix regression in xmlParserNodeInfo accounting ### Bug fixes - Fix memory errors in code handling malloc failures - encoding: Fix error code in asciiToUTF8 - xpath: number('-') should return NaN - xmlParseStartTag2() contains typo when checking for default definitions for an attribute in a namespace (David Kilzer) - uri: Fix handling of port numbers - error: Make sure that error messages are valid UTF-8 - xinclude: Fix nested includes ### Improvements - xmllint: Validate --maxmem integer option - xmlValidatePopElement() can return invalid value (-1) (David Kilzer) - parser: Rework EBCDIC code page detection - parser: Limit name length in xmlParseEncName - parser: Rework shrinking of input buffers - html: Rely on CUR_CHAR to grow the input buffer - parser: Rely on CUR_CHAR/NEXT to grow the input buffer - valid: Make xmlValidateElement non-recursive - html: Fix quadratic behavior in htmlParseTryOrFinish - xmllint: Fix memory leak with --pattern --stream - parser: Stop calling xmlParserInputShrink - html: Impose some length limits - valid: Allow xmlFreeValidCtxt(NULL) - parser: Stop calling xmlParserInputGrow - xinclude: Fix quadratic behavior in xmlXIncludeLoadTxt - xinclude: Abort immediately if max depth was exceeded - xpath: Only report the first error - error: Don't move past current position - error: Limit number of parser errors - parser: Lower entity nesting limit with XML_PARSE_HUGE - parser: Don't increase depth twice when parsing internal entities - parser: Improve detection of entity loops - parser: Only report a single entity error - libxml.h: Remove dubious definition of LIBXML_STATIC - html: Improve parsing of nested lists - memory: Don't use locks in xmlMemUsed - encoding: Remove unused variable xmlDefaultCharEncodingHandler - Rework initialization code - Add .editorconfig - parser: Merge misc, prolog and epilog cases in push parser - parser: Fix 'consumed' accounting when switching encodings - html: Fix check for end of comment in push parser - parser: Fix push parser with 1-3 byte initial chunk - parser: Rewrite push parser boundary checks - reader: Switch to xmlParserInputBufferCreateMem - html: Don't escape ASCII chars in href attributes - io: Don't shrink memory input buffers - parser: Don't call xmlSHRINK from push parser - parser: Ignore cdata argument in xmlParseCharData - parser: Rework push parser parser progress checks - io: Fix a few integer overflows in I/O statistics - io: Rework xmlParserInputBufferGrow with encodings - io: Remove xmlInputReadCallbackNop - io: Check for memory buffer early in xmlParserInputGrow - parser: Fix error message in xmlParseCommentComplex - Bypass proxy in nanoHTTP for hosts in "no_proxy" (Markus Jörg) - schemas: Fix infinite loop in xmlSchemaCheckElemSubstGroup - threads: Remove check for pthread_equal - xinclude: Rework XInclude cache - xinclude: Remove inefficient refcounting scheme - xmllint: Improve handling of empty XPath node sets - parser: Fix potential memory leak in xmlParseAttValueInternal - error: Don't use initGenericErrorDefaultFunc - xpath: Lower XPath recursion limit on Windows - Stop including sys/types.h - Don't define WIN32 macro - Make xmlNewSAXParserCtx take a const sax handler - Consolidate private header files - Remove internal macros from parserInternals.h - Move some HTML functions to correct header file - xmllint: Stop calling xmlSAXDefaultVersion - Introduce xmlNewSAXParserCtxt and htmlNewSAXParserCtxt - Don't mess with parser options in htmlParseDocument - Remove useless call to htmlDefaultSAXHandlerInit - Remove htmlDefaultSAXHandler from non-SAX1 build - Don't initialize SAX handler in htmlReadMemory - Fix htmlReadMemory mixing up XML and HTML functions - Don't use default SAX handler to report unrelated errors - Create stream with buffer in xmlNewStringInputStream - xmlcatalog: Fix memory leaks ### Code quality - xzlib: Fix implicit sign change in xz_open - parser: Simplify calculation of available buffer space - parser: Use size_t when subtracting input buffer pointers - parser: Check for integer overflow when updating checkIndex - xpath: Fix harmless integer overflow in xmlXPathTranslateFunction - schematron: Use logical and - relaxng: Remove useless if statement - schemas: Remove useless if statement - pattern: Merge identical branches - regexp: Add sanity check in xmlRegCalloc2 - regexp: Simplify xmlRegAtomPush - encoding: Cast toupper argument to unsigned char - uri: Add explicit cast in xmlSaveUri - buf: Fix return value of xmlBufGetInputBase - parser: Fix integer overflow of input ID - parser: Remove useless ent->etype test in xmlParseReference - parser: Remove useless ent->children tests in xmlParseReference - xmlmemory.c: Remove xmlMemContentShow - libxml.h: Add comments and indentation - libxml.h: Don't include stdio.h - xmlexports.h: Disable docs for internal macro XMLPUBLIC - parser: Simplify xmlParseConditionalSections - io: Rearrange code in xmlSwitchInputEncodingInt - warnings: Fix -Wstrict-prototypes warning - warnings: Remove set-but-unused variables - Fix compiler warnings in SAX2.c - Fix unused variable warning in python/types.c - Fix compiler warning in examples - Fix compiler warnings in fuzzing code - Remove unused code in nanohttp.c - Remove or annotate char casts - Don't use sizeof(xmlChar) or sizeof(char) - Remove explicit integer casts ### Deprecations - parser: Deprecate more internal functions - parser: Deprecate some parser input functions - parser: Deprecate xmlString*DecodeEntities - threads: Deprecate some internal functions - buf: Deprecate static/immutable buffers - Deprecate internal parser functions - Deprecate old HTML SAX API - Generate deprecation warnings for old SAX API - Mark more functions setting globals as deprecated - Mark more parser functions as deprecated - Mark most SAX1 functions as deprecated - Deprecate some global variables ### Portability - autoconf: Warn about outdated C compilers - win32: Remove broken libxml2.def.src - Remove symbols from version script - catalog.c: Silence a cast warning on VS 2022 (Lukáš Tyrychtr) - libxml.h: Remove ancient LynxOS setup - Use python3 not python (Ross Burton) - xstc/fixup-tests.py: port to Python 3 (Ross Burton) - xstc/fixup-tests.py: unify whitespace (Ross Burton) - Remove hacky heuristic from b2dc5675 (Alex Richardson) - Avoid creating an out-of-bounds pointer by rewriting a check (Alex Richardson) - Hide internal functions - Correctly relocate internal pointers after realloc() (Alex Richardson) - Visual Studio builds: Allow silencing deprecation warnings (Chun-wei Fan) - Visual Studio: Define XML_DEPRECATED (Chun-wei Fan) - xmllint: Include on Windows - warnings: Work around MSVC bug - sources: Silence C4013 warnings on Visual Studio (Chun-wei Fan) - python/setup.py.in: Improve Windows import patching (Chun-wei Fan) - python: Create .pyd on Windows - Fix Python build on Windows - Fix Windows compiler warnings in python/types.c - Fix libxml_PyFileGet - Remove BeOS support - Fix libxml_PyFileGet with stdout on macOS - Migrate from PyEval_ to PyObject_ - Port build_glob.py to Python 3 - Port genChRanges.py to Python 3 - xmlexports.h: Remove LIBXML_FASTCALL optimization - Remove XMLCALL and XMLCDECL macros from public headers - Remove XMLDECL macro from .c files ### Build systems - cmake: Link against `dl` and `dld` only when `LIBXML2_WITH_MODULES` is enabled (Alexander Kutelev) - autotools: Fix make distcheck - Remove RPM build, Makefile.tests, README.tests - libxml.m4: deprecate AM_PATH_XML2, wrap PKG_CHECK_MODULES instead (Ross Burton) - libxml.m4: fix -Wstrict-prototypes (Sam James) - cmake: Build static library with -DLIBXML_STATIC - autotools: Don't use version script on Windows - autotools: Fix winsock detection - autotools: Only add network libraries if HTTP/FTP enabled - autotools: Disable parallel Python build - python: Don't output missing generators during build - build: Remove check for broken ss_family - http: Simplify IPv6 checks - autotools: Fix network checks on Windows - Fix detection of GNU libiconv - cmake: Fix Python installation - cmake: Don't check for Python 2 - configure.ac: Also check for MSYS host - Improve network library detection - Detect ws2_32 with AC_SEARCH_LIBS - Rework network configure checks - Remove arg cast configure checks - Fix dlopen check - Remove HAVE_WIN32_THREADS configuration flag - Rework dlopen and pthread detection - Fix test in configure.ac - cmake: Enable GCC compiler warnings - Always link with -no-undefined - Use AM_CFLAGS and AM_LDFLAGS consistently - Remove -Wredundant-decls - Call AC_CHECK_* with multiple arguments - configure.ac: Remove checks for unused programs - Rework library detection in configure.ac - Rearrange configure.ac - Consolidate zlib and lzma detection - Remove "runtime debugging" - Consolidate simple API modules in configure.ac - Fix dependency resolution in configure.ac - Fix --with-valid --without-regexps build - Fix --with-schemas --without-xpath build - Don't build unneeded .c source files - Move xmlIsXHTML to tree.c - Cleanup distribution settings in Makefile.am - Also clean *.pyc files for Python 2 - Don't distribute libxml2.spec ### Tests - testchar: Add test for memory pull parser with encoding - fuzz: Also test init function of URI fuzzer - fuzz: Separate fuzzer for DTD validation - gitlab-ci: Enable all "integer" sanitizers - fuzz: Inject random malloc failures - fuzz: Support variable integer sizes in fuzz data - fuzz: Fix duplicate detection in fuzzEntityRecorder - fuzz: Set filename in xmlFuzzEntityLoader - fuzz: Allow xmlFuzzReadString(NULL) - fuzz: Fix Makefile dependencies - fuzz: Add test/recurse to seed corpus - fuzz: Add separate XInclude fuzzer - runsuite: Some errors are expected - testrecurse: Test entity expansion stats - testapi.c: Initialize catalog early - gentest.py: Fix memory leak in API tests - tests: Enable "runsuite" test - python/tests/reader2: use absolute paths everywhere (Ross Burton) - python/tests/reader2: always exit(1) if a test fails (Ross Burton) - testModule: exit if the module can't be opened (Ross Burton) - CI: disable modules in gcc:static build (Ross Burton) - CI: fix CI on MinGW builds (Ross Burton) - python: Fix memory leak checks - tests: Check that xmlInitParser doesn't allocate memory - tests: Fix use-after-free in Python tests - tests: Remove unneeded #includes - gitlab-ci: Make Test-Msvc exit if ctest fails - gitlab-ci: Treat compiler warnings as errors on MSVC - test: Add test for push parser boundaries - gitlab-ci: Upgrade image to Ubuntu 22.10, reenable MSan - gitlab-ci: Reenable LeakSanitizer - gitlab-ci: Fix llvm-symbolizer - xinclude: Don't create result doc for test with errors - xinclude: Also test error messages - gitlab-ci: Allow cast-align warnings from clang - gitlab-ci: Fix tar invocation - gitlab-ci: Move MSVC test to separate script - gitlab-ci: Fix SUFFIX, remove MINGW_PATH - gitlab-ci: Consolidate CMake test scripts - gitlab-ci: Only install MinGW autotools if needed - gitlab-ci: Only install cmake MinGW package if needed - gitlab-ci: Install 7-Zip using the .msi - Use $MSYSTEM and 'bash -lc' in MinGW CI - Add CI job for MinGW/Autotools - Consolidate CI scripts - Allow empty MINGW_PACKAGE_PREFIX - Move Dockerfile to .gitlab-ci directory - testapi: Disable on Windows for now - Disable fuzzer tests if glob.h wasn't found - Move automata test to runtest.c - Fix testapi when building --without-sax1 # Documentation - doc: Remove ancient files - Remove ancient TODOs - html: Fix htmlInitAutoClose documentation - doc: Mention new location of XML catalog as breaking change - doc: Mention potentially breaking changes in NEWS - doc: Remove xmlDllMain from documentation and version script - doc: Mention ${sysconfdir} in man pages - doc: Document xmlcatalog --convert - doc: Document xmllint --nodict and --pedantic - doc: Fix indentation in source XML files - xmllint: Document --quiet option - Improve cross-references in API docs - Improve documentation of globals - Fix documentation parser - Support comments for global variables in documentation - Fix update call in apibuild.py - Don't index anything in DOC_DISABLE sections - Fix warnings from apibuild.py - Start with documentation for maintainers @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.6 2023/11/15 15:53:41 nia Exp $ d3 1 a3 1 * Add run-path to XML_LIBDIR @ 1.6 log @libxml2: Fix xml2-config script on systems without -Wl,-R @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.5 2023/01/22 10:30:09 wiz Exp $ d5 1 a5 1 --- configure.orig 2022-10-14 12:41:28.000000000 +0000 d7 2 a8 1 @@@@ -15171,7 +15171,7 @@@@ printf "%s\n" "#define HAVE_GETADDRINFO a10 1 d14 1 a15 1 XML_CFLAGS="" @ 1.5 log @libxml2: update to 2.10.3. NEWS file for libxml2 v2.10.3: Oct 14 2022 ### Security - [CVE-2022-40304] Fix dict corruption caused by entity reference cycles - [CVE-2022-40303] Fix integer overflows with XML_PARSE_HUGE - Fix overflow check in SAX2.c ### Portability - win32: Fix build with VS2013 ### Build system - cmake: Set SOVERSION v2.10.2: Aug 29 2022 ### Improvements - Remove set-but-unused variable in xmlXPathScanName - Silence -Warray-bounds warning ### Build system - build: require automake-1.16.3 or later (Xi Ruoyao) - Remove generated files from distribution ### Test suite - Don't create missing.xml when running testapi v2.10.1: Aug 25 2022 ### Regressions - Fix xmlCtxtReadDoc with encoding ### Bug fixes - Fix HTML parser with threads and --without-legacy ### Build system - Fix build with Python 3.10 - cmake: Disable version script on macOS - Remove Makefile rule to build testapi.c ### Documentation - Switch back to HTML output for API documentation - Port doc/examples/index.py to Python 3 - Fix order of exports in libxml2-api.xml - Remove libxml2-refs.xml v2.10.0: Aug 17 2022 ### Security - [CVE-2022-2309] Reset nsNr in xmlCtxtReset - Reserve byte for NUL terminator and report errors consistently in xmlBuf and xmlBuffer (David Kilzer) - Fix missing NUL terminators in xmlBuf and xmlBuffer functions (David Kilzer) - Fix integer overflow in xmlBufferDump() (David Kilzer) - xmlBufAvail() should return length without including a byte for NUL terminator (David Kilzer) - Fix ownership of xmlNodePtr & xmlAttrPtr fields in xmlSetTreeDoc() (David Kilzer) - Use xmlNewDocText in xmlXIncludeCopyRange - Fix use-after-free bugs when calling xmlTextReaderClose() before xmlFreeTextReader() on post-validating parser (David Kilzer) - Use UPDATE_COMPAT() consistently in buf.c (David Kilzer) - fix: xmlXPathParserContext could be double-delete in OOM case. (jinsub ahn) ### Removals and deprecations - Disable XPointer location support by default - Remove outdated xml2Conf.sh - Deprecate module init and cleanup functions - Remove obsolete XML Software Autoupdate (XSA) file - Remove DOCBparser - Remove obsolete Python test framework - Remove broken VxWorks support - Remove broken Mac OS 9 support - Remove broken bakefile support - Remove broken Visual Studio 2010 support - Remove broken Windows CE support - Deprecate IDREF-related functions in valid.h - Deprecate legacy functions - Disable legacy support by default - Deprecate all functions in nanoftp.h - Disable FTP support by default - Add XML_DEPRECATED macro - Remove elfgcchack.h ### Regressions - Skip incorrectly opened HTML comments - Restore behavior of htmlDocContentDumpFormatOutput() (David Kilzer) ### Bug fixes - Fix memory leak with invalid XSD - Make XPath depth check work with recursive invocations - Fix memory leak in xmlLoadEntityContent error path - Avoid double-free if malloc fails in inputPush - Properly fold whitespace around the QName value when validating an XSD schema. (Damjan Jovanovic) - Add whitespace folding for some atomic data types that it's missing on. (Damjan Jovanovic) - Don't add IDs containing unexpanded entity references ### Improvements - Avoid calling xmlSetTreeDoc - Simplify xmlFreeNode - Don't reset nsDef when changing node content - Fix unintended fall-through in xmlNodeAddContentLen - Remove unused xmlBuf functions (David Kilzer) - Implement xpath1() XPointer scheme - Add configuration flag for XPointer locations support - Fix compiler warnings in Python code - Mark more static data as `const` (David Kilzer) - Make xmlStaticCopyNode non-recursive - Clean up encoding switching code - Simplify recursive pthread mutex - Use non-recursive mutex in dict.c - Fix parser progress checks - Avoid arithmetic on freed pointers - Improve buffer allocation scheme - Remove unneeded #includes - Add support for some non-standard escapes in regular expressions. (Damjan Jovanovic) - htmlParseComment: handle abruptly-closed comments (Mike Dalessio) - Add let variable tag support (Oliver Diehl) - Add value-of tag support (Oliver Diehl) - Remove useless call to xmlRelaxNGCleanupTypes - Don't include ICU headers in public headers - Update `xmlStrlen()` to use POSIX / ISO C `strlen()` (Mike Dalessio) - Fix unused variable warnings with disabled features - Only warn on invalid redeclarations of predefined entities - Remove unneeded code in xmlreader.c - Rework validation context flags ### Portability - Use NAN/INFINITY if available to init XPath NaN/Inf (Sergey Kosukhin) - Fix Python tests on macOS - Fix xmlCleanupThreads on Windows - Fix reinitialization of library on Windows - Don't mix declarations and code in runtest.c - Use portable python shebangs (David Seifert) - Use critical sections as mutex on Windows - Don't set HAVE_WIN32_THREADS in win32config.h - Use stdint.h with newer MSVC - Remove cruft from win32config.h - Remove isinf/isnan emulation in win32config.h - Always fopen files with "rb" - Remove __DJGPP__ checks - Remove useless __CYGWIN__ checks ### Build system - Don't autogenerate doc/examples/Makefile.am - cmake: Install libxml.m4 on UNIX-like platforms (Daniel E) - cmake: Use symbol versioning on UNIX-like platforms (Daniel E) - Port genUnicode.py to Python 3 - Port gentest.py to Python 3 - cmake: Fix build without thread support - cmake: Install documentation in CMAKE_INSTALL_DOCDIR - cmake: Remove non needed files in docs dir (Daniel E) - configure: move XML_PRIVATE_LIBS after WIN32_EXTRA_LIBADD is set (Christopher Degawa) - Move local Autoconf macros into m4 directory - Use XML_PRIVATE_LIBS in libxml2_la_LIBADD - Update libxml-2.0-uninstalled.pc.in - Remove LIBS from XML_PRIVATE_LIBS - Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS - Don't overlink executables - cmake: Adjust paths for UNIX or UNIX-like target systems (Daniel Engberg) - build: Make use of variables in libxml's pkg-config file (Daniel Engberg) - Avoid obsolescent `test -a` constructs (David Seifert) - Move AM_MAINTAINER_MODE to AM section - configure.ac: make AM_SILENT_RULES([yes]) unconditional (David Seifert) - Streamline documentation installation - Don't try to recreate COPYING symlink - Detect libm using libtool's macros (David Seifert) - configure.ac: disable static libraries by default (David Seifert) - python/Makefile.am: nest python docs in $(docdir) (David Seifert) - python/Makefile.am: rely on global AM_INIT_AUTOMAKE (David Seifert) - Makefile.am: install examples more idiomatically (David Seifert) - configure.ac: remove useless AC_SUBST (David Seifert) - Respect `--sysconfdir` in source files (David Seifert) - Ignore configure backup file created by recent autoreconf too (Vadim Zeitlin) - Only install *.html and *.c example files - Remove --with-html-dir option - Rework documentation build system - Remove old website - Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings (David Seifert) - Update genChRanges.py - Update build_glob.py - Remove ICONV_CONST test - Remove obsolete AC_HEADER checks - Don't check for standard C89 library functions - Don't check for standard C89 headers - Remove special configuration for certain maintainers ### Test suite, CI - Disable network in API tests - testapi: remove leading slash from "/missing.xml" (Mike Gilbert) - Build Autotools CI tests out of source tree (VPATH) - Add --with-minimum build to CI tests - Fix warnings when testing --with-minimum build - cmake: Run all tests when threads are disabled - Also build CI tests with -Werror - Move doc/examples tests to new test suite - Simplify 'make check' targets - Fix schemas and relaxng tests - Remove unused result files - Allow missing result files in runtest - Move regexp tests to runtest - Move SVG tests to runtest.c - Move testModule to new test suite - Move testThreads to new test suite - Remove major parts of old test suite - Make testchar return an error on failure (Tony Tascioglu) - Add CI job for static build - python/tests: open() relative to test scripts (David Seifert) - Port some test scripts to Python 3 ### Documentation - Improve documentation of tree manipulation API - Update xml2-config man page - Consolidate man pages - Rename xmlcatalog_man.xml - Make examples a standalone HTML page - Fix documentation in entities.c - Add note about optimization flags @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.4 2022/03/12 07:33:22 kim Exp $ d12 1 a12 1 +XML_LIBDIR='-Wl,-R${libdir} -L${libdir}' @ 1.4 log @textproc/libxml2: Update to 2.9.13 NEWS: v2.9.13: Feb 19 2022: - Security: [CVE-2022-23308] Use-after-free of ID and IDREF attributes (Thanks to Shinji Sato for the report) Use-after-free in xmlXIncludeCopyRange (David Kilzer) Fix Null-deref-in-xmlSchemaGetComponentTargetNs (huangduirong) Fix memory leak in xmlXPathCompNodeTest Fix null pointer deref in xmlStringGetNodeList Fix several memory leaks found by Coverity (David King) - Fixed regressions: Fix regression in RelaxNG pattern matching Properly handle nested documents in xmlFreeNode Fix regression with PEs in external DTD Fix random dropping of characters on dumping ASCII encoded XML (Mohammad Razavi) Revert "Make schema validation fail with multiple top-level elements" Fix regression when parsing invalid HTML tags in push mode Fix regression parsing public IDs literals in HTML Fix buffering in xmlOutputBufferWrite Fix whitespace when serializing empty HTML documents Fix XPath recursion limit Fix regression in xmlNodeDumpOutputInternal Work around lxml API abuse - Bug fixes: Fix xmlSetTreeDoc with entity references Fix double counting of CRLF in comments Make sure to grow input buffer in xmlParseMisc Don't ignore xmllint options after "-" Don't normalize namespace URIs in XPointer xmlns() scheme Fix handling of XSD with empty namespace Also register HTML document nodes Make xmllint return an error if arguments are missing Fix handling of ctxt->base in xmlXPtrEvalXPtrPart Fix xmllint --maxmem Fix htmlReadFd, which was using a mix of xml and html context functions (Finn Barber) Move current position before possible calling of ctxt->sax->characters (Yulin Li) Fix parse failure when 4-byte character in UTF-16 BE is split across a chunk (David Kilzer) Patch to forbid epsilon-reduction of final states (Arne Becker) Avoid segfault at exit when using custom memory functions (Mike Dalessio) - Tests, code quality, fuzzing: Remove .travis.yml Make xmlFuzzReadString return a zero size in error case Fix unused function warning in testapi.c Update NewsML DTD in test suite Add more checks for malloc failures in xmllint.c Avoid potential integer overflow in xmlstring.c Run CI tests with UBSan implicit-conversion checks Fix casting of line numbers in SAX2.c Fix integer conversion warnings in hash.c Add explicit casts in runtest.c Fix integer conversion warning in xmlIconvWrapper Add suffix to unsigned constant in xmlmemory.c Add explicit casts in testchar.c Fix integer conversion warnings in xmlstring.c Add explicit cast in xmlURIUnescapeString Remove unused variable in xmlCharEncOutFunc (David King) - Build system, portability: Remove xmlwin32version.h Fix fuzzer test with VPATH build Support custom prefix when installing Python module Remove Makefile.win Remove CVS and SVN-related code Port python 3.x module to Windows and improve distutils (Chun-wei Fan) Correctly install the HTML examples into their subdirectory (Mattia Rizzolo) Refactor the settings of $docdir (Mattia Rizzolo) Remove unused configure checks (Ben Boeckel) python/Makefile.am: use *_LIBADD, not *_LDFLAGS for LIBS (Sam James) Fix check for libtool in autogen.sh Use version in configure.ac for CMake (Timothy Lyanguzov) Add CMake alias targets for embedded projects (Markus Rickert) - Documentation: Remove SVN keyword anchors Rework README Remove README.cvs-commits Remove old ChangeLog Update hyperlinks Remove README.docs Remove MAINTAINERS Remove xmltutorial.pdf Upload documentation to GitLab pages Document how to escape XML_CATALOG_FILES Fix libxml2.doap Update URL for libxml++ C++ binding (Kjell Ahlstedt) Generate devhelp2 index file (Emmanuele Bassi) Mention XML_CATALOG_FILES is space-separated (Jan Tojnar) Add documentaiton for xmllint exit code 10 (Rainer Canavan) Fix some validation errors in the FAQ (David King) Add instructions on how to use CMake to compile libxml (Markus Rickert) @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.3 2021/07/21 13:55:07 tnn Exp $ a2 3 Various configure fixes: * Don't leak non-existent include directories to xml2-config. Important for CMake on Darwin. a3 4 * Fix handling of pthreads * Add portability to OpenBSD, MirBSD, FreeBSD, NetBSD and DragonFly * Fix test for SAX Submitted as https://bugzilla.gnome.org/show_bug.cgi?id=766859 d5 3 a7 3 --- configure.orig 2022-02-20 12:11:10.000000000 +0000 +++ configure 2022-03-12 06:29:48.961424860 +0000 @@@@ -14898,7 +14898,7 @@@@ a15 70 @@@@ -15371,13 +15371,13 @@@@ if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 -$as_echo_n "checking for pthread_join in -lpthread... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +$as_echo_n "checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; } if ${ac_cv_lib_pthread_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@@@ -15409,7 +15409,7 @@@@ $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then : - THREAD_LIBS="-lpthread" + THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" $as_echo "#define HAVE_PTHREAD_H /**/" >>confdefs.h @@@@ -15428,12 +15428,12 @@@@ *beos*) WITH_THREADS="1" THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" ;; - *linux*) + *linux* | *openbsd* | *mirbsd*) if test "${GCC}" = "yes" ; then GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'` GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'` GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'` - if test "${THREAD_LIBS}" = "-lpthread" ; then + if test "${THREAD_LIBS}" = "${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" ; then if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null then THREAD_LIBS="" @@@@ -15450,6 +15450,10 @@@@ fi fi ;; + *freebsd* | *netbsd* | *dragonfly*) + THREAD_LIBS="" + BASE_THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" + ;; esac if test "$WITH_THREADS" = "1" ; then THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" @@@@ -15720,7 +15724,7 @@@@ TEST_SAX=SAXtests fi - if test "${WITH_TRIO}" = "1"; then + if test "${WITH_SAX1}" = "1"; then WITH_SAX1_SOURCES_TRUE= WITH_SAX1_SOURCES_FALSE='#' else @@@@ -15905,7 +15909,7 @@@@ if test "$with_iconv" = "no" ; then echo Disabling ICONV support else - if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then + if test -e "$with_iconv/include" ; then CPPFLAGS="${CPPFLAGS} -I$with_iconv/include" # Export this since our headers include iconv.h XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include" @ 1.4.8.1 log @Pullup ticket #6737 - requested by taca textproc/libxml2: security update Revisions pulled up: - textproc/libxml2/Makefile 1.166-1.167 - textproc/libxml2/Makefile.common 1.17-1.19 - textproc/libxml2/PLIST 1.48 - textproc/libxml2/distinfo 1.142-1.143 - textproc/libxml2/patches/patch-Makefile.in deleted - textproc/libxml2/patches/patch-catalog.c deleted - textproc/libxml2/patches/patch-configure 1.5 - textproc/libxml2/patches/patch-doc_examples_Makefile.in deleted - textproc/libxml2/patches/patch-encoding.c 1.4 - textproc/libxml2/patches/patch-error.c 1.1 - textproc/libxml2/patches/patch-python_libxml.c deleted - textproc/libxml2/patches/patch-python_libxml.py deleted - textproc/libxml2/patches/patch-python_libxml2.py deleted - textproc/libxml2/patches/patch-python_setup.py deleted - textproc/libxml2/patches/patch-xmlcatalog.c deleted ------------------------------------------------------------------- Module Name: pkgsrc Committed By: wiz Date: Sun Jan 22 10:30:09 UTC 2023 Modified Files: pkgsrc/textproc/libxml2: Makefile Makefile.common PLIST distinfo pkgsrc/textproc/libxml2/patches: patch-configure patch-encoding.c Removed Files: pkgsrc/textproc/libxml2/patches: patch-Makefile.in patch-catalog.c patch-doc_examples_Makefile.in patch-python_libxml.c patch-python_libxml.py patch-python_libxml2.py patch-python_setup.py patch-xmlcatalog.c Log Message: libxml2: update to 2.10.3. NEWS file for libxml2 v2.10.3: Oct 14 2022 ### Security - [CVE-2022-40304] Fix dict corruption caused by entity reference cycles - [CVE-2022-40303] Fix integer overflows with XML_PARSE_HUGE - Fix overflow check in SAX2.c ### Portability - win32: Fix build with VS2013 ### Build system - cmake: Set SOVERSION v2.10.2: Aug 29 2022 ### Improvements - Remove set-but-unused variable in xmlXPathScanName - Silence -Warray-bounds warning ### Build system - build: require automake-1.16.3 or later (Xi Ruoyao) - Remove generated files from distribution ### Test suite - Don't create missing.xml when running testapi v2.10.1: Aug 25 2022 ### Regressions - Fix xmlCtxtReadDoc with encoding ### Bug fixes - Fix HTML parser with threads and --without-legacy ### Build system - Fix build with Python 3.10 - cmake: Disable version script on macOS - Remove Makefile rule to build testapi.c ### Documentation - Switch back to HTML output for API documentation - Port doc/examples/index.py to Python 3 - Fix order of exports in libxml2-api.xml - Remove libxml2-refs.xml v2.10.0: Aug 17 2022 ### Security - [CVE-2022-2309] Reset nsNr in xmlCtxtReset - Reserve byte for NUL terminator and report errors consistently in xmlBuf and xmlBuffer (David Kilzer) - Fix missing NUL terminators in xmlBuf and xmlBuffer functions (David Kilzer) - Fix integer overflow in xmlBufferDump() (David Kilzer) - xmlBufAvail() should return length without including a byte for NUL terminator (David Kilzer) - Fix ownership of xmlNodePtr & xmlAttrPtr fields in xmlSetTreeDoc() (David Kilzer) - Use xmlNewDocText in xmlXIncludeCopyRange - Fix use-after-free bugs when calling xmlTextReaderClose() before xmlFreeTextReader() on post-validating parser (David Kilzer) - Use UPDATE_COMPAT() consistently in buf.c (David Kilzer) - fix: xmlXPathParserContext could be double-delete in OOM case. (jinsub ahn) ### Removals and deprecations - Disable XPointer location support by default - Remove outdated xml2Conf.sh - Deprecate module init and cleanup functions - Remove obsolete XML Software Autoupdate (XSA) file - Remove DOCBparser - Remove obsolete Python test framework - Remove broken VxWorks support - Remove broken Mac OS 9 support - Remove broken bakefile support - Remove broken Visual Studio 2010 support - Remove broken Windows CE support - Deprecate IDREF-related functions in valid.h - Deprecate legacy functions - Disable legacy support by default - Deprecate all functions in nanoftp.h - Disable FTP support by default - Add XML_DEPRECATED macro - Remove elfgcchack.h ### Regressions - Skip incorrectly opened HTML comments - Restore behavior of htmlDocContentDumpFormatOutput() (David Kilzer) ### Bug fixes - Fix memory leak with invalid XSD - Make XPath depth check work with recursive invocations - Fix memory leak in xmlLoadEntityContent error path - Avoid double-free if malloc fails in inputPush - Properly fold whitespace around the QName value when validating an XSD schema. (Damjan Jovanovic) - Add whitespace folding for some atomic data types that it's missing on. (Damjan Jovanovic) - Don't add IDs containing unexpanded entity references ### Improvements - Avoid calling xmlSetTreeDoc - Simplify xmlFreeNode - Don't reset nsDef when changing node content - Fix unintended fall-through in xmlNodeAddContentLen - Remove unused xmlBuf functions (David Kilzer) - Implement xpath1() XPointer scheme - Add configuration flag for XPointer locations support - Fix compiler warnings in Python code - Mark more static data as `const` (David Kilzer) - Make xmlStaticCopyNode non-recursive - Clean up encoding switching code - Simplify recursive pthread mutex - Use non-recursive mutex in dict.c - Fix parser progress checks - Avoid arithmetic on freed pointers - Improve buffer allocation scheme - Remove unneeded #includes - Add support for some non-standard escapes in regular expressions. (Damjan Jovanovic) - htmlParseComment: handle abruptly-closed comments (Mike Dalessio) - Add let variable tag support (Oliver Diehl) - Add value-of tag support (Oliver Diehl) - Remove useless call to xmlRelaxNGCleanupTypes - Don't include ICU headers in public headers - Update `xmlStrlen()` to use POSIX / ISO C `strlen()` (Mike Dalessio) - Fix unused variable warnings with disabled features - Only warn on invalid redeclarations of predefined entities - Remove unneeded code in xmlreader.c - Rework validation context flags ### Portability - Use NAN/INFINITY if available to init XPath NaN/Inf (Sergey Kosukhin) - Fix Python tests on macOS - Fix xmlCleanupThreads on Windows - Fix reinitialization of library on Windows - Don't mix declarations and code in runtest.c - Use portable python shebangs (David Seifert) - Use critical sections as mutex on Windows - Don't set HAVE_WIN32_THREADS in win32config.h - Use stdint.h with newer MSVC - Remove cruft from win32config.h - Remove isinf/isnan emulation in win32config.h - Always fopen files with "rb" - Remove __DJGPP__ checks - Remove useless __CYGWIN__ checks ### Build system - Don't autogenerate doc/examples/Makefile.am - cmake: Install libxml.m4 on UNIX-like platforms (Daniel E) - cmake: Use symbol versioning on UNIX-like platforms (Daniel E) - Port genUnicode.py to Python 3 - Port gentest.py to Python 3 - cmake: Fix build without thread support - cmake: Install documentation in CMAKE_INSTALL_DOCDIR - cmake: Remove non needed files in docs dir (Daniel E) - configure: move XML_PRIVATE_LIBS after WIN32_EXTRA_LIBADD is set (Christopher Degawa) - Move local Autoconf macros into m4 directory - Use XML_PRIVATE_LIBS in libxml2_la_LIBADD - Update libxml-2.0-uninstalled.pc.in - Remove LIBS from XML_PRIVATE_LIBS - Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS - Don't overlink executables - cmake: Adjust paths for UNIX or UNIX-like target systems (Daniel Engberg) - build: Make use of variables in libxml's pkg-config file (Daniel Engberg) - Avoid obsolescent `test -a` constructs (David Seifert) - Move AM_MAINTAINER_MODE to AM section - configure.ac: make AM_SILENT_RULES([yes]) unconditional (David Seifert) - Streamline documentation installation - Don't try to recreate COPYING symlink - Detect libm using libtool's macros (David Seifert) - configure.ac: disable static libraries by default (David Seifert) - python/Makefile.am: nest python docs in $(docdir) (David Seifert) - python/Makefile.am: rely on global AM_INIT_AUTOMAKE (David Seifert) - Makefile.am: install examples more idiomatically (David Seifert) - configure.ac: remove useless AC_SUBST (David Seifert) - Respect `--sysconfdir` in source files (David Seifert) - Ignore configure backup file created by recent autoreconf too (Vadim Zeitlin) - Only install *.html and *.c example files - Remove --with-html-dir option - Rework documentation build system - Remove old website - Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings (David Seifert) - Update genChRanges.py - Update build_glob.py - Remove ICONV_CONST test - Remove obsolete AC_HEADER checks - Don't check for standard C89 library functions - Don't check for standard C89 headers - Remove special configuration for certain maintainers ### Test suite, CI - Disable network in API tests - testapi: remove leading slash from "/missing.xml" (Mike Gilbert) - Build Autotools CI tests out of source tree (VPATH) - Add --with-minimum build to CI tests - Fix warnings when testing --with-minimum build - cmake: Run all tests when threads are disabled - Also build CI tests with -Werror - Move doc/examples tests to new test suite - Simplify 'make check' targets - Fix schemas and relaxng tests - Remove unused result files - Allow missing result files in runtest - Move regexp tests to runtest - Move SVG tests to runtest.c - Move testModule to new test suite - Move testThreads to new test suite - Remove major parts of old test suite - Make testchar return an error on failure (Tony Tascioglu) - Add CI job for static build - python/tests: open() relative to test scripts (David Seifert) - Port some test scripts to Python 3 ### Documentation - Improve documentation of tree manipulation API - Update xml2-config man page - Consolidate man pages - Rename xmlcatalog_man.xml - Make examples a standalone HTML page - Fix documentation in entities.c - Add note about optimization flags To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 pkgsrc/textproc/libxml2/Makefile cvs rdiff -u -r1.16 -r1.17 pkgsrc/textproc/libxml2/Makefile.common cvs rdiff -u -r1.47 -r1.48 pkgsrc/textproc/libxml2/PLIST cvs rdiff -u -r1.141 -r1.142 pkgsrc/textproc/libxml2/distinfo cvs rdiff -u -r1.2 -r0 pkgsrc/textproc/libxml2/patches/patch-Makefile.in \ pkgsrc/textproc/libxml2/patches/patch-doc_examples_Makefile.in \ pkgsrc/textproc/libxml2/patches/patch-python_setup.py cvs rdiff -u -r1.1 -r0 pkgsrc/textproc/libxml2/patches/patch-catalog.c \ pkgsrc/textproc/libxml2/patches/patch-python_libxml.py \ pkgsrc/textproc/libxml2/patches/patch-python_libxml2.py \ pkgsrc/textproc/libxml2/patches/patch-xmlcatalog.c cvs rdiff -u -r1.4 -r1.5 pkgsrc/textproc/libxml2/patches/patch-configure cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/libxml2/patches/patch-encoding.c cvs rdiff -u -r1.4 -r0 pkgsrc/textproc/libxml2/patches/patch-python_libxml.c ------------------------------------------------------------------- Module Name: pkgsrc Committed By: gutteridge Date: Thu Jan 26 01:49:16 UTC 2023 Modified Files: pkgsrc/textproc/libxml2: Makefile.common distinfo Added Files: pkgsrc/textproc/libxml2/patches: patch-error.c Log Message: libxml2: Make sure that error messages are valid UTF-8 Fixes segfaults with itstool, which were breaking various MATE package builds. (This is the third time a variant of a patch to fix this same issue has been applied here.) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 pkgsrc/textproc/libxml2/Makefile.common cvs rdiff -u -r1.142 -r1.143 pkgsrc/textproc/libxml2/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/libxml2/patches/patch-error.c ------------------------------------------------------------------- Module Name: pkgsrc Committed By: jperkin Date: Fri Jan 27 14:49:37 UTC 2023 Modified Files: pkgsrc/textproc/libxml2: Makefile Makefile.common Log Message: libxml2: Ensure --sysconfdir is passed. Fixes widespread breakage of recent update on systems where PKG_SYSCONFDIR is not PREFIX/etc so the catalog files could not be found. Move PKGREVISION out of Makefile.common and bump. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 pkgsrc/textproc/libxml2/Makefile cvs rdiff -u -r1.18 -r1.19 pkgsrc/textproc/libxml2/Makefile.common @ text @d1 1 a1 1 $NetBSD$ d3 3 d7 4 d12 3 a14 3 --- configure.orig 2022-10-14 12:41:28.000000000 +0000 +++ configure @@@@ -15171,7 +15171,7 @@@@ printf "%s\n" "#define HAVE_GETADDRINFO d23 70 @ 1.3 log @libxml2: don't show non-existent -I/usr/include in "xml2-config --cflags" Check that the iconv include directory actually exists before adding it to xml2-config. This fixes build of lang/llvm on Darwin. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.2 2019/11/06 13:19:43 wiz Exp $ d12 3 a14 3 --- configure.orig 2021-05-13 18:54:55.000000000 +0000 +++ configure @@@@ -15005,7 +15005,7 @@@@ fi d23 1 a23 1 @@@@ -15478,13 +15478,13 @@@@ else d40 1 a40 1 @@@@ -15516,7 +15516,7 @@@@ fi d47 1 a47 1 $as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h d49 1 a49 1 @@@@ -15538,12 +15538,12 @@@@ fi d64 1 a64 1 @@@@ -15560,6 +15560,10 @@@@ fi d75 1 a75 1 @@@@ -15830,7 +15834,7 @@@@ else d84 1 a84 1 @@@@ -16015,7 +16019,7 @@@@ WITH_ICONV=0 @ 1.2 log @libxml2: update to 2.9.10. This is a relatively large release, Nick fixed a number of bugs and improved the code in many areas, among other things removing some recursive behaviour of the code in various places. Includes various portability fixes, documentation updates and cleanups: Documentation: - Fix a few more typos ("fonction") (Nick Wellnhofer) - Large batch of typo fixes (Jared Yanovich) - Fix typos: tree: move{ -> s}, reconcil{i -> }ed, h{o -> e}ld by... (Jan Pokorný) - Fix typo: xpath: simpli{ -> fi}ed (Jan Pokorný) - Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump (Jan Pokorný) - Fix comments in test code (zhouzhongyuan) - fix comment in testReader.c (zhouzhongyuan) Portability: - Fix some release issues on Fedora 30 (Daniel Veillard) - Fix exponent digits when running tests under old MSVC (Daniel Richard G) - Work around buggy ceil() function on AIX (Daniel Richard G) - Don't call printf with NULL string in runtest.c (Daniel Richard G) - Switched from unsigned long to ptrdiff_t in parser.c (Stephen Chenney) - timsort.h: support older GCCs (Jérôme Duval) - Make configure.ac work with older pkg-config (Nick Wellnhofer) - Stop defining _REENTRANT on some Win32 platforms (Nick Wellnhofer) - Fix nanohttp.c on MinGW (Nick Wellnhofer) - Fix Windows compiler warning in testC14N.c (Nick Wellnhofer) - Merge testThreadsWin32.c into testThreads.c (Nick Wellnhofer) - Fix Python bindings under Windows (Nick Wellnhofer) Bug Fixes: - Another fix for conditional sections at end of document (Nick Wellnhofer) - Fix for conditional sections at end of document (Nick Wellnhofer) - Make sure that Python tests exit with error code (Nick Wellnhofer) - Audit memory error handling in xpath.c (Nick Wellnhofer) - Fix error code in xmlTextWriterStartDocument (Nick Wellnhofer) - Fix integer overflow when counting written bytes (Nick Wellnhofer) - Fix uninitialized memory access in HTML parser (Nick Wellnhofer) - Fix memory leak in xmlSchemaValAtomicType (Nick Wellnhofer) - Disallow conditional sections in internal subset (Nick Wellnhofer) - Fix use-after-free in xmlTextReaderFreeNodeList (Nick Wellnhofer) - Fix Regextests (Nick Wellnhofer) - Fix empty branch in regex (Nick Wellnhofer) - Fix integer overflow in entity recursion check (Nick Wellnhofer) - Don't read external entities or XIncludes from stdin (Nick Wellnhofer) - Fix Schema determinism check of ##other namespaces (Nick Wellnhofer) - Fix potential null deref in xmlSchemaIDCFillNodeTables (zhouzhongyuan) - Fix potential memory leak in xmlBufBackToBuffer (Nick Wellnhofer) - Fix error message when processing XIncludes with fallbacks (Nick Wellnhofer) - Fix memory leak in xmlRegEpxFromParse (zhouzhongyuan) - 14:00 is a valid timezone for xs:dateTime (Nick Wellnhofer) - Fix memory leak in xmlParseBalancedChunkMemoryRecover (Zhipeng Xie) - Fix potential null deref in xmlRelaxNGParsePatterns (Nick Wellnhofer) - Misleading error message with xs:{min|max}Inclusive (bettermanzzy) - Fix memory leak in xmlXIncludeLoadTxt (Wang Kirin) - Partial fix for comparison of xs:durations (Nick Wellnhofer) - Fix null deref in xmlreader buffer (zhouzhongyuan) - Fix unability to RelaxNG-validate grammar with choice-based name class (Jan Pokorný) - Fix unability to validate ambiguously constructed interleave for RelaxNG (Jan Pokorný) - Fix possible null dereference in xmlXPathIdFunction (zhouzhongyuan) - fix memory leak in xmlAllocOutputBuffer (zhouzhongyuan) - Fix unsigned int overflow (Jens Eggerstedt) - dict.h: gcc 2.95 doesn't allow multiple storage classes (Nick Wellnhofer) - Fix another code path in xmlParseQName (Nick Wellnhofer) - Make sure that xmlParseQName returns NULL in error case (Nick Wellnhofer) - Fix build without reader but with pattern (Nick Wellnhofer) - Fix memory leak in xmlAllocOutputBufferInternal error path (Nick Wellnhofer) - Fix unsigned integer overflow (Nick Wellnhofer) - Fix return value of xmlOutputBufferWrite (Nick Wellnhofer) - Fix parser termination from "Double hyphen within comment" error (David Warring) - Fix call stack overflow in xmlFreePattern (Nick Wellnhofer) - Fix null deref in previous commit (Nick Wellnhofer) - Fix memory leaks in xmlXPathParseNameComplex error paths (Nick Wellnhofer) - Check for integer overflow in xmlXPtrEvalChildSeq (Nick Wellnhofer) - Fix xmllint dump of XPath namespace nodes (Nick Wellnhofer) - Fix float casts in xmlXPathSubstringFunction (Nick Wellnhofer) - Fix null deref in xmlregexp error path (Nick Wellnhofer) - Fix null pointer dereference in xmlTextReaderReadOuterXml (Nick Wellnhofer) - Fix memory leaks in xmlParseStartTag2 error paths (Nick Wellnhofer) - Fix memory leak in xmlSAX2StartElement (Nick Wellnhofer) - Fix commit "Memory leak in xmlFreeID (xmlreader.c)" (Nick Wellnhofer) - Fix NULL pointer deref in xmlTextReaderValidateEntity (Nick Wellnhofer) - Memory leak in xmlFreeTextReader (Nick Wellnhofer) - Memory leak in xmlFreeID (xmlreader.c) (Nick Wellnhofer) Improvements: - Run XML conformance tests under CI (Nick Wellnhofer) - Update GitLab CI config (Nick Wellnhofer) - Propagate memory errors in valuePush (Nick Wellnhofer) - Propagate memory errors in xmlXPathCompExprAdd (Nick Wellnhofer) - Make xmlFreeDocElementContent non-recursive (Nick Wellnhofer) - Enable continuous integration via GitLab CI (Nick Wellnhofer) - Avoid ignored attribute warnings under GCC (Nick Wellnhofer) - Make xmlDumpElementContent non-recursive (Nick Wellnhofer) - Make apibuild.py ignore ATTRIBUTE_NO_SANITIZE (Nick Wellnhofer) - Mark xmlExp* symbols as removed (Nick Wellnhofer) - Make xmlParseConditionalSections non-recursive (Nick Wellnhofer) - Adjust expected error in Python tests (Nick Wellnhofer) - Make xmlTextReaderFreeNodeList non-recursive (Nick Wellnhofer) - Make xmlFreeNodeList non-recursive (Nick Wellnhofer) - Make xmlParseContent and xmlParseElement non-recursive (Nick Wellnhofer) - Remove executable bit from non-executable files (Nick Wellnhofer) - Fix expected output of test/schemas/any4 (Nick Wellnhofer) - Optimize build instructions in README (zhouzhongyuan) - xml2-config.in: Output CFLAGS and LIBS on the same line (Hugh McMaster) - xml2-config: Add a --dynamic switch to print only shared libraries (Hugh McMaster) - Annotate functions with __attribute__((no_sanitize)) (Nick Wellnhofer) - Fix warnings when compiling without reader or push parser (Nick Wellnhofer) - Remove unused member `doc` in xmlSaveCtxt (Nick Wellnhofer) - Limit recursion depth in xmlXPathCompOpEvalPredicate (Nick Wellnhofer) - Remove -Wno-array-bounds (Nick Wellnhofer) - Remove unreachable code in xmlXPathCountFunction (Nick Wellnhofer) - Improve XPath predicate and filter evaluation (Nick Wellnhofer) - Limit recursion depth in xmlXPathOptimizeExpression (Nick Wellnhofer) - Disable hash randomization when fuzzing (Nick Wellnhofer) - Optional recursion limit when parsing XPath expressions (Nick Wellnhofer) - Optional recursion limit when evaluating XPath expressions (Nick Wellnhofer) - Use break statements in xmlXPathCompOpEval (Nick Wellnhofer) - Optional XPath operation limit (Nick Wellnhofer) - Fix compilation with --with-minimum (Nick Wellnhofer) - Check XPath stack after calling functions (Nick Wellnhofer) - Remove debug printf in xmlreader.c (Nick Wellnhofer) - Always define LIBXML_THREAD_ENABLED when enabled (Michael Haubenwallner) - Regenerate NEWS (Nick Wellnhofer) - Change git repo URL (Nick Wellnhofer) - Change bug tracker URL (Nick Wellnhofer) - Remove outdated HTML file (Nick Wellnhofer) - Fix unused function warning in testapi.c (Nick Wellnhofer) - Add some generated test files to .gitignore (Nick Wellnhofer) - Remove unneeded function pointer casts (Nick Wellnhofer) - Fix -Wcast-function-type warnings (GCC 8) (Nick Wellnhofer) - Fix -Wformat-truncation warnings (GCC 8) (Nick Wellnhofer) Cleanups: - Rebuild docs (Nick Wellnhofer) - Disable xmlExp regex code (Nick Wellnhofer) - Remove redundant code in xmlRelaxNGValidateState (Nick Wellnhofer) - Remove redundant code in xmlXPathCompRelationalExpr (Nick Wellnhofer) Thanks Nick and all who helped contribute to this release! @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.1 2019/01/09 19:09:03 adam Exp $ d4 2 d12 1 a12 1 --- configure.orig 2019-10-30 19:14:22.000000000 +0000 d14 1 a14 1 @@@@ -14970,7 +14970,7 @@@@ fi d23 1 a23 1 @@@@ -15443,13 +15443,13 @@@@ else d40 1 a40 1 @@@@ -15481,7 +15481,7 @@@@ fi d49 1 a49 1 @@@@ -15503,12 +15503,12 @@@@ fi d64 1 a64 1 @@@@ -15525,6 +15525,10 @@@@ fi d75 1 a75 1 @@@@ -15795,7 +15799,7 @@@@ else d84 9 @ 1.1 log @libxml2: updated to 2.9.9 v2.9.9: Security: CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression CVE-2018-14404 Fix nullptr deref with XPath logic ops Documentation: reader: Fix documentation comment Portability: Fix MSVC build with lzma Variables need 'extern' in static lib on Cygwin Really declare dllexport/dllimport for Cygwin Merge branch 'patch-2' into 'master' Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 in $srcdir Improve error message if pkg.m4 couldn't be found NaN and Inf fixes for pre-C99 compilers Bug Fixes: Revert "Support xmlTextReaderNextSibling w/o preparsed doc" Fix building relative URIs Problem with data in interleave in RelaxNG validation Fix memory leak in xmlSwitchInputEncodingInt error path Set doc on element obtained from freeElems Fix HTML serialization with UTF-8 encoding Use actual doc in xmlTextReaderRead*Xml Unlink node before freeing it in xmlSAX2StartElement Check return value of nodePush in xmlSAX2StartElement Free input buffer in xmlHaltParser Reset HTML parser input pointers on encoding failure Don't run icu_parse_test if EUC-JP is unsupported Fix xmlSchemaValidCtxtPtr reuse memory leak Fix xmlTextReaderNext with preparsed document Remove stray character from comment Remove a misleading line from xmlCharEncOutput HTML noscript should not close p Don't change context node in xmlXPathRoot Stop using XPATH_OP_RESET Revert "Change calls to xmlCharEncInput to set flush false" Improvements: Fix "Problem with data in interleave in RelaxNG validation" cleanup: remove some unreachable code add --relative to testURI Remove redefined starts and defines inside include elements Allow choice within choice in nameClass in RELAX NG Look inside divs for starts and defines inside include Add compile and libxml2-config.cmake to .gitignore Stop using doc->charset outside parser code Add newlines to 'xmllint --xpath' output Don't include SAX.h from globals.h Support xmlTextReaderNextSibling w/o preparsed doc Don't instruct user to run make when autogen.sh failed Run Travis ASan tests with "sudo: required" Improve restoring of context size and position Simplify and harden nodeset filtering Avoid unnecessary backups of the context node Fix inconsistency in xmlXPathIsInf @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.31 2017/11/06 16:16:53 prlw1 Exp $ d10 1 a10 1 --- configure.orig 2017-11-02 20:16:48.000000000 +0000 d12 1 a12 1 @@@@ -15084,7 +15084,7 @@@@ fi d21 1 a21 1 @@@@ -15557,13 +15557,13 @@@@ else d38 1 a38 1 @@@@ -15595,7 +15595,7 @@@@ fi d47 1 a47 1 @@@@ -15617,12 +15617,12 @@@@ fi d62 1 a62 1 @@@@ -15639,6 +15639,10 @@@@ fi d73 1 a73 1 @@@@ -15909,7 +15913,7 @@@@ else a81 11 @@@@ -16493,10 +16497,6 @@@@ case "$host" in CPPFLAGS="$CPPFLAGS -DWIN32" WIN32_EXTRA_LIBADD="-lws2_32" WIN32_EXTRA_LDFLAGS="-no-undefined" - if test "${PYTHON}" != "" - then - WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)" - fi ;; *-*-cygwin*) CYGWIN_EXTRA_LDFLAGS="-no-undefined" @ 1.1.2.1 log @file patch-configure was added on branch pkgsrc-2018Q4 on 2019-02-18 14:05:52 +0000 @ text @d1 92 @ 1.1.2.2 log @Pullup ticket #5911 - requested by taca textproc/libxml2, textproc/py-libxml2: security fix Revisions pulled up: - textproc/libxml2/Makefile 1.152 - textproc/libxml2/Makefile.common 1.12 - textproc/libxml2/distinfo 1.129-1.130 - textproc/libxml2/patches/patch-Makefile.in 1.1 - textproc/libxml2/patches/patch-aa deleted - textproc/libxml2/patches/patch-ab deleted - textproc/libxml2/patches/patch-ac deleted - textproc/libxml2/patches/patch-ad deleted - textproc/libxml2/patches/patch-ae deleted - textproc/libxml2/patches/patch-catalog.c 1.1 - textproc/libxml2/patches/patch-configure 1.1 - textproc/libxml2/patches/patch-doc_examples_Makefile.in 1.1 - textproc/libxml2/patches/patch-parser.c deleted - textproc/libxml2/patches/patch-python_libxml.c 1.1 - textproc/libxml2/patches/patch-result_errors_759573.xml.err deleted - textproc/libxml2/patches/patch-xmlcatalog.c 1.1 - textproc/libxml2/patches/patch-xpath.c deleted - textproc/libxml2/patches/patch-xzlib.c deleted - textproc/py-libxml2/Makefile 1.63-1.64 - textproc/py-libxml2/PLIST 1.4 --- Module Name: pkgsrc Committed By: wiz Date: Wed Jan 9 13:40:51 UTC 2019 Modified Files: pkgsrc/textproc/libxml2: distinfo pkgsrc/textproc/py-libxml2: Makefile Added Files: pkgsrc/textproc/libxml2/patches: patch-python_libxml.c Log Message: py-libxml2: work around a problem in error handling. In some cases, invalid UTF-8 strings were returned which caused python interpreter crashes. See https://github.com/itstool/itstool/issues/22 Use a variant of the patch that was used in Fedora. Bump PKGREVISION. --- Module Name: pkgsrc Committed By: adam Date: Wed Jan 9 19:09:03 UTC 2019 Modified Files: pkgsrc/textproc/libxml2: Makefile Makefile.common distinfo pkgsrc/textproc/py-libxml2: Makefile PLIST Added Files: pkgsrc/textproc/libxml2/patches: patch-Makefile.in patch-catalog.c patch-configure patch-doc_examples_Makefile.in patch-xmlcatalog.c Removed Files: pkgsrc/textproc/libxml2/patches: patch-aa patch-ab patch-ac patch-ad patch-ae patch-parser.c patch-result_errors_759573.xml.err patch-xpath.c patch-xzlib.c Log Message: libxml2: updated to 2.9.9 v2.9.9: Security: CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression CVE-2018-14404 Fix nullptr deref with XPath logic ops Documentation: reader: Fix documentation comment Portability: Fix MSVC build with lzma Variables need 'extern' in static lib on Cygwin Really declare dllexport/dllimport for Cygwin Merge branch 'patch-2' into 'master' Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 in $srcdir Improve error message if pkg.m4 couldn't be found NaN and Inf fixes for pre-C99 compilers Bug Fixes: Revert "Support xmlTextReaderNextSibling w/o preparsed doc" Fix building relative URIs Problem with data in interleave in RelaxNG validation Fix memory leak in xmlSwitchInputEncodingInt error path Set doc on element obtained from freeElems Fix HTML serialization with UTF-8 encoding Use actual doc in xmlTextReaderRead*Xml Unlink node before freeing it in xmlSAX2StartElement Check return value of nodePush in xmlSAX2StartElement Free input buffer in xmlHaltParser Reset HTML parser input pointers on encoding failure Don't run icu_parse_test if EUC-JP is unsupported Fix xmlSchemaValidCtxtPtr reuse memory leak Fix xmlTextReaderNext with preparsed document Remove stray character from comment Remove a misleading line from xmlCharEncOutput HTML noscript should not close p Don't change context node in xmlXPathRoot Stop using XPATH_OP_RESET Revert "Change calls to xmlCharEncInput to set flush false" Improvements: Fix "Problem with data in interleave in RelaxNG validation" cleanup: remove some unreachable code add --relative to testURI Remove redefined starts and defines inside include elements Allow choice within choice in nameClass in RELAX NG Look inside divs for starts and defines inside include Add compile and libxml2-config.cmake to .gitignore Stop using doc->charset outside parser code Add newlines to 'xmllint --xpath' output Don't include SAX.h from globals.h Support xmlTextReaderNextSibling w/o preparsed doc Don't instruct user to run make when autogen.sh failed Run Travis ASan tests with "sudo: required" Improve restoring of context size and position Simplify and harden nodeset filtering Avoid unnecessary backups of the context node Fix inconsistency in xmlXPathIsInf @ text @a0 92 $NetBSD: patch-configure,v 1.1 2019/01/09 19:09:03 adam Exp $ Various configure fixes: * Add run-path to XML_LIBDIR * Fix handling of pthreads * Add portability to OpenBSD, MirBSD, FreeBSD, NetBSD and DragonFly * Fix test for SAX Submitted as https://bugzilla.gnome.org/show_bug.cgi?id=766859 --- configure.orig 2017-11-02 20:16:48.000000000 +0000 +++ configure @@@@ -15084,7 +15084,7 @@@@ fi fi -XML_LIBDIR='-L${libdir}' +XML_LIBDIR='-Wl,-R${libdir} -L${libdir}' XML_INCLUDEDIR='-I${includedir}/libxml2' XML_CFLAGS="" @@@@ -15557,13 +15557,13 @@@@ else if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 -$as_echo_n "checking for pthread_join in -lpthread... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +$as_echo_n "checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; } if ${ac_cv_lib_pthread_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@@@ -15595,7 +15595,7 @@@@ fi $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then : - THREAD_LIBS="-lpthread" + THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" $as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h @@@@ -15617,12 +15617,12 @@@@ fi *beos*) WITH_THREADS="1" THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" ;; - *linux*) + *linux* | *openbsd* | *mirbsd*) if test "${GCC}" = "yes" ; then GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'` GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'` GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'` - if test "${THREAD_LIBS}" = "-lpthread" ; then + if test "${THREAD_LIBS}" = "${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" ; then if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null then THREAD_LIBS="" @@@@ -15639,6 +15639,10 @@@@ fi fi fi ;; + *freebsd* | *netbsd* | *dragonfly*) + THREAD_LIBS="" + BASE_THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" + ;; esac if test "$WITH_THREADS" = "1" ; then THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" @@@@ -15909,7 +15913,7 @@@@ else TEST_SAX=SAXtests fi - if test "${WITH_TRIO}" = "1"; then + if test "${WITH_SAX1}" = "1"; then WITH_SAX1_SOURCES_TRUE= WITH_SAX1_SOURCES_FALSE='#' else @@@@ -16493,10 +16497,6 @@@@ case "$host" in CPPFLAGS="$CPPFLAGS -DWIN32" WIN32_EXTRA_LIBADD="-lws2_32" WIN32_EXTRA_LDFLAGS="-no-undefined" - if test "${PYTHON}" != "" - then - WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)" - fi ;; *-*-cygwin*) CYGWIN_EXTRA_LDFLAGS="-no-undefined" @