aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-06-27 22:24:08 -0400
committerMark H Weaver <mhw@netris.org>2018-11-14 23:44:16 -0500
commit96272e2822046519e9d6a89bfac0d29936ef2766 (patch)
treea9d7cd3913d68ec9b313583f2f22937e05aaef51
parent9f6f726c7f43b9504d132471e0d13b2b0fdf6505 (diff)
downloadgnu-guix-96272e2822046519e9d6a89bfac0d29936ef2766.tar
gnu-guix-96272e2822046519e9d6a89bfac0d29936ef2766.tar.gz
gnu: databases: Return #t from all phases.
* gnu/packages/databases.scm (4store, go-gopkg.in-mgo.v2, mongodb) (sparql-query, tdb, sqlcipher, python-sqlparse, mongo-tools): Return #t from all phases, use invoke where appropriate, and remove vestigial plumbing.
-rw-r--r--gnu/packages/databases.scm137
1 files changed, 71 insertions, 66 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 05bebed6a6..393b13a314 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -153,7 +153,7 @@
(modify-phases %standard-phases
(add-after 'unpack 'generate-configure
(lambda _
- (zero? (system* "sh" "autogen.sh")))))))
+ (invoke "sh" "autogen.sh"))))))
;; http://www.4store.org has been down for a while now.
(home-page "https://github.com/4store/4store")
(synopsis "Clustered RDF storage and query engine")
@@ -207,14 +207,16 @@ and provides interfaces to the traditional file format.")
(delete 'reset-gzip-timestamps)
(add-before 'check 'start-mongodb
(lambda* (#:key tests? #:allow-other-keys)
- (or (not tests?)
- (with-directory-excursion "src/gopkg.in/mgo.v2"
- (invoke "make" "startdb")))))
+ (when tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "startdb")))
+ #t))
(add-after 'check 'stop'mongodb
(lambda* (#:key tests? #:allow-other-keys)
- (or (not tests?)
- (with-directory-excursion "src/gopkg.in/mgo.v2"
- (invoke "make" "stopdb"))))))))
+ (when tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "stopdb")))
+ #t)))))
(native-inputs
`(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
("mongodb" ,mongodb)
@@ -511,28 +513,27 @@ applications.")
(setenv "TZDIR"
(string-append (assoc-ref inputs "tzdata")
"/share/zoneinfo"))
- (or (not 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.
- (begin
- (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)))))))
+ (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 _
- (let ((bin (string-append (assoc-ref %outputs "out") "/bin")))
+ (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))
@@ -1118,7 +1119,8 @@ data in a single database. RocksDB is partially based on @code{LevelDB}.")
(lambda _
(substitute* "Makefile"
(("^gitrev :=.*$")
- (string-append "gitrev = \"v" ,version "\"")))))
+ (string-append "gitrev = \"v" ,version "\"")))
+ #t))
;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
;; This replacement does the same thing, except for using $PREFIX/bin
;; instead.
@@ -1127,14 +1129,13 @@ data in a single database. RocksDB is partially based on @code{LevelDB}.")
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "sparql-query" bin)
- (system* "ln" "--symbolic"
- (string-append bin "/sparql-query")
- (string-append bin "/sparql-update")))))
+ (symlink (string-append bin "/sparql-query")
+ (string-append bin "/sparql-update")))
+ #t))
(replace 'check
(lambda* (#:key make-flags #:allow-other-keys)
- (and
- (zero? (apply system* "make" `(,@make-flags "scan-test")))
- (zero? (system "./scan-test"))))))))
+ (apply invoke "make" `(,@make-flags "scan-test"))
+ (invoke "./scan-test"))))))
(home-page "https://github.com/tialaramex/sparql-query/")
(synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
(description "Sparql-query is a command-line tool for accessing SPARQL
@@ -1259,8 +1260,8 @@ is in the public domain.")
(let ((out (assoc-ref outputs "out")))
;; The 'configure' script is a wrapper for Waf and
;; doesn't recognize things like '--enable-fast-install'.
- (zero? (system* "./configure"
- (string-append "--prefix=" out)))))))))
+ (invoke "./configure"
+ (string-append "--prefix=" out))))))))
(native-inputs
`(;; TODO: Build the documentation.
;; ("docbook-xsl" ,docbook-xsl)
@@ -2009,8 +2010,7 @@ can autogenerate peewee models using @code{pwiz}, a model generator.")
(assoc-ref %standard-phases 'check))
(replace 'check
(lambda _
- (zero?
- (system* "./testfixture" "test/crypto.test")))))))
+ (invoke "./testfixture" "test/crypto.test"))))))
(home-page "https://www.zetetic.net/sqlcipher/")
(synopsis
"Library providing transparent encryption of SQLite database files")
@@ -2805,7 +2805,7 @@ is designed to have a low barrier to entry.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _ (zero? (system* "py.test")))))))
+ (lambda _ (invoke "py.test"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/andialbrecht/sqlparse")
@@ -2872,41 +2872,46 @@ transforms idiomatic python function calls to well-formed SQL queries.")
(delete 'install-source)
(replace 'build
(lambda _
- (every (lambda (tool)
- (let ((command
- `("go" "build"
- ;; This is where the tests expect to find the
- ;; executables
- "-o" ,(string-append
- "src/github.com/mongodb/mongo-tools/bin/"
- tool)
- "-v"
- "-tags=\"ssl sasl\""
- "-ldflags"
- "-extldflags=-Wl,-z,now,-z,relro"
- ,(string-append
- "src/github.com/mongodb/mongo-tools/"
- tool "/main/" tool ".go"))))
- (simple-format #t "build: running ~A\n"
- (string-join command))
- (apply invoke command)))
- all-tools)))
+ (for-each (lambda (tool)
+ (let ((command
+ `("go" "build"
+ ;; This is where the tests expect to find the
+ ;; executables
+ "-o" ,(string-append
+ "src/github.com/mongodb/mongo-tools/bin/"
+ tool)
+ "-v"
+ "-tags=\"ssl sasl\""
+ "-ldflags"
+ "-extldflags=-Wl,-z,now,-z,relro"
+ ,(string-append
+ "src/github.com/mongodb/mongo-tools/"
+ tool "/main/" tool ".go"))))
+ (simple-format #t "build: running ~A\n"
+ (string-join command))
+ (apply invoke command)))
+ all-tools)
+ #t))
(replace 'check
(lambda _
(with-directory-excursion "src"
- (every (lambda (tool)
- (invoke
- "go" "test" "-v"
- (string-append "github.com/mongodb/mongo-tools/" tool)))
- all-tools))))
+ (for-each (lambda (tool)
+ (invoke
+ "go" "test" "-v"
+ (string-append "github.com/mongodb/mongo-tools/"
+ tool)))
+ all-tools))
+ #t))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(for-each (lambda (tool)
(install-file
- (string-append "src/github.com/mongodb/mongo-tools/bin/" tool)
+ (string-append "src/github.com/mongodb/mongo-tools/bin/"
+ tool)
(string-append (assoc-ref outputs "out")
"/bin")))
- all-tools)))))))
+ all-tools)
+ #t))))))
(native-inputs
`(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)