xml-core-0.13+nmu2/0000755000000000000000000000000012025102226010716 5ustar xml-core-0.13+nmu2/debian/0000755000000000000000000000000012025104145012142 5ustar xml-core-0.13+nmu2/debian/xml-core.xmlcatalogs0000644000000000000000000000106411271152743016142 0ustar local;schemas/catalog.xml;/usr/share/xml/schema/xml-core/catalog.xml root-and-package;system;http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd;/usr/share/xml/schema/xml-core/catalog.xml root-and-package;public;-//OASIS//DTD XML Catalogs V1.0//EN;/usr/share/xml/schema/xml-core/catalog.xml root-and-package;system;http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd;/usr/share/xml/schema/xml-core/catalog.xml root-and-package;public;-//GlobalTransCorp//DTD XML Catalogs V1.0-Based Extension V1.0//EN;/usr/share/xml/schema/xml-core/catalog.xml xml-core-0.13+nmu2/debian/xml-core.links0000644000000000000000000000012210574702560014741 0ustar usr/share/xml/schema/xml-core/catalog.dtd usr/share/sgml/dtd/xml-core/catalog.dtd xml-core-0.13+nmu2/debian/xml-core.dirs0000644000000000000000000000003110610227056014552 0ustar etc/xml var/lib/xml-core xml-core-0.13+nmu2/debian/xml-core.sgmlcatalogs0000644000000000000000000000006510574702560016307 0ustar schemas/catalog /usr/share/sgml/dtd/xml-core/catalog xml-core-0.13+nmu2/debian/copyright0000644000000000000000000000233010610230326014072 0ustar This is the Debian package of xml-core. It is assembled and maintained by Ardo van Rangelrooij and the Debian XML/SGML group. Author: Ardo van Rangelrooij Daniel Leidert Copyright: Copyright (c) 2003,2004 Ardo van Rangelrooij Copyright (c) 2004 Adam Di Carlo License and warranty: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. On a Debian system a copy of the GNU General Public Licence can be found in the file '/usr/share/common-licenses/GPL'. xml-core-0.13+nmu2/debian/xml-core.examples0000644000000000000000000000001310574702560015436 0ustar examples/* xml-core-0.13+nmu2/debian/xml-core.install0000644000000000000000000000007711075107144015272 0ustar debian/lintian-overrides/xml-core usr/share/lintian/overrides/ xml-core-0.13+nmu2/debian/rules0000755000000000000000000000277111075107144013237 0ustar #!/usr/bin/make -f ## ---------------------------------------------------------------------- ## debian/rules : package script for xml-core ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## uncomment this to turn on verbose mode #export DH_VERBOSE=1 ## ---------------------------------------------------------------------- PACKAGE = xml-core ## ---------------------------------------------------------------------- ## targets clean: dh_testdir dh_testroot rm -f tools/update-xmlcatalog.8 debhelper/dh_installxmlcatalogs.1 dh_clean tools/update-xmlcatalog.8 \ debhelper/dh_installxmlcatalogs.1 \ build-stamp install-stamp build: build-stamp build-stamp: dh_testdir $(MAKE) touch build-stamp install: install-stamp install-stamp: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install prefix=$(CURDIR)/debian/$(PACKAGE)/usr touch install-stamp binary-indep: build install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installchangelogs dh_install DH_AUTOSCRIPTDIR=debhelper debhelper/dh_installxmlcatalogs dh_installcatalogs dh_link dh_usrlocal dh_compress dh_fixperms dh_installdeb dh_perl -d dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch .PHONY: clean build install binary-indep binary-arch binary ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/debian/compat0000644000000000000000000000000211006061410013333 0ustar 5 xml-core-0.13+nmu2/debian/xml-core.preinst0000644000000000000000000000147410610227056015311 0ustar #!/bin/sh ## ---------------------------------------------------------------------- ## debian/preinst : preinstallation script for xml-core ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- set -e ## ---------------------------------------------------------------------- if [ "$1" = "install" ] then ## ------------------------------------------------------------------ ## preserve legacy /etc/xml/catalog if [ -f /etc/xml/catalog ] then mv /etc/xml/catalog /etc/xml/catalog.legacy fi fi ## ---------------------------------------------------------------------- ## automatically generated debhelper commands #DEBHELPER# exit 0 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/debian/control0000644000000000000000000000274712023443133013560 0ustar Source: xml-core Section: text Priority: optional Maintainer: Debian XML/SGML Group Uploaders: Ardo van Rangelrooij , Daniel Leidert (dale) Build-Depends: debhelper (>= 9.20120909) Build-Depends-Indep: perl Standards-Version: 3.8.3 Vcs-Browser: http://svn.debian.org/wsvn/debian-xml-sgml/packages/xml-core/ Vcs-Svn: svn://svn.debian.org/svn/debian-xml-sgml/packages/xml-core/trunk/ DM-Upload-Allowed: yes Package: xml-core Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, sgml-base (>= 1.17), sed (>= 4.1.2-8) Suggests: debhelper (>= 9.20120909) Description: XML infrastructure and XML catalog file support This package creates the XML infrastructure directories and provides XML catalog file support in compliance with the current Debian XML Policy draft: . * infrastructure directories: - /etc/xml - /usr/share/xml/{declaration,entities,misc,schema} - /usr/local/share/xml/{declaration,entities,misc,schema} . * XML catalog schema: OASIS XML Catalog Committee Specification 1.0 . * update-xmlcatalog(8): tool for maintaining the root XML catalog file and the package XML catalog files in the '/etc/xml' directory as well as local XML catalog files. . * dh_installxmlcatalogs(1): debhelper tool for installing local XML catalog files and registering XML entities in package XML catalog files and the root XML catalog file (requires debhelper package) xml-core-0.13+nmu2/debian/changelog0000644000000000000000000002402612025104144014017 0ustar xml-core (0.13+nmu2) unstable; urgency=low * Non-maintainer upload. * Use the "sub" fourth argument to autoscript that is more robust than the sed snippet way (closes: #687109) - I've verified that the control archive files of w3c-sgml-lib_1.2-3 are byte-for-byte identical when built with 0.13+nmu1 and this version - I've verified that w3c-sgml-lib_1.3-1 builds with this version, i.e. this change unblocks Bug#665298 -- Marcin Owsiany Sat, 15 Sep 2012 14:50:27 +0100 xml-core (0.13+nmu1) unstable; urgency=low * Non-maintainer upload. * Rebuild against debhelper (>= 9.20120528) to fix postinst that unconditionally overwrites files in /etc (see: #477751, closes: #675483). Thanks to Helmut Grohne for the bug report. -- Jakub Wilk Sat, 09 Jun 2012 11:47:37 +0200 xml-core (0.13) unstable; urgency=low * debian/control (Standards-Version): Bumped to 3.8.3. (Priority, Section): Fixed binary-control-field-duplicates-source. * debian/xml-core.xmlcatalogs, schemas/catalog.xml: Register public/system IDs of tr9401.dtd customization layer (closes: #491091). -- Daniel Leidert (dale) Sun, 25 Oct 2009 23:49:09 +0100 xml-core (0.12) unstable; urgency=low * debhelper/dh_installxmlcatalogs: Fixed pod2man errors. (xmlcorever): Increased to 0.12 (#482140). * tools/update-xmlcatalog: Use File::Spec instead of File::Spec::Functions for catfile (#482140). Thanks to Agustin Martin Domingo. Fixed pod2man errors. (add_entry): Be more verbose in case an entity is already registered. * Fixed Kurt Roeckx name in the 0.11 changelog entry. Sorry Kurt. * debian/compat: Raised to v5. * debian/control: Vcs fields transition. Added DM-Upload-Allowed. (Vcs-Svn): Fixed location. (Build-Depends): Raised debhelper to v5. (Standards-Version): Raised to 3.7.3. (Description): Fixed reference to directories in /usr/local. * debian/lintian-overrides/xml-core: Added. The empty directories are shipped by intention. * debian/rules (clean): Remove the created manual pages. (binary-indep): Added call to dh_install. Only depend on perl-base (#482140). * debian/xml-core.install: Added to install lintian override. -- Daniel Leidert (dale) Sun, 26 Oct 2008 15:14:39 +0100 xml-core (0.11) unstable; urgency=low [ Daniel Leidert ] * debian/xml-core.postrm: Only try to remove /var/lib/xml-core, if it exists (closes: #358364). Thanks to Kurt Roeckx, who catched this issue. -- Daniel Leidert (dale) Mon, 16 Apr 2007 19:17:50 +0200 xml-core (0.10) unstable; urgency=low [ Daniel Leidert ] * debian/control: Added XS-Vcs-Browser and XS-Vcs-Svn fields. (Uploaders): Added myself. (Build-Depends-Indep): Moved debhelper to Build-Depends, where it belongs. (Standards-Version): Bump to standards version 3.7.2. (Depends): Added versioned dependency to Sarges sed (closes: #248910). I think, this should clear the situation and we are already near to Sarge = oldstable). * debian/copyright: Updated FSF address and package information. * debian/rules (install-stamp, binary-indep): Directly install the files into the package directory. * debian/xml-core.dirs: Added. We better include the directories in the package. * debian/xml-core.install: Removed. Obsoleted by the change in debian/rules. * debian/xml-core.postinst: Removed empty debhelper script. * debian/xml-core.prerm: Likewise. * debian/xml-core.preinst: The /etc/xml and /var/lib/xml-core directories are shipped with the package. No need to generate them in the debhelper script. * debhelper/dh_installxmlcatalogs: Fixed typo in dh_installxmlcatalogs manpage (closes: #306719). Thanks to A Costa for the report. * debhelper/dh_installxmlcatalogs: Added a small code snippet to add the /etc/xml directory to avoid failing installations, if /etc/xml is missing (closes: #411770). Thanks to Dmitry Rutsky for the report. The patch is based on the the solution used by dh_installcatalogs. * tools/update-xmlcatalog: Removed dead code in the type-value evaluation (closes: #315759). -- Daniel Leidert (dale) Sat, 14 Apr 2007 21:51:53 +0200 xml-core (0.09-0.1) unstable; urgency=low * Non-maintainer upload. * debian/xml-core.postrm, debian/xml-core.preinst: Use absolute path names for files instead of doing a "cd /foo; mv plim plom; cd -" dance (especially since the dance if fragile, too). Closes: #358364. -- Lars Wirzenius Thu, 13 Apr 2006 20:25:34 +0000 xml-core (0.09) unstable; urgency=low * schemas/catalog: added official FPI for XML catalog DTD (closes: Bug#231816) -- Ardo van Rangelrooij Sun, 25 Apr 2004 11:09:19 -0500 xml-core (0.08) unstable; urgency=low * Moved 'dh_installxmlcatalogs' and 'autoscripts' into 'debhelper' directory - debian/rules: updated accordingly * Moved schemas and associated catalogs into 'schemas' directory - debian/xml-core.sgmlcatalogs; updated accordingly - debian/xml-core.xmlcatalogs; updated accordingly * Moved 'update-xmlcatalog*' and XML catalog templates to 'tools' directory * Added Makefiles to all new subdirectories and put all the common parts in 'MAKE/include' * tools/update-xmlcatalog: absorbed manual page in POD format * debian/control: changed maintainer's email address to the new Debian XML/SGML Group's packages mailing list -- Ardo van Rangelrooij Wed, 21 Apr 2004 11:09:24 -0500 xml-core (0.07) unstable; urgency=low * update-xmlcatalog: changed to be idempotent for XML entity registration (closes: Bug#232502) * debian/README.Debian: fixed various small typos and such (closes: Bug#230845) * debian/control: changed 'Maintainer' to 'Debian XML/SGML Group ' and added current maintainer as 'Uploaders' -- Ardo van Rangelrooij Mon, 23 Feb 2004 22:31:10 -0600 xml-core (0.06) unstable; urgency=low * update-xmlcatalog.8: updated to match update-xmlcatalog * Added XML infrastructure directories (closes: Bug#228656) - Makefile: created the XML infrastructure directories under /usr/share/xml and under /usr/share/local/xml - debian/rules: updated to use 'dh_usrlocal' - debian/xml-core.{post,pre}*: removed obsolete code * Added dh_installxmlcatalogs and associated autoscripts - Makefile: updated to generate dh_installxmlcatalogs(1) - debian/control: added build-dependency on 'perl' - Makefile: updated to install dh_installxmlcatalogs and associated files - debian/control: added 'Suggests' for 'debhelper (>= 4.1)' - debian/README.Debian: updated to mention debhelper support * Converted to use dh_installxmlcatalogs - debian/xml-core.xmlcatalogs: added - debian/rules: updated to use dh_installxmlcatalogs - debian/xml-core.{post,pre}*: removed obsolete code * Added registration of XML catalog schema in SGML catalog system (closes: Bug#229259) - debian/xml-core.links: added - debian/rules: updated to use dh_link - catalog: added - debian/xml-core.sgmlcatalogs: added - debian/rules: updated to use dh_installcatalogs * Provided proper examples (closes: Bug#227130) - examples/foo.xmlcatalogs: added - examples/foo.p*: updated * debian/control: rewrote short and long description -- Ardo van Rangelrooij Sun, 1 Feb 2004 13:06:52 -0600 xml-core (0.05) unstable; urgency=low * update-xmlcatalog: changed catalog path generation for root catalog to add "file://" protocol just as is done for package catalogs -- Ardo van Rangelrooij Sat, 10 Jan 2004 16:45:24 -0600 xml-core (0.04) unstable; urgency=low * catalog.xml: reverted back to original version * catalog.header: changed prolog to support bootstrapping XML catalog system (now really closing bug #223041) * debian/control: upgraded to Debian Policy 3.6.1 (no changes) -- Ardo van Rangelrooij Thu, 25 Dec 2003 10:10:26 -0600 xml-core (0.03) unstable; urgency=low * catalog.xml: changed prolog to support bootstrapping the XML catalog system (closes: Bug#223041) * Added debian/README.Debian * update-xmlcatalog.8: added a link to the README.Debian * update-xmlcatalog.8: added a note about update-xmlcatalog(8) being the de-facto standard tool to maintain the XML catalog system on a Debian system * update-xmlcatalog.8: added a note about the impopatibility between update-xmlcatalog(8) and xmlcatalog(1) (from the libxml2-utils package) (closes: Bug#207470) * update-xmlcatalog.8: various cosmetic updates -- Ardo van Rangelrooij Sat, 6 Dec 2003 14:03:38 -0600 xml-core (0.02) unstable; urgency=low * update-xmlcatalog: improved legacy /etc/xml/catalog handling (closes: Bug#207070) - preinst moves legacy '/etc/xml/catalog' to '/etc/xml/catalog.legacy' - postrm moves legacy '/etc/xml/catalog.legacy' back to '/etc/xml/catalog' - update-xmlcatalog: fixed erroneous catalog data file check * debian/prerm: improved to clean own catalog files more robustly (closes: Bug#207171) * update-xmlcatalog: improved command-line option checking * update-xmlcatalog: added proper support for local XML catalog files * debian/control: removed suggestion of not yet existing 'xml-core-doc' * debian/control: improved long description * README: various small cosmetic updates -- Ardo van Rangelrooij Mon, 25 Aug 2003 19:55:00 -0500 xml-core (0.01) unstable; urgency=low * Initial official release -- Ardo van Rangelrooij Sat, 16 Aug 2003 12:50:43 -0500 xml-core (0.0.02) experimental; urgency=low * First public, highly experimental prelimenary release -- Ardo van Rangelrooij Sun, 10 Aug 2003 12:16:54 -0500 xml-core (0.0.01) experimental; urgency=low * Initial private prelimenary release -- Ardo van Rangelrooij Sat, 5 Apr 2003 16:26:27 -0600 xml-core-0.13+nmu2/debian/README.Debian0000644000000000000000000000412210574702560014216 0ustar xml-core for Debian ------------------- De-Facto Standard Tool for Debian XML Catalog System Maintenance ---------------------------------------------------------------- update-xmlcatalog(8) in the xml-core package is the de-facto standard tool to be used to maintain XML catalog files on a Debian system, just as update-catalog(8) in the sgml-base package is the standard tool to be used to maintain SGML catalog files on a Debian system. A Debian XML/SGML Policy document to this effect is currently under development. Incompatibility of update-xmlcatalog(8) and xmlcatalog(1) --------------------------------------------------------- update-xmlcatalog(8) in the xml-core package and xmlcatalog(1) in the libxml2-utils package are _incompatible_. The former has an internal database of all the entries in all the XML catalog files it maintains and regenerates the indicated XML catalog file completely from scratch upon an update. The latter updates the indicated XML catalog file directly. This means that any change made to an XML catalog file using xmlcatalog(1) is overwritten the next time that XML catalog file is updated using update-xmlcatalog(8). Debhelper Support ----------------- This package contains the debhelper script 'dh_installxmlcatalogs' to support installing local XML catalog files and registering XML entities in the XML catalog system. It complies with the current draft Debian XML/SGML policy. For more information see the manual page. Debian XML & SGML Mailing List ------------------------------ The Debian mailing list 'debian-sgml@lists.debian.org' is used to discuss issues related to XML and SGML on Debian systems, with an emphasis on proper integration of tools, packaging standards and the writing of documentation for XML and SGML users. Debian XML & SGML Group Project ------------------------------- The 'Debian XML/SGML Group' project (http://debian-xml-sgml.alioth.debian.org/) has been setup on Debian Alioth (http://alioth.debian.org/) to develop and maintain XML and SGML packages for the Debian Project in a collaborative effort. -- Ardo van Rangelrooij (ardo@debian.org) xml-core-0.13+nmu2/debian/xml-core.postrm0000644000000000000000000000262410610727673015161 0ustar #!/bin/sh ## ---------------------------------------------------------------------- ## debian/postrm : postremoval script for xml-core ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- set -e ## ---------------------------------------------------------------------- ## automatically generated debhelper commands #DEBHELPER# ## ---------------------------------------------------------------------- if [ "$1" = "purge" ] then ## ------------------------------------------------------------------ ## remove /var/lib/xml-core [ -d /var/lib/xml-core ] && rmdir --ignore-fail-on-non-empty /var/lib/xml-core ## ------------------------------------------------------------------ ## remove root XML catalog rm -f /etc/xml/catalog rm -f /etc/xml/catalog.old ## ------------------------------------------------------------------ ## remove /etc/xml [ -d /var/lib/xml-core ] && rmdir --ignore-fail-on-non-empty /etc/xml ## ------------------------------------------------------------------ ## restore legacy /etc/xml/catalog if [ -f /etc/xml/catalog.legacy ] then mv /etc/xml/catalog.legacy /etc/xml/catalog fi fi ## ---------------------------------------------------------------------- exit 0 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/debian/TODO0000644000000000000000000000262410574710260012646 0ustar ------------------------------------------------------------------------------ To do list for xml-core ------------------------------------------------------------------------------ BUGS: ------------------------------------------------------------------------------ Number Description ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ WISHLIST: ------------------------------------------------------------------------------ Number Description ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ VARIOUS: ------------------------------------------------------------------------------ Description ------------------------------------------------------------------------------ * support regenerate CLI to regenerate the root XML catalog files and package XML catalog files * install and register all versions of the XML catalog schema (including symlinks under /usr/share/sgml and registration in the SGML catalog system) (don't forget the copyright) * put as much as possible code in a module (e.g. Debian::XML::Catalog) * add John Cowan's script: http://lists.oasis-open.org/archives/entity-resolution/200106/msg00021.html ------------------------------------------------------------------------------ xml-core-0.13+nmu2/debian/lintian-overrides/0000755000000000000000000000000012025102226015576 5ustar xml-core-0.13+nmu2/debian/lintian-overrides/xml-core0000644000000000000000000000051111006220501017237 0ustar ## The xml-core package creates/provides the core XML infrastructure, ## including these empty directories. xml-core binary: package-contains-empty-directory usr/share/xml/misc/ xml-core binary: package-contains-empty-directory usr/share/xml/entities/ xml-core binary: package-contains-empty-directory usr/share/xml/declaration/ xml-core-0.13+nmu2/schemas/0000755000000000000000000000000012025102226012341 5ustar xml-core-0.13+nmu2/schemas/catalog.dtd0000644000000000000000000000740310574702560014472 0ustar xml-core-0.13+nmu2/schemas/catalog.xml0000644000000000000000000000141111271152743014505 0ustar xml-core-0.13+nmu2/schemas/catalog0000644000000000000000000000166310574702560013722 0ustar -- ...................................................................... -- -- TR 9401 catalog registration for the XML Catalog DTD -- -- ...................................................................... -- -- ...................................................................... -- -- public identifiers override system identifiers, if both are supplied -- OVERRIDE YES -- ...................................................................... -- PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN" catalog.dtd DTDDECL "-//OASIS//DTD XML Catalogs V1.0//EN" /usr/share/sgml/declaration/xml.dcl -- ...................................................................... -- PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" catalog.dtd DTDDECL "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" /usr/share/sgml/declaration/xml.dcl -- ...................................................................... -- xml-core-0.13+nmu2/schemas/Makefile0000644000000000000000000000166410574702560014026 0ustar ## ---------------------------------------------------------------------- ## Makefile : makefile for xml-core/schemas ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- include ../MAKE/include ## ---------------------------------------------------------------------- ## Schemas directory definitions pkg_name = xml-core pkg_schema_dir = $(schema_dir)/$(pkg_name) ## ---------------------------------------------------------------------- ## Schemas file definitions schemas = \ catalog.dtd \ tr9401.dtd ## ---------------------------------------------------------------------- ## targets all: install: set -e; \ $(INSTALL_DIR) $(pkg_schema_dir); \ for f in $(schemas); \ do \ $(INSTALL_FILE) $$f $(pkg_schema_dir); \ done .PHONY: \ all \ install ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/schemas/tr9401.dtd0000644000000000000000000001033410574702560014020 0ustar %catalog.dtd; xml-core-0.13+nmu2/examples/0000755000000000000000000000000012025102226012534 5ustar xml-core-0.13+nmu2/examples/foo.prerm0000755000000000000000000000212110574702560014403 0ustar #!/bin/sh ## ---------------------------------------------------------------------- ## debian/prerm: preremoval script for foo ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## Abort if any command returns an error value set -e ## -------------------------------------------------------------- ## Remove XML catalog entries if [ "$1" = "remove" -o "$1" = "upgrade" ] then update-xmlcatalog --verbose --add --root --type public \ --id "-//FOO//DTD FOO//EN" update-xmlcatalog --verbose --add --root --type system \ --id "http://www.foo.org/foo/foo.dtd" update-xmlcatalog --verbose --add --package foo --type public \ --id "-//FOO//DTD FOO//EN" update-xmlcatalog --verbose --add --package foo --type system \ --id "http://www.foo.org/foo/foo.dtd" fi ## ---------------------------------------------------------------------- ## Automatically added sections #DEBHELPER# exit 0 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/examples/foo.postrm0000755000000000000000000000132610574702560014610 0ustar #!/bin/sh ## ---------------------------------------------------------------------- ## debian/postrm: postremoval script for foo ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## Abort if any command returns an error value set -e ## -------------------------------------------------------------- ## Remove package XML catalog file if [ "$1" = "purge" ] then rm -f /etc/xml/foo.xml rm -f /etc/xml/foo.xml.old fi ## ---------------------------------------------------------------------- ## Automatically added sections #DEBHELPER# exit 0 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/examples/foo.xmlcatalogs0000644000000000000000000000034710574702560015601 0ustar local;catalog.xml;/usr/share/xml/schema/foo/catalog.xml root-and-package;public;-//FOO//DTD FOO//EN;/usr/share/xml/schema/foo/catalog.xml root-and-package;system;http://www.foo.org/foo/foo.dtd;/usr/share/xml/schema/foo/catalog.xml xml-core-0.13+nmu2/examples/foo.postinst0000755000000000000000000000235310574702560015150 0ustar #!/bin/sh ## ---------------------------------------------------------------------- ## debian/postinst: post-installation script for foo ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## Abort if any command returns an error value set -e ## -------------------------------------------------------------- ## Install XML catalog entries if [ "$1" = "configure" ] then update-xmlcatalog --verbose --add --package foo --type public \ --id "-//FOO//DTD FOO//EN" \ --local /usr/share/xml/schema/foo/catalog.xml update-xmlcatalog --verbose --add --package foo --type system \ --id "http://www.foo.org/foo/foo.dtd" \ --local /usr/share/xml/schema/foo/catalog.xml update-xmlcatalog --verbose --add --root --type public \ --id "-//FOO//DTD FOO//EN" \ --package foo update-xmlcatalog --verbose --add --root --type system \ --id "http://www.foo.org/foo/foo.dtd" \ --package foo fi ## ---------------------------------------------------------------------- ## Automatically added sections #DEBHELPER# exit 0 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/MAKE/0000755000000000000000000000000012025102226011433 5ustar xml-core-0.13+nmu2/MAKE/include0000644000000000000000000000261210574702560013020 0ustar ## ---------------------------------------------------------------------- ## MAKE/include : include makefile for xml-core ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## System directory definitions prefix = /usr bin_dir = $(prefix)/bin sbin_dir = $(prefix)/sbin share_dir = $(prefix)/share ## ---------------------------------------------------------------------- ## Local directory definitions local_dir = $(prefix)/local local_share_dir = $(local_dir)/share ## ---------------------------------------------------------------------- ## Manual pages directory definitions man_dir = $(share_dir)/man man1_ext = 1 man1_dir = $(man_dir)/man$(man1_ext) man8_ext = 8 man8_dir = $(man_dir)/man$(man8_ext) ## ---------------------------------------------------------------------- ## XML directory definitions xml_dir = $(share_dir)/xml local_xml_dir = $(local_share_dir)/xml schema_dir = $(xml_dir)/schema ## ---------------------------------------------------------------------- ## Build definitions POD2MAN = pod2man ## ---------------------------------------------------------------------- ## Install definitions INSTALL = install INSTALL_DIR = $(INSTALL) -m 755 -d INSTALL_BIN = $(INSTALL) -m 755 INSTALL_FILE = $(INSTALL) -m 644 ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/tools/0000755000000000000000000000000012025102226012056 5ustar xml-core-0.13+nmu2/tools/lib/0000755000000000000000000000000012025102226012624 5ustar xml-core-0.13+nmu2/tools/lib/Debian/0000755000000000000000000000000012025102226014006 5ustar xml-core-0.13+nmu2/tools/lib/Debian/XML/0000755000000000000000000000000012025102226014446 5ustar xml-core-0.13+nmu2/tools/lib/Debian/XML/Catalog.pm0000644000000000000000000000050510574702560016374 0ustar ## ---------------------------------------------------------------------- ## Debian/XML/Catalog.pm : ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/tools/catalog.header0000644000000000000000000000031210574702560014654 0ustar xml-core-0.13+nmu2/tools/Makefile0000644000000000000000000000252710574702560013542 0ustar ## ---------------------------------------------------------------------- ## Makefile : makefile for xml-core/tools ## ---------------------------------------------------------------------- ## ---------------------------------------------------------------------- include ../MAKE/include ## ---------------------------------------------------------------------- ## Tools directory definitions pkg_name = xml-core pkg_share_dir = $(share_dir)/$(pkg_name) ## ---------------------------------------------------------------------- ## Tools file definitions templates = \ catalog.header \ catalog.footer sbins = \ update-xmlcatalog man8s = \ $(addsuffix .$(man8_ext),$(sbins)) ## ---------------------------------------------------------------------- ## targets all: $(man8s) %.$(man8_ext): % $(POD2MAN) --section $(man8_ext) --center $(pkg_name) ${<} ${@} install: set -e; \ $(INSTALL_DIR) $(pkg_share_dir); \ for f in $(templates); \ do \ $(INSTALL_FILE) $${f} $(pkg_share_dir); \ done set -e; \ $(INSTALL_DIR) $(sbin_dir); \ for f in $(sbins); \ do \ $(INSTALL_BIN) $${f} $(sbin_dir); \ done set -e; \ $(INSTALL_DIR) $(man8_dir); \ for f in $(man8s); \ do \ $(INSTALL_FILE) $${f} $(man8_dir); \ done .PHONY: \ all \ install ## ---------------------------------------------------------------------- xml-core-0.13+nmu2/tools/catalog.footer0000644000000000000000000000001310574702560014720 0ustar xml-core-0.13+nmu2/tools/update-xmlcatalog0000755000000000000000000004044211075162646015443 0ustar #!/usr/bin/perl ## ---------------------------------------------------------------------- ## Debian update-xmlcatalog ## ---------------------------------------------------------------------- ## Copyright (c) 2003-2004 Ardo van Rangelrooij ## ## This is free software; see the GNU General Public Licence version 2 ## or later for copying conditions. There is NO warranty. ## ---------------------------------------------------------------------- =head1 NAME update-xmlcatalog - maintain XML catalog files =head1 SYNOPSIS B B<--add> B<--root> S I> S I> S I> B B<--del> B<--root> S I> S I> S I> B B<--add> S I> S I> S I> S I> B B<--del> S I> S I> S I> S I> B B<--add> S I> S I> S I> S I> B B<--del> S I> S I> S I> S I> B B<--help> =head1 DESCRIPTION B add entries to and removes entries from the root XML catalog file, a package XML catalog file or a local XML catalog file. =head1 OPTIONS =over 4 =item B<--add> Adds the entry to the root XML catalog file, a package XML catalog file or a local XML catalog file. If the XML catalog file does not exist yet, it is automatically created. =item B<--del> Deletes the entry from the root XML catalog file, the package XML catalog file or the local XML catalog file. A resulting empty XML catalog is not automatically deleted from the filesystem. =item B<--file> I Indicates a local filename. =item B<--id> I Indicates the XML catalog file entry identifier. =item B<--local> I Indicates a local XML catalog file. =item B<--package> I Indicates a package XML catalog file. =item B<--root> Indicates the root XML catalog file. =item B<--type> I Indicates the XML catalog file entry type (public, system, uri). =item B<--help> Displays the usage information. =back =head1 NOTES B is the de-facto standard tool to be used to maintain XML catalog files on a Debian system, similar to that L is the standard tool to be used to main SGML catalog files on a Debian system. A Debian XML Policy document to this effect is currently under development. B and L are incompatible. The former has an internal database of all the entries in all the XML catalog files it maintains and regenerates the indicated XML catalog file completely from scratch upon an update. The latter updates the indicated XML catalog file directly. This means that any change made to an XML catalog file using L is overwritten the next time that XML catalog file is updated using B. =head1 SEE ALSO F =head1 AUTHOR B Eardo@debian.orgE =cut ## ---------------------------------------------------------------------- use strict; ## ---------------------------------------------------------------------- use File::Spec; use Getopt::Long; ## ---------------------------------------------------------------------- $0 =~ m|[^/]+$|; ## ---------------------------------------------------------------------- my $name = $&; ## ---------------------------------------------------------------------- use vars qw( $catalog_data $catalog_data_dir ); use vars qw( $catalog $catalog_dir ); use vars qw( %catalog $key $entry ); ## ---------------------------------------------------------------------- $catalog_data_dir = '/var/lib/xml-core'; $catalog_dir = '/etc/xml'; ## ---------------------------------------------------------------------- use vars qw( $add ); use vars qw( $del ); use vars qw( $file ); use vars qw( $help ); use vars qw( $local ); use vars qw( $package ); use vars qw( $root ); use vars qw( $type $id ); use vars qw( $verbose ); ## ---------------------------------------------------------------------- if ( ! GetOptions( 'add' => \$add, 'del' => \$del, 'file=s' => \$file, 'help' => \$help, 'id=s' => \$id, 'local=s' => \$local, 'package=s' => \$package, 'root' => \$root, 'type=s' => \$type, 'verbose' => \$verbose, ) ) { &help; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $help ) ) { &help; exit -1; } ## ---------------------------------------------------------------------- if ( ! ( defined( $add ) || defined( $del ) ) ) { print STDERR "$name: error: either 'add' or 'del' must be given\n"; exit 1; } elsif ( ( defined( $add ) && defined( $del ) ) ) { print STDERR "$name: error: only one of 'add' and 'del' can be given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { if ( defined( $root ) ) { if ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } } else { print STDERR "$name: error: package catalog not given\n"; exit 1; } if ( defined( $local) || defined( $file ) ) { print STDERR "$name: error: local catalog and file not for adding to root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { if ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } } else { print STDERR "$name: error: local catalog not given\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for adding to package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( defined( $file ) ) { if ( ! -f $file ) { print STDERR "$name: error: file $file not found\n"; exit 1; } } else { print STDERR "$name: error: file not given\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } elsif ( defined( $del ) ) { if ( defined( $root ) ) { my $catalog = File::Spec->catfile( $catalog_dir, 'catalog' ); if ( ! -f $catalog ) { print STDERR "$name: error: root catalog $catalog not found\n"; exit 1; } if ( defined( $package) || defined( $local ) || defined( $file ) ) { print STDERR "$name: error: package catalog, local catalog or file not for deleting from root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } if ( defined( $local ) || defined( $file ) ) { print STDERR "$name: error: local catalog or file not for deleting from package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for deleting from local catalog file\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } ## ---------------------------------------------------------------------- if ( defined( $type ) ) { if ( $type !~ /^(public|system|uri)$/ ) { print STDERR "$name: error: wrong type\n"; exit 1; } } else { print STDERR "$name: error: type not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( ! defined( $id ) ) { print STDERR "$name: error: id not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $root ) ) { $catalog = 'catalog'; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog ); $catalog = File::Spec->catfile( $catalog_dir, $catalog ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $package = "catalog=\"file:///etc/xml/$package.xml\""; $key = "$type $id"; $entry = "$package"; } elsif ( defined( $package ) ) { $catalog_data = File::Spec->catfile( $catalog_data_dir, $package ); $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $local = "catalog=\"file://$local\""; $key = "$type $id"; $entry = "$local"; } elsif ( defined( $local ) ) { $catalog = $local; $catalog_data = $local; $catalog_data =~ tr|/|_|; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog_data ); my $start = ( $type eq 'uri' ) ? 'name' : $type; $start .= 'Id' unless $type eq 'uri'; $id = "$start=\"$id\""; $file = "uri=\"$file\""; $key = "$type $id"; $entry = "$file"; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { &read_catalog_data if -f $catalog_data; if ( &add_entry ) { &create_backup if -f $catalog; &write_catalog_data; &write_catalog; } else { exit 1; } } elsif ( defined( $del ) ) { &read_catalog_data; if ( &del_entry ) { &create_backup; &write_catalog_data; &write_catalog; } else { exit 1; } } ## ---------------------------------------------------------------------- exit 0; ## ---------------------------------------------------------------------- sub add_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { if ( $catalog{ $key } ne $entry ) { print STDERR "$name: error: entity already registered with a different value\n"; print STDERR " Entity : [$key]\n"; print STDERR " Old value: [$catalog{$key}]\n"; print STDERR " New value: [$entry]\n"; return; } else { print STDERR "$name: notice: entity already registered\n" if $verbose; return 1; } } else { print "$name: adding entity to catalog data $catalog_data with the same value\n" if $verbose; $catalog{ $key } = $entry; return 1; } } ## add_entry ## ---------------------------------------------------------------------- sub del_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { print "$name: removing entity from catalog data $catalog_data\n" if $verbose; delete( $catalog{ $key } ); return 1; } else { print STDERR "$name: error: entity not registered\n"; return; } } ## del_entry ## ---------------------------------------------------------------------- sub read_catalog_data { ## ------------------------------------------------------------------ print "$name: reading catalog data $catalog_data\n" if $verbose; open( CATALOG_DATA, '<', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for reading: $!"; while ( ) { chop; my ( $key, $entry ) = split( />/ ); $key =~ s/^', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for writing: $!"; my $counter = 0; for my $key ( keys %catalog ) { print( CATALOG_DATA "<$key><$catalog{ $key }>\n" ); $counter++; } close( CATALOG_DATA ) or die "$name: cannot close catalog data $catalog_data: $!"; ## ------------------------------------------------------------------ if ( $counter == 0 ) { print "$name: removing catalog data $catalog_data\n" if $verbose; unlink( $catalog_data ); } } ## write_catalog_data ## ---------------------------------------------------------------------- sub create_backup { ## ------------------------------------------------------------------ my $backup = $catalog . '.old'; ## ------------------------------------------------------------------ if ( -f $backup ) { print "$name: removing backup $backup\n" if $verbose; unlink( $backup ) or die "$name: cannot remove backup $backup: $!"; } ## ------------------------------------------------------------------ print "$name: moving catalog $catalog to backup $backup\n" if $verbose; rename( $catalog, $backup ) or die "$name: cannot move catalog $catalog to backup $backup: $!"; } ## create_backup ## ---------------------------------------------------------------------- sub write_catalog { ## ------------------------------------------------------------------ my @catalog = (); ## ------------------------------------------------------------------ my $header = '/usr/share/xml-core/catalog.header'; open( HEADER, '<', $header ) or die "$name: cannot open catalog header $header for reading: $!"; while (
) { chop; push( @catalog, $_ ); } close( HEADER ) or die "$name: cannot close catalog header $header: $!"; ## ------------------------------------------------------------------ my $counter = 0; for my $key ( keys %catalog ) { push( @catalog, "<$key $catalog{ $key }/>" ); $counter++; } ## ------------------------------------------------------------------ my $footer = '/usr/share/xml-core/catalog.footer'; open( FOOTER, '<', $footer ) or die "$name: cannot open catalog footer $footer for reading: $!"; while (