diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index ecfe69102ae48ee020c05b1a87deaa399aa90c5a..8e13d600ac2592f1112cab9d612e80ccc5604400 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -5,7 +5,7 @@ Summary: An HTML, XML, SAX, and Reader parser Name: rubygem-%{gem_name} Version: %{mainver} -Release: 1 +Release: 2 License: MIT and Apache-2.0 URL: https://nokogiri.org Source0: https://rubygems.org/gems/%{gem_name}-%{mainver}%{?prever}.gem @@ -14,6 +14,9 @@ Source2: nokogiri-create-full-tarball.sh # https://github.com/sparklemotion/nokogiri/pull/3177 # Make rubygem-minizip dependency optional Patch0: %{name}-pr3177-rubyzip-dep-optional.patch +# https://github.com/sparklemotion/nokogiri/pull/3406 +# build(deps-dev): update rubyzip requirement from ~> 2.3.2 to ~> 2.4.1 +Patch1: test-drop-unnecessary-assertion-on-rubyzip-read-encoding.patch BuildRequires: ruby(release) ruby(rubygems) rubygem(minitest) rubygems-devel rubygem(rubyzip) BuildRequires: rubygem(did_you_mean) @@ -46,6 +49,7 @@ This package provides non-Gem support for %{gem_name}. cp -a %{gem_name}-%{version}/{.,*} . mv ../%{gem_name}-%{version}.gemspec . %patch -P0 -p1 +%patch -P1 -p1 sed -i \ -e 's|, "ports/archives/[^"][^"]*"||g' \ -e 's|, "patches/[^"][^"]*"||g' \ @@ -162,6 +166,9 @@ popd %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}/ %changelog +* Thu Nov 13 2025 yaoxin <1024769339@qq.com> - 1.16.7-2 +- Drop unnecessary assertion on rubyzip read encoding + * Mon Aug 05 2024 jiangxinyu - 1.16.7-1 - Update package to version 1.16.7 diff --git a/test-drop-unnecessary-assertion-on-rubyzip-read-encoding.patch b/test-drop-unnecessary-assertion-on-rubyzip-read-encoding.patch new file mode 100644 index 0000000000000000000000000000000000000000..2c34d20860ad20f0d75cbb6784e76f11af71221d --- /dev/null +++ b/test-drop-unnecessary-assertion-on-rubyzip-read-encoding.patch @@ -0,0 +1,28 @@ +From af5b1b0590e2f365763d1801a4a5106198b47a53 Mon Sep 17 00:00:00 2001 +From: Mike Dalessio +Date: Mon, 6 Jan 2025 11:47:04 -0500 +Subject: [PATCH] test: drop unnecessary assertion on rubyzip read encoding + +--- + test/xml/test_document_encoding.rb | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/test/xml/test_document_encoding.rb b/test/xml/test_document_encoding.rb +index aecad95c5b..0127d1a0a0 100644 +--- a/test/xml/test_document_encoding.rb ++++ b/test/xml/test_document_encoding.rb +@@ -124,9 +124,12 @@ class TestDocumentEncoding < Nokogiri::TestCase + + # no final newline on jruby. descriptive, not prescriptive. + expected_length = Nokogiri.jruby? ? xml.bytesize - 1 : xml.bytesize +- +- assert_equal(Encoding::UTF_8, output.encoding) + assert_equal(expected_length, output.bytesize) ++ ++ # Note: I dropped the assertion on the encoding of the string return from io.read ++ # because this behavior has changed back and forth in rubyzip versions 2.4.1 and ++ # 3.0.0.dev, and it's not relevant to the original bug report which was about an ++ # exception during writing. + end + end + end