From e8194c2c5b1710b3504dc7a954cc4d17cbd78ffd Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 14 Feb 2018 09:53:54 +0000 Subject: ruby: remove unsupported versions (#34927) * remove EOL ruby versions for security and maintenance reasons. * only expose ruby_MAJOR_MINOR to the top-level. we don't provide guarantees for the TINY version. * mark all related packages as broken * switch the default ruby version from 2.3.x to 2.4.x --- pkgs/development/interpreters/ruby/default.nix | 41 +++------------------- pkgs/development/interpreters/ruby/patchsets.nix | 23 ------------- pkgs/development/interpreters/ruby/rand-egd.patch | 42 ----------------------- pkgs/development/interpreters/ruby/ssl_v3.patch | 16 --------- 4 files changed, 4 insertions(+), 118 deletions(-) delete mode 100644 pkgs/development/interpreters/ruby/rand-egd.patch delete mode 100644 pkgs/development/interpreters/ruby/ssl_v3.patch (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 9d82810900f0..279f38f75917 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -87,8 +87,6 @@ let enableParallelBuilding = true; - hardeningDisable = lib.optional isRuby20 "format"; - patches = (import ./patchsets.nix { inherit patchSet useRailsExpress ops; @@ -100,16 +98,9 @@ let pushd ${sourceRoot}/rubygems patch -p1 < ${rubygemsPatch} popd - '' + opString isRuby21 '' - rm "$sourceRoot/enc/unicode/name2ctype.h" ''; - postPatch = if isRuby21 then '' - rm tool/config_files.rb - cp ${config}/config.guess tool/ - cp ${config}/config.sub tool/ - '' - else if isRuby25 then '' + postPatch = if isRuby25 then '' sed -i configure.ac -e '/config.guess/d' cp ${config}/config.guess tool/ cp ${config}/config.sub tool/ @@ -189,31 +180,7 @@ let ) args; in self; in { - ruby_2_0_0 = generic { - version = rubyVersion "2" "0" "0" "p648"; - sha256 = { - src = "1y3n4c6xw2wki7pyjpq5zpbgxnw5i3jc8mcpj6rk7hs995mvv446"; - git = "0ncjfq4hfqj9kcr8pbll6kypwnmcgs8w7l4466qqfyv7jj3yjd76"; - }; - }; - - ruby_2_1_10 = generic { - version = rubyVersion "2" "1" "10" ""; - sha256 = { - src = "086x66w51lg41abjn79xb7f6xsryymkcc3nvakmkjnjyg96labpv"; - git = "133phd5r5y0np5lc9nqif93l7yb13yd52aspyl6c46z5jhvhyvfi"; - }; - }; - - ruby_2_2_9 = generic { - version = rubyVersion "2" "2" "9" ""; - sha256 = { - src = "19m1ximl7vcrsvq595dgrjh4yb6kar944095wbywqh7waiqcfirg"; - git = "03qrjh55098wcqh2khxryzkzfqkznjrcdgwf27r2bgcycbg5ca5q"; - }; - }; - - ruby_2_3_6 = generic { + ruby_2_3 = generic { version = rubyVersion "2" "3" "6" ""; sha256 = { src = "07jpa7fw1gyf069m7alf2b0zm53qm08w2ns45mhzmvgrg4r528l3"; @@ -221,7 +188,7 @@ in { }; }; - ruby_2_4_3 = generic { + ruby_2_4 = generic { version = rubyVersion "2" "4" "3" ""; sha256 = { src = "161smb52q19r9lrzy22b3bhnkd0z8wjffm0qsfkml14j5ic7a0zx"; @@ -229,7 +196,7 @@ in { }; }; - ruby_2_5_0 = generic { + ruby_2_5 = generic { version = rubyVersion "2" "5" "0" ""; sha256 = { src = "1azj0d2lzziw6iml7bx3sxpxzcdmfwfq3yhm7djyp20q1xiz7rj6"; diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 55f4a9ef237b..fc79761252f2 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -1,29 +1,6 @@ { patchSet, useRailsExpress, ops, patchLevel }: rec { - "2.0.0" = [ - ./ssl_v3.patch - ./rand-egd.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/02-railsexpress-gc.patch" - "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - ]; - "2.1.10" = [ - ./rand-egd.patch - ] ++ ops useRailsExpress [ - # 2.1.10 patchsets are not available, but 2.1.8 patchsets apply - "${patchSet}/patches/ruby/2.1.8/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/05-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/06-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/07-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/08-funny-falcon-method-cache.patch" - "${patchSet}/patches/ruby/2.1.8/railsexpress/09-heap-dump-support.patch" - ]; "2.2.9" = ops useRailsExpress [ "${patchSet}/patches/ruby/2.2/head/railsexpress/01-zero-broken-tests.patch" "${patchSet}/patches/ruby/2.2/head/railsexpress/02-improve-gc-stats.patch" diff --git a/pkgs/development/interpreters/ruby/rand-egd.patch b/pkgs/development/interpreters/ruby/rand-egd.patch deleted file mode 100644 index e4f6452000c2..000000000000 --- a/pkgs/development/interpreters/ruby/rand-egd.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb -index e272cba..3a1fa71 100644 ---- 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,7 +221,9 @@ Init_ossl_rand(void) - DEFMETH(mRandom, "write_random_file", ossl_rand_write_file, 1); - DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1); - DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1); -+#ifdef HAVE_RAND_EGD - DEFMETH(mRandom, "egd", ossl_rand_egd, 1); - DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2); -+#endif /* HAVE_RAND_EGD */ - DEFMETH(mRandom, "status?", ossl_rand_status, 0) - } diff --git a/pkgs/development/interpreters/ruby/ssl_v3.patch b/pkgs/development/interpreters/ruby/ssl_v3.patch deleted file mode 100644 index faa402165751..000000000000 --- a/pkgs/development/interpreters/ruby/ssl_v3.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/ext/openssl/ossl_ssl.c 2015-11-26 16:41:03.775058140 +0000 -+++ b/ext/openssl/ossl_ssl.c 2015-11-26 16:40:56.191907346 +0000 -@@ -138,9 +138,12 @@ - OSSL_SSL_METHOD_ENTRY(SSLv2_server), - OSSL_SSL_METHOD_ENTRY(SSLv2_client), - #endif -+#if defined(HAVE_SSLV3_METHOD) && defined(HAVE_SSLV3_SERVER_METHOD) && \ -+ defined(HAVE_SSLV3_CLIENT_METHOD) - OSSL_SSL_METHOD_ENTRY(SSLv3), - OSSL_SSL_METHOD_ENTRY(SSLv3_server), - OSSL_SSL_METHOD_ENTRY(SSLv3_client), -+#endif - OSSL_SSL_METHOD_ENTRY(SSLv23), - OSSL_SSL_METHOD_ENTRY(SSLv23_server), - OSSL_SSL_METHOD_ENTRY(SSLv23_client), - -- cgit 1.4.1