From f3fc1e2f77715e2a81f5db55db567ace98f3826b Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 3 Mar 2023 13:54:34 -0500 Subject: [PATCH] Disable unwanted dependencies in RHEL builds --- rubygem-rspec-core.spec | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/rubygem-rspec-core.spec b/rubygem-rspec-core.spec index c8e1682..832a2e8 100644 --- a/rubygem-rspec-core.spec +++ b/rubygem-rspec-core.spec @@ -3,7 +3,7 @@ %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global fullver %{majorver}%{?preminorver} -%global fedorarel 1 +%global fedorarel 2 %global gem_name rspec-core @@ -13,6 +13,12 @@ # pulled by aruba %bcond_with bootstrap +# Disable Aruba support in RHEL due to excesive dependency chain. This also +# disables Cucumber integration test suite, which depends on Aruba as well. +%if ! 0%{?rhel} +%bcond_without aruba +%endif + %undefine __brp_mangle_shebangs Summary: RSpec runner and formatters @@ -36,17 +42,18 @@ BuildRequires: rubygems-devel BuildRequires: rubygem(minitest) BuildRequires: rubygem(rake) BuildRequires: rubygem(rspec) -BuildRequires: rubygem(aruba) -# Newly -BuildRequires: rubygem(flexmock) -BuildRequires: rubygem(mocha) -BuildRequires: rubygem(rr) +BuildRequires: rubygem(test-unit) BuildRequires: rubygem(coderay) BuildRequires: rubygem(thread_order) BuildRequires: git -# New test + +%if %{with aruba} +BuildRequires: rubygem(aruba) +BuildRequires: rubygem(flexmock) +BuildRequires: rubygem(mocha) +BuildRequires: rubygem(rr) BuildRequires: rubygem(cucumber) -BuildRequires: rubygem(test-unit) +%endif %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: glibc-langpack-en @@ -97,6 +104,14 @@ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts} %check %if %{without bootstrap} LANG=C.UTF-8 + +%if %{without aruba} +# Avoid dependency on Aruba. The files needs to be present, since they are +# listed by `git ls-files` from 'library wide checks' shared example. +truncate -s 0 spec/support/aruba_support.rb +find spec/integration -exec truncate -s 0 {} \; +%endif + # Adjust the backtrace filters to our directory layout. sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \ spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb @@ -114,6 +129,8 @@ sed -i spec/rspec/core/example_spec.rb \ # FIXME seed 33413 sees test failure ruby -Ilib -S exe/rspec --seed 1 #33413 +%if %{with aruba} + # Mark failing test as broken sed -i features/command_line/init.feature \ -e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|' @@ -163,6 +180,8 @@ done %endif +%endif + %files %dir %{gem_instdir} @@ -181,6 +200,9 @@ done %{gem_docdir} %changelog +* Fri Mar 03 2023 Yaakov Selkowitz - 3.12.1-2 +- Disable unwanted dependencies in RHEL builds + * Fri Feb 10 2023 Mamoru TASAKA - 3.12.1-1 - 3.12.1