From b1a7ccbd74b155da0c68d260f8b001b17f1bb242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 24 Feb 2020 16:15:27 +0100 Subject: [PATCH 01/14] Upgrade to Ruby 2.8.0 (af11efd377). Extract RSS and REXML into separate subpackages, because they were moved from default gems to bundled gems. Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. --- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 8 +- ruby-2.3.0-ruby_version.patch | 12 +- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 6 +- ...6.0-config-support-include-directive.patch | 6 +- ruby-2.7.0-Initialize-ABRT-hook.patch | 4 +- ruby-2.7.0-Remove-RubyGems-dependency.patch | 2 +- ruby.spec | 173 ++++++++++-------- 10 files changed, 120 insertions(+), 97 deletions(-) diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 6352db3..387550d 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3102,6 +3102,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3125,6 +3125,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index d48f74e..62022bc 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3740,7 +3740,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3763,7 +3763,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index d156a73..51d1cbd 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3804,6 +3804,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3827,6 +3827,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 14e20ec..23010b0 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3776,6 +3776,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3799,6 +3799,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3800,6 +3804,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3823,6 +3827,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -338,6 +338,7 @@ def CONFIG.[](name, mandatory = false) +@@ -339,6 +339,7 @@ def CONFIG.[](name, mandatory = false) sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -565,7 +566,16 @@ def stub +@@ -566,7 +567,16 @@ def stub install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 11f73f3..fa0dd03 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3691,9 +3691,6 @@ AS_CASE(["$target_os"], +@@ -3714,9 +3714,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3716,56 +3713,62 @@ AC_ARG_WITH(ridir, +@@ -3739,56 +3736,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3782,6 +3785,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3805,6 +3808,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index d4c110e..d39c9a6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -428,7 +428,7 @@ def CONFIG.[](name, mandatory = false) +@@ -429,7 +429,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir @@ -237,7 +237,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1353,7 +1353,8 @@ def test_self_use_paths +@@ -1357,7 +1357,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -247,7 +247,7 @@ index b25068405d..e9fef4a311 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1429,7 +1430,7 @@ def test_self_vendor_dir +@@ -1433,7 +1434,7 @@ def test_self_vendor_dir vendordir(File.join(@tempdir, 'vendor')) do expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch index 4d81a84..1a64601 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -15,7 +15,7 @@ diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb index 1da3d93..65148a1 100644 --- a/test/fiddle/helper.rb +++ b/test/fiddle/helper.rb -@@ -6,111 +6,6 @@ +@@ -6,115 +6,6 @@ libc_so = libm_so = nil @@ -30,6 +30,10 @@ index 1da3d93..65148a1 100644 - end - libc_so = File.join(libdir, "libc.so") - libm_so = File.join(libdir, "libm.so") +-when /linux-musl/ +- Dir.glob('/lib/ld-musl-*.so.1') do |ld| +- libc_so = libm_so = ld +- end -when /linux/ - libdir = '/lib' - case RbConfig::SIZEOF['void*'] diff --git a/ruby-2.6.0-config-support-include-directive.patch b/ruby-2.6.0-config-support-include-directive.patch index 5b2024b..e709fbe 100644 --- a/ruby-2.6.0-config-support-include-directive.patch +++ b/ruby-2.6.0-config-support-include-directive.patch @@ -21,7 +21,7 @@ diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config. index 88225451..ba3a54c8 100644 --- a/ext/openssl/lib/openssl/config.rb +++ b/ext/openssl/lib/openssl/config.rb -@@ -77,29 +77,44 @@ def get_key_string(data, section, key) # :nodoc: +@@ -76,29 +76,44 @@ def get_key_string(data, section, key) # :nodoc: def parse_config_lines(io) section = 'default' data = {section => {}} @@ -78,7 +78,7 @@ index 88225451..ba3a54c8 100644 end end data -@@ -212,10 +227,10 @@ def clear_comments(line) +@@ -211,10 +226,10 @@ def clear_comments(line) scanned.join end @@ -92,7 +92,7 @@ index 88225451..ba3a54c8 100644 line += extra else break -@@ -225,9 +240,12 @@ def get_definition(io) +@@ -224,9 +239,12 @@ def get_definition(io) end end diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch index 58c92cf..81366e3 100644 --- a/ruby-2.7.0-Initialize-ABRT-hook.patch +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -15,7 +15,7 @@ To keep the things simple for now, load the ABRT hook via C. [4]: https://github.com/ruby/ruby/pull/2735 [5]: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/LH6L6YJOYQT4Y5ZNOO4SLIPTUWZ5V45Q/ --- - abrt.c | 12 ++++++++++++++ + abrt.c | 12 ++++++++++++ common.mk | 3 ++- ruby.c | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) @@ -57,7 +57,7 @@ diff --git a/ruby.c b/ruby.c index 60c57d6259..1eec16f2c8 100644 --- a/ruby.c +++ b/ruby.c -@@ -1439,10 +1439,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) +@@ -1455,10 +1455,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) void Init_builtin_features(void); diff --git a/ruby-2.7.0-Remove-RubyGems-dependency.patch b/ruby-2.7.0-Remove-RubyGems-dependency.patch index 4205217..4166900 100644 --- a/ruby-2.7.0-Remove-RubyGems-dependency.patch +++ b/ruby-2.7.0-Remove-RubyGems-dependency.patch @@ -13,7 +13,7 @@ diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b index a54be2a..06739f1 100644 --- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb -@@ -202,10 +202,10 @@ class Bundler::Persistent::Net::HTTP::Persistent +@@ -197,10 +197,10 @@ class Bundler::Persistent::Net::HTTP::Persistent ## # The default connection pool size is 1/4 the allowed open files. diff --git a/ruby.spec b/ruby.spec index 343cefa..d725f8f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,5 +1,5 @@ %global major_version 2 -%global minor_version 7 +%global minor_version 8 %global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} @@ -10,7 +10,7 @@ #%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -#%%global revision af11efd377 +%global revision 3e12b65861 %global ruby_archive %{name}-%{ruby_version} @@ -22,7 +22,7 @@ %endif -%global release 127 +%global release 1 %{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory tree, since the @@ -30,10 +30,10 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.1.2 +%global rubygems_version 3.2.0.pre1 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 2.1.2 +%global bundler_version 2.1.4 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.3.0 %global bundler_molinillo_version 0.6.6 @@ -42,19 +42,20 @@ %global bigdecimal_version 2.0.0 %global did_you_mean_version 1.4.0 -%global io_console_version 0.5.3 -%global irb_version 1.2.1 +%global io_console_version 0.5.6 +%global irb_version 1.2.3 %global json_version 2.3.0 %global minitest_version 5.13.0 %global net_telnet_version 0.2.0 -%global openssl_version 2.1.2 +%global openssl_version 2.2.0 %global power_assert_version 1.1.5 %global psych_version 3.1.0 %global racc_version 1.4.16 %global rake_version 13.0.1 %global rdoc_version 6.2.1 +%global rexml_version 3.2.3 +%global rss_version 0.2.8 %global test_unit_version 3.3.4 -%global xmlrpc_version 0.3.0 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -212,12 +213,15 @@ Provides: bundled(ccan-check_type) Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) -# Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe -# so lets obsolete it. This is not the best place, but we don't have -# better, unless https://fedorahosted.org/fpc/ticket/645 provides some -# generic solution. +# Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe. Obsoletes: ruby-tcltk < 2.4.0 +# The Net::Telnet and XMLRPC were removed in Ruby 2.8, i.e. F34 timeframe. +# https://bugs.ruby-lang.org/issues/16484 +# TODO: Update the versions prior landing in Fedora. +Obsoletes: rubygem-net-telnet < 0.2.0-%{release} +Obsoletes: rubygem-xmlrpc < 0.3.0-%{release} + %description libs This package includes the libruby, necessary to run Ruby. @@ -452,25 +456,6 @@ capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. -%package -n rubygem-net-telnet -Summary: Provides telnet client functionality -Version: %{net_telnet_version} -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(net-telnet) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-net-telnet -Provides telnet client functionality. - -This class also has, through delegation, all the methods of a socket object -(by default, a TCPSocket, but can be set by the Proxy option to new()). This -provides methods such as close() to end the session and sysread() to read data -directly from the host, instead of via the waitfor() mechanism. Note that if -you do use sysread() directly when in telnet mode, you should probably pass -the output through preprocess() to extract telnet command sequences. - - %package -n rubygem-test-unit Summary: An xUnit family unit testing framework for Ruby Version: %{test_unit_version} @@ -490,20 +475,6 @@ programming software development methodology, for Smalltalk's SUnit. It allows writing tests, checking results and automated testing in Ruby. -%package -n rubygem-xmlrpc -Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP -Version: %{xmlrpc_version} -License: Ruby or BSD -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(xmlrpc) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-xmlrpc -XMLRPC is a lightweight protocol that enables remote procedure calls over -HTTP. - - %package -n rubygem-bundler Summary: Library and utilities to manage a Ruby application's gem dependencies Version: %{bundler_version} @@ -538,6 +509,45 @@ Racc is a LALR(1) parser generator. It is written in Ruby itself, and generates Ruby program. +%package -n rubygem-rexml +Summary: An XML toolkit for Ruby +Version: %{rexml_version} +License: BSD +URL: https://github.com/ruby/rexml +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(rexml) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rexml +REXML was inspired by the Electric XML library for Java, which features an +easy-to-use API, small size, and speed. Hopefully, REXML, designed with the same +philosophy, has these same features. I've tried to keep the API as intuitive as +possible, and have followed the Ruby methodology for method naming and code +flow, rather than mirroring the Java API. + +REXML supports both tree and stream document parsing. Stream parsing is faster +(about 1.5 times as fast). However, with stream parsing, you don't get access to +features such as XPath. + + +%package -n rubygem-rss +Summary: Family of libraries that support various formats of XML "feeds" +Version: %{rss_version} +License: BSD +URL: https://github.com/ruby/rss +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(rss) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rss +Really Simple Syndication (RSS) is a family of formats that describe 'feeds', +specially constructed XML documents that allow an interested person to subscribe +and receive updates from a particular web service. This library provides tooling +to read and create these feeds. + + %prep %setup -q -n %{ruby_archive} @@ -722,14 +732,6 @@ ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so -# These have wrong shebangs. Exclude them for now and let's see what upstream -# thinks about them. -# https://bugs.ruby-lang.org/issues/15982 -rm %{buildroot}%{_bindir}/{racc2y,y2racc} -rm %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/bin/{racc2y,y2racc} -# The 'rdoc' directory is empty and useless ATM. -# https://bugs.ruby-lang.org/issues/16596 -rm -r %{buildroot}%{ruby_libdir}/racc/rdoc mkdir -p %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version} mv %{buildroot}%{ruby_libdir}/racc* %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib @@ -900,7 +902,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %license GPL %license LEGAL %doc README.md -%doc NEWS +%doc NEWS.md # Exclude /usr/local directory since it is supposed to be managed by # local system administrator. %exclude %{ruby_sitelibdir} @@ -935,16 +937,15 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/ostruct %{ruby_libdir}/pstore %{ruby_libdir}/reline -%{ruby_libdir}/rexml %{ruby_libdir}/rinda %{ruby_libdir}/ripper -%{ruby_libdir}/rss %{ruby_libdir}/singleton %{ruby_libdir}/syslog %{ruby_libdir}/timeout %{ruby_libdir}/tracer %{ruby_libdir}/unicode_normalize %{ruby_libdir}/uri +%{ruby_libdir}/weakref %{ruby_libdir}/webrick %{ruby_libdir}/yaml @@ -1076,6 +1077,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %exclude %{gem_dir}/cache/* # TODO: Gemify these libraries +%{gem_dir}/specifications/default/English-0.1.0.gemspec %{gem_dir}/specifications/default/benchmark-0.1.0.gemspec %{gem_dir}/specifications/default/cgi-0.1.0.gemspec %{gem_dir}/specifications/default/csv-3.1.2.gemspec @@ -1093,7 +1095,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/logger-1.4.2.gemspec %{gem_dir}/specifications/default/matrix-0.2.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec +%{gem_dir}/specifications/default/net-imap-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec +%{gem_dir}/specifications/default/net-protocol-0.1.0.gemspec %{gem_dir}/specifications/default/net-smtp-0.1.0.gemspec %{gem_dir}/specifications/default/observer-0.1.0.gemspec %{gem_dir}/specifications/default/open3-0.1.0.gemspec @@ -1102,16 +1106,17 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/pstore-0.1.0.gemspec %{gem_dir}/specifications/default/readline-0.0.2.gemspec %{gem_dir}/specifications/default/readline-ext-0.1.0.gemspec -%{gem_dir}/specifications/default/reline-0.1.2.gemspec -%{gem_dir}/specifications/default/rexml-3.2.3.gemspec -%{gem_dir}/specifications/default/rss-0.2.8.gemspec +%{gem_dir}/specifications/default/reline-0.1.3.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec %{gem_dir}/specifications/default/singleton-0.1.0.gemspec %{gem_dir}/specifications/default/stringio-0.1.0.gemspec %{gem_dir}/specifications/default/strscan-1.0.3.gemspec +%{gem_dir}/specifications/default/tempfile-0.1.0.gemspec %{gem_dir}/specifications/default/timeout-0.1.0.gemspec +%{gem_dir}/specifications/default/tmpdir-0.1.0.gemspec %{gem_dir}/specifications/default/tracer-0.1.0.gemspec %{gem_dir}/specifications/default/uri-0.10.0.gemspec +%{gem_dir}/specifications/default/weakref-0.1.0.gemspec %{gem_dir}/specifications/default/webrick-1.6.0.gemspec %{gem_dir}/specifications/default/yaml-0.1.0.gemspec %{gem_dir}/specifications/default/zlib-1.1.0.gemspec @@ -1201,27 +1206,10 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec -%files -n rubygem-net-telnet -%{gem_dir}/gems/net-telnet-%{net_telnet_version} -%exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.* -%{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec - %files -n rubygem-test-unit %{gem_dir}/gems/test-unit-%{test_unit_version} %{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec -%files -n rubygem-xmlrpc -%license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt -%dir %{gem_dir}/gems/xmlrpc-%{xmlrpc_version} -%exclude %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/.* -%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Gemfile -%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Rakefile -%doc %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/README.md -%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/bin -%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/lib -%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/xmlrpc.gemspec -%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec - %files -n rubygem-bundler %{_bindir}/bundle %{_bindir}/bundler @@ -1238,7 +1226,38 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/racc-%{racc_version} %{gem_dir}/specifications/racc-%{racc_version}.gemspec +%files -n rubygem-rexml +%dir %{gem_dir}/gems/rexml-%{rexml_version} +%exclude %{gem_dir}/gems/rexml-%{rexml_version}/.* +%license %{gem_dir}/gems/rexml-%{rexml_version}/LICENSE.txt +%doc %{gem_dir}/gems/rexml-%{rexml_version}/NEWS.md +%{gem_dir}/gems/rexml-%{rexml_version}/lib +%{gem_dir}/specifications/rexml-%{rexml_version}.gemspec +%doc %{gem_dir}/gems/rexml-%{rexml_version}/Gemfile +%doc %{gem_dir}/gems/rexml-%{rexml_version}/README.md +%doc %{gem_dir}/gems/rexml-%{rexml_version}/Rakefile +%doc %{gem_dir}/gems/rexml-%{rexml_version}/rexml.gemspec + +%files -n rubygem-rss +%dir %{gem_dir}/gems/rss-%{rss_version} +%exclude %{gem_dir}/gems/rss-%{rss_version}/.* +%license %{gem_dir}/gems/rss-%{rss_version}/LICENSE.txt +%doc %{gem_dir}/gems/rss-%{rss_version}/NEWS.md +%{gem_dir}/gems/rss-%{rss_version}/lib +%{gem_dir}/specifications/rss-%{rss_version}.gemspec +%doc %{gem_dir}/gems/rss-%{rss_version}/Gemfile +%doc %{gem_dir}/gems/rss-%{rss_version}/README.md +%doc %{gem_dir}/gems/rss-%{rss_version}/Rakefile +%doc %{gem_dir}/gems/rss-%{rss_version}/rss.gemspec + + %changelog +* Mon Feb 24 2020 Vít Ondruch - 2.8.0-1 +- Upgrade to Ruby 2.8.0 (af11efd377). +- Extract RSS and REXML into separate subpackages, because they were moved from + default gems to bundled gems. +- Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. + * Tue Jan 28 2020 Vít Ondruch - 2.7.0-127 - Provide StdLib links for Racc and install it by default. From 09794903d7caad52a26a484501364462ef7057d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 24 Feb 2020 16:28:58 +0100 Subject: [PATCH 02/14] Remove forgotten %{net_telnet_version} macro. --- ruby.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d725f8f..2730ff7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -46,7 +46,6 @@ %global irb_version 1.2.3 %global json_version 2.3.0 %global minitest_version 5.13.0 -%global net_telnet_version 0.2.0 %global openssl_version 2.2.0 %global power_assert_version 1.1.5 %global psych_version 3.1.0 From e940ed5d70eb4ce657b9166a3f843f54cf35d61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 25 Feb 2020 14:58:37 +0100 Subject: [PATCH 03/14] Use official `_systemtap` macros instead of custom ones. --- ruby.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2730ff7..d142c72 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,10 +56,6 @@ %global rss_version 0.2.8 %global test_unit_version 3.3.4 -# Might not be needed in the future, if we are lucky enough. -# https://bugzilla.redhat.com/show_bug.cgi?id=888262 -%global tapset_root %{_datadir}/systemtap -%global tapset_dir %{tapset_root}/tapset %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -758,11 +754,11 @@ mv %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_ma %if %{with systemtap} # Install a tapset and fix up the path to the library. -mkdir -p %{buildroot}%{tapset_dir} +mkdir -p %{buildroot}%{_systemtap_tapsetdir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ - %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp + %{SOURCE2} > %{buildroot}%{_systemtap_tapsetdir}/libruby.so.%{major_minor_version}.stp # Escape '*/' in comment. -sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp +sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{_systemtap_tapsetdir}/libruby.so.%{major_minor_version}.stp %endif # Prepare -doc subpackage file lists. @@ -1052,7 +1048,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/syslog.so %{ruby_libarchdir}/zlib.so -%{?with_systemtap:%{tapset_root}} +%{?with_systemtap:%{_systemtap_datadir}} %files -n rubygems %{_bindir}/gem From 03cd41fefd695ccde7946030eebda85c6248a230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 27 Feb 2020 12:10:24 +0100 Subject: [PATCH 04/14] Upgrade to Ruby 2.8.0 (83705c42ce). --- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +-- ruby-2.3.0-ruby_version.patch | 6 ++-- ruby-2.8.0-Fix-wrong-RegExp.patch | 27 ++++++++++++++++ ruby.spec | 32 ++++++++++++++----- 7 files changed, 59 insertions(+), 16 deletions(-) create mode 100644 ruby-2.8.0-Fix-wrong-RegExp.patch diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 387550d..329fb2c 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3125,6 +3125,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3130,6 +3130,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 62022bc..a137dd9 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3763,7 +3763,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3768,7 +3768,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 51d1cbd..053e66c 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3827,6 +3827,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3832,6 +3832,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 23010b0..b828bd9 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3799,6 +3799,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3823,6 +3827,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3828,6 +3832,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index fa0dd03..782f86c 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3714,9 +3714,6 @@ AS_CASE(["$target_os"], +@@ -3719,9 +3719,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3739,56 +3736,62 @@ AC_ARG_WITH(ridir, +@@ -3744,56 +3741,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3805,6 +3808,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3810,6 +3813,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-2.8.0-Fix-wrong-RegExp.patch b/ruby-2.8.0-Fix-wrong-RegExp.patch new file mode 100644 index 0000000..cd57646 --- /dev/null +++ b/ruby-2.8.0-Fix-wrong-RegExp.patch @@ -0,0 +1,27 @@ +From 7e96ad15894dce6a1e0b06d5981580d4644c07d3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 27 Feb 2020 07:35:40 +0100 +Subject: [PATCH] Fix wrong RegExp. + +The missing `\` in PR #2922 causes the default gems to be installed from +the .gem packages instead from the expanded sources. +--- + tool/rbinstall.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index 9cd99243a6..b1914d795b 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -894,7 +894,7 @@ def install_default_gem(dir, srcdir) + gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}" + extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir + File.foreach("#{srcdir}/gems/bundled_gems") do |name| +- next unless /^(\S+)\s+(S+).*/ =~ name ++ next unless /^(\S+)\s+(\S+).*/ =~ name + gem_name = "#$1-#$2" + path = "#{srcdir}/.bundle/gems/#{gem_name}/#$1.gemspec" + next unless File.exist?(path) +-- +2.25.0 + diff --git a/ruby.spec b/ruby.spec index d142c72..b371df5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -%global revision 3e12b65861 +%global revision 83705c42ce %global ruby_archive %{name}-%{ruby_version} @@ -45,16 +45,16 @@ %global io_console_version 0.5.6 %global irb_version 1.2.3 %global json_version 2.3.0 -%global minitest_version 5.13.0 +%global minitest_version 5.14.0 %global openssl_version 2.2.0 -%global power_assert_version 1.1.5 +%global power_assert_version 1.1.6 %global psych_version 3.1.0 %global racc_version 1.4.16 %global rake_version 13.0.1 %global rdoc_version 6.2.1 -%global rexml_version 3.2.3 -%global rss_version 0.2.8 -%global test_unit_version 3.3.4 +%global rexml_version 3.2.4 +%global rss_version 0.2.9 +%global test_unit_version 3.3.5 %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* @@ -139,6 +139,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Revert commit which breaks bundled net-http-persistent version check. # https://github.com/drbrain/net-http-persistent/pull/109 Patch10: ruby-2.7.0-Remove-RubyGems-dependency.patch +# Correctly install bundled gems from expanded sources. +# https://bugs.ruby-lang.org/issues/16656 +Patch11: ruby-2.8.0-Fix-wrong-RegExp.patch # Add support for .include directive used by OpenSSL config files. # https://github.com/ruby/openssl/pull/216 @@ -559,6 +562,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %patch22 -p1 # Provide an example of usage of the tapset: @@ -845,11 +849,20 @@ touch abrt.rb make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}" # Check if systemtap is supported. -%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE14}} +# Disable temporary: +# https://bugs.ruby-lang.org/issues/16658 +#%%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE14}} DISABLE_TESTS="" MSPECOPTS="" +# It seems that glibc-2.31.9000 comes with lchmod(2) implementation, disable +# the failing TestNotImplement#test_respond_to_lchmod test cse for now. +# https://bugs.ruby-lang.org/issues/16662 +DISABLE_TESTS="$DISABLE_TESTS -n !/test_respond_to_lchmod/" +MSPECOPTS="$MSPECOPTS -P 'File.lchmod returns false from \#respond_to?'" +MSPECOPTS="$MSPECOPTS -P 'File.lchmod raises a NotImplementedError when called'" + # Avoid `hostname' dependency. %{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"} @@ -1090,6 +1103,8 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/logger-1.4.2.gemspec %{gem_dir}/specifications/default/matrix-0.2.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec +%{gem_dir}/specifications/default/net-ftp-0.1.0.gemspec +%{gem_dir}/specifications/default/net-http-0.1.0.gemspec %{gem_dir}/specifications/default/net-imap-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec %{gem_dir}/specifications/default/net-protocol-0.1.0.gemspec @@ -1244,11 +1259,12 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %doc %{gem_dir}/gems/rss-%{rss_version}/README.md %doc %{gem_dir}/gems/rss-%{rss_version}/Rakefile %doc %{gem_dir}/gems/rss-%{rss_version}/rss.gemspec +%doc %{gem_dir}/gems/rss-%{rss_version}/test %changelog * Mon Feb 24 2020 Vít Ondruch - 2.8.0-1 -- Upgrade to Ruby 2.8.0 (af11efd377). +- Upgrade to Ruby 2.8.0 (83705c42ce). - Extract RSS and REXML into separate subpackages, because they were moved from default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. From 1f1a445441f7eb138c985dc3fd31a186eeb341eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 28 Feb 2020 16:19:20 +0100 Subject: [PATCH 05/14] Remove obsolete `%{_normalized_cpu}` macro. Last time it was used was eight years ago, removed in 91599c. --- ruby.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index b371df5..68c0ac4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -58,8 +58,6 @@ %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') - %if 0%{?fedora} >= 19 %bcond_without rubypick %endif From de82ddebfd143853d714c4902c0f1eadcdfe72db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 28 Feb 2020 17:09:21 +0100 Subject: [PATCH 06/14] Shuffle bits of .spec file around. Reorganize subpackages to keep default and bundled gems together. --- ruby.spec | 205 +++++++++++++++++++++++++++++------------------------- 1 file changed, 109 insertions(+), 96 deletions(-) diff --git a/ruby.spec b/ruby.spec index 68c0ac4..39a0a64 100644 --- a/ruby.spec +++ b/ruby.spec @@ -33,6 +33,7 @@ %global rubygems_version 3.2.0.pre1 %global rubygems_molinillo_version 0.5.7 +# Default gems. %global bundler_version 2.1.4 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.3.0 @@ -45,16 +46,18 @@ %global io_console_version 0.5.6 %global irb_version 1.2.3 %global json_version 2.3.0 -%global minitest_version 5.14.0 %global openssl_version 2.2.0 -%global power_assert_version 1.1.6 %global psych_version 3.1.0 %global racc_version 1.4.16 -%global rake_version 13.0.1 %global rdoc_version 6.2.1 + +# Bundled gems. +%global minitest_version 5.14.0 +%global power_assert_version 1.1.6 +%global rake_version 13.0.1 +%global test_unit_version 3.3.5 %global rexml_version 3.2.4 %global rss_version 0.2.9 -%global test_unit_version 3.3.5 %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* @@ -259,20 +262,10 @@ BuildArch: noarch Macros and development tools for packaging RubyGems. -%package -n rubygem-rake -Summary: Ruby based make-like utility -Version: %{rake_version} -License: MIT -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rake = %{version}-%{release} -Provides: rubygem(rake) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-rake -Rake is a Make-like program implemented in Ruby. Tasks and dependencies are -specified in standard Ruby syntax. - +# Default gems +# +# These packages are part of Ruby StdLib and are expected to be loadable even +# with disabled RubyGems. %package -n rubygem-irb Summary: The Interactive Ruby @@ -385,30 +378,6 @@ data to disk or transmit it over a network rather than use a verbose markup language. -%package -n rubygem-minitest -Summary: Minitest provides a complete suite of testing facilities -Version: %{minitest_version} -License: MIT -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(minitest) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-minitest -minitest/unit is a small and incredibly fast unit testing framework. - -minitest/spec is a functionally complete spec engine. - -minitest/benchmark is an awesome way to assert the performance of your -algorithms in a repeatable manner. - -minitest/mock by Steven Baker, is a beautifully tiny mock object -framework. - -minitest/pride shows pride in testing and adds coloring to your test -output. - - %package -n rubygem-openssl Summary: OpenSSL provides SSL, TLS and general purpose cryptography Version: %{openssl_version} @@ -422,21 +391,6 @@ OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the OpenSSL library. -%package -n rubygem-power_assert -Summary: Power Assert for Ruby -Version: %{power_assert_version} -License: Ruby or BSD -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(power_assert) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-power_assert -Power Assert shows each value of variables and method calls in the expression. -It is useful for testing, providing which value wasn't correct when the -condition is not satisfied. - - %package -n rubygem-psych Summary: A libyaml wrapper for Ruby Version: %{psych_version} @@ -452,25 +406,6 @@ capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. -%package -n rubygem-test-unit -Summary: An xUnit family unit testing framework for Ruby -Version: %{test_unit_version} -# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. -# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. -License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Requires: rubygem(power_assert) -Provides: rubygem(test-unit) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-test-unit -Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit -principles. These were originally designed by Kent Beck, creator of extreme -programming software development methodology, for Smalltalk's SUnit. It allows -writing tests, checking results and automated testing in Ruby. - - %package -n rubygem-bundler Summary: Library and utilities to manage a Ruby application's gem dependencies Version: %{bundler_version} @@ -505,6 +440,84 @@ Racc is a LALR(1) parser generator. It is written in Ruby itself, and generates Ruby program. +# Bundled gems +# +# These are regular packages, which might be installed just optionally. Users +# should list them among their dependencies (in Gemfile). + +%package -n rubygem-minitest +Summary: Minitest provides a complete suite of testing facilities +Version: %{minitest_version} +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(minitest) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-minitest +minitest/unit is a small and incredibly fast unit testing framework. + +minitest/spec is a functionally complete spec engine. + +minitest/benchmark is an awesome way to assert the performance of your +algorithms in a repeatable manner. + +minitest/mock by Steven Baker, is a beautifully tiny mock object +framework. + +minitest/pride shows pride in testing and adds coloring to your test +output. + + +%package -n rubygem-power_assert +Summary: Power Assert for Ruby +Version: %{power_assert_version} +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(power_assert) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-power_assert +Power Assert shows each value of variables and method calls in the expression. +It is useful for testing, providing which value wasn't correct when the +condition is not satisfied. + + +%package -n rubygem-rake +Summary: Ruby based make-like utility +Version: %{rake_version} +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rake = %{version}-%{release} +Provides: rubygem(rake) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rake +Rake is a Make-like program implemented in Ruby. Tasks and dependencies are +specified in standard Ruby syntax. + + +%package -n rubygem-test-unit +Summary: An xUnit family unit testing framework for Ruby +Version: %{test_unit_version} +# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. +# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. +License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Requires: rubygem(power_assert) +Provides: rubygem(test-unit) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-test-unit +Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit +principles. These were originally designed by Kent Beck, creator of extreme +programming software development methodology, for Smalltalk's SUnit. It allows +writing tests, checking results and automated testing in Ruby. + + %package -n rubygem-rexml Summary: An XML toolkit for Ruby Version: %{rexml_version} @@ -1136,12 +1149,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_rpmconfigdir}/rubygems.prov %{_rpmconfigdir}/rubygems.con -%files -n rubygem-rake -%{_bindir}/rake -%{gem_dir}/gems/rake-%{rake_version} -%{gem_dir}/specifications/rake-%{rake_version}.gemspec -%{_mandir}/man1/rake.1* - %files -n rubygem-irb %{_bindir}/irb %{ruby_libdir}/irb* @@ -1188,11 +1195,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/json-%{json_version} %{gem_dir}/specifications/json-%{json_version}.gemspec -%files -n rubygem-minitest -%{gem_dir}/gems/minitest-%{minitest_version} -%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* -%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec - %files -n rubygem-openssl %{ruby_libdir}/openssl %{ruby_libdir}/openssl.rb @@ -1201,11 +1203,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/openssl-%{openssl_version} %{gem_dir}/specifications/openssl-%{openssl_version}.gemspec -%files -n rubygem-power_assert -%{gem_dir}/gems/power_assert-%{power_assert_version} -%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.* -%{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec - %files -n rubygem-psych %{ruby_libdir}/psych %{ruby_libdir}/psych.rb @@ -1214,10 +1211,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec -%files -n rubygem-test-unit -%{gem_dir}/gems/test-unit-%{test_unit_version} -%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec - %files -n rubygem-bundler %{_bindir}/bundle %{_bindir}/bundler @@ -1234,6 +1227,26 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/racc-%{racc_version} %{gem_dir}/specifications/racc-%{racc_version}.gemspec +%files -n rubygem-minitest +%{gem_dir}/gems/minitest-%{minitest_version} +%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* +%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + +%files -n rubygem-power_assert +%{gem_dir}/gems/power_assert-%{power_assert_version} +%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.* +%{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec + +%files -n rubygem-rake +%{_bindir}/rake +%{gem_dir}/gems/rake-%{rake_version} +%{gem_dir}/specifications/rake-%{rake_version}.gemspec +%{_mandir}/man1/rake.1* + +%files -n rubygem-test-unit +%{gem_dir}/gems/test-unit-%{test_unit_version} +%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec + %files -n rubygem-rexml %dir %{gem_dir}/gems/rexml-%{rexml_version} %exclude %{gem_dir}/gems/rexml-%{rexml_version}/.* From 2cb1f7b4f0aace31f7c9a6bc421b3a247a6f7a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 16 Mar 2020 18:56:03 +0100 Subject: [PATCH 07/14] Properly own BigDecimal files. --- ruby.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 39a0a64..4aa6adf 100644 --- a/ruby.spec +++ b/ruby.spec @@ -933,6 +933,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" # Platform independent libraries. %dir %{ruby_libdir} %{ruby_libdir}/*.rb +%exclude %{ruby_libdir}/bigdecimal.rb %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/json.rb %exclude %{ruby_libdir}/openssl.rb @@ -1170,7 +1171,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_datadir}/ri %files -n rubygem-bigdecimal -%{ruby_libdir}/bigdecimal +%{ruby_libdir}/bigdecimal* %{ruby_libarchdir}/bigdecimal* %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} %{gem_dir}/gems/bigdecimal-%{bigdecimal_version} From 33bcda5dc3b5d0da9ba0f67cc493461e7b00c685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Mar 2020 15:34:39 +0100 Subject: [PATCH 08/14] Be more strict about StdLib content. --- ruby.spec | 98 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 32 deletions(-) diff --git a/ruby.spec b/ruby.spec index 4aa6adf..f7935c7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -932,42 +932,76 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" # List all these files explicitly to prevent surprises # Platform independent libraries. %dir %{ruby_libdir} -%{ruby_libdir}/*.rb -%exclude %{ruby_libdir}/bigdecimal.rb -%exclude %{ruby_libdir}/irb.rb -%exclude %{ruby_libdir}/json.rb -%exclude %{ruby_libdir}/openssl.rb -%exclude %{ruby_libdir}/psych.rb -%exclude %{ruby_libdir}/racc.rb -%{ruby_libdir}/benchmark -%{ruby_libdir}/cgi -%{ruby_libdir}/csv -%{ruby_libdir}/delegate -%{ruby_libdir}/digest -%{ruby_libdir}/drb -%{ruby_libdir}/fiddle -%{ruby_libdir}/forwardable -%{ruby_libdir}/getoptlong -%{ruby_libdir}/logger -%{ruby_libdir}/matrix +%exclude %{ruby_libdir}/bigdecimal* +%exclude %{ruby_libdir}/irb* +%exclude %{ruby_libdir}/json* +%exclude %{ruby_libdir}/openssl* +%exclude %{ruby_libdir}/psych* +%exclude %{ruby_libdir}/racc* +%{ruby_libdir}/abbrev.rb +%{ruby_libdir}/base64.rb +%{ruby_libdir}/benchmark* +%{ruby_libdir}/cgi* +%{ruby_libdir}/coverage.rb +%{ruby_libdir}/csv* +%{ruby_libdir}/date.rb +%{ruby_libdir}/debug.rb +%{ruby_libdir}/delegate* +%{ruby_libdir}/digest* +%{ruby_libdir}/drb* +%{ruby_libdir}/English.rb +%{ruby_libdir}/erb.rb +%{ruby_libdir}/expect.rb +%{ruby_libdir}/fiddle* +%{ruby_libdir}/fileutils.rb +%{ruby_libdir}/find.rb +%{ruby_libdir}/forwardable* +%{ruby_libdir}/getoptlong* +%{ruby_libdir}/io +%{ruby_libdir}/ipaddr.rb +%{ruby_libdir}/kconv.rb +%{ruby_libdir}/logger* +%{ruby_libdir}/matrix* +%{ruby_libdir}/mkmf.rb +%{ruby_libdir}/monitor.rb +%{ruby_libdir}/mutex_m.rb %{ruby_libdir}/net -%{ruby_libdir}/observer -%{ruby_libdir}/open3 -%{ruby_libdir}/optparse -%{ruby_libdir}/ostruct -%{ruby_libdir}/pstore -%{ruby_libdir}/reline +%{ruby_libdir}/observer* +%{ruby_libdir}/open-uri.rb +%{ruby_libdir}/open3* +%{ruby_libdir}/optionparser.rb +%{ruby_libdir}/optparse* +%{ruby_libdir}/ostruct* +%{ruby_libdir}/pathname.rb +%{ruby_libdir}/pp.rb +%{ruby_libdir}/prettyprint.rb +%{ruby_libdir}/prime.rb +%{ruby_libdir}/pstore* +%{ruby_libdir}/readline.rb +%{ruby_libdir}/reline* +%{ruby_libdir}/resolv.rb +%{ruby_libdir}/resolv-replace.rb %{ruby_libdir}/rinda -%{ruby_libdir}/ripper -%{ruby_libdir}/singleton +%{ruby_libdir}/ripper* +%{ruby_libdir}/rss.rb +%{ruby_libdir}/securerandom.rb +%{ruby_libdir}/set.rb +%{ruby_libdir}/shellwords.rb +%{ruby_libdir}/singleton* +%{ruby_libdir}/socket.rb %{ruby_libdir}/syslog -%{ruby_libdir}/timeout -%{ruby_libdir}/tracer +%{ruby_libdir}/tempfile.rb +%{ruby_libdir}/timeout* +%{ruby_libdir}/time.rb +%{ruby_libdir}/tmpdir.rb +%{ruby_libdir}/tracer* +%{ruby_libdir}/tsort.rb %{ruby_libdir}/unicode_normalize -%{ruby_libdir}/uri -%{ruby_libdir}/weakref -%{ruby_libdir}/webrick -%{ruby_libdir}/yaml +%{ruby_libdir}/un.rb +%{ruby_libdir}/uri* +%{ruby_libdir}/weakref* +%{ruby_libdir}/webrick* +%{ruby_libdir}/yaml* # Platform specific libraries. %{_libdir}/libruby.so.* From 9c0a1cb6505e30f73de274ed29fb93a700382553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 Mar 2020 18:38:59 +0100 Subject: [PATCH 09/14] Add ruby-default-gems subpackage shipping all extra default gem content. --- ruby.spec | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index f7935c7..88d1016 100644 --- a/ruby.spec +++ b/ruby.spec @@ -267,6 +267,17 @@ Macros and development tools for packaging RubyGems. # These packages are part of Ruby StdLib and are expected to be loadable even # with disabled RubyGems. +%package default-gems +Summary: Default gems which are part of Ruby StdLib. +Requires: ruby(rubygems) >= %{rubygems_version} +Supplements: ruby(rubygems) +BuildArch: noarch + +%description default-gems +The .gemspec files and executables of default gems, which are part of Ruby +StdLib. + + %package -n rubygem-irb Summary: The Interactive Ruby Version: %{irb_version} @@ -1130,7 +1141,14 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %exclude %{gem_dir}/cache/* -# TODO: Gemify these libraries +%files -n rubygems-devel +%{_rpmconfigdir}/macros.d/macros.rubygems +%{_rpmconfigdir}/fileattrs/rubygems.attr +%{_rpmconfigdir}/rubygems.req +%{_rpmconfigdir}/rubygems.prov +%{_rpmconfigdir}/rubygems.con + +%files default-gems %{gem_dir}/specifications/default/English-0.1.0.gemspec %{gem_dir}/specifications/default/benchmark-0.1.0.gemspec %{gem_dir}/specifications/default/cgi-0.1.0.gemspec @@ -1177,12 +1195,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/yaml-0.1.0.gemspec %{gem_dir}/specifications/default/zlib-1.1.0.gemspec -%files -n rubygems-devel -%{_rpmconfigdir}/macros.d/macros.rubygems -%{_rpmconfigdir}/fileattrs/rubygems.attr -%{_rpmconfigdir}/rubygems.req -%{_rpmconfigdir}/rubygems.prov -%{_rpmconfigdir}/rubygems.con %files -n rubygem-irb %{_bindir}/irb @@ -1314,6 +1326,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" - Extract RSS and REXML into separate subpackages, because they were moved from default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. +- Add ruby-default-gems subpackage shipping all extra default gem content. * Tue Jan 28 2020 Vít Ondruch - 2.7.0-127 - Provide StdLib links for Racc and install it by default. From cdc6dd71a2659ae26f2be75349f5baad9ac63a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 30 Mar 2020 17:39:57 +0200 Subject: [PATCH 10/14] Bundle Racc into StdLib. It is increasingly hard to maintain default gems extracted from StdLib into gems. If they are overlapped by independent versions, it is even harder, because the overlapped versions would need to provide symlinks back to StdLib \[[1]\]. On top of that, the layout differs from upstream, where default gems are always available. Because these small nuances can make hard discoverable race conditions during Ruby application loading and runtime, it will be best to keep the default gems bundled. [1]: https://src.fedoraproject.org/rpms/rubygem-racc/pull-request/1 --- ruby.spec | 58 ++++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/ruby.spec b/ruby.spec index 88d1016..5055702 100644 --- a/ruby.spec +++ b/ruby.spec @@ -156,7 +156,6 @@ Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} # https://bugs.ruby-lang.org/issues/16431 Requires: rubygem(did_you_mean) >= %{did_you_mean_version} Recommends: rubygem(openssl) >= %{openssl_version} -Recommends: rubygem(racc) >= %{racc_version} BuildRequires: autoconf BuildRequires: gdbm-devel @@ -212,6 +211,9 @@ Provides: bundled(ccan-check_type) Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) +# StdLib default gems. +Provides: bundled(rubygem-racc) = %{racc_version} + # Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe. Obsoletes: ruby-tcltk < 2.4.0 @@ -271,6 +273,8 @@ Macros and development tools for packaging RubyGems. Summary: Default gems which are part of Ruby StdLib. Requires: ruby(rubygems) >= %{rubygems_version} Supplements: ruby(rubygems) +# Obsoleted by Ruby 2.7 in F32 timeframe. +Obsoletes: rubygem-racc < 1.4.16-130 BuildArch: noarch %description default-gems @@ -438,19 +442,6 @@ Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably. -%package -n rubygem-racc -Summary: Racc is a LALR(1) parser generator -Version: %{racc_version} -License: MIT -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(racc) = %{version}-%{release} - -%description -n rubygem-racc -Racc is a LALR(1) parser generator. It is written in Ruby itself, and -generates Ruby program. - - # Bundled gems # # These are regular packages, which might be installed just optionally. Users @@ -753,22 +744,6 @@ ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so -mkdir -p %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version} -mv %{buildroot}%{ruby_libdir}/racc* %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib -mv %{buildroot}%{ruby_libarchdir}/racc/ %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/ -touch %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/gem.build_complete -mv %{buildroot}%{gem_dir}/specifications/default/racc-%{racc_version}.gemspec %{buildroot}%{gem_dir}/specifications -# This used to be directories when racc was integral part of StdLib => Keep -# them as directories and link everything in them to prevent directory => -# symlink conversion RPM issues. -mkdir -p %{buildroot}%{ruby_libdir}/racc -mkdir -p %{buildroot}%{ruby_libarchdir}/racc -find %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib/racc -maxdepth 1 -type f -exec \ - sh -c 'ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc/`basename {}` %{buildroot}%{ruby_libdir}/racc' \; -ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc.rb %{buildroot}%{ruby_libdir}/racc.rb -ln -s %{_libdir}/gems/%{name}/racc-%{racc_version}/racc/cparse.so %{buildroot}%{ruby_libarchdir}/racc/cparse.so - # Move the binary extensions into proper place (if no gem has binary extension, # the extensions directory might be empty). find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \ @@ -948,7 +923,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %exclude %{ruby_libdir}/json* %exclude %{ruby_libdir}/openssl* %exclude %{ruby_libdir}/psych* -%exclude %{ruby_libdir}/racc* %{ruby_libdir}/abbrev.rb %{ruby_libdir}/base64.rb %{ruby_libdir}/benchmark* @@ -1118,6 +1092,11 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/syslog.so %{ruby_libarchdir}/zlib.so +# Default gems +%{ruby_libdir}/racc* +%dir %{ruby_libarchdir}/racc +%{ruby_libarchdir}/racc/cparse.so + %{?with_systemtap:%{_systemtap_datadir}} %files -n rubygems @@ -1178,6 +1157,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/ostruct-0.2.0.gemspec %{gem_dir}/specifications/default/prime-0.1.1.gemspec %{gem_dir}/specifications/default/pstore-0.1.0.gemspec +%{gem_dir}/specifications/default/racc-%{racc_version}.gemspec %{gem_dir}/specifications/default/readline-0.0.2.gemspec %{gem_dir}/specifications/default/readline-ext-0.1.0.gemspec %{gem_dir}/specifications/default/reline-0.1.3.gemspec @@ -1195,6 +1175,13 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/yaml-0.1.0.gemspec %{gem_dir}/specifications/default/zlib-1.1.0.gemspec +# Use standalone rubygem-racc if Racc binary is required. Shipping this +# executable in both packages might possibly cause conflicts. The situation +# could be better if Ruby generated these files: +# https://github.com/ruby/ruby/pull/2545 +%exclude %{_bindir}/racc +%{gem_dir}/gems/racc-%{racc_version} + %files -n rubygem-irb %{_bindir}/irb @@ -1266,14 +1253,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_mandir}/man1/bundle*.1* %{_mandir}/man5/gemfile.5* -%files -n rubygem-racc -%{ruby_libdir}/racc* -%{ruby_libarchdir}/racc -%{_bindir}/racc -%{_libdir}/gems/%{name}/racc-%{racc_version} -%{gem_dir}/gems/racc-%{racc_version} -%{gem_dir}/specifications/racc-%{racc_version}.gemspec - %files -n rubygem-minitest %{gem_dir}/gems/minitest-%{minitest_version} %exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* @@ -1327,6 +1306,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. - Add ruby-default-gems subpackage shipping all extra default gem content. +- Bundle Racc into StdLib. * Tue Jan 28 2020 Vít Ondruch - 2.7.0-127 - Provide StdLib links for Racc and install it by default. From 45186be1b91e847fe4ef283e0db4416d0376f733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Apr 2020 20:11:19 +0200 Subject: [PATCH 11/14] Upgrade to Ruby 2.8.0 (810d66f3e7). --- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 16 +- ruby-2.3.0-ruby_version.patch | 8 +- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 122 +----------- ...6.0-config-support-include-directive.patch | 182 ------------------ ruby-2.8.0-Fix-wrong-RegExp.patch | 27 --- ruby.spec | 29 +-- 9 files changed, 32 insertions(+), 358 deletions(-) delete mode 100644 ruby-2.6.0-config-support-include-directive.patch delete mode 100644 ruby-2.8.0-Fix-wrong-RegExp.patch diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 329fb2c..9c2e3ae 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3130,6 +3130,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3134,6 +3134,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index a137dd9..5e0d286 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3768,7 +3768,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3772,7 +3772,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 053e66c..665783c 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3832,6 +3832,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3836,6 +3836,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index b828bd9..d82eb91 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3808,6 +3808,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3828,6 +3832,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3832,6 +3836,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -64,18 +64,18 @@ index 79c003e..34f2382 100644 % R = {} % R["ruby_version"] = '"RUBY_LIB_VERSION"' diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index b47b6e1..0b99408 100755 +index e9110a17ca..76a1f0a315 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -339,6 +339,7 @@ def CONFIG.[](name, mandatory = false) - sitearchlibdir = CONFIG["sitearchdir"] - vendorlibdir = CONFIG["vendorlibdir"] - vendorarchlibdir = CONFIG["vendorarchdir"] +@@ -343,6 +343,7 @@ def CONFIG.[](name, mandatory = false) + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] + end +rubygemsdir = CONFIG["rubygemsdir"] mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -566,7 +567,16 @@ def stub +@@ -570,7 +571,16 @@ def stub install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 782f86c..82830c7 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3719,9 +3719,6 @@ AS_CASE(["$target_os"], +@@ -3723,9 +3723,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3744,56 +3741,62 @@ AC_ARG_WITH(ridir, +@@ -3748,56 +3745,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3810,6 +3813,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3814,6 +3817,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index d4c110e..d39c9a6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -429,7 +429,7 @@ def CONFIG.[](name, mandatory = false) +@@ -433,7 +433,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch index 1a64601..59663d7 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -8,126 +8,20 @@ on Red Hat platforms. This workaround rhbz#1361037 --- - test/fiddle/helper.rb | 105 ------------------------------------------ - 1 file changed, 105 deletions(-) + test/fiddle/helper.rb | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb index 1da3d93..65148a1 100644 --- a/test/fiddle/helper.rb +++ b/test/fiddle/helper.rb -@@ -6,115 +6,6 @@ +@@ -123,6 +123,9 @@ + libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) + libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) - libc_so = libm_so = nil - --case RUBY_PLATFORM --when /cygwin/ -- libc_so = "cygwin1.dll" -- libm_so = "cygwin1.dll" --when /android/ -- libdir = '/system/lib' -- if [0].pack('L!').size == 8 -- libdir = '/system/lib64' -- end -- libc_so = File.join(libdir, "libc.so") -- libm_so = File.join(libdir, "libm.so") --when /linux-musl/ -- Dir.glob('/lib/ld-musl-*.so.1') do |ld| -- libc_so = libm_so = ld -- end --when /linux/ -- libdir = '/lib' -- case RbConfig::SIZEOF['void*'] -- when 4 -- # 32-bit ruby -- case RUBY_PLATFORM -- when /armv\w+-linux/ -- # In the ARM 32-bit libc package such as libc6:armhf libc6:armel, -- # libc.so and libm.so are installed to /lib/arm-linux-gnu*. -- # It's not installed to /lib32. -- dirs = Dir.glob('/lib/arm-linux-gnu*') -- libdir = dirs[0] if dirs && File.directory?(dirs[0]) -- else -- libdir = '/lib32' if File.directory? '/lib32' -- end -- when 8 -- # 64-bit ruby -- libdir = '/lib64' if File.directory? '/lib64' -- end -- libc_so = File.join(libdir, "libc.so.6") -- libm_so = File.join(libdir, "libm.so.6") --when /mingw/, /mswin/ -- require "rbconfig" -- crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' -- libc_so = libm_so = "#{crtname}.dll" --when /darwin/ -- libc_so = "/usr/lib/libc.dylib" -- libm_so = "/usr/lib/libm.dylib" --when /kfreebsd/ -- libc_so = "/lib/libc.so.0.1" -- libm_so = "/lib/libm.so.1" --when /gnu/ #GNU/Hurd -- libc_so = "/lib/libc.so.0.3" -- libm_so = "/lib/libm.so.6" --when /mirbsd/ -- libc_so = "/usr/lib/libc.so.41.10" -- libm_so = "/usr/lib/libm.so.7.0" --when /freebsd/ -- libc_so = "/lib/libc.so.7" -- libm_so = "/lib/libm.so.5" --when /bsd|dragonfly/ -- libc_so = "/usr/lib/libc.so" -- libm_so = "/usr/lib/libm.so" --when /solaris/ -- libdir = '/lib' -- case RbConfig::SIZEOF['void*'] -- when 4 -- # 32-bit ruby -- libdir = '/lib' if File.directory? '/lib' -- when 8 -- # 64-bit ruby -- libdir = '/lib/64' if File.directory? '/lib/64' -- end -- libc_so = File.join(libdir, "libc.so") -- libm_so = File.join(libdir, "libm.so") --when /aix/ -- pwd=Dir.pwd -- libc_so = libm_so = "#{pwd}/libaixdltest.so" -- unless File.exist? libc_so -- cobjs=%w!strcpy.o! -- mobjs=%w!floats.o sin.o! -- funcs=%w!sin sinf strcpy strncpy! -- expfile='dltest.exp' -- require 'tmpdir' -- Dir.mktmpdir do |dir| -- begin -- Dir.chdir dir -- %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! -- %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! -- %x!echo "#{funcs.join("\n")}\n" > #{expfile}! -- require 'rbconfig' -- if RbConfig::CONFIG["GCC"] = 'yes' -- lflag='-Wl,' -- else -- lflag='' -- end -- flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" -- %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! -- ensure -- Dir.chdir pwd -- end -- end -- end --else -- libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ -- libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ -- if( !(libc_so && libm_so) ) -- $stderr.puts("libc and libm not found: #{$0} ") -- end --end -- --libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) --libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) -- ++# Just ignore the heuristic, because it is not reliable on all platforms. ++libc_so = libm_so = nil ++ if !libc_so || !libm_so ruby = EnvUtil.rubybin # When the ruby binary is 32-bit and the host is 64-bit, diff --git a/ruby-2.6.0-config-support-include-directive.patch b/ruby-2.6.0-config-support-include-directive.patch deleted file mode 100644 index e709fbe..0000000 --- a/ruby-2.6.0-config-support-include-directive.patch +++ /dev/null @@ -1,182 +0,0 @@ -From f46bac1f3e8634e24c747d06b28e11b874f1e488 Mon Sep 17 00:00:00 2001 -From: Kazuki Yamaguchi -Date: Thu, 16 Aug 2018 19:40:48 +0900 -Subject: [PATCH] config: support .include directive - -OpenSSL 1.1.1 introduces a new '.include' directive. Update our config -parser to support that. - -As mentioned in the referenced GitHub issue, we should use the OpenSSL -API instead of implementing the parsing logic ourselves, but it will -need backwards-incompatible changes which we can't backport to stable -versions. So continue to use the Ruby implementation for now. - -Reference: https://github.com/ruby/openssl/issues/208 ---- - ext/openssl/lib/openssl/config.rb | 54 ++++++++++++++++++++----------- - test/openssl/test_config.rb | 54 +++++++++++++++++++++++++++++++ - 2 files changed, 90 insertions(+), 18 deletions(-) - -diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config.rb -index 88225451..ba3a54c8 100644 ---- a/ext/openssl/lib/openssl/config.rb -+++ b/ext/openssl/lib/openssl/config.rb -@@ -76,29 +76,44 @@ def get_key_string(data, section, key) # :nodoc: - def parse_config_lines(io) - section = 'default' - data = {section => {}} -- while definition = get_definition(io) -+ io_stack = [io] -+ while definition = get_definition(io_stack) - definition = clear_comments(definition) - next if definition.empty? -- if definition[0] == ?[ -+ case definition -+ when /\A\[/ - if /\[([^\]]*)\]/ =~ definition - section = $1.strip - data[section] ||= {} - else - raise ConfigError, "missing close square bracket" - end -- else -- if /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/ =~ definition -- if $2 -- section = $1 -- key = $2 -- else -- key = $1 -+ when /\A\.include (\s*=\s*)?(.+)\z/ -+ path = $2 -+ if File.directory?(path) -+ files = Dir.glob(File.join(path, "*.{cnf,conf}"), File::FNM_EXTGLOB) -+ else -+ files = [path] -+ end -+ -+ files.each do |filename| -+ begin -+ io_stack << StringIO.new(File.read(filename)) -+ rescue -+ raise ConfigError, "could not include file '%s'" % filename - end -- value = unescape_value(data, section, $3) -- (data[section] ||= {})[key] = value.strip -+ end -+ when /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/ -+ if $2 -+ section = $1 -+ key = $2 - else -- raise ConfigError, "missing equal sign" -+ key = $1 - end -+ value = unescape_value(data, section, $3) -+ (data[section] ||= {})[key] = value.strip -+ else -+ raise ConfigError, "missing equal sign" - end - end - data -@@ -211,10 +226,10 @@ def clear_comments(line) - scanned.join - end - -- def get_definition(io) -- if line = get_line(io) -+ def get_definition(io_stack) -+ if line = get_line(io_stack) - while /[^\\]\\\z/ =~ line -- if extra = get_line(io) -+ if extra = get_line(io_stack) - line += extra - else - break -@@ -224,9 +239,12 @@ def get_definition(io) - end - end - -- def get_line(io) -- if line = io.gets -- line.gsub(/[\r\n]*/, '') -+ def get_line(io_stack) -+ while io = io_stack.last -+ if line = io.gets -+ return line.gsub(/[\r\n]*/, '') -+ end -+ io_stack.pop - end - end - end -diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb -index 99dcc497..5653b5d0 100644 ---- a/test/openssl/test_config.rb -+++ b/test/openssl/test_config.rb -@@ -120,6 +120,49 @@ def test_s_parse_format - assert_equal("error in line 7: missing close square bracket", excn.message) - end - -+ def test_s_parse_include -+ in_tmpdir("ossl-config-include-test") do |dir| -+ Dir.mkdir("child") -+ File.write("child/a.conf", <<~__EOC__) -+ [default] -+ file-a = a.conf -+ [sec-a] -+ a = 123 -+ __EOC__ -+ File.write("child/b.cnf", <<~__EOC__) -+ [default] -+ file-b = b.cnf -+ [sec-b] -+ b = 123 -+ __EOC__ -+ File.write("include-child.conf", <<~__EOC__) -+ key_outside_section = value_a -+ .include child -+ __EOC__ -+ -+ include_file = <<~__EOC__ -+ [default] -+ file-main = unnamed -+ [sec-main] -+ main = 123 -+ .include = include-child.conf -+ __EOC__ -+ -+ # Include a file by relative path -+ c1 = OpenSSL::Config.parse(include_file) -+ assert_equal(["default", "sec-a", "sec-b", "sec-main"], c1.sections.sort) -+ assert_equal(["file-main", "file-a", "file-b"], c1["default"].keys) -+ assert_equal({"a" => "123"}, c1["sec-a"]) -+ assert_equal({"b" => "123"}, c1["sec-b"]) -+ assert_equal({"main" => "123", "key_outside_section" => "value_a"}, c1["sec-main"]) -+ -+ # Relative paths are from the working directory -+ assert_raise(OpenSSL::ConfigError) do -+ Dir.chdir("child") { OpenSSL::Config.parse(include_file) } -+ end -+ end -+ end -+ - def test_s_load - # alias of new - c = OpenSSL::Config.load -@@ -299,6 +342,17 @@ def test_clone - @it['newsection'] = {'a' => 'b'} - assert_not_equal(@it.sections.sort, c.sections.sort) - end -+ -+ private -+ -+ def in_tmpdir(*args) -+ Dir.mktmpdir(*args) do |dir| -+ dir = File.realpath(dir) -+ Dir.chdir(dir) do -+ yield dir -+ end -+ end -+ end - end - - end diff --git a/ruby-2.8.0-Fix-wrong-RegExp.patch b/ruby-2.8.0-Fix-wrong-RegExp.patch deleted file mode 100644 index cd57646..0000000 --- a/ruby-2.8.0-Fix-wrong-RegExp.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 7e96ad15894dce6a1e0b06d5981580d4644c07d3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 27 Feb 2020 07:35:40 +0100 -Subject: [PATCH] Fix wrong RegExp. - -The missing `\` in PR #2922 causes the default gems to be installed from -the .gem packages instead from the expanded sources. ---- - tool/rbinstall.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 9cd99243a6..b1914d795b 100755 ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -894,7 +894,7 @@ def install_default_gem(dir, srcdir) - gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}" - extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir - File.foreach("#{srcdir}/gems/bundled_gems") do |name| -- next unless /^(\S+)\s+(S+).*/ =~ name -+ next unless /^(\S+)\s+(\S+).*/ =~ name - gem_name = "#$1-#$2" - path = "#{srcdir}/.bundle/gems/#{gem_name}/#$1.gemspec" - next unless File.exist?(path) --- -2.25.0 - diff --git a/ruby.spec b/ruby.spec index 5055702..0819949 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -%global revision 83705c42ce +%global revision 810d66f3e7 %global ruby_archive %{name}-%{ruby_version} @@ -48,12 +48,12 @@ %global json_version 2.3.0 %global openssl_version 2.2.0 %global psych_version 3.1.0 -%global racc_version 1.4.16 +%global racc_version 1.5.0 %global rdoc_version 6.2.1 # Bundled gems. %global minitest_version 5.14.0 -%global power_assert_version 1.1.6 +%global power_assert_version 1.1.7 %global rake_version 13.0.1 %global test_unit_version 3.3.5 %global rexml_version 3.2.4 @@ -140,13 +140,6 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Revert commit which breaks bundled net-http-persistent version check. # https://github.com/drbrain/net-http-persistent/pull/109 Patch10: ruby-2.7.0-Remove-RubyGems-dependency.patch -# Correctly install bundled gems from expanded sources. -# https://bugs.ruby-lang.org/issues/16656 -Patch11: ruby-2.8.0-Fix-wrong-RegExp.patch - -# Add support for .include directive used by OpenSSL config files. -# https://github.com/ruby/openssl/pull/216 -Patch22: ruby-2.6.0-config-support-include-directive.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -575,8 +568,6 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 -%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -853,12 +844,10 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}" DISABLE_TESTS="" MSPECOPTS="" -# It seems that glibc-2.31.9000 comes with lchmod(2) implementation, disable -# the failing TestNotImplement#test_respond_to_lchmod test cse for now. -# https://bugs.ruby-lang.org/issues/16662 -DISABLE_TESTS="$DISABLE_TESTS -n !/test_respond_to_lchmod/" -MSPECOPTS="$MSPECOPTS -P 'File.lchmod returns false from \#respond_to?'" -MSPECOPTS="$MSPECOPTS -P 'File.lchmod raises a NotImplementedError when called'" +# It seems that glibc-2.31.9000 comes with lchmod(2) implementation, but it +# does not support symlinks. +# https://bugs.ruby-lang.org/issues/16756 +MSPECOPTS="$MSPECOPTS -P 'File.lchmod changes the file mode of the link and not of the file'" # Avoid `hostname' dependency. %{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"} @@ -1163,7 +1152,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/reline-0.1.3.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec %{gem_dir}/specifications/default/singleton-0.1.0.gemspec -%{gem_dir}/specifications/default/stringio-0.1.0.gemspec +%{gem_dir}/specifications/default/stringio-0.1.1.gemspec %{gem_dir}/specifications/default/strscan-1.0.3.gemspec %{gem_dir}/specifications/default/tempfile-0.1.0.gemspec %{gem_dir}/specifications/default/timeout-0.1.0.gemspec @@ -1301,7 +1290,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Feb 24 2020 Vít Ondruch - 2.8.0-1 -- Upgrade to Ruby 2.8.0 (83705c42ce). +- Upgrade to Ruby 2.8.0 (810d66f3e7). - Extract RSS and REXML into separate subpackages, because they were moved from default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. From 153f2c16fe1809723f78cb78f69a45612e77af0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 6 Apr 2020 19:14:51 +0200 Subject: [PATCH 12/14] Fix fortifications on armv7hl. --- ruby-2.8.0-Annotate-execstack.patch | 12 ++++++++++++ ruby.spec | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 ruby-2.8.0-Annotate-execstack.patch diff --git a/ruby-2.8.0-Annotate-execstack.patch b/ruby-2.8.0-Annotate-execstack.patch new file mode 100644 index 0000000..404d8fc --- /dev/null +++ b/ruby-2.8.0-Annotate-execstack.patch @@ -0,0 +1,12 @@ +diff --git a/coroutine/arm32/Context.S b/coroutine/arm32/Context.S +index b66db29622..596284b5cf 100644 +--- a/coroutine/arm32/Context.S ++++ b/coroutine/arm32/Context.S +@@ -24,3 +24,7 @@ coroutine_transfer: + + # Restore callee state (8 registers program counter) + pop {r4-r11,pc} ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff --git a/ruby.spec b/ruby.spec index 0819949..5b5f18b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -140,6 +140,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Revert commit which breaks bundled net-http-persistent version check. # https://github.com/drbrain/net-http-persistent/pull/109 Patch10: ruby-2.7.0-Remove-RubyGems-dependency.patch +# Fix fortifications on armv7hl. +# https://bugs.ruby-lang.org/issues/16762 +Patch11: ruby-2.8.0-Annotate-execstack.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -568,6 +571,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . From 08398ea96f43a7005822cc6548f31fb7d46b40ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Apr 2020 18:09:44 +0200 Subject: [PATCH 13/14] Bundle did_you_mean into StdLib. --- ruby.spec | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5b5f18b..fb15967 100644 --- a/ruby.spec +++ b/ruby.spec @@ -150,7 +150,6 @@ Recommends: ruby(rubygems) >= %{rubygems_version} Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} # Change this to requires, hopefully just as temporary measure. # https://bugs.ruby-lang.org/issues/16431 -Requires: rubygem(did_you_mean) >= %{did_you_mean_version} Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf @@ -208,6 +207,7 @@ Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) # StdLib default gems. +Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version} Provides: bundled(rubygem-racc) = %{racc_version} # Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe. @@ -270,6 +270,7 @@ Summary: Default gems which are part of Ruby StdLib. Requires: ruby(rubygems) >= %{rubygems_version} Supplements: ruby(rubygems) # Obsoleted by Ruby 2.7 in F32 timeframe. +Obsoletes: rubygem-did_you_mean < 1.4.0-130 Obsoletes: rubygem-racc < 1.4.16-130 BuildArch: noarch @@ -347,20 +348,6 @@ floating point arithmetic often introduces subtle errors because of the conversion between base 10 and base 2. -%package -n rubygem-did_you_mean -Summary: "Did you mean?" experience in Ruby -Version: %{did_you_mean_version} -License: MIT -Requires: ruby(release) -Requires: ruby(rubygems) >= %{rubygems_version} -Provides: rubygem(did_you_mean) = %{version}-%{release} -BuildArch: noarch - -%description -n rubygem-did_you_mean -"did you mean?" experience in Ruby: the error message will tell you the right -one when you misspelled something. - - %package -n rubygem-io-console Summary: IO/Console is a simple console utilizing library Version: %{io_console_version} @@ -694,11 +681,6 @@ mv %{buildroot}%{ruby_libdir}/bundler.rb %{buildroot}%{gem_dir}/gems/bundler-%{b mv %{buildroot}%{ruby_libdir}/bundler %{buildroot}%{gem_dir}/gems/bundler-%{bundler_version}/lib mv %{buildroot}%{gem_dir}/specifications/default/bundler-%{bundler_version}.gemspec %{buildroot}%{gem_dir}/specifications -mkdir -p %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib -mv %{buildroot}%{ruby_libdir}/did_you_mean.rb %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib -mv %{buildroot}%{ruby_libdir}/did_you_mean %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib -mv %{buildroot}%{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec %{buildroot}%{gem_dir}/specifications - mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib @@ -1086,6 +1068,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/zlib.so # Default gems +%{ruby_libdir}/did_you_mean* %{ruby_libdir}/racc* %dir %{ruby_libarchdir}/racc %{ruby_libarchdir}/racc/cparse.so @@ -1128,6 +1111,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/date-3.0.0.gemspec %{gem_dir}/specifications/default/dbm-1.1.0.gemspec %{gem_dir}/specifications/default/delegate-0.1.0.gemspec +%{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec %{gem_dir}/specifications/default/etc-1.1.0.gemspec %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec @@ -1203,11 +1187,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/gems/bigdecimal-%{bigdecimal_version} %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec -%files -n rubygem-did_you_mean -%{gem_dir}/gems/did_you_mean-%{did_you_mean_version} -%exclude %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/.* -%{gem_dir}/specifications/did_you_mean-%{did_you_mean_version}.gemspec - %files -n rubygem-io-console %{ruby_libdir}/io %{ruby_libarchdir}/io/console.so @@ -1299,7 +1278,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. - Add ruby-default-gems subpackage shipping all extra default gem content. -- Bundle Racc into StdLib. +- Bundle Racc and did_you_mean into StdLib. * Tue Jan 28 2020 Vít Ondruch - 2.7.0-127 - Provide StdLib links for Racc and install it by default. From 7c9a7d257f2eaf0e59dc5be6970ea3500dfdc7de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 15 May 2020 17:49:43 +0200 Subject: [PATCH 14/14] Relax rubygems-devel dependency on rubygems. Independent rubygems package used to provide rubygems-devel subpackages, but this is going to change to ease the independent rubygems package maitenance and therefore ruby package will become the ultimate source of rubygems-devel package. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index fb15967..20c970f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -250,7 +250,7 @@ libraries. Summary: Macros and development tools for packaging RubyGems Version: %{rubygems_version} License: Ruby or MIT -Requires: ruby(rubygems) = %{version}-%{release} +Requires: ruby(rubygems) >= %{version}-%{release} # Needed for RDoc documentation format generation. Requires: rubygem(json) >= %{json_version} Requires: rubygem(rdoc) >= %{rdoc_version}