From 9f47f66986eba46b9916e807a1e56207c3ab051c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 03 2021 07:47:21 +0000 Subject: import rh-ruby26-ruby-2.6.7-119.el7 --- diff --git a/.gitignore b/.gitignore index 03d154e..978802b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ruby-2.6.2.tar.xz +SOURCES/ruby-2.6.7.tar.xz diff --git a/.rh-ruby26-ruby.metadata b/.rh-ruby26-ruby.metadata index d718a1b..25bfc62 100644 --- a/.rh-ruby26-ruby.metadata +++ b/.rh-ruby26-ruby.metadata @@ -1 +1 @@ -b7b3432519f80ea50adc9bfb937c7a46865a93d5 SOURCES/ruby-2.6.2.tar.xz +1fd1448125a00cd7b9994637b5e561506de6a6d3 SOURCES/ruby-2.6.7.tar.xz diff --git a/SOURCES/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/SOURCES/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 0770723..14da77e 100644 --- a/SOURCES/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/SOURCES/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3855,6 +3855,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3872,6 +3872,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/SOURCES/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/SOURCES/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 116bb66..d5ecc34 100644 --- a/SOURCES/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/SOURCES/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3085,6 +3085,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3102,6 +3102,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/SOURCES/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/SOURCES/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index bfb197f..f7f364f 100644 --- a/SOURCES/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/SOURCES/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -3710,7 +3710,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3727,7 +3727,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/SOURCES/ruby-2.1.0-always-use-i386.patch b/SOURCES/ruby-2.1.0-always-use-i386.patch index d63752a..cde4302 100644 --- a/SOURCES/ruby-2.1.0-always-use-i386.patch +++ b/SOURCES/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -3774,6 +3774,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3791,6 +3791,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/SOURCES/ruby-2.1.0-custom-rubygems-location.patch b/SOURCES/ruby-2.1.0-custom-rubygems-location.patch index c4893da..d9b6915 100644 --- a/SOURCES/ruby-2.1.0-custom-rubygems-location.patch +++ b/SOURCES/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3746,6 +3746,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3763,6 +3763,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='' -@@ -3770,6 +3774,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3787,6 +3787,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -64,18 +64,18 @@ index 79c003e..34f2382 100644 % R = {} % R["ruby_version"] = '"RUBY_LIB_VERSION"' diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index b47b6e1..0b99408 100755 +index d8987af..1efbd33 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -334,6 +334,7 @@ def CONFIG.[](name, mandatory = false) - sitearchlibdir = CONFIG["sitearchdir"] - vendorlibdir = CONFIG["vendorlibdir"] - vendorarchlibdir = CONFIG["vendorarchdir"] +@@ -338,6 +338,7 @@ if CONFIG["vendordir"] + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] + end +rubygemsdir = CONFIG["rubygemsdir"] mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -560,7 +561,16 @@ def stub +@@ -564,7 +565,16 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/SOURCES/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/SOURCES/ruby-2.2.3-Generate-preludes-using-miniruby.patch index 7118a32..e8107d7 100644 --- a/SOURCES/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/SOURCES/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1052,9 +1052,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -1053,9 +1053,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(srcdir)/template/prelude.c.tmpl $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/SOURCES/ruby-2.3.0-ruby_version.patch b/SOURCES/ruby-2.3.0-ruby_version.patch index a74fb74..e46915c 100644 --- a/SOURCES/ruby-2.3.0-ruby_version.patch +++ b/SOURCES/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -3661,9 +3661,6 @@ AS_CASE(["$target_os"], +@@ -3678,9 +3678,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], -@@ -3686,56 +3683,62 @@ AC_ARG_WITH(ridir, +@@ -3703,56 +3703,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) -@@ -3752,6 +3755,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3769,6 +3769,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index d4c110e..d39c9a6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -424,7 +424,7 @@ def CONFIG.[](name, mandatory = false) +@@ -428,7 +428,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir diff --git a/SOURCES/ruby-2.6.9-Do-not-use-C99.patch b/SOURCES/ruby-2.6.9-Do-not-use-C99.patch new file mode 100644 index 0000000..3686afd --- /dev/null +++ b/SOURCES/ruby-2.6.9-Do-not-use-C99.patch @@ -0,0 +1,16 @@ +diff --git a/hash.c b/hash.c +index 38440f4b96..b4b077fada 100644 +--- a/hash.c ++++ b/hash.c +@@ -5656,9 +5656,10 @@ static void + keylist_delete(VALUE keys, VALUE key) + { + long keylen, elen; ++ long i; + const char *keyptr, *eptr; + RSTRING_GETMEM(key, keyptr, keylen); +- for (long i=0; i +Date: Fri, 29 May 2020 14:13:30 -0700 +Subject: [PATCH] Convert ip addresses to canonical form in + Resolv::DNS::Requester::UnconnectedUDP#sender + +Otherwise, if the IP address given is not in canonical form, it +won't match, and Resolv will ignore it. + +Fixes [Bug #16439] +--- + lib/resolv.rb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/resolv.rb b/lib/resolv.rb +index e7b45e785a85..d78531e174fd 100644 +--- a/lib/resolv.rb ++++ b/lib/resolv.rb +@@ -762,6 +762,7 @@ def recv_reply(readable_socks) + end + + def sender(msg, data, host, port=Port) ++ host = Addrinfo.ip(host).ip_address + lazy_initialize + sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"] + return nil if !sock diff --git a/SOURCES/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch b/SOURCES/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch new file mode 100644 index 0000000..ca5f702 --- /dev/null +++ b/SOURCES/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch @@ -0,0 +1,157 @@ +From 65cfebb041c454c246aaf32a177b0243915a9998 Mon Sep 17 00:00:00 2001 +From: fatkodima +Date: Fri, 1 Nov 2019 23:06:10 +0200 +Subject: [PATCH] Don't use insecure temporary directory as home directory + +--- + lib/bundler.rb | 29 +++++++++++--------------- + spec/bundler/bundler_spec.rb | 38 +++++++++-------------------------- + spec/bundler/settings_spec.rb | 2 +- + 3 files changed, 22 insertions(+), 47 deletions(-) + +diff --git a/lib/bundler.rb b/lib/bundler.rb +index 2ada6fe7891..b184f7e69c6 100644 +--- a/lib/bundler.rb ++++ b/lib/bundler.rb +@@ -170,8 +170,7 @@ def user_home + end + + if warning +- Kernel.send(:require, "etc") +- user_home = tmp_home_path(Etc.getlogin, warning) ++ user_home = tmp_home_path(warning) + Bundler.ui.warn "#{warning}\nBundler will use `#{user_home}' as your home directory temporarily.\n" + user_home + else +@@ -180,21 +180,6 @@ def user_home + end + end + +- def tmp_home_path(login, warning) +- login ||= "unknown" +- Kernel.send(:require, "tmpdir") +- path = Pathname.new(Dir.tmpdir).join("bundler", "home") +- SharedHelpers.filesystem_access(path) do |tmp_home_path| +- unless tmp_home_path.exist? +- tmp_home_path.mkpath +- tmp_home_path.chmod(0o777) +- end +- tmp_home_path.join(login).tap(&:mkpath) +- end +- rescue RuntimeError => e +- raise e.exception("#{warning}\nBundler also failed to create a temporary home directory at `#{path}':\n#{e}") +- end +- + def user_bundle_path(dir = "home") + env_var, fallback = case dir + when "home" +@@ -555,6 +555,17 @@ def configure_gem_home + Bundler.rubygems.clear_paths + end + ++ def tmp_home_path(warning) ++ Kernel.send(:require, "tmpdir") ++ SharedHelpers.filesystem_access(Dir.tmpdir) do ++ path = Bundler.tmp ++ at_exit { Bundler.rm_rf(path) } ++ path ++ end ++ rescue RuntimeError => e ++ raise e.exception("#{warning}\nBundler also failed to create a temporary home directory':\n#{e}") ++ end ++ + # @param env [Hash] + def with_env(env) + backup = ENV.to_hash +diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb +index 74cf7ae05d3..247838600bf 100644 +--- a/spec/bundler/bundler/bundler_spec.rb ++++ b/spec/bundler/bundler/bundler_spec.rb +@@ -233,16 +233,13 @@ + path = "/home/oggy" + allow(Bundler.rubygems).to receive(:user_home).and_return(path) + allow(File).to receive(:directory?).with(path).and_return false +- allow(Etc).to receive(:getlogin).and_return("USER") +- allow(Dir).to receive(:tmpdir).and_return("/TMP") +- allow(FileTest).to receive(:exist?).with("/TMP/bundler/home").and_return(true) +- expect(FileUtils).to receive(:mkpath).with("/TMP/bundler/home/USER") ++ allow(Bundler).to receive(:tmp).and_return(Pathname.new("/tmp/trulyrandom")) + message = <= %{rubygems_version} @@ -184,6 +198,7 @@ Requires: %{?scl_prefix}rubygem(rdoc) >= %{rdoc_version} # Requires: %%{?scl_prefix}rubygem(strscan) >= %%{strscan_version} # Requires: %%{?scl_prefix}rubygem(webrick) >= %%{webrick_version} # Requires: %%{?scl_prefix}rubygem(zlib) >= %%{zlib_version} + BuildRequires: autoconf BuildRequires: gdbm-devel %{?with_gmp:BuildRequires: gmp-devel} @@ -578,6 +593,9 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch11 -p1 %patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -639,11 +657,16 @@ for cert in \ rubygems.org/AddTrustExternalCARoot.pem \ index.rubygems.org/GlobalSignRootCA.pem 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 + +for cert in \ + rubygems.org/GlobalSignRootCA.pem +do + rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert + rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/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)" \ @@ -791,7 +814,7 @@ EOF} %if 0%{?with_hardening_test} # Check Ruby hardening. -checksec -f libruby.so.%{ruby_version} | \ +checksec --file=libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" %endif @@ -864,6 +887,14 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # which fails on Koji. # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb +# Disable Timeouting test_queue_with_trap +# https://github.com/ruby/ruby/pull/3101/ +sed -i '/^ def test_queue_with_trap$/,/^ end$/ s/^/#/g' \ + test/ruby/test_thread_queue.rb +# Disable "File.utime allows Time instances in the far future to set +# mtime and atime". +# https://bugs.ruby-lang.org/issues/16410 +MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to set mtime and atime'" make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" @@ -1071,7 +1102,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" # TODO: Gemify these libraries %{gem_dir}/specifications/default/cmath-1.0.0.gemspec -%{gem_dir}/specifications/default/csv-3.0.4.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/e2mmap-0.1.0.gemspec @@ -1087,7 +1118,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{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/rexml-3.1.9.1.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 @@ -1097,7 +1128,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{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/webrick-1.4.4.gemspec %{gem_dir}/specifications/default/zlib-1.0.0.gemspec %files -n %{?scl_prefix}rubygems-devel @@ -1212,6 +1243,16 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_mandir}/man5/gemfile.5* %changelog +* Wed Apr 14 2021 Jarek Prokop - 2.6.7-107 +- Upgrade to Ruby 2.6.7. + Resolves: rhbz#1701182 +- Resolv::DNS: timeouts if multiple IPv6 name servers are given an address + containing leading zero + Resolves: rhbz#1950331 +- Fix: Rubygem-bundler: Don't use insecure tmp directory as home + allows for execution of malicious code. + Resolves: CVE-2019-3881 + * Mon Mar 25 2019 Vít Ondruch - 2.6.2-118 - Exclude {rdoc,irb}.rb dangling symlinks from ruby-libs.