I would like to package a dtd for a package of mine: pam_mount. It has an xml
config file that has this dtd line:
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
Where do I now have to install the dtd? Is it
/usr/share/xml/dtds/pam_mount/pam_mount.conf.xml.dtd? I guess I will also have
to create some XML catalog file, probably with xmlcatalog to make xmllint find
the dtd automatically. This seems to work:
# for /etc/catalog and xmlcatalog
Requires: xml-common
Requires(post): xml-common libxml2
Requires(postun): xml-common libxml2
%postun
if [ $1 = 0 ]; then
/usr/bin/xmlcatalog --noout --add "rewriteSystem" pam_mount.conf.xml.dtd
file:///usr/share/xml/pam_mount/dtds/pam_mount.conf.xml.dtd /etc/xml/catalog
fi
If this is good, I will suggest to include this in the Guidelines or add it
somewhere else in the wiki. Or is there already some guidance that I did not
find?
Regards,
Till
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
12-11-2008, 11:31 PM
Till Maas
Packaging dtds
On Fri December 12 2008, Till Maas wrote:
> %postun
> if [ $1 = 0 ]; then
> /usr/bin/xmlcatalog --noout --add "rewriteSystem" pam_mount.conf.xml.dtd
> file:///usr/share/xml/pam_mount/dtds/pam_mount.conf.xml.dtd
> /etc/xml/catalog fi
Regards,
Till
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
12-12-2008, 12:39 AM
Toshio Kuratomi
Packaging dtds
I wrote some a catalog handling %post(un) in the Red Hat Linux 9/Fedora
Core 1 time frame. Not sure if it's still up to date, though.
> I would like to package a dtd for a package of mine: pam_mount. It has an xml
> config file that has this dtd line:
>
> <!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
>
The DOCTYPE that I was dealing with was:
<!DOCTYPE checklist
PUBLIC "-//BadgerWare//DTD QA Assistant Checklist File 0.3//EN"
"http://qa-assistant.sf.net/dtds/checklist/0.3/checklist.dtd">
I think some of the differences we see below are due to PUBLIC instead
of SYSTEM. Some other differences are due to upstream's use of a
subcatalog.
> Where do I now have to install the dtd? Is it
> /usr/share/xml/dtds/pam_mount/pam_mount.conf.xml.dtd? I guess I will also have
> to create some XML catalog file, probably with xmlcatalog to make xmllint find
> the dtd automatically. This seems to work:
>
> # for /etc/catalog and xmlcatalog
> Requires: xml-common
> Requires(post): xml-common libxml2
> Requires(postun): xml-common libxml2
>
This looks correct.
The $CATALOG file referenced in the above snippets was created by the
upstream Makefile. It added rewriteSystem as you do and also rewriteURI
and public:
The dtd ended up in %{_datadir}/xml/qa-assistant/checklist/0.3/checklist.dtd
The catalog referencing it was in %{_datadir}/xml/qa-assistant/xmlcatalog
> If this is good, I will suggest to include this in the Guidelines or add it
> somewhere else in the wiki. Or is there already some guidance that I did not
> find?
>
This should go on Packaging/ScriptletSnippets when done.
-Toshio
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
12-12-2008, 08:17 AM
"Nicolas Mailhot"
Packaging dtds
Le Ven 12 décembre 2008 02:39, Toshio Kuratomi a écrit :
> I think some of the differences we see below are due to PUBLIC instead
> of SYSTEM. Some other differences are due to upstream's use of a
> subcatalog.
IIRC a catalog indexes PUBLIC objects, so you need to add a PUBLIC id
to your DTD to catalog it.
SYSTEM is "direct reference to local system path"
--
Nicolas Mailhot
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
12-12-2008, 08:23 AM
Till Maas
Packaging dtds
On Fri December 12 2008, Nicolas Mailhot wrote:
> IIRC a catalog indexes PUBLIC objects, so you need to add a PUBLIC id
> to your DTD to catalog it.
/etc/xml/catalog also works for SYSTEM objects.
Regards,
Till
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
12-12-2008, 03:47 PM
Ville Skyttä
Packaging dtds
On Friday 12 December 2008, Till Maas wrote:
> If this is good, I will suggest to include this in the Guidelines or add it
> somewhere else in the wiki. Or is there already some guidance that I did
> not find?
Unless you already have, I suggest taking a look at the xhtml1-dtds package;
quite a bit of work has went to it (as well as html401-dtds) to get things
right. See also discussion in bugs 181068 and 226559.
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list