From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uJFyDNKFe2RuLwEASxT56A (envelope-from ) for ; Sat, 03 Jun 2023 20:26:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aA98DNKFe2S+QwEAauVa8A (envelope-from ) for ; Sat, 03 Jun 2023 20:26:26 +0200 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 AD9FE416 for ; Sat, 3 Jun 2023 20:26:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Vwy-0003lN-8c; Sat, 03 Jun 2023 14:26:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Vww-0003km-Ke for guix-patches@gnu.org; Sat, 03 Jun 2023 14:26:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5Vww-0000lm-Cc for guix-patches@gnu.org; Sat, 03 Jun 2023 14:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5Vww-0001h2-85 for guix-patches@gnu.org; Sat, 03 Jun 2023 14:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63877] [PATCH] gnu: services: web: Set SSL_CERT_DIR in php-fpm environment. Resent-From: Timo Wilken Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jun 2023 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63877 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63877@debbugs.gnu.org Cc: Timo Wilken X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16858167496487 (code B ref -1); Sat, 03 Jun 2023 18:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jun 2023 18:25:49 +0000 Received: from localhost ([127.0.0.1]:44282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Vwj-0001gZ-AI for submit@debbugs.gnu.org; Sat, 03 Jun 2023 14:25:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:49502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Vwg-0001gO-Fq for submit@debbugs.gnu.org; Sat, 03 Jun 2023 14:25:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Vwg-0003gc-A7 for guix-patches@gnu.org; Sat, 03 Jun 2023 14:25:46 -0400 Received: from mx1.mythic-beasts.com ([2a00:1098:0:86:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Vwe-0000kD-EP for guix-patches@gnu.org; Sat, 03 Jun 2023 14:25:46 -0400 Received: by mailhub-cam-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q5Vwc-00Fdc8-FC; Sat, 03 Jun 2023 19:25:42 +0100 From: Timo Wilken Date: Sat, 3 Jun 2023 20:25:12 +0200 Message-Id: <3fec02d93b8e7803dd8183e7f0037ec1a1393b0f.1685816572.git.guix@twilken.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BlackCat-Spam-Score: 9 Received-SPF: pass client-ip=2a00:1098:0:86:1000:0:2:1; envelope-from=guix@twilken.net; helo=mx1.mythic-beasts.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685816786; a=rsa-sha256; cv=none; b=O4naPidRkd+tJHGg9JFE7Dw1N/SEP7UOHCi9e5t77Kkewb/GOMquyVLOMaRxVjUvLIQHZI DTH77dDtOYMe6GfGZbfyOE3YGhefTDk7edAFXq47VIF7FIXMEQuh4jUsh47Io5nlzQDGlA GhIabe1niL1NUy0WFQhtJv59DLuIQ9E4AHi8v9leClNdaZWNbrvGcP+dViaMGxqeReDd7I BUnKky6Nz83HI9nLUgaNe3A8bNkeeiZVElPm1jnhTlGULFMJgUHUuiLhKxFXGyf81MRYwc dDf/amnZQc6hrlsEUUOs3TMjVP7fJj7mJa8oSA6nZ4EFJRlhtLtkBkFl9Yajug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685816786; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=am1lQFyoUtdvRnxBwTL9JCug0K/2PY3b8BHMbpeo6+Y=; b=qHeeq5iBVW6oBKbHYYUJSBQaiavQvw+MVvuJ+BGNq7iwGybq6Uo+kSq4N7zLd+7jiWZSQ8 juCAKH6fQZccp9Qq6GuadjSD8pw8FCWaZFklajMHPhp6omigoOpTyNZFmA5XwDe0jsDCbt 51DYY1SPo5QV2OKVJjBwbVtKKBt6E8oYmTI+pNy/fovYS8P5zAJXkzLMc2oQQ7+Ke8zI9M hKUsTegVi7D7VkAdZ3L7xXsj5N9O6O2elcWvwb2FZuPGeLyZ22Zx2uc/hZTTbEfKeZbL4O pZgbQzDu6+h1HKK3kR8Jc3Ra3L8GLROhPqw6IKH/amaUlwLEmH344uJahkh+jA== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.48 X-Spam-Score: -3.48 X-Migadu-Queue-Id: AD9FE416 X-TUID: oa1G98YCub5M Some PHP programs, like Nextcloud, make HTTPS requests to other servers. For this, they need to know where the system CA certificates are. * gnu/services/web.scm (php-fpm-shepherd-service): Set SSL_CERT_DIR environment variable. --- This solution adds a dependency from the resulting Shepherd service to the nss-certs package, which weighs 0.3 MiB. An alternative solution might be to set SSL_CERT_DIR=/etc/ssl/certs instead and rely on nss-certs being installed system-wide. gnu/services/web.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 45897d7d6f..e46710a040 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton ;;; Copyright © 2022 Simen Endsjø ;;; Copyright © 2023 Bruno Victal +;;; Copyright © 2023 Timo Wilken ;;; ;;; This file is part of GNU Guix. ;;; @@ -1096,6 +1097,12 @@ (define php-fpm-shepherd-service #$@(if php-ini-file `("-c" ,php-ini-file) '())) + #:environment-variables + (cons* + ;; Needed by e.g. Nextcloud to make HTTPS requests. + (string-append + "SSL_CERT_DIR=" #$(file-append nss-certs "/etc/ssl/certs")) + (default-environment-variables)) #:pid-file #$pid-file)) (stop #~(make-kill-destructor))))))) base-commit: 66c9b82fed3c59ee07187898592c688c82fed273 -- 2.40.1