From 910b85f7fa12692a1e570d8020cb689acbfa87be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 6 Jan 2020 18:06:12 +0100 Subject: [PATCH] Upgrade to Ruby 2.7.0-rc1. --- abrt_prelude.rb | 8 -- ...-additional-preludes-by-configuratio.patch | 58 -------------- ...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 +- ...2.3-Generate-preludes-using-miniruby.patch | 28 ------- ruby-2.3.0-ruby_version.patch | 6 +- ruby-2.7.0-Initialize-ABRT-hook.patch | 77 +++++++++++++++++++ ruby.spec | 40 ++++------ 10 files changed, 102 insertions(+), 125 deletions(-) delete mode 100644 abrt_prelude.rb delete mode 100644 ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch delete mode 100644 ruby-2.2.3-Generate-preludes-using-miniruby.patch create mode 100644 ruby-2.7.0-Initialize-ABRT-hook.patch diff --git a/abrt_prelude.rb b/abrt_prelude.rb deleted file mode 100644 index 587c6a6..0000000 --- a/abrt_prelude.rb +++ /dev/null @@ -1,8 +0,0 @@ -if defined?(Gem) - require 'rubygems.rb' - - begin - require 'abrt' - rescue LoadError - end -end diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch deleted file mode 100644 index 5c347d5..0000000 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 4 Oct 2013 22:13:11 +0200 -Subject: [PATCH] Allow to specify addition preludes by configuration option. - ---- - common.mk | 2 +- - configure.ac | 7 +++++++ - template/Makefile.in | 2 ++ - 3 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/common.mk b/common.mk -index 5cfbc3d..3f0a82e 100644 ---- a/common.mk -+++ b/common.mk -@@ -163,7 +163,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) - GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) - - DEFAULT_PRELUDES = $(GEM_PRELUDE) --PRELUDE_SCRIPTS = $(DEFAULT_PRELUDES) -+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) - GEM_PRELUDE = $(srcdir)/gem_prelude.rb - PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c - GOLFPRELUDES = {$(srcdir)}golf_prelude.c -diff --git a/configure.ac b/configure.ac -index 028ef7ca3e..cdeff87871 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3884,6 +3884,13 @@ AC_SUBST(rubyarchhdrdir)dnl - AC_SUBST(sitearchhdrdir)dnl - AC_SUBST(vendorarchhdrdir)dnl - -+AC_ARG_WITH(prelude, -+ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]), -+ [prelude=$withval]) -+if test "$prelude" != ""; then -+ AC_SUBST(OPTIONAL_PRELUDES, $prelude) -+fi -+ - AC_ARG_WITH(mantype, - AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), - [ -diff --git a/template/Makefile.in b/template/Makefile.in -index d7e139c6d4..a0171afdcc 100644 ---- a/template/Makefile.in -+++ b/template/Makefile.in -@@ -156,6 +156,8 @@ COROUTINE_H = @X_COROUTINE_H@ - COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) - COROUTINE_SRC = @X_COROUTINE_SRC@ - -+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ -+ - #### End of system configuration section. #### - - MAJOR= @MAJOR@ --- -1.8.3.1 - diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index f7eed39..6352db3 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 -@@ -3101,6 +3101,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3102,6 +3102,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 2165aa8..d48f74e 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 -@@ -3739,7 +3739,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3740,7 +3740,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 9d1eb76..d156a73 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 -@@ -3803,6 +3803,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3804,6 +3804,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 5a1f7c5..14e20ec 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 -@@ -3775,6 +3775,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3776,6 +3776,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='' -@@ -3799,6 +3803,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3800,6 +3804,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch deleted file mode 100644 index 48deae6..0000000 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 07eb5f5e775dec01a92a8b13910eaced9e8ee0cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 2 Dec 2014 10:56:58 +0100 -Subject: [PATCH] Generate preludes using miniruby. - ---- - common.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common.mk b/common.mk -index 168dc52..20c218a 100644 ---- a/common.mk -+++ b/common.mk -@@ -1088,9 +1088,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS) - $(srcdir)/template/prelude.c.tmpl $(BUILTIN_RB_SRCS) - - $(PRELUDE_C): $(COMPILE_PRELUDE) \ -- $(PRELUDE_SCRIPTS) -+ $(PRELUDE_SCRIPTS) $(PREP) - $(ECHO) generating $@ -- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ -+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ - $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS) - - $(GOLF_PRELUDE_C): $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb --- -2.6.3 - diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index c282fa3..11f73f3 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 -@@ -3690,9 +3690,6 @@ AS_CASE(["$target_os"], +@@ -3691,9 +3691,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], -@@ -3715,56 +3712,62 @@ AC_ARG_WITH(ridir, +@@ -3716,56 +3713,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) -@@ -3781,6 +3784,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3782,6 +3785,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch new file mode 100644 index 0000000..f4ac102 --- /dev/null +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -0,0 +1,77 @@ +From eca084e4079c77c061045df9c21b219175b05228 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 6 Jan 2020 13:56:04 +0100 +Subject: [PATCH] Initialize ABRT hook. + +The ABRT hook used to be initialized by preludes via patches [[1], [2]]. +Unfortunately, due to [[3]] and especially since [[4]], this would +require boostrapping [[5]]. + +To keep the things simple for now, load the ABRT hook via C. + +[1]: https://bugs.ruby-lang.org/issues/8566 +[2]: https://bugs.ruby-lang.org/issues/15306 +[3]: https://bugs.ruby-lang.org/issues/16254 +[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 ++++++++++++++ + common.mk | 3 ++- + ruby.c | 4 ++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + create mode 100644 abrt.c + +diff --git a/abrt.c b/abrt.c +new file mode 100644 +index 0000000000..74b0bd5c0f +--- /dev/null ++++ b/abrt.c +@@ -0,0 +1,12 @@ ++#include "internal.h" ++ ++void ++Init_abrt(void) ++{ ++ rb_eval_string( ++ " begin\n" ++ " require 'abrt'\n" ++ " rescue LoadError\n" ++ " end\n" ++ ); ++} +diff --git a/common.mk b/common.mk +index b2e5b2b6d0..f39f81da5c 100644 +--- a/common.mk ++++ b/common.mk +@@ -81,7 +81,8 @@ ENC_MK = enc.mk + MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \ + RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(mflags) + +-COMMONOBJS = array.$(OBJEXT) \ ++COMMONOBJS = abrt.$(OBJEXT) \ ++ array.$(OBJEXT) \ + ast.$(OBJEXT) \ + bignum.$(OBJEXT) \ + class.$(OBJEXT) \ +diff --git a/ruby.c b/ruby.c +index 60c57d6259..1eec16f2c8 100644 +--- a/ruby.c ++++ b/ruby.c +@@ -1410,10 +1410,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) + + void Init_builtin_features(void); + ++/* abrt.c */ ++void Init_abrt(void); ++ + static void + ruby_init_prelude(void) + { + Init_builtin_features(); ++ Init_abrt(); + rb_const_remove(rb_cObject, rb_intern_const("TMP_RUBY_PREFIX")); + } + +-- +2.24.1 + diff --git a/ruby.spec b/ruby.spec index 8b31ba2..bb45929 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,7 +7,7 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone rc2 +%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. %global revision af11efd377 @@ -30,21 +30,21 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.1.0.pre3 +%global rubygems_version 3.1.1 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 2.1.0.pre.3 +%global bundler_version 2.1.0 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.3.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 -%global bundler_thor_version 0.20.3 +%global bundler_thor_version 1.0.0 %global bigdecimal_version 2.0.0.dev %global did_you_mean_version 1.3.1 -%global io_console_version 0.5.1 +%global io_console_version 0.5.2 %global irb_version 1.2.0 -%global json_version 2.2.0 +%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 @@ -95,7 +95,6 @@ Source2: libruby.stp Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems -Source6: abrt_prelude.rb # RPM dependency generators. Source8: rubygems.attr Source9: rubygems.req @@ -128,13 +127,15 @@ Patch3: ruby-2.1.0-always-use-i386.patch Patch4: ruby-2.1.0-custom-rubygems-location.patch # Make mkmf verbose by default Patch5: ruby-1.9.3-mkmf-verbose.patch -# Adds support for '--with-prelude' configuration option. This allows to built -# in support for ABRT. -# http://bugs.ruby-lang.org/issues/8566 -Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Use miniruby to regenerate prelude.c. +# The ABRT hook used to be initialized by preludes via following patches: +# https://bugs.ruby-lang.org/issues/8566 # https://bugs.ruby-lang.org/issues/15306 -Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch +# Unfortunately, due to https://bugs.ruby-lang.org/issues/16254 +# and especially since https://github.com/ruby/ruby/pull/2735 +# this would require boostrapping: +# https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/LH6L6YJOYQT4Y5ZNOO4SLIPTUWZ5V45Q/ +# For now, load the ABRT hook via this simple patch: +Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch # Workaround "an invalid stdio handle" error on PPC, due to recently introduced # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 @@ -547,7 +548,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 %patch9 -p1 %patch10 -p1 %patch22 -p1 @@ -555,11 +555,6 @@ rm -rf ext/fiddle/libffi* # Provide an example of usage of the tapset: cp -a %{SOURCE3} . -# Make abrt_prelude.rb available for compilation process. The prelude must be -# available together with Ruby's source due to -# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26 -cp -a %{SOURCE6} . - %build autoconf @@ -582,7 +577,6 @@ autoconf --enable-shared \ --with-ruby-version='' \ --enable-multiarch \ - --with-prelude=./abrt_prelude.rb \ # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1088,11 +1082,11 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec %{gem_dir}/specifications/default/fileutils-1.4.1.gemspec -%{gem_dir}/specifications/default/forwardable-1.3.0.gemspec +%{gem_dir}/specifications/default/forwardable-1.3.1.gemspec %{gem_dir}/specifications/default/gdbm-2.1.0.gemspec %{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec -%{gem_dir}/specifications/default/logger-1.4.1.gemspec +%{gem_dir}/specifications/default/logger-1.4.2.gemspec %{gem_dir}/specifications/default/matrix-0.1.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec @@ -1240,7 +1234,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (af11efd377). +- Upgrade to Ruby 2.7.0-rc1. - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility.