diff options
| author | Christopher Baines <mail@cbaines.net> | 2025-11-10 10:19:48 +0000 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2025-11-10 10:27:36 +0000 |
| commit | f7125fb55d06cc2ad6bcd86b8071ea079a9ca179 (patch) | |
| tree | 2478c50d3eb1c81cca5af3e1f4bf326d01b8b2ad /gnu/packages/patchutils.scm | |
| parent | 9bf06d93a47db1200eabc055e64e832d6a5fd603 (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/packages/patchutils.scm')
| -rw-r--r-- | gnu/packages/patchutils.scm | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 540b85b41aa..2d17d9d57be 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -55,6 +55,7 @@ #:use-module (gnu packages less) #:use-module (gnu packages mail) #:use-module (gnu packages text-editors) + #:use-module (gnu packages time) #:use-module (gnu packages ncurses) #:use-module (gnu packages ocaml) #:use-module (gnu packages package-management) @@ -432,13 +433,20 @@ application = get_wsgi_application()\n") port))))) (delete-file-recursively (string-append out-site-packages "/patchwork/tests")) + (call-with-output-file + (string-append out-site-packages "/version.txt") + (lambda (port) + (display #$version port) + (newline port))) + ;; Install patchwork related tools - (for-each (lambda (file) - (install-file file - (string-append out "/bin"))) - (list (string-append out-site-packages - "/patchwork/bin/parsemail.sh") - (string-append out-site-packages + (for-each + (lambda (file) + (install-file file (string-append out "/bin"))) + (list + (string-append out-site-packages + "/patchwork/bin/parsemail.sh") + (string-append out-site-packages "/patchwork/bin/parsemail-batch.sh"))) ;; Collect the static assets, this includes JavaScript, CSS and @@ -449,8 +457,15 @@ application = get_wsgi_application()\n") port))))) ;; The intent here is that you can serve files from this ;; directory through a webserver, which is recommended when ;; running Django applications. - (let ((static-root (string-append out - "/share/patchwork/htdocs"))) + (let ((static-root + (string-append out "/share/patchwork/htdocs"))) + ;; Patch the STATICFILES_DIRS entry + (substitute* (string-append + out-site-packages + "/patchwork/settings/base.py") + (("os\\.path\\.join\\(ROOT\\_DIR, 'htdocs'\\)") + (string-append "'" static-root "'"))) + (mkdir-p static-root) (copy-file "patchwork/settings/production.example.py" "patchwork/settings/assets.py") @@ -496,6 +511,7 @@ if __name__ == \"__main__\": (inputs (list python-wrapper)) (propagated-inputs (list python-django + python-tzdata ;; TODO: Make this configurable python-psycopg2 python-mysqlclient |
