GNU bug report logs - #50131
[PATCH 0/3] Add docbook2x and generate lxc man pages.

Previous Next

Package: guix-patches;

Reported by: Andrew Whatson <whatson <at> gmail.com>

Date: Fri, 20 Aug 2021 12:04:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.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 50131 in the body.
You can then email your comments to 50131 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#50131; Package guix-patches. (Fri, 20 Aug 2021 12:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Whatson <whatson <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 20 Aug 2021 12:04:02 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Add docbook2x and generate lxc man pages.
Date: Fri, 20 Aug 2021 22:03:17 +1000
Andrew Whatson (3):
  gnu: Prefix licenses in docbook module.
  gnu: Add docbook2x.
  gnu: Generate man pages for lxc.

 gnu/packages/docbook.scm        |  103 +++++++++++++++++++++++++++++---
 gnu/packages/virtualization.scm |    9 ++
 2 files changed, 103 insertions(+), 9 deletions(-)




Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 20 Aug 2021 12:10:02 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: 50131 <at> debbugs.gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH 1/3] gnu: Prefix licenses in docbook module.
Date: Fri, 20 Aug 2021 22:09:05 +1000
This prevents conflicts between expat package and expat license.

* gnu/packages/docbook.scm (docbook-xml-5): Prefix license variable.
(docbook-xsl): Likewise.
(docbook-dsssl): Likewise.
(docbook-dsssl-doc): Likewise.
(docbook-sgml): Likewise.
(iso-8879-entities): Likewise.
(dblatex): Likewise.
---
 gnu/packages/docbook.scm | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 1945fb6a4b..6a69f8cf89 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -31,7 +31,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages base)
   #:use-module (gnu packages xml)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module ((guix build utils) #:select (alist-replace))
@@ -77,7 +77,7 @@
      "DocBook is general purpose XML and SGML document type particularly well
 suited to books and papers about computer hardware and software (though it is
 by no means limited to these applications.)  This package provides XML DTDs.")
-    (license (x11-style "" "See file headers."))))
+    (license (license:x11-style "" "See file headers."))))
 
 (define-public docbook-xml
   (package
@@ -215,7 +215,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (synopsis "DocBook XSL style sheets for document authoring")
     (description
      "This package provides XSL style sheets for DocBook.")
-    (license (x11-style "" "See 'COPYING' file."))))
+    (license (license:x11-style "" "See 'COPYING' file."))))
 
 (define-public docbook-dsssl
   (package
@@ -256,7 +256,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (home-page "https://docbook.org/")
     (synopsis "DSSSL style sheets for DocBook")
     (description "This package provides DSSSL style sheets for DocBook.")
-    (license (non-copyleft "file://README"))))
+    (license (license:non-copyleft "file://README"))))
 
 ;;; Private variable, used as the 'doc' output of the docbook-dsssl package.
 (define docbook-dsssl-doc
@@ -294,7 +294,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (home-page "https://docbook.org/")
     (synopsis "DocBook DSSSL style sheets documentation")
     (description "Documentation for the DocBook DSSSL style sheets.")
-    (license (non-copyleft "file://doc/LEGALNOTICE.htm"))))
+    (license (license:non-copyleft "file://doc/LEGALNOTICE.htm"))))
 
 (define-public docbook-sgml
   (package
@@ -336,7 +336,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (home-page "https://docbook.org")
     (synopsis "DocBook SGML style sheets for document authoring")
     (description "This package provides SGML style sheets for DocBook.")
-    (license (x11-style "" "See file headers."))))
+    (license (license:x11-style "" "See file headers."))))
 
 (define-public docbook-sgml-3.1
   (package
@@ -377,7 +377,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
     (synopsis "ISO 8879 character entities")
     (description "ISO 8879 character entities that are typically used in
 the in DocBook SGML DTDs.")
-    (license (x11-style "" "See file headers."))))
+    (license (license:x11-style "" "See file headers."))))
 
 (define-public dblatex
   (package
@@ -461,7 +461,7 @@ to DVI, PostScript or PDF by translating them in pure LaTeX as a first
 process.  MathML 2.0 markups are supported too.  It started as a clone of
 DB2LaTeX.")
     ;; lib/contrib/which is under an X11 license
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 ;; This is a variant of the 'dblatex' package that is not updated often.  It
 ;; is intended to be used as a native-input at build-time only, e.g. by
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 20 Aug 2021 12:10:02 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: 50131 <at> debbugs.gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH 2/3] gnu: Add docbook2x.
Date: Fri, 20 Aug 2021 22:09:06 +1000
* gnu/packages/docbook.scm (docbook2x): New variable.
---
 gnu/packages/docbook.scm | 87 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6a69f8cf89..fdc432eb20 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Mark H Weaver <mhw <at> netris.org>
+;;; Copyright © 2021 Andrew Whatson <whatson <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,10 +25,13 @@
 
 (define-module (gnu packages docbook)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages tex)
+  #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages base)
   #:use-module (gnu packages xml)
@@ -35,6 +39,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module ((guix build utils) #:select (alist-replace))
+  #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system python))
 
@@ -473,3 +478,85 @@ DB2LaTeX.")
    (package/inherit dblatex
      (inputs (alist-replace "imagemagick" `(,imagemagick/stable)
                             (package-inputs dblatex))))))
+
+(define-public docbook2x
+  (package
+    (name "docbook2x")
+    (version "0.8.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/docbook2x/docbook2x/"
+                                  version "/docbook2X-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("bash-minimal" ,bash-minimal)
+       ("docbook-xml" ,docbook-xml)
+       ("perl" ,perl)
+       ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
+       ("perl-xml-parser" ,perl-xml-parser)
+       ("perl-xml-sax" ,perl-xml-sax)
+       ("perl-xml-sax-base" ,perl-xml-sax-base)
+       ("texinfo" ,texinfo)
+       ("xsltproc" ,libxslt)))
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--prefix=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-sources
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Fix failed substitution in config.pl
+             (substitute* "perl/config.pl"
+               (("\\$\\{prefix\\}")
+                (assoc-ref outputs "out")))
+             ;; Fix a failing test (maybe it worked with old texinfo?)
+             (substitute* "test/complete-manuals/at1.xml"
+               (("<bridgehead>")
+                "<bridgehead renderas=\"sect2\">"))
+             ;; Patch all the tests use DocBook 4.5
+             (substitute* (find-files "test" "\\.xml$")
+               (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
+                "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
+               (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
+                "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
+             ;; Set XML catalogs for tests to pass
+             (setenv "XML_CATALOG_FILES"
+                     (string-append (assoc-ref inputs "docbook-xml")
+                                    "/xml/dtd/docbook/catalog.xml"))))
+         (add-after 'install 'wrap-programs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (programs
+                     (map (lambda (p)
+                            (string-append out "/bin/" p))
+                          '("db2x_manxml" "db2x_texixml" "db2x_xsltproc"
+                            "docbook2man" "docbook2texi")))
+                    (perl5lib
+                     (map (lambda (i)
+                            (string-append (assoc-ref inputs i)
+                                           "/lib/perl5/site_perl"))
+                          '("perl-xml-namespacesupport"
+                            "perl-xml-parser"
+                            "perl-xml-sax"
+                            "perl-xml-sax-base")))
+                    (xml-catalog-files
+                     (list (string-append (assoc-ref inputs "docbook-xml")
+                                          "/xml/dtd/docbook/catalog.xml"))))
+               (map (lambda (program)
+                      (wrap-program program
+                        `("PERL5LIB" ":" prefix
+                          ,perl5lib)
+                        `("XML_CATALOG_FILES" " " prefix
+                          ,xml-catalog-files)))
+                    programs)))))))
+    (home-page "http://docbook2x.sourceforge.net")
+    (synopsis "Convert DocBook to man page and Texinfo format")
+    (description
+     "docbook2X is a software package that converts DocBook documents into the
+traditional Unix man page format and the GNU Texinfo format.  Notable features
+include table support for man pages, internationalization support, and easy
+customization of the output using XSLT.")
+    (license license:expat)))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 20 Aug 2021 12:10:03 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: 50131 <at> debbugs.gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH 3/3] gnu: Generate man pages for lxc.
Date: Fri, 20 Aug 2021 22:09:07 +1000
* gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
[phases]{patch-docbook-dtd}: New phase.
---
 gnu/packages/virtualization.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 1bbcb46b99..f1a9e28d3f 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings are also provided.")
                 "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("docbook2x" ,docbook2x)))
     (inputs
      `(("gnutls" ,gnutls)
        ("libcap" ,libcap)
@@ -1022,6 +1023,12 @@ all common programming languages.  Vala bindings are also provided.")
              "--localstatedir=/var")
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'patch-docbook-dtd
+           (lambda _
+             ;; Fix incorrect DocBook DTD
+             (substitute* "configure"
+               (("\\\\\"-//Davenport//DTD DocBook V3\\.0//EN\\\\\"")
+                "\\\"-//OASIS//DTD DocBook XML\\\" \\\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\\""))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out         (assoc-ref outputs "out"))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Thu, 26 Aug 2021 15:38:01 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 50131 <at> debbugs.gnu.org, Andrew Whatson <whatson <at> gmail.com>
Subject: Re: [bug#50131] [PATCH 2/3] gnu: Add docbook2x.
Date: Thu, 26 Aug 2021 12:36:45 -0300
Hello Andrew,

Em sexta-feira, 20 de agosto de 2021, às 09:09:06 -03, Andrew Whatson 
escreveu:
> * gnu/packages/docbook.scm (docbook2x): New variable.
> ---
>  gnu/packages/docbook.scm | 87 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 87 insertions(+)

FWIW, this looks good to me. Just one minor comment below.
 
> @@ -473,3 +478,85 @@ DB2LaTeX.")
>     (package/inherit dblatex
>       (inputs (alist-replace "imagemagick" `(,imagemagick/stable)
>                              (package-inputs dblatex))))))
> +
> +(define-public docbook2x
> +  (package
> +    (name "docbook2x")
> +    (version "0.8.8")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> "mirror://sourceforge/docbook2x/docbook2x/" +                           
>       version "/docbook2X-" version ".tar.gz")) +              (sha256
> +               (base32
> +               
> "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0")))) +   
> (build-system gnu-build-system)
> +    (inputs
> +     `(("bash-minimal" ,bash-minimal)
> +       ("docbook-xml" ,docbook-xml)
> +       ("perl" ,perl)
> +       ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
> +       ("perl-xml-parser" ,perl-xml-parser)
> +       ("perl-xml-sax" ,perl-xml-sax)
> +       ("perl-xml-sax-base" ,perl-xml-sax-base)
> +       ("texinfo" ,texinfo)
> +       ("xsltproc" ,libxslt)))
> +    (arguments
> +     `(#:configure-flags
> +       (list (string-append "--prefix=" (assoc-ref %outputs "out")))

There’s no need to pass the prefix argument. ‘gnu-build-system’ already 
does it.

-- 
Thanks,
Thiago







Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Thu, 26 Aug 2021 15:51:02 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 50131 <at> debbugs.gnu.org, Andrew Whatson <whatson <at> gmail.com>
Subject: Re: [bug#50131] [PATCH 3/3] gnu: Generate man pages for lxc.
Date: Thu, 26 Aug 2021 12:49:51 -0300
Hello Andrew,

Em sexta-feira, 20 de agosto de 2021, às 09:09:07 -03, Andrew Whatson 
escreveu:
> * gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
> [phases]{patch-docbook-dtd}: New phase.
> ---
>  gnu/packages/virtualization.scm | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Looks good to me. Just one question below.

> diff --git a/gnu/packages/virtualization.scm
> b/gnu/packages/virtualization.scm index 1bbcb46b99..f1a9e28d3f 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings
> are also provided.")
> "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci")))) (build-system
> gnu-build-system)
>      (native-inputs
> -     `(("pkg-config" ,pkg-config)))
> +     `(("pkg-config" ,pkg-config)
> +       ("docbook2x" ,docbook2x)))
>      (inputs
>       `(("gnutls" ,gnutls)
>         ("libcap" ,libcap)
> @@ -1022,6 +1023,12 @@ all common programming languages.  Vala bindings
> are also provided.") "--localstatedir=/var")
>         #:phases
>         (modify-phases %standard-phases
> +         (add-before 'configure 'patch-docbook-dtd
> +           (lambda _
> +             ;; Fix incorrect DocBook DTD
> +             (substitute* "configure"
> +               (("\\\\\"-//Davenport//DTD DocBook V3\\.0//EN\\\\\"")
> +                "\\\"-//OASIS//DTD DocBook XML\\\"
> \\\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\\""))))

Has this fix been submitted upstream, or is it already available in a newer 
lxc version? Ideally, we wouldn’t have to carry this change indefinitely.

The same question would apply to the substitutions made in docbook2x, but 
that project seems abandoned so there’s no point.

-- 
Thanks,
Thiago






Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 27 Aug 2021 04:17:02 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: 50131 <at> debbugs.gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH 2/3 v2] gnu: Add docbook2x.
Date: Fri, 27 Aug 2021 14:15:36 +1000
* gnu/packages/docbook.scm (docbook2x): New variable.
---
 gnu/packages/docbook.scm | 94 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6a69f8cf89..ba90376e8b 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Mark H Weaver <mhw <at> netris.org>
+;;; Copyright © 2021 Andrew Whatson <whatson <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,10 +25,13 @@
 
 (define-module (gnu packages docbook)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages tex)
+  #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages base)
   #:use-module (gnu packages xml)
@@ -35,6 +39,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module ((guix build utils) #:select (alist-replace))
+  #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system python))
 
@@ -473,3 +478,92 @@ DB2LaTeX.")
    (package/inherit dblatex
      (inputs (alist-replace "imagemagick" `(,imagemagick/stable)
                             (package-inputs dblatex))))))
+
+(define-public docbook2x
+  (package
+    (name "docbook2x")
+    (version "0.8.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/docbook2x/docbook2x/"
+                                  version "/docbook2X-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("bash-minimal" ,bash-minimal)
+       ("docbook-xml" ,docbook-xml)
+       ("perl" ,perl)
+       ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
+       ("perl-xml-parser" ,perl-xml-parser)
+       ("perl-xml-sax" ,perl-xml-sax)
+       ("perl-xml-sax-base" ,perl-xml-sax-base)
+       ("texinfo" ,texinfo)
+       ("xsltproc" ,libxslt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-sources
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Fix failed substitution in config.pl
+             (substitute* "perl/config.pl"
+               (("\\$\\{prefix\\}")
+                (assoc-ref outputs "out")))
+             ;; Fix a failing test (maybe it worked with old texinfo?)
+             (substitute* "test/complete-manuals/at1.xml"
+               (("<bridgehead>")
+                "<bridgehead renderas=\"sect2\">"))
+             ;; Patch all the tests use DocBook 4.5
+             (substitute* (find-files "test" "\\.xml$")
+               (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
+                "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
+               (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
+                "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
+             ;; Set XML catalogs for tests to pass
+             (setenv "XML_CATALOG_FILES"
+                     (string-append (assoc-ref inputs "docbook-xml")
+                                    "/xml/dtd/docbook/catalog.xml"))))
+         (add-after 'install 'wrap-programs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (programs
+                     (map (lambda (p)
+                            (string-append out "/bin/" p))
+                          '("db2x_manxml" "db2x_texixml" "db2x_xsltproc"
+                            "docbook2man" "docbook2texi")))
+                    (perl5lib
+                     (map (lambda (i)
+                            (string-append (assoc-ref inputs i)
+                                           "/lib/perl5/site_perl"))
+                          '("perl-xml-namespacesupport"
+                            "perl-xml-parser"
+                            "perl-xml-sax"
+                            "perl-xml-sax-base")))
+                    (xml-catalog-files
+                     (list (string-append (assoc-ref inputs "docbook-xml")
+                                          "/xml/dtd/docbook/catalog.xml"))))
+               (map (lambda (program)
+                      (wrap-program program
+                        `("PERL5LIB" ":" prefix
+                          ,perl5lib)
+                        `("XML_CATALOG_FILES" " " prefix
+                          ,xml-catalog-files)))
+                    programs))))
+         (add-after 'install 'create-symlinks
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               ;; Create db2x_* symlinks to satisfy some configure scripts
+               ;; which use these names to differentiate from an older
+               ;; docbook2man script provided by docbook-utils.
+               (map (lambda (prog)
+                      (symlink prog (string-append out "/bin/db2x_" prog)))
+                    '("docbook2man" "docbook2texi"))))))))
+    (home-page "http://docbook2x.sourceforge.net")
+    (synopsis "Convert DocBook to man page and Texinfo format")
+    (description
+     "docbook2X is a software package that converts DocBook documents into the
+traditional Unix man page format and the GNU Texinfo format.  Notable features
+include table support for man pages, internationalization support, and easy
+customization of the output using XSLT.")
+    (license license:expat)))
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 27 Aug 2021 04:17:02 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: 50131 <at> debbugs.gnu.org
Cc: Andrew Whatson <whatson <at> gmail.com>
Subject: [PATCH 3/3 v2] gnu: Generate man pages for lxc.
Date: Fri, 27 Aug 2021 14:15:38 +1000
* gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
---
 gnu/packages/virtualization.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index e952c009b5..667dd0fa3e 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings are also provided.")
                 "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("docbook2x" ,docbook2x)))
     (inputs
      `(("gnutls" ,gnutls)
        ("libcap" ,libcap)
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 27 Aug 2021 04:22:01 GMT) Full text and rfc822 format available.

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

From: Andrew Whatson <whatson <at> gmail.com>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: 50131 <at> debbugs.gnu.org
Subject: Re: [bug#50131] [PATCH 3/3] gnu: Generate man pages for lxc.
Date: Fri, 27 Aug 2021 04:21:06 +0000
On Thu, 26 Aug 2021 at 15:37, Thiago Jung Bauermann
<bauermann <at> kolabnow.com> wrote:
>
> There’s no need to pass the prefix argument. ‘gnu-build-system’ already
> does it.

Thanks, fixed in the revised patch.

> > +         (add-before 'configure 'patch-docbook-dtd
> > +           (lambda _
> > +             ;; Fix incorrect DocBook DTD
> > +             (substitute* "configure"
> > +               (("\\\\\"-//Davenport//DTD DocBook V3\\.0//EN\\\\\"")
> > +                "\\\"-//OASIS//DTD DocBook XML\\\"
> > \\\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\\""))))
>
> Has this fix been submitted upstream, or is it already available in a newer
> lxc version? Ideally, we wouldn’t have to carry this change indefinitely.

The lxc configure script checks for both db2x_docbook2man and
docbook2man (in that order).  If it finds docbook2man, it assumes this
is an older tool and formats the documents with the wrong DTD.  I've
revised the docbook2x package to provide a db2x_docbook2man symlink as
it's possible other packages using docbook2x will make the same
assumption.  This means patching configure is no longure required.

> The same question would apply to the substitutions made in docbook2x, but
> that project seems abandoned so there’s no point.

Similar fixes for docbook2x are found in the arch & nix builds, and
actually some have been incorporated into its CVS repo but never been
released.  I haven't tried to get in touch with upstream, but I guess
it's worth a shot.

Thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#50131; Package guix-patches. (Fri, 27 Aug 2021 17:49:02 GMT) Full text and rfc822 format available.

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

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: 50131 <at> debbugs.gnu.org
Subject: Re: [bug#50131] [PATCH 3/3 v2] gnu: Generate man pages for lxc.
Date: Fri, 27 Aug 2021 14:48:06 -0300
Hello Andrew,

Em sexta-feira, 27 de agosto de 2021, às 01:15:38 -03, Andrew Whatson 
escreveu:
> * gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
> ---
>  gnu/packages/virtualization.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/virtualization.scm
> b/gnu/packages/virtualization.scm index e952c009b5..667dd0fa3e 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings
> are also provided.")
> "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci")))) (build-system
> gnu-build-system)
>      (native-inputs
> -     `(("pkg-config" ,pkg-config)))
> +     `(("pkg-config" ,pkg-config)
> +       ("docbook2x" ,docbook2x)))
>      (inputs
>       `(("gnutls" ,gnutls)
>         ("libcap" ,libcap)

Awesome! Both patch 2/3 v2 and this one look good to me.
The symlink trick was a great find.

-- 
Thanks,
Thiago






Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 13 Sep 2021 10:31:02 GMT) Full text and rfc822 format available.

Notification sent to Andrew Whatson <whatson <at> gmail.com>:
bug acknowledged by developer. (Mon, 13 Sep 2021 10:31:03 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
Cc: Andrew Whatson <whatson <at> gmail.com>, 50131-done <at> debbugs.gnu.org
Subject: Re: bug#50131: [PATCH 0/3] Add docbook2x and generate lxc man pages.
Date: Mon, 13 Sep 2021 12:30:20 +0200
Hello,

Thiago Jung Bauermann <bauermann <at> kolabnow.com> skribis:

> Em sexta-feira, 27 de agosto de 2021, às 01:15:38 -03, Andrew Whatson 
> escreveu:
>> * gnu/packages/virtualization.scm (lxc)[inputs]: Add docboo2x.
>> ---
>>  gnu/packages/virtualization.scm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/gnu/packages/virtualization.scm
>> b/gnu/packages/virtualization.scm index e952c009b5..667dd0fa3e 100644
>> --- a/gnu/packages/virtualization.scm
>> +++ b/gnu/packages/virtualization.scm
>> @@ -1008,7 +1008,8 @@ all common programming languages.  Vala bindings
>> are also provided.")
>> "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci")))) (build-system
>> gnu-build-system)
>>      (native-inputs
>> -     `(("pkg-config" ,pkg-config)))
>> +     `(("pkg-config" ,pkg-config)
>> +       ("docbook2x" ,docbook2x)))
>>      (inputs
>>       `(("gnutls" ,gnutls)
>>         ("libcap" ,libcap)
>
> Awesome! Both patch 2/3 v2 and this one look good to me.
> The symlink trick was a great find.

Applied all three patches.

Thanks Andrew, and thanks Thiago for reviewing!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Oct 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 198 days ago.

Previous Next


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