guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#47081] [PATCH v2 6/6] gnu: Remove mongodb.


From: Léo Le Bouter
Subject: [bug#47081] [PATCH v2 6/6] gnu: Remove mongodb.
Date: Fri, 12 Mar 2021 01:59:15 +0100

mongodb 3.4.10 has unpatched CVEs and mongodb 3.4.24 has some files in the
release tarball under the SSPL, therefore we cannot provide mongodb while
upholding to good security standards.

* gnu/packages/databases.scm (mongodb): Remove.
---
 gnu/packages/databases.scm | 137 -------------------------------------
 1 file changed, 137 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 2330f9fd26..5249aa0d10 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -615,143 +615,6 @@ replacement for the code@{python-memcached} library.")
 (define-public python2-pylibmc
   (package-with-python2 python-pylibmc))
 
-;; There is a point at which mongodb switched to the Server Side Public
-;; License (SSPL), which is not a FOSS license.  As such, be careful
-;; when updating this package.
-(define-public mongodb
-  (package
-    (name "mongodb")
-    (version "3.4.24")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/mongodb/mongo/archive/r";
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
-              (sha256
-               (base32 "0y1669sqj8wyf0y0njhxs4qhn1qzjhrs2h2qllya5samxrlrjhkg"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  (for-each (lambda (dir)
-                              (delete-file-recursively
-                                (string-append "src/third_party/" dir)))
-                            '("pcre-8.42" "scons-2.5.0" "snappy-1.1.3"
-                              "valgrind-3.11.0" "wiredtiger"
-                              "yaml-cpp-0.6.2" "zlib-1.2.11"))
-                  #t))))
-    (build-system scons-build-system)
-    (inputs
-     `(("openssl" ,openssl-1.0)
-       ("pcre" ,pcre)
-        ,@(match (%current-system)
-            ((or "x86_64-linux" "aarch64-linux" "mips64el-linux")
-             `(("wiredtiger" ,wiredtiger)))
-            (_ `()))
-       ("yaml-cpp" ,yaml-cpp)
-       ("zlib" ,zlib)
-       ("snappy" ,snappy)))
-    (native-inputs
-     `(("valgrind" ,valgrind)
-       ("perl" ,perl)
-       ("python" ,python-2)
-       ("python2-pymongo" ,python2-pymongo)
-       ("python2-pyyaml" ,python2-pyyaml)
-       ("tzdata" ,tzdata-for-tests)))
-    (arguments
-     `(#:scons ,scons-python2
-       #:phases
-       (let ((common-options
-              `(;; "--use-system-tcmalloc" TODO: Missing gperftools
-                "--use-system-pcre"
-                ;; wiredtiger is 64-bit only
-                ,,(if (any (cute string-prefix? <> (or (%current-target-system)
-                                                       (%current-system)))
-                           '("i686-linux" "armhf-linux"))
-                    ``"--wiredtiger=off"
-                    ``"--use-system-wiredtiger")
-                ;; TODO
-                ;; build/opt/mongo/db/fts/unicode/string.o failed: Error 1
-                ;; --use-system-boost
-                "--use-system-snappy"
-                "--use-system-zlib"
-                "--use-system-valgrind"
-                ;; "--use-system-stemmer" TODO: Missing relevant package
-                "--use-system-yaml"
-                "--disable-warnings-as-errors"
-                ,(format #f "--jobs=~a" (parallel-job-count))
-                "--ssl")))
-         (modify-phases %standard-phases
-           (add-after 'unpack 'patch
-             (lambda _
-               ;; Remove use of GNU extensions in parse_number_test.cpp, to
-               ;; allow compiling with GCC 7 or later
-               ;; https://jira.mongodb.org/browse/SERVER-28063
-               (substitute* "src/mongo/base/parse_number_test.cpp"
-                 (("0xabcab\\.defdefP-10")
-                  "687.16784283419838"))
-               #t))
-           (add-after 'unpack 'scons-propagate-environment
-             (lambda _
-               ;; Modify the SConstruct file to arrange for
-               ;; environment variables to be propagated.
-               (substitute* "SConstruct"
-                 (("^env = Environment\\(")
-                  "env = Environment(ENV=os.environ, "))
-               #t))
-           (add-after 'unpack 'create-version-file
-             (lambda _
-               (call-with-output-file "version.json"
-                 (lambda (port)
-                   (display ,(simple-format #f "{
-    \"version\": \"~A\"
-}" version) port)))
-               #t))
-           (replace 'build
-             (lambda _
-               (apply invoke `("scons"
-                               ,@common-options
-                               "mongod" "mongo" "mongos"))))
-           (replace 'check
-             (lambda* (#:key tests? inputs #:allow-other-keys)
-               (setenv "TZDIR"
-                       (string-append (assoc-ref inputs "tzdata")
-                                      "/share/zoneinfo"))
-               (when tests?
-                 ;; Note that with the tests, especially the unittests, the
-                 ;; build can take up to ~45GB of space, as many tests are
-                 ;; individual executable files, with some being hundreds of
-                 ;; megabytes in size.
-                 (apply invoke `("scons" ,@common-options "dbtest" 
"unittests"))
-                 (substitute* "build/unittests.txt"
-                   ;; TODO: Don't run the async_stream_test, as it hangs
-                   
(("^build\\/opt\\/mongo\\/executor\\/async\\_stream\\_test\n$")
-                    "")
-                   ;; TODO: This test fails
-                   ;; Expected 0UL != disks.size() (0 != 0) 
@src/mongo/util/procparser_test.cpp:476
-                   (("^build\\/opt\\/mongo\\/util\\/procparser\\_test\n$")
-                    ""))
-                 (invoke "python" "buildscripts/resmoke.py"
-                         "--suites=dbtest,unittests"
-                         (format #f  "--jobs=~a" (parallel-job-count))))
-               #t))
-           (replace 'install
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
-                 (install-file "mongod" bin)
-                 (install-file "mongos" bin)
-                 (install-file "mongo" bin))
-               #t))))))
-    (home-page "https://www.mongodb.org/";)
-    (synopsis "High performance and high availability document database")
-    (description
-     "Mongo is a high-performance, high availability, schema-free
-document-oriented database.  A key goal of MongoDB is to bridge the gap
-between key/value stores (which are fast and highly scalable) and traditional
-RDBMS systems (which are deep in functionality).")
-    (license (list license:agpl3
-                   ;; Some parts are licensed under the Apache License
-                   license:asl2.0))))
-
 (define-public mycli
   (package
     (name "mycli")
-- 
2.30.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]