Compare commits

...
Sign in to create a new pull request.

18 commits

Author SHA1 Message Date
Vít Ondruch
00b4ba04bc Remove the problematic license
The code was replaced with new implementation:

https://github.com/ruby/json/pull/567

However, there are still new uncertainties about licenses:

https://github.com/ruby/json/issues/723
2025-01-03 18:35:26 +01:00
Vít Ondruch
f7794c19e1 Ignore additional non-executable-script rpmlint reports. 2025-01-03 15:13:32 +01:00
Vít Ondruch
b5a9c2685f Fix gem install to generate documentation 2025-01-02 19:56:07 +01:00
Vít Ondruch
4df943f8fa Upgrade to Ruby 3.4.1.
Resolves: rhbz#2334047
2025-01-02 14:42:15 +01:00
Vít Ondruch
36c09dd4b4 Upgrade to Ruby 3.4.0 (a11bb36316) 2024-12-23 10:17:33 +01:00
Vít Ondruch
af738757b1 Fix OpenSSL::TestSSLSession#test_ctx_client_session_cb_tls13_exception test
This test fails on i686:

https://github.com/ruby/openssl/pull/829
2024-12-20 23:36:47 +01:00
Vít Ondruch
9c27c8bc0f Upgrade to Ruby 3.4.0 (335bba0fde) 2024-12-19 16:51:19 +01:00
Vít Ondruch
afd61ca4f4 Upgrade to Ruby 3.4.0 (3901df708d) 2024-12-19 13:01:24 +01:00
Vít Ondruch
c468fd1cec Upgrade to Ruby 3.4.0 (5067a46502) 2024-12-19 13:00:45 +01:00
Vít Ondruch
f6d8680cd7 Upgrade to Ruby 3.4.0 (4d8c793bc3) 2024-12-19 13:00:20 +01:00
Vít Ondruch
23ac0c148a Upgrade to Ruby 3.4.0 (0f75ac8380) 2024-12-19 12:59:54 +01:00
Vít Ondruch
afb885fc7a Fix documentation generation for gems. 2024-12-19 12:59:26 +01:00
Vít Ondruch
7560438953 Upgrade to Ruby 3.4.0 (4074c6b427) 2024-12-19 12:59:24 +01:00
Vít Ondruch
fcf414342b Include ruby-{default,bundled}-gems by default.
Users are expecting to have them available, because that is what
upstream does.
2024-12-19 12:57:51 +01:00
Vít Ondruch
c122b25ac6 Improve bundle gems prerelease handling.
This attempts to split pre-release version by `tilde`. This should
prevent issues such as:

~~~
Problem 1: package rubygems-devel-3.6.0.dev-15.fc42.noarch from copr_base requires ruby(rubygems) >= 3.6.0.dev-15.fc42, but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides rubygem(psych) >= 5.2.0.beta1 needed by rubygems-3.6.0.dev-15.fc42.noarch from copr_base
~~~

Where due to this change the `psych` virtual provide becomes:

~~~
rubygem(psych) = 5.2.0~beta1
~~~
2024-12-19 12:57:51 +01:00
Vít Ondruch
a7a0ab6ffe Extract %gem_version and %gem_prerelease for independent use
These macros are useful independently and makes the `%gem_name_version`
macro more comprehensive.
2024-12-19 12:57:51 +01:00
Vít Ondruch
e04500f716 Update the hardening values for AArch64 2024-12-19 12:57:51 +01:00
Vít Ondruch
28e9e680e6 Upgrade to Ruby 3.4.0 (3da3cabf98) 2024-12-19 12:57:48 +01:00
14 changed files with 378 additions and 565 deletions

View file

@ -2,17 +2,41 @@
%gem_dir %{_datadir}/gems %gem_dir %{_datadir}/gems
%gem_archdir %{_libdir}/gems %gem_archdir %{_libdir}/gems
# %gem_prerelease - Provides prerelease string if available.
#
# Usage: %gem_prerelease [custom_gem_name]
#
# If avilable, prints prerelease string, which is a %prerelease macro by
# default. When [custom_gem_name] is provided, the custom_gem_name is used to
# derive %custom_gem_name_prerelease macro, which can be predefined.
#
# Please note that for the prerelease macros are the dashes in
# [custom_gem_name] replaced by underscores.
#
%gem_prerelease() %{?1:%{expand:%%{?%{gsub %{1} - _}_prerelease}}}%{!?1:%{?prerelease}}
# %gem_version - Provides version string (including prerelease if available).
#
# Usage: %gem_version [custom_gem_name]
#
# Prints version (including prerelease string), that is %version macro by
# default. When [custom_gem_name] is provided, the custom_gem_name is used to
# derive %custom_gem_name_version macro which needs to be predefined.
#
# Please note that for the version macros are the dashes in [custom_gem_name]
# replaced by underscores.
#
%gem_version() %{?1:%{expand:%{%{gsub %{1} - _}_version}}}%{!?1:%{version}}%{gem_prerelease %{?1}}
# %gem_name_version - Provides gem_name-version string. # %gem_name_version - Provides gem_name-version string.
# #
# Usage: %gem_name_version [custom_gem_name] # Usage: %gem_name_version [custom_gem_name]
# #
# Prints gem_name-version string, by default joining %gem_name, %version and # Prints gem_name-version string, by default joining %gem_name, %version and
# %prerelease macros. When [custom_gem_name] is provided, the # %prerelease macros. When [custom_gem_name] is provided, the
# custom_gem_name is joined with %custom_gem_name_version macro which needs # custom_gem_name is joined with version as provided by %gem_version macro.
# to be predefined. Please note that for the version macros are the dashes
# replaced by underscores.
# #
%gem_name_version() %{?1}%{!?1:%{gem_name}}-%{?1:%{expand:%{%{gsub %{1} - _}_version}}}%{!?1:%{version}}%{?prerelease} %gem_name_version() %{?1}%{!?1:%{gem_name}}-%{gem_version %{?1}}
# Common gem locations and files. # Common gem locations and files.
# #

View file

@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
index d261ea57b5..3c13076b82 100644 index d261ea57b5..3c13076b82 100644
--- a/configure.ac --- a/configure.ac
+++ b/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}' archlibdir='${libdir}/${arch}'

View file

@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
index c42436c23d..d261ea57b5 100644 index c42436c23d..d261ea57b5 100644
--- a/configure.ac --- a/configure.ac
+++ b/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}' ruby_version_dir=/'${ruby_version_dir_name}'
if test -z "${ruby_version_dir_name}"; then 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 index 07076d4..35e6c3c 100755
--- a/tool/mkconfig.rb --- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb +++ b/tool/mkconfig.rb
@@ -115,7 +115,7 @@ @@ -116,7 +116,7 @@
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name case name
when /^prefix$/ when /^prefix$/

View file

@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
index 3c13076b82..93af30321d 100644 index 3c13076b82..93af30321d 100644
--- a/configure.ac --- a/configure.ac
+++ b/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, "`echo $0 | sed 's|.*/||'`")dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl

View file

@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
index 93af30321d..bc13397e0e 100644 index 93af30321d..bc13397e0e 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -4357,6 +4357,10 @@ AC_ARG_WITH(vendorarchdir, @@ -4402,6 +4402,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval], [vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) [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}"], [ AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX='' 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(vendordir)dnl
AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl AC_SUBST(vendorarchdir)dnl
@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index e9110a17ca..76a1f0a315 100755 index e9110a17ca..76a1f0a315 100755
--- a/tool/rbinstall.rb --- a/tool/rbinstall.rb
+++ b/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"] vendorlibdir = CONFIG["vendorlibdir"]
vendorarchlibdir = CONFIG["vendorarchdir"] vendorarchlibdir = CONFIG["vendorarchdir"]
end end
@ -75,7 +75,7 @@ index e9110a17ca..76a1f0a315 100755
mandir = CONFIG["mandir", true] mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true] docdir = CONFIG["docdir", true]
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' 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 install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir prepare "library scripts", rubylibdir
noinst = %w[*.txt *.rdoc *.gemspec] noinst = %w[*.txt *.rdoc *.gemspec]

View file

@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac
index 80b137e380..63cd3b4f8b 100644 index 80b137e380..63cd3b4f8b 100644
--- a/configure.ac --- a/configure.ac
+++ b/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)' rubyw_install_name='$(RUBYW_INSTALL_NAME)'
]) ])
@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix, AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR], 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(ridir)
AC_SUBST(RI_BASE_NAME) AC_SUBST(RI_BASE_NAME)
@ -122,7 +122,7 @@ index 80b137e380..63cd3b4f8b 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [ AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) 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(arch)dnl
AC_SUBST(sitearch)dnl AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl AC_SUBST(ruby_version)dnl
@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index d4c110e..d39c9a6 100755 index d4c110e..d39c9a6 100755
--- a/tool/rbinstall.rb --- a/tool/rbinstall.rb
+++ b/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 install?(:doc, :rdoc) do
if $rdocdir if $rdocdir
@ -262,7 +262,7 @@ diff --git a/configure.ac b/configure.ac
index a00f2b6776..999e2d6d5d 100644 index a00f2b6776..999e2d6d5d 100644
--- a/configure.ac --- a/configure.ac
+++ b/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"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBY_BASE_NAME)
AC_SUBST(RUBYW_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME)

View file

@ -44,7 +44,7 @@ diff --git a/common.mk b/common.mk
index b2e5b2b6d0..f39f81da5c 100644 index b2e5b2b6d0..f39f81da5c 100644
--- a/common.mk --- a/common.mk
+++ b/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/prism.$(OBJEXT) \
prism_init.$(OBJEXT) prism_init.$(OBJEXT)
@ -58,7 +58,7 @@ diff --git a/ruby.c b/ruby.c
index 60c57d6259..1eec16f2c8 100644 index 60c57d6259..1eec16f2c8 100644
--- a/ruby.c --- a/ruby.c
+++ b/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); void Init_builtin_features(void);
@ -84,5 +84,5 @@ index 60c57d6259..1eec16f2c8 100644
+ # Ignore ABRT + # Ignore ABRT
+ features -= %w[abrt] + features -= %w[abrt]
# Ignore CRuby internals # Ignore CRuby internals
features -= %w[encdb transdb windows_1252] features -= %w[encdb transdb windows_1252 windows_31j]
features.reject! { |feature| feature.end_with?('-fake') } features.reject! { |feature| feature.end_with?('-fake') }

View file

@ -12,9 +12,9 @@ diff --git a/common.mk b/common.mk
index d55d1788aa..73755f6ccd 100644 index d55d1788aa..73755f6ccd 100644
--- a/common.mk --- a/common.mk
+++ b/common.mk +++ b/common.mk
@@ -1601,8 +1601,6 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) @@ -1662,8 +1662,6 @@ no-test-bundled-gems-spec:
$(ACTIONS_ENDGROUP)
no-test-syntax-suggest: test-syntax-suggest:
-check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest -check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest
- -

View file

@ -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

View file

@ -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

View file

@ -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. # 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 ') 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`. # The bundled gem files permissions are overridden as 644 by `make install`.
# https://bugs.ruby-lang.org/issues/17840 # https://bugs.ruby-lang.org/issues/17840
# https://github.com/rubygems/rubygems/issues/5255 # https://github.com/rubygems/rubygems/issues/5255
# https://github.com/ruby/debug/pull/481 addFilter(r'^.*: E: non-executable-script /usr/share/gems/gems/(abbrev|getoptlong|nkf|observer|resolv|resolv-replace|rinda|syslog)-[\d\.]+/bin/\w+ 644 ')
# 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 ')
# Ruby provides API to set the cipher list. # 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$') addFilter(r'^ruby-libs\.\w+: W: crypto-policy-non-compliance-openssl /usr/lib(64)?/ruby/openssl.so SSL_CTX_set_cipher_list$')

489
ruby.spec
View file

@ -1,16 +1,16 @@
%global major_version 3 %global major_version 3
%global minor_version 3 %global minor_version 4
%global teeny_version 6 %global teeny_version 1
%global major_minor_version %{major_version}.%{minor_version} %global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version %{major_minor_version}.%{teeny_version}
%global ruby_release %{ruby_version} %global ruby_release %{ruby_version}
# Specify the named version. It has precedense to revision. # 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. # Keep the revision enabled for pre-releases from GIT.
#%%global revision ef084cc8f4 %dnl %global revision 48d4efcb85
%global ruby_archive %{name}-%{ruby_version} %global ruby_archive %{name}-%{ruby_version}
@ -27,118 +27,122 @@
%global rubygems_dir %{_datadir}/rubygems %global rubygems_dir %{_datadir}/rubygems
# Bundled libraries versions # Bundled libraries versions
%global rubygems_version 3.5.22 %global rubygems_version 3.6.2
%global rubygems_molinillo_version 0.8.0 %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_net_protocol_version 0.2.2
%global rubygems_optparse_version 0.4.0 %global rubygems_optparse_version 0.6.0
%global rubygems_resolv_version 0.4.0 %global rubygems_resolv_version 0.6.0
%global rubygems_securerandom_version 0.3.1 %global rubygems_securerandom_version 0.4.1
%global rubygems_timeout_version 0.4.1 %global rubygems_timeout_version 0.4.3
%global rubygems_tsort_version 0.2.0 %global rubygems_tsort_version 0.2.0
%global rubygems_uri_version 0.13.1 %global rubygems_uri_version 1.0.2
# Default gems. # Default gems.
%global bundler_version 2.5.22 %global bundler_version 2.6.2
%global bundler_connection_pool_version 2.4.1 %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_net_http_persistent_version 4.0.4
%global bundler_pub_grub_version 0.5.0 %global bundler_pub_grub_version 0.5.0
%global bundler_securerandom_version 0.3.1 %global bundler_securerandom_version 0.4.1
%global bundler_thor_version 1.3.0 %global bundler_thor_version 1.3.2
%global bundler_tsort_version 0.2.0 %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 benchmark_version 0.4.0
%global base64_version 0.2.0
%global benchmark_version 0.3.0
%global cgi_version 0.4.1 %global cgi_version 0.4.1
%global csv_version 3.2.8 %global date_version 3.4.1
%global date_version 3.3.4 %global delegate_version 0.4.0
%global delegate_version 0.3.1 %global did_you_mean_version 2.0.0
%global did_you_mean_version 1.6.3 %global digest_version 3.2.0
%global digest_version 3.1.1
%global drb_version 2.2.0
%global english_version 0.8.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 error_highlight_version 0.7.0
%global etc_version 1.4.3 %global etc_version 1.4.5
%global fcntl_version 1.1.0 %global fcntl_version 1.2.0
%global fiddle_version 1.1.2 %global fiddle_version 1.1.6
%global fileutils_version 1.7.2 %global fileutils_version 1.7.3
%global find_version 0.2.0 %global find_version 0.2.0
%global forwardable_version 1.3.3 %global forwardable_version 1.3.3
%global getoptlong_version 0.2.1 %global io_nonblock_version 0.3.1
%global io_nonblock_version 0.3.0
%global io_wait_version 0.3.1 %global io_wait_version 0.3.1
%global ipaddr_version 1.2.6 %global ipaddr_version 1.2.7
%global logger_version 1.6.0 %global logger_version 1.6.4
%global mutex_m_version 0.2.0 %global net_http_version 0.6.0
%global net_http_version 0.4.1
%global net_protocol_version 0.2.2 %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 open3_version 0.2.1
%global openssl_version 3.2.0 %global openssl_version 3.3.0
%global open_uri_version 0.4.1 %global open_uri_version 0.5.0
%global optparse_version 0.4.0 %global optparse_version 0.6.0
%global ostruct_version 0.6.0 %global ostruct_version 0.6.1
%global pathname_version 0.3.0 %global pathname_version 0.4.0
%global pp_version 0.5.0 %global pp_version 0.6.2
%global prettyprint_version 0.2.0 %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 readline_version 0.0.4
%global reline_version 0.5.10 %global reline_version 0.6.0
%global resolv_version 0.3.0 %global resolv_version 0.6.0
%global resolv_replace_version 0.1.1
%global rinda_version 0.2.0
%global ruby2_keywords_version 0.0.5 %global ruby2_keywords_version 0.0.5
%global securerandom_version 0.3.1 %global securerandom_version 0.4.1
%global set_version 1.1.0 %global set_version 1.1.1
%global shellwords_version 0.2.0 %global shellwords_version 0.2.2
%global singleton_version 0.2.0 %global singleton_version 0.3.0
%global stringio_version 3.1.1 %global stringio_version 3.1.2
%global strscan_version 3.0.9 %global strscan_version 3.1.2
%global syntax_suggest_version 2.0.1 %global syntax_suggest_version 2.0.2
%global syslog_version 0.1.2 %global syslog_version 0.2.0
%global tempfile_version 0.2.1 %global tempfile_version 0.3.1
%global time_version 0.3.0 %global time_version 0.4.1
%global timeout_version 0.4.1 %global timeout_version 0.4.3
%global tmpdir_version 0.2.0 %global tmpdir_version 0.3.1
%global tsort_version 0.2.0 %global tsort_version 0.2.0
%global un_version 0.3.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 weakref_version 0.1.3
%global win32ole_version 1.8.10 %global win32ole_version 1.9.1
%global yaml_version 0.3.0 %global win32_registry_version 0.1.0
%global prism_version 0.19.0 %global yaml_version 0.4.0
%global zlib_version 3.1.1 %global zlib_version 3.2.1
# Gemified default gems. # Gemified default gems.
%global bigdecimal_version 3.1.5 %global io_console_version 0.8.0
%global io_console_version 0.7.1 %global irb_version 1.14.3
%global irb_version 1.13.1 %global json_version 2.9.1
%global json_version 2.7.2 %global psych_version 5.2.2
%global psych_version 5.1.2 %global rdoc_version 6.10.0
%global rdoc_version 6.6.3.1
# Bundled gems. # Bundled gems.
%global debug_version 1.9.2 %global abbrev_version 0.1.2
%global net_ftp_version 0.3.4 %global base64_version 0.2.0
%global net_imap_version 0.4.9.1 %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_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 matrix_version 0.4.2
%global minitest_version 5.20.0 %global minitest_version 5.25.4
%global power_assert_version 2.0.3 %global mutex_m_version 0.3.0
%global prime_version 0.1.2 %global observer_version 0.1.2
%global racc_version 1.7.3 %global power_assert_version 2.0.5
%global rake_version 13.1.0 %global prime_version 0.1.3
%global rbs_version 3.4.0 %global racc_version 1.8.1
%global rexml_version 3.3.9 %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 rss_version 0.3.1
%global test_unit_version 3.6.1 %global syslog_version 0.2.0
%global typeprof_version 0.21.9 %global test_unit_version 3.6.7
%global typeprof_version 0.30.1
# Bundled nkf version # Bundled nkf version
%global bundled_nkf_version 2.1.5 %global bundled_nkf_version 2.1.5
@ -183,12 +187,6 @@ Release: 18%{?dist}
# GPL-1.0-or-later OR Artistic-1.0-Perl: win32/win32.c, include/ruby/win32.h, # GPL-1.0-or-later OR Artistic-1.0-Perl: win32/win32.c, include/ruby/win32.h,
# ext/win32ole/win32ole.c # 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: # Licenses under review:
# .bundle/gems/net-imap-0.4.9/LICENSE.txt # .bundle/gems/net-imap-0.4.9/LICENSE.txt
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/506 # https://gitlab.com/fedora/legal/fedora-license-data/-/issues/506
@ -237,6 +235,10 @@ Source16: rpm_test_helper.rb
Source17: test_rubygems_req.rb Source17: test_rubygems_req.rb
Source18: test_rubygems_prov.rb Source18: test_rubygems_prov.rb
Source19: test_rubygems_con.rb Source19: test_rubygems_con.rb
# This file is available in official RDoc 6.9+, while it is missing from
# default RDoc gem as shipped in Ruby tarball. This should not be needed for
# Ruby 3.5+.
Source20: https://github.com/ruby/rdoc/blob/master/lib/rubygems_plugin.rb
# The load directive is supported since RPM 4.12, i.e. F21+. The build process # The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras. # fails on older Fedoras.
@ -276,20 +278,12 @@ Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch
# Disable syntax_suggest test suite, which tries to download its dependencies. # Disable syntax_suggest test suite, which tries to download its dependencies.
# https://bugs.ruby-lang.org/issues/19297 # https://bugs.ruby-lang.org/issues/19297
Patch9: ruby-3.3.0-Disable-syntax-suggest-test-case.patch 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} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%{?with_rubypick:Suggests: rubypick} %{?with_rubypick:Suggests: rubypick}
Recommends: ruby(rubygems) >= %{rubygems_version} Recommends: ruby(rubygems) >= %{rubygems_version}
Recommends: ruby-default-gems >= %{version}-%{release}
Recommends: ruby-bundled-gems >= %{version}-%{release}
Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} Recommends: rubygem(bigdecimal) >= %{bigdecimal_version}
# Build dependencies # Build dependencies
@ -363,11 +357,6 @@ Provides: bundled(ccan-check_type)
Provides: bundled(ccan-container_of) Provides: bundled(ccan-container_of)
Provides: bundled(ccan-list) 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. # StdLib default gems.
Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version} Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version}
Provides: bundled(rubygem-openssl) = %{openssl_version} Provides: bundled(rubygem-openssl) = %{openssl_version}
@ -404,7 +393,7 @@ Requires: ruby(release)
Recommends: rubygem(bundler) >= %{bundler_version} Recommends: rubygem(bundler) >= %{bundler_version}
Recommends: rubygem(rdoc) >= %{rdoc_version} Recommends: rubygem(rdoc) >= %{rdoc_version}
Recommends: rubygem(io-console) 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: gem = %{version}-%{release}
Provides: ruby(rubygems) = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release}
Provides: bundled(rubygems) = %{rubygems_version} Provides: bundled(rubygems) = %{rubygems_version}
@ -542,8 +531,7 @@ provide higher layer features, such like curses and readline.
%package -n rubygem-json %package -n rubygem-json
Summary: This is a JSON implementation as a Ruby extension in C Summary: This is a JSON implementation as a Ruby extension in C
Version: %{json_version} Version: %{json_version}
# Unicode-DFS-2015: ext/json/ext/generator/generator.c License: Ruby OR BSD-2-Clause
License: (Ruby OR BSD-2-Clause) AND Unicode-DFS-2015
Provides: bundled(rubygem-json) = %{json_version} Provides: bundled(rubygem-json) = %{json_version}
%description -n rubygem-json %description -n rubygem-json
@ -555,9 +543,9 @@ markup language.
%package -n rubygem-psych %package -n rubygem-psych
Summary: A libyaml wrapper for Ruby Summary: A libyaml wrapper for Ruby
Version: %{psych_version} Version: %{psych_version}%{?psych_prerelease:~%{sub %{psych_prerelease} 2 -1}}
License: MIT 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 %description -n rubygem-psych
Psych is a YAML parser and emitter. Psych leverages Psych is a YAML parser and emitter. Psych leverages
@ -604,13 +592,30 @@ many machines, systematically and repeatably.
%package bundled-gems %package bundled-gems
Summary: Bundled gems which are part of Ruby StdLib 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-debug) = %{debug_version}
Provides: bundled(rubygem-drb) = %{drb_version}
Provides: bundled(rubygem-getoptlong) = %{getoptlong_version}
Provides: bundled(rubygem-matrix) = %{matrix_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-ftp) = %{net_ftp_version}
Provides: bundled(rubygem-net-imap) = %{net_imap_version} Provides: bundled(rubygem-net-imap) = %{net_imap_version}
Provides: bundled(rubygem-net-pop) = %{net_pop_version} Provides: bundled(rubygem-net-pop) = %{net_pop_version}
Provides: bundled(rubygem-net-smtp) = %{net_smtp_version} Provides: bundled(rubygem-net-smtp) = %{net_smtp_version}
Provides: bundled(rubygem-nkf) = %{nkf_version}
Provides: bundled(rubygem-prime) = %{prime_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 %description bundled-gems
Bundled gems which are part of Ruby StdLib. While being part of Ruby, these Bundled gems which are part of Ruby StdLib. While being part of Ruby, these
@ -764,8 +769,6 @@ analysis result in RBS format, a standard type description format for Ruby
%patch 4 -p1 %patch 4 -p1
%patch 6 -p1 %patch 6 -p1
%patch 9 -p1 %patch 9 -p1
%patch 12 -p1
%patch 13 -p1
# Provide an example of usage of the tapset: # Provide an example of usage of the tapset:
cp -a %{SOURCE3} . cp -a %{SOURCE3} .
@ -817,6 +820,16 @@ rm -rf %{buildroot}
# multilib systems and install config.h wrapper # multilib systems and install config.h wrapper
%multilib_fix_c_header --file %{_includedir}/%{name}/config.h %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. # Rename the ruby executable. It is replaced by RubyPick.
%{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} %{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}}
@ -864,7 +877,7 @@ mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir}
mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name} mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name}
# Move bundled rubygems to %%gem_dir and %%gem_extdir_mri # 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} mkdir -p %{buildroot}%{gem_libdir irb}
mv %{buildroot}%{ruby_libdir}/irb* %{buildroot}%{gem_libdir irb} mv %{buildroot}%{ruby_libdir}/irb* %{buildroot}%{gem_libdir irb}
mv %{buildroot}%{gem_spec -d irb} %{buildroot}%{gem_spec irb} mv %{buildroot}%{gem_spec -d irb} %{buildroot}%{gem_spec irb}
@ -880,15 +893,16 @@ popd
mkdir -p %{buildroot}%{gem_libdir rdoc} mkdir -p %{buildroot}%{gem_libdir rdoc}
mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_libdir rdoc} mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_libdir rdoc}
mv %{buildroot}%{gem_spec -d rdoc} %{buildroot}%{gem_spec rdoc} mv %{buildroot}%{gem_spec -d rdoc} %{buildroot}%{gem_spec rdoc}
# Default gem is missing the RubyGems plugin, using various sorts of
mkdir -p %{buildroot}%{gem_libdir bigdecimal} # heuristics to workadound this. Restore the plugin to let the documentaion
mkdir -p %{buildroot}%{gem_extdir_mri bigdecimal} # generator work properly. This shold not be needed for Ruby 3.5+.
mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_libdir bigdecimal} # https://github.com/ruby/rdoc/pull/1171
mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{gem_extdir_mri bigdecimal} # https://github.com/rubygems/rubygems/pull/8340
touch %{buildroot}%{gem_extdir_mri bigdecimal}/gem.build_complete # Make sure to not overwrite the file, because it should not exist.
mv %{buildroot}%{gem_spec -d bigdecimal} %{buildroot}%{gem_spec bigdecimal} test ! -e %{buildroot}%{gem_libdir rdoc}/%{basename:%{SOURCE20}}
ln -s %{gem_libdir bigdecimal}/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal mv %{SOURCE20} %{buildroot}%{gem_libdir rdoc}
ln -s %{gem_extdir_mri bigdecimal}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so echo "require_relative '../gems/rdoc-%{rdoc_version}/lib/rubygems_plugin.rb'" \
> %{buildroot}%{gem_plugin rdoc}
# TODO: Put help files into proper location. # TODO: Put help files into proper location.
# https://bugs.ruby-lang.org/issues/15359 # https://bugs.ruby-lang.org/issues/15359
@ -968,9 +982,9 @@ sed -i 's/^/%lang(ja) /' .ruby-doc.ja
%check %check
%if 0%{?with_hardening_test} %if 0%{?with_hardening_test}
# Check Ruby hardening. # 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_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_ppc64le fortified="7" fortify-able="24"
%define fortification_s390x fortified="10" fortify-able="24" %define fortification_s390x fortified="10" fortify-able="24"
%define fortification_riscv64 fortified="10" fortify-able="26" %define fortification_riscv64 fortified="10" fortify-able="26"
@ -1145,6 +1159,7 @@ make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \
# Nkf. # Nkf.
make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \ make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \
require 'rubygems'; \
require 'nkf'; \ require 'nkf'; \
puts '%%{bundled_nkf_version}: %{bundled_nkf_version}'; \ puts '%%{bundled_nkf_version}: %{bundled_nkf_version}'; \
puts %Q[NKF::NKF_VERSION: #{NKF::NKF_VERSION}]; \ puts %Q[NKF::NKF_VERSION: #{NKF::NKF_VERSION}]; \
@ -1239,21 +1254,16 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
# List all these files explicitly to prevent surprises # List all these files explicitly to prevent surprises
# Platform independent libraries. # Platform independent libraries.
%dir %{ruby_libdir} %dir %{ruby_libdir}
%exclude %{ruby_libdir}/bigdecimal*
%exclude %{ruby_libdir}/irb* %exclude %{ruby_libdir}/irb*
%exclude %{ruby_libdir}/json* %exclude %{ruby_libdir}/json*
%exclude %{ruby_libdir}/psych* %exclude %{ruby_libdir}/psych*
%{ruby_libdir}/abbrev.rb
%{ruby_libdir}/base64.rb
%{ruby_libdir}/benchmark* %{ruby_libdir}/benchmark*
%{ruby_libdir}/bundled_gems.rb %{ruby_libdir}/bundled_gems.rb
%{ruby_libdir}/cgi* %{ruby_libdir}/cgi*
%{ruby_libdir}/coverage.rb %{ruby_libdir}/coverage.rb
%{ruby_libdir}/csv*
%{ruby_libdir}/date.rb %{ruby_libdir}/date.rb
%{ruby_libdir}/delegate* %{ruby_libdir}/delegate*
%{ruby_libdir}/digest* %{ruby_libdir}/digest*
%{ruby_libdir}/drb*
%{ruby_libdir}/English.rb %{ruby_libdir}/English.rb
%{ruby_libdir}/erb* %{ruby_libdir}/erb*
%{ruby_libdir}/error_highlight* %{ruby_libdir}/error_highlight*
@ -1262,16 +1272,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{ruby_libdir}/fileutils.rb %{ruby_libdir}/fileutils.rb
%{ruby_libdir}/find.rb %{ruby_libdir}/find.rb
%{ruby_libdir}/forwardable* %{ruby_libdir}/forwardable*
%{ruby_libdir}/getoptlong*
%{ruby_libdir}/ipaddr.rb %{ruby_libdir}/ipaddr.rb
%{ruby_libdir}/kconv.rb
%{ruby_libdir}/logger* %{ruby_libdir}/logger*
%{ruby_libdir}/mkmf.rb %{ruby_libdir}/mkmf.rb
%{ruby_libdir}/monitor.rb %{ruby_libdir}/monitor.rb
%{ruby_libdir}/mutex_m.rb
%{ruby_libdir}/net %{ruby_libdir}/net
%{ruby_libdir}/objspace* %{ruby_libdir}/objspace*
%{ruby_libdir}/observer*
%{ruby_libdir}/open-uri.rb %{ruby_libdir}/open-uri.rb
%{ruby_libdir}/open3* %{ruby_libdir}/open3*
%{ruby_libdir}/optionparser.rb %{ruby_libdir}/optionparser.rb
@ -1285,8 +1291,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{ruby_libdir}/readline.rb %{ruby_libdir}/readline.rb
%{ruby_libdir}/reline* %{ruby_libdir}/reline*
%{ruby_libdir}/resolv.rb %{ruby_libdir}/resolv.rb
%{ruby_libdir}/resolv-replace.rb
%{ruby_libdir}/rinda
%{ruby_libdir}/ripper* %{ruby_libdir}/ripper*
%dir %{ruby_libdir}/ruby_vm %dir %{ruby_libdir}/ruby_vm
%{ruby_libdir}/ruby_vm/rjit %{ruby_libdir}/ruby_vm/rjit
@ -1295,8 +1299,8 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{ruby_libdir}/shellwords.rb %{ruby_libdir}/shellwords.rb
%{ruby_libdir}/singleton* %{ruby_libdir}/singleton*
%{ruby_libdir}/socket.rb %{ruby_libdir}/socket.rb
%{ruby_libdir}/strscan
%{ruby_libdir}/syntax_suggest* %{ruby_libdir}/syntax_suggest*
%{ruby_libdir}/syslog
%{ruby_libdir}/tempfile.rb %{ruby_libdir}/tempfile.rb
%{ruby_libdir}/timeout* %{ruby_libdir}/timeout*
%{ruby_libdir}/time.rb %{ruby_libdir}/time.rb
@ -1395,7 +1399,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{ruby_libarchdir}/io/nonblock.so %{ruby_libarchdir}/io/nonblock.so
%{ruby_libarchdir}/io/wait.so %{ruby_libarchdir}/io/wait.so
%{ruby_libarchdir}/monitor.so %{ruby_libarchdir}/monitor.so
%{ruby_libarchdir}/nkf.so
%{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/objspace.so
%{ruby_libarchdir}/pathname.so %{ruby_libarchdir}/pathname.so
%{ruby_libarchdir}/pty.so %{ruby_libarchdir}/pty.so
@ -1406,7 +1409,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{ruby_libarchdir}/socket.so %{ruby_libarchdir}/socket.so
%{ruby_libarchdir}/stringio.so %{ruby_libarchdir}/stringio.so
%{ruby_libarchdir}/strscan.so %{ruby_libarchdir}/strscan.so
%{ruby_libarchdir}/syslog.so
%{ruby_libarchdir}/zlib.so %{ruby_libarchdir}/zlib.so
# Default gems # Default gems
@ -1446,16 +1448,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{_rpmconfigdir}/rubygems.con %{_rpmconfigdir}/rubygems.con
%files default-gems %files default-gems
%gem_spec -d abbrev
%gem_spec -d base64
%gem_spec -d benchmark %gem_spec -d benchmark
%gem_spec -d cgi %gem_spec -d cgi
%gem_spec -d csv
%gem_spec -d date %gem_spec -d date
%gem_spec -d delegate %gem_spec -d delegate
%gem_spec -d did_you_mean %gem_spec -d did_you_mean
%gem_spec -d digest %gem_spec -d digest
%gem_spec -d drb
%gem_spec -d english %gem_spec -d english
%gem_spec -d erb %gem_spec -d erb
%gem_instdir erb %gem_instdir erb
@ -1468,16 +1466,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%gem_spec -d fileutils %gem_spec -d fileutils
%gem_spec -d find %gem_spec -d find
%gem_spec -d forwardable %gem_spec -d forwardable
%gem_spec -d getoptlong
%gem_spec -d io-nonblock %gem_spec -d io-nonblock
%gem_spec -d io-wait %gem_spec -d io-wait
%gem_spec -d ipaddr %gem_spec -d ipaddr
%gem_spec -d logger %gem_spec -d logger
%gem_spec -d mutex_m
%gem_spec -d net-http %gem_spec -d net-http
%gem_spec -d net-protocol %gem_spec -d net-protocol
%gem_spec -d nkf
%gem_spec -d observer
%gem_spec -d open3 %gem_spec -d open3
%gem_spec -d open-uri %gem_spec -d open-uri
%gem_spec -d optparse %gem_spec -d optparse
@ -1490,8 +1484,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%gem_spec -d readline %gem_spec -d readline
%gem_spec -d reline %gem_spec -d reline
%gem_spec -d resolv %gem_spec -d resolv
%gem_spec -d resolv-replace
%gem_spec -d rinda
%gem_spec -d ruby2_keywords %gem_spec -d ruby2_keywords
%gem_spec -d securerandom %gem_spec -d securerandom
%gem_spec -d set %gem_spec -d set
@ -1502,7 +1494,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%gem_spec -d syntax_suggest %gem_spec -d syntax_suggest
%{_bindir}/syntax_suggest %{_bindir}/syntax_suggest
%gem_instdir syntax_suggest %gem_instdir syntax_suggest
%gem_spec -d syslog
%gem_spec -d tempfile %gem_spec -d tempfile
%gem_spec -d time %gem_spec -d time
%gem_spec -d timeout %gem_spec -d timeout
@ -1512,6 +1503,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%gem_spec -d uri %gem_spec -d uri
%gem_spec -d weakref %gem_spec -d weakref
#%%gem_spec -d win32ole #%%gem_spec -d win32ole
#%%gem_spec -d win32-registry
%gem_spec -d yaml %gem_spec -d yaml
%gem_spec -d prism %gem_spec -d prism
%gem_spec -d zlib %gem_spec -d zlib
@ -1528,6 +1520,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{_bindir}/ri %{_bindir}/ri
%{gem_instdir rdoc} %{gem_instdir rdoc}
%{gem_spec rdoc} %{gem_spec rdoc}
%{gem_plugin rdoc}
%{_mandir}/man1/ri* %{_mandir}/man1/ri*
%files doc -f .ruby-doc.en -f .ruby-doc.ja %files doc -f .ruby-doc.en -f .ruby-doc.ja
@ -1537,8 +1530,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{_datadir}/ri %{_datadir}/ri
%files -n rubygem-bigdecimal %files -n rubygem-bigdecimal
%{ruby_libdir}/bigdecimal*
%{ruby_libarchdir}/bigdecimal*
%{gem_extdir_mri bigdecimal} %{gem_extdir_mri bigdecimal}
%{gem_instdir bigdecimal} %{gem_instdir bigdecimal}
%{gem_spec bigdecimal} %{gem_spec bigdecimal}
@ -1575,27 +1566,68 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{_mandir}/man5/gemfile.5* %{_mandir}/man5/gemfile.5*
%files bundled-gems %files bundled-gems
# rdbg # abbrev
%{_bindir}/rdbg %dir %{gem_instdir abbrev}
%dir %{gem_extdir_mri debug} %license %{gem_instdir abbrev}/LICENSE.txt
%{gem_extdir_mri debug}/gem.build_complete %{gem_instdir abbrev}/bin
%dir %{gem_extdir_mri debug}/debug %{gem_libdir abbrev}
%{gem_extdir_mri debug}/debug/debug.so %{gem_spec abbrev}
%dir %{gem_instdir debug} %{gem_instdir abbrev}/Gemfile
%exclude %{gem_instdir debug}/.* %doc %{gem_instdir abbrev}/README.md
%doc %{gem_instdir debug}/CONTRIBUTING.md %{gem_instdir abbrev}/Rakefile
%{gem_instdir debug}/Gemfile
%license %{gem_instdir debug}/LICENSE.txt # base64
%doc %{gem_instdir debug}/README.md %dir %{gem_instdir base64}
%{gem_instdir debug}/Rakefile %license %{gem_instdir base64}/LICENSE.txt
%doc %{gem_instdir debug}/TODO.md %{gem_libdir base64}
%{gem_instdir debug}/exe %{gem_spec base64}
%{gem_libdir debug} %doc %{gem_instdir base64}/README.md
%{gem_instdir debug}/misc
%{gem_spec debug} # 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 # net-ftp
%dir %{gem_instdir net-ftp} %dir %{gem_instdir net-ftp}
%license %{gem_instdir net-ftp}/BSDL
%license %{gem_instdir net-ftp}/COPYING
%{gem_instdir net-ftp}/Gemfile %{gem_instdir net-ftp}/Gemfile
%license %{gem_instdir net-ftp}/LICENSE.txt %license %{gem_instdir net-ftp}/LICENSE.txt
%doc %{gem_instdir net-ftp}/README.md %doc %{gem_instdir net-ftp}/README.md
@ -1605,6 +1637,8 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
# net-imap # net-imap
%dir %{gem_instdir net-imap} %dir %{gem_instdir net-imap}
%license %{gem_instdir net-imap}/BSDL
%license %{gem_instdir net-imap}/COPYING
%{gem_instdir net-imap}/Gemfile %{gem_instdir net-imap}/Gemfile
%license %{gem_instdir net-imap}/LICENSE.txt %license %{gem_instdir net-imap}/LICENSE.txt
%doc %{gem_instdir net-imap}/README.md %doc %{gem_instdir net-imap}/README.md
@ -1612,6 +1646,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{gem_instdir net-imap}/docs %{gem_instdir net-imap}/docs
%{gem_libdir net-imap} %{gem_libdir net-imap}
%{gem_instdir net-imap}/rakelib %{gem_instdir net-imap}/rakelib
%{gem_instdir net-imap}/sample
%{gem_spec net-imap} %{gem_spec net-imap}
# net-pop # net-pop
@ -1631,22 +1666,100 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{gem_libdir net-smtp} %{gem_libdir net-smtp}
%{gem_spec net-smtp} %{gem_spec net-smtp}
# matrix # nkf
%dir %{gem_instdir matrix} %dir %{gem_instdir nkf}
%license %{gem_instdir matrix}/LICENSE.txt %{gem_extdir_mri nkf}
%{gem_libdir matrix} %license %{gem_instdir nkf}/LICENSE.txt
%{gem_spec matrix} %{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 # prime
%dir %{gem_instdir prime} %dir %{gem_instdir prime}
%{gem_instdir prime}/Gemfile %license %{gem_instdir prime}/BSDL
%license %{gem_instdir prime}/LICENSE.txt %license %{gem_instdir prime}/COPYING
%doc %{gem_instdir prime}/README.md %doc %{gem_instdir prime}/README.md
%{gem_instdir prime}/Rakefile %{gem_instdir prime}/Rakefile
%{gem_instdir prime}/bin
%{gem_libdir prime} %{gem_libdir prime}
%{gem_instdir prime}/sig
%{gem_spec 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 %files -n rubygem-minitest
%dir %{gem_instdir minitest} %dir %{gem_instdir minitest}
%exclude %{gem_instdir minitest}/.* %exclude %{gem_instdir minitest}/.*
@ -1683,22 +1796,24 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{gem_extdir_mri rbs}/gem.build_complete %{gem_extdir_mri rbs}/gem.build_complete
%{gem_extdir_mri rbs}/rbs_extension.so %{gem_extdir_mri rbs}/rbs_extension.so
%dir %{gem_instdir rbs} %dir %{gem_instdir rbs}
%exclude %{gem_instdir rbs}/.*
%license %{gem_instdir rbs}/BSDL %license %{gem_instdir rbs}/BSDL
%doc %{gem_instdir rbs}/CHANGELOG.md %doc %{gem_instdir rbs}/CHANGELOG.md
%license %{gem_instdir rbs}/COPYING %license %{gem_instdir rbs}/COPYING
%{gem_instdir rbs}/Gemfile*
%doc %{gem_instdir rbs}/README.md %doc %{gem_instdir rbs}/README.md
%{gem_instdir rbs}/Rakefile %{gem_instdir rbs}/Rakefile
%{gem_instdir rbs}/Steepfile %{gem_instdir rbs}/Steepfile
%{gem_instdir rbs}/config.yml
%{gem_instdir rbs}/core %{gem_instdir rbs}/core
%doc %{gem_instdir rbs}/docs %doc %{gem_instdir rbs}/docs
%{gem_instdir rbs}/exe %{gem_instdir rbs}/exe
%{gem_instdir rbs}/goodcheck.yml %{gem_instdir rbs}/goodcheck.yml
%{gem_instdir rbs}/include
%{gem_libdir rbs} %{gem_libdir rbs}
%{gem_instdir rbs}/schema %{gem_instdir rbs}/schema
%{gem_instdir rbs}/sig %{gem_instdir rbs}/sig
%{gem_instdir rbs}/src
%{gem_instdir rbs}/stdlib %{gem_instdir rbs}/stdlib
%{gem_instdir rbs}/templates
%{gem_spec rbs} %{gem_spec rbs}
%files -n rubygem-test-unit %files -n rubygem-test-unit
@ -1717,6 +1832,7 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%dir %{gem_instdir racc} %dir %{gem_instdir racc}
%{_bindir}/racc %{_bindir}/racc
%{gem_extdir_mri racc} %{gem_extdir_mri racc}
%license %{gem_instdir racc}/BSDL
%license %{gem_instdir racc}/COPYING %license %{gem_instdir racc}/COPYING
%doc %{gem_instdir racc}/ChangeLog %doc %{gem_instdir racc}/ChangeLog
%lang(ja) %doc %{gem_instdir racc}/README.ja.rdoc %lang(ja) %doc %{gem_instdir racc}/README.ja.rdoc
@ -1750,17 +1866,18 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
%{_bindir}/typeprof %{_bindir}/typeprof
%exclude %{gem_instdir typeprof}/.* %exclude %{gem_instdir typeprof}/.*
%license %{gem_instdir typeprof}/LICENSE %license %{gem_instdir typeprof}/LICENSE
%{gem_instdir typeprof}/exe %{gem_instdir typeprof}/bin
%doc %{gem_instdir typeprof}/doc
%{gem_libdir typeprof} %{gem_libdir typeprof}
%doc %{gem_instdir typeprof}/tools
%exclude %{gem_instdir typeprof}/typeprof-lsp
%{gem_spec typeprof} %{gem_spec typeprof}
%doc %{gem_instdir typeprof}/Gemfile*
%doc %{gem_instdir typeprof}/README.md %doc %{gem_instdir typeprof}/README.md
%doc %{gem_instdir typeprof}/Rakefile
%changelog %changelog
* Thu Jan 02 2025 Vít Ondruch <vondruch@redhat.com> - 3.4.1-18
- Upgrade to Ruby 3.4.1.
Resolves: rhbz#2334047
* Mon Dec 16 2024 Jun Aruga <jaruga@redhat.com> - 3.3.6-18 * Mon Dec 16 2024 Jun Aruga <jaruga@redhat.com> - 3.3.6-18
- Fix Ruby OpenSSL to respect crypto-policies TLS minimal version. - Fix Ruby OpenSSL to respect crypto-policies TLS minimal version.

23
rubygems_plugin.rb Normal file
View file

@ -0,0 +1,23 @@
# frozen_string_literal: true
# If this file is exist, RDoc generates and removes documents by rubygems plugins.
#
# In follwing cases,
# RubyGems directly exectute RDoc::RubygemsHook.generation_hook and RDoc::RubygemsHook#remove to generate and remove documents.
#
# - RDoc is used as a default gem.
# - RDoc is a old version that doesn't have rubygems_plugin.rb.
require_relative 'rdoc/rubygems_hook'
# To install dependency libraries of RDoc, you need to run bundle install.
# At that time, rdoc/markdown is not generated.
# If generate and remove are executed at that time, an error will occur.
# So, we can't register generate and remove to Gem at that time.
begin
require_relative 'rdoc/markdown'
rescue LoadError
else
Gem.done_installing(&RDoc::RubyGemsHook.method(:generate))
Gem.pre_uninstall(&RDoc::RubyGemsHook.method(:remove))
end

View file

@ -1 +1 @@
SHA512 (ruby-3.3.6.tar.xz) = c4b86188bf539fa737932e1ba5b746bc295e7c43b2f8cca2668eb7c88aa7228e2ce9032bbcd244a7d558a11bc842445b5fbeac3503ca7d223b63c53e08dba4ab SHA512 (ruby-3.4.1.tar.xz) = 8d2e34117696f9debf463ae1eed288fdbb5c1a12e32800e901b69218e3b7302a0066052077e2ebca851e3a635296199bd5a10437eea1d6f787f69a77bb865680