GNU bug report logs - #41529
[PATCH] services: php-fpm: Add 'php-ini-file' configuration.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Jelle Licht <jlicht@HIDDEN>; Keywords: patch; dated Mon, 25 May 2020 16:49:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 May 2020 16:48:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 25 12:48:57 2020
Received: from localhost ([127.0.0.1]:42331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jdGHZ-0000vk-7n
	for submit <at> 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 <jlicht@HIDDEN>) id 1jdGHX-0000vd-Gf
 for submit <at> 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 <jlicht@HIDDEN>) id 1jdGHX-0000Ta-9D
 for guix-patches@HIDDEN; 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 <jlicht@HIDDEN>) id 1jdGHW-0002Ji-2h
 for guix-patches@HIDDEN; Mon, 25 May 2020 12:48:54 -0400
From: Jelle Licht <jlicht@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] services: php-fpm: Add 'php-ini-file' configuration.
Date: Mon, 25 May 2020 18:48:45 +0200
Message-Id: <20200525164845.9012-1-jlicht@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=217.69.89.151; envelope-from=jlicht@HIDDEN;
 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-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/services/web.scm: (<php-fpm-configuration>)[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>
             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* <php-fpm-dynamic-process-manager-configuration>
@@ -963,7 +966,7 @@ of index files."
   (match-lambda
     (($ <php-fpm-configuration> 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





Acknowledgement sent to Jelle Licht <jlicht@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#41529; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 May 2020 17:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.