Re: 01/01: gnu: itstool: Update to 2.0.4.

2017-11-05 Thread Kei Kebreau
Marius Bakke  writes:

> Kei Kebreau  writes:
>
>> kkebreau pushed a commit to branch master
>> in repository guix.
>>
>> commit 13fbd174b5ffe5c2cc59e637f7859d357ab33d97
>> Author: Kei Kebreau 
>> Date:   Thu Nov 2 15:33:08 2017 -0400
>>
>> gnu: itstool: Update to 2.0.4.
>> 
>> * gnu/packages/glib.scm (itstool): Update to 2.0.4.
>> [inputs]: Replace python and python-libxml2 with python-2 and
>> python2-libxml2.
>
> This update broke "gtk-doc", so I reverted it.  Can you look into it?
>
> `itstool` is actually segfaulting:
>
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash:
> line 4: 2798 Segmentation fault itstool -m "${mo}"
> ${d}/C/index.docbook ${d}/C/fdl-appendix.xml
> make[2]: *** [Makefile:523: de/de.stamp] Error 139
> make[2]: *** Waiting for unfinished jobs
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash:
> line 4: 2808 Segmentation fault itstool -m "${mo}"
> ${d}/C/index.docbook ${d}/C/fdl-appendix.xml
> make[2]: *** [Makefile:523: fr/fr.stamp] Error 139

The itstool developers are aware of this problem [0]. The latest itstool
branch builds gtk-doc successfully, but I will wait until the issue is
closed before committing another patch.

[0]: https://github.com/itstool/itstool/issues/17
From 5d08f10d184a661d0ee5ddf13cd894d9299a9e1b Mon Sep 17 00:00:00 2001
From: Kei Kebreau 
Date: Sun, 5 Nov 2017 15:20:50 -0500
Subject: [PATCH] gnu: itstool: Update to 2.0.4.

* gnu/packages/glib.scm (itstool): Update to 2.0.4.
[source]: Apply patch.
[inputs]: Replace python and python-libxml2 with python-2 and python2-libxml2.
* gnu/packages/patches/itstool-fix-segfault.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk|  1 +
 gnu/packages/glib.scm   | 10 +++--
 gnu/packages/patches/itstool-fix-segfault.patch | 50 +
 3 files changed, 57 insertions(+), 4 deletions(-)
 create mode 100644 gnu/packages/patches/itstool-fix-segfault.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index dbfe6829e..b45499153 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -744,6 +744,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/ilmbase-fix-tests.patch \
   %D%/packages/patches/intltool-perl-compatibility.patch   \
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch\
+  %D%/packages/patches/itstool-fix-segfault.patch  \
   %D%/packages/patches/jacal-fix-texinfo.patch \
   %D%/packages/patches/java-powermock-fix-java-files.patch \
   %D%/packages/patches/jbig2dec-ignore-testtest.patch  \
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index bc8775004..71c21bd64 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -395,19 +395,21 @@ The intltool collection can be used to do these things:
 (define itstool
   (package
 (name "itstool")
-(version "2.0.2")
+(version "2.0.4")
 (source (origin
  (method url-fetch)
  (uri (string-append "http://files.itstool.org/itstool/itstool-;
  version ".tar.bz2"))
  (sha256
   (base32
-   "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"
+   "0q7b4qrc758zfx3adsgvz0r93swdbxjr42w37rahngm33nshihlp"))
+ (patches
+  (search-patches "itstool-fix-segfault.patch"
 (build-system gnu-build-system)
 (inputs
  `(("libxml2" ,libxml2)
-   ("python2-libxml2" ,python2-libxml2)
-   ("python-2" ,python-2)))
+   ("python-libxml2" ,python-libxml2)
+   ("python" ,python)))
 (arguments
  '(#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/patches/itstool-fix-segfault.patch 
b/gnu/packages/patches/itstool-fix-segfault.patch
new file mode 100644
index 0..ed34aa18b
--- /dev/null
+++ b/gnu/packages/patches/itstool-fix-segfault.patch
@@ -0,0 +1,50 @@
+This patch comes from
+https://github.com/itstool/itstool/commit/9b84c007a73e8275ca45762f1bfa3ab7c3a852e2#diff-d15c1935d231593da203d653eef729ff.
+
+diff -ur a/itstool.in b/itstool.in
+--- a/itstool.in   2017-10-09 12:00:24.0 -0400
 b/itstool.in   2017-11-05 15:10:45.057031963 -0500
+@@ -477,6 +477,7 @@
+ if load_dtd:
+ ctxt.loadSubset(1)
+ if keep_entities:
++ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1043,6 +1044,7 @@
+ if self._load_dtd:
+ ctxt.loadSubset(1)
+ if self._keep_entities:
++ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1069,7 +1071,9 @@
+ 

Re: 01/01: gnu: itstool: Update to 2.0.4.

2017-11-02 Thread Marius Bakke
Kei Kebreau  writes:

> kkebreau pushed a commit to branch master
> in repository guix.
>
> commit 13fbd174b5ffe5c2cc59e637f7859d357ab33d97
> Author: Kei Kebreau 
> Date:   Thu Nov 2 15:33:08 2017 -0400
>
> gnu: itstool: Update to 2.0.4.
> 
> * gnu/packages/glib.scm (itstool): Update to 2.0.4.
> [inputs]: Replace python and python-libxml2 with python-2 and 
> python2-libxml2.

This update broke "gtk-doc", so I reverted it.  Can you look into it?

`itstool` is actually segfaulting:

/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
4:  2798 Segmentation fault  itstool -m "${mo}" ${d}/C/index.docbook 
${d}/C/fdl-appendix.xml
make[2]: *** [Makefile:523: de/de.stamp] Error 139
make[2]: *** Waiting for unfinished jobs
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
4:  2808 Segmentation fault  itstool -m "${mo}" ${d}/C/index.docbook 
${d}/C/fdl-appendix.xml
make[2]: *** [Makefile:523: fr/fr.stamp] Error 139


signature.asc
Description: PGP signature