#8 Drop rubygem-rubyzip build dependency in RHEL
Closed 24 days ago by mtasaka. Opened a month ago by jaruga.
rpms/ jaruga/rubygem-nokogiri wip/rubyzip-dep-optional  into  rawhide

file modified
@@ -34,7 +34,11 @@ 


  ## For %%check

  BuildRequires:	rubygem(minitest)

+ # Drop rubygem-rubyzip build dependency in RHEL

+ %if !0%{?rhel}

+ # For test/xml/test_document_encoding.rb

  BuildRequires:	rubygem(rubyzip)

+ %endif

  BuildRequires:	rubygems-devel

  Obsoletes:		ruby-%{gem_name} <= 1.5.2-2

  #BuildRequires:	ruby(racc)
@@ -212,6 +216,13 @@ 

  sed -i '/require..minitest.reporters./ s/^/#/' test/helper.rb

  sed -i '/Minitest::Reporters/ s/^/#/' test/helper.rb


+ # Remove a test depending on the rubyzip in RHEL

+ # https://github.com/sparklemotion/nokogiri/pull/3177

+ %if 0%{?rhel}

+ sed -i '/^        describe "pseudo-IO"/,/^        end/ s/^/#/' \

+ 	test/xml/test_document_encoding.rb

+ %endif


  # PPC64LE with ruby3.1 does not seem to support GC.compact

  %ifarch ppc64le


@mtasaka Right now it seems that the downstream rubygem-nokogiri RPM in CentOS 10 Stream is just synchronizing from Fedora rawhide.

And if possible, I want to add a logic to remove the rubygem-rubyzip build dependency conditionally in CentOS Stream and RHEL, because I don't want to manage the rubygem-rubyzip RPM in CentOS 10 Stream and RHEL 10.

I check this PR's modification by running the following scratch builds.

We can remove the sed command if the upstream will merge my PR: https://github.com/sparklemotion/nokogiri/pull/3177 to make a test depending on rubyzip gem optional.

As a note there is a similar case that dropping rubygem-eventmachine in RHEL.

What do you think?

Other choices:

If you want to apply this change to Fedora too, I can remove the conditional %{?rhel} in this PR.

If you don't want to apply this change even with the conditional %{?rhel} statement, I can close this PR, and send another similar PR to the CentOS Stream c10s branch as a downstream specific change.

I guess I am going to apply your change, although I may change your sed command line.

I guess I am going to apply your change, although I may change your sed command line.

All right. That's great! Thanks for your work!

Good to know. Thank you for info.

I've applied your upstreamed patches, and added your rhel conditional. So closing.

Thank you for closing.

Pull-Request has been closed by mtasaka

24 days ago