guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 8c10a6e59f4ba1481a93c2e956991e9acb4f11bd
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.
Signed-off-by: Liliana Marie Prikler <[email protected]>
Merges: guix/guix#11769
---
gnu/packages/glib.scm | 4 +++-
gnu/packages/patches/itstool-fix-segfault.patch | 11 +++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
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: