2

I have been trying to compile systemd on my LFS based system and am having an issue with the man page creation. There are multiple files with the issue but I shall focus on one in particular as a solution should then be easy enough to extrapolate.

Files needed for testing (that I know of):

busctl.xml
user-system-options.xml
custom-man.xsl
standard-options.xml

Note: I was not able to find how to attach a file, but they can be retrieved from https://github.com/systemd/systemd All files are in the man directory

The code being executed is as follows:

xsltproc --nonet --xinclude --stringparam systemd.version 233 \
custom-man.xsl busctl.xml

On executing the above I receive:

I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
busctl.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
                                                         ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
user-system-options.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                                   ^
busctl.xml:241: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:242: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:243: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
busctl.xml:244: element include: XInclude error : could not load user-system-options.xml, and no fallback was found
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
standard-options.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                                   ^
busctl.xml:246: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:247: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:248: element include: XInclude error : could not load standard-options.xml, and no fallback was found
busctl.xml:249: element include: XInclude error : could not load standard-options.xml, and no fallback was found

So the first error/warning received is to do with the busctl.xml file itself and the fact that we have used the --nonet switch. This can be easily removed by the addition of the --novalid switch. As it stands, if the following errors were not present, then this error/warning would not impede the building of the man page. I have tested this by performing the same command on a file that has no ix:include stanzas in the file.

Here are the offending lines within the busctl.xml file:

  <xi:include href="user-system-options.xml" xpointer="user" />
  <xi:include href="user-system-options.xml" xpointer="system" />
  <xi:include href="user-system-options.xml" xpointer="host" />
  <xi:include href="user-system-options.xml" xpointer="machine" />
  <xi:include href="standard-options.xml" xpointer="no-pager" />
  <xi:include href="standard-options.xml" xpointer="no-legend" />
  <xi:include href="standard-options.xml" xpointer="help" />
  <xi:include href="standard-options.xml" xpointer="version" />

So my question is this, how can I get the files used in the above includes to also use the --nonet (and possibly --novalid) switch(es) which would stop the errors and allow for the creation of the man pages?

Please let me know if there is any further details which might assist in an answer?

grail
  • 914
  • 6
  • 14
  • You probably have to install the docbook package on your system. – nwellnhof Apr 09 '17 at 09:08
  • It is installed, along with libxsl and libxml2. The error is based in the fact that --nonet causes there to be an issue that it can't go to the internet to look at the dtd. However, I have found that it shouldn't need to to be able to perform the task. I just don't know how to tell it not to bother?? – grail Apr 09 '17 at 09:14
  • The docbook XSL package usually installs some files in the so-called [XML catalog](http://xmlsoft.org/catalog.html) (`/etc/xml/catalog`) which redirects requests for DTD URLs to the local file system. – nwellnhof Apr 09 '17 at 09:20
  • Yes and that file is there and populated, but for a reason I cannot yet explain, the xi:include contained in the file fails to work. initially I thought it was due to the switches not being passed on but hey are as the same error/warning about not being able to load the dtd is there. So I am not sure if this then causes the xinclude to die?? Something is affecting the loading of the 2 xml files inside the the xi:include portion. I have been advised that I could simply update my catalog to include the new dtd and then download them, but as this is a straight install, I shouldn't have to – grail Apr 09 '17 at 09:30
  • So I finally found the solution, is it best to delete the question or post the answer? If someone could please advise. – grail Apr 09 '17 at 16:16
  • 1
    If future readers might benefit, post the answer. – nwellnhof Apr 09 '17 at 17:21
  • @nwellnhof - You were close in one of your answers, it was another dependency, on docbook-xml as well as docbook-xsl – grail Apr 10 '17 at 02:43

0 Answers0