Upgrade to Ruby 3.4.0 (3da3cabf98)
This commit is contained in:
parent
da4a9f4b88
commit
28e9e680e6
10 changed files with 240 additions and 490 deletions
|
|
@ -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}], [
|
||||
@@ -3538,6 +3538,11 @@ AS_IF([test ${multiarch+set}], [
|
||||
])
|
||||
|
||||
archlibdir='${libdir}/${arch}'
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
@@ -4382,7 +4382,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$/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@@ -4446,6 +4446,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
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
@@ -4418,6 +4418,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
|
||||
@@ -4442,6 +4446,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)
|
||||
@@ -386,6 +386,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
|
||||
@@ -978,7 +979,16 @@ def (bins = []).add(name)
|
||||
install?(:local, :comm, :lib) do
|
||||
prepare "library scripts", rubylibdir
|
||||
noinst = %w[*.txt *.rdoc *.gemspec]
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
@@ -4332,9 +4332,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,
|
||||
@@ -4357,57 +4354,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
|
||||
@@ -4424,6 +4427,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)
|
||||
@@ -949,7 +949,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"`
|
||||
@@ -142,7 +142,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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
@@ -1740,10 +1740,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') }
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
@@ -1616,8 +1616,6 @@ no-test-bundled-gems-spec:
|
||||
|
||||
test-syntax-suggest:
|
||||
|
||||
-check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest
|
||||
-
|
||||
|
|
|
|||
|
|
@ -1,302 +0,0 @@
|
|||
From 3d405634f43d39079ee93cdc59ed7fc0a5e8917a Mon Sep 17 00:00:00 2001
|
||||
From: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
|
||||
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 <stdio.h>])
|
||||
])
|
||||
|
||||
@@ -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
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From ae215a47ae1a6527bb7b8566e5bcc9430652462f Mon Sep 17 00:00:00 2001
|
||||
From: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
|
||||
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
|
||||
343
ruby.spec
343
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 0
|
||||
%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
|
||||
%global revision 3da3cabf98
|
||||
|
||||
%global ruby_archive %{name}-%{ruby_version}
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
%global rubygems_dir %{_datadir}/rubygems
|
||||
|
||||
# Bundled libraries versions
|
||||
%global rubygems_version 3.5.22
|
||||
%global rubygems_version 3.6.0.dev
|
||||
%global rubygems_molinillo_version 0.8.0
|
||||
%global rubygems_net_http_version 0.4.1
|
||||
%global rubygems_net_protocol_version 0.2.2
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
%global rubygems_uri_version 0.13.1
|
||||
|
||||
# Default gems.
|
||||
%global bundler_version 2.5.22
|
||||
%global bundler_version 2.6.0.dev
|
||||
%global bundler_connection_pool_version 2.4.1
|
||||
%global bundler_fileutils_version 1.7.2
|
||||
%global bundler_net_http_persistent_version 4.0.4
|
||||
|
|
@ -49,39 +49,31 @@
|
|||
%global bundler_tsort_version 0.2.0
|
||||
%global bundler_uri_version 0.13.1
|
||||
|
||||
%global abbrev_version 0.1.2
|
||||
%global base64_version 0.2.0
|
||||
%global benchmark_version 0.3.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 english_version 0.8.0
|
||||
%global erb_version 4.0.3
|
||||
%global erb_version 4.0.4
|
||||
%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 fiddle_version 1.1.3.dev
|
||||
%global fileutils_version 1.7.2
|
||||
%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_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 logger_version 1.6.1
|
||||
%global net_http_version 0.4.1
|
||||
%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 optparse_version 0.5.0
|
||||
%global ostruct_version 0.6.0
|
||||
%global pathname_version 0.3.0
|
||||
%global pp_version 0.5.0
|
||||
|
|
@ -89,20 +81,18 @@
|
|||
%global pstore_version 0.1.3
|
||||
%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 resolv_version 0.4.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 stringio_version 3.1.2.dev
|
||||
%global strscan_version 3.1.1.dev
|
||||
%global syntax_suggest_version 2.0.0
|
||||
%global syslog_version 0.1.2
|
||||
%global tempfile_version 0.2.1
|
||||
%global time_version 0.3.0
|
||||
%global time_version 0.4.0
|
||||
%global timeout_version 0.4.1
|
||||
%global tmpdir_version 0.2.0
|
||||
%global tsort_version 0.2.0
|
||||
|
|
@ -111,34 +101,48 @@
|
|||
%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 prism_version 1.0.0
|
||||
%global zlib_version 3.1.1
|
||||
|
||||
# Gemified default gems.
|
||||
%global bigdecimal_version 3.1.5
|
||||
%global io_console_version 0.7.1
|
||||
%global irb_version 1.13.1
|
||||
%global io_console_version 0.7.2
|
||||
%global irb_version 1.14.1
|
||||
%global json_version 2.7.2
|
||||
%global psych_version 5.1.2
|
||||
%global rdoc_version 6.6.3.1
|
||||
%global psych_version 5.2.0.beta1
|
||||
%global rdoc_version 6.7.0
|
||||
|
||||
# Bundled gems.
|
||||
%global abbrev_version 0.1.2
|
||||
%global base64_version 0.2.0
|
||||
%global bigdecimal_version 3.1.8
|
||||
%global csv_version 3.3.0
|
||||
%global debug_version 1.9.2
|
||||
%global net_ftp_version 0.3.4
|
||||
%global net_imap_version 0.4.9.1
|
||||
%global drb_version 2.2.1
|
||||
%global getoptlong_version 0.2.1
|
||||
%global net_ftp_version 0.3.8
|
||||
%global net_imap_version 0.4.17
|
||||
%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 minitest_version 5.25.1
|
||||
%global mutex_m_version 0.2.0
|
||||
%global observer_version 0.1.2
|
||||
%global power_assert_version 2.0.4
|
||||
%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 racc_version 1.8.1
|
||||
%global rake_version 13.2.1
|
||||
%global rbs_version 3.6.1
|
||||
%global repl_type_completor_version 0.1.7
|
||||
%global resolv_replace_version 0.1.1
|
||||
%global rexml_version 3.3.8
|
||||
%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.1.2
|
||||
%global test_unit_version 3.6.2
|
||||
%global typeprof_version 0.21.11
|
||||
%global win32_registry_version 0.0.1
|
||||
|
||||
|
||||
# Bundled nkf version
|
||||
%global bundled_nkf_version 2.1.5
|
||||
|
|
@ -276,16 +280,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}
|
||||
|
|
@ -363,11 +357,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}
|
||||
|
|
@ -604,13 +593,31 @@ 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}
|
||||
Provides: bundled(rubygem-win32-registry) = %{win32_registry_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
|
||||
|
|
@ -764,8 +771,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} .
|
||||
|
|
@ -817,6 +822,11 @@ rm -rf %{buildroot}
|
|||
# multilib systems and install config.h wrapper
|
||||
%multilib_fix_c_header --file %{_includedir}/%{name}/config.h
|
||||
|
||||
# `ruby` executable is placed int `libexec` directory for some unknow reasons.
|
||||
# https://bugs.ruby-lang.org/issues/20800
|
||||
find %{buildroot}%{_libexecdir} -name ruby -exec mv '{}' %{buildroot}/%{_bindir} \;
|
||||
rm -rd %{buildroot}%{_libexecdir}
|
||||
|
||||
# Rename the ruby executable. It is replaced by RubyPick.
|
||||
%{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}}
|
||||
|
||||
|
|
@ -864,7 +874,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}
|
||||
|
|
@ -881,15 +891,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}
|
||||
|
|
@ -968,7 +969,7 @@ 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_ppc64le fortified="7" fortify-able="24"
|
||||
|
|
@ -1145,6 +1146,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}]; \
|
||||
|
|
@ -1239,21 +1241,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*
|
||||
|
|
@ -1262,16 +1259,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
|
||||
|
|
@ -1285,8 +1278,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
|
||||
|
|
@ -1296,7 +1287,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
|
|||
%{ruby_libdir}/singleton*
|
||||
%{ruby_libdir}/socket.rb
|
||||
%{ruby_libdir}/syntax_suggest*
|
||||
%{ruby_libdir}/syslog
|
||||
%{ruby_libdir}/tempfile.rb
|
||||
%{ruby_libdir}/timeout*
|
||||
%{ruby_libdir}/time.rb
|
||||
|
|
@ -1395,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
|
||||
|
|
@ -1406,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
|
||||
|
|
@ -1446,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
|
||||
|
|
@ -1468,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
|
||||
|
|
@ -1490,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
|
||||
|
|
@ -1502,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
|
||||
|
|
@ -1537,8 +1514,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}
|
||||
|
|
@ -1575,27 +1550,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}/LICENSE.txt
|
||||
%{gem_libdir mutex_m}
|
||||
%{gem_spec mutex_m}
|
||||
%{gem_instdir mutex_m}/Gemfile
|
||||
%doc %{gem_instdir mutex_m}/README.md
|
||||
%{gem_instdir mutex_m}/Rakefile
|
||||
|
||||
# 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
|
||||
|
|
@ -1605,6 +1621,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
|
||||
|
|
@ -1612,6 +1630,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
|
||||
|
|
@ -1631,11 +1650,27 @@ 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}
|
||||
|
|
@ -1647,6 +1682,68 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
|
|||
%{gem_libdir prime}
|
||||
%{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}/.*
|
||||
|
|
@ -1683,11 +1780,9 @@ 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
|
||||
|
|
@ -1717,6 +1812,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
|
||||
|
|
@ -1761,6 +1857,9 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 19 2024 Vít Ondruch <vondruch@redhat.com> - 3.4.0-18
|
||||
- Upgrade to Ruby 3.4.0 (3da3cabf98)
|
||||
|
||||
* Mon Dec 16 2024 Jun Aruga <jaruga@redhat.com> - 3.3.6-18
|
||||
- Fix Ruby OpenSSL to respect crypto-policies TLS minimal version.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue