From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmRLH-0002Kf-Hj for guix-patches@gnu.org; Mon, 28 Aug 2017 17:13:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmRLD-0004oM-Bm for guix-patches@gnu.org; Mon, 28 Aug 2017 17:13:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmRLD-0004no-7p for guix-patches@gnu.org; Mon, 28 Aug 2017 17:13:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmRLB-0002OP-WC for guix-patches@gnu.org; Mon, 28 Aug 2017 17:13:02 -0400 Subject: [bug#28269] [PATCH] services: web: Fix nginx-service-type's =?UTF-8?Q?=E2=80=98file=E2=80=99?= procedure. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmRK4-0002B1-TC for guix-patches@gnu.org; Mon, 28 Aug 2017 17:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmRK3-0004Mj-LV for guix-patches@gnu.org; Mon, 28 Aug 2017 17:11:52 -0400 Received: from tobias.gr ([2001:470:cc92::1]:46660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmRK3-0004M2-AW for guix-patches@gnu.org; Mon, 28 Aug 2017 17:11:51 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id d65c8e73 for ; Mon, 28 Aug 2017 21:11:44 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id de77846d (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Mon, 28 Aug 2017 21:11:43 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Mon, 28 Aug 2017 23:13:27 +0200 Message-Id: <20170828211327.8050-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28269@debbugs.gnu.org * gnu/services/web.scm (nginx-activation, nginx-shepherd-service): Replace references to non-existent ‘config-file’ with ‘file’. * doc/guix.texi (Web Services): Likewise. --- Guix, This fixes using a ‘native’ nginx configuration file under GuixSD, so I can finally update my web server. I wasn't sure whether to keep the procedure as ‘file’, and fix all references to it, or rename it to ‘configuration-file’. Then Andreas' commit 036cd84 to maintenance rolledin which I took as a pragmatic endorsement of ‘file’. I don't have a strong preference either way. Both are better than the old ‘config-file’, and we have no backwards compatibility to care about. Kind regards, T G-R doc/guix.texi | 12 ++++++------ gnu/services/web.scm | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e8b4d5e08..651cc9aca 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38,7 +38,8 @@ Copyright @copyright{} 2017 Thomas Danckaert@* Copyright @copyright{} 2017 humanitiesNerd@* Copyright @copyright{} 2017 Christopher Allan Webber@* Copyright @copyright{} 2017 Marius Bakke@* -Copyright @copyright{} 2017 Hartmut Goebel +Copyright @copyright{} 2017 Hartmut Goebel@* +Copyright @copyright{} 2017 Tobias Geerinckx-Rice Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -14131,13 +14132,12 @@ requests with two servers. "server2.example.com"))))))) @end example -@item @code{config-file} (default: @code{#f}) -If the @var{config-file} is provided, this will be used, rather than +@item @code{file} (default: @code{#f}) +If a configuration @var{file} is provided, this will be used, rather than generating a configuration file from the provided @code{log-directory}, @code{run-directory}, @code{server-list} and @code{upstream-list}. For -proper operation, these arguments should match what is in -@var{config-file} to ensure that the directories are created when the -service is activated. +proper operation, these arguments should match what is in @var{file} to +ensure that the directories are created when the service is activated. This can be useful if you have an existing configuration file, or it's not possible to do what is required through the other parts of the diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 18278502e..4aa6fd501 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -262,7 +262,7 @@ of index files." (define nginx-activation (match-lambda (($ nginx log-directory run-directory server-blocks - upstream-blocks config-file) + upstream-blocks file) #~(begin (use-modules (guix build utils)) @@ -281,7 +281,7 @@ of index files." (mkdir-p (string-append #$run-directory "/logs")) ;; Check configuration file syntax. (system* (string-append #$nginx "/sbin/nginx") - "-c" #$(or config-file + "-c" #$(or file (default-nginx-config nginx log-directory run-directory server-blocks upstream-blocks)) "-t"))))) @@ -289,14 +289,14 @@ of index files." (define nginx-shepherd-service (match-lambda (($ nginx log-directory run-directory server-blocks - upstream-blocks config-file) + upstream-blocks file) (let* ((nginx-binary (file-append nginx "/sbin/nginx")) (nginx-action (lambda args #~(lambda _ (zero? (system* #$nginx-binary "-c" - #$(or config-file + #$(or file (default-nginx-config nginx log-directory run-directory server-blocks upstream-blocks)) #$@args)))))) -- 2.13.1