From ca13a515893b6810288c9b589d6abb26438f757d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 10 Jul 2024 11:04:00 +0200 Subject: [PATCH] Upgrade to Ruby 3.3.4. Resolves: rhbz#2292052 --- ...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 | 10 +++---- ruby-2.7.0-Initialize-ABRT-hook.patch | 2 +- ...ADER-didn-t-define-HAVE-header-file-.patch | 27 ------------------ ...GS-to-a-special-hardenflags-variable.patch | 12 ++++---- ruby-3.4.0-Fix-pointer-incompatiblity.patch | 24 ---------------- ruby.spec | 28 ++++++++----------- sources | 2 +- 11 files changed, 30 insertions(+), 85 deletions(-) delete mode 100644 ruby-3.3.3-RUBY-CHECK-HEADER-didn-t-define-HAVE-header-file-.patch delete mode 100644 ruby-3.4.0-Fix-pointer-incompatiblity.patch diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 692a40b..4cd8dd1 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 -@@ -3478,6 +3478,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3482,6 +3482,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 e96ce39..e6315c0 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 -@@ -4317,7 +4317,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4321,7 +4321,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 c990ede..8e1b4fe 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 -@@ -4381,6 +4381,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4385,6 +4385,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 dd81419..7dc8eca 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 -@@ -4353,6 +4353,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4357,6 +4357,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='' -@@ -4377,6 +4381,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4381,6 +4385,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 8e9fd2b..50b4466 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 -@@ -4267,9 +4267,6 @@ AS_CASE(["$target_os"], +@@ -4271,9 +4271,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], -@@ -4292,57 +4289,63 @@ AC_ARG_WITH(ridir, +@@ -4296,57 +4293,63 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -122,7 +122,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4359,6 +4362,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4363,6 +4366,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -227,7 +227,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 -@@ -1351,7 +1351,8 @@ def test_self_use_paths +@@ -1353,7 +1353,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, ".gem", Gem.ruby_engine] @@ -237,7 +237,7 @@ index b25068405d..e9fef4a311 100644 FileUtils.mkdir_p File.join(parts) -@@ -1427,7 +1428,7 @@ def test_self_vendor_dir +@@ -1429,7 +1430,7 @@ def test_self_vendor_dir vendordir(File.join(@tempdir, "vendor")) do expected = File.join RbConfig::CONFIG["vendordir"], "gems", diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch index 0f32243..309507f 100644 --- a/ruby-2.7.0-Initialize-ABRT-hook.patch +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -58,7 +58,7 @@ diff --git a/ruby.c b/ruby.c index 60c57d6259..1eec16f2c8 100644 --- a/ruby.c +++ b/ruby.c -@@ -1724,10 +1724,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) +@@ -1722,10 +1722,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) void Init_builtin_features(void); diff --git a/ruby-3.3.3-RUBY-CHECK-HEADER-didn-t-define-HAVE-header-file-.patch b/ruby-3.3.3-RUBY-CHECK-HEADER-didn-t-define-HAVE-header-file-.patch deleted file mode 100644 index 7f6a83d..0000000 --- a/ruby-3.3.3-RUBY-CHECK-HEADER-didn-t-define-HAVE-header-file-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d6d22e457475e3d2f8e4878bb97e2780ca2f83d6 Mon Sep 17 00:00:00 2001 -From: Sorah Fukumori -Date: Fri, 31 May 2024 02:16:10 +0900 -Subject: [PATCH] RUBY_CHECK_HEADER didn't define HAVE_{header-file} - ---with-gmp is not working at all because HAVE_GMP_H -was missing since 18eaf0be90. [Bug #20515] - -bug: https://bugs.ruby-lang.org/issues/20515 -follow-up: https://bugs.ruby-lang.org/issues/20494 -follow-up: 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b ---- - tool/m4/ruby_check_header.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tool/m4/ruby_check_header.m4 b/tool/m4/ruby_check_header.m4 -index 171455549e3362..6fec9d16c5bcf1 100644 ---- a/tool/m4/ruby_check_header.m4 -+++ b/tool/m4/ruby_check_header.m4 -@@ -3,6 +3,6 @@ AC_DEFUN([RUBY_CHECK_HEADER], - [# RUBY_CHECK_HEADER($@) - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS m4_if([$5], [], [$INCFLAGS], [$5])" -- AC_CHECK_HEADER([$1], [$2], [$3], [$4]) -+ AC_CHECK_HEADERS([$1], [$2], [$3], [$4]) - CPPFLAGS="$save_CPPFLAGS" - unset save_CPPFLAGS]) diff --git a/ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch b/ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch index b03b618..b811afd 100644 --- a/ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch +++ b/ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch @@ -60,7 +60,7 @@ diff --git a/configure.ac b/configure.ac index f35fad6a362611..0da15772d36671 100644 --- a/configure.ac +++ b/configure.ac -@@ -352,7 +352,7 @@ test -z "$warnflags" || +@@ -354,7 +354,7 @@ test -z "$warnflags" || AS_IF([test -z "${CFLAGS+set}"], [ cflags=`echo " $cflags " | sed "$cflagspat;s/^ *//;s/ *$//"` orig_cflags="$cflags" @@ -69,7 +69,7 @@ index f35fad6a362611..0da15772d36671 100644 ]) dnl AS_IF([test -z "${CXXFLAGS+set}"], [ dnl cxxflags=`echo " $cxxflags " | sed "$cflagspat;s/^ *//;s/ *$//"` -@@ -800,7 +800,7 @@ AS_IF([test "$GCC" = yes], [ +@@ -802,7 +802,7 @@ AS_IF([test "$GCC" = yes], [ [fortify_source=$enableval]) AS_IF([test "x$fortify_source" != xno], [ RUBY_TRY_CFLAGS([$optflags -D_FORTIFY_SOURCE=2], @@ -78,7 +78,7 @@ index f35fad6a362611..0da15772d36671 100644 [@%:@include ]) ]) -@@ -821,20 +821,24 @@ AS_IF([test "$GCC" = yes], [ +@@ -823,20 +823,24 @@ AS_IF([test "$GCC" = yes], [ AC_MSG_CHECKING([for -fstack-protector]) AC_MSG_RESULT(["$stack_protector"]) AS_CASE(["$stack_protector"], [-*], [ @@ -111,7 +111,7 @@ index f35fad6a362611..0da15772d36671 100644 break ]) ]) -@@ -983,6 +987,59 @@ AC_SUBST(incflags, "$INCFLAGS") +@@ -985,6 +989,59 @@ test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\"" } @@ -171,7 +171,7 @@ index f35fad6a362611..0da15772d36671 100644 AC_CACHE_CHECK([whether compiler has statement and declarations in expressions], rb_cv_have_stmt_and_decl_in_expr, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])], -@@ -4211,12 +4268,13 @@ AS_IF([test "${ARCH_FLAG}"], [ +@@ -4215,12 +4272,13 @@ AS_IF([test "${ARCH_FLAG}"], [ rb_cv_warnflags=`echo "$rb_cv_warnflags" | sed 's/^ *//;s/ *$//'` warnflags="$rb_cv_warnflags" AC_SUBST(cppflags)dnl @@ -186,7 +186,7 @@ index f35fad6a362611..0da15772d36671 100644 AC_SUBST(XCFLAGS)dnl AC_SUBST(XLDFLAGS)dnl AC_SUBST(EXTLDFLAGS)dnl -@@ -4684,6 +4742,7 @@ config_summary "DLDFLAGS" "$DLDFLAGS" +@@ -4688,6 +4746,7 @@ config_summary "DLDFLAGS" "$DLDFLAGS" config_summary "optflags" "$optflags" config_summary "debugflags" "$debugflags" config_summary "warnflags" "$warnflags" diff --git a/ruby-3.4.0-Fix-pointer-incompatiblity.patch b/ruby-3.4.0-Fix-pointer-incompatiblity.patch deleted file mode 100644 index 2bd7a53..0000000 --- a/ruby-3.4.0-Fix-pointer-incompatiblity.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 055613fd868a8c94e43893f8c58a00cdd2a81f6d Mon Sep 17 00:00:00 2001 -From: Nobuyoshi Nakada -Date: Fri, 22 Mar 2024 18:18:35 +0900 -Subject: [PATCH] Fix pointer incompatiblity - -Since the subsecond part is discarded, WIDEVAL to VALUE conversion is -needed. ---- - time.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/time.c b/time.c -index 6179b081c02fc9..3304b2f4f4856a 100644 ---- a/time.c -+++ b/time.c -@@ -2342,7 +2342,7 @@ zone_timelocal(VALUE zone, VALUE time) - struct time_object *tobj = RTYPEDDATA_GET_DATA(time); - wideval_t t, s; - -- split_second(tobj->timew, &t, &s); -+ wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s); - tm = tm_from_time(rb_cTimeTM, time); - utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm); - if (UNDEF_P(utc)) return 0; diff --git a/ruby.spec b/ruby.spec index b6f6900..bb215e4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 3 %global minor_version 3 -%global teeny_version 2 +%global teeny_version 4 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -10,7 +10,7 @@ #%%global milestone rc1 # Keep the revision enabled for pre-releases from GIT. -#%%global revision e5a195edf6 +#%%global revision be1089c8ec %global ruby_archive %{name}-%{ruby_version} @@ -27,7 +27,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.5.9 +%global rubygems_version 3.5.11 %global rubygems_molinillo_version 0.8.0 %global rubygems_net_http_version 0.4.0 %global rubygems_net_protocol_version 0.2.2 @@ -38,7 +38,7 @@ %global rubygems_uri_version 0.13.0 # Default gems. -%global bundler_version 2.5.9 +%global bundler_version 2.5.11 %global bundler_connection_pool_version 2.4.1 %global bundler_fileutils_version 1.7.2 %global bundler_net_http_persistent_version 4.0.2 @@ -95,8 +95,8 @@ %global set_version 1.1.0 %global shellwords_version 0.2.0 %global singleton_version 0.2.0 -%global stringio_version 3.1.0 -%global strscan_version 3.0.7 +%global stringio_version 3.1.1 +%global strscan_version 3.0.9 %global syntax_suggest_version 2.0.0 %global syslog_version 0.1.2 %global tempfile_version 0.2.1 @@ -133,7 +133,7 @@ %global racc_version 1.7.3 %global rake_version 13.1.0 %global rbs_version 3.4.0 -%global rexml_version 3.2.6 +%global rexml_version 3.2.8 %global rss_version 0.3.0 %global test_unit_version 3.6.1 %global typeprof_version 0.21.9 @@ -171,7 +171,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version}%{?development_release} -Release: 10%{?dist} +Release: 11%{?dist} # Licenses, which are likely not included in binary RPMs: # Apache-2.0: # benchmark/gc/redblack.rb @@ -277,12 +277,6 @@ Patch9: ruby-3.3.0-Disable-syntax-suggest-test-case.patch # Make sure hardeding flags are correctly applied. # https://bugs.ruby-lang.org/issues/20520 Patch12: ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch -# Fix build issue on i686 due to "incompatible pointer type" error. -# https://bugs.ruby-lang.org/issues/20447 -Patch13: ruby-3.4.0-Fix-pointer-incompatiblity.patch -# Fix GMP support -# https://bugs.ruby-lang.org/issues/20515 -Patch14: ruby-3.3.3-RUBY-CHECK-HEADER-didn-t-define-HAVE-header-file-.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?with_rubypick:Suggests: rubypick} @@ -760,8 +754,6 @@ analysis result in RBS format, a standard type description format for Ruby %patch 6 -p1 %patch 9 -p1 %patch 12 -p1 -%patch 13 -p1 -%patch 14 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1723,6 +1715,10 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %changelog +* Wed Jul 10 2024 Vít Ondruch - 3.3.4-11 +- Upgrade to Ruby 3.3.4. + Resolves: rhbz#2292052 + * Tue Jun 18 2024 Vít Ondruch - 3.3.2-10 - Make sure hardening configuration flags are correctly applied. diff --git a/sources b/sources index b8e4495..88156f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-3.3.2.tar.xz) = f2c4fb0d7c80aa46cdd80ad54ffee614e95d2fbad0554b6ce81f42fa5b891aaea63ddfd5b962e28508a4c835f9abf091a05a2e1234ef08c3e71af522a029c4e1 +SHA512 (ruby-3.3.4.tar.xz) = b26461a13ff82a08a282f10108028bb2a2e4a28da6182a291062fc54089c6655d79c22cc69d59156f9b11cb10a17fe8c69d489343fbae123a45f03361b95c9eb