* [PATCH] gnu: gnome-doc-utils: Do not omit tests
@ 2014-06-22 7:30 John Darrington
2014-06-22 19:40 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-06-22 7:30 UTC (permalink / raw)
To: guix-devel; +Cc: John Darrington
* gnu/packages/gnome.scm (gnome-doc-utils): Added pre-check phase and do not
skip check phase
---
gnu/packages/gnome.scm | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b10f2a6..97879e9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -26,6 +26,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gstreamer)
@@ -138,14 +139,39 @@ The gnome-about program helps find which version of GNOME is installed.")
(base32
"19n4x25ndzngaciiyd8dd6s2mf9gv6nv3wv27ggns2smm7zkj1nb"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys #:rest args)
+ ;; This stuff is needed, because without it, xmlint etc tries
+ ;; to download docbookx.dtd and docbook.xsl from the net
+ (let ((build (assoc-ref %standard-phases 'build))
+ (docbook-xml (assoc-ref inputs "docbook-xml"))
+ (docbook-xsl (assoc-ref inputs "docbook-xsl"))
+ (our-catalog "/tmp/docbook-xml.xml"))
+ (setenv "XML_CATALOG_FILES" our-catalog)
+ (with-output-to-file our-catalog
+ (lambda ()
+ (display (string-append
+ "<?xml version=\"1.0\"?>
+<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
+\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
+<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
+<system systemId=\"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"
+uri=\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/>
+<system systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"
+uri=\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
+</catalog>\n"))))))
+ %standard-phases)))
(native-inputs
`(("intltool" ,intltool)
+ ("docbook-xml" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("pkg-config" ,pkg-config)
("python-2" ,python-2)))
- (arguments
- `(#:tests? #f)) ; tries to load http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
(home-page "https://wiki.gnome.org/GnomeDocUtils")
(synopsis
"Documentation utilities for the Gnome project")
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: gnome-doc-utils: Do not omit tests
2014-06-22 7:30 [PATCH] gnu: gnome-doc-utils: Do not omit tests John Darrington
@ 2014-06-22 19:40 ` Ludovic Courtès
2014-06-23 4:44 ` John Darrington
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-22 19:40 UTC (permalink / raw)
To: John Darrington; +Cc: guix-devel
Hi!
John Darrington <jmd@gnu.org> skribis:
> * gnu/packages/gnome.scm (gnome-doc-utils): Added pre-check phase and do not
> skip check phase
[...]
> + ;; This stuff is needed, because without it, xmlint etc tries
> + ;; to download docbookx.dtd and docbook.xsl from the net
> + (let ((build (assoc-ref %standard-phases 'build))
> + (docbook-xml (assoc-ref inputs "docbook-xml"))
> + (docbook-xsl (assoc-ref inputs "docbook-xsl"))
> + (our-catalog "/tmp/docbook-xml.xml"))
> + (setenv "XML_CATALOG_FILES" our-catalog)
> + (with-output-to-file our-catalog
> + (lambda ()
> + (display (string-append
> + "<?xml version=\"1.0\"?>
> +<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
> +\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
> +<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
> +<system systemId=\"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"
> +uri=\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/>
> +<system systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"
> +uri=\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
> +</catalog>\n"))))))
> + %standard-phases)))
Seems about time to discuss factorization. :-)
Docbook-{XML,XSL} both provide a catalog.xml file. Would it be enough
to set XML_CATALOG_FILES=/first/one/catalog.xml:/second/one/catalog.xml
rather than creating a new catalog.xml file that just points to them?
If the answer is yes, then we might be able to use the ‘search-paths’
mechanism to automatically populate $XML_CATALOG_FILES.
WDYT?
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: gnome-doc-utils: Do not omit tests
2014-06-22 19:40 ` Ludovic Courtès
@ 2014-06-23 4:44 ` John Darrington
2014-06-23 8:12 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-06-23 4:44 UTC (permalink / raw)
To: Ludovic Court??s; +Cc: guix-devel, John Darrington
[-- Attachment #1: Type: text/plain, Size: 3086 bytes --]
On Sun, Jun 22, 2014 at 09:40:32PM +0200, Ludovic Court??s wrote:
John Darrington <jmd@gnu.org> skribis:
> * gnu/packages/gnome.scm (gnome-doc-utils): Added pre-check phase and do not
> skip check phase
[...]
> + ;; This stuff is needed, because without it, xmlint etc tries
> + ;; to download docbookx.dtd and docbook.xsl from the net
> + (let ((build (assoc-ref %standard-phases 'build))
> + (docbook-xml (assoc-ref inputs "docbook-xml"))
> + (docbook-xsl (assoc-ref inputs "docbook-xsl"))
> + (our-catalog "/tmp/docbook-xml.xml"))
> + (setenv "XML_CATALOG_FILES" our-catalog)
> + (with-output-to-file our-catalog
> + (lambda ()
> + (display (string-append
> + "<?xml version=\"1.0\"?>
> +<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
> +\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
> +<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
> +<system systemId=\"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"
> +uri=\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/>
> +<system systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"
> +uri=\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
> +</catalog>\n"))))))
> + %standard-phases)))
Seems about time to discuss factorization. :-)
Docbook-{XML,XSL} both provide a catalog.xml file. Would it be enough
to set XML_CATALOG_FILES=/first/one/catalog.xml:/second/one/catalog.xml
rather than creating a new catalog.xml file that just points to them?
The problem is, that some files refer to
http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
others to
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
or
http://www.oasis-open.org/docbook/xml/4.2.1/docbookx.dtd
Similarly, I have seen urls like
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
http://docbook.sourceforge.net/release/xsl/1.72/manpages/docbook.xsl
and other variations.
The purpose of the catalog file as I understand it, is to provide a map
from these urls to files on the local system. If a url does not have a mapping,
then it will attempt to download from the wild.
Now so far, we have got away with a n:1 mapping of ALL the dtd urls to a single
target regardless of version, and likewise with the xsl. However this approach is
likely to bite us sometime.
So I suppose the "correct" thing to do is to maintain a local archive of all the files,
including previous versions from oasis-open.org / sourceforge.net
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: gnome-doc-utils: Do not omit tests
2014-06-23 4:44 ` John Darrington
@ 2014-06-23 8:12 ` Ludovic Courtès
2014-06-23 9:02 ` John Darrington
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-23 8:12 UTC (permalink / raw)
To: John Darrington; +Cc: guix-devel, John Darrington
John Darrington <john@darrington.wattle.id.au> skribis:
> On Sun, Jun 22, 2014 at 09:40:32PM +0200, Ludovic Court??s wrote:
>
> John Darrington <jmd@gnu.org> skribis:
>
> > * gnu/packages/gnome.scm (gnome-doc-utils): Added pre-check phase and do not
> > skip check phase
>
> [...]
>
> > + ;; This stuff is needed, because without it, xmlint etc tries
> > + ;; to download docbookx.dtd and docbook.xsl from the net
> > + (let ((build (assoc-ref %standard-phases 'build))
> > + (docbook-xml (assoc-ref inputs "docbook-xml"))
> > + (docbook-xsl (assoc-ref inputs "docbook-xsl"))
> > + (our-catalog "/tmp/docbook-xml.xml"))
> > + (setenv "XML_CATALOG_FILES" our-catalog)
> > + (with-output-to-file our-catalog
> > + (lambda ()
> > + (display (string-append
> > + "<?xml version=\"1.0\"?>
> > +<!DOCTYPE catalog PUBLIC \"-//OASIS//DTD XML Catalogs V1.0//EN\"
> > +\"file:///usr/share/xml/schema/xml-core/catalog.dtd\">
> > +<catalog xmlns=\"urn:oasis:names:tc:entity:xmlns:xml:catalog\">
> > +<system systemId=\"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"
> > +uri=\"file://" docbook-xml "/xml/dtd/docbook/docbookx.dtd\"/>
> > +<system systemId=\"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\"
> > +uri=\"file://" docbook-xsl "/xml/xsl/docbook-xsl-1.72.0/manpages/docbook.xsl\"/>
> > +</catalog>\n"))))))
> > + %standard-phases)))
>
> Seems about time to discuss factorization. :-)
>
> Docbook-{XML,XSL} both provide a catalog.xml file. Would it be enough
> to set XML_CATALOG_FILES=/first/one/catalog.xml:/second/one/catalog.xml
> rather than creating a new catalog.xml file that just points to them?
>
> The problem is, that some files refer to
>
> http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
> others to
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> or
> http://www.oasis-open.org/docbook/xml/4.2.1/docbookx.dtd
>
> Similarly, I have seen urls like
> http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
> http://docbook.sourceforge.net/release/xsl/1.72/manpages/docbook.xsl
> and other variations.
This seems to be a matter of providing packages for all these versions,
no?
I suppose the catalog.xml file in the ‘docbook-xml-4.4’ package does the
right thing for the 4.4 URLs, doesn’t it?
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: gnome-doc-utils: Do not omit tests
2014-06-23 8:12 ` Ludovic Courtès
@ 2014-06-23 9:02 ` John Darrington
2014-06-23 12:22 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-06-23 9:02 UTC (permalink / raw)
To: Ludovic Court??s; +Cc: guix-devel, John Darrington
On Mon, Jun 23, 2014 at 10:12:31AM +0200, Ludovic Court??s wrote:
> http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
> others to
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> or
> http://www.oasis-open.org/docbook/xml/4.2.1/docbookx.dtd
>
> Similarly, I have seen urls like
> http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
> http://docbook.sourceforge.net/release/xsl/1.72/manpages/docbook.xsl
> and other variations.
This seems to be a matter of providing packages for all these versions,
no?
I suppose the catalog.xml file in the ???docbook-xml-4.4??? package does the
right thing for the 4.4 URLs, doesn???t it?
Presumably it would, but soo far as I'm aware, we don't have such a package. Do we?
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: gnome-doc-utils: Do not omit tests
2014-06-23 9:02 ` John Darrington
@ 2014-06-23 12:22 ` Ludovic Courtès
0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-23 12:22 UTC (permalink / raw)
To: John Darrington; +Cc: guix-devel, John Darrington
John Darrington <john@darrington.wattle.id.au> skribis:
> On Mon, Jun 23, 2014 at 10:12:31AM +0200, Ludovic Court??s wrote:
> > http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
> > others to
> > http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> > or
> > http://www.oasis-open.org/docbook/xml/4.2.1/docbookx.dtd
> >
> > Similarly, I have seen urls like
> > http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
> > http://docbook.sourceforge.net/release/xsl/1.72/manpages/docbook.xsl
> > and other variations.
>
> This seems to be a matter of providing packages for all these versions,
> no?
>
> I suppose the catalog.xml file in the ???docbook-xml-4.4??? package does the
> right thing for the 4.4 URLs, doesn???t it?
>
> Presumably it would, but soo far as I'm aware, we don't have such a package. Do we?
We have docbook-xml-4.5 so adding 4.4 shouldn’t be too hard. :-)
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-23 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-22 7:30 [PATCH] gnu: gnome-doc-utils: Do not omit tests John Darrington
2014-06-22 19:40 ` Ludovic Courtès
2014-06-23 4:44 ` John Darrington
2014-06-23 8:12 ` Ludovic Courtès
2014-06-23 9:02 ` John Darrington
2014-06-23 12:22 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).