GNOME Bugzilla – Bug 765215
yelp-check validate fails without networking
Last modified: 2018-05-22 12:51:10 UTC
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788769 When running yelp-check validate without networking, this fails: yelp-check validate ./C error : connection refused warning: failed to load external entity "http://projectmallard.org/1.0/mallard-1.0.rng" error : connection refused warning: failed to load external entity "http://projectmallard.org/1.0/mallard-1.0.rng" Relax-NG parser error : grammar has no children Relax-NG parser error : Element <grammar> has no <start> Relax-NG schema /tmp/yelp-HSdh66vS/1.0.rng failed to compile It should be possible to use this tool off-line. Could mallard-1.0.rng be provided by yelp-xsl or yelp-tools?
Fwiw, this also happens if gnome-doc-utils is installed, which ships /usr/share/xml/mallard/1.0/mallard.rng (which seems to be almost identical to "http://projectmallard.org/1.0/mallard-1.0.rng")
It should not be included in yelp-tools, just as the DocBook schemas shouldn't be. But mallard-rng 1.0.2 now includes a pkgconfig file, which I added so that I could easily make yelp-tools depend on mallard-rng. That dependency should make it into the next version of yelp-tools. Note that gnome-doc-utils is deprecated and very old. Its version of the Mallard schemas predates Mallard having its own home, and should not be taken as canonical. Please don't depend on anything in gnome-doc-utils.
Hi Shaun, thanks for your reply. So I guess in Debian we want to package mallard-rng from [1] and make the yelp-tools package depend on that package, so it can work off-line. [1] http://projectmallard.org/download/index
So, I quickly gave this a try and installed the mallard-rng package locally. /. /etc /etc/xml /etc/xml/mallard /etc/xml/mallard/catalog /usr /usr/share /usr/share/pkgconfig /usr/share/pkgconfig/mallard-rng.pc /usr/share/doc /usr/share/doc/mallard-rng /usr/share/doc/mallard-rng/changelog.gz /usr/share/xml /usr/share/xml/mallard /usr/share/xml/mallard/cache /usr/share/xml/mallard/cache/1.0 /usr/share/xml/mallard/cache/1.0/cache-1.0.rnc /usr/share/xml/mallard/cache/1.0/cache-1.0.rng /usr/share/xml/mallard/if /usr/share/xml/mallard/if/1.0 /usr/share/xml/mallard/if/1.0/if-1.0.rng /usr/share/xml/mallard/if/1.0/if-1.0.rnc /usr/share/xml/mallard/1.0 /usr/share/xml/mallard/1.0/mallard-1.0.rng /usr/share/xml/mallard/1.0/mallard-1.0.rnc Still, yelp-check validate failed without network access. Either it didn't find the local mallard-1.0.rng or it didn't try to use the locally installed one at all.
Did the install hook run? Unfortunately, the design of XML catalogs is such that you have to register them into a master catalog. Here's the hook in Makefile.am: install-exec-hook: test -n "$(DESTDIR)" || ( \ cd $(sysconfdir)/xml; \ test -f catalog && xmlcatalog --noout --del file://$(sysconfdir)/xml/mallard/catalog catalog >/dev/null; \ test -e catalog || xmlcatalog --noout --create catalog; \ xmlcatalog --noout --add nextCatalog file://$(sysconfdir)/xml/mallard/catalog "" catalog >/dev/null; \ ) As you can see, this does not run if you set DESTDIR, which is what packagers commonly do to make packages. If you created a deb file just by copying the installed files, you won't get the exec hook. For reference, here's a spec file David King did for Fedora: https://amigadave.fedorapeople.org/mallard-rng.spec The %post and %postun sections have the install and uninstall hooks. I don't know how to build deb packages, but I imagine there's something similar.
Hi Shaun, thanks for the help. I did indeed use DESTDIR, so the install hooks were not run. I did that manually now, and I see a line <nextCatalog catalog="file://etc/xml/mallard/catalog"/> in /etc/xml/catalog I still get the same error messages as in my first post. So it seems the catalog wasn't registered properly. Reading through https://debian-xml-sgml.alioth.debian.org/xml-policy/xml-registering-resources.html is French to me, I have to admit. So I'm a bit stuck atm. Will have to find someone who knows XML in Debian.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/yelp-tools/issues/12.