Some man pages are not built correctly

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 31 Dec 2021 01:00
(address . bug-guix@gnu.org)
Yc5ILSMlZFCjVfGI@jasmine.lan
On Guix Git commit c7d74a9bccfc1b1274fc8754a6e78bb6887c7fea, at least
some manpages are not being built correctly for packages such as elogind
and gnome-keyring-daemon. Are we seeing raw groff input? I'm not sure of
the technology used here.
M
M
Maxim Cournoyer wrote on 14 Jan 2022 06:42
(name . Leo Famulari)(address . leo@famulari.name)(address . 52909@debbugs.gnu.org)
87wnj2x48u.fsf@gmail.com
Hi Leo,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (5 lines)
> On Guix Git commit c7d74a9bccfc1b1274fc8754a6e78bb6887c7fea, at least
> some manpages are not being built correctly for packages such as elogind
> and gnome-keyring-daemon. Are we seeing raw groff input? I'm not sure of
> the technology used here.

Thank you for reporting this. I've noticed them too, and somehow
thought the technology was broken.

The technology is docbook xml and xlstproc to transform the source into
man pages (which are in the nroff format, I think).

I've read the same kind of issue reported to the bind9
project and its resolution, which was very helpful:
a DocBook XSL stylesheet problem resolved in
released...

My first idea was to apply this patch, so I went ahead and made:

Toggle snippet (80 lines)
modified gnu/packages/docbook.scm
@@ -229,6 +229,14 @@ (define name-version
"This package provides XSL style sheets for DocBook.")
(license (license:x11-style "" "See 'COPYING' file."))))
+(define-public docbook-xsl/fixed
+ (package/inherit docbook-xsl
+ (name "docbook-xsl-fixed")
+ (source (origin
+ (inherit (package-source docbook-xsl))
+ (patches (search-patches
+ "docbook-xsl-allow-non-namespace-fix.patch"))))))
+
(define-public docbook-xsl-ns
(package
(name "docbook-xsl-ns")
new file gnu/packages/patches/docbook-xsl-allow-non-namespace-fix.patch
@@ -0,0 +1,60 @@
+Retrieved from https://github.com/docbook/xslt10-stylesheets/pull/111.
+
+diff --git a/common/common.xsl b/common/common.xsl
+index 59f51dfd0..80742b6ce 100644
+--- a/common/common.xsl
++++ b/common/common.xsl
+@@ -68,7 +68,6 @@ d:subjectset d:substeps d:synopfragment d:table d:tbody d:textobject d:tfoot d:t
+ d:thead d:tip d:toc d:tocchap d:toclevel1 d:toclevel2 d:toclevel3 d:toclevel4
+ d:toclevel5 d:tocpart d:topic d:varargs d:variablelist d:varlistentry d:videodata
+ d:videoobject d:void d:warning d:subjectset
+-
+ d:classsynopsis
+ d:constructorsynopsis
+ d:destructorsynopsis
+@@ -81,6 +80,45 @@ d:oointerface
+ d:simplemsgentry
+ d:manvolnum
+ "/>
++<xsl:strip-space elements="
++abstract affiliation anchor answer appendix area areaset areaspec
++artheader article audiodata audioobject author authorblurb authorgroup
++beginpage bibliodiv biblioentry bibliography biblioset blockquote book
++bookinfo callout calloutlist caption caution chapter
++citerefentry cmdsynopsis co collab colophon colspec confgroup
++copyright dedication docinfo editor entrytbl epigraph equation
++example figure footnote footnoteref formalpara funcprototype
++funcsynopsis glossary glossdef glossdiv glossentry glosslist graphicco
++group highlights imagedata imageobject imageobjectco important index
++indexdiv indexentry indexterm info informalequation informalexample
++informalfigure informaltable inlineequation inlinemediaobject
++itemizedlist itermset keycombo keywordset legalnotice listitem lot
++mediaobject mediaobjectco menuchoice msg msgentry msgexplan msginfo
++msgmain msgrel msgset msgsub msgtext note objectinfo
++orderedlist othercredit part partintro preface printhistory procedure
++programlistingco publisher qandadiv qandaentry qandaset question
++refentry reference refmeta refnamediv refsection refsect1 refsect1info refsect2
++refsect2info refsect3 refsect3info refsynopsisdiv refsynopsisdivinfo
++revhistory revision row sbr screenco screenshot sect1 sect1info sect2
++sect2info sect3 sect3info sect4 sect4info sect5 sect5info section
++sectioninfo seglistitem segmentedlist seriesinfo set setindex setinfo
++shortcut sidebar simplelist simplesect spanspec step subject
++subjectset substeps synopfragment table tbody textobject tfoot tgroup
++thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
++toclevel5 tocpart topic varargs variablelist varlistentry videodata
++videoobject void warning subjectset
++classsynopsis
++constructorsynopsis
++destructorsynopsis
++fieldsynopsis
++methodparam
++methodsynopsis
++ooclass
++ooexception
++oointerface
++simplemsgentry
++manvolnum
++"/>
+ <!-- ====================================================================== -->
+
+ <doc:template name="is.component" xmlns="">

Unfortunately the resulting docbook-xsl/fixed package doesn't seem to
work.

Based on this knowledge (from the same issue linked above):

Toggle quote (4 lines)
> When using version 1.79.1 or 1.79.2 of the XSL stylesheets, care must
> be taken to ensure the namespaced stylesheets are used for generating
> BIND documentation.

Toggle snippet (12 lines)
modified gnu/packages/samba.scm
@@ -269,7 +269,7 @@ (define-public samba
("rpcsvc-proto" ,rpcsvc-proto) ; for 'rpcgen'
;; For generating man pages.
("docbook-xml" ,docbook-xml-4.2)
- ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xsl" ,docbook-xsl-ns)
("xsltproc" ,libxslt)
("libxml2" ,libxml2))) ;for XML_CATALOG_FILES
(home-page "https://www.samba.org/")

But that also doesn't work...

Ahem...

I guess we'll need to wait for Docbook to fix their things and issue a
new release, else use one of their snapshots.

On an unrelated (to the problem at hand note) I've also realized my
confusion in adding a docbook-xsl-ns package. The legacy suffix (1.79.1
and older) )was inverted for 1.79.2 (-ns was removed, so the docbook-xsl
*is* namespaced while -nons was added to denote the non-namespaced
version).

I should probably get rid of this docbook-xsl-ns package unless 1.79.1
is truly needed and replace it by docbook-xsl-nons. I tried to use this
with samba but it also didn't work.

That's frustrating!

Good night,

Maxim
M
M
Maxim Cournoyer wrote on 27 Sep 2022 22:25
(name . Leo Famulari)(address . leo@famulari.name)(address . 52909-done@debbugs.gnu.org)
87bkr0y383.fsf@gmail.com
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (9 lines)
> Hi Leo,
>
> Leo Famulari <leo@famulari.name> writes:
>
>> On Guix Git commit c7d74a9bccfc1b1274fc8754a6e78bb6887c7fea, at least
>> some manpages are not being built correctly for packages such as elogind
>> and gnome-keyring-daemon. Are we seeing raw groff input? I'm not sure of
>> the technology used here.

[...]

Toggle quote (7 lines)
> I've read the same kind of issue reported to the bind9
> project and its resolution, which was very helpful:
> https://gitlab.isc.org/isc-projects/bind9/-/issues/2310. It seems it's
> a DocBook XSL stylesheet problem resolved in
> https://github.com/docbook/xslt10-stylesheets/pull/111 but not yet
> released...

This is now fixable in an ad-hoc fashion on master by replacing the
problematic docbook-xsl with docbook-xsl-next, and fixed for good on
core-updates.

Closing.

Thanks,

Maxim
Closed
?