GNU bug report logs - #29425
Prosody patches

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Fri, 24 Nov 2017 16:49:02 UTC

Severity: normal

Tags: fixed

Done: clement <at> lassieur.org (Clément Lassieur)

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 29425 in the body.
You can then email your comments to 29425 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:49: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. (Fri, 24 Nov 2017 16:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: guix-patches <at> gnu.org
Cc: Rutger Helling <rhelling <at> mykolab.com>
Subject: Prosody patches
Date: Fri, 24 Nov 2017 17:48:27 +0100
Patches 1 to 3 are related to the Prosody 0.10 update.  I'll push them
with 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.




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 1/6] gnu: Add lua5.1-bitop.
Date: Fri, 24 Nov 2017 17:52:22 +0100
* gnu/packages/lua.scm (lua5.1-bitop): New variable.
---
 gnu/packages/lua.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 2/6] gnu: prosody: Add lua5.1-bitop to inputs.
Date: Fri, 24 Nov 2017 17:52:23 +0100
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(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:02 GMT) Full text and rfc822 format available.

Message #14 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 3/6] services: prosody: Adapt to Prosody 0.10.0.
Date: Fri, 24 Nov 2017 17:52:24 +0100
* 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.
---
 doc/guix.texi              | 28 +++++++++++++++++++---------
 gnu/services/messaging.scm | 19 ++++++++++++++-----
 2 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 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 capath
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:03 GMT) Full text and rfc822 format available.

Message #17 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 4/6] services: prosody: Add support for http-external-url.
Date: Fri, 24 Nov 2017 17:52:25 +0100
* doc/guix.texi (Messaging Services): Update accordingly.
* gnu/services/messaging.scm (prosody-configuration)[http-external-url]: New
field.
---
 doc/guix.texi              | 13 ++++++++++---
 gnu/services/messaging.scm |  8 ++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 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 deftypevr
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:03 GMT) Full text and rfc822 format available.

Message #20 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 5/6] services: prosody: Add support for http-max-content-size.
Date: Fri, 24 Nov 2017 17:52:26 +0100
* 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(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 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 deftypevr
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 16:53:04 GMT) Full text and rfc822 format available.

Message #23 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH 6/6] services: prosody: Allow to add raw content to the config
 file.
Date: Fri, 24 Nov 2017 17:52:27 +0100
* 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(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 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 of
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:49:01 GMT) Full text and rfc822 format available.

Message #26 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 1/6] gnu: Add lua5.1-bitop.
Date: Fri, 24 Nov 2017 22:48:38 +0100
Clément Lassieur <clement <at> lassieur.org> skribis:

> * gnu/packages/lua.scm (lua5.1-bitop): New variable.

[...]

> +(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’.




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:49:02 GMT) Full text and rfc822 format available.

Message #29 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 2/6] gnu: prosody: Add lua5.1-bitop to inputs.
Date: Fri, 24 Nov 2017 22:48:51 +0100
Clément Lassieur <clement <at> lassieur.org> skribis:

> 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.




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:50:01 GMT) Full text and rfc822 format available.

Message #32 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 3/6] services: prosody: Adapt to Prosody
 0.10.0.
Date: Fri, 24 Nov 2017 22:49:48 +0100
Clément Lassieur <clement <at> 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?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:51:01 GMT) Full text and rfc822 format available.

Message #35 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 4/6] services: prosody: Add support for
 http-external-url.
Date: Fri, 24 Nov 2017 22:50:09 +0100
Clément Lassieur <clement <at> lassieur.org> skribis:

> * doc/guix.texi (Messaging Services): Update accordingly.
> * gnu/services/messaging.scm (prosody-configuration)[http-external-url]: New
> field.

OK!




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:51:02 GMT) Full text and rfc822 format available.

Message #38 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 5/6] services: prosody: Add support for
 http-max-content-size.
Date: Fri, 24 Nov 2017 22:50:27 +0100
Clément Lassieur <clement <at> lassieur.org> skribis:

> * doc/guix.texi (Messaging Services): Update accordingly.
> * gnu/services/messaging.scm (prosody-configuration)[http-max-content-size]:
> New field.

OK!




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Fri, 24 Nov 2017 21:51:02 GMT) Full text and rfc822 format available.

Message #41 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 6/6] services: prosody: Allow to add raw
 content to the config file.
Date: Fri, 24 Nov 2017 22:50:50 +0100
Clément Lassieur <clement <at> lassieur.org> skribis:

> * 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'.




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Sat, 25 Nov 2017 02:22:01 GMT) Full text and rfc822 format available.

Message #44 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: 29425 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add lua5.1-bitop.
Date: Sat, 25 Nov 2017 03:20:54 +0100
* 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(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Sat, 25 Nov 2017 02:23:02 GMT) Full text and rfc822 format available.

Message #47 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH 3/6] services: prosody: Adapt to Prosody
 0.10.0.
Date: Sat, 25 Nov 2017 03:22:29 +0100
Ludovic Courtès <ludo <at> gnu.org> writes:

> Clément Lassieur <clement <at> 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




Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Sat, 25 Nov 2017 16:25:02 GMT) Full text and rfc822 format available.

Message #50 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH] gnu: Add lua5.1-bitop.
Date: Sat, 25 Nov 2017 11:24:30 -0500
[Message part 1 (text/plain, inline)]
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 :)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29425; Package guix-patches. (Sun, 26 Nov 2017 14:19:01 GMT) Full text and rfc822 format available.

Message #53 received at 29425 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: 29425 <at> debbugs.gnu.org
Subject: Re: [bug#29425] [PATCH] gnu: Add lua5.1-bitop.
Date: Sun, 26 Nov 2017 15:18:28 +0100
Leo Famulari <leo <at> famulari.name> writes:

> 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 updates
Prosody to 0.10 saying that Lua 5.1 is still recommended for production
usage.




Added tag(s) fixed. Request was from clement <at> lassieur.org (Clément Lassieur) to control <at> debbugs.gnu.org. (Sun, 26 Nov 2017 17:13:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 29425 <at> debbugs.gnu.org and Clément Lassieur <clement <at> lassieur.org> Request was from clement <at> lassieur.org (Clément Lassieur) to control <at> debbugs.gnu.org. (Sun, 26 Nov 2017 17:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 25 Dec 2017 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.