diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-04-06 08:35:02 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-04-06 08:40:50 +0200 |
commit | f00f52a1fb5ac08f8059dffcd60d36adcda06603 (patch) | |
tree | 10daa3377f3f575838201da539bc9412e1760e79 /gnu | |
parent | a71d335832ba390a572c8b71eb685816e8e2ab1f (diff) | |
download | patches-f00f52a1fb5ac08f8059dffcd60d36adcda06603.tar patches-f00f52a1fb5ac08f8059dffcd60d36adcda06603.tar.gz |
gnu: mumi: Update to 0.0.0-12.bb2fe92.
* gnu/packages/mail.scm (mumi): Update to 0.0.0-12.bb2fe92.
[inputs]: Add guile-gcrypt, guile-redis, guile-webutils, mailutils.
* gnu/services/web.scm (<mumi-configuration>): New record type.
(mumi-configuration, mumi-configuration?, mumi-configuration-mumi,
mumi-configuration-mailer?, mumi-configuration-sender,
mumi-configuration-smtp): New procedures.
(mumi-shepherd-services): Accept configuration; adjust start commands; add
Shepherd service for mumi mailer.
(mumi-service-type): Pass default configuration.
* doc/guix.texi (Web Services): Update documentation.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/mail.scm | 10 | ||||
-rw-r--r-- | gnu/services/web.scm | 75 |
2 files changed, 62 insertions, 23 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 2d0e25655f..a4dab88fb2 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -3003,8 +3003,8 @@ replacement for the @code{urlview} program.") (license gpl2+))) (define-public mumi - (let ((commit "0e9af8d11246eb08152a9bcbc3d04703963b756c") - (revision "11")) + (let ((commit "bb2fe926b496dc44f783430ab16f5219bae36e81") + (revision "12")) (package (name "mumi") (version (git-version "0.0.0" revision commit)) @@ -3016,7 +3016,7 @@ replacement for the @code{urlview} program.") (file-name (git-file-name name version)) (sha256 (base32 - "0q5x33gc8gi8w7cjphdmhdyfa62b89mcbmj068yd5jxqx8sn4hlw")))) + "0azqrnkcwnh903f3ap8injhld3jicxdjzbbdi56ax46gjahr1rw3")))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) @@ -3047,11 +3047,15 @@ replacement for the @code{urlview} program.") (inputs `(("guile-debbugs" ,guile-debbugs) ("guile-email" ,guile-email) + ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-3) + ("guile-redis" ,guile-redis) ("guile-sqlite3" ,guile-sqlite3) ("guile-syntax-highlight" ,guile-syntax-highlight) + ("guile-webutils" ,guile-webutils) ("gnutls" ,gnutls) ;needed to talk to https://debbugs.gnu.org ("guile" ,guile-2.2) + ("mailutils" ,mailutils) ("mumimu" ,mumimu))) ;'mumimu' executable recorded in (mumi config) (native-inputs `(("autoconf" ,autoconf) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index fa5c34d5af..c73ff5ebfc 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -262,6 +262,14 @@ patchwork-virtualhost patchwork-service-type + <mumi-configuration> + mumi-configuration + mumi-configuration? + mumi-configuration-mumi + mumi-configuration-mailer? + mumi-configuration-sender + mumi-configuration-smtp + mumi-service-type)) ;;; Commentary: @@ -1678,6 +1686,14 @@ WSGIPassAuthorization On ;;; Mumi. ;;; +(define-record-type* <mumi-configuration> + mumi-configuration make-mumi-configuration + mumi-configuration? + (mumi mumi-configuration-mumi (default mumi)) + (mailer? mumi-configuration-mailer? (default #t)) + (sender mumi-configuration-sender) + (smtp mumi-configuration-smtp)) + (define %mumi-activation (with-imported-modules '((guix build utils)) #~(begin @@ -1702,25 +1718,43 @@ WSGIPassAuthorization On (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define (mumi-shepherd-services mumi) - (list (shepherd-service - (provision '(mumi)) - (documentation "Mumi bug-tracking web interface.") - (requirement '(networking)) - (start #~(make-forkexec-constructor - '(#$(file-append mumi "/bin/mumi")) - #:user "mumi" #:group "mumi" - #:log-file "/var/log/mumi.log")) - (stop #~(make-kill-destructor))) - (shepherd-service - (provision '(mumi-worker)) - (documentation "Mumi bug-tracking web interface.") - (requirement '(networking)) - (start #~(make-forkexec-constructor - '(#$(file-append mumi "/bin/mumi") "--worker") - #:user "mumi" #:group "mumi" - #:log-file "/var/log/mumi.worker.log")) - (stop #~(make-kill-destructor))))) +(define (mumi-shepherd-services config) + (match config + (($ <mumi-configuration> mumi mailer? sender smtp) + (list (shepherd-service + (provision '(mumi)) + (documentation "Mumi bug-tracking web interface.") + (requirement '(networking)) + (start #~(make-forkexec-constructor + `(#$(file-append mumi "/bin/mumi") "web" + ,@(if mailer? '() '("--disable-mailer"))) + #:user "mumi" #:group "mumi" + #:log-file "/var/log/mumi.log")) + (stop #~(make-kill-destructor))) + (shepherd-service + (provision '(mumi-worker)) + (documentation "Mumi bug-tracking web interface database worker.") + (requirement '(networking)) + (start #~(make-forkexec-constructor + '(#$(file-append mumi "/bin/mumi") "worker") + #:user "mumi" #:group "mumi" + #:log-file "/var/log/mumi.worker.log")) + (stop #~(make-kill-destructor))) + (shepherd-service + (provision '(mumi-mailer)) + (documentation "Mumi bug-tracking web interface mailer.") + (requirement '(networking)) + (start #~(make-forkexec-constructor + `(#$(file-append mumi "/bin/mumi") "mailer" + ,@(if sender + (list (string-append "--sender=" sender)) + '()) + ,@(if smtp + (list (string-append "--smtp=" smtp)) + '())) + #:user "mumi" #:group "mumi" + #:log-file "/var/log/mumi.mailer.log")) + (stop #~(make-kill-destructor))))))) (define mumi-service-type (service-type @@ -1734,4 +1768,5 @@ WSGIPassAuthorization On mumi-shepherd-services))) (description "Run Mumi, a Web interface to the Debbugs bug-tracking server.") - (default-value mumi))) + (default-value + (mumi-configuration)))) |