diff options
author | Hans de Graaff <hans@degraaff.org> | 2015-10-11 11:49:26 +0200 |
---|---|---|
committer | Hans de Graaff <hans@degraaff.org> | 2015-10-11 11:49:26 +0200 |
commit | 8cfb8e97c3b9e2a9c076914bfde25e49c6322af4 (patch) | |
tree | b6353d4291e64ffd9814fc7f484df19b4bcd61ea /patchsets | |
parent | Show year on x axis rather than meaningless day. (diff) | |
download | ruby-scripts-8cfb8e97c3b9e2a9c076914bfde25e49c6322af4.tar.gz ruby-scripts-8cfb8e97c3b9e2a9c076914bfde25e49c6322af4.tar.bz2 ruby-scripts-8cfb8e97c3b9e2a9c076914bfde25e49c6322af4.zip |
Updated patchset for ruby 2.2.3-r1 with backported support for libressl.
https://bugs.gentoo.org/show_bug.cgi?id=562286
Diffstat (limited to 'patchsets')
-rw-r--r-- | patchsets/patches-2.2.3-r1/004_gfbsd7.patch | 37 | ||||
-rw-r--r-- | patchsets/patches-2.2.3-r1/005_no-undefined-ext.patch | 11 | ||||
-rw-r--r-- | patchsets/patches-2.2.3-r1/009_no-gems.patch | 88 | ||||
-rw-r--r-- | patchsets/patches-2.2.3-r1/010-libressl.patch | 57 |
4 files changed, 193 insertions, 0 deletions
diff --git a/patchsets/patches-2.2.3-r1/004_gfbsd7.patch b/patchsets/patches-2.2.3-r1/004_gfbsd7.patch new file mode 100644 index 0000000..450d714 --- /dev/null +++ b/patchsets/patches-2.2.3-r1/004_gfbsd7.patch @@ -0,0 +1,37 @@ +--- configure.in.orig 2013-05-05 19:36:02.800254192 +0200 ++++ configure.in 2013-05-05 19:37:56.573346196 +0200 +@@ -2156,7 +2156,7 @@ + fi + + AS_CASE(["$target_os"], +-[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl], [ ++[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl | freebsd* | dragonfly*], [ + if test "$rb_cv_binary_elf" = no; then + with_dln_a_out=yes + else +@@ -2249,7 +2249,7 @@ + [bsdi3*], [ AS_CASE(["$CC"], + [*shlicc*], [ : ${LDSHARED='$(CC) -r'} + rb_cv_dlopen=yes])], +- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [ ++ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | freebsd7*], [ + : ${LDSHARED='$(CC) -shared'} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-export-dynamic" +@@ -2262,7 +2262,6 @@ + [freebsd*|dragonfly*], [ + : ${LDSHARED='$(CC) -shared'} + if test "$rb_cv_binary_elf" = yes; then +- LDFLAGS="$LDFLAGS -rdynamic" + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@' + else + test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable' +@@ -2638,7 +2637,7 @@ + [sunos4*], [ + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + ], +- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [ ++ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | freebsd7*], [ + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR" + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' + if test "$load_relative" = yes; then diff --git a/patchsets/patches-2.2.3-r1/005_no-undefined-ext.patch b/patchsets/patches-2.2.3-r1/005_no-undefined-ext.patch new file mode 100644 index 0000000..f279932 --- /dev/null +++ b/patchsets/patches-2.2.3-r1/005_no-undefined-ext.patch @@ -0,0 +1,11 @@ +--- ruby-1.9.3-preview1.orig/configure.in ++++ ruby-1.9.3-preview1/configure.in +@@ -2038,7 +2038,7 @@ if test "$with_dln_a_out" != yes; then + [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [ + : ${LDSHARED='$(CC) -shared'} + if test "$rb_cv_binary_elf" = yes; then +- LDFLAGS="$LDFLAGS -Wl,-export-dynamic" ++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined" + fi + rb_cv_dlopen=yes], + [interix*], [ : ${LDSHARED='$(CC) -shared'} diff --git a/patchsets/patches-2.2.3-r1/009_no-gems.patch b/patchsets/patches-2.2.3-r1/009_no-gems.patch new file mode 100644 index 0000000..a67cbf8 --- /dev/null +++ b/patchsets/patches-2.2.3-r1/009_no-gems.patch @@ -0,0 +1,88 @@ +--- tool/rbinstall.rb.~1~ 2015-03-25 04:33:14.000000000 +0100 ++++ tool/rbinstall.rb 2015-04-14 07:07:01.169073427 +0200 +@@ -654,83 +654,11 @@ + # :startdoc: + + install?(:ext, :comm, :gem) do +- $:.unshift(File.join(srcdir, "lib")) +- require("rubygems.rb") +- gem_dir = Gem.default_dir +- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) +- prepare "default gems", gem_dir, directories +- +- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0]) +- default_spec_dir = "#{spec_dir}/default" +- makedirs(default_spec_dir) +- +- gems = {} +- File.foreach(File.join(srcdir, "defs/default_gems")) do |line| +- line.chomp! +- line.sub!(/\s*#.*/, '') +- next if line.empty? +- words = [] +- line.scan(/\G\s*([^\[\]\s]+|\[([^\[\]]*)\])/) do +- words << ($2 ? $2.split : $1) +- end +- name, base_dir, src, execs = *words +- next unless name and base_dir and src +- +- src = File.join(srcdir, src) +- base_dir = File.join(srcdir, base_dir) +- specgen = RbInstall::Specs::Generator.new(name, base_dir, src, execs || []) +- gems[name] ||= specgen +- end +- +- Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").each do |src| +- specgen = RbInstall::Specs::Reader.new(src) +- gems[specgen.gemspec.name] ||= specgen +- end +- +- gems.sort.each do |name, specgen| +- gemspec = specgen.gemspec +- base_dir = specgen.src.sub(/\A#{Regexp.escape(srcdir)}\//, "") +- full_name = "#{gemspec.name}-#{gemspec.version}" +- +- puts "#{" "*30}#{gemspec.name} #{gemspec.version}" +- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec") +- open_for_install(gemspec_path, $data_mode) do +- specgen.spec_source +- end +- +- unless gemspec.executables.empty? then +- bin_dir = File.join(gem_dir, 'gems', full_name, 'bin') +- makedirs(bin_dir) +- +- execs = gemspec.executables.map {|exec| File.join(srcdir, 'bin', exec)} +- install(execs, bin_dir, :mode => $prog_mode) +- end +- end ++ # gems are unbundled in Gentoo. + end + + install?(:ext, :comm, :gem) do +- begin +- require "zlib" +- rescue LoadError +- end +- if defined?(Zlib) +- require 'pathname' +- gem_dir = Gem.default_dir +- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) +- prepare "bundle gems", gem_dir, directories +- Dir.glob(srcdir+'/gems/*.gem').each do |gem| +- Gem.install gem, Gem::Requirement.default, :install_dir => with_destdir(Gem.dir), :domain => :local, :ignore_dependencies => true +- gemname = Pathname(gem).basename +- puts "#{" "*30}#{gemname}" +- end +- # fix directory permissions +- # TODO: Gem.install should accept :dir_mode option or something +- File.chmod($dir_mode, *Dir.glob(with_destdir(Gem.dir)+"/**/")) +- # fix .gemspec permissions +- File.chmod($data_mode, *Dir.glob(with_destdir(Gem.dir)+"/specifications/*.gemspec")) +- else +- puts "skip installing bundle gems because of lacking zlib" +- end ++ # gems are unbundled in Gentoo. + end + + parse_args() diff --git a/patchsets/patches-2.2.3-r1/010-libressl.patch b/patchsets/patches-2.2.3-r1/010-libressl.patch new file mode 100644 index 0000000..9cc40c7 --- /dev/null +++ b/patchsets/patches-2.2.3-r1/010-libressl.patch @@ -0,0 +1,57 @@ +From 25455e611c9d7165152737989037a69c5dd3ecf1 Mon Sep 17 00:00:00 2001 +From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> +Date: Thu, 12 Feb 2015 09:34:02 +0000 +Subject: [PATCH] openssl: check RAND_edg to support libressl + +* ext/openssl/extconf.rb: check RAND_edg to support libressl. +* ext/openssl/ossl_rand.c (ossl_rand_egd): define only if RAND_edg + is available. [Fix GH-829] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + ext/openssl/extconf.rb | 1 + + ext/openssl/ossl_rand.c | 4 ++++ + 3 files changed, 12 insertions(+) + +--- a/ext/openssl/extconf.rb ++++ b/ext/openssl/extconf.rb +@@ -87,6 +87,7 @@ + have_func("PEM_def_callback") + have_func("PKCS5_PBKDF2_HMAC") + have_func("PKCS5_PBKDF2_HMAC_SHA1") ++have_func("RAND_egd") + have_func("X509V3_set_nconf") + have_func("X509V3_EXT_nconf_nid") + have_func("X509_CRL_add0_revoked") +diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c +index 29cbf8c..27466fe 100644 +--- a/ext/openssl/ossl_rand.c ++++ b/ext/openssl/ossl_rand.c +@@ -148,6 +148,7 @@ ossl_rand_pseudo_bytes(VALUE self, VALUE len) + return str; + } + ++#ifdef HAVE_RAND_EGD + /* + * call-seq: + * egd(filename) -> true +@@ -186,6 +187,7 @@ ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len) + } + return Qtrue; + } ++#endif /* HAVE_RAND_EGD */ + + /* + * call-seq: +@@ -219,8 +221,10 @@ Init_ossl_rand(void) + rb_define_module_function(mRandom, "write_random_file", ossl_rand_write_file, 1); + rb_define_module_function(mRandom, "random_bytes", ossl_rand_bytes, 1); + rb_define_module_function(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1); ++#ifdef HAVE_RAND_EGD + rb_define_module_function(mRandom, "egd", ossl_rand_egd, 1); + rb_define_module_function(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2); ++#endif /* HAVE_RAND_EGD */ + rb_define_module_function(mRandom, "status?", ossl_rand_status, 0); + } + |