mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Remove MongoDB.
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.
It turns out feff80cec3
was right since while
the main license file wasnt altered to SSPL, some files in the tree contain
SSPL headers.
* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): Remove.
* gnu/packages/databases.scm (mongo-tools): Remove.
* doc/guix.texi (mongodb-service-type): Remove.
* gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test):
Remove.
* gnu/services/databases.scm (mongodb-configuration, mongodb-configuration?,
mongodb-configuration-mongodb, mongodb-configuration-config-file,
mongodb-configuration-data-directory, mongodb-service-type,
%default-mongodb-configuration-file, %mongodb-accounts, mongodb-activation,
mongodb-shepherd-service): Remove.
* gnu/packages/databases.scm (mongodb): Remove.
This commit is contained in:
parent
0ee5d4f7a8
commit
097cf21d1d
4 changed files with 0 additions and 497 deletions
|
@ -79,13 +79,6 @@
|
|||
memcached-configuration-udp-port
|
||||
memcached-configuration-additional-options
|
||||
|
||||
mongodb-configuration
|
||||
mongodb-configuration?
|
||||
mongodb-configuration-mongodb
|
||||
mongodb-configuration-config-file
|
||||
mongodb-configuration-data-directory
|
||||
mongodb-service-type
|
||||
|
||||
mysql-service
|
||||
mysql-service-type
|
||||
mysql-configuration
|
||||
|
@ -521,87 +514,6 @@ created after the PostgreSQL database is started.")))
|
|||
(const %memcached-accounts))))
|
||||
(default-value (memcached-configuration))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; MongoDB
|
||||
;;;
|
||||
|
||||
(define %default-mongodb-configuration-file
|
||||
(plain-file
|
||||
"mongodb.yaml"
|
||||
"# GNU Guix: MongoDB default configuration file
|
||||
processManagement:
|
||||
pidFilePath: /var/run/mongodb/pid
|
||||
storage:
|
||||
dbPath: /var/lib/mongodb
|
||||
"))
|
||||
|
||||
|
||||
(define-record-type* <mongodb-configuration>
|
||||
mongodb-configuration make-mongodb-configuration
|
||||
mongodb-configuration?
|
||||
(mongodb mongodb-configuration-mongodb
|
||||
(default mongodb))
|
||||
(config-file mongodb-configuration-config-file
|
||||
(default %default-mongodb-configuration-file))
|
||||
(data-directory mongodb-configuration-data-directory
|
||||
(default "/var/lib/mongodb")))
|
||||
|
||||
(define %mongodb-accounts
|
||||
(list (user-group (name "mongodb") (system? #t))
|
||||
(user-account
|
||||
(name "mongodb")
|
||||
(group "mongodb")
|
||||
(system? #t)
|
||||
(comment "Mongodb server user")
|
||||
(home-directory "/var/lib/mongodb")
|
||||
(shell (file-append shadow "/sbin/nologin")))))
|
||||
|
||||
(define mongodb-activation
|
||||
(match-lambda
|
||||
(($ <mongodb-configuration> mongodb config-file data-directory)
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(let ((user (getpwnam "mongodb")))
|
||||
(for-each
|
||||
(lambda (directory)
|
||||
(mkdir-p directory)
|
||||
(chown directory
|
||||
(passwd:uid user) (passwd:gid user)))
|
||||
'("/var/run/mongodb" #$data-directory)))))))
|
||||
|
||||
(define mongodb-shepherd-service
|
||||
(match-lambda
|
||||
(($ <mongodb-configuration> mongodb config-file data-directory)
|
||||
(shepherd-service
|
||||
(provision '(mongodb))
|
||||
(documentation "Run the Mongodb daemon.")
|
||||
(requirement '(user-processes loopback))
|
||||
(start #~(make-forkexec-constructor
|
||||
`(,(string-append #$mongodb "/bin/mongod")
|
||||
"--config"
|
||||
,#$config-file)
|
||||
#:user "mongodb"
|
||||
#:group "mongodb"
|
||||
#:pid-file "/var/run/mongodb/pid"
|
||||
#:log-file "/var/log/mongodb.log"))
|
||||
(stop #~(make-kill-destructor))))))
|
||||
|
||||
(define mongodb-service-type
|
||||
(service-type
|
||||
(name 'mongodb)
|
||||
(description "Run the MongoDB document database server.")
|
||||
(extensions
|
||||
(list (service-extension shepherd-root-service-type
|
||||
(compose list
|
||||
mongodb-shepherd-service))
|
||||
(service-extension activation-service-type
|
||||
mongodb-activation)
|
||||
(service-extension account-service-type
|
||||
(const %mongodb-accounts))))
|
||||
(default-value
|
||||
(mongodb-configuration))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; MySQL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue