summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-11-10 10:19:48 +0000
committerChristopher Baines <mail@cbaines.net>2025-11-10 10:27:36 +0000
commitf7125fb55d06cc2ad6bcd86b8071ea079a9ca179 (patch)
tree2478c50d3eb1c81cca5af3e1f4bf326d01b8b2ad /gnu/services
parent9bf06d93a47db1200eabc055e64e832d6a5fd603 (diff)
gnu: Fix patchwork service test.
* gnu/packages/patchutils.scm (patchwork):[arguments]: Write version.txt, tweak some indentation, patch the STATICFILES_DIRS entry. [propagated-inputs]: Add python-tzdata. * gnu/services/web.scm (patchwork-settings-module-compiler): Don't set STATIC_ROOT on debug, as this clashes with STATICFILES_DIRS. (patchwork-django-admin-gexp): Fix. (patchwork-shepherd-services): Workaround issue referencing random-token. * gnu/tests/web.scm (patchwork-initial-database-setup-service): Don't use primitive-fork, as this doesn't work with newer shepherds. (run-patchwork-test): Check the setup runs. Change-Id: I7dfeb816b4f6c9070358d433fb7ca8faa1fbfd2a
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/web.scm17
1 files changed, 7 insertions, 10 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index ae33a25394d..9d314368ff9 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1771,11 +1771,9 @@ DATABASES = {
},
}
-" #$(if debug?
- #~(string-append "STATIC_ROOT = '"
- #$(file-append patchwork "/share/patchwork/htdocs")
- "'")
- #~(string-append "STATIC_URL = '" #$static-url "'")) "
+" #$(if static-url
+ #~(string-append "STATIC_URL = '" #$static-url "'")
+ "") "
STATICFILES_STORAGE = (
'django.contrib.staticfiles.storage.StaticFilesStorage'
@@ -1840,7 +1838,7 @@ WSGIPassAuthorization On
#~(lambda command
(zero? (spawn-command
`(#$(file-append patchwork "/bin/patchwork-admin")
- ,command)
+ ,@command)
#:user "httpd"
#:group "httpd"
#:environment-variables
@@ -1864,10 +1862,9 @@ WSGIPassAuthorization On
(with-extensions (list guile-gcrypt)
#~(let ((secret-key-file
#$(patchwork-settings-module-secret-key-file
- settings-module)))
- (use-modules (guix build utils)
- (gcrypt random))
-
+ settings-module))
+ (random-token
+ (@ (gcrypt random) random-token)))
(unless (file-exists? secret-key-file)
(mkdir-p (dirname secret-key-file))
(call-with-output-file secret-key-file