Opened 14 years ago

Last modified 7 years ago

#26151 assigned defect

installed docbook ports are not always correctly reflected in xml catalog

Reported by: jabronson@… Owned by: lockhart (Thomas Lockhart)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: boeyms@…, sewebster@…, vinc17@…, ballapete (Peter "Pete" Dyballa), deesto (John S. De Stefano Jr.), mauricio_ville@…, sinuhet.merlin@…, dbevans (David B. Evans), bwilliams@…, turkowski, cooljeanius (Eric Gallager)
Port: docbook-xml docbook-xsl xmlcatmgr xmlto

Description

attaching log

Attachments (4)

main.log (133.3 KB) - added by jabronson@… 14 years ago.
26151.diff (1.8 KB) - added by jabronson@… 13 years ago.
working_catalog (997 bytes) - added by jmroot (Joshua Root) 13 years ago.
/opt/local/etc/xml/catalog from a system that does not exhibit the problem
catalog.orig (870 bytes) - added by ballapete (Peter "Pete" Dyballa) 13 years ago.
Original defective /opt/local/etc/xml/catalog file

Download all attachments as: .zip

Change History (43)

Changed 14 years ago by jabronson@…

Attachment: main.log added

comment:1 Changed 14 years ago by sewebster@…

The log shows a problem retrieving http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd I can load this file fine (in my web browser for instance). Can you? Perhaps it was as temporary network problem?

comment:2 Changed 14 years ago by sewebster@…

Cc: sewebster@… added

Cc Me!

comment:3 Changed 14 years ago by jmroot (Joshua Root)

The port shouldn't be trying to download anything in the build phase. Looks similar to #2695 or #14967.

comment:4 in reply to:  1 Changed 14 years ago by jabronson@…

Replying to sewebster@…:

The log shows a problem retrieving http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd I can load this file fine (in my web browser for instance). Can you? Perhaps it was as temporary network problem?

I can load it fine in my web browser too, so it's not a network problem...

comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: error installing xmlto 0.0.23xmlto: I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd

Do you use a proxy server? If so, have you told MacPorts about it (see macports.conf)?

comment:6 in reply to:  5 Changed 14 years ago by jabronson@…

Replying to ryandesign@…:

Do you use a proxy server? If so, have you told MacPorts about it (see macports.conf)?

I use GlimmerBlocker for filtering ads. But if I could access that url in a browser (and via curl at the command line), could that really be the culprit? If so let me know what to put in my macports.conf and I'll report back. Worth mentioning I'm in Brazil, in case it's relevant.

comment:7 Changed 14 years ago by sewebster@…

I don't know how to set up macports.conf, and I couldn't find anything about proxies in the guide or the man page, but one thing you could try, would be to turn your ad blocker off and then see if things work.

comment:8 in reply to:  7 Changed 14 years ago by jabronson@…

Replying to sewebster@…:

I don't know how to set up macports.conf, and I couldn't find anything about proxies in the guide or the man page, but one thing you could try, would be to turn your ad blocker off and then see if things work.

Should have said I tried that already, no dice.

comment:9 Changed 13 years ago by jabronson@…

I just took a look at this again and noticed the problem is an earlier syntax error that propagates up and makes it look like an I/O error:

:info:build /usr/bin/make  all-am
:info:build for xml in xmlif.xml xmlto.xml; do \
:info:build       FORMAT_DIR=./format \
:info:build        /bin/sh ./xmlto -o man/man1 man ./doc/$xml ; \
:info:build     done || ( RC=$?; exit $RC )
:info:build for xml in xmlif.xml xmlto.xml; do \
:info:build       FORMAT_DIR=./format \
:info:build        /bin/sh ./xmlto -o man/man1 man ./doc/$xml ; \
:info:build     done || ( RC=$?; exit $RC )
:info:build xmlto: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_xmlto/work/xmlto-0.0.23/./doc/xmlif.xml does not validate (status 3)
:info:build xmlto: Fix document syntax or use --skip-validation option
:info:build I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_xmlto/work/xmlto-0.0.23/./doc/xmlif.xml:4: warning: failed to load external entity "http://ww
:info:build    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

Can the port maintainers please take a look at this again?

comment:10 Changed 13 years ago by jabronson@…

I'm unable to upgrade all of these ports because they depend on xmlto:

rabbitmq-server                @1.7.2_0 
texlive                        @2009_3+doc+medium 
texlive-basic                  @15576_1+doc 
texlive-bin                    @2009_6+no_x11 
texlive-bin-extra              @15618_3+doc 
texlive-context                @14390_1+doc 
texlive-documentation-base     @13822_1+doc 
texlive-documentation-english  @15727_1+doc 
texlive-fonts-recommended      @13822_1+doc 
texlive-fontutils              @15606_3+doc 
texlive-generic-recommended    @13822_1+doc 
texlive-htmlxml                @13822_2+doc 
texlive-lang-czechslovak       @14727_1+doc 
texlive-lang-dutch             @14727_1+doc 
texlive-lang-french            @14727_1+doc 
texlive-lang-german            @14751_1+doc 
texlive-lang-italian           @13822_1+doc 
texlive-lang-polish            @14727_1+doc 
texlive-lang-portuguese        @13822_1+doc 
texlive-lang-spanish           @13822_1+doc 
texlive-lang-ukenglish         @14727_1+doc 
texlive-latex                  @15495_1+doc 
texlive-latex-extra            @15852_1+doc 
texlive-latex-recommended      @15271_1+doc 
texlive-luatex                 @13992_1+doc 
texlive-math-extra             @15560_1+doc 
texlive-metapost               @15388_1+doc 
texlive-pictures               @15543_1+doc 
texlive-xetex                  @14329_1+doc 

Is anyone else having this problem?

comment:11 in reply to:  10 Changed 13 years ago by mf2k (Frank Schima)

Replying to jabronson@…:

Is anyone else having this problem?

No. Because you should be using the following command to upgrade:

sudo port -p upgrade outdated

The -p flag says to proceed after an error.

comment:12 Changed 13 years ago by jabronson@…

How about actually fixing the error?

comment:13 in reply to:  12 Changed 13 years ago by mf2k (Frank Schima)

Replying to jabronson@…:

How about actually fixing the error?

I can't reproduce the error. There is no maintainer for this port. If you can fix it and submit a patch, that would be helpful.

Changed 13 years ago by jabronson@…

Attachment: 26151.diff added

comment:14 Changed 13 years ago by jabronson@…

Replying to macsforever2000@…:

I can't reproduce the error. There is no maintainer for this port. If you can fix it and submit a patch, that would be helpful.

The attached patch works around the issue by passing "--skip-validation" to xmlto during the build phase. To address the actual reported problem, though:

Replying to jabronson@…:

I just took a look at this again and noticed the problem is an earlier syntax error that propagates up and makes it look like an I/O error

I inspected the files in question, xmlif.xml and xmlto.xml, and they're both valid xml. (The only thing I found which could be problematic was a right single quote character (’) on line 272 of xmlto.xml. Why they didn't just use the ascii apostrophe I have no idea.)

Replying to macsforever2000@…:

Is anyone else having this problem?

No. Because you should be using the following command to upgrade: sudo port -p upgrade outdated

#27387 is evidence to the contrary. And passing the -p flag did not solve the problem.

comment:15 Changed 13 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

r73800. It still builds fine for me. Thanks for the patch!

comment:16 Changed 13 years ago by jabronson@…

my pleasure. if the actual cause of the problem ends up getting discovered and a better fix turns up, we should use that instead of the workaround.

comment:17 Changed 13 years ago by jmroot (Joshua Root)

Cc: boeyms@… added
Port: docbook-xml docbook-xsl xmlcatmgr added
Resolution: fixed
Status: closedreopened
Summary: xmlto: I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtdinstalled docbook ports are not always correctly reflected in xml catalog

Reopening since #27439 shows that r73800 didn't actually fix the real problem.

comment:18 Changed 13 years ago by jmroot (Joshua Root)

Could people perhaps be mistakenly running the command shown in the notes (now only when using portdbformat flat) after installing, rather than after uninstalling?

comment:19 Changed 13 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

comment:20 in reply to:  18 ; Changed 13 years ago by jabronson@…

Replying to jmr@…:

Could people perhaps be mistakenly running the command shown in the notes (now only when using portdbformat flat) after installing, rather than after uninstalling?

Sorry, what command? What notes? Was I supposed to uninstall something?

I have portdbformat set to sqlite. The commands I'm running corresponding to the tickets I've opened that were marked as duplicates of this one are port install libzzip (#27439) and port install gtk-doc (#27780).

Thanks for your help.

comment:21 Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

I had a similar defect with gtk-doc-1.15 (https://trac.macports.org/ticket/27771), which was found to be a duplicate of this defect. I finally managed to build a work-around from Fink's /sw/etc/xml/catalog file. It does not have entries like

<nextCatalog catalog="/opt/local/share/xml/docbook/4.1.2/catalog.xml" />
<nextCatalog catalog="/opt/local/share/xml/docbook/4.2/catalog.xml" />

but more "explicite" ones:

  <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="file:///sw/share/xml/dtd/docbookx/4.1.2/calstblx.dtd"/>
  <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1//EN" uri="file:///sw/share/xml/dtd/docbookx/4.1/calstblx.dtd"/>
  <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.2//EN" uri="file:///sw/share/xml/dtd/docbookx/4.2.0/calstblx.dtd"/>

With some sed edit commands and egrep I created a new /opt/local/etc/xml/catalog file, saving the original one to avoid Timemachine. Configure finds:

checking for XML catalog (/opt/local/etc/xml/catalog)... found
checking for xmlcatalog... /opt/local/bin/xmlcatalog
checking for DocBook XML DTD V4.3 in XML catalog... found
checking for DocBook XSL Stylesheets in XML catalog... found
checking for source-highlight... /opt/local/bin/source-highlight
checking for TEST_DEPS... yes
checking whether to enable runtime debugging code... no
configure: creating ./config.status

and gtk-doc-1.15 is upgraded.

comment:22 Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Cc: Peter_Dyballa@… added

Cc Me!

comment:23 Changed 13 years ago by deesto (John S. De Stefano Jr.)

Cc: deesto@… added

Cc Me!

comment:24 in reply to:  20 Changed 13 years ago by jabronson@…

Replying to jabronson@…:

Could people perhaps be mistakenly running the command shown in the notes (now only when using portdbformat flat) after installing, rather than after uninstalling?

Sorry, what command? What notes? Was I supposed to uninstall something?

Oh, you're talking about comment:4:ticket:27771. That wasn't the case in my case, anyway.

Can a fix be created based on Peter_Dyballa's workaround?

comment:25 Changed 13 years ago by mauricio_ville@…

Cc: mauricio_ville@… added

Cc Me!

comment:26 Changed 13 years ago by sinuhet.merlin@…

Cc: sinuhet.merlin@… added

Cc Me!

comment:27 Changed 13 years ago by a.vincelli@…

Cc: a.vincelli@… added

Cc Me!

Changed 13 years ago by jmroot (Joshua Root)

Attachment: working_catalog added

/opt/local/etc/xml/catalog from a system that does not exhibit the problem

comment:28 Changed 13 years ago by a.vincelli@…

Cc: a.vincelli@… removed

Cc Me!

comment:29 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: devans@… bwilliams@… turk@… added

Has duplicates #28305 and #28313.

comment:30 Changed 13 years ago by fiee (Henning Hraban Ramm)

fixed 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">
  <nextCatalog catalog="/opt/local/share/xsl/docbook-xsl/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/5.0/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/4.5/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/4.4/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/4.3/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/4.2/catalog.xml"/>
  <nextCatalog catalog="/opt/local/share/xml/docbook/4.1.2/catalog.xml"/>
  <system systemId="http://glade.gnome.org/glade-2.0.dtd" uri="/opt/local/share/xml/libglade/glade-2.0.dtd"/>
</catalog>

(upgrade of gtk-doc failed due to missing DocBook 4.3 entry, and that blocked all dependent ports)

comment:31 Changed 13 years ago by mauricio_ville@…

I solved this problem by reinstalling the docbooks, i.e.:

sudo port upgrade --force $(port list installed | grep docbook | awk '{print $1}')

comment:32 in reply to:  31 Changed 13 years ago by jabronson@…

Replying to mauricio_ville@…:

I solved this problem by reinstalling the docbooks, i.e.:

sudo port upgrade --force $(port list installed | grep docbook | awk '{print $1}')

Worked for me too, thank you thank you! First time I've been able to upgrade a bunch of ports in 8 months.

comment:33 Changed 13 years ago by jmroot (Joshua Root)

I'll just note that nobody has yet attached the catalog file from a system that exhibits the problem.

comment:34 in reply to:  33 Changed 13 years ago by jabronson@…

Replying to jmr@…:

I'll just note that nobody has yet attached the catalog file from a system that exhibits the problem.

Just noticed your attachment three months ago with comment "/opt/local/etc/xml/catalog from a system that does not exhibit the problem". I would have attached mine but without more context or an explicit request I unfortunately didn't read between the lines. Hopefully someone who hasn't yet --forced their way out of this can provide their catalog file.

comment:35 in reply to:  33 Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jmr@…:

I'll just note that nobody has yet attached the catalog file from a system that exhibits the problem.

Here is mine – in a minute or so, since I have to press two different buttons at opposite regions of this page.

Changed 13 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: catalog.orig added

Original defective /opt/local/etc/xml/catalog file

comment:36 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:37 Changed 9 years ago by pancake@…

I have found several dupped issues related to the same problem, and its something that it's been buggy since the begining and the bugs get opened again and again. This is the solution I did to solve the same problem I was able to reproduce right now.

$ cat xml-catalog.sh
#!/bin/sh
echo '<?xml version="1.0"?>'
echo '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
CATS=`find  /opt/local/share/| grep catalog.xml$`
for a in ${CATS} ; do
	echo '<nextCatalog catalog="'$a'"/>'
done
echo '</catalog>'

This script will generate the /opt/local/etc/xml/catalog. the gtk-doc program fails if this file contain entries that point to outdated or non-existent versions of those catalogs.

This script or a similar one should be used after installing/upgrading/removing any package that contains a file named catalog.xml. This way it will keep consistency.

Related issues are:

...

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:38 Changed 9 years ago by jmroot (Joshua Root)

Cc: tlockhart1976@… added

comment:39 Changed 7 years ago by mf2k (Frank Schima)

Cc: tlockhart1976@… removed
Owner: changed from macports-tickets@… to tlockhart1976@…
Status: reopenedassigned
Note: See TracTickets for help on using tickets.