From 7fa9cca84afce09d3816b70ae6d42bfc08635e9d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 21 Feb 2018 03:06:39 +0100 Subject: gnu: rocksdb: Update to 5.10.4. * gnu/packages/databases.scm (rocksdb): Update to 5.10.4. [source]: Substitute the unbundled copy of GNU Parallel. [arguments]: Add "V=1" "USE_RTTI=1" and "ROCKSDBTESTS_END=db_tailing_iter_test" to #:make-flags. Set #:test-target to "check_some". Respect parallel jobs in 'build-release-libraries' phase and rename to 'build'. [license]: Update for changes in 5.5.4. --- gnu/packages/databases.scm | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 269a1ffcea..87f65404f8 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016 Danny Milosavljevic -;;; Copyright © 2016, 2017 Marius Bakke +;;; Copyright © 2016, 2017, 2018 Marius Bakke ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Jelle Licht @@ -841,7 +841,7 @@ (define-public recutils (define-public rocksdb (package (name "rocksdb") - (version "5.2.1") + (version "5.10.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/rocksdb" @@ -849,18 +849,28 @@ (define-public rocksdb (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1v2q05bl56sfp51m09z7g6489hkfq4vf6b4qgfg3d96ylgmay9yb")) + "0hp7jxr99vyc57n708hiqk4lks9a9zmjgfjc21mx6v1rmabj2944")) (modules '((guix build utils))) (snippet '(begin ;; TODO: unbundle gtest. (delete-file "build_tools/gnu_parallel") + (substitute* "Makefile" + (("build_tools/gnu_parallel") "parallel")) #t)))) (build-system gnu-build-system) (arguments - `(#:make-flags (list "CC=gcc" + `(#:make-flags (list "CC=gcc" "V=1" + ;; Ceph requires that RTTI is enabled. + "USE_RTTI=1" (string-append "INSTALL_PATH=" - (assoc-ref %outputs "out"))) + (assoc-ref %outputs "out")) + + ;; Running the full test suite takes hours and require + ;; a lot of disk space. Instead we only run a subset + ;; (see .travis.yml and Makefile). + "ROCKSDBTESTS_END=db_tailing_iter_test") + #:test-target "check_some" ;; Many tests fail on 32-bit platforms. There are multiple reports about ;; this upstream, but it's not going to be supported any time soon. #:tests? (let ((system ,(or (%current-target-system) @@ -872,7 +882,6 @@ (define-public rocksdb (add-after 'unpack 'patch-Makefile (lambda _ (substitute* "Makefile" - (("build_tools/gnu_parallel") "parallel") ;; Don't depend on the static library when installing. (("install: install-static") "install: install-shared") @@ -889,20 +898,20 @@ (define-public rocksdb (add-before 'check 'disable-failing-tests (lambda _ (substitute* "Makefile" - ;; This test fails with GCC-5 and is unmaintained. - ;; https://github.com/facebook/rocksdb/issues/2148 - (("^[[:blank:]]+spatial_db_test[[:blank:]]+\\\\") "\\") ;; These tests reliably fail due to "Too many open files". (("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\") (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\")) #t)) - (add-after 'check 'build-release-libraries + (add-after 'check 'build ;; The default build target is a debug build for tests. The - ;; install target depends on "shared_lib" and "static_lib" - ;; targets for release builds so we build them here for clarity. - ;; TODO: Add debug output. - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (zero? (apply system* "make" "shared_lib" make-flags))))))) + ;; install target depends on the "shared_lib" release target + ;; so we build it here for clarity. + (lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys) + (apply invoke "make" "shared_lib" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags))))))) (native-inputs `(("parallel" ,parallel) ("perl" ,perl) @@ -926,8 +935,9 @@ (define-public rocksdb (RAF) and @dfn{Space-Amplification-Factor} (SAF). It has multi-threaded compactions, making it specially suitable for storing multiple terabytes of data in a single database. RocksDB is partially based on @code{LevelDB}.") - ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0. - (license (list license:bsd-3 license:asl2.0)))) + ;; RocksDB is dual licensed under GPL2 and ASL 2.0. Some header + ;; files carry the 3-clause BSD license. + (license (list license:gpl2 license:asl2.0 license:bsd-3)))) (define-public sparql-query (package -- cgit v1.2.3