Bug 478680 - Jade keeps downloading DTDs from teh Internets
Jade keeps downloading DTDs from teh Internets
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: openjade (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 469998
  Show dependency treegraph
 
Reported: 2009-01-03 08:22 EST by Lubomir Rintel
Modified: 2009-02-05 14:34 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-05 14:34:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace of successful jade run (7.40 MB, text/plain)
2009-02-05 09:31 EST, Ondrej Vasik
no flags Details

  None (edit)
Description Lubomir Rintel 2009-01-03 08:22:22 EST
Description of problem:

jade tries to download the DTDs, even though I have a local copy, properly configured in a catalog and the catalog seems to be loaded by jade.

Version-Release number of selected component (if applicable):

openjade-1.3.2-31.fc9.i386
docbook-dtds-1.0-41.fc10.noarch

How reproducible:

Without a network connection.
  
Steps to Reproduce:

Create a docbook file. My one, a book, is fairly simplistic:

$ cat foo.xml 
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book/>

Process it with jade. I configured my resolver to prevent resolving www.oasis-open.org to demonstrate a problem:

$ strace -efile -o jade.trace jade -d /usr/share/sgml/docbook/dsssl-stylesheets/html/docbook.dsl -t tex /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/xml.dcl foo.xml
jade:foo.xml:4:57:E: error connecting to "www.oasis-open.org" (Connection refused)
jade:foo.xml:4:57:E: DTD did not contain element declaration for document type name
jade:foo.xml:5:6:E: element "book" undefined

Jade indeed opened the catalog. Numerous times!

$ grep /usr/share/sgml/docbook/xml-dtd-4.2-1.0-41.fc10/catalog jade.trace |wc -l
119

And the catalog contains reference for my doctype:

$ grep -- "-//OASIS//DTD DocBook XML V4.2//EN" /usr/share/sgml/docbook/xml-dtd-4.2-1.0-41.fc10/catalog
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"

Actual results:

Me sad.

Expected results:

Me happy.

Additional info:

It may well be that I'm doing something wrong. Do you see anything obviously wrong with what am I doing?
Comment 1 Ondrej Vasik 2009-01-05 10:45:36 EST
Thanks for report, I don't see anything wrong on your example... but it works correctly on my machine with docbook-dtds of the same version... it looks like /etc/sgml/docbook/xmlcatalog is incorrectly registered (that file moved from /usr/share/sgml/docbook/xmlcatalog to /etc/ directory to follow guidelines about config(noreplace) files) ... will try to reproduce it somehow - it is clean F-10 installation or upgrade from F-9(F-8)?
Comment 2 Ondrej Vasik 2009-02-03 03:51:02 EST
Lubo, ping? Still not able to reproduce... for me it works correctly with docbook-dtds and openjade you have specified...
Comment 3 Lubomir Rintel 2009-02-03 04:59:39 EST
Thanks for the response.

(In reply to comment #2)
> Lubo, ping? Still not able to reproduce... for me it works correctly with
> docbook-dtds and openjade you have specified...

Sorry, I did not see your reply.

(In reply to comment #1)
> Thanks for report, I don't see anything wrong on your example... but it works
> correctly on my machine with docbook-dtds of the same version... it looks like
> /etc/sgml/docbook/xmlcatalog is incorrectly registered (that file moved from
> /usr/share/sgml/docbook/xmlcatalog to /etc/ directory to follow guidelines
> about config(noreplace) files) ... will try to reproduce it somehow - it is
> clean F-10 installation or upgrade from F-9(F-8)?

I believe it was happening in the mock build root as well, so I think it could be reporoducible with clean installation. It might be that dependency on some package is missing or something like that.

I'll try to prepare a better test case to reproduce this later today.
Comment 4 Lubomir Rintel 2009-02-05 08:23:00 EST
So here's what do I do to reproduce it:
* Init buildroot, install packages
* Chuck resolver configuration, so that I break networking
* Try to process the file

[lkundrak@trurl ~]$ mock -r fedora-devel-i386 init
INFO: mock.py version 0.9.11 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
INFO: enabled root cache
State Changed: unpacking root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
[lkundrak@trurl ~]$ mock -r fedora-devel-i386 install openjade docbook-dtds docbook-style-dsssl
INFO: mock.py version 0.9.11 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
[lkundrak@trurl ~]$ mock -r fedora-devel-i386 shell
INFO: mock.py version 0.9.11 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
mock-chroot> cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search brno.gooddata.com
nameserver 192.168.2.1
mock-chroot> > /etc/resolv.conf
mock-chroot> cat >foo.xml <<EOF
> <?xml version="1.0"?>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
> <book/>
> EOF
mock-chroot> jade -d /usr/share/sgml/docbook/dsssl-stylesheets/html/docbook.dsl -t tex /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/xml.dcl foo.xml
jade:foo.xml:3:57:E: could not resolve host "www.oasis-open.org" (try again later)
jade:foo.xml:3:57:E: DTD did not contain element declaration for document type name
jade:foo.xml:4:6:E: element "book" undefined
mock-chroot>

My catalogs seems good to me:

mock-chroot> cat /etc/xml/catalog
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" catalog="file:///etc/sgml/docbook/xmlcatalog"/>
  <delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" catalog="file:///etc/sgml/docbook/xmlcatalog"/>
  <delegatePublic publicIdStartString="ISO 8879:1986" catalog="file:///etc/sgml/docbook/xmlcatalog"/>
  <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///etc/sgml/docbook/xmlcatalog"/>
  <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///etc/sgml/docbook/xmlcatalog"/>
</catalog>
mock-chroot> grep -- "-//OASIS//DTD DocBook XML V4.2//EN" /etc/sgml/docbook/xmlcatalog
  <public publicId="-//OASIS//DTD DocBook XML V4.2//EN" uri="/usr/share/sgml/docbook/xml-dtd-4.2-1.0-41.fc10/docbookx.dtd"/>
mock-chroot> file /usr/share/sgml/docbook/xml-dtd-4.2-1.0-41.fc10/docbookx.dtd
/usr/share/sgml/docbook/xml-dtd-4.2-1.0-41.fc10/docbookx.dtd: exported SGML document text
mock-chroot>
Comment 5 Lubomir Rintel 2009-02-05 08:24:52 EST
Unless you see anything obviously missing above, I'm wondering if you could strace your successful run so we could compare what's different? Maybe you have some library/configuration/whatever that I don't have?
Comment 6 Ondrej Vasik 2009-02-05 09:31:14 EST
Created attachment 330988 [details]
strace of successful jade run

Ok, here is strace of successful attempt on my machine.
Comment 7 Ondrej Vasik 2009-02-05 09:44:54 EST
Aaah, it looks like it uses internet connection - bad luck - will check it...
Comment 8 Ondrej Vasik 2009-02-05 10:43:43 EST
I guess the easiest fix would be to add system rewrites to sgml catalogs of docbook in docbook-dtds. It should not break anything, will try it in rawhide.
Comment 9 Ondrej Vasik 2009-02-05 11:32:50 EST
Please try docbook-dtds-1.0-42.fc11 (just building in koji).
Comment 10 Lubomir Rintel 2009-02-05 13:39:24 EST
Thanks for the fix. I can confirm it no longer attempts to download files from network when docbook-dtds-1.0-42.fc11 is used:

mock-chroot> jade -d /usr/share/sgml/docbook/dsssl-stylesheets/html/docbook.dsl -t tex /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/xml.dcl foo.xml
mock-chroot>
Comment 11 Ondrej Vasik 2009-02-05 14:34:57 EST
Ok, closing RAWHIDE.

Note You need to log in before you can comment on or make changes to this bug.