GNU bug report logs -
#29633
[PATCH] services: nginx: Allow to add raw content to the server blocks.
Previous Next
Reported by: Clément Lassieur <clement <at> lassieur.org>
Date: Sat, 9 Dec 2017 22:56:01 UTC
Severity: normal
Tags: patch
Done: Clément Lassieur <clement <at> lassieur.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29633 in the body.
You can then email your comments to 29633 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#29633
; Package
guix-patches
.
(Sat, 09 Dec 2017 22:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Clément Lassieur <clement <at> lassieur.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 09 Dec 2017 22:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* doc/guix.texi (Web Services): Document 'raw-content'.
* gnu/services/web.scm (<nginx-server-configuration>)[raw-content]: New field.
(emit-nginx-server-config): Add it.
---
doc/guix.texi | 3 +++
gnu/services/web.scm | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index ab1e5d057..09017ec65 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14974,6 +14974,9 @@ you don't have a key or you don't want to use HTTPS.
@item @code{server-tokens?} (default: @code{#f})
Whether the server should add its configuration to response.
+@item @code{raw-content} (default: @code{'()})
+A list of raw lines added to the server block.
+
@end table
@end deftp
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 7373d5671..78a6ad309 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -52,6 +52,7 @@
nginx-server-configuration-ssl-certificate
nginx-server-configuration-ssl-certificate-key
nginx-server-configuration-server-tokens?
+ nginx-server-configuration-raw-content
<nginx-upstream-configuration>
nginx-upstream-configuration
@@ -104,7 +105,9 @@
(ssl-certificate-key nginx-server-configuration-ssl-certificate-key
(default "/etc/nginx/key.pem"))
(server-tokens? nginx-server-configuration-server-tokens?
- (default #f)))
+ (default #f))
+ (raw-content nginx-server-configuration-raw-content
+ (default '())))
(define-record-type* <nginx-upstream-configuration>
nginx-upstream-configuration make-nginx-upstream-configuration
@@ -180,7 +183,8 @@ of index files."
(index (nginx-server-configuration-index server))
(try-files (nginx-server-configuration-try-files server))
(server-tokens? (nginx-server-configuration-server-tokens? server))
- (locations (nginx-server-configuration-locations server)))
+ (locations (nginx-server-configuration-locations server))
+ (raw-content (nginx-server-configuration-raw-content server)))
(define-syntax-parameter <> (syntax-rules ()))
(define-syntax-rule (and/l x tail ...)
(let ((x* x))
@@ -213,6 +217,7 @@ of index files."
"\n"
(map emit-nginx-location-config locations)
"\n"
+ (map (lambda (x) (list " " x "\n")) raw-content)
" }\n")))
(define (emit-nginx-upstream-config upstream)
--
2.15.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#29633
; Package
guix-patches
.
(Sat, 16 Dec 2017 22:01:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 29633 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Clément Lassieur <clement <at> lassieur.org> writes:
> * doc/guix.texi (Web Services): Document 'raw-content'.
> * gnu/services/web.scm (<nginx-server-configuration>)[raw-content]: New field.
> (emit-nginx-server-config): Add it.
This looks good to me :) I was writing a service for the Apache web
server recently, and ended up adding something very similar there [1].
1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29741
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Clément Lassieur <clement <at> lassieur.org>
:
You have taken responsibility.
(Mon, 18 Dec 2017 11:08:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Mon, 18 Dec 2017 11:08:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 29633-done <at> debbugs.gnu.org (full text, mbox):
Christopher Baines <mail <at> cbaines.net> writes:
> Clément Lassieur <clement <at> lassieur.org> writes:
>
>> * doc/guix.texi (Web Services): Document 'raw-content'.
>> * gnu/services/web.scm (<nginx-server-configuration>)[raw-content]: New field.
>> (emit-nginx-server-config): Add it.
>
> This looks good to me :) I was writing a service for the Apache web
> server recently, and ended up adding something very similar there [1].
>
> 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29741
I pushed it. Thank you!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 15 Jan 2018 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.