From 6c0679215f4ffa534c1eb2e8c8a6e043a0c993fe Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 18 Jan 2021 10:35:29 +0100 Subject: services: postgresql: Add socket directory support. * gnu/services/databases.scm (postgresql-config-file-socket-directory): New procedure. ()[socket-directory]: New field. (postgresql-config-file-compiler): Honor it. (postgresql-activation): Create the socket directory if needed. * doc/guix.texi (Database Services): Document it. * gnu/tests/guix.scm (%guix-data-service-os): Adapt it. * gnu/tests/monitoring.scm (%zabbix-os): Ditto. * gnu/tests/web.scm (patchwork-os): Ditto. Signed-off-by: Mathieu Othacehe --- gnu/tests/guix.scm | 5 ++++- gnu/tests/monitoring.scm | 7 ++++++- gnu/tests/web.scm | 7 ++++++- 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'gnu/tests') diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm index af7d8f0b21..219b8b482f 100644 --- a/gnu/tests/guix.scm +++ b/gnu/tests/guix.scm @@ -164,7 +164,10 @@ " local all all trust host all all 127.0.0.1/32 trust -host all all ::1/128 trust")))))) +host all all ::1/128 trust")) + ;; XXX: Remove when postgresql default socket directory is + ;; changed to /var/run/postgresql. + (socket-directory #f))))) (service guix-data-service-type (guix-data-service-configuration (host "0.0.0.0"))) diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm index 7371b02fe1..c21bb1e63d 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -309,7 +309,12 @@ zabbix||{} (service dhcp-client-service-type) (service postgresql-service-type (postgresql-configuration - (postgresql postgresql-10))) + (postgresql postgresql-10) + ;; XXX: Remove when postgresql default socket directory is + ;; changed to /var/run/postgresql. + (config-file + (postgresql-config-file + (socket-directory #f))))) (service zabbix-front-end-service-type (zabbix-front-end-configuration (db-password "zabbix"))) diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 7f4518acd2..cc0e79c8b2 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -569,7 +569,12 @@ HTTP-PORT." (listen '("8080")))))) (service postgresql-service-type (postgresql-configuration - (postgresql postgresql-10))) + (postgresql postgresql-10) + ;; XXX: Remove when postgresql default socket directory is + ;; changed to /var/run/postgresql. + (config-file + (postgresql-config-file + (socket-directory #f))))) (service patchwork-service-type (patchwork-configuration (patchwork patchwork) -- cgit v1.2.3