From 39297fa36bb12d100421bc3831ea999fbfd37536 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Tue, 15 Nov 2016 14:33:56 +0100 Subject: [PATCH] rush: 1.7 -> 1.8 (#20424) --- pkgs/shells/rush/default.nix | 6 +++--- pkgs/shells/rush/fix-format-security-error.patch | 12 ++++++++++++ pkgs/shells/rush/gets.patch | 13 ------------- 3 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 pkgs/shells/rush/fix-format-security-error.patch delete mode 100644 pkgs/shells/rush/gets.patch diff --git a/pkgs/shells/rush/default.nix b/pkgs/shells/rush/default.nix index bbad1f8cdf4..8280897c47a 100644 --- a/pkgs/shells/rush/default.nix +++ b/pkgs/shells/rush/default.nix @@ -1,14 +1,14 @@ { fetchurl, stdenv }: stdenv.mkDerivation rec { - name = "rush-1.7"; + name = "rush-1.8"; src = fetchurl { url = "mirror://gnu/rush/${name}.tar.gz"; - sha256 = "0fh0gbbp0iiq3wbkf503xb40r8ljk42vyj9bnlflbz82d6ipy1rm"; + sha256 = "1vxdb81ify4xcyygh86250pi50krb16dkj42i5ii4ns3araiwckz"; }; - patches = [ ./gets.patch ]; + patches = [ ./fix-format-security-error.patch ]; doCheck = true; diff --git a/pkgs/shells/rush/fix-format-security-error.patch b/pkgs/shells/rush/fix-format-security-error.patch new file mode 100644 index 00000000000..ed3ad0aa4c1 --- /dev/null +++ b/pkgs/shells/rush/fix-format-security-error.patch @@ -0,0 +1,12 @@ +diff -Nur rush-1.8.orig/lib/wordsplit.c rush-1.8/lib/wordsplit.c +--- rush-1.8.orig/lib/wordsplit.c 2016-08-18 20:11:43.000000000 +0200 ++++ rush-1.8/lib/wordsplit.c 2016-11-14 14:37:02.976177414 +0100 +@@ -2330,7 +2330,7 @@ + break; + + default: +- wsp->ws_error (wordsplit_strerror (wsp)); ++ wsp->ws_error ("%s", wordsplit_strerror (wsp)); + } + } + diff --git a/pkgs/shells/rush/gets.patch b/pkgs/shells/rush/gets.patch deleted file mode 100644 index 94b1f5dd2f5..00000000000 --- a/pkgs/shells/rush/gets.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- rush-1.7/gnu/stdio.in.h.org 2010-06-13 19:14:59.000000000 +0200 -+++ rush-1.7/gnu/stdio.in.h 2013-12-30 14:29:55.000000000 +0100 -@@ -138,8 +138,10 @@ _GL_WARN_ON_USE (fflush, "fflush is not - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -+#if defined gets - #undef gets - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@