guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit e79df32ede4ccee4d55551874776a493d31f91a1
Author: FuncProgLinux <[email protected]>
AuthorDate: Sat Oct 10 19:07:21 2026 -0600

    gnu: itstool: Fix segfault when merging translations.
    
    * gnu/packages/glib.scm (itstool)[source]: Add patch.
    * gnu/packages/patches/itstool-fix-segfault.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add itstool-fix-segfault.patch.
    
    Change-Id: I85c42af2ac7aba8532d47b043bc507b889b07db0
    Signed-off-by: Liliana Marie Prikler <[email protected]>
    Merges: guix/guix#11769
---
 gnu/local.mk                                    |  1 +
 gnu/packages/glib.scm                           |  4 +++-
 gnu/packages/patches/itstool-fix-segfault.patch | 11 +++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index ddc5df9afee..d7c6fad68b0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1695,6 +1695,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/inkscape-poppler-26-2.patch             \
   %D%/packages/patches/inkscape-poppler-26-3.patch             \
   %D%/packages/patches/instead-use-games-path.patch            \
+  %D%/packages/patches/itstool-fix-segfault.patch      \
   %D%/packages/patches/intltool-perl-compatibility.patch       \
   %D%/packages/patches/insight-toolkit-fix-build.patch                 \
   %D%/packages/patches/irrlicht-use-system-libs.patch          \
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 6251ab97b72..bb0488c76e5 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -714,7 +714,9 @@ The intltool collection can be used to do these things:
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))))
+               "1jl7gsr7aclb9nvqazr039m86y7f7ivfhl2pixcrbfqjkb97r6kb"))
+             (patches
+              (search-patches "itstool-fix-segfault.patch"))))
     (build-system gnu-build-system)
     (inputs
      (list bash-minimal libxml2 python))
diff --git a/gnu/packages/patches/itstool-fix-segfault.patch 
b/gnu/packages/patches/itstool-fix-segfault.patch
new file mode 100644
index 00000000000..b07c4d2e032
--- /dev/null
+++ b/gnu/packages/patches/itstool-fix-segfault.patch
@@ -0,0 +1,11 @@
+--- a/itstool.in
++++ b/itstool.in
+@@ -1073,7 +1073,7 @@ class Document (object):
+         else:
+             ctxt.replaceEntities(1)
+         ctxt.parseDocument()
+-        trnode = ctxt.doc().getRootElement()
++        trnode = ctxt.doc().getRootElement().copyNode(1)
+         try:
+             self._check_errors()
+         except libxml2.parserError:

Reply via email to