From f9df228dbde7e9b85b13721d33054481d66f0488 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 26 Jun 2025 11:11:45 +0900 Subject: [PATCH] gnu: docbook2x: Fix invalid lt entity re-declaration. This bug would cause multiple errors when building the documentation of Git, for example, like: error : xmlAddEntity: invalid redeclaration of predefined entity * gnu/packages/patches/docbook2x-entity-lt.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/docbook.scm (docbook2x) [source]: Apply it. Change-Id: I8d2e694ff4b97a1016644d3525b2cddb1b85f12d --- gnu/local.mk | 1 + gnu/packages/docbook.scm | 3 +- .../patches/docbook2x-entity-lt.patch | 44 +++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/docbook2x-entity-lt.patch diff --git a/gnu/local.mk b/gnu/local.mk index 150cb1474d996a1abc10bdca5f41e45bbb67c88c..2edcab36721da79c7a9bfbab03e46452fc79c0c6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1206,6 +1206,7 @@ dist_patch_DATA = \ %D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \ %D%/packages/patches/docbook-utils-source-date-epoch.patch \ %D%/packages/patches/docbook-utils-use-date-element.patch \ + %D%/packages/patches/docbook2x-entity-lt.patch \ %D%/packages/patches/docbook2x-filename-handling.patch \ %D%/packages/patches/docbook2x-fix-synopsis.patch \ %D%/packages/patches/docbook2x-manpage-typo.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 1e164f165a802fe784226e422251a6c195259452..49bea0daa13b959265ce48e9ee82cb54fef91597 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -909,7 +909,8 @@ Detect the differences in markup between two SGML files. "docbook2x-fix-synopsis.patch" "docbook2x-manpage-typo.patch" "docbook2x-preprocessor-declaration.patch" - "docbook2x-static-datadir-evaluation.patch")) + "docbook2x-static-datadir-evaluation.patch" + "docbook2x-entity-lt.patch")) (modules '((guix build utils))) (snippet ;; Fix a failing test (maybe it worked with old texinfo?) diff --git a/gnu/packages/patches/docbook2x-entity-lt.patch b/gnu/packages/patches/docbook2x-entity-lt.patch new file mode 100644 index 0000000000000000000000000000000000000000..74aa14a00ffe8eee7a190a71826fd3e4317353d7 --- /dev/null +++ b/gnu/packages/patches/docbook2x-entity-lt.patch @@ -0,0 +1,44 @@ +Upstream-status: https://sourceforge.net/p/docbook2x/bugs/25/ + +From 040f468fcfae3fe67818023ebc54f3f48fc1bfd9 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Mon, 24 Feb 2025 23:25:40 +0100 +Subject: [PATCH] Fix invalid redeclaration of predefined XML entity "<" + +Section "4.6 Predefined Entities" of XML 1.0r4 is clear that: + +> If the entities lt or amp are declared, they MUST be declared +> as internal entities whose replacement text is a character reference +> to the respective character (less-than sign or ampersand) being escaped[.] + +Source: +https://www.w3.org/TR/2006/REC-xml-20060816/#sec-predefined-ent +--- + xslt/common/text/l10n-set.xml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xslt/common/text/l10n-set.xml b/xslt/common/text/l10n-set.xml +index 0ed7454..b2c334b 100644 +--- a/xslt/common/text/l10n-set.xml ++++ b/xslt/common/text/l10n-set.xml +@@ -21,7 +21,7 @@ + + + +- ++ + + + +@@ -65,7 +65,7 @@ + ⁢ + &ja; + &ko; +-< ++<_; + &nl; + &nn; + &no; +-- +2.48.1 +