From 165d8bda8265ca9c247d1ab5e1137117c3236e25 Mon Sep 17 00:00:00 2001 From: Nathan Smyth Date: Sun, 4 Aug 2019 13:09:49 +1000 Subject: mongodb: 3.4.20 -> 3.4.22, 3.6.12 -> 3.6.13, 4.0.9 -> 4.0.11 --- pkgs/servers/nosql/mongodb/mongodb.nix | 32 ++++++++++------------ .../nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch | 27 ++++++++++++++++++ pkgs/servers/nosql/mongodb/v3_4.nix | 8 +++--- pkgs/servers/nosql/mongodb/v3_6.nix | 8 +++--- pkgs/servers/nosql/mongodb/v4_0.nix | 9 +++--- 5 files changed, 54 insertions(+), 30 deletions(-) create mode 100644 pkgs/servers/nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch (limited to 'pkgs/servers/nosql') diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index fd4869f92aa..3824fc6d1a7 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy, zlib -, libyamlcpp, sasl, openssl, libpcap, wiredtiger, Security, python27, libtool -, curl }: +{ stdenv, fetchurl, fetchpatch, scons, boost, gperftools, pcre-cpp, snappy, zlib, + libyamlcpp, sasl, openssl, libpcap, wiredtiger, Security, python27, curl, CoreFoundation, cctools +}: # Note: # The command line tools are written in Go as part of a different package (mongodb-tools) @@ -35,20 +35,9 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ scons ]; buildInputs = [ - sasl - boost - gperftools - pcre-cpp - snappy - zlib - libyamlcpp - sasl - openssl.dev - openssl.out - libpcap - python - curl - ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security libtool ]; + sasl boost gperftools pcre-cpp snappy + zlib libyamlcpp sasl openssl.dev openssl.out libpcap python curl + ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ]; # MongoDB keeps track of its build parameters, which tricks nix into # keeping dependencies to build inputs in the final output. @@ -60,6 +49,9 @@ in stdenv.mkDerivation rec { substituteInPlace SConstruct \ --replace "env = Environment(" "env = Environment(ENV = os.environ," '' + stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace src/third_party/asio-master/asio/include/asio/detail/config.hpp --replace ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW ASIO_HAS_STD_STRING_VIEW + + substituteInPlace src/third_party/mozjs-45/extract/js/src/jsmath.cpp --replace 'defined(HAVE_SINCOS)' 0 substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder @@ -80,7 +72,7 @@ in stdenv.mkDerivation rec { "--release" "--ssl" #"--rocksdb" # Don't have this packaged yet - "--wiredtiger=${if stdenv.is64bit then "on" else "off"}" + "--wiredtiger=on" "--js-engine=mozjs" "--use-sasl-client" "--disable-warnings-as-errors" @@ -92,6 +84,10 @@ in stdenv.mkDerivation rec { sconsFlags+=" CXX=$CXX" '' + optionalString stdenv.isAarch64 '' sconsFlags+=" CCFLAGS='-march=armv8-a+crc'" + '' + optionalString stdenv.isDarwin '' + sconsFlags+=" CPPPATH=${openssl.dev}/include" + '' + optionalString stdenv.isDarwin '' + sconsFlags+=" LIBPATH=${openssl.out}/lib" ''; preInstall = '' diff --git a/pkgs/servers/nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch b/pkgs/servers/nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch new file mode 100644 index 00000000000..8c60cdd1e68 --- /dev/null +++ b/pkgs/servers/nosql/mongodb/mozjs-45_fix-3-byte-opcode.patch @@ -0,0 +1,27 @@ +# HG changeset patch +# User Dan Gohman +# Parent d9b405d82cffb07343a5f2fd941e029298c7f6c4 +# Bug 1390214 - IonMonkey: Don't test for a 3-byte opcode in a 2-byte opcode predicate. +# https://bug1390214.bmoattachments.org/attachment.cgi?id=8902972 + +diff --git a/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h b/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h +--- a/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h ++++ b/src/third_party/mozjs-45/extract/js/src/jit/x86-shared/Encoding-x86-shared.h +@@ -310,17 +310,16 @@ enum ThreeByteOpcodeID { + + // Test whether the given opcode should be printed with its operands reversed. + inline bool IsXMMReversedOperands(TwoByteOpcodeID opcode) + { + switch (opcode) { + case OP2_MOVSD_WsdVsd: // also OP2_MOVPS_WpsVps + case OP2_MOVAPS_WsdVsd: + case OP2_MOVDQ_WdqVdq: +- case OP3_PEXTRD_EdVdqIb: + return true; + default: + break; + } + return false; + } + + enum ThreeByteEscape { diff --git a/pkgs/servers/nosql/mongodb/v3_4.nix b/pkgs/servers/nosql/mongodb/v3_4.nix index 07d27545a58..fb124a6b2e5 100644 --- a/pkgs/servers/nosql/mongodb/v3_4.nix +++ b/pkgs/servers/nosql/mongodb/v3_4.nix @@ -1,11 +1,11 @@ -{ stdenv, callPackage, lib, sasl, boost, Security }: +{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; }; + buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; in buildMongoDB { - version = "3.4.20"; - sha256 = "15avrhakbspz0q1w5n7dqzjjfkxi7md64a9axl97gfxi4ln7mhz0"; + version = "3.4.22"; + sha256 = "1rizrr69b26y7fb973n52hk387sf3mxzqg8wka4f3zdjdidfyiny"; patches = [ ./forget-build-dependencies-3-4.patch ]; diff --git a/pkgs/servers/nosql/mongodb/v3_6.nix b/pkgs/servers/nosql/mongodb/v3_6.nix index 9000a2b5ed5..412d72b4e66 100644 --- a/pkgs/servers/nosql/mongodb/v3_6.nix +++ b/pkgs/servers/nosql/mongodb/v3_6.nix @@ -1,11 +1,11 @@ -{ stdenv, callPackage, lib, sasl, boost, Security }: +{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; }; + buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; in buildMongoDB { - version = "3.6.12"; - sha256 = "1fi1ccid4rnfjg6yn3183qrhjqc8hz7jfgdpwp1dy6piw6z85n3l"; + version = "3.6.13"; + sha256 = "1mbvk4bmabrswjdm01jssxcygjpq5799zqyx901nsi12vlcymwg4"; patches = [ ./forget-build-dependencies.patch ]; diff --git a/pkgs/servers/nosql/mongodb/v4_0.nix b/pkgs/servers/nosql/mongodb/v4_0.nix index 75e0cecc573..819d41cd17e 100644 --- a/pkgs/servers/nosql/mongodb/v4_0.nix +++ b/pkgs/servers/nosql/mongodb/v4_0.nix @@ -1,12 +1,13 @@ -{ stdenv, callPackage, lib, sasl, boost, Security }: +{ stdenv, callPackage, lib, sasl, boost, Security, CoreFoundation, cctools }: let - buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; }; + buildMongoDB = callPackage ./mongodb.nix { inherit sasl; inherit boost; inherit Security; inherit CoreFoundation; inherit cctools; }; in buildMongoDB { - version = "4.0.9"; - sha256 = "0klm6dl1pr9wq4ghm2jjn3wzs1zpj1aabqjqjfddanxq2an7scph"; + version = "4.0.11"; + sha256 = "0kry8kzzpah0l7j8xa333y1ixwvarc28ip3f6lx5590yy11j8ry2"; patches = [ ./forget-build-dependencies.patch + ./mozjs-45_fix-3-byte-opcode.patch ]; } -- cgit 1.4.1