From patchwork Mon May 25 16:48:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 22354 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E5C0427BBE3; Mon, 25 May 2020 17:49:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 9716027BBE1 for ; Mon, 25 May 2020 17:49:14 +0100 (BST) Received: from localhost ([::1]:44186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdGHq-0000lH-2s for patchwork@mira.cbaines.net; Mon, 25 May 2020 12:49:14 -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 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-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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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)))))))