From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2FTHGhpA0WXoNgEA62LTzQ:P1 (envelope-from ) for ; Sun, 18 Feb 2024 00:24:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2FTHGhpA0WXoNgEA62LTzQ (envelope-from ) for ; Sun, 18 Feb 2024 00:24:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=twilken.net header.s=mythic-beasts-k1 header.b="AggA/Y9E"; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708212250; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GZQ3Unb9EyGGDIGfpkeZ2yRTxjqKjZjIYUSJDlIFxcc=; b=d2Xq1ywvrvr4Iah63yOxDRKNe+XJ/zhvvmpyeG40jZHOiqA8VFjYk9KLP/vPIa/TlJqkbr zkNHQatceqnMriQjuFZCUfVRSok2CvKX5KSs+SrnPtUm/nDYI3zRP4F7jnYj/Hrc+Jqg6z maWiWRfeRdZtgX0RFyBoCMkg6a11qm37JDnpPZtrRx3UR65ee80jt3+/jZRlFqB/kw/x7y st6UcRsTy5I1WLTKbC+6kPR+AaXGTiZ/qhvQJd4W8521q5zwhNw/ZEXgFZzlb9058wnXNl JFJSSp94f2N+74PWttA6oaNumzMcQIxT9MVkfauhwVI89fW5jIZ4a7IXHmYEFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=twilken.net header.s=mythic-beasts-k1 header.b="AggA/Y9E"; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708212250; a=rsa-sha256; cv=none; b=FScs84ovjQFLZCGmuL9nVOPBP6HK7r1ZAZbizdGMH1YM8b+eQORPc4vy5C+4WjX8AyrcFs M4Pmp43Wzb55gVkcl+F2OnyJuWRfJkFoUEMF3H27NTlrFuKR/kWXHDoDifrhi6qhgTTYV7 1ApDB718b21ZlSzP+oOvCuzKe+dk4FGEh0c82EnOEamv5F16y15pPHI9KDLmpXJcGMxAje WiCorqvkH8Xg/X2zviCclI72MB6mmcGy4ynpZqA/CJ0RkexBRFmBqGwTP6gRE6RPYF4KxB m03VNYH4eaoxro4H//7C3Wp5dNJHHsFVn7KBtzMs26OqSSoGanf9yDs4zc+ixw== 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 7C80B6DE90 for ; Sun, 18 Feb 2024 00:24:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbU25-0000rf-Mf; Sat, 17 Feb 2024 18:23:45 -0500 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 1rbU22-0000qo-SG for guix-patches@gnu.org; Sat, 17 Feb 2024 18:23:42 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rbU22-0001Ig-KK for guix-patches@gnu.org; Sat, 17 Feb 2024 18:23:42 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rbU2M-0007J2-75 for guix-patches@gnu.org; Sat, 17 Feb 2024 18:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#63877] Reworked patch for setting php-fpm environment variables Resent-From: guix@twilken.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Feb 2024 23:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63877 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: 63877@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Bruno Victal Received: via spool by 63877-submit@debbugs.gnu.org id=B63877.170821219128000 (code B ref 63877); Sat, 17 Feb 2024 23:24:02 +0000 Received: (at 63877) by debbugs.gnu.org; 17 Feb 2024 23:23:11 +0000 Received: from localhost ([127.0.0.1]:33991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbU1X-0007HY-Dh for submit@debbugs.gnu.org; Sat, 17 Feb 2024 18:23:11 -0500 Received: from mx2.mythic-beasts.com ([46.235.227.24]:52235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbU1V-0007HL-Ae for 63877@debbugs.gnu.org; Sat, 17 Feb 2024 18:23:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=twilken.net ; s=mythic-beasts-k1; h=Date:Subject:To:From; bh=GZQ3Unb9EyGGDIGfpkeZ2yRTxjqKjZjIYUSJDlIFxcc=; b=AggA/Y9EpviH/MDxrJkVg4MAlR eQ+PGv/S/Tl/hreGPjQk+mA9vBqPz6AWBtgl3PBSArfkUz4ZphUyP+yvQORzIX9p1axb1DMik/Sx3 HkNQoI4dSt69qb3Gu1GPS49wTxHttcWYViX9Rt4nFWyfnZgmI6Jl9yt0buZH0Co5RhXVoNIVzf26e 4Zf7sSqhkao20eeamaIjRhv+61a0SJmVy7XiPFA+beoMlBmtoQWb9QUXnpwaYyCSgDdaJWmF2WgGM HtTmPSCUsgiWnY9tc3qmo+CcGYK5h+CEK73xsg0oXTbATea93kxmSVcmfy3xokUgD8B9sYNIYVnUT sx/q6bYA==; Received: by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rbU0u-00BbpP-Rq; Sat, 17 Feb 2024 23:22:33 +0000 From: guix@twilken.net Date: Sun, 18 Feb 2024 00:21:44 +0100 Message-ID: <20240217232151.12507-1-guix@twilken.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <7be3201e-af9b-4ad0-81d6-44ab316d2162@makinata.eu> References: <7be3201e-af9b-4ad0-81d6-44ab316d2162@makinata.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BlackCat-Spam-Score: 49 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 X-Migadu-Spam-Score: -3.84 X-Spam-Score: -3.84 X-Migadu-Queue-Id: 7C80B6DE90 X-Migadu-Scanner: mx11.migadu.com X-TUID: HACpSKxOFEX7 Hi Bruno, sorry for taking a while to get back to this. Writing a test for curl's behaviour with the SSL_CERT_DIR variable proved too fiddly for me, so I gave up and wrote a simpler test that just checks for a sentinel variable in the phpinfo output instead. I also found out that php-fpm clears environment variables when it starts, except for those listed in its configuration. However, libcurl isn't affected by this as far as I can tell -- it needs the SSL_CERT_DIR variable to be set in the process environment, not only in the php-fpm config file! I decided to set environment variables in the process environment and list them in the generated configuration file, so they're passed through to any PHP programs run through PHP-FPM. This should minimise surprise, I hope. (That's also be useful for setting e.g. PATH -- Nextcloud has started complaining that that variable is unset, and it needs the variable to be listed in the php-fpm configuration.) The reworked patch also removes some of the gexp-related hairyness -- the `environment-variables' property just takes a list of (variable-name . value) pairs now, no gexp'ing required, though file-like objects like what `file-append' returns are accepted. Please let me know what you think, and thank you for your considerable patience with this patch series! :)