File project.diff of Package libxml2

--- libxml2-CVE-2025-7425.patch.orig
+++ libxml2-CVE-2025-7425.patch
@@ -71,24 +71,24 @@ Subject: [PATCH] libxslt: heap-use-after
  xmlschemastypes.c     | 10 +++++-----
  10 files changed, 63 insertions(+), 51 deletions(-)
 
-Index: libxml2-2.14.5/HTMLparser.c
+Index: libxml2-1765867295.3b2d4638/HTMLparser.c
 ===================================================================
---- libxml2-2.14.5.orig/HTMLparser.c
-+++ libxml2-2.14.5/HTMLparser.c
-@@ -2279,7 +2279,7 @@ htmlNewDocNoDtD(const xmlChar *URI, cons
+--- libxml2-1765867295.3b2d4638.orig/HTMLparser.c
++++ libxml2-1765867295.3b2d4638/HTMLparser.c
+@@ -2252,7 +2252,7 @@ htmlNewDocNoDtD(const xmlChar *URI, cons
      cur->refs = NULL;
      cur->_private = NULL;
      cur->charset = XML_CHAR_ENCODING_UTF8;
 -    cur->properties = XML_DOC_HTML | XML_DOC_USERBUILT;
 +    XML_DOC_SET_PROPERTIES(cur, XML_DOC_HTML | XML_DOC_USERBUILT);
-     if ((ExternalID != NULL) ||
+     if ((publicId != NULL) ||
  	(URI != NULL)) {
          xmlDtdPtr intSubset;
-Index: libxml2-2.14.5/SAX2.c
+Index: libxml2-1765867295.3b2d4638/SAX2.c
 ===================================================================
---- libxml2-2.14.5.orig/SAX2.c
-+++ libxml2-2.14.5/SAX2.c
-@@ -823,16 +823,16 @@ xmlSAX2StartDocument(void *ctx)
+--- libxml2-1765867295.3b2d4638.orig/SAX2.c
++++ libxml2-1765867295.3b2d4638/SAX2.c
+@@ -804,16 +804,16 @@ xmlSAX2StartDocument(void *ctx)
  	    xmlSAX2ErrMemory(ctxt);
  	    return;
  	}
@@ -108,32 +108,32 @@ Index: libxml2-2.14.5/SAX2.c
  	    doc->parseFlags = ctxt->options;
  	    doc->standalone = ctxt->standalone;
  	} else {
-Index: libxml2-2.14.5/include/libxml/tree.h
+Index: libxml2-1765867295.3b2d4638/include/libxml/tree.h
 ===================================================================
---- libxml2-2.14.5.orig/include/libxml/tree.h
-+++ libxml2-2.14.5/include/libxml/tree.h
-@@ -374,7 +374,6 @@ struct _xmlElement {
+--- libxml2-1765867295.3b2d4638.orig/include/libxml/tree.h
++++ libxml2-1765867295.3b2d4638/include/libxml/tree.h
+@@ -493,7 +493,6 @@ struct _xmlElement {
  #endif
  };
  
 -
  /**
-  * XML_LOCAL_NAMESPACE:
-  *
-@@ -462,6 +461,10 @@ struct _xmlAttr {
-  * An XML ID instance.
+  * A namespace declaration node.
   */
+@@ -614,6 +613,10 @@ struct _xmlAttr {
+     struct _xmlID   *id XML_DEPRECATED_MEMBER;
+ };
  
 +#define XML_ATTR_CLEAR_ATYPE(attr) (((attr)->atype) = 0)
 +#define XML_ATTR_GET_ATYPE(attr) (((attr)->atype) & ~(15U << 27))
 +#define XML_ATTR_SET_ATYPE(attr, type) ((attr)->atype = ((((attr)->atype) & (15U << 27)) | ((type) & ~(15U << 27))))
 +
+ /** Extra data for ID attributes */
  typedef struct _xmlID xmlID;
  typedef xmlID *xmlIDPtr;
- struct _xmlID {
-@@ -551,6 +554,11 @@ typedef enum {
-     XML_DOC_HTML		= 1<<7  /* parsed or built HTML document */
- } xmlDocProperties;
+@@ -755,6 +758,11 @@ struct _xmlNode {
+     unsigned short   extra;
+ };
  
 +#define XML_NODE_ADD_EXTRA(node, type) ((node)->extra |= ((type) & ~(15U << 12)))
 +#define XML_NODE_CLEAR_EXTRA(node) (((node)->extra) = 0)
@@ -141,10 +141,10 @@ Index: libxml2-2.14.5/include/libxml/tre
 +#define XML_NODE_SET_EXTRA(node, type) ((node)->extra = ((((node)->extra) & (15U << 12)) | ((type) & ~(15U << 12))))
 +
  /**
-  * xmlDoc:
-  *
-@@ -594,6 +602,10 @@ struct _xmlDoc {
- 				   set at the end of parsing */
+  * Set of properties of the document as found by the parser.
+  * Some of them are linked to similarly named xmlParserOption.
+@@ -846,6 +854,10 @@ struct _xmlDoc {
+     int             properties;
  };
  
 +#define XML_DOC_ADD_PROPERTIES(doc, type) ((doc)->properties |= ((type) & ~(15U << 27)))
@@ -152,13 +152,13 @@ Index: libxml2-2.14.5/include/libxml/tre
 +#define XML_DOC_GET_PROPERTIES(doc) (((doc)->properties) & ~(15U << 27))
 +#define XML_DOC_SET_PROPERTIES(doc, type) ((doc)->properties = ((((doc)->properties) & (15U << 27)) | ((type) & ~(15U << 27))))
  
+ /** Context for DOM wrapper operations */
  typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
- typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
-Index: libxml2-2.14.5/parser.c
+Index: libxml2-1765867295.3b2d4638/parser.c
 ===================================================================
---- libxml2-2.14.5.orig/parser.c
-+++ libxml2-2.14.5/parser.c
-@@ -5782,7 +5782,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt
+--- libxml2-1765867295.3b2d4638.orig/parser.c
++++ libxml2-1765867295.3b2d4638/parser.c
+@@ -5506,7 +5506,7 @@ xmlParseEntityDecl(xmlParserCtxt *ctxt)
  			    xmlErrMemory(ctxt);
  			    goto done;
  			}
@@ -167,7 +167,7 @@ Index: libxml2-2.14.5/parser.c
  		    }
  		    if (ctxt->myDoc->intSubset == NULL) {
  			ctxt->myDoc->intSubset = xmlNewDtd(ctxt->myDoc,
-@@ -5840,7 +5840,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt
+@@ -5564,7 +5564,7 @@ xmlParseEntityDecl(xmlParserCtxt *ctxt)
  			        xmlErrMemory(ctxt);
  				goto done;
  			    }
@@ -176,16 +176,16 @@ Index: libxml2-2.14.5/parser.c
  			}
  
  			if (ctxt->myDoc->intSubset == NULL) {
-@@ -7280,7 +7280,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr
+@@ -7041,7 +7041,7 @@ xmlParseExternalSubset(xmlParserCtxt *ct
  	    xmlErrMemory(ctxt);
  	    return;
  	}
 -	ctxt->myDoc->properties = XML_DOC_INTERNAL;
 +	XML_DOC_SET_PROPERTIES(ctxt->myDoc, XML_DOC_INTERNAL);
      }
-     if ((ctxt->myDoc != NULL) && (ctxt->myDoc->intSubset == NULL) &&
-         (xmlCreateIntSubset(ctxt->myDoc, NULL, ExternalID, SystemID) == NULL)) {
-@@ -7544,7 +7544,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt)
+     if ((ctxt->myDoc->intSubset == NULL) &&
+         (xmlCreateIntSubset(ctxt->myDoc, NULL, publicId, systemId) == NULL)) {
+@@ -7308,7 +7308,7 @@ xmlParseReference(xmlParserCtxt *ctxt) {
  
              if (ctxt->parseMode == XML_PARSE_READER) {
                  /* Needed for reader */
@@ -194,7 +194,7 @@ Index: libxml2-2.14.5/parser.c
                  /* Maybe needed for reader */
                  copy->_private = cur->_private;
              }
-@@ -11772,7 +11772,7 @@ xmlCtxtParseDtd(xmlParserCtxtPtr ctxt, x
+@@ -11495,7 +11495,7 @@ xmlCtxtParseDtd(xmlParserCtxt *ctxt, xml
          xmlErrMemory(ctxt);
          goto error;
      }
@@ -203,12 +203,12 @@ Index: libxml2-2.14.5/parser.c
      ctxt->myDoc->extSubset = xmlNewDtd(ctxt->myDoc, BAD_CAST "none",
                                         publicId, systemId);
      if (ctxt->myDoc->extSubset == NULL) {
-Index: libxml2-2.14.5/runxmlconf.c
+Index: libxml2-1765867295.3b2d4638/runxmlconf.c
 ===================================================================
---- libxml2-2.14.5.orig/runxmlconf.c
-+++ libxml2-2.14.5/runxmlconf.c
-@@ -180,7 +180,7 @@ xmlconfTestInvalid(const char *id, const
- 	         id, filename);
+--- libxml2-1765867295.3b2d4638.orig/runxmlconf.c
++++ libxml2-1765867295.3b2d4638/runxmlconf.c
+@@ -182,7 +182,7 @@ xmlconfTestInvalid(const char *id, const
+         ret = 0;
      } else {
      /* invalidity should be reported both in the context and in the document */
 -        if ((ctxt->valid != 0) || (doc->properties & XML_DOC_DTDVALID)) {
@@ -216,7 +216,7 @@ Index: libxml2-2.14.5/runxmlconf.c
  	    test_log("test %s : %s failed to detect invalid document\n",
  		     id, filename);
  	    nb_errors++;
-@@ -213,7 +213,7 @@ xmlconfTestValid(const char *id, const c
+@@ -215,7 +215,7 @@ xmlconfTestValid(const char *id, const c
  	ret = 0;
      } else {
      /* validity should be reported both in the context and in the document */
@@ -225,11 +225,11 @@ Index: libxml2-2.14.5/runxmlconf.c
  	    test_log("test %s : %s failed to validate a valid document\n",
  		     id, filename);
  	    nb_errors++;
-Index: libxml2-2.14.5/tree.c
+Index: libxml2-1765867295.3b2d4638/tree.c
 ===================================================================
---- libxml2-2.14.5.orig/tree.c
-+++ libxml2-2.14.5/tree.c
-@@ -1084,7 +1084,7 @@ xmlNewDoc(const xmlChar *version) {
+--- libxml2-1765867295.3b2d4638.orig/tree.c
++++ libxml2-1765867295.3b2d4638/tree.c
+@@ -901,7 +901,7 @@ xmlNewDoc(const xmlChar *version) {
      cur->compression = -1; /* not initialized */
      cur->doc = cur;
      cur->parseFlags = 0;
@@ -238,37 +238,7 @@ Index: libxml2-2.14.5/tree.c
      /*
       * The in memory encoding is always UTF8
       * This field will never change and would
-@@ -1892,7 +1892,7 @@ xmlFreeProp(xmlAttrPtr cur) {
- 	xmlDeregisterNodeDefaultValue((xmlNodePtr)cur);
- 
-     /* Check for ID removal -> leading to invalid references ! */
--    if ((cur->doc != NULL) && (cur->atype == XML_ATTRIBUTE_ID)) {
-+    if ((cur->doc != NULL) && (XML_ATTR_GET_ATYPE(cur) == XML_ATTRIBUTE_ID)) {
- 	    xmlRemoveID(cur->doc, cur);
-     }
-     if (cur->children != NULL) xmlFreeNodeList(cur->children);
-@@ -2736,7 +2736,7 @@ xmlNodeSetDoc(xmlNodePtr node, xmlDocPtr
-              * TODO: ID attributes should also be added to the new
-              * document, but it's not clear how to handle clashes.
-              */
--            if (attr->atype == XML_ATTRIBUTE_ID)
-+            if (XML_ATTR_GET_ATYPE(attr) == XML_ATTRIBUTE_ID)
-                 xmlRemoveID(oldDoc, attr);
- 
-             break;
-@@ -6919,9 +6919,9 @@ xmlSetNsProp(xmlNodePtr node, xmlNsPtr n
-                 return(NULL);
-         }
- 
--	if (prop->atype == XML_ATTRIBUTE_ID) {
-+	if (XML_ATTR_GET_ATYPE(prop) == XML_ATTRIBUTE_ID) {
- 	    xmlRemoveID(node->doc, prop);
--	    prop->atype = XML_ATTRIBUTE_ID;
-+	    XML_ATTR_SET_ATYPE(prop, XML_ATTRIBUTE_ID);
- 	}
- 	if (prop->children != NULL)
- 	    xmlFreeNodeList(prop->children);
-@@ -6941,7 +6941,7 @@ xmlSetNsProp(xmlNodePtr node, xmlNsPtr n
+@@ -6591,7 +6591,7 @@ xmlSetNsProp(xmlNode *node, xmlNs *ns, c
  		tmp = tmp->next;
  	    }
  	}
@@ -277,7 +247,7 @@ Index: libxml2-2.14.5/tree.c
  	    (xmlAddIDSafe(prop, value) < 0)) {
              return(NULL);
          }
-@@ -8402,7 +8402,7 @@ ns_end:
+@@ -8025,7 +8025,7 @@ ns_end:
  		if (cur->type == XML_ELEMENT_NODE) {
  		    cur->psvi = NULL;
  		    cur->line = 0;
@@ -286,11 +256,11 @@ Index: libxml2-2.14.5/tree.c
  		    /*
  		    * Walk attributes.
  		    */
-Index: libxml2-2.14.5/valid.c
+Index: libxml2-1765867295.3b2d4638/valid.c
 ===================================================================
---- libxml2-2.14.5.orig/valid.c
-+++ libxml2-2.14.5/valid.c
-@@ -2316,7 +2316,7 @@ xmlFreeID(xmlIDPtr id) {
+--- libxml2-1765867295.3b2d4638.orig/valid.c
++++ libxml2-1765867295.3b2d4638/valid.c
+@@ -2162,7 +2162,7 @@ xmlFreeID(xmlIDPtr id) {
  	DICT_FREE(id->name)
      if (id->attr != NULL) {
          id->attr->id = NULL;
@@ -299,7 +269,7 @@ Index: libxml2-2.14.5/valid.c
      }
  
      xmlFree(id);
-@@ -2395,7 +2395,7 @@ xmlAddIDInternal(xmlAttrPtr attr, const
+@@ -2239,7 +2239,7 @@ xmlAddIDInternal(xmlAttrPtr attr, const
  
      id->attr = attr;
      id->lineno = xmlGetLineNo(attr->parent);
@@ -308,37 +278,7 @@ Index: libxml2-2.14.5/valid.c
      attr->id = id;
  
      return(ret);
-@@ -3275,7 +3275,7 @@ xmlValidNormalizeString(xmlChar *str) {
- 
- static int
- xmlIsDocNameStartChar(xmlDocPtr doc, int c) {
--    if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
-+    if ((doc == NULL) || (XML_DOC_GET_PROPERTIES(doc) & XML_DOC_OLD10) == 0) {
-         /*
- 	 * Use the new checks of production [4] [4a] amd [5] of the
- 	 * Update 5 of XML-1.0
-@@ -3305,7 +3305,7 @@ xmlIsDocNameStartChar(xmlDocPtr doc, int
- 
- static int
- xmlIsDocNameChar(xmlDocPtr doc, int c) {
--    if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
-+    if ((doc == NULL) || (XML_DOC_GET_PROPERTIES(doc) & XML_DOC_OLD10) == 0) {
-         /*
- 	 * Use the new checks of production [4] [4a] amd [5] of the
- 	 * Update 5 of XML-1.0
-@@ -4296,9 +4296,9 @@ xmlValidateOneAttribute(xmlValidCtxtPtr
- 	       attr->name, elem->name, NULL);
- 	return(0);
-     }
--    if (attr->atype == XML_ATTRIBUTE_ID)
-+    if (XML_ATTR_GET_ATYPE(attr) == XML_ATTRIBUTE_ID)
-         xmlRemoveID(doc, attr);
--    attr->atype = attrDecl->atype;
-+    XML_ATTR_SET_ATYPE(attr, attrDecl->atype);
- 
-     val = xmlValidateAttributeValueInternal(doc, attrDecl->atype, value);
-     if (val == 0) {
-@@ -6318,7 +6318,7 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt
+@@ -5901,7 +5901,7 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt
  	    while (IS_BLANK_CH(*cur)) cur++;
  	}
  	xmlFree(dup);
@@ -347,7 +287,7 @@ Index: libxml2-2.14.5/valid.c
  	id = xmlGetID(ctxt->doc, name);
  	if (id == NULL) {
  	    xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
-@@ -6326,7 +6326,7 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt
+@@ -5909,7 +5909,7 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt
  		   attr->name, name, NULL);
  	    ctxt->valid = 0;
  	}
@@ -356,11 +296,11 @@ Index: libxml2-2.14.5/valid.c
  	xmlChar *dup, *str = NULL, *cur, save;
  
  	dup = xmlStrdup(name);
-Index: libxml2-2.14.5/xmlreader.c
+Index: libxml2-1765867295.3b2d4638/xmlreader.c
 ===================================================================
---- libxml2-2.14.5.orig/xmlreader.c
-+++ libxml2-2.14.5/xmlreader.c
-@@ -667,7 +667,7 @@ xmlTextReaderStartElement(void *ctx, con
+--- libxml2-1765867295.3b2d4638.orig/xmlreader.c
++++ libxml2-1765867295.3b2d4638/xmlreader.c
+@@ -655,7 +655,7 @@ xmlTextReaderStartElement(void *ctx, con
  	if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
  	    (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
  	    (ctxt->input->cur[1] == '>'))
@@ -369,7 +309,7 @@ Index: libxml2-2.14.5/xmlreader.c
      }
      if (reader != NULL)
  	reader->state = XML_TEXTREADER_ELEMENT;
-@@ -726,7 +726,7 @@ xmlTextReaderStartElementNs(void *ctx,
+@@ -712,7 +712,7 @@ xmlTextReaderStartElementNs(void *ctx,
  	if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
  	    (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
  	    (ctxt->input->cur[1] == '>'))
@@ -378,7 +318,7 @@ Index: libxml2-2.14.5/xmlreader.c
      }
      if (reader != NULL)
  	reader->state = XML_TEXTREADER_ELEMENT;
-@@ -1128,7 +1128,7 @@ skip_children:
+@@ -1105,7 +1105,7 @@ skip_children:
  	        xmlNodePtr tmp;
  		if (reader->entNr == 0) {
  		    while ((tmp = node->last) != NULL) {
@@ -387,7 +327,7 @@ Index: libxml2-2.14.5/xmlreader.c
  			    xmlUnlinkNode(tmp);
  			    xmlTextReaderFreeNode(reader, tmp);
  			} else
-@@ -1339,7 +1339,7 @@ get_next_node:
+@@ -1310,7 +1310,7 @@ get_next_node:
  	if ((oldstate == XML_TEXTREADER_ELEMENT) &&
              (reader->node->type == XML_ELEMENT_NODE) &&
  	    (reader->node->children == NULL) &&
@@ -396,7 +336,7 @@ Index: libxml2-2.14.5/xmlreader.c
  #ifdef LIBXML_XINCLUDE_ENABLED
  	    && (reader->in_xinclude <= 0)
  #endif
-@@ -1354,7 +1354,7 @@ get_next_node:
+@@ -1325,7 +1325,7 @@ get_next_node:
                  return(-1);
  #endif /* LIBXML_REGEXP_ENABLED */
          if ((reader->preserves > 0) &&
@@ -405,7 +345,7 @@ Index: libxml2-2.14.5/xmlreader.c
  	    reader->preserves--;
  	reader->node = reader->node->next;
  	reader->state = XML_TEXTREADER_ELEMENT;
-@@ -1370,7 +1370,7 @@ get_next_node:
+@@ -1341,7 +1341,7 @@ get_next_node:
  	    (reader->node->prev != NULL) &&
              (reader->node->prev->type != XML_DTD_NODE)) {
  	    xmlNodePtr tmp = reader->node->prev;
@@ -414,7 +354,7 @@ Index: libxml2-2.14.5/xmlreader.c
                  if (oldnode == tmp)
                      oldnode = NULL;
  		xmlUnlinkNode(tmp);
-@@ -1383,7 +1383,7 @@ get_next_node:
+@@ -1354,7 +1354,7 @@ get_next_node:
      if ((oldstate == XML_TEXTREADER_ELEMENT) &&
  	(reader->node->type == XML_ELEMENT_NODE) &&
  	(reader->node->children == NULL) &&
@@ -423,7 +363,7 @@ Index: libxml2-2.14.5/xmlreader.c
  	reader->state = XML_TEXTREADER_END;
  	goto node_found;
      }
-@@ -1395,7 +1395,7 @@ get_next_node:
+@@ -1366,7 +1366,7 @@ get_next_node:
      }
  #endif /* LIBXML_REGEXP_ENABLED */
      if ((reader->preserves > 0) &&
@@ -432,7 +372,7 @@ Index: libxml2-2.14.5/xmlreader.c
  	reader->preserves--;
      reader->node = reader->node->parent;
      if ((reader->node == NULL) ||
-@@ -1422,7 +1422,7 @@ get_next_node:
+@@ -1393,7 +1393,7 @@ get_next_node:
  #endif
  	    (reader->entNr == 0) &&
  	    (oldnode->type != XML_DTD_NODE) &&
@@ -441,7 +381,7 @@ Index: libxml2-2.14.5/xmlreader.c
  	    xmlUnlinkNode(oldnode);
  	    xmlTextReaderFreeNode(reader, oldnode);
  	}
-@@ -1435,7 +1435,7 @@ get_next_node:
+@@ -1406,7 +1406,7 @@ get_next_node:
  #endif
  	(reader->entNr == 0) &&
          (reader->node->last != NULL) &&
@@ -450,7 +390,7 @@ Index: libxml2-2.14.5/xmlreader.c
  	xmlNodePtr tmp = reader->node->last;
  	xmlUnlinkNode(tmp);
  	xmlTextReaderFreeNode(reader, tmp);
-@@ -1638,7 +1638,7 @@ xmlTextReaderNext(xmlTextReaderPtr reade
+@@ -1603,7 +1603,7 @@ xmlTextReaderNext(xmlTextReader *reader)
          return(xmlTextReaderRead(reader));
      if (reader->state == XML_TEXTREADER_END || reader->state == XML_TEXTREADER_BACKTRACK)
          return(xmlTextReaderRead(reader));
@@ -459,7 +399,7 @@ Index: libxml2-2.14.5/xmlreader.c
          return(xmlTextReaderRead(reader));
      do {
          ret = xmlTextReaderRead(reader);
-@@ -3094,7 +3094,7 @@ xmlTextReaderIsEmptyElement(xmlTextReade
+@@ -3009,7 +3009,7 @@ xmlTextReaderIsEmptyElement(xmlTextReade
      if (reader->in_xinclude > 0)
          return(1);
  #endif
@@ -468,7 +408,7 @@ Index: libxml2-2.14.5/xmlreader.c
  }
  
  /**
-@@ -3962,15 +3962,15 @@ xmlTextReaderPreserve(xmlTextReaderPtr r
+@@ -3823,15 +3823,15 @@ xmlTextReaderPreserve(xmlTextReader *rea
          return(NULL);
  
      if ((cur->type != XML_DOCUMENT_NODE) && (cur->type != XML_DTD_NODE)) {
@@ -487,11 +427,11 @@ Index: libxml2-2.14.5/xmlreader.c
  	parent = parent->parent;
      }
      return(cur);
-Index: libxml2-2.14.5/xmlschemas.c
+Index: libxml2-1765867295.3b2d4638/xmlschemas.c
 ===================================================================
---- libxml2-2.14.5.orig/xmlschemas.c
-+++ libxml2-2.14.5/xmlschemas.c
-@@ -5857,7 +5857,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserC
+--- libxml2-1765867295.3b2d4638.orig/xmlschemas.c
++++ libxml2-1765867295.3b2d4638/xmlschemas.c
+@@ -5706,7 +5706,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserC
  	/*
  	* NOTE: the IDness might have already be declared in the DTD
  	*/
@@ -500,11 +440,11 @@ Index: libxml2-2.14.5/xmlschemas.c
  	    xmlChar *strip;
              int res;
  
-Index: libxml2-2.14.5/xmlschemastypes.c
+Index: libxml2-1765867295.3b2d4638/xmlschemastypes.c
 ===================================================================
---- libxml2-2.14.5.orig/xmlschemastypes.c
-+++ libxml2-2.14.5/xmlschemastypes.c
-@@ -3084,7 +3084,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
+--- libxml2-1765867295.3b2d4638.orig/xmlschemastypes.c
++++ libxml2-1765867295.3b2d4638/xmlschemastypes.c
+@@ -3043,7 +3043,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
                  /*
                   * NOTE: the IDness might have already be declared in the DTD
                   */
@@ -513,7 +453,7 @@ Index: libxml2-2.14.5/xmlschemastypes.c
                      xmlChar *strip;
                      int res;
  
-@@ -3122,7 +3122,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
+@@ -3081,7 +3081,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
                      xmlFree(strip);
                  } else
                      xmlAddRef(NULL, node->doc, value, attr);
@@ -522,7 +462,7 @@ Index: libxml2-2.14.5/xmlschemastypes.c
              }
              goto done;
          case XML_SCHEMAS_IDREFS:
-@@ -3136,7 +3136,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
+@@ -3095,7 +3095,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
                  (node->type == XML_ATTRIBUTE_NODE)) {
                  xmlAttrPtr attr = (xmlAttrPtr) node;
  
@@ -531,7 +471,7 @@ Index: libxml2-2.14.5/xmlschemastypes.c
              }
              goto done;
          case XML_SCHEMAS_ENTITY:{
-@@ -3167,7 +3167,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
+@@ -3126,7 +3126,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
                      (node->type == XML_ATTRIBUTE_NODE)) {
                      xmlAttrPtr attr = (xmlAttrPtr) node;
  
@@ -540,7 +480,7 @@ Index: libxml2-2.14.5/xmlschemastypes.c
                  }
                  goto done;
              }
-@@ -3184,7 +3184,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
+@@ -3143,7 +3143,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr
                  (node->type == XML_ATTRIBUTE_NODE)) {
                  xmlAttrPtr attr = (xmlAttrPtr) node;
  
--- libxml2.spec.orig
+++ libxml2.spec
@@ -26,20 +26,17 @@
 
 %{?sle15allpythons}
 Name:           libxml2%{?dash}%{flavor}
-Version:        2.14.5
+Version:        1765867295.3b2d4638
 Release:        0
 License:        MIT
 Summary:        A Library to Manipulate XML Files
 URL:            https://gitlab.gnome.org/GNOME/libxml2
-Source0:        https://download.gnome.org/sources/%{name}/2.14/libxml2-%{version}.tar.xz
+Source0:        libxml2-%{version}.tar.xz
 Source1:        baselibs.conf
 # W3C Conformance tests
 Source2:        https://www.w3.org/XML/Test/xmlts20080827.tar.gz
 
 ### -- Upstream patches range from 0 to 999 -- ###
-# PATCH-FIX-UPSTREAM libxml2-python3-unicode-errors.patch bsc#1064286 mcepl@suse.com
-# remove segfault after doc.freeDoc()
-Patch0:         libxml2-python3-unicode-errors.patch
 # PATCH-FIX-UPSTREAM libxml2-python3-string-null-check.patch bsc#1065270 mgorse@suse.com
 # https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/15
 Patch1:         libxml2-python3-string-null-check.patch
@@ -47,8 +44,13 @@ Patch1:         libxml2-python3-string-n
 Patch2:         libxml2-CVE-2025-7425.patch
 #
 BuildRequires:  fdupes
+BuildRequires:  autoconf-archive
+BuildRequires:  automake
+BuildRequires:  doxygen
+BuildRequires:  libtool
 BuildRequires:  pkgconfig
 BuildRequires:  readline-devel
+BuildRequires:  xsltproc
 BuildRequires:  pkgconfig(liblzma)
 BuildRequires:  pkgconfig(zlib)
 %if 0%{?buildpython}
@@ -150,16 +152,17 @@ either at parse time or later once the d
 
 %prep
 %autosetup -p1 -n libxml2-%{version}
-sed -i '1 s|/usr/bin/env python|/usr/bin/python3|' doc/apibuild.py
 
 %build
 %if ! 0%{?buildpython}
 # TODO -- Document why are we using the -fno-strict-aliasing extra flag.
 export CFLAGS="%{optflags} -fno-strict-aliasing"
+autoreconf -fvi
 %configure \
     --disable-silent-rules \
     --disable-static \
     --docdir=%{_docdir}/%{base_name} \
+    --with-docs \
     --without-python \
     --with-history \
     --enable-ipv6 \
@@ -225,8 +228,8 @@ rm -rf xmlconf/ # remove the conformance
 %files -n %{base_name}-tools
 %{_bindir}/xmllint
 %{_bindir}/xmlcatalog
-%{_mandir}/man1/xmllint.1%{?ext_man}
-%{_mandir}/man1/xmlcatalog.1%{?ext_man}
+# %{_mandir}/man1/xmllint.1%{?ext_man}
+# %{_mandir}/man1/xmlcatalog.1%{?ext_man}
 
 %files -n %{base_name}-devel
 %{_bindir}/xml2-config
@@ -235,7 +238,7 @@ rm -rf xmlconf/ # remove the conformance
 %{_libdir}/lib*.so
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/cmake
-%{_mandir}/man1/xml2-config.1%{?ext_man}
+# %{_mandir}/man1/xml2-config.1%{?ext_man}
 
 %files -n %{base_name}-doc
 %doc %dir %{_docdir}/%{base_name}
openSUSE Build Service is sponsored by