GNU bug report logs - #26077
[PATCH] gnu: asciidoc: Add XML and XSLT support.

Previous Next

Package: guix-patches;

Reported by: Kei Kebreau <kei <at> openmailbox.org>

Date: Sun, 12 Mar 2017 21:51:01 UTC

Severity: normal

Tags: patch

Done: Kei Kebreau <kei <at> openmailbox.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26077 in the body.
You can then email your comments to 26077 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Sun, 12 Mar 2017 21:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kei Kebreau <kei <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 12 Mar 2017 21:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: guix-patches <at> gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Sun, 12 Mar 2017 17:49:54 -0400
* gnu/packages/documentation.scm (asciidoc)[arguments]: Add
set-xml-binary-paths phase.
[inputs]: Add libxml2 and libxslt.
---
 gnu/packages/documentation.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index bbc25e879..58bfb1a93 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014, 2016 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2016 Roel Janssen <roel <at> gnu.org>
+;;; Copyright © 2017 Kei Kebreau <kei <at> openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +54,20 @@
      `(#:tests? #f                     ; no 'check' target
        #:phases
        (modify-phases %standard-phases
+         ;; Some binaries are required for asciidoc's proper usage.
+         ;; The following phase enables asciidoc to find some of them.
+         (add-before 'configure 'set-xml-binary-paths
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let* ((libxml2 (assoc-ref inputs "libxml2"))
+                              (xmllint (string-append libxml2 "/bin/xmllint"))
+                              (libxslt (assoc-ref inputs "libxslt"))
+                              (xsltproc (string-append libxslt "/bin/xsltproc")))
+                         (substitute* "a2x.py"
+                           (("XMLLINT = 'xmllint'")
+                            (string-append "XMLLINT = '" xmllint "'"))
+                           (("XSLTPROC = 'xsltproc'")
+                            (string-append "XSLTPROC = '" xsltproc "'")))
+                         #t)))
          ;; Make asciidoc use the local docbook-xsl package instead of fetching
          ;; it from the internet at run-time.
          (add-before 'install 'make-local-docbook-xsl
@@ -67,7 +82,9 @@ release/xsl/current")
                                           ,(package-version docbook-xsl)))))
                        #t)))))
     (inputs `(("python" ,python-2)
-              ("docbook-xsl" ,docbook-xsl)))
+              ("docbook-xsl" ,docbook-xsl)
+              ("libxml2" ,libxml2)
+              ("libxslt" ,libxslt)))
     (home-page "http://www.methods.co.nz/asciidoc/")
     (synopsis "Text-based document generation system")
     (description
-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Mon, 13 Mar 2017 04:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: 26077 <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Mon, 13 Mar 2017 00:07:22 -0400
[Message part 1 (text/plain, inline)]
On Sun, Mar 12, 2017 at 05:49:54PM -0400, Kei Kebreau wrote:
> * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
> set-xml-binary-paths phase.
> [inputs]: Add libxml2 and libxslt.

>         #:phases
>         (modify-phases %standard-phases
> +         ;; Some binaries are required for asciidoc's proper usage.

Can you add a few words about what goes wrong if asciidoc can't find
them?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Mon, 13 Mar 2017 16:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: 26077 <at> debbugs.gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Mon, 13 Mar 2017 12:09:09 -0400
* gnu/packages/documentation.scm (asciidoc)[arguments]: Add
set-xml-binary-paths phase.
[inputs]: Add libxml2 and libxslt.
---
 gnu/packages/documentation.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index bbc25e879..94e979c88 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014, 2016 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2016 Roel Janssen <roel <at> gnu.org>
+;;; Copyright © 2017 Kei Kebreau <kei <at> openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +54,23 @@
      `(#:tests? #f                     ; no 'check' target
        #:phases
        (modify-phases %standard-phases
+         ;; Some XML-related binaries are required for asciidoc's proper usage.
+         ;; Without these, asciidoc fails when parsing XML documents, either
+         ;; reporting a missing "xmllint" binary or, when passed the
+         ;; "--no-xmllint" option, a missing "xsltproc" binary.
+         ;; The following phase enables asciidoc to find some of them.
+         (add-before 'configure 'set-xml-binary-paths
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let* ((libxml2 (assoc-ref inputs "libxml2"))
+                              (xmllint (string-append libxml2 "/bin/xmllint"))
+                              (libxslt (assoc-ref inputs "libxslt"))
+                              (xsltproc (string-append libxslt "/bin/xsltproc")))
+                         (substitute* "a2x.py"
+                           (("XMLLINT = 'xmllint'")
+                            (string-append "XMLLINT = '" xmllint "'"))
+                           (("XSLTPROC = 'xsltproc'")
+                            (string-append "XSLTPROC = '" xsltproc "'")))
+                         #t)))
          ;; Make asciidoc use the local docbook-xsl package instead of fetching
          ;; it from the internet at run-time.
          (add-before 'install 'make-local-docbook-xsl
@@ -67,7 +85,9 @@ release/xsl/current")
                                           ,(package-version docbook-xsl)))))
                        #t)))))
     (inputs `(("python" ,python-2)
-              ("docbook-xsl" ,docbook-xsl)))
+              ("docbook-xsl" ,docbook-xsl)
+              ("libxml2" ,libxml2)
+              ("libxslt" ,libxslt)))
     (home-page "http://www.methods.co.nz/asciidoc/")
     (synopsis "Text-based document generation system")
     (description
-- 
2.12.0





Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Mon, 13 Mar 2017 16:18:02 GMT) Full text and rfc822 format available.

Message #14 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Kei Kebreau <kei <at> openmailbox.org>, 26077 <at> debbugs.gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Mon, 13 Mar 2017 17:17:32 +0100
[Message part 1 (text/plain, inline)]
Kei Kebreau <kei <at> openmailbox.org> writes:

> * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
> set-xml-binary-paths phase.
> [inputs]: Add libxml2 and libxslt.

LGTM. I guess this removes the need to add libxml2 and libxslt to
packages using asciidoc, e.g. offlineimap.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Mon, 13 Mar 2017 16:58:01 GMT) Full text and rfc822 format available.

Message #17 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 26077 <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Mon, 13 Mar 2017 12:56:38 -0400
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> On Sun, Mar 12, 2017 at 05:49:54PM -0400, Kei Kebreau wrote:
>> * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
>> set-xml-binary-paths phase.
>> [inputs]: Add libxml2 and libxslt.
>
>>         #:phases
>>         (modify-phases %standard-phases
>> +         ;; Some binaries are required for asciidoc's proper usage.
>
> Can you add a few words about what goes wrong if asciidoc can't find
> them?

Yes I can! Please see the new patch that I submitted.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Mon, 13 Mar 2017 17:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 26077 <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Mon, 13 Mar 2017 13:17:46 -0400
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Kei Kebreau <kei <at> openmailbox.org> writes:
>
>> * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
>> set-xml-binary-paths phase.
>> [inputs]: Add libxml2 and libxslt.
>
> LGTM. I guess this removes the need to add libxml2 and libxslt to
> packages using asciidoc, e.g. offlineimap.

Yes. Debian dealt with the same problem a few years back[1]. Nowadays
libxml2-utils is a dependency of asciidoc-base, though I'm not sure what
is done about xsltproc. Nevertheless, it's used by upstream along with
some other tools[2].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692274

[2] http://asciidoc.org/README.html
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Tue, 14 Mar 2017 17:43:02 GMT) Full text and rfc822 format available.

Message #23 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 26077 <at> debbugs.gnu.org, Kei Kebreau <kei <at> openmailbox.org>
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Tue, 14 Mar 2017 13:42:00 -0400
[Message part 1 (text/plain, inline)]
On Mon, Mar 13, 2017 at 05:17:32PM +0100, Marius Bakke wrote:
> Kei Kebreau <kei <at> openmailbox.org> writes:
> 
> > * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
> > set-xml-binary-paths phase.
> > [inputs]: Add libxml2 and libxslt.
> 
> LGTM. I guess this removes the need to add libxml2 and libxslt to
> packages using asciidoc, e.g. offlineimap.

LGTM, too. Can you let us know if you plan to remove libxml2 and libxslt
from the asciidoc users? If not, someone else can do it :)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Tue, 14 Mar 2017 20:00:02 GMT) Full text and rfc822 format available.

Message #26 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: Marius Bakke <mbakke <at> fastmail.com>, 26077 <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Tue, 14 Mar 2017 15:59:46 -0400
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> On Mon, Mar 13, 2017 at 05:17:32PM +0100, Marius Bakke wrote:
>> Kei Kebreau <kei <at> openmailbox.org> writes:
>> 
>> > * gnu/packages/documentation.scm (asciidoc)[arguments]: Add
>> > set-xml-binary-paths phase.
>> > [inputs]: Add libxml2 and libxslt.
>> 
>> LGTM. I guess this removes the need to add libxml2 and libxslt to
>> packages using asciidoc, e.g. offlineimap.
>
> LGTM, too. Can you let us know if you plan to remove libxml2 and libxslt
> from the asciidoc users? If not, someone else can do it :)

I'd be more than happy to do it, provided I could figure out a good way
to format the log message. :)

Also, I pushed this commit to master as
9099a45792306fade2d9ca55138e49ef4f01f1ea.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26077; Package guix-patches. (Tue, 14 Mar 2017 20:07:01 GMT) Full text and rfc822 format available.

Message #29 received at 26077 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Kei Kebreau <kei <at> openmailbox.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, 26077 <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Tue, 14 Mar 2017 16:06:27 -0400
[Message part 1 (text/plain, inline)]
On Tue, Mar 14, 2017 at 03:59:46PM -0400, Kei Kebreau wrote:
> Leo Famulari <leo <at> famulari.name> writes:
> > LGTM, too. Can you let us know if you plan to remove libxml2 and libxslt
> > from the asciidoc users? If not, someone else can do it :)
> 
> I'd be more than happy to do it, provided I could figure out a good way
> to format the log message. :)

I'd just remove them with the typical "Remove foo" changelog message,
but then add a free-form comment explaining the situation.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Kei Kebreau <kei <at> openmailbox.org>:
You have taken responsibility. (Fri, 17 Mar 2017 01:48:02 GMT) Full text and rfc822 format available.

Notification sent to Kei Kebreau <kei <at> openmailbox.org>:
bug acknowledged by developer. (Fri, 17 Mar 2017 01:48:02 GMT) Full text and rfc822 format available.

Message #34 received at 26077-done <at> debbugs.gnu.org (full text, mbox):

From: Kei Kebreau <kei <at> openmailbox.org>
To: 26077-done <at> debbugs.gnu.org
Subject: Re: bug#26077: [PATCH] gnu: asciidoc: Add XML and XSLT support.
Date: Thu, 16 Mar 2017 21:47:29 -0400
[Message part 1 (text/plain, inline)]
Close entry.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Apr 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.