From dec042681c5b6e34f6c50de8c8b407a3bff86aad Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 13 Dec 2025 22:16:57 +0800 Subject: [PATCH] Fix test suite with libxml2 2.15.0 --- ...> Fix-test-suite-with-libxml2-2.15.0.patch | 53 ++++++++++++++++++- perl-XML-LibXML.spec | 7 ++- 2 files changed, 56 insertions(+), 4 deletions(-) rename Fix-test-suite-with-libxml2-2.13.0.patch => Fix-test-suite-with-libxml2-2.15.0.patch (83%) diff --git a/Fix-test-suite-with-libxml2-2.13.0.patch b/Fix-test-suite-with-libxml2-2.15.0.patch similarity index 83% rename from Fix-test-suite-with-libxml2-2.13.0.patch rename to Fix-test-suite-with-libxml2-2.15.0.patch index 74d928e..5433d3a 100644 --- a/Fix-test-suite-with-libxml2-2.13.0.patch +++ b/Fix-test-suite-with-libxml2-2.15.0.patch @@ -1,7 +1,7 @@ From bee8338fd1cbd7aad4bf60c2965833343b6ead6f Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 21 May 2024 15:17:30 +0200 -Subject: [PATCH 1/2] Fix test suite with libxml2 2.13.0 +Subject: [PATCH 1/3] Fix test suite with libxml2 2.13.0 --- t/02parse.t | 7 ++++++- @@ -147,7 +147,7 @@ index e48215c4..55ac0b2e 100644 From c9f9c2fe51173b0a00969f01b577399f1098aa47 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Thu, 13 Feb 2025 19:50:35 +0100 -Subject: [PATCH 2/2] Fix test suite with libxml2 2.14.0 +Subject: [PATCH 2/3] Fix test suite with libxml2 2.14.0 --- t/16docnodes.t | 7 ++++++- @@ -191,3 +191,52 @@ index 70d26607..3861edf8 100644 my $buf = ''; open my $fh, '>', \$buf; # redirect STDERR there + +From ecbebc2f33fecb66b3d5487c6e48bea353e374f9 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer +Date: Fri, 16 May 2025 19:11:12 +0200 +Subject: [PATCH 3/3] Remove tests that disable line numbers + +Line numbers are always enabled since libxml2 2.15.0. +--- + t/02parse.t | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/t/02parse.t b/t/02parse.t +index 40aa5f13..17419f8f 100644 +--- a/t/02parse.t ++++ b/t/02parse.t +@@ -14,7 +14,7 @@ use locale; + + POSIX::setlocale(LC_ALL, "C"); + +-use Test::More tests => 533; ++use Test::More tests => 531; + use IO::File; + + use XML::LibXML::Common qw(:libxml); +@@ -25,7 +25,7 @@ use constant XML_DECL => "\n"; + + use Errno qw(ENOENT); + +-# TEST*533 ++# TEST*531 + + ## + # test values +@@ -773,15 +773,6 @@ EOXML + + my $newkid = $root->appendChild( $doc->createElement( "bar" ) ); + is( $newkid->line_number(), 0, "line number is 0"); +- +- $parser->line_numbers(0); +- eval { $doc = $parser->parse_string( $goodxml ); }; +- +- $root = $doc->documentElement(); +- is( $root->line_number(), 0, "line number is 0"); +- +- @kids = $root->childNodes(); +- is( $kids[1]->line_number(), 0, "line number is 0"); + } + + SKIP: { diff --git a/perl-XML-LibXML.spec b/perl-XML-LibXML.spec index 402dbfd..141b261 100644 --- a/perl-XML-LibXML.spec +++ b/perl-XML-LibXML.spec @@ -1,13 +1,13 @@ Name: perl-XML-LibXML Version: 2.0210 -Release: 4 +Release: 5 Epoch: 1 Summary: Perl Binding for libxml2 License: (GPL-1.0-or-later OR Artistic-1.0-Perl) and MIT URL: https://metacpan.org/release/XML-LibXML Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-%{version}.tar.gz # https://github.com/shlomif/perl-XML-LibXML/pull/87 -Patch0: Fix-test-suite-with-libxml2-2.13.0.patch +Patch0: Fix-test-suite-with-libxml2-2.15.0.patch BuildRequires: coreutils, findutils, glibc-common, libxml2-devel BuildRequires: perl-interpreter, perl-devel, perl-generators, sed @@ -78,6 +78,9 @@ fi %{_mandir}/man*/* %changelog +* Sat Dec 13 2025 Funda Wang - 1:2.0210-5 +- Fix test suite with libxml2 2.15.0 + * Thu Jul 24 2025 Funda Wang - 1:2.0210-4 - use perl-generators to scan META.json for requirements -- Gitee