libxml2 2.9.12+dfsg-3 causes regression
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libxml2 (Ubuntu) |
Fix Released
|
High
|
Mattia Rizzolo |
Bug Description
root@i1:~# cat example.xml
<domain type="qemu">
<name>
<os>
<type/>
</os>
<devices>
<interface type="bridge">
<mac address=
<model type="virtio"/>
<source bridge="br0"/>
<mtu size="9000"/>
<target dev="nicdc06549
<bandwidth>
<inbound average="100" peak="200" burst="300"/>
<outbound average="10" peak="20" burst="30"/>
</bandwidth>
</interface>
</devices>
</domain>
root@i1:~# cat xml.py
from lxml import etree
def parseXML(xmlFile):
# Parse the xml
with open(xmlFile) as fobj:
xml = fobj.read()
doc = etree.fromstrin
ret = doc.findall(
node_xml = etree.tostring(
print(
if __name__ == "__main__":
parseXML(
== Expected result ==
root@i1:~# python3 xml.py
node_xml=<interface type="bridge">
<mac address=
<model type="virtio"/>
<source bridge="br0"/>
<mtu size="9000"/>
<target dev="nicdc06549
<bandwidth>
<inbound average="100" peak="200" burst="300"/>
<outbound average="10" peak="20" burst="30"/>
</bandwidth>
</interface>
== Actual Result ==
root@i1:~# python3 xml.py
node_xml=<interface type="bridge">
<mac address=
<model type="virtio"/>
<source bridge="br0"/>
<mtu size="9000"/>
<target dev="nicdc06549
<bandwidth>
<inbound average="100" peak="200" burst="300"/>
<outbound average="10" peak="20" burst="30"/>
</bandwidth>
</interface>
</devices>
</domain>
This is broken in 2.9.12+dfsg-3 on impish.
It is not broken in 2.9.10+
There are some fixes in master since the 2.9.12 release was cut.
https:/
I'm planning to pick all 3 of the following commits from upstream master since they are all intertwined. With this patches the regression is fixed.
85b1792e37b131e
Work around lxml API abuse. Make xmlNodeDumpOutput and htmlNodeDumpFor
13ad8736d294536
Add patch from upstream to fix regression in xmlNodeDumpOutp
92d9ab4c28842a0
Add patch from upstream to fix whitespace when serializing empty HTML documents.
summary: |
- libxml2 causes regression in python3-lxml2 + libxml2 2.9.12+dfsg-3 causes regression |
description: | updated |
description: | updated |
Changed in libxml2 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in libxml2 (Ubuntu): | |
assignee: | nobody → Mattia Rizzolo (mapreri) |
status: | Triaged → Fix Committed |
This bug was fixed in the package libxml2 - 2.9.12+dfsg-4
---------------
libxml2 (2.9.12+dfsg-4) unstable; urgency=medium
* Team upload. utInternal. LP: #1943277 Write.
* Add a few patches from upstream:
+ Work around lxml API abuse.
+ Fix regression in xmlNodeDumpOutp
+ Fix whitespace when serializing empty HTML documents.
+ Forbid epsilon-reduction of final states.
+ Fix buffering in xmlOutputBuffer
-- Mattia Rizzolo <email address hidden> Fri, 10 Sep 2021 22:13:09 +0200