Message ID | 20210312005915.14100-5-lle-bout@zaclys.net |
---|---|
State | Accepted |
Headers | show |
Series | [bug#47081,v2,1/6] gnu: Remove go-gopkg.in-mgo.v2. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Léo Le Bouter via Guix-patches via <guix-patches@gnu.org> writes: > * 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/services/databases.scm | 88 -------------------------------------- > 1 file changed, 88 deletions(-) I think it would be better to squash this commit in with the two previous commits, so there just one commit to remove the service, including the tests and documentation. That's a better "atomic" change, since all three bits (service itself, test and docs) are one thing in my opinion.
On Sun, 2021-03-14 at 14:54 +0000, Christopher Baines wrote: > I think it would be better to squash this commit in with the two > previous commits, so there just one commit to remove the service, > including the tests and documentation. That's a better "atomic" > change, > since all three bits (service itself, test and docs) are one thing in > my > opinion. Oh no, then all the individual commits and ordering work (so no single commit breaks GNU Guix or makes it inconsistent) is useless now :-( I will try squashing ASAP, but what do you recommend as title then? It seems to me this kind of violates GNU commit message guidelines.
Léo Le Bouter <lle-bout@zaclys.net> writes: > On Sun, 2021-03-14 at 14:54 +0000, Christopher Baines wrote: >> I think it would be better to squash this commit in with the two >> previous commits, so there just one commit to remove the service, >> including the tests and documentation. That's a better "atomic" >> change, >> since all three bits (service itself, test and docs) are one thing in >> my >> opinion. > > Oh no, then all the individual commits and ordering work (so no single > commit breaks GNU Guix or makes it inconsistent) is useless now :-( I don't think there's going to be any problems with combining the commits I'm suggesting. Given they're contiguous, there's no chance of it breaking something, right? > I will try squashing ASAP, but what do you recommend as title then? It > seems to me this kind of violates GNU commit message guidelines. I'm no expert at writing commit messages in the Guix/GNU style, but maybe take a look at the commit that added the service [1]. I think "services: Remove MongoDB." would be a reasonable title. 1: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=5266ff719e274056cb3e2b9740183f0063177255
I squashed and pushed as 097cf21d1d34f4f66a403c3fb6e15b6709c4dd8a. Hope everything is alright :-D
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 979f3dd6c8..a841e7a50e 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -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.