%bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds
%bcond_without batteries # Don't include rubygems, json, rake, minitest
%bcond_without default_ruby # use this Ruby as default system Ruby
+%bcond_without dtrace # disable tracing with dtrace
%bcond_with bootstrap # build bootstrap version
%bcond_with tests # build without tests
-%define rel 1
+%define rel 2
%define ruby_version 2.6
-%define patchlevel 5
+%define patchlevel 8
%define pkg_version %{ruby_version}.%{patchlevel}
%define ruby_suffix %{!?with_default_ruby:%{ruby_version}}
-%define doc_version 2_6_5
+%define doc_version 2_6_7
%define oname ruby
Summary: Ruby - interpreted scripting language
Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ
Group: Development/Languages
# https://www.ruby-lang.org/en/downloads/
Source0: https://cache.ruby-lang.org/pub/ruby/%{ruby_version}/%{oname}-%{pkg_version}.tar.xz
-# Source0-md5: b8a4e2bdbb76485c3d6690e57be67750
-Source2: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz
-# Source2-md5: bd93bce0a482dada63ac238f2e4596cf
-Source3: http://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz
-# Source3-md5: 86322c0f335e8ecc9008f740807362dd
-Source50: http://www.unicode.org/Public/9.0.0/ucd/CaseFolding.txt
+# Source0-md5: 4dc6e5e1988364898b082416a0c477c7
+Source2: https://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz
+# Source2-md5: 1e70282bfffc377d0efe5bcbca4b8127
+Source3: https://www.ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz
+# Source3-md5: 004471ae881d8a7851c11c4c83c14ca3
+Source50: https://www.unicode.org/Public/9.0.0/ucd/CaseFolding.txt
# Source50-md5: e3fbf2f626f10070000fe66f3a2ff5ef
-Source51: http://www.unicode.org/Public/9.0.0/ucd/CompositionExclusions.txt
+Source51: https://www.unicode.org/Public/9.0.0/ucd/CompositionExclusions.txt
# Source51-md5: 263381d7b4b5e2d52a91e1bbbd4722d4
-Source52: http://www.unicode.org/Public/9.0.0/ucd/NormalizationTest.txt
+Source52: https://www.unicode.org/Public/9.0.0/ucd/NormalizationTest.txt
# Source52-md5: aacb8a8acfc449d09136fe39f3f97cf1
-Source53: http://www.unicode.org/Public/9.0.0/ucd/SpecialCasing.txt
+Source53: https://www.unicode.org/Public/9.0.0/ucd/SpecialCasing.txt
# Source53-md5: fea30f45a2f81ffa474fd984d297e2ea
-Source54: http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt
+Source54: https://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt
# Source54-md5: dde25b1cf9bbb4ba1140ac12e4128b0b
Source4: rdoc.1
Source5: testrb.1
Source6: operating_system.rb
+Patch0: autoconf2.70.patch
+Patch1: bison3.59.patch
Patch2: fix-bison-invocation.patch
Patch3: mkmf-verbose.patch
Patch4: strip-ccache.patch
Patch5: ruby-version.patch
Patch6: duplicated-paths.patch
+Patch7: openssl3.patch
# obsolete?
Patch8: rubygems-2.0.0-binary-extensions.patch
Patch9: custom-rubygems-location.patch
BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
BuildRequires: rpm-build >= 5.4.10-49
+BuildRequires: rpmbuild(macros) >= 1.527
# which version is minimum now? 1.8.7 is not enough, fails with:
# ./tool/generic_erb.rb:31: syntax error, unexpected ':', expecting ')'
# ...O.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
BuildRequires: ruby >= 1:1.9
BuildRequires: sed >= 4.0
-BuildRequires: systemtap-sdt-devel
+%{?with_dtrace:BuildRequires: systemtap-sdt-devel}
BuildRequires: tar >= 1:1.22
BuildRequires: xz
BuildRequires: yaml-devel
%define net_telnet_ver 0.2.0
%define power_assert_ver 1.1.3
%define psych_ver 3.1.0
-%define rake_ver 12.3.2
-%define rdoc_ver 6.1.2
-%define rubygems_ver 3.0.3
+%define rake_ver 12.3.3
+%define rdoc_ver 6.1.2.1
+%define rubygems_ver 3.0.3.1
%define test_unit_ver 3.2.9
%define xmlrpc_ver 0.3.0
# default modules, separated
%define ostruct_ver 0.1.0
%define openssl_ver 2.1.2
%define prime_ver 0.1.0
-%define rexml_ver 3.1.9
+%define rexml_ver 3.1.9.1
%define rss_ver 0.2.7
%define scanf_ver 1.0.0
%define sdbm_ver 1.0.0
%define sync_ver 0.5.0
%define thwait_ver 0.1.0
%define tracer_ver 0.1.0
-%define webrick_ver 1.4.2
+%define webrick_ver 1.4.4
%define zlib_ver 1.0.0
%define ruby_ridir %{_datadir}/ri/system
Summary: Ruby HTML documentation
Summary(pl.UTF-8): Dokumentacja HTML do Ruby
Group: Documentation
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description doc
Ruby HTML documentation: FAQ, guide, core and standard library.
Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri
Group: Documentation
Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description doc-ri
Ruby ri documentation.
Summary: Ruby examples
Summary(pl.UTF-8): Przykłady dla języka Ruby
Group: Development/Languages
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description examples
Ruby examples.
Requires: %{name}-modules = 1:%{pkg_version}-%{rel}
Provides: irb = %{version}-%{release}
Provides: ruby(irb) = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description irb
The irb is acronym for Interactive Ruby. It evaluates ruby expression
Requires: %{name}-json >= %{json_ver}
Requires: %{name}-modules = 1:%{pkg_version}-%{rel}
Obsoletes: rdoc <= 0.9.0
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description rdoc
RDoc produces HTML and command-line documentation for Ruby projects.
Requires: %{name}-rdoc >= %{rdoc_ver}
Suggests: %{name}-devel
Provides: rubygems = %{rubygems_ver}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description rubygems
RubyGems is the Ruby standard for publishing and managing third party
License: MIT
Group: Development/Languages
Provides: bundler = %{bundler_ver}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description bundler
Bundler manages an application's dependencies through its entire life,
Group: Development/Languages
Provides: rake = %{rake_ver}
Conflicts: ruby-modules < 1:1.9.3.429-2
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description rake
Rake is a simple Ruby build program with capabilities similar to make.
Epoch: 0
License: MIT
Group: Development/Libraries
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description minitest
minitest/unit is a small and incredibly fast unit testing framework.
Epoch: 0
License: Ruby or BSD
Group: Development/Libraries
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description power_assert
Power Assert shows each value of variables and method calls in the
License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPL v2+)
Group: Development/Libraries
Requires: ruby-power_assert = %{power_assert_ver}-%{pkg_version}.%{rel}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description test-unit
test-unit (Test::Unit) is unit testing framework for Ruby, based on
Epoch: 0
License: MIT
Group: Development/Libraries
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description did_you_mean
"Did you mean?" experience in Ruby: the error message will tell you
Release: %{pkg_version}.%{rel}
Epoch: 0
Group: Development/Libraries
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description net-telnet
Provides telnet client functionality.
%prep
%setup -q -n %{oname}-%{pkg_version} -a2 -a3
+%patch0 -p1
+%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
#%patch8 -p1
%patch9 -p1
%patch12 -p1
echo "Set %%define rubygems_ver to $rubygems_ver and re-run."
exit 1
fi
-rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc.rb | xargs)
-if [ $rdoc_ver != %{rdoc_ver} ]; then
+rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc/version.rb | xargs)
+if [ "$rdoc_ver" != %{rdoc_ver} ]; then
echo "Set %%define rdoc_ver to $rdoc_ver and re-run."
exit 1
fi
--disable-install-doc \
--disable-rpath \
--disable-rubygems \
+ %{__enable_disable dtrace} \
--with-ruby-version='' \
%{__make} -j1 main \
# Kill bundled certificates, as they should be part of ca-certificates.
for cert in \
- AddTrustExternalCARoot.pem \
- DigiCertHighAssuranceEVRootCA.pem \
GlobalSignRootCA.pem \
; do
%{__rm} $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/ssl_certs/*/$cert
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/{[A-Z]*,test,.autotest}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-telnet-%{net_telnet_ver}/{[A-Z]*,bin,net-telnet.gemspec,.*}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/power_assert-%{power_assert_ver}/{[A-Z]*,bin,power_assert.gemspec,.*}
-%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/{[A-Z]*,bin,doc,rake.gemspec,.*}
+%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/{[A-Z]*,bin,doc,rake.gemspec,azure-pipelines.yml}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/{[A-Z]*,doc,sample,test}
%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/xmlrpc-%{xmlrpc_ver}/{[A-Z]*,bin,xmlrpc.gemspec,.*}