GNU bug report logs -
#71586
[PATCH] services: web: Improve nginx formatting for extra-content
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 27 Jun 2024 11:33:56 +0100
with message-id <87ikxu4quj.fsf <at> 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 <at> gnu.org.)
--
71586: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71586
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* 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
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Richard Sent <richard <at> 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
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.