unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28269] [PATCH] services: web: Fix nginx-service-type's ‘file’ procedure.
@ 2017-08-28 21:13 Tobias Geerinckx-Rice
  2017-09-05 18:58 ` bug#28269: " Tobias Geerinckx-Rice
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-08-28 21:13 UTC (permalink / raw)
  To: 28269

* 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-configuration> 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-configuration> 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#28269: [PATCH] services: web: Fix nginx-service-type's ‘file’ procedure.
  2017-08-28 21:13 [bug#28269] [PATCH] services: web: Fix nginx-service-type's ‘file’ procedure Tobias Geerinckx-Rice
@ 2017-09-05 18:58 ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 2+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-09-05 18:58 UTC (permalink / raw)
  To: 28269-done

Pushed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-05 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 21:13 [bug#28269] [PATCH] services: web: Fix nginx-service-type's ‘file’ procedure Tobias Geerinckx-Rice
2017-09-05 18:58 ` bug#28269: " Tobias Geerinckx-Rice

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).