diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 4cd8dd1..e4142e9 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 -@@ -3482,6 +3482,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3520,6 +3520,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 e6315c0..7990f77 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 -@@ -4321,7 +4321,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4366,7 +4366,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then @@ -66,7 +66,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 07076d4..35e6c3c 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -115,7 +115,7 @@ +@@ -116,7 +116,7 @@ val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 8e1b4fe..ba78846 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 -@@ -4385,6 +4385,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4430,6 +4430,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 7dc8eca..7e199ac 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 -@@ -4357,6 +4357,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4402,6 +4402,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='' -@@ -4381,6 +4385,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4426,6 +4430,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 e9110a17ca..76a1f0a315 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -359,6 +359,7 @@ def CONFIG.[](name, mandatory = false) +@@ -382,6 +382,7 @@ def CONFIG.[](name, mandatory = false) vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] end @@ -75,7 +75,7 @@ index e9110a17ca..76a1f0a315 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -595,7 +596,16 @@ def stub +@@ -974,7 +975,16 @@ def (bins = []).add(name) 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 68782cd..f089a33 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 -@@ -4271,9 +4271,6 @@ AS_CASE(["$target_os"], +@@ -4316,9 +4316,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], -@@ -4296,57 +4293,63 @@ AC_ARG_WITH(ridir, +@@ -4341,57 +4338,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) -@@ -4363,6 +4366,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4408,6 +4411,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 -@@ -453,7 +453,7 @@ def CONFIG.[](name, mandatory = false) +@@ -945,7 +945,7 @@ def (bins = []).add(name) install?(:doc, :rdoc) do if $rdocdir @@ -262,7 +262,7 @@ diff --git a/configure.ac b/configure.ac index a00f2b6776..999e2d6d5d 100644 --- a/configure.ac +++ b/configure.ac -@@ -136,7 +136,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +@@ -143,7 +143,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch index 0f32243..65d1e65 100644 --- a/ruby-2.7.0-Initialize-ABRT-hook.patch +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -44,7 +44,7 @@ diff --git a/common.mk b/common.mk index b2e5b2b6d0..f39f81da5c 100644 --- a/common.mk +++ b/common.mk -@@ -111,7 +111,8 @@ PRISM_FILES = prism/api_node.$(OBJEXT) \ +@@ -110,7 +110,8 @@ PRISM_FILES = prism/api_node.$(OBJEXT) \ prism/prism.$(OBJEXT) \ prism_init.$(OBJEXT) @@ -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) +@@ -1744,10 +1744,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) void Init_builtin_features(void); @@ -84,5 +84,5 @@ index 60c57d6259..1eec16f2c8 100644 + # Ignore ABRT + features -= %w[abrt] # Ignore CRuby internals - features -= %w[encdb transdb windows_1252] + features -= %w[encdb transdb windows_1252 windows_31j] features.reject! { |feature| feature.end_with?('-fake') } diff --git a/ruby-3.3.0-Disable-syntax-suggest-test-case.patch b/ruby-3.3.0-Disable-syntax-suggest-test-case.patch index 1119a59..10679ee 100644 --- a/ruby-3.3.0-Disable-syntax-suggest-test-case.patch +++ b/ruby-3.3.0-Disable-syntax-suggest-test-case.patch @@ -12,9 +12,9 @@ diff --git a/common.mk b/common.mk index d55d1788aa..73755f6ccd 100644 --- a/common.mk +++ b/common.mk -@@ -1601,8 +1601,6 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) - $(ACTIONS_ENDGROUP) - no-test-syntax-suggest: +@@ -1662,8 +1662,6 @@ no-test-bundled-gems-spec: + + test-syntax-suggest: -check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest - 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 deleted file mode 100644 index d0c10a0..0000000 --- a/ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.patch +++ /dev/null @@ -1,302 +0,0 @@ -From 3d405634f43d39079ee93cdc59ed7fc0a5e8917a Mon Sep 17 00:00:00 2001 -From: KJ Tsanaktsidis -Date: Sun, 9 Jun 2024 21:15:39 +1000 -Subject: [PATCH] Extract hardening CFLAGS to a special $hardenflags variable - -This changes the automatic detection of -fstack-protector, --D_FORTIFY_SOURCE, and -mbranch-protection to write to $hardenflags -instead of $XCFLAGS. The definition of $cflags is changed to -"$hardenflags $orig_cflags $optflags $debugflags $warnflags" to match. - -Furthermore, these flags are _prepended_ to $hardenflags, rather than -appended. - -The implications of doing this are as follows: - -* If a CRuby builder specifies cflags="-mbranch-protection=foobar" at - the ./configure script, and the configure script detects that - -mbranch-protection=pac-ret is accepted, then GCC will be invoked as - "gcc -mbranch-protection=pac-ret -mbranch-protection=foobar". Since - the last flags take precedence, that means that user-supplied values - of these flags in $cflags will take priority. -* Likewise, if a CRuby builder explicitly specifies - "hardenflags=-mbranch-protection=foobar", because we _prepend_ to - $hardenflags in our autoconf script, we will still invoke GCC as - "gcc -mbranch-protection=pac-ret -mbranch-protection=foobar". -* If a CRuby builder specifies CFLAGS="..." at the configure line, - automatic detection of hardening flags is ignored as before. -* C extensions will _also_ be built with hardening flags now as well - (this was not the case by default before because the detected flags - went into $XCFLAGS). - -Additionally, as part of this work, I changed how the detection of -PAC/BTI in Context.S works. Rather than appending the autodetected -option to ASFLAGS, we simply compile a set of test programs with the -actual CFLAGS in use to determine what PAC/BTI settings were actually -chosen by the builder. Context.S is made aware of these choices through -some custom macros. - -The result of this work is that: - -* Ruby will continue to choose some sensible defaults for hardening - options for the C compiler -* Distributors are able to specify CFLAGS that are consistent with their - distribution and override these defaults -* Context.S will react to whatever -mbranch-protection is actually in - use, not what was autodetected -* Extensions get built with hardening flags too. - -[Bug #20154] -[Bug #20520] ---- - configure.ac | 81 ++++++++++++++++++++++++++++++----- - coroutine/arm64/Context.S | 14 +++--- - template/Makefile.in | 1 + - tool/m4/ruby_append_option.m4 | 4 ++ - tool/m4/ruby_try_cflags.m4 | 17 ++++++++ - 5 files changed, 100 insertions(+), 17 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f35fad6a362611..0da15772d36671 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -354,7 +354,7 @@ test -z "$warnflags" || - AS_IF([test -z "${CFLAGS+set}"], [ - cflags=`echo " $cflags " | sed "$cflagspat;s/^ *//;s/ *$//"` - orig_cflags="$cflags" -- cflags="$cflags "'${optflags} ${debugflags} ${warnflags}' -+ cflags='${hardenflags} '"$cflags "'${optflags} ${debugflags} ${warnflags}' - ]) - dnl AS_IF([test -z "${CXXFLAGS+set}"], [ - dnl cxxflags=`echo " $cxxflags " | sed "$cflagspat;s/^ *//;s/ *$//"` -@@ -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], -- [RUBY_APPEND_OPTION(XCFLAGS, -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)], [], -+ [RUBY_PREPEND_OPTION(hardenflags, -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2)], [], - [@%:@include ]) - ]) - -@@ -823,20 +823,24 @@ AS_IF([test "$GCC" = yes], [ - AC_MSG_CHECKING([for -fstack-protector]) - AC_MSG_RESULT(["$stack_protector"]) - AS_CASE(["$stack_protector"], [-*], [ -- RUBY_APPEND_OPTION(XCFLAGS, $stack_protector) -- RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector) -- RUBY_APPEND_OPTION(LDFLAGS, $stack_protector) -+ RUBY_PREPEND_OPTION(hardenflags, $stack_protector) -+ RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector) -+ RUBY_APPEND_OPTION(LDFLAGS, $stack_protector) - ]) - - # aarch64 branch protection - AS_CASE(["$target_cpu"], [aarch64], [ - AS_FOR(option, opt, [-mbranch-protection=pac-ret -msign-return-address=all], [ -- RUBY_TRY_CFLAGS(option, [branch_protection=yes], [branch_protection=no]) -+ # Try these flags in the _prepended_ position - i.e. we want to try building a program -+ # with CFLAGS="-mbranch-protection=pac-ret $CFLAGS". If the builder has provided different -+ # branch protection flags in CFLAGS, we don't want to overwrite those. We just want to -+ # find some branch protection flags which work if none were provided. -+ RUBY_TRY_CFLAGS_PREPEND(option, [branch_protection=yes], [branch_protection=no]) - AS_IF([test "x$branch_protection" = xyes], [ -- # C compiler and assembler must be consistent for -mbranch-protection -- # since they both check `__ARM_FEATURE_PAC_DEFAULT` definition. -- RUBY_APPEND_OPTION(XCFLAGS, option) -- RUBY_APPEND_OPTION(ASFLAGS, option) -+ # _prepend_ the options to CFLAGS, so that user-provided flags will overwrite them. -+ # These CFLAGS are used during the configure script to compile further test programs; -+ # however, $harden_flags is prepended separately to CFLAGS at the end of the script. -+ RUBY_PREPEND_OPTION(hardenflags, $opt) - break - ]) - ]) -@@ -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\"" - } - -+# The lines above expand out the $cflags/$optflags/$debugflags/$hardenflags variables into the -+# CFLAGS variable. So, at this point, we have a $CFLAGS var with the actual compiler flags we're -+# going to use. -+# That means this is the right time to check what branch protection flags are going to be in use -+# and define appropriate macros for use in Context.S based on this -+AS_CASE(["$target_cpu"], [aarch64], [ -+ AC_CACHE_CHECK([whether __ARM_FEATURE_BTI_DEFAULT is defined], -+ rb_cv_aarch64_bti_enabled, -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[ -+ @%:@ifndef __ARM_FEATURE_BTI_DEFAULT -+ @%:@error "__ARM_FEATURE_BTI_DEFAULT not defined" -+ @%:@endif -+ ]])], -+ [rb_cv_aarch64_bti_enabled=yes], -+ [rb_cv_aarch64_bti_enabled=no]) -+ ) -+ AS_IF([test "$rb_cv_aarch64_bti_enabled" = yes], -+ AC_DEFINE(RUBY_AARCH64_BTI_ENABLED, 1)) -+ AC_CACHE_CHECK([whether __ARM_FEATURE_PAC_DEFAULT is defined], -+ rb_cv_aarch64_pac_enabled, -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[ -+ @%:@ifndef __ARM_FEATURE_PAC_DEFAULT -+ @%:@error "__ARM_FEATURE_PAC_DEFAULT not defined" -+ @%:@endif -+ ]])], -+ [rb_cv_aarch64_pac_enabled=yes], -+ [rb_cv_aarch64_pac_enabled=no]) -+ ) -+ AS_IF([test "$rb_cv_aarch64_pac_enabled" = yes], -+ AC_DEFINE(RUBY_AARCH64_PAC_ENABLED, 1)) -+ # Context.S will only ever sign its return address with the A-key; it doesn't support -+ # the B-key at the moment. -+ AS_IF([test "$rb_cv_aarch64_pac_enabled" = yes], [ -+ AC_CACHE_CHECK([whether __ARM_FEATURE_PAC_DEFAULT specifies the b-key bit 0x02], -+ rb_cv_aarch64_pac_b_key, -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[ -+ @%:@ifdef __ARM_FEATURE_PAC_DEFAULT -+ @%:@if __ARM_FEATURE_PAC_DEFAULT & 0x02 -+ @%:@error "__ARM_FEATURE_PAC_DEFAULT specifies B key" -+ @%:@endif -+ @%:@endif -+ ]])], -+ [rb_cv_aarch64_pac_b_key=no], -+ [rb_cv_aarch64_pac_b_key=yes]) -+ ) -+ AS_IF([test "$rb_cv_aarch64_pac_b_key" = yes], -+ AC_MSG_ERROR(-mbranch-protection flag specified b-key but Ruby's Context.S does not support this yet.)) -+ ]) -+]) -+ - 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; }); ]])], -@@ -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 --AC_SUBST(cflags, ["${orig_cflags:+$orig_cflags }"'${optflags} ${debugflags} ${warnflags}'])dnl -+AC_SUBST(cflags, ['${hardenflags} '"${orig_cflags:+$orig_cflags }"' ${optflags} ${debugflags} ${warnflags}'])dnl - AC_SUBST(cxxflags)dnl - AC_SUBST(optflags)dnl - AC_SUBST(debugflags)dnl - AC_SUBST(warnflags)dnl - AC_SUBST(strict_warnflags)dnl -+AC_SUBST(hardenflags)dnl - AC_SUBST(XCFLAGS)dnl - AC_SUBST(XLDFLAGS)dnl - AC_SUBST(EXTLDFLAGS)dnl -@@ -4688,6 +4746,7 @@ config_summary "DLDFLAGS" "$DLDFLAGS" - config_summary "optflags" "$optflags" - config_summary "debugflags" "$debugflags" - config_summary "warnflags" "$warnflags" -+config_summary "hardenflags" "$hardenflags" - config_summary "strip command" "$STRIP" - config_summary "install doc" "$DOCTARGETS" - config_summary "YJIT support" "$YJIT_SUPPORT" -diff --git a/coroutine/arm64/Context.S b/coroutine/arm64/Context.S -index 5251ab214df1f0..54611a247e2f66 100644 ---- a/coroutine/arm64/Context.S -+++ b/coroutine/arm64/Context.S -@@ -5,6 +5,8 @@ - ## Copyright, 2018, by Samuel Williams. - ## - -+#include "ruby/config.h" -+ - #define TOKEN_PASTE(x,y) x##y - #define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name) - -@@ -27,10 +29,10 @@ - .global PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer) - PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): - --#if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT != 0) -+#if defined(RUBY_AARCH64_PAC_ENABLED) - # paciasp (it also acts as BTI landing pad, so no need to insert BTI also) - hint #25 --#elif defined(__ARM_FEATURE_BTI_DEFAULT) && (__ARM_FEATURE_BTI_DEFAULT != 0) -+#elif defined(RUBY_AARCH64_BTI_ENABLED) - # For the the case PAC is not enabled but BTI is. - # bti c - hint #34 -@@ -73,7 +75,7 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): - # Pop stack frame - add sp, sp, 0xa0 - --#if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT != 0) -+#if defined(RUBY_AARCH64_PAC_ENABLED) - # autiasp: Authenticate x30 (LR) with SP and key A - hint #29 - #endif -@@ -85,18 +87,18 @@ PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer): - .section .note.GNU-stack,"",%progbits - #endif - --#if __ARM_FEATURE_BTI_DEFAULT != 0 || __ARM_FEATURE_PAC_DEFAULT != 0 -+#if defined(RUBY_AARCH64_BTI_ENABLED) || defined(RUBY_AARCH64_PAC_ENABLED) - /* See "ELF for the Arm 64-bit Architecture (AArch64)" - https://github.com/ARM-software/abi-aa/blob/2023Q3/aaelf64/aaelf64.rst#program-property */ - # define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1<<0) - # define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1<<1) - --# if __ARM_FEATURE_BTI_DEFAULT != 0 -+# if defined(RUBY_AARCH64_BTI_ENABLED) - # define BTI_FLAG GNU_PROPERTY_AARCH64_FEATURE_1_BTI - # else - # define BTI_FLAG 0 - # endif --# if __ARM_FEATURE_PAC_DEFAULT != 0 -+# if defined(RUBY_AARCH64_PAC_ENABLED) - # define PAC_FLAG GNU_PROPERTY_AARCH64_FEATURE_1_PAC - # else - # define PAC_FLAG 0 -diff --git a/template/Makefile.in b/template/Makefile.in -index 033ac56cb38886..abb4469777ce8a 100644 ---- a/template/Makefile.in -+++ b/template/Makefile.in -@@ -89,6 +89,7 @@ cflags = @cflags@ - optflags = @optflags@ - debugflags = @debugflags@ - warnflags = @warnflags@ @strict_warnflags@ -+hardenflags = @hardenflags@ - cppflags = @cppflags@ - incflags = @incflags@ - RUBY_DEVEL = @RUBY_DEVEL@ # "yes" or empty -diff --git a/tool/m4/ruby_append_option.m4 b/tool/m4/ruby_append_option.m4 -index ff828d2162c22f..98359fa1f95f52 100644 ---- a/tool/m4/ruby_append_option.m4 -+++ b/tool/m4/ruby_append_option.m4 -@@ -3,3 +3,7 @@ AC_DEFUN([RUBY_APPEND_OPTION], - [# RUBY_APPEND_OPTION($1) - AS_CASE([" [$]{$1-} "], - [*" $2 "*], [], [' '], [ $1="$2"], [ $1="[$]$1 $2"])])dnl -+AC_DEFUN([RUBY_PREPEND_OPTION], -+ [# RUBY_APPEND_OPTION($1) -+ AS_CASE([" [$]{$1-} "], -+ [*" $2 "*], [], [' '], [ $1="$2"], [ $1="$2 [$]$1"])])dnl -diff --git a/tool/m4/ruby_try_cflags.m4 b/tool/m4/ruby_try_cflags.m4 -index b74718fe5e1cef..b397642aad9ca2 100644 ---- a/tool/m4/ruby_try_cflags.m4 -+++ b/tool/m4/ruby_try_cflags.m4 -@@ -22,3 +22,20 @@ AC_DEFUN([RUBY_TRY_CFLAGS], [ - AC_MSG_RESULT(no)], - [$4], [$5]) - ])dnl -+ -+AC_DEFUN([_RUBY_TRY_CFLAGS_PREPEND], [ -+ RUBY_WERROR_FLAG([ -+ CFLAGS="$1 [$]CFLAGS" -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$4]], [[$5]])], -+ [$2], [$3]) -+ ])dnl -+])dnl -+AC_DEFUN([RUBY_TRY_CFLAGS_PREPEND], [ -+ AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])dnl -+ _RUBY_TRY_CFLAGS_PREPEND([$1], -+ [$2 -+ AC_MSG_RESULT(yes)], -+ [$3 -+ AC_MSG_RESULT(no)], -+ [$4], [$5]) -+])dnl diff --git a/ruby-3.4.0-openssl-respect-crypto-policies-tls-min.patch b/ruby-3.4.0-openssl-respect-crypto-policies-tls-min.patch deleted file mode 100644 index 6c7a4dd..0000000 --- a/ruby-3.4.0-openssl-respect-crypto-policies-tls-min.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ae215a47ae1a6527bb7b8566e5bcc9430652462f Mon Sep 17 00:00:00 2001 -From: Ewoud Kohl van Wijngaarden -Date: Fri, 5 Jan 2024 15:58:59 +0100 -Subject: [PATCH] Only set min_version on OpenSSL < 1.1.0 - -Both Red Hat and Debian-like systems configure the minimum TLS version -to be 1.2 by default, but allow users to change this via configs. - -On Red Hat and derivatives this happens via crypto-policies[1], which in -writes settings in /etc/crypto-policies/back-ends/opensslcnf.config. -Most notably, it sets TLS.MinProtocol there. For Debian there's -MinProtocol in /etc/ssl/openssl.cnf. Both default to TLSv1.2, which is -considered a secure default. - -In constrast, the SSLContext has a hard coded OpenSSL::SSL::TLS1_VERSION -for min_version. TLS 1.0 and 1.1 are considered insecure. By always -setting this in the default parameters, the system wide default can't be -respected, even if a developer wants to. - -This takes the approach that's also done for ciphers: it's only set for -OpenSSL < 1.1.0. - -[1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening ---- - lib/openssl/ssl.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb -index e557b8b48..83ecacafb 100644 ---- a/ext/openssl/lib/openssl/ssl.rb -+++ b/ext/openssl/lib/openssl/ssl.rb -@@ -22,7 +22,6 @@ module OpenSSL - module SSL - class SSLContext - DEFAULT_PARAMS = { # :nodoc: -- :min_version => OpenSSL::SSL::TLS1_VERSION, - :verify_mode => OpenSSL::SSL::VERIFY_PEER, - :verify_hostname => true, - :options => -> { -@@ -55,6 +54,7 @@ class SSLContext - if !(OpenSSL::OPENSSL_VERSION.start_with?("OpenSSL") && - OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10100000) - DEFAULT_PARAMS.merge!( -+ min_version: OpenSSL::SSL::TLS1_VERSION, - ciphers: %w{ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 diff --git a/ruby.rpmlintrc b/ruby.rpmlintrc index 90e14d6..ec8ac11 100644 --- a/ruby.rpmlintrc +++ b/ruby.rpmlintrc @@ -13,15 +13,13 @@ addFilter(r'ruby\.(spec|src):\d+: W: unversioned-explicit-provides bundled\(ccan # The template files do not have to have executable bits. addFilter(r'^rubygem-bundler\.noarch: E: non-executable-script /usr/share/gems/gems/bundler-[\d\.]+/lib/bundler/templates/[\w/\.]+ 644 /usr/bin/env ') +# Samples don't really need executable bits. +addFilter(r'^rubygem-bigdecimal\.x86_64: E: non-executable-script /usr/share/gems/gems/bigdecimal-[\d\.]+/sample/\w+.rb 644 /usr/local/bin/ruby$') + # The bundled gem files permissions are overridden as 644 by `make install`. # https://bugs.ruby-lang.org/issues/17840 # https://github.com/rubygems/rubygems/issues/5255 -# https://github.com/ruby/debug/pull/481 -# https://github.com/ruby/net-ftp/pull/12 -# https://github.com/ruby/net-imap/pull/53 -# https://github.com/ruby/net-pop/pull/7 -# https://github.com/ruby/prime/pull/16 -addFilter(r'^.*: E: non-executable-script /usr/share/gems/gems/(debug|net-(ftp|imap|pop)|prime)-[\d\.]+/bin/\w+ 644 ') +addFilter(r'^.*: E: non-executable-script /usr/share/gems/gems/(abbrev|getoptlong|nkf|observer|resolv|resolv-replace|rinda|syslog)-[\d\.]+/bin/\w+ 644 ') # Ruby provides API to set the cipher list. addFilter(r'^ruby-libs\.\w+: W: crypto-policy-non-compliance-openssl /usr/lib(64)?/ruby/openssl.so SSL_CTX_set_cipher_list$') diff --git a/ruby.spec b/ruby.spec index 104bc16..fc622ee 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,16 +1,16 @@ %global major_version 3 -%global minor_version 3 -%global teeny_version 6 +%global minor_version 4 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone rc1 +%dnl %global milestone preview2 # Keep the revision enabled for pre-releases from GIT. -#%%global revision ef084cc8f4 +%dnl %global revision 48d4efcb85 %global ruby_archive %{name}-%{ruby_version} @@ -27,118 +27,122 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.5.22 +%global rubygems_version 3.6.2 %global rubygems_molinillo_version 0.8.0 -%global rubygems_net_http_version 0.4.1 +%global rubygems_net_http_version 0.6.0 %global rubygems_net_protocol_version 0.2.2 -%global rubygems_optparse_version 0.4.0 -%global rubygems_resolv_version 0.4.0 -%global rubygems_securerandom_version 0.3.1 -%global rubygems_timeout_version 0.4.1 +%global rubygems_optparse_version 0.6.0 +%global rubygems_resolv_version 0.6.0 +%global rubygems_securerandom_version 0.4.1 +%global rubygems_timeout_version 0.4.3 %global rubygems_tsort_version 0.2.0 -%global rubygems_uri_version 0.13.1 +%global rubygems_uri_version 1.0.2 # Default gems. -%global bundler_version 2.5.22 +%global bundler_version 2.6.2 %global bundler_connection_pool_version 2.4.1 -%global bundler_fileutils_version 1.7.2 +%global bundler_fileutils_version 1.7.3 %global bundler_net_http_persistent_version 4.0.4 %global bundler_pub_grub_version 0.5.0 -%global bundler_securerandom_version 0.3.1 -%global bundler_thor_version 1.3.0 +%global bundler_securerandom_version 0.4.1 +%global bundler_thor_version 1.3.2 %global bundler_tsort_version 0.2.0 -%global bundler_uri_version 0.13.1 +%global bundler_uri_version 1.0.2 -%global abbrev_version 0.1.2 -%global base64_version 0.2.0 -%global benchmark_version 0.3.0 +%global benchmark_version 0.4.0 %global cgi_version 0.4.1 -%global csv_version 3.2.8 -%global date_version 3.3.4 -%global delegate_version 0.3.1 -%global did_you_mean_version 1.6.3 -%global digest_version 3.1.1 -%global drb_version 2.2.0 +%global date_version 3.4.1 +%global delegate_version 0.4.0 +%global did_you_mean_version 2.0.0 +%global digest_version 3.2.0 %global english_version 0.8.0 -%global erb_version 4.0.3 -%global error_highlight_version 0.6.0 -%global etc_version 1.4.3 -%global fcntl_version 1.1.0 -%global fiddle_version 1.1.2 -%global fileutils_version 1.7.2 +%global erb_version 4.0.4 +%global error_highlight_version 0.7.0 +%global etc_version 1.4.5 +%global fcntl_version 1.2.0 +%global fiddle_version 1.1.6 +%global fileutils_version 1.7.3 %global find_version 0.2.0 %global forwardable_version 1.3.3 -%global getoptlong_version 0.2.1 -%global io_nonblock_version 0.3.0 +%global io_nonblock_version 0.3.1 %global io_wait_version 0.3.1 -%global ipaddr_version 1.2.6 -%global logger_version 1.6.0 -%global mutex_m_version 0.2.0 -%global net_http_version 0.4.1 +%global ipaddr_version 1.2.7 +%global logger_version 1.6.4 +%global net_http_version 0.6.0 %global net_protocol_version 0.2.2 -%global nkf_version 0.1.3 -%global observer_version 0.1.2 %global open3_version 0.2.1 -%global openssl_version 3.2.0 -%global open_uri_version 0.4.1 -%global optparse_version 0.4.0 -%global ostruct_version 0.6.0 -%global pathname_version 0.3.0 -%global pp_version 0.5.0 +%global openssl_version 3.3.0 +%global open_uri_version 0.5.0 +%global optparse_version 0.6.0 +%global ostruct_version 0.6.1 +%global pathname_version 0.4.0 +%global pp_version 0.6.2 %global prettyprint_version 0.2.0 -%global pstore_version 0.1.3 +%global prism_version 1.2.0 +%global pstore_version 0.1.4 %global readline_version 0.0.4 -%global reline_version 0.5.10 -%global resolv_version 0.3.0 -%global resolv_replace_version 0.1.1 -%global rinda_version 0.2.0 +%global reline_version 0.6.0 +%global resolv_version 0.6.0 %global ruby2_keywords_version 0.0.5 -%global securerandom_version 0.3.1 -%global set_version 1.1.0 -%global shellwords_version 0.2.0 -%global singleton_version 0.2.0 -%global stringio_version 3.1.1 -%global strscan_version 3.0.9 -%global syntax_suggest_version 2.0.1 -%global syslog_version 0.1.2 -%global tempfile_version 0.2.1 -%global time_version 0.3.0 -%global timeout_version 0.4.1 -%global tmpdir_version 0.2.0 +%global securerandom_version 0.4.1 +%global set_version 1.1.1 +%global shellwords_version 0.2.2 +%global singleton_version 0.3.0 +%global stringio_version 3.1.2 +%global strscan_version 3.1.2 +%global syntax_suggest_version 2.0.2 +%global syslog_version 0.2.0 +%global tempfile_version 0.3.1 +%global time_version 0.4.1 +%global timeout_version 0.4.3 +%global tmpdir_version 0.3.1 %global tsort_version 0.2.0 %global un_version 0.3.0 -%global uri_version 0.13.1 +%global uri_version 1.0.2 %global weakref_version 0.1.3 -%global win32ole_version 1.8.10 -%global yaml_version 0.3.0 -%global prism_version 0.19.0 -%global zlib_version 3.1.1 +%global win32ole_version 1.9.1 +%global win32_registry_version 0.1.0 +%global yaml_version 0.4.0 +%global zlib_version 3.2.1 # Gemified default gems. -%global bigdecimal_version 3.1.5 -%global io_console_version 0.7.1 -%global irb_version 1.13.1 -%global json_version 2.7.2 -%global psych_version 5.1.2 -%global rdoc_version 6.6.3.1 +%global io_console_version 0.8.0 +%global irb_version 1.14.3 +%global json_version 2.9.1 +%global psych_version 5.2.2 +%global rdoc_version 6.10.0 # Bundled gems. -%global debug_version 1.9.2 -%global net_ftp_version 0.3.4 -%global net_imap_version 0.4.9.1 +%global abbrev_version 0.1.2 +%global base64_version 0.2.0 +%global bigdecimal_version 3.1.8 +%global csv_version 3.3.2 +%global debug_version 1.10.0 +%global drb_version 2.2.1 +%global getoptlong_version 0.2.1 +%global net_ftp_version 0.3.8 +%global net_imap_version 0.5.4 %global net_pop_version 0.1.2 -%global net_smtp_version 0.4.0.1 +%global net_smtp_version 0.5.0 +%global nkf_version 0.2.0 %global matrix_version 0.4.2 -%global minitest_version 5.20.0 -%global power_assert_version 2.0.3 -%global prime_version 0.1.2 -%global racc_version 1.7.3 -%global rake_version 13.1.0 -%global rbs_version 3.4.0 -%global rexml_version 3.3.9 +%global minitest_version 5.25.4 +%global mutex_m_version 0.3.0 +%global observer_version 0.1.2 +%global power_assert_version 2.0.5 +%global prime_version 0.1.3 +%global racc_version 1.8.1 +%global rake_version 13.2.1 +%global rbs_version 3.8.0 +%global repl_type_completor_version 0.1.9 +%global resolv_replace_version 0.1.1 +%global rexml_version 3.4.0 +%global rinda_version 0.2.0 %global rss_version 0.3.1 -%global test_unit_version 3.6.1 -%global typeprof_version 0.21.9 +%global syslog_version 0.2.0 +%global test_unit_version 3.6.7 +%global typeprof_version 0.30.1 + # Bundled nkf version %global bundled_nkf_version 2.1.5 @@ -173,7 +177,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version}%{?development_release} -Release: 18%{?dist} +Release: 19%{?dist} # Licenses, which are likely not included in binary RPMs: # Apache-2.0: # benchmark/gc/redblack.rb @@ -183,12 +187,6 @@ Release: 18%{?dist} # GPL-1.0-or-later OR Artistic-1.0-Perl: win32/win32.c, include/ruby/win32.h, # ext/win32ole/win32ole.c # -# !!! Problematic licenses: -# LicenseRef-scancode-unicode-mappings: ext/json/generator/generator.c -# https://bugs.ruby-lang.org/issues/11844#note-19 -# https://github.com/flori/json/issues/277 -# https://github.com/flori/json/pull/567 -# # Licenses under review: # .bundle/gems/net-imap-0.4.9/LICENSE.txt # https://gitlab.com/fedora/legal/fedora-license-data/-/issues/506 @@ -276,16 +274,6 @@ Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch # Disable syntax_suggest test suite, which tries to download its dependencies. # https://bugs.ruby-lang.org/issues/19297 Patch9: ruby-3.3.0-Disable-syntax-suggest-test-case.patch -# Armv8.3+ capable CPUs might segfault with incorrect compilation options. -# See related upstream report: https://bugs.ruby-lang.org/issues/20085 -# https://bugs.ruby-lang.org/issues/20154 -# 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 Ruby OpenSSL to respect crypto-policies TLS minimal version. -# https://github.com/ruby/openssl/pull/710 -# https://github.com/ruby/ruby/commit/6213ab1a51387fd9cdcb5e87908722f3bbdf78cb -Patch13: ruby-3.4.0-openssl-respect-crypto-policies-tls-min.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?with_rubypick:Suggests: rubypick} @@ -365,11 +353,6 @@ Provides: bundled(ccan-check_type) Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) -# https://github.com/nurse/nkf -# Please note that nkf going to be promoted to bundled gem in Ruby 3.4: -# https://github.com/ruby/ruby/commit/2e3a7f70ae71650be6ea38a483f66ce17ca5eb1d -Provides: bundled(nkf) = %{bundled_nkf_version} - # StdLib default gems. Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version} Provides: bundled(rubygem-openssl) = %{openssl_version} @@ -406,7 +389,7 @@ Requires: ruby(release) Recommends: rubygem(bundler) >= %{bundler_version} Recommends: rubygem(rdoc) >= %{rdoc_version} Recommends: rubygem(io-console) -Requires: rubygem(psych) >= %{psych_version} +Requires: rubygem(psych) >= %{psych_version}%{?psych_prerelease:~%{sub %{psych_prerelease} 2 -1}} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} Provides: bundled(rubygems) = %{rubygems_version} @@ -544,8 +527,7 @@ provide higher layer features, such like curses and readline. %package -n rubygem-json Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} -# Unicode-DFS-2015: ext/json/ext/generator/generator.c -License: (Ruby OR BSD-2-Clause) AND Unicode-DFS-2015 +License: Ruby OR BSD-2-Clause Provides: bundled(rubygem-json) = %{json_version} %description -n rubygem-json @@ -557,9 +539,9 @@ markup language. %package -n rubygem-psych Summary: A libyaml wrapper for Ruby -Version: %{psych_version} +Version: %{psych_version}%{?psych_prerelease:~%{sub %{psych_prerelease} 2 -1}} License: MIT -Provides: bundled(rubygem-psych) = %{psych_version} +Provides: bundled(rubygem-psych) = %{psych_version}%{?psych_prerelease:~%{sub %{psych_prerelease} 2 -1}} %description -n rubygem-psych Psych is a YAML parser and emitter. Psych leverages @@ -606,13 +588,30 @@ many machines, systematically and repeatably. %package bundled-gems Summary: Bundled gems which are part of Ruby StdLib +Provides: bundled(rubygem-abbrev) = %{abbrev_version} +Provides: bundled(rubygem-base64) = %{base64_version} +Provides: bundled(rubygem-csv) = %{csv_version} Provides: bundled(rubygem-debug) = %{debug_version} +Provides: bundled(rubygem-drb) = %{drb_version} +Provides: bundled(rubygem-getoptlong) = %{getoptlong_version} Provides: bundled(rubygem-matrix) = %{matrix_version} +Provides: bundled(rubygem-mutex_m) = %{mutex_m_version} Provides: bundled(rubygem-net-ftp) = %{net_ftp_version} Provides: bundled(rubygem-net-imap) = %{net_imap_version} Provides: bundled(rubygem-net-pop) = %{net_pop_version} Provides: bundled(rubygem-net-smtp) = %{net_smtp_version} +Provides: bundled(rubygem-nkf) = %{nkf_version} Provides: bundled(rubygem-prime) = %{prime_version} +Provides: bundled(rubygem-observer) = %{observer_version} +Provides: bundled(rubygem-repl_type_completor) = %{repl_type_completor_version} +Provides: bundled(rubygem-resolv-replace) = %{resolv_replace_version} +Provides: bundled(rubygem-rinda) = %{rinda_version} +Provides: bundled(rubygem-syslog) = %{syslog_version} +# https://github.com/nurse/nkf +# Please note that nkf going to be promoted to bundled gem in Ruby 3.4: +# https://github.com/ruby/ruby/commit/2e3a7f70ae71650be6ea38a483f66ce17ca5eb1d +Provides: bundled(nkf) = %{bundled_nkf_version} + %description bundled-gems Bundled gems which are part of Ruby StdLib. While being part of Ruby, these @@ -766,8 +765,6 @@ analysis result in RBS format, a standard type description format for Ruby %patch 4 -p1 %patch 6 -p1 %patch 9 -p1 -%patch 12 -p1 -%patch 13 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -819,6 +816,16 @@ rm -rf %{buildroot} # multilib systems and install config.h wrapper %multilib_fix_c_header --file %{_includedir}/%{name}/config.h +# `ruby` executable is placed in some strange directory for some unknow +# reasons. +# https://bugs.ruby-lang.org/issues/20800 +# https://github.com/ruby/ruby/pull/12043 +CONFIG_TARGET_DIR=%{buildroot}%{_exec_prefix}/$( \ + %{_vpath_builddir}/miniruby -I%{_vpath_builddir} -rrbconfig -e 'puts RbConfig::CONFIG["config_target"]' +) +mv ${CONFIG_TARGET_DIR}/bin/ruby %{buildroot}%{_bindir} +rm -rd ${CONFIG_TARGET_DIR} + # Rename the ruby executable. It is replaced by RubyPick. %{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} @@ -866,7 +873,7 @@ mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name} # Move bundled rubygems to %%gem_dir and %%gem_extdir_mri -# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems +# make symlinks for io-console, which is considered to be part of stdlib by other Gems mkdir -p %{buildroot}%{gem_libdir irb} mv %{buildroot}%{ruby_libdir}/irb* %{buildroot}%{gem_libdir irb} mv %{buildroot}%{gem_spec -d irb} %{buildroot}%{gem_spec irb} @@ -883,15 +890,6 @@ mkdir -p %{buildroot}%{gem_libdir rdoc} mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_libdir rdoc} mv %{buildroot}%{gem_spec -d rdoc} %{buildroot}%{gem_spec rdoc} -mkdir -p %{buildroot}%{gem_libdir bigdecimal} -mkdir -p %{buildroot}%{gem_extdir_mri bigdecimal} -mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_libdir bigdecimal} -mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{gem_extdir_mri bigdecimal} -touch %{buildroot}%{gem_extdir_mri bigdecimal}/gem.build_complete -mv %{buildroot}%{gem_spec -d bigdecimal} %{buildroot}%{gem_spec bigdecimal} -ln -s %{gem_libdir bigdecimal}/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal -ln -s %{gem_extdir_mri bigdecimal}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so - # TODO: Put help files into proper location. # https://bugs.ruby-lang.org/issues/15359 mkdir -p %{buildroot}%{gem_libdir bundler} @@ -970,9 +968,9 @@ sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check %if 0%{?with_hardening_test} # Check Ruby hardening. -%define fortification_x86_64 fortified="11" fortify-able="28" +%define fortification_x86_64 fortified="12" fortify-able="29" %define fortification_i686 fortified="10" fortify-able="26" -%define fortification_aarch64 fortified="10" fortify-able="26" +%define fortification_aarch64 fortified="12" fortify-able="29" %define fortification_ppc64le fortified="7" fortify-able="24" %define fortification_s390x fortified="10" fortify-able="24" %define fortification_riscv64 fortified="10" fortify-able="26" @@ -1147,6 +1145,7 @@ make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \ # Nkf. make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \ + require 'rubygems'; \ require 'nkf'; \ puts '%%{bundled_nkf_version}: %{bundled_nkf_version}'; \ puts %Q[NKF::NKF_VERSION: #{NKF::NKF_VERSION}]; \ @@ -1241,21 +1240,16 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ # List all these files explicitly to prevent surprises # Platform independent libraries. %dir %{ruby_libdir} -%exclude %{ruby_libdir}/bigdecimal* %exclude %{ruby_libdir}/irb* %exclude %{ruby_libdir}/json* %exclude %{ruby_libdir}/psych* -%{ruby_libdir}/abbrev.rb -%{ruby_libdir}/base64.rb %{ruby_libdir}/benchmark* %{ruby_libdir}/bundled_gems.rb %{ruby_libdir}/cgi* %{ruby_libdir}/coverage.rb -%{ruby_libdir}/csv* %{ruby_libdir}/date.rb %{ruby_libdir}/delegate* %{ruby_libdir}/digest* -%{ruby_libdir}/drb* %{ruby_libdir}/English.rb %{ruby_libdir}/erb* %{ruby_libdir}/error_highlight* @@ -1264,16 +1258,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{ruby_libdir}/fileutils.rb %{ruby_libdir}/find.rb %{ruby_libdir}/forwardable* -%{ruby_libdir}/getoptlong* %{ruby_libdir}/ipaddr.rb -%{ruby_libdir}/kconv.rb %{ruby_libdir}/logger* %{ruby_libdir}/mkmf.rb %{ruby_libdir}/monitor.rb -%{ruby_libdir}/mutex_m.rb %{ruby_libdir}/net %{ruby_libdir}/objspace* -%{ruby_libdir}/observer* %{ruby_libdir}/open-uri.rb %{ruby_libdir}/open3* %{ruby_libdir}/optionparser.rb @@ -1287,8 +1277,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{ruby_libdir}/readline.rb %{ruby_libdir}/reline* %{ruby_libdir}/resolv.rb -%{ruby_libdir}/resolv-replace.rb -%{ruby_libdir}/rinda %{ruby_libdir}/ripper* %dir %{ruby_libdir}/ruby_vm %{ruby_libdir}/ruby_vm/rjit @@ -1297,8 +1285,8 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{ruby_libdir}/shellwords.rb %{ruby_libdir}/singleton* %{ruby_libdir}/socket.rb +%{ruby_libdir}/strscan %{ruby_libdir}/syntax_suggest* -%{ruby_libdir}/syslog %{ruby_libdir}/tempfile.rb %{ruby_libdir}/timeout* %{ruby_libdir}/time.rb @@ -1397,7 +1385,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{ruby_libarchdir}/io/nonblock.so %{ruby_libarchdir}/io/wait.so %{ruby_libarchdir}/monitor.so -%{ruby_libarchdir}/nkf.so %{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/pathname.so %{ruby_libarchdir}/pty.so @@ -1408,7 +1395,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{ruby_libarchdir}/socket.so %{ruby_libarchdir}/stringio.so %{ruby_libarchdir}/strscan.so -%{ruby_libarchdir}/syslog.so %{ruby_libarchdir}/zlib.so # Default gems @@ -1448,16 +1434,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{_rpmconfigdir}/rubygems.con %files default-gems -%gem_spec -d abbrev -%gem_spec -d base64 %gem_spec -d benchmark %gem_spec -d cgi -%gem_spec -d csv %gem_spec -d date %gem_spec -d delegate %gem_spec -d did_you_mean %gem_spec -d digest -%gem_spec -d drb %gem_spec -d english %gem_spec -d erb %gem_instdir erb @@ -1470,16 +1452,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %gem_spec -d fileutils %gem_spec -d find %gem_spec -d forwardable -%gem_spec -d getoptlong %gem_spec -d io-nonblock %gem_spec -d io-wait %gem_spec -d ipaddr %gem_spec -d logger -%gem_spec -d mutex_m %gem_spec -d net-http %gem_spec -d net-protocol -%gem_spec -d nkf -%gem_spec -d observer %gem_spec -d open3 %gem_spec -d open-uri %gem_spec -d optparse @@ -1492,8 +1470,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %gem_spec -d readline %gem_spec -d reline %gem_spec -d resolv -%gem_spec -d resolv-replace -%gem_spec -d rinda %gem_spec -d ruby2_keywords %gem_spec -d securerandom %gem_spec -d set @@ -1504,7 +1480,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %gem_spec -d syntax_suggest %{_bindir}/syntax_suggest %gem_instdir syntax_suggest -%gem_spec -d syslog %gem_spec -d tempfile %gem_spec -d time %gem_spec -d timeout @@ -1514,6 +1489,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %gem_spec -d uri %gem_spec -d weakref #%%gem_spec -d win32ole +#%%gem_spec -d win32-registry %gem_spec -d yaml %gem_spec -d prism %gem_spec -d zlib @@ -1539,8 +1515,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{_datadir}/ri %files -n rubygem-bigdecimal -%{ruby_libdir}/bigdecimal* -%{ruby_libarchdir}/bigdecimal* %{gem_extdir_mri bigdecimal} %{gem_instdir bigdecimal} %{gem_spec bigdecimal} @@ -1577,27 +1551,68 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{_mandir}/man5/gemfile.5* %files bundled-gems -# rdbg -%{_bindir}/rdbg -%dir %{gem_extdir_mri debug} -%{gem_extdir_mri debug}/gem.build_complete -%dir %{gem_extdir_mri debug}/debug -%{gem_extdir_mri debug}/debug/debug.so -%dir %{gem_instdir debug} -%exclude %{gem_instdir debug}/.* -%doc %{gem_instdir debug}/CONTRIBUTING.md -%{gem_instdir debug}/Gemfile -%license %{gem_instdir debug}/LICENSE.txt -%doc %{gem_instdir debug}/README.md -%{gem_instdir debug}/Rakefile -%doc %{gem_instdir debug}/TODO.md -%{gem_instdir debug}/exe -%{gem_libdir debug} -%{gem_instdir debug}/misc -%{gem_spec debug} +# abbrev +%dir %{gem_instdir abbrev} +%license %{gem_instdir abbrev}/LICENSE.txt +%{gem_instdir abbrev}/bin +%{gem_libdir abbrev} +%{gem_spec abbrev} +%{gem_instdir abbrev}/Gemfile +%doc %{gem_instdir abbrev}/README.md +%{gem_instdir abbrev}/Rakefile + +# base64 +%dir %{gem_instdir base64} +%license %{gem_instdir base64}/LICENSE.txt +%{gem_libdir base64} +%{gem_spec base64} +%doc %{gem_instdir base64}/README.md + +# csv +%dir %{gem_instdir csv} +%license %{gem_instdir csv}/LICENSE.txt +%doc %{gem_instdir csv}/NEWS.md +%{gem_libdir csv} +%{gem_spec csv} +%doc %{gem_instdir csv}/README.md +%doc %{gem_instdir csv}/doc + +# drb +%dir %{gem_instdir drb} +%license %{gem_instdir drb}/LICENSE.txt +%{gem_libdir drb} +%{gem_spec drb} + +# getoptlong +%dir %{gem_instdir getoptlong} +%license %{gem_instdir getoptlong}/LICENSE.txt +%{gem_instdir getoptlong}/bin +%{gem_libdir getoptlong} +%{gem_instdir getoptlong}/sample +%{gem_spec getoptlong} +%{gem_instdir getoptlong}/Gemfile +%doc %{gem_instdir getoptlong}/README.md +%{gem_instdir getoptlong}/Rakefile + +# matrix +%dir %{gem_instdir matrix} +%license %{gem_instdir matrix}/LICENSE.txt +%{gem_libdir matrix} +%{gem_spec matrix} + +# mutex_m +%dir %{gem_instdir mutex_m} +%license %{gem_instdir mutex_m}/BSDL +%license %{gem_instdir mutex_m}/COPYING +%{gem_libdir mutex_m} +%{gem_instdir mutex_m}/sig +%{gem_spec mutex_m} +%doc %{gem_instdir mutex_m}/README.md # net-ftp %dir %{gem_instdir net-ftp} +%license %{gem_instdir net-ftp}/BSDL +%license %{gem_instdir net-ftp}/COPYING %{gem_instdir net-ftp}/Gemfile %license %{gem_instdir net-ftp}/LICENSE.txt %doc %{gem_instdir net-ftp}/README.md @@ -1607,6 +1622,8 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ # net-imap %dir %{gem_instdir net-imap} +%license %{gem_instdir net-imap}/BSDL +%license %{gem_instdir net-imap}/COPYING %{gem_instdir net-imap}/Gemfile %license %{gem_instdir net-imap}/LICENSE.txt %doc %{gem_instdir net-imap}/README.md @@ -1614,6 +1631,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{gem_instdir net-imap}/docs %{gem_libdir net-imap} %{gem_instdir net-imap}/rakelib +%{gem_instdir net-imap}/sample %{gem_spec net-imap} # net-pop @@ -1633,22 +1651,100 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{gem_libdir net-smtp} %{gem_spec net-smtp} -# matrix -%dir %{gem_instdir matrix} -%license %{gem_instdir matrix}/LICENSE.txt -%{gem_libdir matrix} -%{gem_spec matrix} +# nkf +%dir %{gem_instdir nkf} +%{gem_extdir_mri nkf} +%license %{gem_instdir nkf}/LICENSE.txt +%{gem_instdir nkf}/bin +%{gem_libdir nkf} +%{gem_spec nkf} +%{gem_instdir nkf}/Gemfile +%doc %{gem_instdir nkf}/README.md +%{gem_instdir nkf}/Rakefile + +# observer +%dir %{gem_instdir observer} +%license %{gem_instdir observer}/LICENSE.txt +%{gem_instdir observer}/bin +%{gem_libdir observer} +%exclude %{gem_cache observer} +%{gem_spec observer} +%{gem_instdir observer}/Gemfile +%doc %{gem_instdir observer}/README.md +%{gem_instdir observer}/Rakefile # prime %dir %{gem_instdir prime} -%{gem_instdir prime}/Gemfile -%license %{gem_instdir prime}/LICENSE.txt +%license %{gem_instdir prime}/BSDL +%license %{gem_instdir prime}/COPYING %doc %{gem_instdir prime}/README.md %{gem_instdir prime}/Rakefile -%{gem_instdir prime}/bin %{gem_libdir prime} +%{gem_instdir prime}/sig %{gem_spec prime} +# rdbg +%{_bindir}/rdbg +%dir %{gem_extdir_mri debug} +%{gem_extdir_mri debug}/gem.build_complete +%dir %{gem_extdir_mri debug}/debug +%{gem_extdir_mri debug}/debug/debug.so +%dir %{gem_instdir debug} +%exclude %{gem_instdir debug}/.* +%doc %{gem_instdir debug}/CONTRIBUTING.md +%{gem_instdir debug}/Gemfile +%license %{gem_instdir debug}/LICENSE.txt +%doc %{gem_instdir debug}/README.md +%{gem_instdir debug}/Rakefile +%doc %{gem_instdir debug}/TODO.md +%{gem_instdir debug}/exe +%{gem_libdir debug} +%{gem_instdir debug}/misc +%{gem_spec debug} + +# repl_type_completor +%dir %{gem_instdir repl_type_completor} +%license %{gem_instdir repl_type_completor}/LICENSE.txt +%{gem_libdir repl_type_completor} +%{gem_instdir repl_type_completor}/sig +%exclude %{gem_cache repl_type_completor} +%{gem_spec repl_type_completor} +%{gem_instdir repl_type_completor}/Gemfile +%doc %{gem_instdir repl_type_completor}/README.md +%{gem_instdir repl_type_completor}/Rakefile + +# rinda +%dir %{gem_instdir rinda} +%license %{gem_instdir rinda}/LICENSE.txt +%{gem_instdir rinda}/bin +%{gem_libdir rinda} +%{gem_spec rinda} +%{gem_instdir rinda}/Gemfile +%doc %{gem_instdir rinda}/README.md +%{gem_instdir rinda}/Rakefile + +# resolv-replace +%dir %{gem_instdir resolv-replace} +%license %{gem_instdir resolv-replace}/LICENSE.txt +%{gem_instdir resolv-replace}/bin +%{gem_libdir resolv-replace} +%{gem_spec resolv-replace} +%{gem_instdir resolv-replace}/Gemfile +%doc %{gem_instdir resolv-replace}/README.md +%{gem_instdir resolv-replace}/Rakefile + +# syslog +%dir %{gem_instdir syslog} +%{gem_extdir_mri syslog} +%license %{gem_instdir syslog}/LICENSE.txt +%{gem_instdir syslog}/bin +%{gem_libdir syslog} +%exclude %{gem_cache syslog} +%{gem_spec syslog} +%{gem_instdir syslog}/Gemfile +%doc %{gem_instdir syslog}/README.md +%{gem_instdir syslog}/Rakefile + %files -n rubygem-minitest %dir %{gem_instdir minitest} %exclude %{gem_instdir minitest}/.* @@ -1685,22 +1781,24 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{gem_extdir_mri rbs}/gem.build_complete %{gem_extdir_mri rbs}/rbs_extension.so %dir %{gem_instdir rbs} -%exclude %{gem_instdir rbs}/.* %license %{gem_instdir rbs}/BSDL %doc %{gem_instdir rbs}/CHANGELOG.md %license %{gem_instdir rbs}/COPYING -%{gem_instdir rbs}/Gemfile* %doc %{gem_instdir rbs}/README.md %{gem_instdir rbs}/Rakefile %{gem_instdir rbs}/Steepfile +%{gem_instdir rbs}/config.yml %{gem_instdir rbs}/core %doc %{gem_instdir rbs}/docs %{gem_instdir rbs}/exe %{gem_instdir rbs}/goodcheck.yml +%{gem_instdir rbs}/include %{gem_libdir rbs} %{gem_instdir rbs}/schema %{gem_instdir rbs}/sig +%{gem_instdir rbs}/src %{gem_instdir rbs}/stdlib +%{gem_instdir rbs}/templates %{gem_spec rbs} %files -n rubygem-test-unit @@ -1719,6 +1817,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %dir %{gem_instdir racc} %{_bindir}/racc %{gem_extdir_mri racc} +%license %{gem_instdir racc}/BSDL %license %{gem_instdir racc}/COPYING %doc %{gem_instdir racc}/ChangeLog %lang(ja) %doc %{gem_instdir racc}/README.ja.rdoc @@ -1752,17 +1851,18 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %{_bindir}/typeprof %exclude %{gem_instdir typeprof}/.* %license %{gem_instdir typeprof}/LICENSE -%{gem_instdir typeprof}/exe +%{gem_instdir typeprof}/bin +%doc %{gem_instdir typeprof}/doc %{gem_libdir typeprof} -%doc %{gem_instdir typeprof}/tools -%exclude %{gem_instdir typeprof}/typeprof-lsp %{gem_spec typeprof} -%doc %{gem_instdir typeprof}/Gemfile* %doc %{gem_instdir typeprof}/README.md -%doc %{gem_instdir typeprof}/Rakefile %changelog +* Thu Jan 02 2025 Vít Ondruch - 3.4.1-19 +- Upgrade to Ruby 3.4.1. + Resolves: rhbz#2334047 + * Mon Dec 16 2024 Jun Aruga - 3.3.6-18 - Fix Ruby OpenSSL to respect crypto-policies TLS minimal version. diff --git a/sources b/sources index 491b163..504f64b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-3.3.6.tar.xz) = c4b86188bf539fa737932e1ba5b746bc295e7c43b2f8cca2668eb7c88aa7228e2ce9032bbcd244a7d558a11bc842445b5fbeac3503ca7d223b63c53e08dba4ab +SHA512 (ruby-3.4.1.tar.xz) = 8d2e34117696f9debf463ae1eed288fdbb5c1a12e32800e901b69218e3b7302a0066052077e2ebca851e3a635296199bd5a10437eea1d6f787f69a77bb865680