Re-Revert "Merge #58997 gettext: apply patch for CVE 2018-1875"

This reverts commit 742416addb.
Moved to staging.
This commit is contained in:
Vladimír Čunát
2019-04-05 21:03:59 +02:00
parent 81a6df8f88
commit 1279016787
3 changed files with 55 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, libiconv, xz }:
{ stdenv, lib, fetchurl, libiconv, xz, bison, automake115x, autoconf }:
stdenv.mkDerivation rec {
name = "gettext-${version}";
@@ -8,7 +8,14 @@ stdenv.mkDerivation rec {
url = "mirror://gnu/gettext/${name}.tar.gz";
sha256 = "0hsw28f9q9xaggjlsdp2qmbp2rbd1mp0njzan2ld9kiqwkq2m57z";
};
patches = [ ./absolute-paths.diff ];
patches = [
./absolute-paths.diff
(fetchurl {
name = "CVE-2018-18751.patch";
url = "https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=patch;h=dce3a16e5e9368245735e29bf498dcd5e3e474a4";
sha256 = "1lpjwwcjr1sb879faj0xyzw02kma0ivab6xwn3qciy13qy6fq5xn";
})
];
outputs = [ "out" "man" "doc" "info" ];
@@ -40,7 +47,7 @@ stdenv.mkDerivation rec {
sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
'';
nativeBuildInputs = [ xz xz.bin ];
nativeBuildInputs = [ xz xz.bin bison automake115x autoconf];
# HACK, see #10874 (and 14664)
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) libiconv;