Compare commits

...

10 Commits

Author SHA1 Message Date
Mohan Boddu eba93b11d2 Rebuilt for IMA sigs, glibc 2.34, aarch64 flags 2023-05-19 09:33:10 +00:00
Pavel Valena 82a9f022fa Fix FTBFS: re-add rake into BuildRequires
Related: rhbz#1982410
2021-07-16 12:24:11 +02:00
Pavel Valena 526f31135b Revert back Recommends -> Requires: rubygem(rake)
as it's needed for regular runtime:
https://bugzilla.redhat.com/show_bug.cgi?id=1982410

This reverts the previous change in 7f501ab649.

Resolves: rhbz#1982410
Resolves: rhbz#1982419
2021-07-15 17:02:26 +02:00
Vít Ondruch ae1a6bd84e Shebang mangling should be safe.
Related: rhbz#1952842
2021-04-23 16:44:23 +02:00
Vít Ondruch 7f501ab649 Install rake just optionally.
Related: rhbz#1952842
2021-04-23 16:44:23 +02:00
Vít Ondruch b049eecc63 Remove Aruba and Cucumber dependencies.
This disables the integration tests suite in favor of much leaner
dependency chain.

Resolves: rhbz#1952842
2021-04-23 16:44:20 +02:00
Mohan Boddu ad5b5942cc - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-04-16 05:25:43 +00:00
DistroBaker 0086f35168 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rubygem-rspec-core.git#4bceaf8eda7add9cecce8a7b8c836af348d8ab90
2021-03-22 18:50:16 +00:00
DistroBaker b8d789e27b Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rubygem-rspec-core.git#190fb4d37ddf57aaf195ae1094dc338748fd2795
2021-02-19 12:28:12 +00:00
DistroBaker ae5092547e Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rubygem-rspec-core.git#190fb4d37ddf57aaf195ae1094dc338748fd2795
2021-02-17 12:38:44 +01:00
3 changed files with 92 additions and 66 deletions

View File

@ -0,0 +1,2 @@
c462b4ecc1ff569a2d0019e7918d46f4d9086a8f rspec-core-3.10.1.gem
2f23ead60f1e6b569eb148ade3c7de6c32b29a79 rubygem-rspec-core-3.10.1-full.tar.gz

View File

@ -0,0 +1,28 @@
From 7550f7b024323c15ed21d13e930f59a64455e5d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 18 Mar 2021 15:45:48 +0100
Subject: [PATCH] Filter content of /usr/share/ruby
Some Linux distributions, such as Fedora, are using this location to
store Ruby StdLib. Therefore, it would be nice to filter this location
similarly to /lib\d*/ruby/
---
lib/rspec/core/backtrace_formatter.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rspec/core/backtrace_formatter.rb b/lib/rspec/core/backtrace_formatter.rb
index e0bee52a..27008e2c 100644
--- a/lib/rspec/core/backtrace_formatter.rb
+++ b/lib/rspec/core/backtrace_formatter.rb
@@ -8,7 +8,7 @@ module RSpec
def initialize
@full_backtrace = false
- patterns = %w[ /lib\d*/ruby/ bin/ exe/rspec /lib/bundler/ /exe/bundle: ]
+ patterns = %w[ /lib\d*/ruby/ /share/ruby/ bin/ exe/rspec /lib/bundler/ /exe/bundle: ]
patterns << "org/jruby/" if RUBY_PLATFORM == 'java'
patterns.map! { |s| Regexp.new(s.gsub("/", File::SEPARATOR)) }
--
2.30.0

View File

@ -3,7 +3,7 @@
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
%global fullver %{majorver}%{?preminorver}
%global fedorarel 3
%global fedorarel 7
%global gem_name rspec-core
@ -13,12 +13,14 @@
# pulled by aruba
%global need_bootstrap_set 0
%undefine __brp_mangle_shebangs
# Disable Aruba support due to excesive dependency chain. This also disables
# Cucumber integration test suite, which depends on Aruba as well.
%bcond_with aruba
Summary: RSpec runner and formatters
Name: rubygem-%{gem_name}
Version: %{majorver}
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}.1
License: MIT
URL: http://github.com/rspec/rspec-mocks
@ -26,24 +28,28 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
# %%{SOURCE2} %%{name} %%{version}
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
Source2: rspec-related-create-full-tarball.sh
# Adjust backtrace filter for Fedora placement of StdLib.
# https://github.com/rspec/rspec-core/pull/2881
Patch0: rubygem-rspec-core-3.10.1-Filter-content-of-usr-share-ruby.patch
#BuildRequires: ruby(release)
BuildRequires: rubygems-devel
%if 0%{?need_bootstrap_set} < 1
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(nokogiri)
BuildRequires: rubygem(rake)
%{?with_aruba:BuildRequires: rubygem(minitest)}
BuildRequires: rubygem(rake)
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(aruba)
%if %{with aruba}
BuildRequires: rubygem(aruba)
# Newly
BuildRequires: rubygem(flexmock)
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(rr)
%endif
BuildRequires: rubygem(coderay)
BuildRequires: rubygem(thread_order)
BuildRequires: git
# New test
BuildRequires: rubygem(cucumber)
%{?with_aruba:BuildRequires: rubygem(cucumber)}
BuildRequires: rubygem(test-unit)
%if 0%{?fedora} || 0%{?rhel} > 7
@ -74,7 +80,7 @@ This package contains documentation for %{name}.
%prep
%setup -q -T -n %{gem_name}-%{version} -b 1
#%%patch1 -p1
%patch0 -p1
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
@ -91,64 +97,29 @@ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
%if 0%{?need_bootstrap_set} < 1
%check
LANG=C.UTF-8
# Test failure needs investigation...
# perhaps due to some incompatibility between libxml2 2.9.x
# and rubygem-nokogiri
FAILFILE=()
FAILTEST=()
FAILFILE+=("spec/rspec/core/formatters/progress_formatter_spec.rb")
FAILTEST+=("produces the expected full output")
FAILFILE+=("spec/rspec/core/formatters/documentation_formatter_spec.rb")
FAILTEST+=("produces the expected full output")
#FAILFILE+=("spec/rspec/core/formatters/syntax_highlighter_spec.rb")
#FAILTEST+=("when CodeRay is available")
# New from 3.5.3
FAILFILE+=("spec/integration/suite_hooks_errors_spec.rb")
FAILTEST+=("nicely formats errors")
# New from 3.6.0
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
FAILTEST+=("nicely handles load-time errors")
# NET??
FAILFILE+=("spec/rspec/core/runner_spec.rb")
FAILTEST+=("if drb server is started with 127.0.0.1")
FAILFILE+=("spec/rspec/core/runner_spec.rb")
FAILTEST+=("if drb server is started with localhost")
# New from 3.9.0
FAILFILE+=("spec/integration/spec_file_load_errors_spec.rb")
FAILTEST+=("prints a single error when it happens")
%if ! %{with 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
for ((i = 0; i < ${#FAILFILE[@]}; i++)) {
sed -i \
-e "\@${FAILTEST[$i]}@s|do$|, :broken => true do|" \
${FAILFILE[$i]}
}
# 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
ruby -rrubygems -Ilib/ -S exe/rspec
# Well, when HOME variable is not set and tty is not a real one
# but pseudo-tty, with current ruby implementation $ env -i ruby -e 'p Dir.home'
# causes:
# `home': couldn't find login name -- expanding `~' (ArgumentError)
# - and this causes some test errors on rspec-core.
# fixing this error without modifying rspec-core "code" is very hard,
# once modifying source itself.
sed -i.warn lib/rspec/core/configuration_options.rb \
-e '\@because the HOME environment variable is not set@s|RSpec\.warning|#RSpec.warning|'
ruby -rrubygems -Ilib/ -S exe/rspec || \
ruby -rrubygems -Ilib/ -S exe/rspec --tag ~broken
%if %{with aruba}
# Mark failing test as broken
sed -i features/core_standalone.feature \
-e 's|@unsupported-on-rbx|@unsupported-on-rbx @broken|'
sed -i features/command_line/init.feature \
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
# From ruby 3, once disabling
# disabling tests failing with rr 1.2.1
%if 0%{?fedora} >= 34
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
for f in \
features/command_line/warnings_option.feature \
`# disabling tests failing with rr 1.2.1` \
`# https://github.com/rspec/rspec-core/issues/2882` \
features/mock_framework_integration/use_rr.feature \
%{nil}
do
@ -156,24 +127,27 @@ do
done
%endif
# skip-when-diff-lcs-1.3 tests are introduced on 3.9.3
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ || \
env RUBYOPT="-I$(pwd)/lib -rrubygems" ruby -S cucumber -v features/ \
# Setup just right amount of paths to make the tests suite run.
export RUBYOPT="-I$(pwd)/lib:$(ruby -e 'puts %w[rspec/support minitest test/unit].map {|r| Gem::Specification.find_by_path(r).full_require_paths}.join(?:)')"
cucumber -v -f pretty features/ || \
cucumber -v -f pretty features/ \
--tag "not @broken" \
`# Explicitly skip 'skip-when-diff-lcs-1.3' and '@ruby-2-7' test cases. While` \
`# the conditions are correctly detected, the 'warning' called instead their` \
`# execution is troublesome, possibly due to upstream using old Cucumber?` \
--tag "not @skip-when-diff-lcs-1.3" \
--tag "not @ruby-2-7" \
%{nil}
mv lib/rspec/core/configuration_options.rb{.warn,}
%if 0%{?fedora} >= 34
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
for f in \
features/command_line/warnings_option.feature \
features/mock_framework_integration/use_rr.feature \
%{nil}
do
mv ${f}.drop ${f}
done
%endif
%endif
%endif
@ -195,6 +169,28 @@ done
%{gem_docdir}
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-7.1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jul 15 2021 Pavel Valena <pvalena@redhat.com> - 3.10.1-7
- Re-add Requires: rubygem(rake), as it's needed for runtime.
Resolves: rhbz#1982410
Resolves: rhbz#1982419
* Fri Apr 23 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-6
- Disable integration test suite to cut down the dependency tree.
Resolves: rhbz#1952842
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.1-5.1
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Mar 18 2021 Vít Ondruch <vondruch@redhat.com> - 3.10.1-5
- Make test suite green.
* Sun Feb 28 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-4
- Add conditional for eln
* Wed Feb 17 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.10.1-3
- rr 1.2.1: Disable failing cucumber suite for now