From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id BIndGqOwdGAgVQAAgWs5BA (envelope-from ) for ; Mon, 12 Apr 2021 22:42:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UKqhE6OwdGAdHgAAbx9fmQ (envelope-from ) for ; Mon, 12 Apr 2021 20:42:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F39292AEA3 for ; Mon, 12 Apr 2021 22:42:10 +0200 (CEST) Received: from localhost ([::1]:40656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW3Nq-0008Ga-69 for larch@yhetil.org; Mon, 12 Apr 2021 16:42:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW3Ni-0008GP-De for guix-patches@gnu.org; Mon, 12 Apr 2021 16:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lW3Ni-00049R-3w for guix-patches@gnu.org; Mon, 12 Apr 2021 16:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lW3Ni-0005u9-17 for guix-patches@gnu.org; Mon, 12 Apr 2021 16:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47736] [PATCH] services: postgresql: Change service default socket directory. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Apr 2021 20:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47736 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47736@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161826011022677 (code B ref -1); Mon, 12 Apr 2021 20:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2021 20:41:50 +0000 Received: from localhost ([127.0.0.1]:58210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NV-0005th-HD for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:42264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lW3NT-0005tX-6b for submit@debbugs.gnu.org; Mon, 12 Apr 2021 16:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lW3NS-0008ES-Vm for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43188) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lW3NQ-0003xg-Ky for guix-patches@gnu.org; Mon, 12 Apr 2021 16:41:46 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id A499027BC72 for ; Mon, 12 Apr 2021 21:41:42 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 81147369 for ; Mon, 12 Apr 2021 20:41:41 +0000 (UTC) From: Christopher Baines Date: Mon, 12 Apr 2021 21:41:41 +0100 Message-Id: <20210412204141.27659-1-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618260131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/jaT+jMJml3D/UjWEHr7gDNMwBAUe7rLtqD/PDauGSw=; b=I2aijnB6yaNrLwZxAJ9R/mjQCTflOo/vCZB1u4QqFCi4vGdM4kxzbFjtVfoXSSOlZ1qeyh 2c2/3uRpLQSX/CGVhjdDjM+CW5fRKOetMkTz+a1ttRMBZfRzP0AFIW2L+IfH7SSVSi/UUF oMH11VBtYsC+L9T1lGyX1BTZszCUpeE3XhIM7fEVfkFgkebyOV+gx5zLKvatFSYcTcwv7y JwfDM0KJRMFCMS2f5lJLZD57gRxuLbi8unZf9AMgDEVt+ZkCSa8AzZjZ7WHU6gmxWXS3dQ 1aNcwCiQIhrCDCq7QhstF2pBLR3PPxik0nj9CjrEX58510iV6xZZZBqoK4EMyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618260131; a=rsa-sha256; cv=none; b=NekXtq3SKKhP/aZt8tThlK330/2h6sEeR8EV3dMGAvV61XP54sB1xukWmtJHqg8fL9pK7C 9rY/VKX27dFbj711gSdUafFGRxqO51/zDF7ZfXPefmbTBJsJVmPGozJgC3ekI/ZyQJzbB5 L+lh+RApPT4kA4KUzbaBuhw9/WzunG9/yHsmiITp3V8RQx3UWcP5y/nZiz/2AZXiedykAv O+5YPw0etRlIJaZzWymSAPRsx9H8hIdCGYhWJvgL6k/V2t+qXukqItlxuNRyDxaAwizxvA drLuy0C+mnpuODCF5ckZppmua0VBI9mu5Yse1uxxYMGqc8gxUFsxsKI3gCZVXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.56 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F39292AEA3 X-Spam-Score: 2.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: RJMwoyUJ3B3V Fixes . PostgreSQL running with a different socket directory to the default one in the package itself breaks some services, this commit restores the previous behaviour where PostgreSQL by default will run with a socket directory that matches the default used by PostgreSQL packaged for Guix. Switching to a different default value can happen, but only alongside changing the PostgreSQL package. * gnu/services/databases.scm ()[socket-directory]: Change default to #false. * doc/guix.texi (Database Services): Update documentation, and specify a different value for disabling connections via sockets. * gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL behaviour. * gnu/tests/monitoring.scm (%zabbix-os): Likewise. * gnu/tests/web.scm (patchwork-os): Likewise. --- doc/guix.texi | 9 ++++++--- gnu/services/databases.scm | 2 +- gnu/tests/guix.scm | 5 +---- gnu/tests/monitoring.scm | 7 +------ gnu/tests/web.scm | 7 +------ 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 456dfb264d..1069a5d296 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19830,12 +19830,15 @@ configuration. @item @code{ident-file} (default: @code{%default-postgres-ident}) Filename or G-expression for the user name mapping configuration. -@item @code{socket-directory} (default: @code{"/var/run/postgresql"}) +@item @code{socket-directory} (default: @code{#false}) Specifies the directory of the Unix-domain socket(s) on which PostgreSQL -is to listen for connections from client applications. If set to -@code{#false} PostgreSQL does not listen on any Unix-domain sockets, in +is to listen for connections from client applications. If set to +@code{""} PostgreSQL does not listen on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server. +By default, the @code{#false} value means the PostgreSQL default value +will be used, which is currently @samp{/tmp}. + @item @code{extra-config} (default: @code{'()}) List of additional keys and values to include in the PostgreSQL config file. Each entry in the list should be a list where the first element diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index a841e7a50e..6ef3f3383c 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -115,7 +115,7 @@ host all all ::1/128 md5")) (ident-file postgresql-config-file-ident-file (default %default-postgres-ident)) (socket-directory postgresql-config-file-socket-directory - (default "/var/run/postgresql")) + (default #false)) (extra-config postgresql-config-file-extra-config (default '()))) diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm index 219b8b482f..af7d8f0b21 100644 --- a/gnu/tests/guix.scm +++ b/gnu/tests/guix.scm @@ -164,10 +164,7 @@ " local all all trust host all all 127.0.0.1/32 trust -host all all ::1/128 trust")) - ;; XXX: Remove when postgresql default socket directory is - ;; changed to /var/run/postgresql. - (socket-directory #f))))) +host all all ::1/128 trust")))))) (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 be69e1c259..8630f5818c 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -309,12 +309,7 @@ zabbix||{} (service dhcp-client-service-type) (service postgresql-service-type (postgresql-configuration - (postgresql postgresql) - ;; XXX: Remove when postgresql default socket directory is - ;; changed to /var/run/postgresql. - (config-file - (postgresql-config-file - (socket-directory #f))))) + (postgresql postgresql))) (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 cc0e79c8b2..7f4518acd2 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -569,12 +569,7 @@ HTTP-PORT." (listen '("8080")))))) (service postgresql-service-type (postgresql-configuration - (postgresql postgresql-10) - ;; XXX: Remove when postgresql default socket directory is - ;; changed to /var/run/postgresql. - (config-file - (postgresql-config-file - (socket-directory #f))))) + (postgresql postgresql-10))) (service patchwork-service-type (patchwork-configuration (patchwork patchwork) -- 2.30.1