Update to Ruby 2.6.3 by merging Fedora master branch (commit: 1cc2a49
)
Resolves: rhbz#1672575
This commit is contained in:
parent
b5b3a8bc0d
commit
86bf30d871
@ -21,7 +21,7 @@
|
||||
%gem_install(d:n:) \
|
||||
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
|
||||
\
|
||||
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
|
||||
CONFIGURE_ARGS="--with-cflags='%{optflags}' --with-cxxflags='%{optflags}' $CONFIGURE_ARGS" \\\
|
||||
gem install \\\
|
||||
-V \\\
|
||||
--local \\\
|
||||
|
@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
|
||||
index 682eb46..e6b1445 100644
|
||||
--- a/lib/mkmf.rb
|
||||
+++ b/lib/mkmf.rb
|
||||
@@ -1900,7 +1900,7 @@ def configuration(srcdir)
|
||||
@@ -1911,7 +1911,7 @@ def configuration(srcdir)
|
||||
SHELL = /bin/sh
|
||||
|
||||
# V=0 quiet, V=1 verbose. other values don't work.
|
||||
|
@ -13,9 +13,9 @@ diff --git a/Makefile.in b/Makefile.in
|
||||
index 7e8ed82..7916993 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -119,6 +119,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
|
||||
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
|
||||
BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
|
||||
@@ -154,6 +154,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
|
||||
COROUTINE_H = @X_FIBER_COROUTINE_H@
|
||||
COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@)
|
||||
|
||||
+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@
|
||||
+
|
||||
@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk
|
||||
index 5cfbc3d..3f0a82e 100644
|
||||
--- a/common.mk
|
||||
+++ b/common.mk
|
||||
@@ -147,7 +147,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
|
||||
@@ -156,7 +156,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
|
||||
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
|
||||
|
||||
DEFAULT_PRELUDES = $(GEM_PRELUDE)
|
||||
@ -39,7 +39,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 028ef7ca3e..cdeff87871 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4397,6 +4397,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
||||
@@ -3855,6 +3855,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
||||
AC_SUBST(sitearchhdrdir)dnl
|
||||
AC_SUBST(vendorarchhdrdir)dnl
|
||||
|
||||
|
@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 11fc237552..b77e88fc37 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3642,6 +3642,11 @@ AS_IF([test ${multiarch+set}], [
|
||||
@@ -3085,6 +3085,11 @@ AS_IF([test ${multiarch+set}], [
|
||||
])
|
||||
|
||||
archlibdir='${libdir}/${arch}'
|
||||
|
@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 999e2d6d5d..11fc237552 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4252,7 +4252,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||
@@ -3710,7 +3710,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
|
||||
@@ -111,7 +111,7 @@
|
||||
@@ -114,7 +114,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 b77e88fc37..6bba453e3c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4316,6 +4316,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
@@ -3774,6 +3774,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
|
||||
|
||||
|
@ -8,14 +8,14 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of
|
||||
configure.ac | 5 +++++
|
||||
loadpath.c | 4 ++++
|
||||
template/verconf.h.tmpl | 3 +++
|
||||
tool/rbinstall.rb | 7 +++++++
|
||||
4 files changed, 19 insertions(+)
|
||||
tool/rbinstall.rb | 10 ++++++++++
|
||||
4 files changed, 22 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6bba453e3c..028ef7ca3e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4288,6 +4288,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
@@ -3746,6 +3746,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
[vendorarchdir=$withval],
|
||||
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
|
||||
|
||||
@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644
|
||||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=''
|
||||
@@ -4312,6 +4316,7 @@ AC_SUBST(sitearchdir)dnl
|
||||
@@ -3770,6 +3774,7 @@ AC_SUBST(sitearchdir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
AC_SUBST(vendorlibdir)dnl
|
||||
AC_SUBST(vendorarchdir)dnl
|
||||
@ -67,24 +67,27 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index b47b6e1..0b99408 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -331,6 +331,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -334,6 +334,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
sitearchlibdir = CONFIG["sitearchdir"]
|
||||
vendorlibdir = CONFIG["vendorlibdir"]
|
||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||
+rubygemsdir = CONFIG["rubygemsdir"]
|
||||
mandir = CONFIG["mandir", true]
|
||||
docdir = CONFIG["docdir", true]
|
||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||
@@ -537,7 +538,13 @@ def install(src, cmd)
|
||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||
@@ -560,7 +561,16 @@ def stub
|
||||
install?(:local, :comm, :lib) do
|
||||
prepare "library scripts", rubylibdir
|
||||
noinst = %w[*.txt *.rdoc *.gemspec]
|
||||
+ noinst += %w[rubygems.rb rubygems/ datadir.rb] if rubygemsdir
|
||||
+ # Bundler carries "rubygems.rb" file, so it must be specialcased :/
|
||||
+ noinst += %w[rubygems.rb rubygems/ bundler.rb bundler/] if rubygemsdir
|
||||
install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode)
|
||||
+ if rubygemsdir
|
||||
+ noinst = %w[obsolete.rb]
|
||||
+ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode)
|
||||
+ noinst = %w[*.txt *.rdoc *.gemspec]
|
||||
+ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :no_install => noinst, :mode => $data_mode)
|
||||
+ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode)
|
||||
+ install_recursive(File.join(srcdir, "lib", "bundler"), File.join(rubylibdir, "bundler"), :no_install => noinst, :mode => $data_mode)
|
||||
+ install(File.join(srcdir, "lib", "bundler.rb"), rubylibdir, :mode => $data_mode)
|
||||
+ end
|
||||
end
|
||||
|
||||
|
@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk
|
||||
index 168dc52..20c218a 100644
|
||||
--- a/common.mk
|
||||
+++ b/common.mk
|
||||
@@ -962,9 +962,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
|
||||
@@ -1052,9 +1052,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE)
|
||||
$(srcdir)/template/prelude.c.tmpl
|
||||
|
||||
$(PRELUDE_C): $(COMPILE_PRELUDE) \
|
||||
@ -22,7 +22,7 @@ index 168dc52..20c218a 100644
|
||||
+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
|
||||
$(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS)
|
||||
|
||||
{$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
|
||||
$(GOLF_PRELUDE_C): $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
|
||||
--
|
||||
2.6.3
|
||||
|
||||
|
@ -12,7 +12,7 @@ ruby_version_dir_name now specifies custom version string for versioned
|
||||
directories, e.g. instead of default X.Y.Z, you can specify whatever
|
||||
string.
|
||||
---
|
||||
configure.ac | 64 ++++++++++++++++++++++++++++-------------------------
|
||||
configure.ac | 64 ++++++++++++++++++++++++---------------------
|
||||
template/ruby.pc.in | 1 +
|
||||
2 files changed, 35 insertions(+), 30 deletions(-)
|
||||
|
||||
@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index 8ea969412f..a00f2b6776 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4203,9 +4203,6 @@ AS_CASE(["$target_os"],
|
||||
@@ -3661,9 +3661,6 @@ AS_CASE(["$target_os"],
|
||||
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
||||
])
|
||||
|
||||
@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644
|
||||
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
||||
AC_ARG_WITH(rubyarchprefix,
|
||||
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
||||
@@ -4228,56 +4225,62 @@ AC_ARG_WITH(ridir,
|
||||
@@ -3686,56 +3683,62 @@ AC_ARG_WITH(ridir,
|
||||
AC_SUBST(ridir)
|
||||
AC_SUBST(RI_BASE_NAME)
|
||||
|
||||
@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644
|
||||
|
||||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
@@ -4294,6 +4297,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
@@ -3752,6 +3755,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
@ -171,14 +171,14 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index d4c110e..d39c9a6 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -417,7 +417,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -424,7 +424,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
|
||||
install?(:doc, :rdoc) do
|
||||
if $rdocdir
|
||||
- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
|
||||
+ ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version_dir_name'] || CONFIG['ruby_version'], "system")
|
||||
prepare "rdoc", ridatadir
|
||||
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
|
||||
install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode)
|
||||
end
|
||||
--
|
||||
2.1.0
|
||||
@ -205,7 +205,7 @@ index 55ca080..75eea2b 100644
|
||||
- RbConfig::CONFIG['ruby_version']
|
||||
+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']
|
||||
]
|
||||
elsif RbConfig::CONFIG['rubylibprefix'] then
|
||||
elsif RbConfig::CONFIG['rubylibprefix']
|
||||
[
|
||||
RbConfig::CONFIG['rubylibprefix'],
|
||||
'gems',
|
||||
@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
|
||||
index 0428bea..b6e090e 100644
|
||||
--- a/test/rubygems/test_gem.rb
|
||||
+++ b/test/rubygems/test_gem.rb
|
||||
@@ -1191,7 +1191,8 @@ def test_self_use_paths
|
||||
@@ -1288,7 +1288,8 @@ def test_self_use_paths
|
||||
|
||||
def test_self_user_dir
|
||||
parts = [@userhome, '.gem', Gem.ruby_engine]
|
||||
@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644
|
||||
|
||||
assert_equal File.join(parts), Gem.user_dir
|
||||
end
|
||||
@@ -1318,7 +1319,7 @@ def test_self_user_home_user_drive_and_path
|
||||
@@ -1365,7 +1366,7 @@ def test_self_gzip
|
||||
def test_self_vendor_dir
|
||||
expected =
|
||||
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
||||
@ -282,7 +282,7 @@ diff --git a/configure.ac b/configure.ac
|
||||
index a00f2b6776..999e2d6d5d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -164,7 +164,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
|
||||
@@ -101,7 +101,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)
|
||||
|
@ -8,8 +8,8 @@ on Red Hat platforms.
|
||||
|
||||
This workaround rhbz#1361037
|
||||
---
|
||||
test/fiddle/helper.rb | 92 ---------------------------------------------------
|
||||
1 file changed, 92 deletions(-)
|
||||
test/fiddle/helper.rb | 89 -------------------------------------------
|
||||
1 file changed, 89 deletions(-)
|
||||
|
||||
diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb
|
||||
index 1da3d93..65148a1 100644
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 60eb961c25f801ee43ca1be9393ab2f0a0546677 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Tue, 19 Dec 2017 14:00:20 +0100
|
||||
Subject: [PATCH] Add Gem.operating_system_defaults to allow packagers to
|
||||
override defaults.
|
||||
|
||||
This change allows Ruby packagers to override defaults and lazily query
|
||||
them.
|
||||
|
||||
This is very much the same change as #1644 to treat the
|
||||
operating_system defaults the same way as platform defaults.
|
||||
---
|
||||
lib/rubygems/config_file.rb | 2 +-
|
||||
lib/rubygems/defaults.rb | 21 ++++++++++++++++++++-
|
||||
test/rubygems/test_gem.rb | 7 +++++++
|
||||
3 files changed, 28 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb
|
||||
index a4efed0f5a..deee38e6d9 100644
|
||||
--- a/lib/rubygems/config_file.rb
|
||||
+++ b/lib/rubygems/config_file.rb
|
||||
@@ -48,7 +48,7 @@ class Gem::ConfigFile
|
||||
# For Ruby packagers to set configuration defaults. Set in
|
||||
# rubygems/defaults/operating_system.rb
|
||||
|
||||
- OPERATING_SYSTEM_DEFAULTS = {}
|
||||
+ OPERATING_SYSTEM_DEFAULTS = Gem.operating_system_defaults
|
||||
|
||||
##
|
||||
# For Ruby implementers to set configuration defaults. Set in
|
||||
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
|
||||
index 43d57fc808..b8222877ae 100644
|
||||
--- a/lib/rubygems/defaults.rb
|
||||
+++ b/lib/rubygems/defaults.rb
|
||||
@@ -177,7 +177,26 @@ def self.vendor_dir # :nodoc:
|
||||
end
|
||||
|
||||
##
|
||||
- # Default options for gem commands.
|
||||
+ # Default options for gem commands for Ruby packagers.
|
||||
+ #
|
||||
+ # The options here should be structured as an array of string "gem"
|
||||
+ # command names as keys and a string of the default options as values.
|
||||
+ #
|
||||
+ # Example:
|
||||
+ #
|
||||
+ # def self.operating_system_defaults
|
||||
+ # {
|
||||
+ # 'install' => '--no-rdoc --no-ri --env-shebang',
|
||||
+ # 'update' => '--no-rdoc --no-ri --env-shebang'
|
||||
+ # }
|
||||
+ # end
|
||||
+
|
||||
+ def self.operating_system_defaults
|
||||
+ {}
|
||||
+ end
|
||||
+
|
||||
+ ##
|
||||
+ # Default options for gem commands for Ruby implementers.
|
||||
#
|
||||
# The options here should be structured as an array of string "gem"
|
||||
# command names as keys and a string of the default options as values.
|
||||
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
|
||||
index 3225a05c6b..62b80c4945 100644
|
||||
--- a/test/rubygems/test_gem.rb
|
||||
+++ b/test/rubygems/test_gem.rb
|
||||
@@ -1837,6 +1837,13 @@ def test_use_gemdeps_specific
|
||||
ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps
|
||||
end
|
||||
|
||||
+ def test_operating_system_defaults
|
||||
+ operating_system_defaults = Gem.operating_system_defaults
|
||||
+
|
||||
+ assert operating_system_defaults != nil
|
||||
+ assert operating_system_defaults.is_a? Hash
|
||||
+ end
|
||||
+
|
||||
def test_platform_defaults
|
||||
platform_defaults = Gem.platform_defaults
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 51e2c91412a511196e58efea5b87c460b4fa6a20 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 26 Jul 2018 13:17:52 +0200
|
||||
Subject: [PATCH] Avoid need of C++ compiler to pass the test suite.
|
||||
|
||||
The test suite fails when C++ compiler is not available on the system:
|
||||
|
||||
~~~
|
||||
TestGemExtCmakeBuilder#test_self_build:
|
||||
Gem::InstallError: cmake failed, exit code 1
|
||||
/builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/builder.rb:92:in `run'
|
||||
/builddir/build/BUILD/ruby-2.5.1/lib/rubygems/ext/cmake_builder.rb:10:in `build'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:37:in `block in test_self_build'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `chdir'
|
||||
/builddir/build/BUILD/ruby-2.5.1/test/rubygems/test_gem_ext_cmake_builder.rb:36:in `test_self_build'
|
||||
~~~
|
||||
|
||||
But there is nothing which would realy required C++. It is just CMake
|
||||
default to check for C++.
|
||||
---
|
||||
test/rubygems/test_gem_ext_cmake_builder.rb | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
index 76d3cb2afe..2d449fc2fd 100644
|
||||
--- a/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
+++ b/test/rubygems/test_gem_ext_cmake_builder.rb
|
||||
@@ -25,6 +25,7 @@ def test_self_build
|
||||
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
|
||||
cmakelists.write <<-eo_cmake
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
+project(self_build LANGUAGES NONE)
|
||||
install (FILES test.txt DESTINATION bin)
|
||||
eo_cmake
|
||||
end
|
@ -1,78 +0,0 @@
|
||||
From 893949167bdb911c7db9fd59de85f288c09741e1 Mon Sep 17 00:00:00 2001
|
||||
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
||||
Date: Sat, 15 Sep 2018 09:59:14 +0000
|
||||
Subject: [PATCH] Fix issues detected by code analysis tool (mainly Coverity).
|
||||
|
||||
* Fix leaked storage in addr2line.c.
|
||||
* Fix for "top_root" leaking the resource.
|
||||
|
||||
[Fix GH-1956]
|
||||
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
|
||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
||||
---
|
||||
addr2line.c | 8 ++++++--
|
||||
regcomp.c | 3 +++
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/addr2line.c b/addr2line.c
|
||||
index 2c422cc1697a..b266e44d5d4b 100644
|
||||
--- a/addr2line.c
|
||||
+++ b/addr2line.c
|
||||
@@ -593,11 +593,12 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
|
||||
h = dlopen(NULL, RTLD_NOW|RTLD_LOCAL);
|
||||
if (!h) continue;
|
||||
s = dlsym(h, strtab + sym->st_name);
|
||||
- if (!s) continue;
|
||||
- if (dladdr(s, &info)) {
|
||||
+ if (s && dladdr(s, &info)) {
|
||||
dladdr_fbase = (uintptr_t)info.dli_fbase;
|
||||
+ dlclose(h);
|
||||
break;
|
||||
}
|
||||
+ dlclose(h);
|
||||
}
|
||||
if (ehdr->e_type == ET_EXEC) {
|
||||
obj->base_addr = 0;
|
||||
@@ -655,6 +656,9 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
|
||||
finish:
|
||||
return dladdr_fbase;
|
||||
fail:
|
||||
+ if (file != NULL) {
|
||||
+ munmap(file, (size_t)filesize);
|
||||
+ }
|
||||
return (uintptr_t)-1;
|
||||
}
|
||||
|
||||
diff --git a/regcomp.c b/regcomp.c
|
||||
index 0f6bee60d576..df7f73bac501 100644
|
||||
--- a/regcomp.c
|
||||
+++ b/regcomp.c
|
||||
@@ -3596,6 +3596,7 @@ expand_case_fold_string(Node* node, regex_t* reg)
|
||||
if (n == 0 || varlen == 0) {
|
||||
if (IS_NULL(snode)) {
|
||||
if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
|
||||
+ onig_node_free(top_root);
|
||||
top_root = root = onig_node_list_add(NULL_NODE, prev_node);
|
||||
if (IS_NULL(root)) {
|
||||
onig_node_free(prev_node);
|
||||
@@ -3627,6 +3628,7 @@ expand_case_fold_string(Node* node, regex_t* reg)
|
||||
}
|
||||
}
|
||||
if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
|
||||
+ onig_node_free(top_root);
|
||||
top_root = root = onig_node_list_add(NULL_NODE, prev_node);
|
||||
if (IS_NULL(root)) {
|
||||
onig_node_free(prev_node);
|
||||
@@ -3677,6 +3679,7 @@ expand_case_fold_string(Node* node, regex_t* reg)
|
||||
if (r != 0) goto mem_err;
|
||||
|
||||
if (IS_NOT_NULL(prev_node) && IS_NULL(root)) {
|
||||
+ onig_node_free(top_root);
|
||||
top_root = root = onig_node_list_add(NULL_NODE, prev_node);
|
||||
if (IS_NULL(root)) {
|
||||
onig_node_free(srem);
|
||||
--
|
||||
2.21.0
|
||||
|
@ -13,8 +13,8 @@ versions. So continue to use the Ruby implementation for now.
|
||||
|
||||
Reference: https://github.com/ruby/openssl/issues/208
|
||||
---
|
||||
ext/openssl/lib/openssl/config.rb | 54 ++++++++++++++++++++++++++++---------------
|
||||
test/openssl/test_config.rb | 54 +++++++++++++++++++++++++++++++++++++++++++
|
||||
ext/openssl/lib/openssl/config.rb | 54 ++++++++++++++++++++-----------
|
||||
test/openssl/test_config.rb | 54 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 90 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config.rb
|
||||
@ -46,8 +46,8 @@ index 88225451..ba3a54c8 100644
|
||||
- key = $2
|
||||
- else
|
||||
- key = $1
|
||||
+ when /\A\.include (.+)\z/
|
||||
+ path = $1
|
||||
+ when /\A\.include (\s*=\s*)?(.+)\z/
|
||||
+ path = $2
|
||||
+ if File.directory?(path)
|
||||
+ files = Dir.glob(File.join(path, "*.{cnf,conf}"), File::FNM_EXTGLOB)
|
||||
+ else
|
||||
@ -141,7 +141,7 @@ index 99dcc497..5653b5d0 100644
|
||||
+ file-main = unnamed
|
||||
+ [sec-main]
|
||||
+ main = 123
|
||||
+ .include include-child.conf
|
||||
+ .include = include-child.conf
|
||||
+ __EOC__
|
||||
+
|
||||
+ # Include a file by relative path
|
||||
|
@ -1,43 +0,0 @@
|
||||
From c8ccdbfe1e45cb3b832109d644296c0a3b3e0b59 Mon Sep 17 00:00:00 2001
|
||||
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
||||
Date: Sun, 2 Sep 2018 03:49:31 +0000
|
||||
Subject: [PATCH] configure.ac: -fstack-protector-strong
|
||||
|
||||
* configure.ac: use -fstack-protector-strong if available instead of
|
||||
-fstack-protector conditionally. [ruby-core:88788] [Misc #15053]
|
||||
|
||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
||||
---
|
||||
configure.ac | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9328fa532de0..b8ee57239215 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -837,15 +837,18 @@ AS_IF([test "$GCC" = yes], [
|
||||
stack_protector=no
|
||||
])
|
||||
AS_IF([test -z "${stack_protector+set}"], [
|
||||
- RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no])
|
||||
- AS_IF([test "x$stack_protector" = xyes], [
|
||||
- RUBY_TRY_LDFLAGS(-fstack-protector, [], [stack_protector=broken])
|
||||
+ AS_FOR(option, opt, [-fstack-protector-strong -fstack-protector], [
|
||||
+ RUBY_TRY_CFLAGS(option, [stack_protector=yes])
|
||||
+ AS_IF([test "x$stack_protector" = xyes], [
|
||||
+ RUBY_TRY_LDFLAGS(option, [], [stack_protector=])
|
||||
+ ])
|
||||
+ AS_IF([test "x$stack_protector" = xyes], [stack_protector=option; break])
|
||||
])
|
||||
])
|
||||
- AS_IF([test "x$stack_protector" = xyes], [
|
||||
- RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)
|
||||
- RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)
|
||||
- RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector)
|
||||
+ AS_CASE(["$stack_protector"], [-*], [
|
||||
+ RUBY_APPEND_OPTION(XCFLAGS, $stack_protector)
|
||||
+ RUBY_APPEND_OPTION(XLDFLAGS, $stack_protector)
|
||||
+ RUBY_APPEND_OPTION(LDFLAGS, $stack_protector)
|
||||
])
|
||||
|
||||
AS_CASE("${compress_debug_sections:-zlib}",
|
@ -1,177 +0,0 @@
|
||||
From bb3db69e2a0c210cc3a63940622db96a97eb7947 Mon Sep 17 00:00:00 2001
|
||||
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
||||
Date: Fri, 2 Mar 2018 01:37:53 +0000
|
||||
Subject: [PATCH] configure.ac: library options to MAINLIBS
|
||||
|
||||
* configure.ac (MAINLIBS): moved library options for main program
|
||||
and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as
|
||||
these libraries are not needed for linking to shared libruby.
|
||||
[ruby-core:85882] [Bug #14422]
|
||||
|
||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
||||
---
|
||||
configure.ac | 33 +++++++++++++++------------------
|
||||
template/ruby.pc.in | 1 +
|
||||
win32/Makefile.sub | 6 ++++--
|
||||
3 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index aebbae1969a5..733a0c992fd7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -10,6 +10,7 @@ AC_DISABLE_OPTION_CHECKING
|
||||
AC_ARG_VAR([cflags], [additional CFLAGS])
|
||||
AC_ARG_VAR([cppflags], [additional CPPFLAGS])
|
||||
AC_ARG_VAR([cxxflags], [additional CXXFLAGS])
|
||||
+ORIG_LIBS=$LIBS
|
||||
|
||||
AC_DEFUN([RUBY_RM_RECURSIVE], [
|
||||
m4_version_prereq([2.70], [-1], [
|
||||
@@ -2939,13 +2940,11 @@ AS_IF([test x"$enable_pthread" = xyes], [
|
||||
AC_DEFINE(_THREAD_SAFE)
|
||||
AC_DEFINE(HAVE_LIBPTHREAD)
|
||||
AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include <pthread.h>])
|
||||
- AS_CASE([$pthread_lib],
|
||||
- [c], [],
|
||||
- [root], [],
|
||||
- [c_r], [MAINLIBS="-pthread $MAINLIBS"],
|
||||
- [AS_CASE(["$target_os"],
|
||||
- [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"],
|
||||
- [LIBS="-l$pthread_lib $LIBS"])])
|
||||
+ AS_CASE(["$pthread_lib:$target_os"],
|
||||
+ [c:*], [],
|
||||
+ [root:*], [],
|
||||
+ [c_r:*|*:openbsd*|*:mirbsd*], [LIBS="-pthread $LIBS"],
|
||||
+ [LIBS="-l$pthread_lib $LIBS"])
|
||||
], [
|
||||
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
|
||||
])
|
||||
@@ -3624,7 +3623,7 @@ LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
|
||||
LIBRUBY='$(LIBRUBY_A)'
|
||||
LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static'
|
||||
LIBRUBYARG='$(LIBRUBYARG_STATIC)'
|
||||
-SOLIBS=
|
||||
+SOLIBS='$(MAINLIBS)'
|
||||
|
||||
AS_CASE(["$target_os"],
|
||||
[cygwin*|mingw*|haiku*|darwin*], [
|
||||
@@ -3690,9 +3689,6 @@ AS_CASE("$enable_shared", [yes], [
|
||||
LIBRUBY_RELATIVE=no
|
||||
test -z "$CCDLFLAGS" || CFLAGS="$CFLAGS $CCDLFLAGS"
|
||||
ENABLE_SHARED=yes
|
||||
- AS_IF([test "$rb_cv_binary_elf" = yes], [
|
||||
- SOLIBS='$(LIBS)'
|
||||
- ])
|
||||
|
||||
# libdir can be overridden in config.site file (on OpenSUSE at least).
|
||||
libdir_basename=lib
|
||||
@@ -3727,7 +3723,6 @@ AS_CASE("$enable_shared", [yes], [
|
||||
])
|
||||
],
|
||||
[freebsd*|dragonfly*], [
|
||||
- SOLIBS='$(LIBS)'
|
||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)'
|
||||
LIBRUBY_SONAME='$(LIBRUBY_SO)'
|
||||
AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
|
||||
@@ -3736,7 +3731,6 @@ AS_CASE("$enable_shared", [yes], [
|
||||
])
|
||||
],
|
||||
[netbsd*], [
|
||||
- SOLIBS='$(LIBS)'
|
||||
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)'
|
||||
LIBRUBY_SO="${LIBRUBY_SONAME}"'.$(TEENY)'
|
||||
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,$(LIBRUBY_SONAME)' "$LDFLAGS_OPTDIR"])
|
||||
@@ -3747,11 +3741,9 @@ AS_CASE("$enable_shared", [yes], [
|
||||
])
|
||||
],
|
||||
[openbsd*|mirbsd*], [
|
||||
- SOLIBS='$(LIBS)'
|
||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
|
||||
],
|
||||
[solaris*], [
|
||||
- SOLIBS='$(LIBS)'
|
||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)'
|
||||
LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)'
|
||||
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)'
|
||||
@@ -3769,7 +3761,7 @@ AS_CASE("$enable_shared", [yes], [
|
||||
[aix*], [
|
||||
RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"])
|
||||
LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
|
||||
- SOLIBS='-lm -lc'
|
||||
+ LIBS="$LIBS -lm -lc"
|
||||
],
|
||||
[darwin*], [
|
||||
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
|
||||
@@ -3789,7 +3781,6 @@ AS_CASE("$enable_shared", [yes], [
|
||||
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT)'
|
||||
LIBRUBY_SONAME='lib$(RUBY_BASE_NAME).$(RUBY_API_VERSION).$(SOEXT)'
|
||||
LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_INSTALL_NAME).$(SOEXT)'
|
||||
- SOLIBS='$(LIBS)'
|
||||
],
|
||||
[interix*], [
|
||||
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
||||
@@ -4032,7 +4023,6 @@ AS_CASE(["$target_os"],
|
||||
])
|
||||
LIBRUBY_ALIASES=''
|
||||
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
|
||||
- SOLIBS='$(LIBS)'
|
||||
AS_IF([test x"$enable_shared" = xyes], [
|
||||
LIBRUBY='lib$(RUBY_SO_NAME).dll.a'
|
||||
], [
|
||||
@@ -4132,6 +4122,13 @@ AS_IF([test "${universal_binary-no}" = yes ], [
|
||||
[rb_cv_architecture_available=yes], [rb_cv_architecture_available=no]))
|
||||
])
|
||||
|
||||
+MAINLIBS="$LIBS"
|
||||
+LIBS=$ORIG_LIBS
|
||||
+AS_IF([test -n "${LIBS}"], [
|
||||
+ libspat=`echo "${LIBS}" | sed 's/[[][|.*$^]]/\\&/g;s/^ */ /;s/^ *$/ /'`
|
||||
+ MAINFLAGS=`echo " $MAINLIBS " | sed "s|$libspat"'||;s/^ *//;s/ *$//'`
|
||||
+])
|
||||
+LIBRUBYARG_STATIC="${LIBRUBYARG_STATIC} \$(MAINLIBS)"
|
||||
CPPFLAGS="$CPPFLAGS "'$(DEFS)'
|
||||
test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}'
|
||||
AS_IF([test -n "${cflags+set}"], [
|
||||
diff --git a/template/ruby.pc.in b/template/ruby.pc.in
|
||||
index d874f92c3b20..7ce4461c05df 100644
|
||||
--- a/template/ruby.pc.in
|
||||
+++ b/template/ruby.pc.in
|
||||
@@ -39,6 +39,7 @@ sitehdrdir=@sitehdrdir@
|
||||
rubyarchhdrdir=@rubyarchhdrdir@
|
||||
vendorarchhdrdir=@vendorarchhdrdir@
|
||||
sitearchhdrdir=@sitearchhdrdir@
|
||||
+MAINLIBS=@MAINLIBS@
|
||||
SOEXT=@SOEXT@
|
||||
LIBPATH=@LIBPATH@
|
||||
LIBRUBY_A=@LIBRUBY_A@
|
||||
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
|
||||
index 8673c121641e..f8316cccb68e 100644
|
||||
--- a/win32/Makefile.sub
|
||||
+++ b/win32/Makefile.sub
|
||||
@@ -279,6 +279,7 @@ MJIT_DEBUGFLAGS = $(DEBUGFLAGS)
|
||||
CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
|
||||
|
||||
DLDFLAGS = $(LDFLAGS) -dll
|
||||
+MAINLIBS = $(LIBS)
|
||||
SOLIBS =
|
||||
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
||||
!ifndef RCFLAGS
|
||||
@@ -821,7 +822,8 @@ s,@CPPFLAGS@,$(CPPFLAGS),;t t
|
||||
s,@CXXFLAGS@,$(CXXFLAGS),;t t
|
||||
s,@FFLAGS@,$(FFLAGS),;t t
|
||||
s,@LDFLAGS@,$(LDFLAGS),;t t
|
||||
-s,@LIBS@,$(LIBS),;t t
|
||||
+s,@LIBS@,,;t t
|
||||
+s,@MAINLIBS@,$(MAINLIBS),;t t
|
||||
s,@exec_prefix@,$${prefix},;t t
|
||||
s,@prefix@,$(prefix),;t t
|
||||
s,@program_transform_name@,s,.*,$(PROGRAM_PREFIX)&$(PROGRAM_SUFFIX),,;t t
|
||||
@@ -909,7 +911,7 @@ s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
|
||||
s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
|
||||
s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
|
||||
s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
|
||||
-s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t
|
||||
+s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A) $$(MAINLIBS),;t t
|
||||
s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
|
||||
s,@SOLIBS@,$(SOLIBS),;t t
|
||||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
@ -1,34 +0,0 @@
|
||||
From d05e6269d4a4dfd701f5ddb3ae34306cba891511 Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Fri, 3 Aug 2018 11:35:55 +0200
|
||||
Subject: [PATCH] Fix indent and typo from moveTimout to moveTimeout.
|
||||
|
||||
---
|
||||
lib/rdoc/generator/template/json_index/js/navigation.js | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/rdoc/generator/template/json_index/js/navigation.js b/lib/rdoc/generator/template/json_index/js/navigation.js
|
||||
index e4126812..43c5118a 100644
|
||||
--- a/lib/rdoc/generator/template/json_index/js/navigation.js
|
||||
+++ b/lib/rdoc/generator/template/json_index/js/navigation.js
|
||||
@@ -59,9 +59,8 @@ Navigation = new function() {
|
||||
}
|
||||
break;
|
||||
case 13: //Event.KEY_RETURN:
|
||||
- if (this.$current)
|
||||
- e.preventDefault();
|
||||
- this.select(this.$current);
|
||||
+ if (this.$current) e.preventDefault();
|
||||
+ this.select(this.$current);
|
||||
break;
|
||||
}
|
||||
if (e.ctrlKey && e.shiftKey) this.select(this.$current);
|
||||
@@ -80,7 +79,7 @@ Navigation = new function() {
|
||||
var go = function() {
|
||||
if (!_this.moveTimeout) return;
|
||||
_this[isDown ? 'moveDown' : 'moveUp']();
|
||||
- _this.moveTimout = setTimeout(go, 100);
|
||||
+ _this.moveTimeout = setTimeout(go, 100);
|
||||
}
|
||||
this.moveTimeout = setTimeout(go, 200);
|
||||
}
|
@ -9,7 +9,7 @@ prevent stacking forever.
|
||||
|
||||
Reference: https://github.com/ruby/openssl/issues/214
|
||||
---
|
||||
test/openssl/test_pair.rb | 51 ++++++++++++++++++++---------------------------
|
||||
test/openssl/test_pair.rb | 51 +++++++++++++++++----------------------
|
||||
1 file changed, 22 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb
|
||||
@ -107,14 +107,14 @@ to the tree, and SSL tests now use them instead of the fixed-size keys.
|
||||
|
||||
Reference: https://github.com/ruby/openssl/issues/215
|
||||
---
|
||||
test/openssl/fixtures/pkey/dh-1.pem | 13 +++++++++
|
||||
test/openssl/fixtures/pkey/rsa-1.pem | 51 ++++++++++++++++++++++++++++++++++++
|
||||
test/openssl/fixtures/pkey/rsa-2.pem | 51 ++++++++++++++++++++++++++++++++++++
|
||||
test/openssl/fixtures/pkey/rsa-3.pem | 51 ++++++++++++++++++++++++++++++++++++
|
||||
test/openssl/test_pair.rb | 8 +++---
|
||||
test/openssl/test_pkey_dh.rb | 8 +++---
|
||||
test/openssl/test_ssl.rb | 11 ++++----
|
||||
test/openssl/utils.rb | 14 +++++-----
|
||||
test/openssl/fixtures/pkey/dh-1.pem | 13 +++++++
|
||||
test/openssl/fixtures/pkey/rsa-1.pem | 51 ++++++++++++++++++++++++++++
|
||||
test/openssl/fixtures/pkey/rsa-2.pem | 51 ++++++++++++++++++++++++++++
|
||||
test/openssl/fixtures/pkey/rsa-3.pem | 51 ++++++++++++++++++++++++++++
|
||||
test/openssl/test_pair.rb | 8 ++---
|
||||
test/openssl/test_pkey_dh.rb | 8 ++---
|
||||
test/openssl/test_ssl.rb | 11 +++---
|
||||
test/openssl/utils.rb | 14 ++++----
|
||||
8 files changed, 186 insertions(+), 21 deletions(-)
|
||||
create mode 100644 test/openssl/fixtures/pkey/dh-1.pem
|
||||
create mode 100644 test/openssl/fixtures/pkey/rsa-1.pem
|
||||
@ -394,7 +394,7 @@ diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
|
||||
index 408c7d82..2633f7c4 100644
|
||||
--- a/test/openssl/test_ssl.rb
|
||||
+++ b/test/openssl/test_ssl.rb
|
||||
@@ -708,7 +708,7 @@ def socketpair
|
||||
@@ -712,7 +712,7 @@ def socketpair
|
||||
|
||||
def test_tlsext_hostname
|
||||
fooctx = OpenSSL::SSL::SSLContext.new
|
||||
@ -403,7 +403,7 @@ index 408c7d82..2633f7c4 100644
|
||||
fooctx.cert = @cli_cert
|
||||
fooctx.key = @cli_key
|
||||
|
||||
@@ -760,7 +760,7 @@ def test_servername_cb_raises_an_exception_on_unknown_objects
|
||||
@@ -764,7 +764,7 @@ def test_servername_cb_raises_an_exception_on_unknown_objects
|
||||
ctx2 = OpenSSL::SSL::SSLContext.new
|
||||
ctx2.cert = @svr_cert
|
||||
ctx2.key = @svr_key
|
||||
@ -412,7 +412,7 @@ index 408c7d82..2633f7c4 100644
|
||||
ctx2.servername_cb = lambda { |args| Object.new }
|
||||
|
||||
sock1, sock2 = socketpair
|
||||
@@ -1140,7 +1140,7 @@ def test_alpn_protocol_selection_cancel
|
||||
@@ -1144,7 +1144,7 @@ def test_alpn_protocol_selection_cancel
|
||||
ctx1 = OpenSSL::SSL::SSLContext.new
|
||||
ctx1.cert = @svr_cert
|
||||
ctx1.key = @svr_key
|
||||
@ -421,7 +421,7 @@ index 408c7d82..2633f7c4 100644
|
||||
ctx1.alpn_select_cb = -> (protocols) { nil }
|
||||
ssl1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx1)
|
||||
|
||||
@@ -1382,20 +1382,21 @@ def test_get_ephemeral_key
|
||||
@@ -1386,20 +1386,21 @@ def test_fallback_scsv
|
||||
def test_dh_callback
|
||||
pend "TLS 1.2 is not supported" unless tls12_supported?
|
||||
|
||||
|
298
ruby.spec
298
ruby.spec
@ -1,16 +1,16 @@
|
||||
%global major_version 2
|
||||
%global minor_version 5
|
||||
%global teeny_version 5
|
||||
%global minor_version 6
|
||||
%global teeny_version 3
|
||||
%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
|
||||
#%%global milestone rc2
|
||||
|
||||
# Keep the revision enabled for pre-releases from SVN.
|
||||
#%%global revision 61414
|
||||
#%%global revision 66252
|
||||
|
||||
%global ruby_archive %{name}-%{ruby_version}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
%endif
|
||||
|
||||
|
||||
%global release 104
|
||||
%global release 105
|
||||
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory tree, since the
|
||||
@ -29,25 +29,31 @@
|
||||
%global rubygems_dir %{_datadir}/rubygems
|
||||
|
||||
# Bundled libraries versions
|
||||
%global rubygems_version 2.7.6.2
|
||||
%global molinillo_version 0.5.7
|
||||
%global rubygems_version 3.0.3
|
||||
%global rubygems_molinillo_version 0.5.7
|
||||
|
||||
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
|
||||
# http://redmine.ruby-lang.org/issues/5313
|
||||
%global irb_version %{ruby_version}
|
||||
%global bundler_version 1.17.2
|
||||
# FileUtils had not used to have separate versioning from Ruby :/ Lets use
|
||||
# date of bundling for now. The gemified version of FileUtils has already proper
|
||||
# version (if it's going to be bundled).
|
||||
%global bundler_fileutils_version 0.20170425
|
||||
%global bundler_molinillo_version 0.6.6
|
||||
%global bundler_net_http_persistent_version 2.9.4
|
||||
%global bundler_thor_version 0.20.0
|
||||
|
||||
%global bigdecimal_version 1.3.4
|
||||
%global did_you_mean_version 1.2.0
|
||||
%global io_console_version 0.4.6
|
||||
%global bigdecimal_version 1.4.1
|
||||
%global did_you_mean_version 1.3.0
|
||||
%global io_console_version 0.4.7
|
||||
%global irb_version 1.0.0
|
||||
%global json_version 2.1.0
|
||||
%global minitest_version 5.10.3
|
||||
%global net_telnet_version 0.1.1
|
||||
%global minitest_version 5.11.3
|
||||
%global net_telnet_version 0.2.0
|
||||
%global openssl_version 2.1.2
|
||||
%global power_assert_version 1.1.1
|
||||
%global psych_version 3.0.2
|
||||
%global rake_version 12.3.0
|
||||
%global rdoc_version 6.0.1
|
||||
%global test_unit_version 3.2.7
|
||||
%global power_assert_version 1.1.3
|
||||
%global psych_version 3.1.0
|
||||
%global rake_version 12.3.2
|
||||
%global rdoc_version 6.1.0
|
||||
%global test_unit_version 3.2.9
|
||||
%global xmlrpc_version 0.3.0
|
||||
|
||||
# Might not be needed in the future, if we are lucky enough.
|
||||
@ -62,10 +68,11 @@
|
||||
%bcond_without rubypick
|
||||
%endif
|
||||
|
||||
%bcond_without systemtap
|
||||
%bcond_without git
|
||||
%bcond_without cmake
|
||||
%bcond_without git
|
||||
%bcond_without gmp
|
||||
%bcond_without hostname
|
||||
%bcond_without systemtap
|
||||
|
||||
%if 0%{?fedora}
|
||||
%bcond_without hardening_test
|
||||
@ -75,7 +82,6 @@ Summary: An interpreter of object-oriented scripting language
|
||||
Name: ruby
|
||||
Version: %{ruby_version}
|
||||
Release: %{release_string}
|
||||
Group: Development/Languages
|
||||
# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ...
|
||||
# MIT and CCO: ccan/*
|
||||
# zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c
|
||||
@ -127,31 +133,19 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch
|
||||
# http://bugs.ruby-lang.org/issues/8566
|
||||
Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
|
||||
# Use miniruby to regenerate prelude.c.
|
||||
# https://bugs.ruby-lang.org/issues/10554
|
||||
# https://bugs.ruby-lang.org/issues/15306
|
||||
Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
|
||||
# Workaround "an invalid stdio handle" error on PPC, due to recently introduced
|
||||
# hardening features of glibc (rhbz#1361037).
|
||||
# https://bugs.ruby-lang.org/issues/12666
|
||||
Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
|
||||
# Add Gem.operating_system_defaults to allow packagers to override defaults.
|
||||
# https://github.com/rubygems/rubygems/pull/2116
|
||||
Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch
|
||||
# Don't force libraries used to build Ruby to its dependencies.
|
||||
# https://bugs.ruby-lang.org/issues/14422
|
||||
Patch15: ruby-2.6.0-library-options-to-MAINLIBS.patch
|
||||
# Do not require C++ compiler.
|
||||
# https://github.com/rubygems/rubygems/pull/2367
|
||||
Patch16: ruby-2.5.1-Avoid-need-of-C++-compiler-to-pass-the-test-suite.patch
|
||||
# https://github.com/ruby/rdoc/commit/d05e6269d4a4dfd701f5ddb3ae34306cba891511
|
||||
Patch20: ruby-2.6.0-rdoc-6.0.1-fix-template-typo.patch
|
||||
# Properly harden package using -fstack-protector-strong.
|
||||
# https://bugs.ruby-lang.org/issues/15053
|
||||
Patch24: ruby-2.6.0-configure-fstack-protector-strong.patch
|
||||
# Fix CovScan issues.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1628592
|
||||
# https://bugs.ruby-lang.org/issues/15116
|
||||
# https://github.com/ruby/ruby/commit/893949167bdb911c7db9fd59de85f288c09741e1
|
||||
Patch25: ruby-2.6.0-Fix-issues-detected-by-code-analysis-tool.patch
|
||||
# `gem build ../foo.gemspec` changes directory, which does not play well with
|
||||
# gems unpacked by setup macro.
|
||||
# https://github.com/rubygems/rubygems/issues/2587
|
||||
Patch11: rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch
|
||||
# This allows to loosen the RDoc dependency again.
|
||||
# https://github.com/rubygems/rubygems/pull/2604
|
||||
Patch12: rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch
|
||||
|
||||
# Add support for .include directive used by OpenSSL config files.
|
||||
# https://github.com/ruby/openssl/pull/216
|
||||
@ -182,6 +176,7 @@ BuildRequires: procps
|
||||
%{?with_cmake:BuildRequires: %{_bindir}/cmake}
|
||||
# Required to test hardening.
|
||||
%{?with_hardening_test:BuildRequires: %{_bindir}/checksec}
|
||||
%{?with_hostname:BuildRequires: %{_bindir}/hostname}
|
||||
BuildRequires: multilib-rpm-config
|
||||
BuildRequires: gcc
|
||||
BuildRequires: zlib-devel
|
||||
@ -199,7 +194,6 @@ straight-forward, and extensible.
|
||||
|
||||
%package devel
|
||||
Summary: A Ruby development environment
|
||||
Group: Development/Languages
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# This would not be needed if ~50 packages depending on -devel used
|
||||
# --disable-gems
|
||||
@ -211,7 +205,6 @@ Ruby or an application embedding Ruby.
|
||||
|
||||
%package libs
|
||||
Summary: Libraries necessary to run Ruby
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Provides: ruby(release) = %{ruby_release}
|
||||
|
||||
@ -237,7 +230,6 @@ This package includes the libruby, necessary to run Ruby.
|
||||
%package -n rubygems
|
||||
Summary: The Ruby standard for packaging ruby libraries
|
||||
Version: %{rubygems_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(release)
|
||||
Recommends: rubygem(rdoc) >= %{rdoc_version}
|
||||
@ -247,7 +239,7 @@ Requires: rubygem(psych) >= %{psych_version}
|
||||
Provides: gem = %{version}-%{release}
|
||||
Provides: ruby(rubygems) = %{version}-%{release}
|
||||
# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910
|
||||
Provides: bundled(rubygem-molinillo) = %{molinillo_version}
|
||||
Provides: bundled(rubygem-molinillo) = %{rubygems_molinillo_version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n rubygems
|
||||
@ -258,7 +250,6 @@ libraries.
|
||||
%package -n rubygems-devel
|
||||
Summary: Macros and development tools for packaging RubyGems
|
||||
Version: %{rubygems_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(rubygems) = %{version}-%{release}
|
||||
# Needed for RDoc documentation format generation.
|
||||
@ -273,7 +264,6 @@ Macros and development tools for packaging RubyGems.
|
||||
%package -n rubygem-rake
|
||||
Summary: Ruby based make-like utility
|
||||
Version: %{rake_version}
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -286,16 +276,20 @@ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are
|
||||
specified in standard Ruby syntax.
|
||||
|
||||
|
||||
%package irb
|
||||
%package -n rubygem-irb
|
||||
Summary: The Interactive Ruby
|
||||
Version: %{irb_version}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-libs = %{ruby_version}
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
Provides: irb = %{version}-%{release}
|
||||
Provides: ruby(irb) = %{version}-%{release}
|
||||
Provides: rubygem(irb) = %{version}-%{release}
|
||||
# Obsoleted by Ruby 2.6 in F30 timeframe.
|
||||
Provides: ruby(irb) = %{ruby_version}-%{release}
|
||||
Provides: ruby-irb = %{ruby_version}-%{release}
|
||||
Obsoletes: ruby-irb < %{ruby_version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description irb
|
||||
%description -n rubygem-irb
|
||||
The irb is acronym for Interactive Ruby. It evaluates ruby expression
|
||||
from the terminal.
|
||||
|
||||
@ -303,12 +297,11 @@ from the terminal.
|
||||
%package -n rubygem-rdoc
|
||||
Summary: A tool to generate HTML and command-line documentation for Ruby projects
|
||||
Version: %{rdoc_version}
|
||||
Group: Development/Libraries
|
||||
# SIL: lib/rdoc/generator/template/darkfish/css/fonts.css
|
||||
License: GPLv2 and Ruby and MIT and OFL
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
Requires: ruby(irb) = %{irb_version}
|
||||
Requires: rubygem(irb) >= %{irb_version}
|
||||
Requires: rubygem(io-console) >= %{io_console_version}
|
||||
Requires: rubygem(json) >= %{json_version}
|
||||
Provides: rdoc = %{version}-%{release}
|
||||
@ -324,7 +317,6 @@ documentation.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
Requires: %{_bindir}/ri
|
||||
BuildArch: noarch
|
||||
|
||||
@ -335,7 +327,6 @@ This package contains documentation for %{name}.
|
||||
%package -n rubygem-bigdecimal
|
||||
Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic
|
||||
Version: %{bigdecimal_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -357,7 +348,6 @@ conversion between base 10 and base 2.
|
||||
%package -n rubygem-did_you_mean
|
||||
Summary: "Did you mean?" experience in Ruby
|
||||
Version: %{did_you_mean_version}
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -372,7 +362,6 @@ one when you misspelled something.
|
||||
%package -n rubygem-io-console
|
||||
Summary: IO/Console is a simple console utilizing library
|
||||
Version: %{io_console_version}
|
||||
Group: Development/Libraries
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
Provides: rubygem(io-console) = %{version}-%{release}
|
||||
@ -385,7 +374,6 @@ provide higher layer features, such like curses and readline.
|
||||
%package -n rubygem-json
|
||||
Summary: This is a JSON implementation as a Ruby extension in C
|
||||
Version: %{json_version}
|
||||
Group: Development/Libraries
|
||||
# UCD: ext/json/generator/generator.c
|
||||
License: (Ruby or GPLv2) and UCD
|
||||
Requires: ruby(release)
|
||||
@ -402,7 +390,6 @@ markup language.
|
||||
%package -n rubygem-minitest
|
||||
Summary: Minitest provides a complete suite of testing facilities
|
||||
Version: %{minitest_version}
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -427,7 +414,6 @@ output.
|
||||
%package -n rubygem-openssl
|
||||
Summary: OpenSSL provides SSL, TLS and general purpose cryptography
|
||||
Version: %{openssl_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -441,7 +427,6 @@ OpenSSL library.
|
||||
%package -n rubygem-power_assert
|
||||
Summary: Power Assert for Ruby
|
||||
Version: %{power_assert_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -457,7 +442,6 @@ condition is not satisfied.
|
||||
%package -n rubygem-psych
|
||||
Summary: A libyaml wrapper for Ruby
|
||||
Version: %{psych_version}
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -473,7 +457,6 @@ serialize and de-serialize most Ruby objects to and from the YAML format.
|
||||
%package -n rubygem-net-telnet
|
||||
Summary: Provides telnet client functionality
|
||||
Version: %{net_telnet_version}
|
||||
Group: Development/Libraries
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
Provides: rubygem(net-telnet) = %{version}-%{release}
|
||||
@ -493,7 +476,6 @@ the output through preprocess() to extract telnet command sequences.
|
||||
%package -n rubygem-test-unit
|
||||
Summary: An xUnit family unit testing framework for Ruby
|
||||
Version: %{test_unit_version}
|
||||
Group: Development/Libraries
|
||||
# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license.
|
||||
# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later.
|
||||
License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+)
|
||||
@ -513,7 +495,6 @@ writing tests, checking results and automated testing in Ruby.
|
||||
%package -n rubygem-xmlrpc
|
||||
Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP
|
||||
Version: %{xmlrpc_version}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or BSD
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
@ -525,6 +506,26 @@ XMLRPC is a lightweight protocol that enables remote procedure calls over
|
||||
HTTP.
|
||||
|
||||
|
||||
%package -n rubygem-bundler
|
||||
Summary: Library and utilities to manage a Ruby application's gem dependencies
|
||||
Version: %{bundler_version}
|
||||
License: MIT
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
Requires: rubygem(io-console)
|
||||
Provides: rubygem(bundler) = %{version}-%{release}
|
||||
# https://github.com/bundler/bundler/issues/3647
|
||||
Provides: bundled(rubygem-fileutils) = %{bundler_fileutils_version}
|
||||
Provides: bundled(rubygem-molinillo) = %{bundler_molinillo_version}
|
||||
Provides: bundled(rubygem-net-http-persisntent) = %{bundler_net_http_persistent_version}
|
||||
Provides: bundled(rubygem-thor) = %{bundler_thor_version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n rubygem-bundler
|
||||
Bundler manages an application's dependencies through its entire life, across
|
||||
many machines, systematically and repeatably.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{ruby_archive}
|
||||
|
||||
@ -541,14 +542,10 @@ rm -rf ext/fiddle/libffi*
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch20 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
@ -561,6 +558,17 @@ cp -a %{SOURCE6} .
|
||||
%build
|
||||
autoconf
|
||||
|
||||
# Overide CFLAGS to avoid below error on aarch64,
|
||||
# removing "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" option.
|
||||
# rpm 4.14.2 is used on rhel-8.1.0.
|
||||
# https://src.osci.redhat.com/rpms/rpm/blob/rhel-8.1.0/f/rpm.spec#_31
|
||||
# https://github.com/rpm-software-management/rpm/blob/rpm-4.14.2-release/macros.in#L1008
|
||||
# gcc failed with "annobin: conftest.c: ICE: Should be 64-bit target"
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1720179
|
||||
%ifarch aarch64
|
||||
%define optflags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||
%endif
|
||||
|
||||
%configure \
|
||||
--with-rubylibprefix='%{ruby_libdir}' \
|
||||
--with-archlibdir='%{_libdir}' \
|
||||
@ -593,6 +601,9 @@ make install DESTDIR=%{buildroot}
|
||||
# Rename ruby/config.h to ruby/config-<arch>.h to avoid file conflicts on
|
||||
# multilib systems and install config.h wrapper
|
||||
%multilib_fix_c_header --file %{_includedir}/%{name}/config.h
|
||||
# TODO: The correct patch should be %%{_includedir}/%%{name}/rb_mjit_min_header-%{ruby_version}.h
|
||||
# https://bugs.ruby-lang.org/issues/15425
|
||||
%multilib_fix_c_header --file %{_includedir}/rb_mjit_min_header-%{ruby_version}.h
|
||||
|
||||
# Rename the ruby executable. It is replaced by RubyPick.
|
||||
%{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}}
|
||||
@ -609,9 +620,13 @@ for cert in \
|
||||
do
|
||||
rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
|
||||
rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert)
|
||||
rm %{buildroot}%{ruby_libdir}/bundler/ssl_certs/$cert
|
||||
rm -r $(dirname %{buildroot}%{ruby_libdir}/bundler/ssl_certs/$cert)
|
||||
done
|
||||
# Ensure there is not forgotten any certificate.
|
||||
test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)"
|
||||
test "$(ls -A %{buildroot}%{ruby_libdir}/bundler/ssl_certs/ 2>/dev/null)" \
|
||||
= "certificate_manager.rb"
|
||||
|
||||
# Move macros file into proper place and replace the %%{name} macro, since it
|
||||
# would be wrongly evaluated during build of other packages.
|
||||
@ -643,17 +658,38 @@ 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
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/irb-%{irb_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/irb* %{buildroot}%{gem_dir}/gems/irb-%{irb_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/irb-%{irb_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
ln -s %{gem_dir}/gems/irb-%{irb_version}/lib/irb.rb %{buildroot}%{ruby_libdir}/irb.rb
|
||||
# TODO: This should be possible to replaced by simple directory symlink
|
||||
# after ~ F31 EOL (rhbz#1691039).
|
||||
mkdir -p %{buildroot}%{ruby_libdir}/irb
|
||||
pushd %{buildroot}%{gem_dir}/gems/irb-%{irb_version}/lib
|
||||
find irb -type d -mindepth 1 -exec mkdir %{buildroot}%{ruby_libdir}/'{}' \;
|
||||
find irb -type f -exec ln -s %{gem_dir}/gems/irb-%{irb_version}/lib/'{}' %{buildroot}%{ruby_libdir}/'{}' \;
|
||||
popd
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal
|
||||
mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib
|
||||
mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}
|
||||
mv %{buildroot}%{ruby_libarchdir}/bigdecimal/util.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal
|
||||
ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so
|
||||
ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal/util.so %{buildroot}%{ruby_libarchdir}/bigdecimal/util.so
|
||||
|
||||
# TODO: Put help files into proper location.
|
||||
# https://bugs.ruby-lang.org/issues/15359
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/bundler-%{bundler_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/bundler.rb %{buildroot}%{gem_dir}/gems/bundler-%{bundler_version}/lib
|
||||
mv %{buildroot}%{ruby_libdir}/bundler %{buildroot}%{gem_dir}/gems/bundler-%{bundler_version}/lib
|
||||
mv %{buildroot}%{gem_dir}/specifications/default/bundler-%{bundler_version}.gemspec %{buildroot}%{gem_dir}/specifications
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io
|
||||
@ -729,6 +765,12 @@ echo 'doc/pty' >> .ruby-doc.ja
|
||||
sed -i 's/^/%doc /' .ruby-doc.*
|
||||
sed -i 's/^/%lang(ja) /' .ruby-doc.ja
|
||||
|
||||
# https://github.com/yuki24/did_you_mean/issues/122
|
||||
rm -rf %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/tmp/
|
||||
|
||||
# https://github.com/ruby/rake/issues/316
|
||||
rm -f %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/.gitignore
|
||||
|
||||
%check
|
||||
%if 0%{?with_hardening_test}
|
||||
# Check Ruby hardening.
|
||||
@ -746,7 +788,35 @@ checksec -f libruby.so.%{ruby_version} | \
|
||||
module Gem; module Resolver; end; end; \
|
||||
require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; \
|
||||
puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \
|
||||
== '%{molinillo_version}' ]
|
||||
== '%{rubygems_molinillo_version}' ]
|
||||
|
||||
# Check Bundler bundled dependencies versions.
|
||||
|
||||
# FileUtils.
|
||||
# TODO: There is no version in bundled FileUtils yet.
|
||||
#%%{global bundler_fileutils_version}
|
||||
|
||||
# Molinillo.
|
||||
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \
|
||||
module Bundler; end; \
|
||||
require 'bundler/vendor/molinillo/lib/molinillo/gem_metadata'; \
|
||||
puts Bundler::Molinillo::VERSION\\\"\" | tail -1`" \
|
||||
== '%{bundler_molinillo_version}' ]
|
||||
|
||||
# Net::HTTP::Persistent.
|
||||
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \
|
||||
module Bundler; module Persistent; module Net; module HTTP; \
|
||||
end; end; end; end; \
|
||||
require 'bundler/vendor/net-http-persistent/lib/net/http/persistent'; \
|
||||
puts Bundler::Persistent::Net::HTTP::Persistent::VERSION\\\"\" | tail -1`" \
|
||||
== '%{bundler_net_http_persistent_version}' ]
|
||||
|
||||
# Thor.
|
||||
[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \
|
||||
module Bundler; end; \
|
||||
require 'bundler/vendor/thor/lib/thor/version'; \
|
||||
puts Bundler::Thor::VERSION\\\"\" | tail -1`" \
|
||||
== '%{bundler_thor_version}' ]
|
||||
|
||||
|
||||
# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,
|
||||
@ -762,6 +832,10 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}"
|
||||
%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE14}}
|
||||
|
||||
DISABLE_TESTS=""
|
||||
MSPECOPTS=""
|
||||
|
||||
# Avoid `hostname' dependency.
|
||||
%{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"}
|
||||
|
||||
# SIGSEV handler does not provide correct output on AArch64.
|
||||
# https://bugs.ruby-lang.org/issues/13758
|
||||
@ -774,15 +848,18 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur
|
||||
# https://bugs.ruby-lang.org/issues/14175
|
||||
sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb
|
||||
|
||||
# For now, disable test incompatible with OpenSSL 1.1.1:
|
||||
# https://github.com/rubygems/rubygems/issues/2388
|
||||
DISABLE_TESTS="$DISABLE_TESTS -n !/test_do_not_allow_invalid_client_cert_auth_connection/"
|
||||
# Skip random failed UDPSocket#recvfrom_nonblock tests
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1719743
|
||||
sed -i "/^ describe 'with data available' do$/,/^ end$/ s/^/#/" \
|
||||
spec/ruby/library/socket/udpsocket/recvfrom_nonblock_spec.rb
|
||||
sed -i "/^ describe 'with data available' do$/,/^ end$/ s/^/#/" \
|
||||
spec/ruby/library/socket/socket/recvfrom_nonblock_spec.rb
|
||||
|
||||
# RHEL8 is using stronger crypto policies then Fedora ATM and upstream does
|
||||
# not support them yet. Disable the RHEL8 configuration for the moment.
|
||||
# https://github.com/ruby/openssl/issues/215
|
||||
OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
make check TESTS="-v $DISABLE_TESTS"
|
||||
make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
|
||||
|
||||
%files
|
||||
%license BSDL
|
||||
@ -831,11 +908,13 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
%exclude %{ruby_libdir}/openssl.rb
|
||||
%exclude %{ruby_libdir}/psych.rb
|
||||
%{ruby_libdir}/cgi
|
||||
%{ruby_libdir}/csv
|
||||
%{ruby_libdir}/digest
|
||||
%{ruby_libdir}/drb
|
||||
%{ruby_libdir}/e2mmap
|
||||
%{ruby_libdir}/fiddle
|
||||
%{ruby_libdir}/fileutils
|
||||
%{ruby_libdir}/forwardable
|
||||
%exclude %{ruby_libdir}/irb
|
||||
%{ruby_libdir}/matrix
|
||||
%{ruby_libdir}/net
|
||||
%{ruby_libdir}/optparse
|
||||
@ -846,6 +925,8 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
%{ruby_libdir}/rss
|
||||
%{ruby_libdir}/shell
|
||||
%{ruby_libdir}/syslog
|
||||
%{ruby_libdir}/thwait
|
||||
%{ruby_libdir}/tracer
|
||||
%{ruby_libdir}/unicode_normalize
|
||||
%{ruby_libdir}/uri
|
||||
%{ruby_libdir}/webrick
|
||||
@ -979,19 +1060,32 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
|
||||
# TODO: Gemify these libraries
|
||||
%{gem_dir}/specifications/default/cmath-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/csv-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/date-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/csv-3.0.9.gemspec
|
||||
%{gem_dir}/specifications/default/date-2.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/dbm-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/etc-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/e2mmap-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/etc-1.0.1.gemspec
|
||||
%{gem_dir}/specifications/default/fcntl-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/fiddle-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/fileutils-1.0.2.gemspec
|
||||
%{gem_dir}/specifications/default/fileutils-1.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/forwardable-1.2.0.gemspec
|
||||
%{gem_dir}/specifications/default/gdbm-2.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/ipaddr-1.2.0.gemspec
|
||||
%{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec
|
||||
%{gem_dir}/specifications/default/logger-1.3.0.gemspec
|
||||
%{gem_dir}/specifications/default/matrix-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/ostruct-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/prime-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/rexml-3.1.9.gemspec
|
||||
%{gem_dir}/specifications/default/rss-0.2.7.gemspec
|
||||
%{gem_dir}/specifications/default/scanf-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/sdbm-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/stringio-0.0.1.gemspec
|
||||
%{gem_dir}/specifications/default/shell-0.7.gemspec
|
||||
%{gem_dir}/specifications/default/stringio-0.0.2.gemspec
|
||||
%{gem_dir}/specifications/default/strscan-1.0.0.gemspec
|
||||
%{gem_dir}/specifications/default/sync-0.5.0.gemspec
|
||||
%{gem_dir}/specifications/default/thwait-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/tracer-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/webrick-1.4.2.gemspec
|
||||
%{gem_dir}/specifications/default/zlib-1.0.0.gemspec
|
||||
|
||||
@ -1008,10 +1102,11 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
%{gem_dir}/specifications/rake-%{rake_version}.gemspec
|
||||
%{_mandir}/man1/rake.1*
|
||||
|
||||
%files irb
|
||||
%files -n rubygem-irb
|
||||
%{_bindir}/irb
|
||||
%{ruby_libdir}/irb.rb
|
||||
%{ruby_libdir}/irb
|
||||
%{ruby_libdir}/irb*
|
||||
%{gem_dir}/gems/irb-%{irb_version}
|
||||
%{gem_dir}/specifications/irb-%{irb_version}.gemspec
|
||||
%{_mandir}/man1/irb.1*
|
||||
|
||||
%files -n rubygem-rdoc
|
||||
@ -1029,7 +1124,7 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
|
||||
%files -n rubygem-bigdecimal
|
||||
%{ruby_libdir}/bigdecimal
|
||||
%{ruby_libarchdir}/bigdecimal.so
|
||||
%{ruby_libarchdir}/bigdecimal*
|
||||
%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}
|
||||
%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}
|
||||
%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec
|
||||
@ -1100,7 +1195,28 @@ OPENSSL_SYSTEM_CIPHERS_OVERRIDE=xyz_nonexistent_file OPENSSL_CONF='' \
|
||||
%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/xmlrpc.gemspec
|
||||
%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
|
||||
|
||||
%files -n rubygem-bundler
|
||||
%{_bindir}/bundle
|
||||
%{_bindir}/bundler
|
||||
%{gem_dir}/gems/bundler-%{bundler_version}
|
||||
%{gem_dir}/specifications/bundler-%{bundler_version}.gemspec
|
||||
%{_mandir}/man1/bundle*.1*
|
||||
%{_mandir}/man5/gemfile.5*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 11 2019 Jun Aruga <jaruga@redhat.com> - 2.6.3-105
|
||||
- Update to Ruby 2.6.3 by merging Fedora master branch (commit: 1cc2a49)
|
||||
* Properly generate "ruby(rubygems)" versioned dependencies.
|
||||
* Extract composition of dependecy strings into helper.
|
||||
* Loosen RDoc dependency.
|
||||
* Upstream fix adding -C flag instead of changing directory for gem build.
|
||||
* Remove obsolete Group tag
|
||||
* Fix ".include =" support in openssl.cnf.
|
||||
* Link IRB back to StdLib.
|
||||
* Link IRB files instead of directories.
|
||||
* Exclude irb.rb from ruby-libs.
|
||||
Resolves: rhbz#1672575
|
||||
|
||||
* Wed Apr 17 2019 Vít Ondruch <vondruch@redhat.com> - 2.5.5-104
|
||||
- Update to Ruby 2.5.5.
|
||||
* Remove Patch25: ruby-2.6.0-Update-for-tzdata-2018f.patch; subsumed
|
||||
|
@ -0,0 +1,24 @@
|
||||
From c16675582a68800ef17b6056110e0a8bcdb38b55 Mon Sep 17 00:00:00 2001
|
||||
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
Date: Tue, 22 Jan 2019 09:37:23 +0900
|
||||
Subject: [PATCH] Avoid rdoc hook when it's failed to load rdoc library.
|
||||
|
||||
Fixed #2483
|
||||
---
|
||||
lib/rubygems/rdoc.rb | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb
|
||||
index dfaf7c55bf..4e16fbb86f 100644
|
||||
--- a/lib/rubygems/rdoc.rb
|
||||
+++ b/lib/rubygems/rdoc.rb
|
||||
@@ -18,7 +18,7 @@
|
||||
module Gem
|
||||
RDoc = ::RDoc::RubygemsHook
|
||||
end
|
||||
+
|
||||
+ Gem.done_installing(&Gem::RDoc.method(:generation_hook))
|
||||
rescue LoadError
|
||||
end
|
||||
-
|
||||
-Gem.done_installing(&Gem::RDoc.method(:generation_hook))
|
@ -0,0 +1,88 @@
|
||||
From f4061357d812e9033f07ae3f8f44c4e26839f1e5 Mon Sep 17 00:00:00 2001
|
||||
From: bronzdoc <lsagastume1990@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 09:46:29 -0600
|
||||
Subject: [PATCH] Restore gem build behavior and introdcue the "-C" flag to gem
|
||||
build
|
||||
|
||||
---
|
||||
lib/rubygems/commands/build_command.rb | 41 +++++++++++++------
|
||||
.../test_gem_commands_build_command.rb | 1 +
|
||||
2 files changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb
|
||||
index e59471e976..761b80ee94 100644
|
||||
--- a/lib/rubygems/commands/build_command.rb
|
||||
+++ b/lib/rubygems/commands/build_command.rb
|
||||
@@ -18,6 +18,10 @@ def initialize
|
||||
add_option '-o', '--output FILE', 'output gem with the given filename' do |value, options|
|
||||
options[:output] = value
|
||||
end
|
||||
+
|
||||
+ add_option '-C PATH', '', 'Run as if gem build was started in <PATH> instead of the current working directory.' do |value, options|
|
||||
+ options[:build_path] = value
|
||||
+ end
|
||||
end
|
||||
|
||||
def arguments # :nodoc:
|
||||
@@ -60,25 +64,36 @@ def execute
|
||||
end
|
||||
|
||||
if File.exist? gemspec
|
||||
- Dir.chdir(File.dirname(gemspec)) do
|
||||
- spec = Gem::Specification.load File.basename(gemspec)
|
||||
-
|
||||
- if spec
|
||||
- Gem::Package.build(
|
||||
- spec,
|
||||
- options[:force],
|
||||
- options[:strict],
|
||||
- options[:output]
|
||||
- )
|
||||
- else
|
||||
- alert_error "Error loading gemspec. Aborting."
|
||||
- terminate_interaction 1
|
||||
+ spec = Gem::Specification.load(gemspec)
|
||||
+
|
||||
+ if options[:build_path]
|
||||
+ Dir.chdir(File.dirname(gemspec)) do
|
||||
+ spec = Gem::Specification.load File.basename(gemspec)
|
||||
+ build_package(spec)
|
||||
end
|
||||
+ else
|
||||
+ build_package(spec)
|
||||
end
|
||||
+
|
||||
else
|
||||
alert_error "Gemspec file not found: #{gemspec}"
|
||||
terminate_interaction 1
|
||||
end
|
||||
end
|
||||
|
||||
+ private
|
||||
+
|
||||
+ def build_package(spec)
|
||||
+ if spec
|
||||
+ Gem::Package.build(
|
||||
+ spec,
|
||||
+ options[:force],
|
||||
+ options[:strict],
|
||||
+ options[:output]
|
||||
+ )
|
||||
+ else
|
||||
+ alert_error "Error loading gemspec. Aborting."
|
||||
+ terminate_interaction 1
|
||||
+ end
|
||||
+ end
|
||||
end
|
||||
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
|
||||
index ac82a408c7..02d1b98e8f 100644
|
||||
--- a/test/rubygems/test_gem_commands_build_command.rb
|
||||
+++ b/test/rubygems/test_gem_commands_build_command.rb
|
||||
@@ -207,6 +207,7 @@ def test_execute_outside_dir
|
||||
gs.write @gem.to_ruby
|
||||
end
|
||||
|
||||
+ @cmd.options[:build_path] = gemspec_dir
|
||||
@cmd.options[:args] = [gemspec_file]
|
||||
|
||||
use_ui @ui do
|
@ -9,9 +9,9 @@ module RubyGemsProv
|
||||
def self.normalize_prerelease(version)
|
||||
if version.prerelease?
|
||||
prerelease = version.version.sub /^#{version.release}\./, ''
|
||||
"#{version.release}-0.1.#{prerelease}"
|
||||
"#{version.release}~#{prerelease}"
|
||||
else
|
||||
"#{version.release}-1"
|
||||
version.release
|
||||
end
|
||||
end
|
||||
end
|
||||
|
30
rubygems.req
30
rubygems.req
@ -38,28 +38,32 @@ module RubyGemsReq
|
||||
version == Gem::Version.new(0) ? "" : " #{op} #{version}"
|
||||
end
|
||||
end
|
||||
|
||||
# Compose dependency together with its requirements in RPM rich dependency
|
||||
# string.
|
||||
def self.compose_dependency_string(name, requirements)
|
||||
dependency_strings = requirements.map { |requirement| name + requirement }
|
||||
dependency_string = dependency_strings.join(' with ')
|
||||
dependency_string.prepend('(').concat(')') if dependency_strings.length > 1
|
||||
dependency_string
|
||||
end
|
||||
end
|
||||
|
||||
# Report RubyGems dependency, versioned if required.
|
||||
def self.rubygems_dependency(specification)
|
||||
Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement|
|
||||
dependency_string = "ruby(rubygems)"
|
||||
dependency_string += " #{specification.required_rubygems_version}" if requirement&.length > 0
|
||||
puts dependency_string
|
||||
end
|
||||
dependency_name = "ruby(rubygems)"
|
||||
requirements = Helpers::requirement_versions_to_rpm(specification.required_rubygems_version)
|
||||
|
||||
puts Helpers::compose_dependency_string(dependency_name, requirements)
|
||||
end
|
||||
|
||||
# Report all gem dependencies including their version.
|
||||
def self.gem_depenencies(specification)
|
||||
specification.runtime_dependencies.each do |dependency|
|
||||
dependency_strings = Helpers::requirement_versions_to_rpm(dependency.requirement).map do |requirement|
|
||||
requirement_string = "rubygem(#{dependency.name})"
|
||||
requirement_string += " #{requirement}" if requirement&.length > 0
|
||||
requirement_string
|
||||
end
|
||||
dependency_string = dependency_strings.join(' with ')
|
||||
dependency_string.prepend('(').concat(')') if dependency_strings.length > 1
|
||||
puts dependency_string
|
||||
dependency_name = "rubygem(#{dependency.name})"
|
||||
requirements = Helpers::requirement_versions_to_rpm(dependency.requirement)
|
||||
|
||||
puts Helpers::compose_dependency_string(dependency_name, requirements)
|
||||
end
|
||||
end
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ruby-2.5.5.tar.xz) = 06b1d58536ebfacb7b56c1e6ed4b8ab816fadc4f48c845a452554cd262e7908199a30e5793f3cbaec2db56a8803aa5c6089abf7bf06c8fc47867e97870b7dfec
|
||||
SHA512 (ruby-2.6.3.tar.xz) = 959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8
|
||||
|
Loading…
Reference in New Issue
Block a user