Bug 496976

Summary: perl-XML-Simple can't be recompiled because of broken Unicode support
Product: Red Hat Enterprise Linux 5 Reporter: Levente Farkas <lfarkas>
Component: perl-XML-SAXAssignee: perl-maint-list
Status: CLOSED NEXTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: perl-maint-list, ppisar, psabata, robin.norwood, rvokal, xavier
Target Milestone: rcKeywords: Rebase, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=475250
Whiteboard:
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Version 0.96 brings important fixes restoring processing of UTF-8 encoded XML documents, XML processing instructions, Document Type Definition entities, numeric character entities, improving large XML strings parsing performance, and removing spurious warnings.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 04:20:34 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Levente Farkas 2009-04-21 17:24:13 EDT
the latest version can't be recompile since some of the test's:
make test
failed in the %check section. it'd be useful to fix or at least don't run test in sepc file to be able to rebuild the src.rpm.
Comment 1 Marcela Mašláňová 2009-04-22 03:05:19 EDT
We do not support rebuild of source rpm. In case there would be erratum with different bugs for this package, then it will be solved, because now it can't be rebuild also on my machine.
Comment 2 Levente Farkas 2009-04-22 05:26:19 EDT
so redhat provide src.rpm which are not valid and you think it's not a bug???
how can i made a erratum?
Comment 3 Marcela Mašláňová 2009-04-22 07:03:06 EDT
You are right, this can not be closed.
Comment 5 Petr Pisar 2010-10-05 04:54:07 EDT
We talk about perl-XML-Simple-2.14-4.fc6 not passing tests in RHEL-5 because of:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/0_Config........# 
# Package                        Version
#  perl                           5.8.8
#  XML::Simple                    2.14
#  Storable                       2.15
#  XML::Parser                    2.34
#  XML::SAX                       0.14
#  XML::NamespaceSupport          1.09
#  XML::LibXML::SAX::Parser       1.50
#  XML::LibXML::SAX               1.00
#  XML::SAX::PurePerl             0.90 (default parser)
ok
t/1_XMLin.........Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
[...]
#   Failed test 'no warning issued (as expected)'
#   in t/1_XMLin.t at line 380.
#          got: 'Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
# '
#     expected: ''

et cetera.

The warning originates in perl-XML-SAX-0.14-8.
Comment 6 Petr Pisar 2010-10-05 05:17:31 EDT
This is caused by perl-XML-SAX definitely. Tests against XML::SAX 0.96 pass:

$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# Package                        Version
#  perl                           5.8.8
#  XML::Simple                    2.14
#  Storable                       2.15
#  XML::Parser                    Not Installed
#  XML::SAX                       0.96
#  XML::NamespaceSupport          1.09
t/0_Config........ok
t/1_XMLin.........ok
t/2_XMLout........ok
        1/196 skipped: Tie::IxHash not installed
t/3_Storable......ok
t/4_MemShare......ok
t/5_MemCopy.......ok
t/6_ObjIntf.......ok
t/7_SaxStuff......ok
t/8_Namespaces....ok
t/9_Strict........ok
t/A_XMLParser.....skipped
        all skipped: no XML::Parser
All tests successful, 1 test and 1 subtest skipped.
Files=11, Tests=454, 14 wallclock secs ( 2.87 cusr +  0.32 csys =  3.19 CPU)
Comment 7 Petr Pisar 2010-10-05 05:51:22 EDT
XML::SAX 0.16 passes too:

$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# Package                        Version
#  perl                           5.8.8
#  XML::Simple                    2.14
#  Storable                       2.15
#  XML::Parser                    Not Installed
#  XML::SAX                       0.16
#  XML::NamespaceSupport          1.09
t/0_Config........ok
t/1_XMLin.........ok
t/2_XMLout........ok
        1/196 skipped: Tie::IxHash not installed
t/3_Storable......ok
t/4_MemShare......ok
t/5_MemCopy.......ok
t/6_ObjIntf.......ok
t/7_SaxStuff......ok
t/8_Namespaces....ok
t/9_Strict........ok
t/A_XMLParser.....skipped
        all skipped: no XML::Parser
All tests successful, 1 test and 1 subtest skipped.
Files=11, Tests=454, 15 wallclock secs ( 2.91 cusr +  0.29 csys =  3.20 CPU)


However the encoding bug (http://rt.cpan.org/Public/Bug/Display.html?id=26588) has been fixed in 0.96 completely (it has been introduced in version 0.12):

Revision history for Perl extension XML::SAX.

0.96  06 Aug 2008  Grant McLean
    - Fix breakage of Unicode regexes on 5.6 (introduced in 0.95 release)

0.95  05 Aug 2008  Grant McLean
    - XML::SAX::PurePerl fixes:
      - RT#37147: Fix handling of numeric character entities in attribute 
                  values (report from Jools Smyth)
      - RT#19442: Fix for numeric character entities spanning end of buffer
                  (report from Eivind Eklund)
      - RT#29316: Performance fix for parsing from large strings (patch from
                  Gordon Lack)
      - RT#26588: Fix for UTF8 bytes in first 4096 bytes of document not being
                  decoded to Perl-UTF8-characters (patch from Niko Tyni of the
                  Debian project)
      - RT#37545: incorrect operator precedence breaks single quotes around
                  DTD entity declarations (report from Kevin Ryde)
    - RT#28477: Fix test in ParserFactory.pm for parser module loaded (report
                from Douglas Wilson)
    - RT#28564: Fix XML::SAX::PurePerl versioning (report from Chapman Flack)

0.16  27 Jun 2007  Grant McLean
    - Applied patch for PI handling from RT#19173

0.15  08 Feb 2007  Grant McLean
    - Fixed handling of entities in attribute values
    - Cleaned up some benign warnings

0.14  23 Apr 2006  Matt Sergeant
    - Fixed CDATA section parsing (Uwe Voelker)
    - Fix Makefile.PL for VMS
    - Support calling set_handler() mid-parse
    - Fix for when random modules overload UNIVERSAL::AUTOLOAD()
    - Fix case when ParserDetails.ini isn't being updated but we are doing an
      upgrade.

0.13  24 Oct 2005  Matt Sergeant
    - Complete re-write of XML::SAX::PurePerl for performance
    - Support Encoding & XMLVersion in DocumentLocator interface
    - A few conformance tweaks to match perl SAX 2.1.


As all upstream releases since version 0.14 are bug fixes, I would like to propose rebase to 0.96 version. (The 0.96 version is in Fedora since release 11 <https://koji.fedoraproject.org/koji/packageinfo?packageID=1146>.)

One needs to verify bug #475250 remains fixed.
Comment 8 Petr Pisar 2010-10-05 06:07:48 EDT
The test case from bug #475250 passes with XML::SAX 0.96:

Updated:
  perl-XML-SAX.noarch 0:0.96-1                                                  

Complete!
[root@rhel-5_6 tmp]# ./test-XML-SAX-0.13.pl test-XML-SAX-0.13.xml /dev/stdout 
都市
[root@rhel-5_6 tmp]# ./test-XML-SAX-0.13.pl test-XML-SAX-0.13.xml /dev/stdout |hexdump -C
00000000  e9 83 bd e5 b8 82 0a                              |.......|
00000007
Comment 10 Levente Farkas 2010-10-05 06:43:07 EDT
has anybody try it? imho it'd be the easiest to find the problem:-)
building perl-XML-Simple-2.14-4.fc6.src.rpm gives me the bug bellow.
so i don't care about whether it perl-XML-SAX or perl-XML-Simple bug, but perl-XML-Simple CAN NOT BE BUILD!
---------------------------------------------------
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.56979
+ umask 022
+ cd /builddir/build/BUILD
+ cd XML-Simple-2.14
+ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/0_Config........#
# Package                        Version
#  perl                           5.8.8
#  XML::Simple                    2.14
#  Storable                       2.15
#  XML::Parser                    2.34
#  XML::SAX                       0.14
#  XML::NamespaceSupport          1.09
#  XML::LibXML::SAX::Parser       1.50
#  XML::LibXML::SAX               1.00
#  XML::SAX::PurePerl             0.90 (default parser)
ok
t/1_XMLin.........Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
#   Failed test 'no warning issued (as expected)'
#   in t/1_XMLin.t at line 380.
#          got: 'Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
# '
#     expected: ''
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96, <STDIN> line 1.
#   Failed test 'successfully read an SRT config file'
#   in t/1_XMLin.t at line 1443.
#     Structures begin differing at:
#          $got->{pubpath}{test1}{title} = 'web_source -> web_target1'
#     $expected->{pubpath}{test1}{title} = 'web_source -&gt; web_target1'
# Looks like you failed 2 tests of 122.
dubious
        Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 32, 122
        Failed 2/122 tests, 98.36% okay
t/2_XMLout........
#   Failed test 'generated document with escaping'
#   in t/2_XMLout.t at line 302.
#     Structures begin differing at:
#          $got->{c} = '&amp;C&amp;'
#     $expected->{c} = '&C&'
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
# Looks like you failed 1 test of 196.
dubious
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 47
        Failed 1/196 tests, 99.49% okay (less 1 skipped test: 194 okay, 98.98%)
t/3_Storable......ok
t/4_MemShare......ok
t/5_MemCopy.......ok
t/6_ObjIntf.......ok
t/7_SaxStuff......ok
t/8_Namespaces....ok
t/9_Strict........Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Unable to recognise encoding of this document at /usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
ok
t/A_XMLParser.....ok
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/1_XMLin.t     2   512   122    2   1.64%  32 122
t/2_XMLout.t    1   256   196    1   0.51%  47
1 subtest skipped.
Failed 2/11 test scripts, 81.82% okay. 3/468 subtests failed, 99.36% okay.
make: *** [test_dynamic] Error 255
error: Bad exit status from /var/tmp/rpm-tmp.56979 (%check)
---------------------------------------------------
Comment 11 Petr Pisar 2010-10-05 07:10:29 EDT
(In reply to comment #10)
> has anybody try it?
As you could read, I have.

> imho it'd be the easiest to find the problem:-)
And I've find the problem.

> building perl-XML-Simple-2.14-4.fc6.src.rpm gives me the bug bellow.
> so i don't care about whether it perl-XML-SAX or perl-XML-Simple bug, but
> perl-XML-Simple CAN NOT BE BUILD!
And that's exactly what the bug subject says. And because the bug is caused by perl-XML-SAX package, it has been moved to proper component.

As you can see in the bug Status field, this problem is in process of fixing. Please keep waiting for next Red Hat Enterprise Linux releases. If you do not understand this report, read Bugzilla Guide <https://bugzilla.redhat.com/docs/en/html/index.html>, or contact Red Hat Global Support Service to get more help.
Comment 12 Petr Pisar 2010-10-05 07:18:24 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Version 0.96 brings important fixes restoring processing of UTF-8 encoded XML documents, XML processing instructions, Document Type Definition entities, numeric character entities, improving large XML strings parsing performance, and removing spurious warnings.
Comment 15 RHEL Product and Program Management 2011-09-22 20:09:34 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 16 RHEL Product and Program Management 2012-06-11 21:02:07 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 17 Marcela Mašláňová 2013-03-06 04:20:34 EST
I am sorry, but it is too late in the RHEL-5 release cycle.  At the moment we are addressing only critical and security related issues in RHEL-5.  This one is not reproducible in RHEL-6.  I am closing the bug as NEXTRELEASE.