Make rubygem-minizip testsuite dependency optional, drop on RHEL
(Patch by Jun Aruga <jaruga@redhat.com>)
This commit is contained in:
parent
4189454b54
commit
1f79b238fa
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,7 +1,7 @@
|
||||
%global mainver 1.16.4
|
||||
#%%global prever .rc4
|
||||
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
%global prerpmver %(echo "%{?prever}" | sed -e 's|\\.||g')
|
||||
|
||||
%global gem_name nokogiri
|
||||
@ -29,12 +29,19 @@ 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/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)
|
||||
@ -81,6 +88,7 @@ mv ../%{gem_name}-%{version}.gemspec .
|
||||
|
||||
# patches
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p1
|
||||
|
||||
# remove bundled external libraries
|
||||
sed -i \
|
||||
@ -266,6 +274,10 @@ popd
|
||||
%doc %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}/
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user