emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71586: closed ([PATCH] services: web: Improve nginx formatting for e


From: GNU bug Tracking System
Subject: bug#71586: closed ([PATCH] services: web: Improve nginx formatting for extra-content)
Date: Thu, 27 Jun 2024 10:35:02 +0000

Your message dated Thu, 27 Jun 2024 11:33:56 +0100
with message-id <87ikxu4quj.fsf@cbaines.net>
and subject line Re: [bug#71586] [PATCH v3] services: web: Improve nginx 
formatting for extra-content
has caused the debbugs.gnu.org bug report #71586,
regarding [PATCH] services: web: Improve nginx formatting for extra-content
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
71586: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71586
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] services: web: Improve nginx formatting for extra-content Date: Sat, 15 Jun 2024 23:57:12 -0400
* gnu/services/web (default-nginx-config): When extra-content is a list, add 4
space indentation and a newline to every line. If it's a string, continue
inserting it directly. This makes the list serialization behavior more
consistent with other services.

Change-Id: Iec8614ba3cfc37292a566197e8d39b352b04846a
---
 gnu/services/web.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..094b1e4b45 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -771,7 +771,12 @@ (define (default-nginx-config config)
            "\n"
            (map emit-nginx-upstream-config upstream-blocks)
            (map emit-nginx-server-config server-blocks)
-           extra-content
+           (match extra-content
+             ((? string? extra-content) extra-content)
+             ((? list? extra-content)
+              (map (lambda (line)
+                     (simple-format #f "    ~A\n" line))
+                   extra-content)))
            "\n}\n"))))
 
 (define %nginx-accounts

base-commit: 612e4dd98f7d1d015e405af9d029bede3fe3c280
-- 
2.45.1




--- End Message ---
--- Begin Message --- Subject: Re: [bug#71586] [PATCH v3] services: web: Improve nginx formatting for extra-content Date: Thu, 27 Jun 2024 11:33:56 +0100 User-agent: mu4e 1.12.4; emacs 29.3
Richard Sent <richard@freakingpenguin.com> writes:

> When extra-content is a list, add 4 space indentation and a newline to every
> line. If it's a string, continue inserting it directly. This makes the list
> serialization behavior more consistent with other services.
>
> * gnu/services/web (default-nginx-config): Support lists.
> * doc/guix.texi (Web Services) [nginx-configuration]: Document it.
>
> Change-Id: Iec8614ba3cfc37292a566197e8d39b352b04846a
> ---
>  doc/guix.texi        | 13 +++++++++++--
>  gnu/services/web.scm |  9 ++++++++-
>  2 files changed, 19 insertions(+), 3 deletions(-)

Thanks for the patch, I forgot to close the issue yesterday but I pushed
this to master as da3e71f472c2335f56c3d07758715a514fdb3a9d.

Chris

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]