diff --git a/ruby.spec b/ruby.spec index 1a8fa65..6fd2e11 100644 --- a/ruby.spec +++ b/ruby.spec @@ -66,6 +66,10 @@ %bcond_without git %bcond_without cmake +%if 0%{?fedora} +%bcond_without hardening_test +%endif + Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} @@ -148,7 +152,7 @@ BuildRequires: procps %{?with_git:BuildRequires: git} %{?with_cmake:BuildRequires: %{_bindir}/cmake} # Required to test hardening. -BuildRequires: %{_bindir}/checksec +%{?with_hardening_test:BuildRequires: %{_bindir}/checksec} BuildRequires: multilib-rpm-config # This package provides %%{_bindir}/ruby-mri therefore it is marked by this @@ -685,6 +689,7 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check +%if 0%{?with_hardening_test} # Temporary change the hardening check on PPC64LE as long as the checksec is # is providing incorrect output. # https://bugzilla.redhat.com/show_bug.cgi?id=1479302 @@ -696,6 +701,7 @@ checksec -f libruby.so.%{ruby_version} | \ checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" %endif +%endif # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ]