bioperl / bioperl-live

Core BioPerl 1.x code
http://bioperl.org
296 stars 182 forks source link

Failing t/SeqIO/bsml_sax.t due to 404 for DTD URL #376

Closed zmughal closed 1 year ago

zmughal commented 1 year ago

The test failure shows up as

http error : Unknown IO error
# Looks like your test exited with 255 just after 1.
t/SeqIO/bsml_sax.t .................. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 14/15 subtests 

This only occurs when older versions of XML::LibXML are installed which is currently the case in Debian (discovered via https://github.com/bioperl/bioperl-live/pull/374#issuecomment-1515090544). Per the changelog at Debian, an older version of XML::LibXML is being used due to security issues with loading an external DTD https://metadata.ftp-master.debian.org/changelogs//main/libx/libxml-libxml-perl/libxml-libxml-perl_2.0207+dfsg+really+2.0134-1_changelog.

There are several workarounds:

   t/data/U83300.bsml:<!DOCTYPE Bsml PUBLIC "-//EBI//Labbook, Inc. BSML DTD//EN" "http://www.ebi.ac.uk/xembl/dtd/BSML2_2.DTD">

from http://www.ebi.ac.uk/xembl/dtd/BSML2_2.DTD to one linked from http://xml.coverpages.org/bsml.html.

$XML::SAX::ParserPackage = "XML::SAX::PurePerl";

Future fix could be to make sure that any XML::SAX parser has a feature to turn off loading the external DTD or supply the DTD locally.

Connects with https://github.com/shlomif/perl-XML-LibXML/issues/71.

zmughal commented 1 year ago

Some more info: