Message ID | 20210820120907.83191-3-whatson@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Add docbook2x and generate lxc man pages. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
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.
On Thu, 26 Aug 2021 at 15:37, Thiago Jung Bauermann <bauermann@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!
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"))