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
This commit is contained in:
zimbatm 2018-02-14 09:53:54 +00:00 committed by GitHub
parent c80adf5f72
commit e8194c2c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 34 additions and 150 deletions

View file

@ -103,6 +103,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
broken = true; # needs ruby 2.2
description = "Vim - the text editor - for macOS";
homepage = https://github.com/b4winckler/macvim;
license = licenses.vim;

View file

@ -7,6 +7,7 @@ bundlerEnv {
gemdir = ./.;
meta = {
broken = true; # needs ruby 2.0
description = "A modern and powerful project management tool";
homepage = http://taskjuggler.org/;
license = lib.licenses.gpl2;

View file

@ -64,6 +64,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
broken = true; # needs ruby 2.1
homepage = https://github.com/CenturyLinkLabs/panamax-api;
description = "The API behind The Panamax UI";
license = licenses.asl20;

View file

@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
broken = true; # needs ruby 2.1
homepage = https://github.com/CenturyLinkLabs/panamax-ui;
description = "The Web GUI for Panamax";
license = licenses.asl20;

View file

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

View file

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

View file

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

View file

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

View file

@ -9,6 +9,7 @@ bundlerEnv {
buildInputs = [ perl autoconf ];
meta = with lib; {
broken = true; # needs ruby 2.0
description = "Backup and restore your Redis data to and from JSON";
homepage = http://delanotes.com/redis-dump/;
license = licenses.mit;

View file

@ -1,4 +1,4 @@
{ lib, bundlerEnv, ruby_2_2, stdenv, makeWrapper }:
{ lib, bundlerEnv, ruby, stdenv, makeWrapper }:
stdenv.mkDerivation rec {
name = "rhc-1.38.7";
@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
env = bundlerEnv {
name = "rhc-1.38.7-gems";
ruby = ruby_2_2;
inherit ruby;
gemdir = ./.;
};
@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
broken = true; # requires ruby 2.2
homepage = https://github.com/openshift/rhc;
description = "OpenShift client tools";
license = licenses.asl20;

View file

@ -1,14 +1,15 @@
{ stdenv, lib, bundlerEnv, ruby_2_1, curl }:
{ stdenv, lib, bundlerEnv, ruby, curl }:
bundlerEnv {
name = "backup_v4";
ruby = ruby_2_1;
inherit ruby;
gemdir = ./.;
buildInputs = [ curl ];
meta = with lib; {
broken = true; # need ruby 2.1
description = "Easy full stack backup operations on UNIX-like systems";
homepage = http://backup.github.io/backup/v4/;
license = licenses.mit;

View file

@ -1,13 +1,14 @@
{ buildRubyGem, lib, ruby_2_2 }:
{ buildRubyGem, lib, ruby }:
buildRubyGem rec {
ruby = ruby_2_2;
inherit ruby;
name = "${gemName}-${version}";
gemName = "flvtool2";
version = "1.0.6";
source.sha256 = "0xsla1061pi4ryh3jbvwsbs8qchprchbqjy7652g2g64v37i74qj";
meta = {
broken = true; # depends on ruby 2.2
homepage = https://github.com/unnu/flvtool2;
description = "A tool to manipulate Macromedia Flash Video files";
platforms = ruby.meta.platforms;

View file

@ -122,6 +122,7 @@ mapAliases (rec {
nmap_graphical = nmap-graphical; # added 2017-01-19
nfsUtils = nfs-utils; # added 2014-12-06
opencl-icd = ocl-icd; # added 2017-01-20
openssh_with_kerberos = openssh; # added 2018-01-28
owncloudclient = owncloud-client; # added 2016-08
pgp-tools = signing-party; # added 2017-03-26
pidgin-with-plugins = pidgin; # added 2016-06
@ -146,7 +147,12 @@ mapAliases (rec {
rdmd = dtools; # added 2017-08-19
robomongo = robo3t; #added 2017-09-28
rssglx = rss-glx; #added 2015-03-25
openssh_with_kerberos = openssh; # added 2018-01-28
ruby_2_0_0 = throw "deprecated 2018-0213: use a newer version of ruby";
ruby_2_1_0 = throw "deprecated 2018-0213: use a newer version of ruby";
ruby_2_2_9 = throw "deprecated 2018-0213: use ruby_2_2 instead";
ruby_2_3_6 = throw "deprecated 2018-0213: use ruby_2_3 instead";
ruby_2_4_3 = throw "deprecated 2018-0213: use ruby_2_4 instead";
ruby_2_5_0 = throw "deprecated 2018-0213: use ruby_2_5 instead";
rubygems = throw "deprecated 2016-03-02: rubygems is now bundled with ruby";
rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02
samsungUnifiedLinuxDriver = samsung-unified-linux-driver; # added 2016-01-25

View file

@ -7078,21 +7078,11 @@ with pkgs;
bundlerApp = callPackage ../development/ruby-modules/bundler-app { };
inherit (callPackage ../development/interpreters/ruby { inherit (darwin.apple_sdk.frameworks) Foundation; })
ruby_2_0_0
ruby_2_1_10
ruby_2_2_9
ruby_2_3_6
ruby_2_4_3
ruby_2_5_0;
ruby_2_3
ruby_2_4
ruby_2_5;
# Ruby aliases
ruby = ruby_2_3;
ruby_2_0 = ruby_2_0_0;
ruby_2_1 = ruby_2_1_10;
ruby_2_2 = ruby_2_2_9;
ruby_2_3 = ruby_2_3_6;
ruby_2_4 = ruby_2_4_3;
ruby_2_5 = ruby_2_5_0;
ruby = ruby_2_4;
scsh = callPackage ../development/interpreters/scsh { };
@ -7917,9 +7907,7 @@ with pkgs;
hammer = callPackage ../development/tools/parsing/hammer { };
redis-dump = callPackage ../development/tools/redis-dump {
ruby = ruby_2_0;
};
redis-dump = callPackage ../development/tools/redis-dump { };
redo = callPackage ../development/tools/build-managers/redo { };
@ -16441,12 +16429,8 @@ with pkgs;
ostinato = callPackage ../applications/networking/ostinato { };
panamax_api = callPackage ../applications/networking/cluster/panamax/api {
ruby = ruby_2_1;
};
panamax_ui = callPackage ../applications/networking/cluster/panamax/ui {
ruby = ruby_2_1;
};
panamax_api = callPackage ../applications/networking/cluster/panamax/api { };
panamax_ui = callPackage ../applications/networking/cluster/panamax/ui { };
partio = callPackage ../development/libraries/partio {};
@ -17398,7 +17382,7 @@ with pkgs;
teamspeak_client = libsForQt5.callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { };
teamspeak_server = callPackage ../applications/networking/instant-messengers/teamspeak/server.nix { };
taskjuggler = callPackage ../applications/misc/taskjuggler { ruby = ruby_2_0; };
uaskjuggler = callPackage ../applications/misc/taskjuggler { };
tasknc = callPackage ../applications/misc/tasknc { };
@ -17618,7 +17602,7 @@ with pkgs;
inherit (gnome3) defaultIconTheme;
};
macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; ruby = ruby_2_2; };
macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; };
vimHugeX = vim_configurable;