Bug 2364 - rhel4 glade file trashes /etc/xml/config
Summary: rhel4 glade file trashes /etc/xml/config
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
Depends on:
Blocks: 2004 1975
  Show dependency treegraph
Reported: 2006-02-20 05:10 UTC by Andrew Cagney
Modified: 2006-04-24 20:40 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-02-20 05:10:35 UTC
When _root_ rpmbuild adds entries to /etc/xml/config; stuff like:
   $ grep frysk /etc/xml/catalog
	<system systemId="http://glade.gnome.org/glade-2.0.dtd"
which tells xmllint to find the specified file locally at that path. 
Unfortunatly, it isn't, rpmbuild put the file elsewhere.

When not root, it attempts to do same but, thankfully, fails.
Comment 1 Phil Muldoon 2006-02-20 06:10:29 UTC
Was this fixed by passing the  --without-xml-catalog option

The issue here, in depth, was that glade was being installed within the spec
file on RHEL4. This install, while running on root, was causing a change to be
made to /etc/xml/config to be made. It added an entry (I would not consider that
as trashed, but the sentiment still remains I suppose).

If --without-xml-catalog fixes the issue I will close. However the larger issue
here is installing libs in RHEL4 within the rpmbuild process
Comment 2 Andrew Cagney 2006-02-20 17:23:08 UTC
(In reply to comment #1)
> Was this fixed by passing the  --without-xml-catalog option

Both that, and disabling the xmllint check hid the problem (and stopped the
trashing) but I'm not sure that it is fixed.

Is it possible to verify our files on a RHEL-4 machine with:

- the frysk rpm installed
- no internet access
- no system glade.dtd file

I've a strong hunch that it isn't (I wan't to be proven wrong here :-), and if
it isn't the build will need to be changed so that:

- the xml files are installed into /etc/frysk/xml/catalog
So as to not trash /etc/xml/catalog.

- mod frysk's build so that it checks for xml re-directs in same
That stops the build relying on internet access, and something random pulled in
from the internet; and ensures that frysk is built against the xml file
providing in the rpm.
Comment 3 Andrew Cagney 2006-04-24 19:00:38 UTC
On FC-5, it definitly isn't possible to build the frysk gui without internet access.
Comment 4 Andrew Cagney 2006-04-24 19:21:32 UTC
cagney@nettle$ xmlcatalog -noout -v --add rewriteURI
file:///usr/share/xml/libglade/glade-2.0.dtd catalog
0 Parsing catalog catalog
catalog added to file hash
Adding element rewriteURI to catalog
Catalogs cleanup
Free catalog entry http://glade.gnome.org/glade-2.0.dtd
Free catalog entry catalog
Free catalog entry
cagney@nettle$ cat catalog
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <rewriteURI uriStartString="http://glade.gnome.org/glade-2.0.dtd"
cagney@nettle$ SGML_CATALOG_FILES=catalog xmllint --catalogs --noout --valid
Comment 5 Andrew Cagney 2006-04-24 20:40:20 UTC
Index: frysk-gui/common/ChangeLog
2006-04-24  Andrew Cagney  <cagney@redhat.com>

        * Makefile.rules (glade.catalog): New rule.
        (glade.checked): Point SGML_CATALOG_FILES at glade.catalog, add
        --nonet and --catalogs parameters.
        (GLADE_DTD_FILE): Define.
        * acinclude.m4 (lib): Check for XMLLINT.