From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yGo9Fw73y17iKQAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 16:49:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KLEdEw73y15cSQAAbx9fmQ (envelope-from ) for ; Mon, 25 May 2020 16:49:18 +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 D15CF9402D6 for ; Mon, 25 May 2020 16:49:17 +0000 (UTC) Received: from localhost ([::1]:44186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdGHr-0000lH-03 for larch@yhetil.org; Mon, 25 May 2020 12:49:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdGHf-0000jR-Er for guix-patches@gnu.org; Mon, 25 May 2020 12:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdGHf-0002Lh-3K for guix-patches@gnu.org; Mon, 25 May 2020 12:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdGHe-0000w4-19 for guix-patches@gnu.org; Mon, 25 May 2020 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41529] [PATCH] services: php-fpm: Add 'php-ini-file' configuration. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 May 2020 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41529 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41529@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15904253373584 (code B ref -1); Mon, 25 May 2020 16:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 May 2020 16:48:57 +0000 Received: from localhost ([127.0.0.1]:42331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdGHZ-0000vk-7n for submit@debbugs.gnu.org; Mon, 25 May 2020 12:48:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:46332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdGHX-0000vd-Gf for submit@debbugs.gnu.org; Mon, 25 May 2020 12:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdGHX-0000Ta-9D for guix-patches@gnu.org; Mon, 25 May 2020 12:48:55 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:56054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdGHW-0002Ji-2h for guix-patches@gnu.org; Mon, 25 May 2020 12:48:54 -0400 From: Jelle Licht Date: Mon, 25 May 2020 18:48:45 +0200 Message-Id: <20200525164845.9012-1-jlicht@fsfe.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.69.89.151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/25 12:48:49 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsfe.org (policy=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-Spam-Score: 4.09 X-TUID: Y4O6KPJ+2a3z * gnu/services/web.scm: ()[php-ini-file]: New record field. (php-fpm-shepherd-service): Use it. * doc/guix.texi (Web Services): Document it. --- doc/guix.texi | 4 ++++ gnu/services/web.scm | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3d1b097447..82ea7ae852 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21370,6 +21370,10 @@ Can be set to @code{#f} to disable logging. @item @code{file} (default @code{#f}) An optional override of the whole configuration. You can use the @code{mixed-text-file} function or an absolute filepath for it. +@item @code{php-ini-file} (default @code{#f}) +An optional override of the default php settings. +It may be any ``file-like'' object (@pxref{G-Expressions, file-like objects}). +You can use the @code{mixed-text-file} function or an absolute filepath for it. @end table @end deftp diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 9fcfe8a0dc..7cc53ef12f 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -159,6 +159,7 @@ php-fpm-configuration-timezone php-fpm-configuration-workers-log-file php-fpm-configuration-file + php-fpm-configuration-php-ini-file php-fpm-dynamic-process-manager-configuration @@ -857,6 +858,8 @@ of index files." (version-major (package-version php)) "-fpm.www.log"))) (file php-fpm-configuration-file ;#f | file-like + (default #f)) + (php-ini-file php-fpm-configuration-php-ini-file ;#f | file-like (default #f))) (define-record-type* @@ -963,7 +966,7 @@ of index files." (match-lambda (($ php socket user group socket-user socket-group pid-file log-file pm display-errors - timezone workers-log-file file) + timezone workers-log-file file php-ini-file) (list (shepherd-service (provision '(php-fpm)) (documentation "Run the php-fpm daemon.") @@ -974,7 +977,10 @@ of index files." #$(or file (default-php-fpm-config socket user group socket-user socket-group pid-file log-file - pm display-errors timezone workers-log-file))) + pm display-errors timezone workers-log-file)) + #$@(if php-ini-file + `("-c" ,php-ini-file) + '())) #:pid-file #$pid-file)) (stop #~(make-kill-destructor))))))) -- 2.26.2