Prosody patches

DoneSubmitted by Clément Lassieur.
Details
3 participants
  • Clément Lassieur
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Severity
normal
C
C
Clément Lassieur wrote on 24 Nov 2017 17:48
(address . guix-patches@gnu.org)(name . Rutger Helling)(address . rhelling@mykolab.com)
87vahzei78.fsf@lassieur.org
Patches 1 to 3 are related to the Prosody 0.10 update. I'll push themwith Rutger's patch(https://lists.gnu.org/archive/html/guix-patches/2017-11/txtZP9gLpmpSr.txt).
Patches 4 to 6 are unrelated improvements to the service.
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 1/6] gnu: Add lua5.1-bitop.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-1-clement@lassieur.org
* gnu/packages/lua.scm (lua5.1-bitop): New variable.--- gnu/packages/lua.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Toggle diff (33 lines)diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scmindex c8bc4ef85..8aec6374f 100644--- a/gnu/packages/lua.scm+++ b/gnu/packages/lua.scm@@ -446,3 +446,26 @@ Grammars (PEGs).") "Lua BitOp is a C extension module for Lua which adds bitwise operations on numbers.") (license license:expat)))++(define-public lua5.1-bitop+ (package+ (inherit lua5.2-bitop)+ (name "lua5.1-bitop")+ ;; XXX: The arguments field is almost an exact copy of the field in+ ;; "lua5.2-bitop", except for the version string, which was derived from+ ;; "lua-5.2" and now is taken from "lua-5.1". See this discussion for+ ;; context:+ ;; http://lists.gnu.org/archive/html/guix-devel/2017-01/msg02048.html+ (arguments+ `(#:test-target "test"+ #:make-flags+ (list "INSTALL=install -pD"+ (string-append "INSTALLPATH=printf "+ (assoc-ref %outputs "out")+ "/lib/lua/"+ ,(version-major+minor (package-version lua-5.1))+ "/bit/bit.so"))+ #:phases+ (modify-phases %standard-phases+ (delete 'configure))))+ (inputs `(("lua", lua-5.1)))))-- 2.15.0
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 2/6] gnu: prosody: Add lua5.1-bitop to inputs.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-2-clement@lassieur.org
It is required for mod_websocket on Lua 5.1 since Prosody 0.10.
* gnu/packages/messaging.scm (prosody)[inputs]: Add lua5.1-bitop.--- gnu/packages/messaging.scm | 1 + 1 file changed, 1 insertion(+)
Toggle diff (14 lines)diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scmindex a43924e3c..51f7c162c 100644--- a/gnu/packages/messaging.scm+++ b/gnu/packages/messaging.scm@@ -709,6 +709,7 @@ a graphical desktop environment like GNOME.") `(("libidn" ,libidn) ("openssl" ,openssl) ("lua" ,lua-5.1)+ ("lua5.1-bitop" ,lua5.1-bitop) ("lua5.1-expat" ,lua5.1-expat) ("lua5.1-socket" ,lua5.1-socket) ("lua5.1-filesystem" ,lua5.1-filesystem)-- 2.15.0
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 3/6] services: prosody: Adapt to Prosody 0.10.0.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-3-clement@lassieur.org
* doc/guix.texi (Messaging Services): Add "mam" as a module example. Document'prosodyctl check'. Replace 'prosodyctl cert request' with 'prosodyctl certimport'. Regenerate it.* gnu/services/messaging.scm (serialize-module-list): Remove "posix" from thedefault modules list because it is now automatically loaded.(ssl-configuration)[key, certificate]: Remove them because they are nowautomatically located. Fix their docstrings.(%default-modules-enabled): Add "carbons" and "blocklist".(prosody-configuration)[certificates]: Set default directory from whichcertificates/keys will be automatically located.--- doc/guix.texi | 28 +++++++++++++++++++--------- gnu/services/messaging.scm | 19 ++++++++++++++----- 2 files changed, 33 insertions(+), 14 deletions(-)
Toggle diff (120 lines)diff --git a/doc/guix.texi b/doc/guix.texiindex 4f8453ebf..05aca9186 100644--- a/doc/guix.texi+++ b/doc/guix.texi@@ -13835,7 +13835,7 @@ record as in this example: @example (service prosody-service-type (prosody-configuration- (modules-enabled (cons "groups" %default-modules-enabled))+ (modules-enabled (cons "groups" "mam" %default-modules-enabled)) (int-components (list (int-component-configuration@@ -13856,10 +13856,15 @@ By default, Prosody does not need much configuration. Only one @code{virtualhosts} field is needed: it specifies the domain you wish Prosody to serve. -Prosodyctl will help you generate X.509 certificates and keys:+You can perform various sanity checks on the generated configuration+with the @code{prosodyctl check} command.++Prosodyctl will also help you to import certificates from the+@code{letsencrypt} directory so that the @code{prosody} user can access+them. See @url{https://prosody.im/doc/letsencrypt}. @example-prosodyctl cert request example.net+prosodyctl --root cert import /etc/letsencrypt/live @end example The available configuration parameters follow. Each parameter@@ -13898,6 +13903,13 @@ paths in order. See @url{http://prosody.im/doc/plugins_directory}. Defaults to @samp{()}. @end deftypevr +@deftypevr {@code{prosody-configuration} parameter} file-name certificates+Every virtual host and component needs a certificate so that clients and+servers can securely verify its identity. Prosody will automatically load+certificates/keys from the directory specified here.+Defaults to @samp{"/etc/prosody/certs"}.+@end deftypevr+ @deftypevr {@code{prosody-configuration} parameter} string-list admins This is a list of accounts that are admins for the server. Note that you must create the accounts separately. See @url{http://prosody.im/doc/admins} and@@ -13950,14 +13962,12 @@ Available @code{ssl-configuration} fields are: This determines what handshake to use. @end deftypevr -@deftypevr {@code{ssl-configuration} parameter} file-name key-Path to your private key file, relative to @code{/etc/prosody}.-Defaults to @samp{"/etc/prosody/certs/key.pem"}.+@deftypevr {@code{ssl-configuration} parameter} maybe-file-name key+Path to your private key file. @end deftypevr -@deftypevr {@code{ssl-configuration} parameter} file-name certificate-Path to your certificate file, relative to @code{/etc/prosody}.-Defaults to @samp{"/etc/prosody/certs/cert.pem"}.+@deftypevr {@code{ssl-configuration} parameter} maybe-file-name certificate+Path to your certificate file. @end deftypevr @deftypevr {@code{ssl-configuration} parameter} file-name capathdiff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scmindex 715d6181f..526ad5a41 100644--- a/gnu/services/messaging.scm+++ b/gnu/services/messaging.scm@@ -160,7 +160,7 @@ (define (module-list? val) (string-list? val)) (define (serialize-module-list field-name val)- (serialize-string-list field-name (cons "posix" val)))+ (serialize-string-list field-name val)) (define-maybe module-list) (define (file-name? val)@@ -203,12 +203,12 @@ just joined the room.")) "This determines what handshake to use.") (key- (file-name "/etc/prosody/certs/key.pem")- "Path to your private key file, relative to @code{/etc/prosody}.")+ (maybe-file-name 'disabled)+ "Path to your private key file.") (certificate- (file-name "/etc/prosody/certs/cert.pem")- "Path to your certificate file, relative to @code{/etc/prosody}.")+ (maybe-file-name 'disabled)+ "Path to your certificate file.") (capath (file-name "/etc/ssl/certs")@@ -271,7 +271,9 @@ can create such a file with: "tls" "dialback" "disco"+ "carbons" "private"+ "blocklist" "vcard" "version" "uptime"@@ -321,6 +323,13 @@ can create such a file with: paths in order. See @url{http://prosody.im/doc/plugins_directory}." global) + (certificates+ (file-name "/etc/prosody/certs")+ "Every virtual host and component needs a certificate so that clients and+servers can securely verify its identity. Prosody will automatically load+certificates/keys from the directory specified here."+ global)+ (admins (string-list '()) "This is a list of accounts that are admins for the server. Note that you-- 2.15.0
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 4/6] services: prosody: Add support for http-external-url.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-4-clement@lassieur.org
* doc/guix.texi (Messaging Services): Update accordingly.* gnu/services/messaging.scm (prosody-configuration)[http-external-url]: Newfield.--- doc/guix.texi | 13 ++++++++++--- gnu/services/messaging.scm | 8 ++++++++ 2 files changed, 18 insertions(+), 3 deletions(-)
Toggle diff (66 lines)diff --git a/doc/guix.texi b/doc/guix.texiindex 05aca9186..ad206b535 100644--- a/doc/guix.texi+++ b/doc/guix.texi@@ -14079,6 +14079,13 @@ File to write pid in. See @url{http://prosody.im/doc/modules/mod_posix}. Defaults to @samp{"/var/run/prosody/prosody.pid"}. @end deftypevr +@deftypevr {@code{prosody-configuration} parameter} maybe-string http-external-url+Some modules expose their own URL in various ways. This URL is built+from the protocol, host and port used. If Prosody sits behind a proxy, the+public URL will be @code{http-external-url} instead. See+@url{https://prosody.im/doc/http#external_url}.+@end deftypevr+ @deftypevr {@code{prosody-configuration} parameter} virtualhost-configuration-list virtualhosts A host in Prosody is a domain on which user accounts can be created. For example if you want your users to have addresses like@@ -14095,7 +14102,7 @@ See @url{http://prosody.im/doc/configure#virtual_host_settings}. Available @code{virtualhost-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus: @deftypevr {@code{virtualhost-configuration} parameter} string domain Domain you wish Prosody to serve. @end deftypevr@@ -14117,7 +14124,7 @@ Defaults to @samp{()}. Available @code{int-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus: @deftypevr {@code{int-component-configuration} parameter} string hostname Hostname of the component. @end deftypevr@@ -14170,7 +14177,7 @@ Defaults to @samp{()}. Available @code{ext-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus: @deftypevr {@code{ext-component-configuration} parameter} string component-secret Password which the component will use to log in. @end deftypevrdiff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scmindex 526ad5a41..5a7b19605 100644--- a/gnu/services/messaging.scm+++ b/gnu/services/messaging.scm@@ -436,6 +436,14 @@ by the GuixSD Prosody Service. See @url{http://prosody.im/doc/logging}." "File to write pid in. See @url{http://prosody.im/doc/modules/mod_posix}." global) + (http-external-url+ (maybe-string 'disabled)+ "Some modules expose their own URL in various ways. This URL is built+from the protocol, host and port used. If Prosody sits behind a proxy, the+public URL will be @code{http-external-url} instead. See+@url{https://prosody.im/doc/http#external_url}."+ common)+ (virtualhosts (virtualhost-configuration-list (list (virtualhost-configuration-- 2.15.0
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 5/6] services: prosody: Add support for http-max-content-size.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-5-clement@lassieur.org
* doc/guix.texi (Messaging Services): Update accordingly.* gnu/services/messaging.scm (prosody-configuration)[http-max-content-size]:New field.--- doc/guix.texi | 10 +++++++--- gnu/services/messaging.scm | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-)
Toggle diff (60 lines)diff --git a/doc/guix.texi b/doc/guix.texiindex ad206b535..957062e06 100644--- a/doc/guix.texi+++ b/doc/guix.texi@@ -14079,6 +14079,10 @@ File to write pid in. See @url{http://prosody.im/doc/modules/mod_posix}. Defaults to @samp{"/var/run/prosody/prosody.pid"}. @end deftypevr +@deftypevr {@code{prosody-configuration} parameter} maybe-non-negative-integer http-max-content-size+Maximum allowed size of the HTTP body (in bytes).+@end deftypevr+ @deftypevr {@code{prosody-configuration} parameter} maybe-string http-external-url Some modules expose their own URL in various ways. This URL is built from the protocol, host and port used. If Prosody sits behind a proxy, the@@ -14102,7 +14106,7 @@ See @url{http://prosody.im/doc/configure#virtual_host_settings}. Available @code{virtualhost-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus: @deftypevr {@code{virtualhost-configuration} parameter} string domain Domain you wish Prosody to serve. @end deftypevr@@ -14124,7 +14128,7 @@ Defaults to @samp{()}. Available @code{int-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus: @deftypevr {@code{int-component-configuration} parameter} string hostname Hostname of the component. @end deftypevr@@ -14177,7 +14181,7 @@ Defaults to @samp{()}. Available @code{ext-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus: @deftypevr {@code{ext-component-configuration} parameter} string component-secret Password which the component will use to log in. @end deftypevrdiff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scmindex 5a7b19605..f348ca1a3 100644--- a/gnu/services/messaging.scm+++ b/gnu/services/messaging.scm@@ -436,6 +436,11 @@ by the GuixSD Prosody Service. See @url{http://prosody.im/doc/logging}." "File to write pid in. See @url{http://prosody.im/doc/modules/mod_posix}." global) + (http-max-content-size+ (maybe-non-negative-integer 'disabled)+ "Maximum allowed size of the HTTP body (in bytes)."+ common)+ (http-external-url (maybe-string 'disabled) "Some modules expose their own URL in various ways. This URL is built-- 2.15.0
C
C
Clément Lassieur wrote on 24 Nov 2017 17:52
[PATCH 6/6] services: prosody: Allow to add raw content to the config file.
(address . 29425@debbugs.gnu.org)
20171124165227.5743-6-clement@lassieur.org
* doc/guix.texi (Messaging Services): Update accordingly.* gnu/services/messaging.scm (prosody-configuration)[raw-content]: New field.(raw-content?, serialize-raw-content): New procedures.--- doc/guix.texi | 10 +++++++--- gnu/services/messaging.scm | 13 ++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-)
Toggle diff (75 lines)diff --git a/doc/guix.texi b/doc/guix.texiindex 957062e06..dc2da7a45 100644--- a/doc/guix.texi+++ b/doc/guix.texi@@ -14106,7 +14106,7 @@ See @url{http://prosody.im/doc/configure#virtual_host_settings}. Available @code{virtualhost-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus: @deftypevr {@code{virtualhost-configuration} parameter} string domain Domain you wish Prosody to serve. @end deftypevr@@ -14128,7 +14128,7 @@ Defaults to @samp{()}. Available @code{int-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus: @deftypevr {@code{int-component-configuration} parameter} string hostname Hostname of the component. @end deftypevr@@ -14181,7 +14181,7 @@ Defaults to @samp{()}. Available @code{ext-component-configuration} fields are: -all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, plus:+all these @code{prosody-configuration} fields: @code{admins}, @code{use-libevent?}, @code{modules-enabled}, @code{modules-disabled}, @code{groups-file}, @code{allow-registration?}, @code{ssl}, @code{c2s-require-encryption?}, @code{s2s-require-encryption?}, @code{s2s-secure-auth?}, @code{s2s-insecure-domains}, @code{s2s-secure-domains}, @code{authentication}, @code{log}, @code{http-max-content-size}, @code{http-external-url}, @code{raw-content}, plus: @deftypevr {@code{ext-component-configuration} parameter} string component-secret Password which the component will use to log in. @end deftypevr@@ -14201,6 +14201,10 @@ Interface Prosody listens on for component connections. Defaults to @samp{"127.0.0.1"}. @end deftypevr +@deftypevr {@code{prosody-configuration} parameter} maybe-raw-content raw-content+Raw content that will be added to the configuration file.+@end deftypevr+ It could be that you just want to get a @code{prosody.cfg.lua} up and running. In that case, you can pass an @code{opaque-prosody-configuration} record as the value ofdiff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scmindex f348ca1a3..b66d6ddb9 100644--- a/gnu/services/messaging.scm+++ b/gnu/services/messaging.scm@@ -176,6 +176,12 @@ (serialize-string-list field-name val)) (define-maybe file-name) +(define (raw-content? val)+ (not (eq? val 'disabled)))+(define (serialize-raw-content field-name val)+ (format #t "~a" val))+(define-maybe raw-content)+ (define-configuration mod-muc-configuration (name (string "Prosody Chatrooms")@@ -533,7 +539,12 @@ See also @url{http://prosody.im/doc/modules/mod_muc}." (hostname (string (configuration-missing-field 'ext-component 'hostname)) "Hostname of the component."- ext-component)))+ ext-component)++ (raw-content+ (maybe-raw-content 'disabled)+ "Raw content that will be added to the configuration file."+ common))) ;; Serialize Virtualhost line first. (define (serialize-virtualhost-configuration config)-- 2.15.0
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:48
Re: [bug#29425] [PATCH 1/6] gnu: Add lua5.1-bitop.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
87shd373gp.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (2 lines)> * gnu/packages/lua.scm (lua5.1-bitop): New variable.
[...]
Toggle quote (22 lines)> +(define-public lua5.1-bitop> + (package> + (inherit lua5.2-bitop)> + (name "lua5.1-bitop")> + ;; XXX: The arguments field is almost an exact copy of the field in> + ;; "lua5.2-bitop", except for the version string, which was derived from> + ;; "lua-5.2" and now is taken from "lua-5.1". See this discussion for> + ;; context:> + ;; http://lists.gnu.org/archive/html/guix-devel/2017-01/msg02048.html> + (arguments> + `(#:test-target "test"> + #:make-flags> + (list "INSTALL=install -pD"> + (string-append "INSTALLPATH=printf "> + (assoc-ref %outputs "out")> + "/lib/lua/"> + ,(version-major+minor (package-version lua-5.1))> + "/bit/bit.so"))> + #:phases> + (modify-phases %standard-phases> + (delete 'configure))))
Maybe we could write:
(define (lua-bitop lua) (package …))
(define lua5.1-bitop (lua-bitop lua-5.1)) (define lua5.2-bitop (lua-bitop lua-5.2))
?
If not, this patch LGTM.
Thank you,Ludo’.
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:48
Re: [bug#29425] [PATCH 2/6] gnu: prosody: Add lua5.1-bitop to inputs.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
87o9nr73gc.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (4 lines)> It is required for mod_websocket on Lua 5.1 since Prosody 0.10.>> * gnu/packages/messaging.scm (prosody)[inputs]: Add lua5.1-bitop.
OK.
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:49
Re: [bug#29425] [PATCH 3/6] services: prosody: Adapt to Prosody 0.10.0.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
87k1yf73er.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (11 lines)> * doc/guix.texi (Messaging Services): Add "mam" as a module example. Document> 'prosodyctl check'. Replace 'prosodyctl cert request' with 'prosodyctl cert> import'. Regenerate it.> * gnu/services/messaging.scm (serialize-module-list): Remove "posix" from the> default modules list because it is now automatically loaded.> (ssl-configuration)[key, certificate]: Remove them because they are now> automatically located. Fix their docstrings.> (%default-modules-enabled): Add "carbons" and "blocklist".> (prosody-configuration)[certificates]: Set default directory from which> certificates/keys will be automatically located.
LGTM.
I suppose the Prosody update should be applied before this one, right?
Ludo’.
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:50
Re: [bug#29425] [PATCH 4/6] services: prosody: Add support for http-external-url.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
87fu9373e6.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (4 lines)> * doc/guix.texi (Messaging Services): Update accordingly.> * gnu/services/messaging.scm (prosody-configuration)[http-external-url]: New> field.
OK!
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:50
Re: [bug#29425] [PATCH 5/6] services: prosody: Add support for http-max-content-size.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
87bmjr73do.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (4 lines)> * doc/guix.texi (Messaging Services): Update accordingly.> * gnu/services/messaging.scm (prosody-configuration)[http-max-content-size]:> New field.
OK!
L
L
Ludovic Courtès wrote on 24 Nov 2017 22:50
Re: [bug#29425] [PATCH 6/6] services: prosody: Allow to add raw content to the config file.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
877euf73d1.fsf@gnu.org
Clément Lassieur <clement@lassieur.org> skribis:
Toggle quote (4 lines)> * doc/guix.texi (Messaging Services): Update accordingly.> * gnu/services/messaging.scm (prosody-configuration)[raw-content]: New field.> (raw-content?, serialize-raw-content): New procedures.
OK, thanks!
Ludo'.
C
C
Clément Lassieur wrote on 25 Nov 2017 03:20
[PATCH] gnu: Add lua5.1-bitop.
(address . 29425@debbugs.gnu.org)
20171125022054.31445-1-clement@lassieur.org
* gnu/packages/lua.scm (lua5.1-bitop): New variable.(make-lua-bitop): New procedure.--- gnu/packages/lua.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Toggle diff (42 lines)diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scmindex c8bc4ef85..9708b6012 100644--- a/gnu/packages/lua.scm+++ b/gnu/packages/lua.scm@@ -415,9 +415,9 @@ Grammars (PEGs).") (inputs `(("lua", lua-5.2))))) ;; Lua 5.3 is not supported.-(define-public lua5.2-bitop+(define (make-lua-bitop name lua) (package- (name "lua5.2-bitop")+ (name name) (version "1.0.2") (source (origin (method url-fetch)@@ -434,15 +434,21 @@ Grammars (PEGs).") (string-append "INSTALLPATH=printf " (assoc-ref %outputs "out") "/lib/lua/"- ,(version-major+minor (package-version lua-5.2))+ ,(version-major+minor (package-version lua)) "/bit/bit.so")) #:phases (modify-phases %standard-phases (delete 'configure))))- (inputs `(("lua", lua-5.2)))+ (inputs `(("lua", lua))) (home-page "http://bitop.luajit.org/index.html") (synopsis "Bitwise operations on numbers for Lua") (description "Lua BitOp is a C extension module for Lua which adds bitwise operations on numbers.") (license license:expat)))++(define-public lua5.2-bitop+ (make-lua-bitop "lua5.2-bitop" lua-5.2))++(define-public lua5.1-bitop+ (make-lua-bitop "lua5.1-bitop" lua-5.1))-- 2.15.0
C
C
Clément Lassieur wrote on 25 Nov 2017 03:22
Re: [bug#29425] [PATCH 3/6] services: prosody: Adapt to Prosody 0.10.0.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29425@debbugs.gnu.org)
87k1yff66y.fsf@lassieur.org
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (17 lines)> Clément Lassieur <clement@lassieur.org> skribis:>>> * doc/guix.texi (Messaging Services): Add "mam" as a module example. Document>> 'prosodyctl check'. Replace 'prosodyctl cert request' with 'prosodyctl cert>> import'. Regenerate it.>> * gnu/services/messaging.scm (serialize-module-list): Remove "posix" from the>> default modules list because it is now automatically loaded.>> (ssl-configuration)[key, certificate]: Remove them because they are now>> automatically located. Fix their docstrings.>> (%default-modules-enabled): Add "carbons" and "blocklist".>> (prosody-configuration)[certificates]: Set default directory from which>> certificates/keys will be automatically located.>> LGTM.>> I suppose the Prosody update should be applied before this one, right?
Yes. Thank you for the review!
Clément
L
L
Leo Famulari wrote on 25 Nov 2017 17:24
Re: [bug#29425] [PATCH] gnu: Add lua5.1-bitop.
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 29425@debbugs.gnu.org)
20171125162430.GA28445@jasmine.lan
On Sat, Nov 25, 2017 at 03:20:54AM +0100, Clément Lassieur wrote:
Toggle quote (3 lines)> * gnu/packages/lua.scm (lua5.1-bitop): New variable.> (make-lua-bitop): New procedure.
Okay! Please add a comment about why we need all these differentlua-bitops :)
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAloZmT4ACgkQJkb6MLrKfwgZmg//TJOuqaz62hIiczJRx3PKGMMaPo1gcGv6cju5I23z7P4D9ugbxR7QIXSC4Z+5uzf1wDLfzuZ2hBk002QsdWCrbIAxFRntTbxsZX0ZPL/UAataP2QGtWUGyPzz3kBn2S1hv21+Mj8jyMOnFFIoWxnQC/w/uV3pbnCjTjHRSi8a0qLikVLT/OdGLbYkOlTWbs1V4tdiXA1fRz8J5az8yIRZrFjWKKijYwbILDwlRZzD+pFTn4S3Lx+hWHftfXmCHycHidrjCHrdh4hLQ2tCGu8mnxRXFkOv0WsTxuOvuZRiQpStFIrqQlZNti/SLu+vWYcj4vN1JF13k4Su2WuTmuZ3oRiU2B/HHe2BxQ2j2y4WPzgMqr+HDWw3NJe8XWssW7dpCWDantKpQcEqeXeDUQ/wmWnHR44rKsa5qsXJzMJYbdn4XJJ2wHf0MUPsweTG/xv4ohB19i+Inb+eb59qIE03JPiVVp1FJl1r3CuL2+3NMAYg4t6n1WOB2jVXw08m883U9TE40dUvy13wljYpuZOH5EMZC//NueQm+TXYIzQffrPPmF6fv7fi2dQyZ22fxi1gqonF38G7VCwInpzHyVhO0R90W8a61Vv5zQSZv9rj4LUQKw2TXSN/Y/U4xK0ES7beucdxuLgYXxGFHEi3qEdLmcewBfGMFOFUISSAUJWqzuY==jAXG-----END PGP SIGNATURE-----

C
C
Clément Lassieur wrote on 26 Nov 2017 15:18
(name . Leo Famulari)(address . leo@famulari.name)(address . 29425@debbugs.gnu.org)
87h8thf7ij.fsf@lassieur.org
Leo Famulari <leo@famulari.name> writes:
Toggle quote (7 lines)> On Sat, Nov 25, 2017 at 03:20:54AM +0100, Clément Lassieur wrote:>> * gnu/packages/lua.scm (lua5.1-bitop): New variable.>> (make-lua-bitop): New procedure.>> Okay! Please add a comment about why we need all these different> lua-bitops :)
Thank you for the review! I'll put a comment on the patch that updatesProsody to 0.10 saying that Lua 5.1 is still recommended for productionusage.
C
C
Clément Lassieur wrote on 26 Nov 2017 18:12
control message for bug #29425
(address . control@debbugs.gnu.org)
87d145ezh8.fsf@lassieur.org
tags 29425 fixedclose 29425
?
Your comment

This issue is archived.

To comment on this conversation send email to 29425@debbugs.gnu.org