Package: w3-dtd-mathml
Version: 2.0.0.0-5.1
Severity: grave
Tags: patch
Justification: renders package unusable
The incorrect amp and lt entity redefinition yields failures with
libxml2 2.9.12, which is now in Debian. This introduces a major
regression.
Here's a testcase for one of the buggy files.
$ cat test.xml
<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY % ent-isonum
PUBLIC "-//W3C//ENTITIES Numeric and Special Graphic for MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/isonum.ent">
%ent-isonum;
]>
<root/>
$ xmllint --nonet --noout --noent test.xml
error : xmlAddEntity: invalid redeclaration of predefined entity
error : xmlAddEntity: invalid redeclaration of predefined entity
The attached patch fixes this bug.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993638 about a
similar problem in the old w3c-dtd-xhtml package (no longer in Debian)
and the behavior of libxml2 2.9.12.
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500,
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages w3-dtd-mathml depends on:
ii sgml-base 1.30
ii xml-core 0.18+nmu1
w3-dtd-mathml recommends no packages.
Versions of packages w3-dtd-mathml suggests:
ii docbook-mathml 1.1CR1-2.1
-- no debconf information
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Description: Fix redeclaration of predefined entities amp and lt.
The redeclaration of these entities is invalid and libxml2 2.9.12
checks that a redeclaration is equivalent to the predefined one.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993638 about
the same issue in w3c-dtd-xhtml and a long discussion.
Author: Vincent Lefevre <[email protected]>
Last-Update: 2021-09-21
Index: b/isonum.ent
===================================================================
--- a/isonum.ent
+++ b/isonum.ent
@@ -25,7 +25,7 @@
-->
-<!ENTITY amp "&&" ><!--=ampersand -->
+<!ENTITY amp "&#38;" ><!--=ampersand -->
<!ENTITY apos "'" ><!--=apostrophe -->
<!ENTITY ast "*" ><!--/ast B: =asterisk -->
<!ENTITY brvbar "¦" ><!--=broken (vertical) bar -->
@@ -63,7 +63,7 @@
<!ENTITY lpar "(" ><!--O: =left parenthesis -->
<!ENTITY lsqb "[" ><!--/lbrack O: =left square bracket -->
<!ENTITY lsquo "‘" ><!--=single quotation mark, left -->
-<!ENTITY lt "&<" ><!--=less-than sign R: -->
+<!ENTITY lt "&#60;" ><!--=less-than sign R: -->
<!ENTITY micro "µ" ><!--=micro sign -->
<!ENTITY middot "·" ><!--/centerdot B: =middle dot -->
<!ENTITY nbsp " " ><!--=no break (required) space -->
Index: b/xhtml-math11-f.dtd
===================================================================
--- a/xhtml-math11-f.dtd
+++ b/xhtml-math11-f.dtd
@@ -1874,8 +1874,8 @@
<!-- C0 Controls and Basic Latin -->
<!ENTITY quot """ ><!-- quotation mark = APL quote, U+0022 ISOnum -->
-<!ENTITY amp "&" ><!-- ampersand, U+0026 ISOnum -->
-<!ENTITY lt "<" ><!-- less-than sign, U+003C ISOnum -->
+<!ENTITY amp "&#38;" ><!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#60;" ><!-- less-than sign, U+003C ISOnum -->
<!ENTITY gt ">" ><!-- greater-than sign, U+003E ISOnum -->
<!-- Latin Extended-A -->
@@ -8393,7 +8393,7 @@
-->
-<!ENTITY amp "&&" ><!--=ampersand -->
+<!ENTITY amp "&#38;" ><!--=ampersand -->
<!ENTITY apos "'" ><!--=apostrophe -->
<!ENTITY ast "*" ><!--/ast B: =asterisk -->
<!ENTITY brvbar "¦" ><!--=broken (vertical) bar -->
@@ -8431,7 +8431,7 @@
<!ENTITY lpar "(" ><!--O: =left parenthesis -->
<!ENTITY lsqb "[" ><!--/lbrack O: =left square bracket -->
<!ENTITY lsquo "‘" ><!--=single quotation mark, left -->
-<!ENTITY lt "&<" ><!--=less-than sign R: -->
+<!ENTITY lt "&#60;" ><!--=less-than sign R: -->
<!ENTITY micro "µ" ><!--=micro sign -->
<!ENTITY middot "·" ><!--/centerdot B: =middle dot -->
<!ENTITY nbsp " " ><!--=no break (required) space -->