After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 104475 - Default catalogs should be user-tunnable
Default catalogs should be user-tunnable
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.5.1
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2003-01-26 17:38 UTC by Julio Merino
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (4.33 KB, patch)
2003-01-26 17:39 UTC, Julio Merino
none Details | Review
Another patch... (1.50 KB, patch)
2003-01-26 19:24 UTC, Julio Merino
none Details | Review

Description Julio Merino 2003-01-26 17:38:30 UTC
The default XML and SGML catalogs' URI should be tunnable through the configure script. Two options can be added, like --with-sgml-catalog and --with-xml-catalog that point to the default catalog files.

The attached patch does this (I'm not sure the ChangeLog entry is correct...).
Comment 1 Julio Merino 2003-01-26 17:39:01 UTC
Created attachment 13835 [details] [review]
The patch
Comment 2 Daniel Veillard 2003-01-26 17:57:25 UTC
Sorry, I disagree with this patch. You say it "should be tunable"
and I don't see why. I'm usually for flexibility, until is screws
the users, and in that case I think it's the latter.
All the documentation and code in libxml2 and on a lot of other places,
like Gnome code etc..., is based on the bact that the top catalog is
in /etc/xml/catalog.
If you want to implement a different scheme maintain your own patches
and own documentation, it's of course a pain but I will not help
bringing unjustified fragmentation at the XML toools chain level.

Daniel
Comment 3 Julio Merino 2003-01-26 18:18:25 UTC
So let me explain why. The NetBSD's Packages Collection (see http://www.pkgsrc.org/) is a self-contained package system. ALL configuration files go, by default, into $PREFIX/etc, which can be changed by the administrator to any other place through a special variable called PKG_SYSCONFBASE.

This is useful to avoid polluting the standard /etc directory. I, for example, set PKG_SYSCONFBASE to /etc/pkg (but many people uses the default, which is /usr/pkg/etc). So, you see: the base system knows nothing about xml/sgml, so /etc/sgml and /etc/xml will not be there, never (except, of course, you set PKG_SYSCONFBASE to /etc). I'm against patching third-party programs because patches get easily out of sync and need to be adjusted in every updated.

Anyway, if you insist in not doing this change, you could (at least), modify the xmllint.c file to display XML_XML_DEFAULT_CATALOG (which is defined at the top of the file) instead of hardcoding the path in the message. That could help us because we could only need to declare those macros trough CPPFLAGS. The same goes for xmlcatalog.c: it could be nice if the definition of XML_SGML_DEFAULT_CATALOG was surrounded by an #ifdef.

Thank you.
Comment 4 Daniel Veillard 2003-01-26 18:38:35 UTC
> the base system knows nothing about xml/sgml, so /etc/sgml and
> /etc/xml  will not be there, never

  Well, that's FreeBSD decision, not mine. For the record
Sun Microsystem, shich ships libxml2 as part of Solaris OS core
maintain their own patch for this. I see not justification for
the decision of ignoring XML as part of the base operating system.

> I'm against patching third-party programs because patches get
> easily out of sync and need to be adjusted in every updated 

  Well I told you, I know it's gonna be painful. But by deciding
not to provide /etc/xml/catalog as the root toplevel catalog,
you're also deciding to break all the documentation for my software
and also all software based on libxml2 which starts to be quite an
awful lot of code.
Guess who will get the bug reports ? So FreeBSD (or your group
within) decided to make my life painful, why should I ease your
job for doing so ? I honnestly ask the question, you made your
decision unilaterally and I'm supposed to accept the breakage,
and make your life easy, there is something wrong, no ?
  If you don't provide global catalog at the operating system
level state so, make your users aware of the fact and tell them to
use the environment variable XML_CATALOG_FILES to point to their
own catalog. That should work fine, point to the fact that you
decided to not provide the facility, and hopefully I will get less
bug reports.

   Makes sense ?

Daniel
Comment 5 Julio Merino 2003-01-26 19:23:31 UTC
Okay okay. I understand your point of view. But what about this new patch? This just makes things cleaner but does not allow the end user to change it himself if he does not know what he is doing.

(We, in our package system, will take care to patch all required programs to use our "default" value, so end users should have no problem).
Comment 6 Julio Merino 2003-01-26 19:24:16 UTC
Created attachment 13838 [details] [review]
Another patch...
Comment 7 Daniel Veillard 2003-01-26 19:46:23 UTC
Okay that patch is a reasonnable compromise :-)
Applied and commited,

  thanks,

Daniel
Comment 8 Daniel Veillard 2003-01-26 19:47:58 UTC
> the base system knows nothing about xml/sgml, so /etc/sgml and
> /etc/xml  will not be there, never

  Well, that's FreeBSD decision, not mine. For the record
Sun Microsystem, shich ships libxml2 as part of Solaris OS core
maintain their own patch for this. I see not justification for
the decision of ignoring XML as part of the base operating system.

> I'm against patching third-party programs because patches get
> easily out of sync and need to be adjusted in every updated 

  Well I told you, I know it's gonna be painful. But by deciding
not to provide /etc/xml/catalog as the root toplevel catalog,
you're also deciding to break all the documentation for my software
and also all software based on libxml2 which starts to be quite an
awful lot of code.
Guess who will get the bug reports ? So FreeBSD (or your group
within) decided to make my life painful, why should I ease your
job for doing so ? I honnestly ask the question, you made your
decision unilaterally and I'm supposed to accept the breakage,
and make your life easy, there is something wrong, no ?
  If you don't provide global catalog at the operating system
level state so, make your users aware of the fact and tell them to
use the environment variable XML_CATALOG_FILES to point to their
own catalog. That should work fine, point to the fact that you
decided to not provide the facility, and hopefully I will get less
bug reports.

   Makes sense ?

Daniel
Comment 9 Daniel Veillard 2003-02-11 12:39:25 UTC
this should be fixed in libxml2-2.5.3 release,

  thanks,

Daniel