diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-11 12:06:24 +0200 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-12 12:30:40 +0200 |
commit | 11f3e0c15d7e4792985b93ce932f285c5bfe7b4d (patch) | |
tree | be7f935fd6bf89c8bf6f0d016c972d16feb0e1fa /pkgs/servers/nosql | |
parent | 7cd7503abd2c5665facbbf6a0acb3b21254ebe09 (diff) |
mongodb-4_4: drop
Diffstat (limited to 'pkgs/servers/nosql')
-rw-r--r-- | pkgs/servers/nosql/mongodb/4.4.nix | 20 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/fix-build-with-boost-1.79-4_4.patch | 93 | ||||
-rw-r--r-- | pkgs/servers/nosql/mongodb/mongodb.nix | 21 |
3 files changed, 6 insertions, 128 deletions
diff --git a/pkgs/servers/nosql/mongodb/4.4.nix b/pkgs/servers/nosql/mongodb/4.4.nix deleted file mode 100644 index 933e9136aee07..0000000000000 --- a/pkgs/servers/nosql/mongodb/4.4.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenv, callPackage, lib, fetchpatch, sasl, boost, Security, CoreFoundation, cctools }: - -let - buildMongoDB = callPackage ./mongodb.nix { - inherit sasl boost Security CoreFoundation cctools; - }; -in -buildMongoDB { - version = "4.4.28"; - sha256 = "sha256-aq4dJl2FOTOhQ3bzVj0L/0CE3obE7lCx2ecjGNYC8X4="; - patches = [ - ./forget-build-dependencies-4-4.patch - ./fix-build-with-boost-1.79-4_4.patch - (fetchpatch { - name = "mongodb-4.4.15-adjust-the-cache-alignment-assumptions.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/mongodb-4.4.15-adjust-cache-alignment-assumptions.patch.arm64?h=mongodb44"; - sha256 = "Ah4zdSFgXUJ/HSN8VRLJqDpNy3CjMCBnRqlpALXzx+g="; - }) - ] ++ lib.optionals stdenv.isDarwin [ ./asio-no-experimental-string-view-4-4.patch ]; -} diff --git a/pkgs/servers/nosql/mongodb/fix-build-with-boost-1.79-4_4.patch b/pkgs/servers/nosql/mongodb/fix-build-with-boost-1.79-4_4.patch deleted file mode 100644 index 72da249f23802..0000000000000 --- a/pkgs/servers/nosql/mongodb/fix-build-with-boost-1.79-4_4.patch +++ /dev/null @@ -1,93 +0,0 @@ -From f0c7e9190e9d61515ab3f95c6665754d3b972cd1 Mon Sep 17 00:00:00 2001 -From: Et7f3 <cadeaudeelie@gmail.com> -Date: Tue, 19 Jul 2022 22:11:11 +0200 -Subject: [PATCH] build: Upgrade boost to 1.79.0 - -We can see in src/third_party/boost-1.70.0/boost/version.hpp that vendored -version of boost is BOOST_LIB_VERSION "1_70" - -We can also see the doc desbribe 2 headers to use filesystems lib: One is -src/third_party/boost/boost/filesystem/fstream.hpp that contains (175-177) - typedef basic_ifstream<char> ifstream; - typedef basic_ofstream<char> ofstream; - typedef basic_fstream<char> fstream; - -So this mean they mostly forgot to include a header and include-what-you-use -would catch this error. - -In upstream they fixed in a simmilar way -https://github.com/mongodb/mongo/commit/13389dc222fc372442be8c147e09685bb9a26a3a - -Co-Authored-By: Adrian Pistol <vifino@tty.sh> ---- - src/mongo/db/storage/storage_repair_observer.cpp | 1 + - src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp | 1 + - src/mongo/shell/shell_utils_extended.cpp | 1 + - src/mongo/util/processinfo_linux.cpp | 2 +- - src/mongo/util/stacktrace_threads.cpp | 1 + - 5 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/mongo/db/storage/storage_repair_observer.cpp b/src/mongo/db/storage/storage_repair_observer.cpp -index 22b76a6a39c..453f48229cd 100644 ---- a/src/mongo/db/storage/storage_repair_observer.cpp -+++ b/src/mongo/db/storage/storage_repair_observer.cpp -@@ -42,6 +42,7 @@ - #endif - - #include <boost/filesystem/path.hpp> -+#include <boost/filesystem/fstream.hpp> - - #include "mongo/db/dbhelpers.h" - #include "mongo/db/operation_context.h" -diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp -index ee87aca4723..bde2c1b2b83 100644 ---- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp -+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp -@@ -37,6 +37,7 @@ - - #include <boost/filesystem.hpp> - #include <boost/filesystem/path.hpp> -+#include <boost/filesystem/fstream.hpp> - #include <pcrecpp.h> - - #include "mongo/base/simple_string_data_comparator.h" -diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp -index 8cd7f035f1d..cd672eb513f 100644 ---- a/src/mongo/shell/shell_utils_extended.cpp -+++ b/src/mongo/shell/shell_utils_extended.cpp -@@ -37,6 +37,7 @@ - #endif - - #include <boost/filesystem.hpp> -+#include <boost/filesystem/fstream.hpp> - #include <fstream> - - #include "mongo/bson/bson_validate.h" -diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp -index 9063f140988..d74949d45fc 100644 ---- a/src/mongo/util/processinfo_linux.cpp -+++ b/src/mongo/util/processinfo_linux.cpp -@@ -33,7 +33,7 @@ - - #include "processinfo.h" - --#include <iostream> -+#include <fstream> - #include <malloc.h> - #include <pcrecpp.h> - #include <sched.h> -diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp -index 4667a261ab7..73a36015bd6 100644 ---- a/src/mongo/util/stacktrace_threads.cpp -+++ b/src/mongo/util/stacktrace_threads.cpp -@@ -36,6 +36,7 @@ - #include <array> - #include <atomic> - #include <boost/filesystem.hpp> -+#include <boost/filesystem/fstream.hpp> - #include <cctype> - #include <cstdint> - #include <cstdlib> --- -2.39.2 - diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index a51144c48d4e2..801ee28303f07 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -87,7 +87,7 @@ in stdenv.mkDerivation rec { zlib ] ++ lib.optionals stdenv.isDarwin [ Security CoreFoundation cctools ] ++ lib.optional stdenv.isLinux net-snmp - ++ lib.optionals (versionAtLeast version "4.4") [ xz ]; + ++ [ xz ]; # MongoDB keeps track of its build parameters, which tricks nix into # keeping dependencies to build inputs in the final output. @@ -98,24 +98,15 @@ in stdenv.mkDerivation rec { # fix environment variable reading substituteInPlace SConstruct \ --replace "env = Environment(" "env = Environment(ENV = os.environ," - '' + lib.optionalString (versionAtLeast version "4.4") '' + '' + '' # Fix debug gcc 11 and clang 12 builds on Fedora # https://github.com/mongodb/mongo/commit/e78b2bf6eaa0c43bd76dbb841add167b443d2bb0.patch substituteInPlace src/mongo/db/query/plan_summary_stats.h --replace '#include <string>' '#include <optional> #include <string>' substituteInPlace src/mongo/db/exec/plan_stats.h --replace '#include <string>' '#include <optional> #include <string>' - '' + lib.optionalString (versionOlder version "5.0") '' - # remove -march overriding, we know better. - sed -i 's/env.Append.*-march=.*$/pass/' SConstruct '' + lib.optionalString (stdenv.isDarwin && versionOlder version "6.0") '' substituteInPlace src/third_party/mozjs-${mozjsVersion}/extract/js/src/jsmath.cpp --replace '${mozjsReplace}' 0 - '' + lib.optionalString (stdenv.isDarwin && versionOlder version "3.6") '' - substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder - substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder - substituteInPlace src/third_party/s2/s2cap.cc --replace drem remainder - substituteInPlace src/third_party/s2/s2latlng.cc --replace drem remainder - substituteInPlace src/third_party/s2/s2latlngrect.cc --replace drem remainder '' + lib.optionalString stdenv.isi686 '' # don't fail by default on i686 @@ -135,7 +126,8 @@ in stdenv.mkDerivation rec { "--use-sasl-client" "--disable-warnings-as-errors" "VARIANT_DIR=nixos" # Needed so we don't produce argument lists that are too long for gcc / ld - ] ++ lib.optionals (versionAtLeast version "4.4") [ "--link-model=static" ] + "--link-model=static" + ] ++ map (lib: "--use-system-${lib}") system-libraries; # This seems to fix mongodb not able to find OpenSSL's crypto.h during build @@ -167,10 +159,9 @@ in stdenv.mkDerivation rec { installTargets = if (versionAtLeast version "6.0") then "install-devcore" - else if (versionAtLeast version "4.4") then "install-core" - else "install"; + else "install-core"; - prefixKey = if (versionAtLeast version "4.4") then "DESTDIR=" else "--prefix="; + prefixKey = "DESTDIR="; enableParallelBuilding = true; |