Compare commits

...
Sign in to create a new pull request.

38 commits

Author SHA1 Message Date
Yaakov Selkowitz
f64183f18a Fix tests in ELN
minitest-mock was split out of minitest 6 (F44+).  While only needed for a
few tests, the module is imported at the test helper level.
2026-01-14 11:35:24 -05:00
Mamoru TASAKA
f276b8890f Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 2026-01-08 10:50:05 +09:00
Mamoru TASAKA
52f0942f45 1.19.0 2025-12-30 10:24:29 +09:00
Mamoru TASAKA
3c9b3b041f Handle minitest 6 compatibility 2025-12-24 14:06:09 +09:00
Mamoru TASAKA
0af2370f2f 1.18.10 2025-09-15 16:41:29 +09:00
Fedora Release Engineering
1aa1d6422a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 12:38:16 +00:00
Mamoru TASAKA
7f3c8a2fe9 1.18.9 2025-07-21 17:43:50 +09:00
Mamoru TASAKA
31378a8aa8 1.18.8 2025-04-23 15:17:28 +09:00
Mamoru TASAKA
863c1b5775 1.18.7 2025-04-07 16:14:38 +09:00
Mamoru TASAKA
c517880ca1 1.18.6 2025-03-29 14:29:20 +09:00
Mamoru TASAKA
ca10768dbd Suppress warnings from Nokogiri::VERSION_INFO (bug 2354787) 2025-03-26 16:00:41 +09:00
Mamoru TASAKA
dd0fd3c652 1.18.5 2025-03-20 12:13:02 +09:00
Mamoru TASAKA
e17abae0b1 1.18.4 2025-03-16 13:53:21 +09:00
Mamoru TASAKA
434ddac259 1.18.3 2025-02-19 14:57:51 +09:00
Mamoru TASAKA
98347adc8c 1.18.2 2025-01-21 09:03:11 +09:00
Fedora Release Engineering
e06b31a6f9 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 23:42:50 +00:00
Mamoru TASAKA
37ea4b420c Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 2025-01-08 08:09:29 +09:00
Mamoru TASAKA
e12aade9bb 1.18.1 2024-12-30 16:53:37 +09:00
Mamoru TASAKA
a6711e5dec 1.18.0 2024-12-28 23:02:11 +09:00
Mamoru TASAKA
941cbb1036 1.17.2 2024-12-13 11:33:53 +09:00
Mamoru TASAKA
d0b3530cf5 1.17.1 2024-12-11 17:42:48 +09:00
Mamoru TASAKA
ef798a222d 1.17.0 2024-12-09 23:13:40 +09:00
Mamoru TASAKA
e4564a6c58 1.16.8 2024-12-05 20:00:24 +09:00
Mamoru TASAKA
5bad2aee53 1.16.7 2024-07-31 16:20:34 +09:00
Fedora Release Engineering
dc2d2dd961 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 19:41:11 +00:00
Mamoru TASAKA
407114357b 1.16.6 2024-06-16 16:05:35 +09:00
Mamoru TASAKA
3ce271725f 1.16.5 2024-05-14 17:09:15 +09:00
Mamoru TASAKA
4cfee13a98 cosmetic style change 2024-04-29 23:20:58 +09:00
Jarek Prokop
f8321206b1 Delete the bundled libraries that are replaced with system libraries. 2024-04-26 14:29:12 +02:00
Jarek Prokop
d32eeeb9c1 Fix the directory of patches for libraries nokogiri bundles. 2024-04-26 14:28:40 +02:00
Mamoru TASAKA
1f79b238fa Make rubygem-minizip testsuite dependency optional, drop on RHEL
(Patch by Jun Aruga <jaruga@redhat.com>)
2024-04-25 15:06:32 +09:00
Mamoru TASAKA
4189454b54 1.16.4 2024-04-11 16:31:17 +09:00
Mamoru TASAKA
bec33a2666 1.16.3 2024-03-17 19:39:50 +09:00
Mamoru TASAKA
517a475ee6 1.16.2 2024-02-05 09:10:01 +09:00
Mamoru TASAKA
58311a1e0b 1.16.1 2024-02-04 15:50:01 +09:00
Fedora Release Engineering
b0d89532e1 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 17:13:06 +00:00
Mamoru TASAKA
994a85659b Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-03 19:57:47 +09:00
Mamoru TASAKA
dd5ce8edc9 1.16.0 2023-12-29 15:33:20 +09:00
7 changed files with 157 additions and 99 deletions

View file

@ -1,5 +1,17 @@
#!/bin/bash
git_restore_timestamp()
{
set +x
echo "Restore timestamps"
git ls-tree -r --name-only HEAD | while read f
do
unixtime=$(git log -n 1 --pretty='%ct' -- $f)
touch -d "@${unixtime}" $f
done
set -x
}
if [ $# -lt 2 ]
then
echo "$0 <name> <version>"
@ -17,10 +29,14 @@ pushd $TMPDIRPATH
git clone https://github.com/sparklemotion/$1.git
pushd $1
git reset --hard v$2
git_restore_timestamp
popd
ln -sf $1 $1-$2
tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./
tar czf \
${CURRDIR}/rubygem-$1-$2-full.tar.gz \
"--exclude=nokogiri-$2/./.git" \
$1-$2/./
popd

View file

@ -1,42 +0,0 @@
From 374f3281a67ab3a3e52ebe6deacc0548b3f1b96a Mon Sep 17 00:00:00 2001
From: Mike Dalessio <mike.dalessio@gmail.com>
Date: Mon, 4 Sep 2023 12:58:45 -0400
Subject: [PATCH] test: update to handle upstream libxml2 error changes
The behavior changed in libxml2 commit 53050b1d
---
test/xml/test_reader.rb | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/test/xml/test_reader.rb b/test/xml/test_reader.rb
index 4b5b5c5728..e5f01d32ec 100644
--- a/test/xml/test_reader.rb
+++ b/test/xml/test_reader.rb
@@ -765,7 +765,12 @@ def test_broken_markup_attribute_hash
e = assert_raises(Nokogiri::XML::SyntaxError) do
reader.attribute_hash
end
- assert_includes(e.message, "FATAL: Extra content at the end of the document")
+ expected = if Nokogiri.uses_libxml?(">= 2.12.0") # upstream commit 53050b1d
+ "FATAL: Premature end of data in tag foo line 1"
+ else
+ "FATAL: Extra content at the end of the document"
+ end
+ assert_includes(e.message, expected)
end
assert_equal(1, reader.errors.length)
@@ -796,7 +801,12 @@ def test_broken_markup_namespaces
e = assert_raises(Nokogiri::XML::SyntaxError) do
reader.namespaces
end
- assert_includes(e.message, "FATAL: Extra content at the end of the document")
+ expected = if Nokogiri.uses_libxml?(">= 2.12.0") # upstream commit 53050b1d
+ "FATAL: Premature end of data in tag foo line 1"
+ else
+ "FATAL: Extra content at the end of the document"
+ end
+ assert_includes(e.message, expected)
end
assert_equal(1, reader.errors.length)

View file

@ -1,37 +0,0 @@
From 5e60c08c6ec75ec8767f3edbfcba0d8e39d06495 Mon Sep 17 00:00:00 2001
From: Mike Dalessio <mike.dalessio@gmail.com>
Date: Tue, 24 Oct 2023 08:54:19 -0400
Subject: [PATCH] fix: work around change in upstream libxml2 recovery
See:
- https://gitlab.gnome.org/GNOME/libxml2/-/issues/598
- https://gitlab.gnome.org/GNOME/libxml2/-/commit/c082ef4644ce1f0af2a7c01e27c4a75f4d7d4feb
---
test/xml/sax/test_push_parser.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/xml/sax/test_push_parser.rb b/test/xml/sax/test_push_parser.rb
index 5c9ddd3840..aa7ce84e8e 100644
--- a/test/xml/sax/test_push_parser.rb
+++ b/test/xml/sax/test_push_parser.rb
@@ -182,12 +182,18 @@ def error(msg)
it :test_broken_encoding do
skip_unless_libxml2("ultra hard to fix for pure Java version")
+
parser.options |= Nokogiri::XML::ParseOptions::RECOVER
# This is ISO_8859-1:
parser << "<?xml version='1.0' encoding='UTF-8'?><r>Gau\337</r>"
parser.finish
+
assert(parser.document.errors.size >= 1)
- assert_equal "Gau\337", parser.document.data.join
+
+ # the interpretation of the byte may vary by libxml2 version in recovery mode
+ # see for example https://gitlab.gnome.org/GNOME/libxml2/-/issues/598
+ assert(parser.document.data.join.start_with?("Gau"))
+
assert_equal [["r"]], parser.document.end_elements
end

View file

@ -1,10 +1,13 @@
--- nokogiri-1.11.0.rc4/lib/nokogiri/version/info.rb.warn 2020-12-31 16:56:11.533949657 +0900
+++ nokogiri-1.11.0.rc4/lib/nokogiri/version/info.rb 2020-12-31 16:59:38.576697147 +0900
@@ -58,6 +58,7 @@ module Nokogiri
--- nokogiri-1.18.5/lib/nokogiri/version/info.rb.warn 2023-11-29 01:25:54.000000000 +0900
+++ nokogiri-1.18.5/lib/nokogiri/version/info.rb 2025-03-26 15:51:51.468291434 +0900
@@ -70,6 +70,10 @@ module Nokogiri
end
def warnings
+ []
+ end
+
+ def warnings_original
warnings = []
+ return warnings
if libxml2?
if compiled_libxml_version != loaded_libxml_version

View file

@ -0,0 +1,11 @@
diff -urp '--exclude=*~' nokogiri-1.18.10.orig/test/helper.rb nokogiri-1.18.10/test/helper.rb
--- nokogiri-1.18.10.orig/test/helper.rb 2025-12-24 12:29:06.569389292 +0900
+++ nokogiri-1.18.10/test/helper.rb 2025-12-24 12:39:48.443826371 +0900
@@ -41,6 +41,7 @@ warn
require "minitest/autorun"
require "minitest/benchmark"
+require "minitest/mock"
if !Nokogiri.jruby? && ENV["NCPU"].to_i > 1
require "minitest/parallel_fork"

View file

@ -1,7 +1,7 @@
%global mainver 1.15.5
%global mainver 1.19.0
#%%global prever .rc4
%global baserelease 1
%global baserelease 2
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
%global gem_name nokogiri
@ -29,16 +29,17 @@ Source1: rubygem-%{gem_name}-%{version}%{?prever}-full.tar.gz
Source2: nokogiri-create-full-tarball.sh
# Shut down libxml2 version unmatching warning
Patch0: %{name}-1.11.0.rc4-shutdown-libxml2-warning.patch
# https://github.com/sparklemotion/nokogiri/pull/2973
Patch1: nokogiri-pr2973-libxml2-2_12_0-error-msg-change.patch
# https://github.com/sparklemotion/nokogiri/pull/3013
Patch2: nokogiri-pr3013-libxml2-2_12_0-recovery-char-change.patch
BuildRequires: ruby(release)
BuildRequires: ruby(rubygems)
##
## For %%check
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(minitest-mock)
%if !0%{?rhel}
# For test/xml/test_document_encoding.rb
# Drop rubygem(rubyzip) build dependency in RHEL
BuildRequires: rubygem(rubyzip)
%endif
BuildRequires: rubygems-devel
Obsoletes: ruby-%{gem_name} <= 1.5.2-2
#BuildRequires: ruby(racc)
@ -52,7 +53,6 @@ BuildRequires: libxslt-devel
BuildRequires: ruby-devel
# ruby27 needs this explicitly
BuildRequires: rubygem(racc)
Requires: rubygem(racc)
%description
Nokogiri parses and searches XML/HTML very quickly, and also has
@ -85,14 +85,18 @@ mv ../%{gem_name}-%{version}.gemspec .
# patches
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
# remove bundled external libraries
sed -i \
-e 's|, "ports/archives/[^"][^"]*"||g' \
-e 's|, "ports/patches/[^"][^"]*"||g' \
-e 's|, "patches/[^"][^"]*"||g' \
%{gem_name}-%{version}.gemspec
# Make sure gem build will complain later if the previous regex is not enough.
rm -rf \
ports \
patches \
%{nil}
# Actually not needed when using system libraries
sed -i -e '\@mini_portile@d' %{gem_name}-%{version}.gemspec
@ -101,7 +105,7 @@ sed -i -e '\@mini_portile@d' %{gem_name}-%{version}.gemspec
sed -i \
ext/nokogiri/extconf.rb \
-e "s@^\(def process_recipe.*\)\$@\1 ; return true@" \
-e "s@^\(append_cppflags\).*gumbo.*\$@\1(\"-I$(pwd)/gumbo-parser/src\")@" \
-e "s@^\([ \t]*append_cppflags\).*gumbo.*\$@\1(\"-I$(pwd)/gumbo-parser/src\")@" \
-e "\@libs.*gumbo@s@File\.join.*@\"$(pwd)/gumbo-parser/src/libgumbo.a\"@" \
-e "\@LIBPATH.*gumbo@s|^\(.*\)\$|# \1|" \
%{nil}
@ -211,7 +215,7 @@ pushd ./%{gem_instdir}
# Remove unneeded simplecov coverage test
sed -i test/helper.rb \
-e '\@require.*simplecov@,\@^end$@s|^|#|'
-e '\@^ require.*simplecov@,\@^ end$@s|^|#|'
# Remove minitest-reporters. It does not provide any additional value while
# it blows up the dependency chain.
@ -272,6 +276,109 @@ popd
%doc %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}/
%changelog
* Thu Jan 08 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.19.0-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0
* Tue Dec 30 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.19.0-1
- 1.19.0
* Wed Dec 24 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.10-2
- Handle minitest 6 compatibility
* Mon Sep 15 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.10-1
- 1.18.10
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jul 21 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.9-1
- 1.18.9
* Wed Apr 23 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.8-1
- 1.18.8
* Mon Apr 07 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.7-1
- 1.18.7
* Sat Mar 29 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.6-1
- 1.18.6
* Wed Mar 26 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.5-2
- Suppress warnings from Nokogiri::VERSION_INFO (bug 2354787)
* Thu Mar 20 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.5-1
- 1.18.5
* Sun Mar 16 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.4-1
- 1.18.4
* Wed Feb 19 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.3-1
- 1.18.3
* Mon Jan 20 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.2-1
- 1.18.2
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Jan 07 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.1-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4
* Mon Dec 30 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.1-1
- 1.18.1
* Sat Dec 28 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.18.0-1
- 1.18.0
* Fri Dec 13 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.17.2-1
- 1.17.2
* Wed Dec 11 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.17.1-1
- 1.17.1
* Mon Dec 09 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.17.0-1
- 1.17.0
* Thu Dec 05 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.8-1
- 1.16.8
* Wed Jul 31 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.7-1
- 1.16.7
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jun 16 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.6-1
- 1.16.6
* Tue May 14 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.5-1
- 1.16.5
* Thu Apr 25 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.4-2
- Make rubygem-minizip testsuite dependency optional, drop on RHEL
(Patch by Jun Aruga <jaruga@redhat.com>)
* Thu Apr 11 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.4-1
- 1.16.4
* Sun Mar 17 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.3-1
- 1.16.3
* Mon Feb 05 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.2-1
- 1.16.2
* Sun Feb 04 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.1-1
- 1.16.1
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.0-2
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Fri Dec 29 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.16.0-1
- 1.16.0
* Sat Nov 18 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.5-1
- 1.15.5
- Backport upstream patch for libxml2 2.12.0 error handling change

View file

@ -1,2 +1,2 @@
SHA512 (nokogiri-1.15.5.gem) = 3f6c2febbdef2cc7e34b5555479b614165a4b3aaa8b46340812e2a736b3efd12c0d0e79c64ad2313a3d99326fd802eaab74eeda08c4ccd9a949974df69e0fe0f
SHA512 (rubygem-nokogiri-1.15.5-full.tar.gz) = 606b8fcc3483d4d834dc4cd9df73e56dbba6ad2c5c26223072f38f5e59b6746d913b73d9e3a6ffd4c5e52d5311c4efb0a78d3adae4545d6efdf826e4ab6a6985
SHA512 (rubygem-nokogiri-1.19.0-full.tar.gz) = 29dd894b176857d55eb5e670f50e69762e74c0a13e6949030af17e3c84b65f9dfe0087210b84a7c77749d3d1a4a33292d62f7005003745e8f087d822ee64f4b1
SHA512 (nokogiri-1.19.0.gem) = d9326a2e60b6ea3152c5f9d53df738610f18ca57cffcd3bf2f8b07a2b08b30085d0fce2ca8206279ad6a0f1a613e9e76821c09aef45cf5e5b2d00ff766734872