Compare commits
No commits in common. "c9s" and "c10s" have entirely different histories.
64
.gitignore
vendored
64
.gitignore
vendored
@ -1,62 +1,2 @@
|
||||
nokogiri-1.4.2.gem
|
||||
nokogiri-1.4.3.1.gem
|
||||
/nokogiri-1.5.0.beta.2.gem
|
||||
/nokogiri-1.5.0.beta.3.gem
|
||||
/nokogiri-1.5.0.beta.4.gem
|
||||
/nokogiri-1.5.0.gem
|
||||
/nokogiri-1.5.2.gem
|
||||
/nokogiri-1.5.5.gem
|
||||
/nokogiri-1.5.6.gem
|
||||
/nokogiri-1.5.9.gem
|
||||
/nokogiri-1.6.0.gem
|
||||
/nokogiri-1.6.1.gem
|
||||
/nokogiri-1.6.2.1.gem
|
||||
/nokogiri-1.6.3.1.gem
|
||||
/nokogiri-1.6.4.1.gem
|
||||
/nokogiri-1.6.5.gem
|
||||
/nokogiri-1.6.6.1.gem
|
||||
/nokogiri-1.6.6.2.gem
|
||||
/nokogiri-1.6.7.rc3.gem
|
||||
/nokogiri-1.6.7.2.gem
|
||||
/nokogiri-1.6.8.gem
|
||||
/nokogiri-1.6.8.1.gem
|
||||
/nokogiri-1.7.0.gem
|
||||
/nokogiri-1.7.0.1.gem
|
||||
/nokogiri-1.7.1.gem
|
||||
/nokogiri-1.7.2.gem
|
||||
/nokogiri-1.8.0.gem
|
||||
/nokogiri-1.8.1.gem
|
||||
/nokogiri-1.8.2.gem
|
||||
/nokogiri-1.8.3.gem
|
||||
/nokogiri-1.8.4.gem
|
||||
/nokogiri-1.8.5.gem
|
||||
/nokogiri-1.9.1.gem
|
||||
/rubygem-nokogiri-1.9.1-full.tar.gz
|
||||
/nokogiri-1.10.0.gem
|
||||
/rubygem-nokogiri-1.10.0-full.tar.gz
|
||||
/nokogiri-1.10.1.gem
|
||||
/rubygem-nokogiri-1.10.1-full.tar.gz
|
||||
/nokogiri-1.10.2.gem
|
||||
/rubygem-nokogiri-1.10.2-full.tar.gz
|
||||
/nokogiri-1.10.3.gem
|
||||
/rubygem-nokogiri-1.10.3-full.tar.gz
|
||||
/nokogiri-1.10.4.gem
|
||||
/rubygem-nokogiri-1.10.4-full.tar.gz
|
||||
/rubygem-nokogiri-1.10.5-full.tar.gz
|
||||
/nokogiri-1.10.5.gem
|
||||
/nokogiri-1.10.7.gem
|
||||
/rubygem-nokogiri-1.10.7-full.tar.gz
|
||||
/nokogiri-1.10.8.gem
|
||||
/rubygem-nokogiri-1.10.8-full.tar.gz
|
||||
/nokogiri-1.10.9.gem
|
||||
/rubygem-nokogiri-1.10.9-full.tar.gz
|
||||
/nokogiri-1.10.10.gem
|
||||
/rubygem-nokogiri-1.10.10-full.tar.gz
|
||||
/nokogiri-1.11.0.rc4.gem
|
||||
/rubygem-nokogiri-1.11.0.rc4-full.tar.gz
|
||||
/rubygem-nokogiri-1.11.0-full.tar.gz
|
||||
/nokogiri-1.11.0.gem
|
||||
/rubygem-nokogiri-1.11.1-full.tar.gz
|
||||
/nokogiri-1.11.1.gem
|
||||
/nokogiri-1.11.2.gem
|
||||
/rubygem-nokogiri-1.11.2-full.tar.gz
|
||||
/nokogiri-*.gem
|
||||
/rubygem-nokogiri-*-full.tar.gz
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 56a8004de8f0b4253ea4deef608e72eb9b1824e5 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||||
Date: Tue, 18 May 2021 09:58:31 -0400
|
||||
Subject: [PATCH] test: adjust tests to pass on system libxml2 >= 2.9.11
|
||||
|
||||
because the comment parsing improvement was merged upstream.
|
||||
---
|
||||
test/html/test_comments.rb | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/html/test_comments.rb b/test/html/test_comments.rb
|
||||
index 476fc4b473..7d207815f5 100644
|
||||
--- a/test/html/test_comments.rb
|
||||
+++ b/test/html/test_comments.rb
|
||||
@@ -113,8 +113,7 @@ class TestComment < Nokogiri::TestCase
|
||||
let(:subject) { doc.at_css("div#under-test") }
|
||||
let(:inner_div) { doc.at_css("div#do-i-exist") }
|
||||
|
||||
- if Nokogiri.uses_libxml? && Nokogiri::VersionInfo.instance.libxml2_using_packaged?
|
||||
- # see patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch
|
||||
+ if Nokogiri::VersionInfo.instance.libxml2_using_packaged? || (Nokogiri::VersionInfo.instance.libxml2_using_system? && Nokogiri.uses_libxml?(">=2.9.11"))
|
||||
it "behaves as if the comment is normally closed" do # COMPLIANT
|
||||
assert_equal 3, subject.children.length
|
||||
assert subject.children[0].comment?
|
||||
@@ -128,9 +127,7 @@ class TestComment < Nokogiri::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
- if Nokogiri.jruby? || Nokogiri::VersionInfo.instance.libxml2_using_system?
|
||||
- # this behavior may change to the above in libxml v2.9.11 depending on whether
|
||||
- # https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/82 is merged
|
||||
+ if Nokogiri.jruby? || (Nokogiri::VersionInfo.instance.libxml2_using_system? && Nokogiri.uses_libxml?("<2.9.11"))
|
||||
it "behaves as if the comment encompasses the inner div" do # NON-COMPLIANT
|
||||
assert_equal 1, subject.children.length
|
||||
assert subject.children.first.comment?
|
@ -1,24 +0,0 @@
|
||||
From f9d72bb67bf81d0d3712134cd4ccea8a3d5a033d Mon Sep 17 00:00:00 2001
|
||||
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||||
Date: Thu, 13 May 2021 22:41:44 -0400
|
||||
Subject: [PATCH] test: adjust xpath gc test to libxml2's max recursion depth
|
||||
|
||||
See upstream libxml2 commit 6f1470a where the recursion limit is
|
||||
hardcoded to 5000 stack frames.
|
||||
---
|
||||
test/xml/test_xpath.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/xml/test_xpath.rb b/test/xml/test_xpath.rb
|
||||
index 271412a70..fe22646ba 100644
|
||||
--- a/test/xml/test_xpath.rb
|
||||
+++ b/test/xml/test_xpath.rb
|
||||
@@ -337,7 +337,7 @@ def name_equals(nodeset, name, *args)
|
||||
# long list of long arguments, to apply GC pressure during
|
||||
# ruby_funcall argument marshalling
|
||||
xpath = ["//tool[name_equals(.,'hammer'"]
|
||||
- 1000.times { xpath << "'unused argument #{'x' * 1000}'" }
|
||||
+ 500.times { xpath << "'unused argument #{'x' * 1000}'" }
|
||||
xpath << "'unused argument')]"
|
||||
xpath = xpath.join(',')
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 4fe6b46f04f94b31bc39fe5be4f363b025ec0aaf Mon Sep 17 00:00:00 2001
|
||||
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:04:13 -0400
|
||||
Subject: [PATCH] test: establish better baseline behavior for MS Word's html
|
||||
format
|
||||
|
||||
because this is about to change in libxml 2.9.12
|
||||
---
|
||||
test/xml/test_node.rb | 20 ++++++++++++--------
|
||||
1 file changed, 12 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb
|
||||
index 5995055cb..54cc9eccd 100644
|
||||
--- a/test/xml/test_node.rb
|
||||
+++ b/test/xml/test_node.rb
|
||||
@@ -1041,18 +1041,22 @@ def test_namespace_without_an_href_on_html_node
|
||||
# describe how we handle microsoft word's HTML formatting.
|
||||
# this test is descriptive, not prescriptive.
|
||||
#
|
||||
- skip("Xerces handles this edge case completely differently") unless Nokogiri.uses_libxml?
|
||||
-
|
||||
- xml = Nokogiri::HTML.parse(<<~EOF)
|
||||
+ html = Nokogiri::HTML.parse(<<~EOF)
|
||||
<div><o:p>foo</o:p></div>
|
||||
EOF
|
||||
-
|
||||
- node = xml.at("p")
|
||||
+ node = html.at("div").children.first
|
||||
assert_not_nil(node)
|
||||
|
||||
- assert_equal(1, node.namespaces.keys.size)
|
||||
- assert(node.namespaces.has_key?('xmlns:o'))
|
||||
- assert_nil(node.namespaces['xmlns:o'])
|
||||
+ if Nokogiri.uses_libxml?
|
||||
+ assert_equal(1, node.namespaces.keys.size)
|
||||
+ assert(node.namespaces.has_key?('xmlns:o'))
|
||||
+ assert_nil(node.namespaces['xmlns:o'])
|
||||
+ assert_equal("<p>foo</p>", node.to_html)
|
||||
+ else
|
||||
+ # Xerces does something completely different
|
||||
+ assert_empty(node.namespaces.keys)
|
||||
+ assert_equal("<o:p>foo</o:p>", node.to_html)
|
||||
+ end
|
||||
end
|
||||
|
||||
def test_xpath_results_have_document_and_are_decorated
|
@ -1,31 +0,0 @@
|
||||
From 458c3241db78ac2ee2be061eb1c738742e21d0ee Mon Sep 17 00:00:00 2001
|
||||
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||||
Date: Thu, 13 May 2021 22:50:39 -0400
|
||||
Subject: [PATCH] test: remove low-value HTML::SAX::PushParser encoding test
|
||||
|
||||
---
|
||||
test/html/sax/test_push_parser.rb | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/test/html/sax/test_push_parser.rb b/test/html/sax/test_push_parser.rb
|
||||
index dd6425390..f83440d27 100644
|
||||
--- a/test/html/sax/test_push_parser.rb
|
||||
+++ b/test/html/sax/test_push_parser.rb
|
||||
@@ -70,17 +70,6 @@ def test_chevron
|
||||
def test_default_options
|
||||
assert_equal 0, @parser.options
|
||||
end
|
||||
-
|
||||
- def test_broken_encoding
|
||||
- skip("ultra hard to fix for pure Java version") if Nokogiri.jruby?
|
||||
- @parser.options |= 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
|
||||
- assert_equal [["r"], ["body"], ["html"]], @parser.document.end_elements
|
||||
- end
|
||||
end
|
||||
end
|
||||
end
|
@ -1,34 +0,0 @@
|
||||
From 0e743c8a6d34bd4416fd986c9777b22744ad2283 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:07:27 -0400
|
||||
Subject: [PATCH] test: update behavior of namespaces in HTML
|
||||
|
||||
libxml 2.9.12 fixes the parser to ignore namespaces in HTML docs,
|
||||
likely in upstream commit 21ca882.
|
||||
---
|
||||
test/xml/test_node.rb | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb
|
||||
index 54cc9eccd..11a8b993a 100644
|
||||
--- a/test/xml/test_node.rb
|
||||
+++ b/test/xml/test_node.rb
|
||||
@@ -1047,13 +1047,15 @@ def test_namespace_without_an_href_on_html_node
|
||||
node = html.at("div").children.first
|
||||
assert_not_nil(node)
|
||||
|
||||
- if Nokogiri.uses_libxml?
|
||||
+ if Nokogiri.uses_libxml?(">= 2.9.12")
|
||||
+ assert_empty(node.namespaces.keys)
|
||||
+ assert_equal("<p>foo</p>", node.to_html)
|
||||
+ elsif Nokogiri.uses_libxml?
|
||||
assert_equal(1, node.namespaces.keys.size)
|
||||
assert(node.namespaces.has_key?('xmlns:o'))
|
||||
assert_nil(node.namespaces['xmlns:o'])
|
||||
assert_equal("<p>foo</p>", node.to_html)
|
||||
- else
|
||||
- # Xerces does something completely different
|
||||
+ else # jruby
|
||||
assert_empty(node.namespaces.keys)
|
||||
assert_equal("<o:p>foo</o:p>", node.to_html)
|
||||
end
|
31
rubygem-nokogiri-pr3177-rubyzip-dep-optional.patch
Normal file
31
rubygem-nokogiri-pr3177-rubyzip-dep-optional.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 26e5ba521208706ae68f19062d4ad24ad257aa47 Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Mon, 15 Apr 2024 15:46:30 +0200
|
||||
Subject: [PATCH] Make a test depending on the rubyzip gem optional.
|
||||
|
||||
Because I still want to pass the nokogiri's unit tests in a downstream nokogiri
|
||||
package on a Linux distro such as CentOS 10 Stream and RHEL 10, where we don't
|
||||
want to manage the rubyzip gem[1].
|
||||
|
||||
[1] https://rubygems.org/gems/rubyzip
|
||||
---
|
||||
test/xml/test_document_encoding.rb | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/xml/test_document_encoding.rb b/test/xml/test_document_encoding.rb
|
||||
index cd8b1b4da2..c0cb93b283 100644
|
||||
--- a/test/xml/test_document_encoding.rb
|
||||
+++ b/test/xml/test_document_encoding.rb
|
||||
@@ -91,7 +91,11 @@ class TestDocumentEncoding < Nokogiri::TestCase
|
||||
describe "pseudo-IO" do
|
||||
it "serializes correctly with Zip::OutputStream objects" do
|
||||
# https://github.com/sparklemotion/nokogiri/issues/2773
|
||||
- require "zip"
|
||||
+ begin
|
||||
+ require "zip"
|
||||
+ rescue LoadError
|
||||
+ skip("rubyzip is not installed")
|
||||
+ end
|
||||
|
||||
xml = <<~XML
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
@ -1,51 +1,53 @@
|
||||
%global mainver 1.11.2
|
||||
%global mainver 1.16.4
|
||||
#%%global prever .rc4
|
||||
|
||||
%global mainrel 3
|
||||
%global baserelease 4
|
||||
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
|
||||
|
||||
%global gem_name nokogiri
|
||||
|
||||
%undefine __brp_mangle_shebangs
|
||||
%undefine _changelog_trimtime
|
||||
|
||||
Summary: An HTML, XML, SAX, and Reader parser
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: %{mainver}
|
||||
Release: %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}%{?dist}.1
|
||||
License: MIT
|
||||
URL: http://nokogiri.rubyforge.org/nokogiri/
|
||||
Release: %{?prever:0.}%{baserelease}%{?prever:.%{prerpmver}}%{?dist}
|
||||
|
||||
# SPDX confirmed
|
||||
# MIT: see LICENSE.md
|
||||
# Apache-2.0
|
||||
# 1.12.0 bundles forked and modified gumbo -
|
||||
# see gumbo-parser/src/attribute.c and ext/nokogiri/gumbo.c
|
||||
# also lib/nokogiri/html5 is licensed under ASL 2.0
|
||||
License: MIT AND Apache-2.0
|
||||
Provides: bundled(gumbo-parser) = 0.10.1
|
||||
|
||||
URL: https://nokogiri.org
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{mainver}%{?prever}.gem
|
||||
# %%{SOURCE2} %%{name} %%{version}
|
||||
Source1: rubygem-%{gem_name}-%{version}%{?prever}-full.tar.gz
|
||||
Source2: nokogiri-create-full-tarball.sh
|
||||
# ./test/html/test_element_description.rb:62 fails, as usual......
|
||||
# Patch0: rubygem-nokogiri-1.5.0.beta3-test-failure.patch
|
||||
#Patch0: rubygem-nokogiri-1.5.0-allow-non-crosscompile.patch
|
||||
# Shut down libxml2 version unmatching warning
|
||||
Patch0: %{name}-1.11.0.rc4-shutdown-libxml2-warning.patch
|
||||
# Several patches to fix test suite compatibility with libxml 2.9.12.
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2235
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2235/commits/4fe6b46f04f94b31bc39fe5be4f363b025ec0aaf
|
||||
Patch1: rubygem-nokogiri-1.11.2-establish-better-baseline-behavior-for-MS-Words-html.patch
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2235/commits/f9d72bb67bf81d0d3712134cd4ccea8a3d5a033d
|
||||
Patch2: rubygem-nokogiri-1.11.2-adjust-xpath-gc-test-to-libxml2s-max-recursion-depth.patch
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2235/commits/458c3241db78ac2ee2be061eb1c738742e21d0ee
|
||||
Patch3: rubygem-nokogiri-1.11.2-remove-low-value-HTML-SAX-PushParser-encoding-test.patch
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2235/commits/0e743c8a6d34bd4416fd986c9777b22744ad2283
|
||||
Patch4: rubygem-nokogiri-1.11.2-update-behavior-of-namespaces-in-HTML.patch
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2240
|
||||
# https://github.com/sparklemotion/nokogiri/pull/2240/commits/56a8004de8f0b4253ea4deef608e72eb9b1824e5
|
||||
Patch5: rubygem-nokogiri-1.11.2-adjust-tests-to-pass-on-system-libxml2-2.9.11.patch
|
||||
# https://github.com/sparklemotion/nokogiri/pull/3177
|
||||
# Make rubygem-minizip dependency optional
|
||||
Patch1: %{name}-pr3177-rubyzip-dep-optional.patch
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: ruby(rubygems)
|
||||
##
|
||||
## For %%check
|
||||
BuildRequires: rubygem(minitest)
|
||||
%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)
|
||||
##
|
||||
# test suite uses EUC-JP, SHIFT-JIS, etc
|
||||
BuildRequires: glibc-all-langpacks
|
||||
## Others
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
@ -62,16 +64,6 @@ correctly implemented CSS3 selector support as well as XPath support.
|
||||
Nokogiri also features an Hpricot compatibility layer to help ease the change
|
||||
to using correct CSS and XPath.
|
||||
|
||||
%if 0
|
||||
%package jruby
|
||||
Summary: JRuby support for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description jruby
|
||||
This package contains JRuby support for %{name}.
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
@ -90,57 +82,62 @@ This package provides non-Gem support for %{gem_name}.
|
||||
%global version %{mainver}%{?prever}
|
||||
|
||||
%prep
|
||||
%setup -q -T -c -a 1
|
||||
|
||||
pushd %{gem_name}-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
popd
|
||||
|
||||
# Gem repack
|
||||
TOPDIR=$(pwd)
|
||||
mkdir tmpunpackdir
|
||||
pushd tmpunpackdir
|
||||
|
||||
gem unpack %{SOURCE0}
|
||||
cd %{gem_name}-%{version}
|
||||
%setup -q -n %{gem_name}-%{version} -a 1
|
||||
cp -a %{gem_name}-%{version}/{.,*} .
|
||||
mv ../%{gem_name}-%{version}.gemspec .
|
||||
|
||||
# patches
|
||||
%patch0 -p1
|
||||
|
||||
gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p1
|
||||
|
||||
# remove bundled external libraries
|
||||
sed -i \
|
||||
-e 's|, "ports/archives/[^"][^"]*"||g' \
|
||||
-e 's|, "ports/patches/[^"][^"]*"||g' \
|
||||
%{gem_name}.gemspec
|
||||
%{gem_name}-%{version}.gemspec
|
||||
# Actually not needed when using system libraries
|
||||
sed -i -e '\@mini_portile@d' %{gem_name}.gemspec
|
||||
sed -i -e '\@mini_portile@d' %{gem_name}-%{version}.gemspec
|
||||
|
||||
# Ummm...
|
||||
LANG=C.UTF-8 gem build %{gem_name}.gemspec
|
||||
mv %{gem_name}-%{version}.gem $TOPDIR
|
||||
# Don't use mini_portile2, but build libgumbo.a first and
|
||||
# tell extconf.rb the path to the archive
|
||||
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 "\@libs.*gumbo@s@File\.join.*@\"$(pwd)/gumbo-parser/src/libgumbo.a\"@" \
|
||||
-e "\@LIBPATH.*gumbo@s|^\(.*\)\$|# \1|" \
|
||||
%{nil}
|
||||
|
||||
popd
|
||||
rm -rf tmpunpackdir
|
||||
# #line directive can confuse debuginfo, removing for now
|
||||
sed -i \
|
||||
gumbo-parser/src/char_ref.c \
|
||||
-e '\@^#line [0-9]@s|^\(.*\)$|// \1|'
|
||||
|
||||
# Compile libgumbo.a with -fPIC
|
||||
sed -i \
|
||||
gumbo-parser/src/Makefile \
|
||||
-e 's|^\(CFLAGS.*=.*\)$|\1 -fPIC|'
|
||||
|
||||
%build
|
||||
mkdir -p ./%{gem_dir}
|
||||
# Ummm...
|
||||
env LANG=C.UTF-8 gem build %{gem_name}-%{version}.gemspec
|
||||
|
||||
# 1.6.0 needs this
|
||||
export NOKOGIRI_USE_SYSTEM_LIBRARIES=yes
|
||||
|
||||
%gem_install
|
||||
%set_build_flags
|
||||
# First build libgumbo.a
|
||||
pushd gumbo-parser/src/
|
||||
make libgumbo.a
|
||||
popd
|
||||
|
||||
%gem_install
|
||||
|
||||
# Permission
|
||||
chmod 0644 .%{gem_dir}/cache/%{gem_name}-%{mainver}%{?prever}.gem
|
||||
|
||||
# Remove precompiled Java .jar file
|
||||
rm -f .%{gem_instdir}/lib/*.jar
|
||||
find .%{gem_instdir}/lib/ -name '*.jar' -delete
|
||||
# For now remove JRuby support
|
||||
rm -rf .%{gem_instdir}/ext/java
|
||||
|
||||
@ -149,6 +146,9 @@ rm -rf .%{gem_instdir}/ext/java
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}
|
||||
|
||||
# Also first copy these, clean up later
|
||||
cp -a ./gumbo-parser %{buildroot}%{gem_instdir}/
|
||||
|
||||
# Remove backup file
|
||||
find %{buildroot} -name \*.orig_\* | xargs rm -vf
|
||||
|
||||
@ -174,23 +174,30 @@ do
|
||||
done
|
||||
|
||||
# Copy document files from full source
|
||||
cp -p %{gem_name}-%{version}/[A-Z]* %{buildroot}%{gem_instdir}/
|
||||
cp -p [A-Z]* %{buildroot}%{gem_instdir}/
|
||||
|
||||
# cleanups
|
||||
rm -rf %{buildroot}%{gem_instdir}/ext/%{gem_name}/
|
||||
rm -rf %{buildroot}%{gem_instdir}/tmp/
|
||||
rm -f %{buildroot}%{gem_instdir}/{.autotest,.require_paths,.gemtest,.travis.yml}
|
||||
rm -f %{buildroot}%{gem_instdir}/.vagant
|
||||
rm -f %{buildroot}%{gem_instdir}/appveyor.yml
|
||||
rm -f %{buildroot}%{gem_instdir}/.cross_rubies
|
||||
rm -f %{buildroot}%{gem_instdir}/{build_all,dependencies.yml,test_all}
|
||||
rm -f %{buildroot}%{gem_instdir}/.editorconfig
|
||||
rm -rf %{buildroot}%{gem_instdir}/suppressions/
|
||||
rm -rf %{buildroot}%{gem_instdir}/patches/
|
||||
rm -f %{buildroot}%{gem_instdir}/{Rakefile,Gemfile*}
|
||||
rm -f %{buildroot}%{gem_instdir}/Manifest.txt
|
||||
|
||||
# Remove bundled gumbo parser
|
||||
pushd %{buildroot}%{gem_instdir}
|
||||
rm -rf \
|
||||
Gemfile* \
|
||||
Rakefile \
|
||||
Vagrantfile \
|
||||
dependencies.yml \
|
||||
ext \
|
||||
*gemspec \
|
||||
patches \
|
||||
ports \
|
||||
%{nil}
|
||||
pushd gumbo-parser
|
||||
find . -type f | \
|
||||
grep -v CHANGES.md | \
|
||||
grep -v THANKS | \
|
||||
grep -v README.md | \
|
||||
xargs rm -f
|
||||
|
||||
popd
|
||||
rm -f %{buildroot}%{gem_cache}
|
||||
|
||||
%check
|
||||
# Ah....
|
||||
@ -201,26 +208,36 @@ export TZ="Asia/Tokyo"
|
||||
LANG=C.UTF-8
|
||||
|
||||
# Copy test files from full tarball
|
||||
cp -a %{gem_name}-%{version}/test/ ./%{gem_instdir}
|
||||
cp -a test/ ./%{gem_instdir}
|
||||
pushd ./%{gem_instdir}
|
||||
|
||||
# Remove unneeded simplecov coverage test
|
||||
sed -i test/helper.rb \
|
||||
-e '\@require.*simplecov@,\@^end$@d'
|
||||
-e '\@^ require.*simplecov@,\@^ end$@s|^|#|'
|
||||
|
||||
# Remove minitest-reporters. It does not provide any additional value while
|
||||
# it blows up the dependency chain.
|
||||
sed -i '/require..minitest.reporters./ s/^/#/' test/helper.rb
|
||||
sed -i '/Minitest::Reporters/ s/^/#/' test/helper.rb
|
||||
|
||||
# Need investigation. For now anyway build
|
||||
# PPC64LE with ruby3.1 does not seem to support GC.compact
|
||||
%ifarch ppc64le
|
||||
export NOKOGIRI_TEST_GC_LEVEL=major
|
||||
%endif
|
||||
%ifarch s390x
|
||||
# With ruby 3.2 GC_LEVEL=compact seems to cause segfault:
|
||||
# change to major for now
|
||||
if pkg-config --atleast-version 3.2 ruby ; then
|
||||
export NOKOGIRI_TEST_GC_LEVEL=major
|
||||
fi
|
||||
%endif
|
||||
|
||||
env \
|
||||
RUBYLIB=".:lib:test:ext" \
|
||||
RUBYLIB=".:lib:test:%{buildroot}%{gem_extdir_mri}" \
|
||||
ruby \
|
||||
-e \
|
||||
"require 'test/helper' ; Dir.glob('test/**/test_*.rb'){|f| require f}" || \
|
||||
exit 1
|
||||
echo "Please investigate this"
|
||||
|
||||
for f in $SKIPTEST
|
||||
do
|
||||
@ -230,46 +247,202 @@ done
|
||||
popd
|
||||
|
||||
%files
|
||||
%defattr(-,root, root,-)
|
||||
%{_bindir}/%{gem_name}
|
||||
%{gem_extdir_mri}/
|
||||
|
||||
%dir %{gem_instdir}/
|
||||
%doc %{gem_instdir}/[A-Z]*
|
||||
%license %{gem_instdir}/LICENSE*.md
|
||||
%doc %{gem_instdir}/CHANGELOG.md
|
||||
%doc %{gem_instdir}/README.md
|
||||
|
||||
%{gem_instdir}/bin/
|
||||
%{gem_instdir}/lib/
|
||||
%exclude %{gem_dir}/cache/%{gem_name}-%{mainver}%{?prever}.gem
|
||||
%{gem_dir}/specifications/%{gem_name}-%{mainver}%{?prever}.gemspec
|
||||
|
||||
%if 0
|
||||
%files jruby
|
||||
%defattr(-,root,root,-)
|
||||
%{gem_instdir}/ext/java/
|
||||
%endif
|
||||
%dir %{gem_instdir}/gumbo-parser
|
||||
%dir %{gem_instdir}/gumbo-parser/src
|
||||
%doc %{gem_instdir}/gumbo-parser/[A-Z]*
|
||||
%license %{gem_instdir}/gumbo-parser/src/README.md
|
||||
|
||||
%{gem_dir}/specifications/%{gem_name}-%{mainver}%{?prever}.gemspec
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
#%%{gem_instdir}/deps.rip
|
||||
#%%{gem_instdir}/spec/
|
||||
%exclude %{gem_instdir}/tasks/
|
||||
%exclude %{gem_instdir}/test/
|
||||
%{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}/
|
||||
%doc %{gem_instdir}/CODE_OF_CONDUCT.md
|
||||
%doc %{gem_instdir}/CONTRIBUTING.md
|
||||
%doc %{gem_instdir}/ROADMAP.md
|
||||
%doc %{gem_instdir}/SECURITY.md
|
||||
%doc %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}/
|
||||
|
||||
%changelog
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.11.2-3.1
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.16.4-4
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
||||
* Wed Jul 28 2021 Vít Ondruch <vondruch@redhat.com> - 1.11.2-3
|
||||
- Fix test suite compatibility with libxml 2.9.12.
|
||||
Resolves: rhbz#1980885
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.16.4-3
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Fri May 07 2021 Vít Ondruch <vondruch@redhat.com> - 1.11.2-2
|
||||
* 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
|
||||
|
||||
* Sat Aug 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.4-1
|
||||
- 1.15.4
|
||||
|
||||
* Sun Aug 6 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.3-4
|
||||
- Prefer upstream patch for the previous change
|
||||
|
||||
* Fri Aug 4 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.3-3
|
||||
- Support MiniTest 5.19+
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jul 6 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.3-1
|
||||
- 1.15.3
|
||||
|
||||
* Thu May 25 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.2-1
|
||||
- 1.15.2
|
||||
|
||||
* Sun May 21 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.1-1
|
||||
- 1.15.1
|
||||
|
||||
* Tue May 16 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.15.0-1
|
||||
- 1.15.0
|
||||
|
||||
* Fri May 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.4-1
|
||||
- 1.14.4
|
||||
- Note that CVE-2022-34169 is for vendored xalan-j, not affecting Fedora
|
||||
nokogiri
|
||||
|
||||
* Wed Apr 12 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.3-1
|
||||
- 1.14.3
|
||||
- SPDX confirmed
|
||||
|
||||
* Tue Feb 14 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.2-1
|
||||
- 1.14.2
|
||||
|
||||
* Tue Jan 31 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.1-1
|
||||
- 1.14.1
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sun Jan 15 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.0-1
|
||||
- 1.14.0
|
||||
|
||||
* Tue Jan 03 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.10-2.1
|
||||
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
|
||||
|
||||
* Sun Dec 25 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.10-2
|
||||
- Use %%gem_extdir_mri instead of ext for %%check due to ruby3.2 change
|
||||
for ext cleanup during build
|
||||
|
||||
* Fri Dec 9 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.10-1
|
||||
- 1.13.10
|
||||
- Address CVE-2022-23476
|
||||
|
||||
* Thu Oct 20 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.9-2
|
||||
- s390x: change GC_LEVEL to major on ruby3.2 for now
|
||||
|
||||
* Thu Oct 20 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.9-1
|
||||
- 1.13.9
|
||||
|
||||
* Wed Jul 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.8-1
|
||||
- 1.13.8
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.7-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Wed Jul 13 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.7-2
|
||||
- Bump release
|
||||
|
||||
* Wed Jul 13 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.7-1
|
||||
- 1.13.7
|
||||
|
||||
* Tue May 10 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.6-1
|
||||
- 1.13.6
|
||||
- Addresses CVE-2022-29181
|
||||
|
||||
* Thu May 5 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.5-1
|
||||
- 1.13.5
|
||||
|
||||
* Thu Apr 14 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.4-1
|
||||
- 1.13.4
|
||||
- Addresses CVE-2022-24836
|
||||
|
||||
* Tue Feb 22 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.3-1
|
||||
- 1.13.3
|
||||
|
||||
* Wed Jan 26 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.1-2
|
||||
- Set NOKOGIRI_TEST_GC_LEVEL to major on ppc64le as
|
||||
ruby31 does not seem to support GC.compat on the platform
|
||||
|
||||
* Wed Jan 26 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.1-1.2
|
||||
- F-36: rebuild against ruby31
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.1-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jan 14 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.1-1
|
||||
- 1.13.1
|
||||
|
||||
* Sun Jan 9 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.13.0-1
|
||||
- 1.13.0
|
||||
|
||||
* Tue Sep 28 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.5-1
|
||||
- 1.12.5
|
||||
|
||||
* Wed Sep 1 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.4-1
|
||||
- 1.12.4
|
||||
|
||||
* Thu Aug 12 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.3-1
|
||||
- 1.12.3
|
||||
|
||||
* Sat Aug 7 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.2-1
|
||||
- 1.12.2
|
||||
|
||||
* Sat Aug 7 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.1-1
|
||||
- 1.12.1
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.7-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sat Jun 19 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.11.7-1
|
||||
- 1.11.7
|
||||
|
||||
* Sun May 16 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.11.4-1
|
||||
- 1.11.4
|
||||
|
||||
* Fri May 07 2021 Vít Ondruch <vondruch@redhat.com> - 1.11.3-2
|
||||
- Remove rubygem(minitest-reporters) dependency.
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.11.2-1.1
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
* Thu Apr 8 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.11.3-1
|
||||
- 1.11.3
|
||||
|
||||
* Fri Mar 12 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.11.2-1
|
||||
- 1.11.2
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (nokogiri-1.11.2.gem) = de2d461b6c6d852c1d414d97c579b33cecc1d79b8cf87652c1ac5a2fa8487c477f61b66e35fe6f99e0483bce7ebec5cab681191b320b057d4c09de3b226a2609
|
||||
SHA512 (rubygem-nokogiri-1.11.2-full.tar.gz) = fec12b59581d8f5f5e364ef72c958625aacee57f030b1ea9045341be14adeb78e5a6aecd5026a438a4bf0af61724eb49fdf0e39f22c0719bb50bb75540de5ef3
|
||||
SHA512 (nokogiri-1.16.4.gem) = c9e1c7c2a8cd087f88efe8421437ebd3d79f99a8be058c6b877ddcf70cb039c593605618b3381a2854b43551cc102cd6e8a9163fcc941bee65cc671ea463201c
|
||||
SHA512 (rubygem-nokogiri-1.16.4-full.tar.gz) = e10b11f538d3c4850b4fb10620e4497918be8e60d05558b9fcedf96f382d08fe6b0dfe65a69a346855888c2ee68e71cb019eadc0aff044aeff9a51752b5b0805
|
||||
|
Loading…
Reference in New Issue
Block a user