Debian Bug report logs -
#430118
update-perl-sax-parsers: Depends on filesystem ordering to determine default parser
Reported by: Daniel Schepler <schepler@math.unipd.it>
Date: Fri, 22 Jun 2007 13:09:01 UTC
Severity: serious
Tags: patch
Found in version libxml-sax-perl/0.14-0.1
Fixed in version libxml-sax-perl/0.16+dfsg-1
Done: Niko Tyni <ntyni@iki.fi>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, florian ragwitz <rafl@debian.org>, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Daniel Schepler <schepler@math.unipd.it>:
New Bug report received and forwarded. Copy sent to florian ragwitz <rafl@debian.org>, Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libxml-sax-perl
Version: 0.14-0.1
Severity: serious
X-Debbugs-CC: Florian Ragwitz <rafl@debian.org>
Blocks: 425928, 429902
As the subject says: update-perl-sax-parsers depends on the filesystem
ordering of entries in /etc/perl/XML/SAX/ParserDetails.d to determine the
order it puts entries in /etc/perl/XML/SAX/ParserDetails.ini, and the last
entry in that file appears to be the one interpreted as the default parser.
On new installations, or installations upgraded to enable the dir_index
option on the root ext3 filesystem, this means that XML::SAX::PurePerl always
ends up being the default parser, which almost certainly isn't what was
intended. See e.g. #425928 and #429902 for the results of this bug,
especially with XML::SAX::PurePerl broken as it is right now.
My proposed fix is to assign a priority to each parser and either have
update-perl-sax-parsers use that to determine an ordering, or have whatever
code determines the default parser find the maximum priority parser. I'm
CC'ing the libxml-libxml-perl maintainer for a heads up on this issue.
Blocking bugs of 425928 added: 430118
Request was from Daniel Schepler <schepler@math.unipd.it>
to control@bugs.debian.org.
(Fri, 22 Jun 2007 13:27:03 GMT) (full text, mbox, link).
Blocking bugs of 429902 added: 430118
Request was from Daniel Schepler <schepler@math.unipd.it>
to control@bugs.debian.org.
(Fri, 22 Jun 2007 13:27:05 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Niko Tyni <ntyni@iki.fi>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #14 received at 430118@bugs.debian.org (full text, mbox, reply):
(let's move this from pkg-perl-maintainers to the relevant
bugreport, #430118)
On Tue, Jul 03, 2007 at 03:22:35PM -0400, Jay Bonci wrote:
> I'm looking at the XML::SAX thing right now. There are a couple of
> solutions.
>
> One of which is to simply reorder the final list with some perl hack so
> that XML::SAX::PurePerl is never set as the default unless it started that
> way.
Yes, I think this is the minimal required change. It would emulate
the upstream behaviour for the most important part: all other parsers
override XML::SAX::PurePerl.
There's another problem about the current update-perl-sax-parsers system:
it's misusing /etc, since local changes are not preserved on upgrades.
Of course, there isn't much to really configure, but if somebody wants
to eg. remove XML::SAX::PurePerl from /etc/perl/XML/SAX/ParserDetails.d
(or truncate it to get the same effect), it's going to come back on
each upgrade.
I think it would be better to store the parser details under /var, say
/var/lib/libxml-sax-perl/ParserDetails.d, since their content is not
really configuration data anyway.
The resulting configuration file, /etc/perl/XML/SAX/ParserDetails.ini,
should be handled so that local configuration changes are preserved.
This could be done with eg. ucf.
> The suggested method in the bug of a SAX-based priority parser election
> doesn't really seem to make good organizational sense. It'd have to be a
> fairly large upstream change to the file, which we could work out if that's
> kind of what everbody wants.
FWIW, I would also prefer a priority-based system where the priorities
could be configured by the local administrator (but would have reasonable
defaults, of course.) This would make the behaviour more deterministic,
as packages could specify sensible priorities instead of being stuck
with the filesystem ordering of their names.
I don't think the format of the files need to be changed for this; the
priority could be encoded to the filename, preferably via symlinks as
usual with the *.d stuff.
This would need one more level of indirection; the current
/etc/perl/XML/SAX/ParserDetails.d directory could be reused for the
symlinks into /var/lib/libxml-sax-perl/ParserDetails.d. The links could
be named eg. "NN-<parser>", with NN specifying the priority and <parser>
the name of the parser.
Obviously, a symlink should only be created if there isn't a file
referring to the same parser already (to cater for local priority or
content changes). Preserving symlink removal by the administrator is a
bit harder, and would probably need an interface change so that other
packages would invoke update-perl-sax-parsers with different arguments
on upgrade and the initial install.
I can write a more detailed proposal if this sounds desirable; please
let me know what you think about this.
Cheers,
--
Niko Tyni ntyni@iki.fi
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Gerfried Fuchs <rhonda@deb.at>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #19 received at 430118@bugs.debian.org (full text, mbox, reply):
On Sun, Jul 22, 2007 at 04:02:57PM +0300, Niko Tyni wrote:
> On Tue, Jul 03, 2007 at 03:22:35PM -0400, Jay Bonci wrote:
> > I'm looking at the XML::SAX thing right now. There are a couple of
> > solutions.
> >
> > One of which is to simply reorder the final list with some perl hack so
> > that XML::SAX::PurePerl is never set as the default unless it started that
> > way.
>
> Yes, I think this is the minimal required change. It would emulate
> the upstream behaviour for the most important part: all other parsers
> override XML::SAX::PurePerl.
Any news on this bugreport? I don't see any reply to Niko's mail since
last month, don't forget that it is a RC bug.
It still hinders slony1 to transition to testing too, which is a bit of
a PITA because the new version uses postgresql-8.2 where the one in
testing is still using postgresql-8.1, which AIUI is expected to get
removed.
Thanks,
Rhonda
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Damyan Ivanov <dam@modsoftsys.com>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #24 received at 430118@bugs.debian.org (full text, mbox, reply):
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -=| Gerfried Fuchs, 23.08.2007 15:18 |=-
> Any news on this bugreport? I don't see any reply to Niko's mail since
> last month, don't forget that it is a RC bug.
I gave this a try, but all this XML::SAX is so black magic. I tried to
understand what is going on but got so confused that I am no longer sure
if I want to get that much into it.
Anyway, I imported the sources into pkg-perl's SVN repository so other
group members (or even better, the present maintainer) can go further.
BTW, the group's SVN is open to all DDs...
> It still hinders slony1 to transition to testing too, which is a bit of
> a PITA because the new version uses postgresql-8.2 where the one in
> testing is still using postgresql-8.1, which AIUI is expected to get
> removed.
Yeah, it is a pity that this package is not in good shape.
- --
dam JabberID: dam@jabber.minus273.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGzdJ3Hqjlqpcl9jsRAl/vAJ9Y2Ck5YIvgzOLIli4Z2QZ55h29pQCZAQOw
lBWysHOEgF0X1sR/EV+Nu+A=
=nsvi
-----END PGP SIGNATURE-----
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Ardo van Rangelrooij <ardo@ardolabs.com>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #29 received at 430118@bugs.debian.org (full text, mbox, reply):
Damyan Ivanov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> - -=| Gerfried Fuchs, 23.08.2007 15:18 |=-
>> Any news on this bugreport? I don't see any reply to Niko's mail since
>> last month, don't forget that it is a RC bug.
>
> I gave this a try, but all this XML::SAX is so black magic. I tried to
> understand what is going on but got so confused that I am no longer sure
> if I want to get that much into it.
>
> Anyway, I imported the sources into pkg-perl's SVN repository so other
> group members (or even better, the present maintainer) can go further.
>
> BTW, the group's SVN is open to all DDs...
>
>> It still hinders slony1 to transition to testing too, which is a bit of
>> a PITA because the new version uses postgresql-8.2 where the one in
>> testing is still using postgresql-8.1, which AIUI is expected to get
>> removed.
>
> Yeah, it is a pity that this package is not in good shape.
Let me take a look at it this weekend. Since I put this black magic
together (that is, the Debian aspects of it), I should be able to bring
this package back from the dark side.
Thanks,
Ardo
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Niko Tyni <ntyni@iki.fi>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #34 received at 430118@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tag 430118 patch
thanks
Hi,
I'm attaching a proposed patch that fixes these RC issues mentioned in
this bug report.
1) update-perl-sax-parsers makes the default parser be the last one
returned by readdir(), resulting in the worst possible choice
(XML::SAX::PurePerl) on ext3 filesystems with the dir_index option.
The proposed fix is to assign a priority to each parser and set
the XML::SAX::PurePerl priority low enough that all others will
override it.
The priorities are encoded into the ParserDetails.d entry filenames.
The default priority is 50, XML::SAX::PurePerl gets 10, and parsers
with the same priority are sorted in an alphabetic order.
The priorities should be discussed between the maintainers
of the parser modules (at least libxml-libxml-perl and
libxml-sax-expat-perl). Currently XML::SAX::Expat ends up last and
thus is the default parser when installed. This is probably the
desired end result as well, so the transition should be smooth.
2) local changes to /etc/perl/XML/SAX/ParserDetails.ini aren't honored
The patch handles the configuration file with ucf. The preinst script
calculates and stores the md5sum for an unmodified config file to
make sure that ucf dialogs don't pop up without reason.
3) local changes to the parser entries in /etc/perl/XML/SAX/ParserDetails.d/
aren't honored
The patch moves the ParserDetails.d directory under
/var/lib/libxml-sax-perl. This means that the priorities introduced
in 1) can't be overridden by local configuration. I considered this
but decided that it would be overengineering, as local configuration
can go into the resulting ParserDetails.ini as well.
The issues should possibly cloned into three separate bugs, but the
patches can't really be made independent since they touch the same parts
of the code in several places.
The patch is formatted as an NMU, but the changes inside aren't quite as
minimal as would perhaps be proper for that. In particular, I decided
to remove the preinst pre-sarge cleanup of different iterations of the
/etc/perl/XML/SAX directory rather than patch the logic to handle yet
one move.
As the changes are rather extensive, I'd prefer something like this to
be included in a maintainer upload rather than an NMU. Jay, I haven't
seen anything from you on this since July. Would it be OK with you if
we adopted this for the pkg-perl group?
Any comments on the patch are naturally welcome.
Cheers,
--
Niko Tyni ntyni@iki.fi
[430118.patch (text/x-diff, attachment)]
Tags added: patch
Request was from Niko Tyni <ntyni@iki.fi>
to control@bugs.debian.org.
(Thu, 08 Nov 2007 21:27:03 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Niko Tyni <ntyni@iki.fi>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #41 received at 430118@bugs.debian.org (full text, mbox, reply):
On Thu, Nov 08, 2007 at 11:23:34PM +0200, Niko Tyni wrote:
(libxml-sax-perl)
> I'm attaching a proposed patch that fixes these RC issues mentioned in
> this bug report.
> As the changes are rather extensive, I'd prefer something like this to
> be included in a maintainer upload rather than an NMU. Jay, I haven't
> seen anything from you on this since July. Would it be OK with you if
> we adopted this for the pkg-perl group?
Jay, did you get this? Please consider giving the package away to the
pkg-perl group.
Cheers,
--
Niko Tyni ntyni@iki.fi
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Niko Tyni <ntyni@iki.fi>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #46 received at 430118@bugs.debian.org (full text, mbox, reply):
Hi,
I have prepared a proposed new version of libxml-sax-perl, closing
all the open bugs including these two RC ones (#430118 and #452872).
I just pushed the packaging into the pkg-perl Alioth repository at
svn://svn.debian.org/svn/pkg-perl/trunk/libxml-sax-perl
The full changelog can be seen at
http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/debian/changelog?op=file
The patch I sent to #430118 corresponds to r9825. There were a few bugs
in it that I fixed since; see r9834, r9861 and r9866.
I can knit together a new patch targeted specifically at #430118 if
really needed, but I'd much prefer to have the whole updated package go
in as a maintainer upload. Jay, please comment.
Cheers,
--
Niko Tyni ntyni@iki.fi
Reply sent to Niko Tyni <ntyni@iki.fi>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Daniel Schepler <schepler@math.unipd.it>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #51 received at 430118-close@bugs.debian.org (full text, mbox, reply):
Source: libxml-sax-perl
Source-Version: 0.16+dfsg-1
We believe that the bug you reported is fixed in the latest version of
libxml-sax-perl, which is due to be installed in the Debian FTP archive:
libxml-sax-perl_0.16+dfsg-1.diff.gz
to pool/main/libx/libxml-sax-perl/libxml-sax-perl_0.16+dfsg-1.diff.gz
libxml-sax-perl_0.16+dfsg-1.dsc
to pool/main/libx/libxml-sax-perl/libxml-sax-perl_0.16+dfsg-1.dsc
libxml-sax-perl_0.16+dfsg-1_all.deb
to pool/main/libx/libxml-sax-perl/libxml-sax-perl_0.16+dfsg-1_all.deb
libxml-sax-perl_0.16+dfsg.orig.tar.gz
to pool/main/libx/libxml-sax-perl/libxml-sax-perl_0.16+dfsg.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 430118@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Niko Tyni <ntyni@iki.fi> (supplier of updated libxml-sax-perl package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Tue, 27 Nov 2007 21:13:59 +0200
Source: libxml-sax-perl
Binary: libxml-sax-perl
Architecture: source all
Version: 0.16+dfsg-1
Distribution: experimental
Urgency: low
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Changed-By: Niko Tyni <ntyni@iki.fi>
Description:
libxml-sax-perl - Perl module for using and building Perl SAX2 XML processors
Closes: 229178 240356 295398 332440 420867 430118 441473 452872
Changes:
libxml-sax-perl (0.16+dfsg-1) experimental; urgency=low
.
[ Niko Tyni ]
* New maintainer: Debian Perl Group
+ leave Jay Bonci in the Uploaders field.
* Acknowledge NMUs. (Closes: #441473)
* Add support for SAX parser priorities.
+ lower the XML::SAX::PurePerl priority so that it will not be the
default parser anymore if any others are available. (Closes: #430118)
* Move the /etc/perl/XML/SAX/ParserDetails.d directory under
/var/lib/libxml-sax-perl, since it's not really configuration data.
* Use ucf to manage local changes to /etc/perl/XML/SAX/ParserDetails.ini.
* Remove the pre-sarge preinst cleanup of /etc/XML and /etc/perl/SAX
introduced in 0.12-3.
+ Now survives systems with a leftover symlink /etc/perl/XML -> .
(Closes: #240356)
* Point to the compressed file in XML::SAX::save_parsers(). (Closes: #332440)
* Recommend libxml-sax-expat-perl and explain this in the package
description. (Closes: #420867)
* Upgrade to debhelper compatibility level 5.
* Upgrade to Standards-Version 3.7.2. No changes needed.
* Don't install the upstream README file, there's no information in it.
* Update debian/copyright.
* Add explanations in the examples to clarify why they look like
stray maintainer scripts. (Closes: #295398)
* Various improvements in debian/rules.
+ remove generated files in the 'clean' target.
* Update debian/watch.
* Move the examples under debian/, they are Debian-specific.
* Use quilt to manage debian/patches.
+ charset-decoding: Fix charset decoding in the PurePerl module (#405186)
+ parserdetails-debian: The Debian way of handling ParserDetails.ini
+ skip-test-with-nonfree-file: skip tests in t/16large.t depending on
a non-free input file.
* Move update-perl-sax-parsers under debian/ in the source package, it's
Debian-specific.
* Remove an unused Debian modification: XML::SAX->load_parsers() doesn't
accept the '$file' argument anymore.
* README.Debian: add a pointer to the CPAN FAQ entry on uninstalling local
modules. Thanks to Streph Treadway <sbt@ginkwunk.net>. (Closes: #229178)
* Make update-perl-sax-parsers bail out with an informative error message
if there's a locally installed XML::SAX module breaking the installation.
(See #229178)
* Repackage the upstream tarball to remove the non-free
testfiles/xmltest.xml file. (Closes: #452872)
* Add the Homepage, Vcs-Svn and Vcs-Browser fields to debian/control.
* Upload to experimental for now because of the scope of the changes.
Test reports welcome, including 'it works for me'.
.
[ Damyan Ivanov ]
* Move $(QUILT_STAMPFN) dependency from build to build-stamp
* Add XS-DM-Upload-Allowed: yes to debian/control so Niko Tyni can exercise
his DM powers :)
Files:
e665cc15f5fee449c41178823e60b4dc 980 perl optional libxml-sax-perl_0.16+dfsg-1.dsc
73f92a1cc31752abab5af88d804ff584 51176 perl optional libxml-sax-perl_0.16+dfsg.orig.tar.gz
8fdb62033acdde0c1b609d1346457337 13335 perl optional libxml-sax-perl_0.16+dfsg-1.diff.gz
ea4f2f2346bc8310bf152be8c0072f00 83468 perl optional libxml-sax-perl_0.16+dfsg-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHVDlPHqjlqpcl9jsRAuTOAKCJLikWkVgM76dKK0YSufKMYqBTwgCfZZba
5UUfXTi0CAmMlvjV1+wNyqw=
=wI45
-----END PGP SIGNATURE-----
Information forwarded to debian-bugs-dist@lists.debian.org, Jay Bonci <jaybonci@debian.org>:
Bug#430118; Package libxml-sax-perl.
(full text, mbox, link).
Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Jay Bonci <jaybonci@debian.org>.
(full text, mbox, link).
Message #56 received at 430118@bugs.debian.org (full text, mbox, reply):
Hi Daniel (and others interested in #430118),
as you may have noticed, there's a new version of libxml-sax-perl
in experimental with support for SAX parser priorities, so that
XML::SAX::PurePerl only gets used as a last resort. I'd like one or two
reports of 'it works for me' before uploading it to unstable.
I'm mostly concerned about the maintainer scripts on upgrades;
the preinst and postinst scripts try their best not to provoke any
unnecessary ucf prompts and the like while honoring local changes to
/etc/perl/XML/SAX/ParserDetails.ini. In absence of any manual changes,
the upgrade should move XML::SAX::PurePerl first (ie, lowest priority)
in the file.
Could you please try to install 0.16+dfsg-1 and see if it does the right
thing for you?
Cheers,
--
Niko Tyni ntyni@debian.org
Message sent on to Daniel Schepler <schepler@math.unipd.it>:
Bug#430118.
(full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 23 Mar 2008 07:27:31 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Aug 10 16:21:10 2024;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.