* [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
@ 2017-02-26 19:42 Clément Lassieur
2017-02-27 9:06 ` Andy Wingo
0 siblings, 1 reply; 11+ messages in thread
From: Clément Lassieur @ 2017-02-26 19:42 UTC (permalink / raw)
To: guix-devel
* gnu/services/mail.scm (unix-listener-configuration)[path]
(fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
* doc/guix.texi (Mail Services): Document it.
---
doc/guix.texi | 8 ++++----
gnu/services/mail.scm | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index be11096a4..979820300 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10750,8 +10750,8 @@ Defaults to @samp{()}.
Available @code{unix-listener-configuration} fields are:
-@deftypevr {@code{unix-listener-configuration} parameter} file-name path
-The file name on which to listen.
+@deftypevr {@code{unix-listener-configuration} parameter} string path
+The file name on which to listen. This is also used as the section name.
@end deftypevr
@deftypevr {@code{unix-listener-configuration} parameter} string mode
@@ -10772,8 +10772,8 @@ Defaults to @samp{""}.
Available @code{fifo-listener-configuration} fields are:
-@deftypevr {@code{fifo-listener-configuration} parameter} file-name path
-The file name on which to listen.
+@deftypevr {@code{fifo-listener-configuration} parameter} string path
+The file name on which to listen. This is also used as the section name.
@end deftypevr
@deftypevr {@code{fifo-listener-configuration} parameter} string mode
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 30b1672d3..31191a962 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -158,8 +158,8 @@
(define-configuration unix-listener-configuration
(path
- (file-name (configuration-missing-field 'unix-listener 'path))
- "The file name on which to listen.")
+ (string (configuration-missing-field 'unix-listener 'path))
+ "The file name on which to listen. This is also used as the section name.")
(mode
(string "0600")
"The access mode for the socket.")
@@ -177,8 +177,8 @@
(define-configuration fifo-listener-configuration
(path
- (file-name (configuration-missing-field 'fifo-listener 'path))
- "The file name on which to listen.")
+ (string (configuration-missing-field 'fifo-listener 'path))
+ "The file name on which to listen. This is also used as the section name.")
(mode
(string "0600")
"The access mode for the socket.")
--
2.12.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-26 19:42 [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types Clément Lassieur
@ 2017-02-27 9:06 ` Andy Wingo
2017-02-27 9:21 ` Clément Lassieur
0 siblings, 1 reply; 11+ messages in thread
From: Andy Wingo @ 2017-02-27 9:06 UTC (permalink / raw)
To: Clément Lassieur; +Cc: guix-devel
On Sun 26 Feb 2017 20:42, Clément Lassieur <clement@lassieur.org> writes:
> * gnu/services/mail.scm (unix-listener-configuration)[path]
> (fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
> * doc/guix.texi (Mail Services): Document it.
Why's that? Is the extra checking from the file-name type (that the
string start with "/") getting in the way of something?
Andy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 9:06 ` Andy Wingo
@ 2017-02-27 9:21 ` Clément Lassieur
2017-02-27 9:39 ` Clément Lassieur
0 siblings, 1 reply; 11+ messages in thread
From: Clément Lassieur @ 2017-02-27 9:21 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel
Andy Wingo <wingo@igalia.com> writes:
> On Sun 26 Feb 2017 20:42, Clément Lassieur <clement@lassieur.org> writes:
>
>> * gnu/services/mail.scm (unix-listener-configuration)[path]
>> (fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
>> * doc/guix.texi (Mail Services): Document it.
>
> Why's that? Is the extra checking from the file-name type (that the
> string start with "/") getting in the way of something?
Yes, because the path is also used as the section name (see
http://wiki2.dovecot.org/Services#Service_listeners).
So for example, this code (from gnu/services/mail.scm:445) raises an
error because "lmtp" doesn't start with "/":
(service-configuration
(kind "lmtp")
(listeners
(list (unix-listener-configuration (path "lmtp") (mode "0666")))))
I don't understand how it could work before. Maybe the check wasn't
done.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 9:21 ` Clément Lassieur
@ 2017-02-27 9:39 ` Clément Lassieur
2017-02-27 9:59 ` Clément Lassieur
2017-02-27 10:27 ` Andy Wingo
0 siblings, 2 replies; 11+ messages in thread
From: Clément Lassieur @ 2017-02-27 9:39 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel
Clément Lassieur <clement@lassieur.org> writes:
> Andy Wingo <wingo@igalia.com> writes:
>
>> On Sun 26 Feb 2017 20:42, Clément Lassieur <clement@lassieur.org> writes:
>>
>>> * gnu/services/mail.scm (unix-listener-configuration)[path]
>>> (fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
>>> * doc/guix.texi (Mail Services): Document it.
>>
>> Why's that? Is the extra checking from the file-name type (that the
>> string start with "/") getting in the way of something?
>
> Yes, because the path is also used as the section name (see
> http://wiki2.dovecot.org/Services#Service_listeners).
>
> So for example, this code (from gnu/services/mail.scm:445) raises an
> error because "lmtp" doesn't start with "/":
>
> (service-configuration
> (kind "lmtp")
> (listeners
> (list (unix-listener-configuration (path "lmtp") (mode "0666")))))
>
> I don't understand how it could work before. Maybe the check wasn't
> done.
Well, maybe here "lmtp" is not the section name, but the path, relative
to "base_dir". Sould I update the documentation to specify that "path"
may be relative to "base_dir" too?
But anyway there's still the bug, because relative paths don't start
with "/".
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 9:39 ` Clément Lassieur
@ 2017-02-27 9:59 ` Clément Lassieur
2017-02-27 10:27 ` Andy Wingo
1 sibling, 0 replies; 11+ messages in thread
From: Clément Lassieur @ 2017-02-27 9:59 UTC (permalink / raw)
To: guix-devel
* gnu/services/mail.scm (unix-listener-configuration)[path]
(fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
* doc/guix.texi (Mail Services): Document it.
---
doc/guix.texi | 10 ++++++----
gnu/services/mail.scm | 10 ++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index be11096a4..97d04a2b7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10750,8 +10750,9 @@ Defaults to @samp{()}.
Available @code{unix-listener-configuration} fields are:
-@deftypevr {@code{unix-listener-configuration} parameter} file-name path
-The file name on which to listen.
+@deftypevr {@code{unix-listener-configuration} parameter} string path
+Path to the file, relative to @code{base-dir} field. This is also used as
+the section name.
@end deftypevr
@deftypevr {@code{unix-listener-configuration} parameter} string mode
@@ -10772,8 +10773,9 @@ Defaults to @samp{""}.
Available @code{fifo-listener-configuration} fields are:
-@deftypevr {@code{fifo-listener-configuration} parameter} file-name path
-The file name on which to listen.
+@deftypevr {@code{fifo-listener-configuration} parameter} string path
+Path to the file, relative to @code{base-dir} field. This is also used as
+the section name.
@end deftypevr
@deftypevr {@code{fifo-listener-configuration} parameter} string mode
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 30b1672d3..ededb19b1 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -158,8 +158,9 @@
(define-configuration unix-listener-configuration
(path
- (file-name (configuration-missing-field 'unix-listener 'path))
- "The file name on which to listen.")
+ (string (configuration-missing-field 'unix-listener 'path))
+ "Path to the file, relative to @code{base-dir} field. This is also used as
+the section name.")
(mode
(string "0600")
"The access mode for the socket.")
@@ -177,8 +178,9 @@
(define-configuration fifo-listener-configuration
(path
- (file-name (configuration-missing-field 'fifo-listener 'path))
- "The file name on which to listen.")
+ (string (configuration-missing-field 'fifo-listener 'path))
+ "Path to the file, relative to @code{base-dir} field. This is also used as
+the section name.")
(mode
(string "0600")
"The access mode for the socket.")
--
2.11.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 9:39 ` Clément Lassieur
2017-02-27 9:59 ` Clément Lassieur
@ 2017-02-27 10:27 ` Andy Wingo
2017-02-27 11:00 ` Clément Lassieur
1 sibling, 1 reply; 11+ messages in thread
From: Andy Wingo @ 2017-02-27 10:27 UTC (permalink / raw)
To: Clément Lassieur; +Cc: guix-devel
On Mon 27 Feb 2017 10:39, Clément Lassieur <clement@lassieur.org> writes:
> Clément Lassieur <clement@lassieur.org> writes:
>
>> Andy Wingo <wingo@igalia.com> writes:
>>
>>> On Sun 26 Feb 2017 20:42, Clément Lassieur <clement@lassieur.org> writes:
>>>
>>>> * gnu/services/mail.scm (unix-listener-configuration)[path]
>>>> (fifo-listener-configuration)[path]: Change type from 'file-name' to 'string'.
>>>> * doc/guix.texi (Mail Services): Document it.
>>>
>>> Why's that? Is the extra checking from the file-name type (that the
>>> string start with "/") getting in the way of something?
>>
>> Yes, because the path is also used as the section name (see
>> http://wiki2.dovecot.org/Services#Service_listeners).
>>
>> So for example, this code (from gnu/services/mail.scm:445) raises an
>> error because "lmtp" doesn't start with "/":
>>
>> (service-configuration
>> (kind "lmtp")
>> (listeners
>> (list (unix-listener-configuration (path "lmtp") (mode "0666")))))
>>
>> I don't understand how it could work before. Maybe the check wasn't
>> done.
>
> Well, maybe here "lmtp" is not the section name, but the path, relative
> to "base_dir". Sould I update the documentation to specify that "path"
> may be relative to "base_dir" too?
Sure, anyway patch LGTM. Thanks for taking the time to explain.
Andy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 10:27 ` Andy Wingo
@ 2017-02-27 11:00 ` Clément Lassieur
2017-03-11 11:13 ` Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Clément Lassieur @ 2017-02-27 11:00 UTC (permalink / raw)
To: Andy Wingo; +Cc: guix-devel
>> Well, maybe here "lmtp" is not the section name, but the path, relative
>> to "base_dir". Sould I update the documentation to specify that "path"
>> may be relative to "base_dir" too?
>
> Sure, anyway patch LGTM. Thanks for taking the time to explain.
My pleasure! Here is the new version, with updated documentation:
http://lists.gnu.org/archive/html/guix-devel/2017-02/msg01112.html
Clément
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-02-27 11:00 ` Clément Lassieur
@ 2017-03-11 11:13 ` Ludovic Courtès
2017-03-12 0:57 ` Clément Lassieur
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2017-03-11 11:13 UTC (permalink / raw)
To: Clément Lassieur; +Cc: guix-devel
Hi Clément,
Clément Lassieur <clement@lassieur.org> skribis:
>>> Well, maybe here "lmtp" is not the section name, but the path, relative
>>> to "base_dir". Sould I update the documentation to specify that "path"
>>> may be relative to "base_dir" too?
>>
>> Sure, anyway patch LGTM. Thanks for taking the time to explain.
>
> My pleasure! Here is the new version, with updated documentation:
> http://lists.gnu.org/archive/html/guix-devel/2017-02/msg01112.html
Given that Andy okayed the patch, I think you should go ahead and push it!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-03-11 11:13 ` Ludovic Courtès
@ 2017-03-12 0:57 ` Clément Lassieur
2017-03-12 17:01 ` Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Clément Lassieur @ 2017-03-12 0:57 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Hi Ludovic,
> Clément Lassieur <clement@lassieur.org> skribis:
>
> Given that Andy okayed the patch, I think you should go ahead and push it!
Done, applied to master as eba560765a5afccbc5d3b64df410d89b1f79a18e.
There are two other patches concerning services:
http://lists.gnu.org/archive/html/guix-devel/2017-02/msg01154.html
Please, could someone do a review on these? :)
Thanks!
Clément
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-03-12 0:57 ` Clément Lassieur
@ 2017-03-12 17:01 ` Ludovic Courtès
2017-03-12 18:31 ` Clément Lassieur
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2017-03-12 17:01 UTC (permalink / raw)
To: Clément Lassieur; +Cc: guix-devel
Clément Lassieur <clement@lassieur.org> skribis:
> There are two other patches concerning services:
> http://lists.gnu.org/archive/html/guix-devel/2017-02/msg01154.html
>
> Please, could someone do a review on these? :)
I my inbox I have a reply from Andy saying:
> Great patches; will apply when I get to my other machine :)
(Strangely I cannot find this message in the guix-devel archive.)
I’d suggest you ping Andy on IRC or simply push them!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types.
2017-03-12 17:01 ` Ludovic Courtès
@ 2017-03-12 18:31 ` Clément Lassieur
0 siblings, 0 replies; 11+ messages in thread
From: Clément Lassieur @ 2017-03-12 18:31 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
> Clément Lassieur <clement@lassieur.org> skribis:
>
>> There are two other patches concerning services:
>> http://lists.gnu.org/archive/html/guix-devel/2017-02/msg01154.html
>>
>> Please, could someone do a review on these? :)
>
> I my inbox I have a reply from Andy saying:
>
>> Great patches; will apply when I get to my other machine :)
>
> (Strangely I cannot find this message in the guix-devel archive.)
I found it with the search tool:
http://lists.gnu.org/archive/html/guix-devel/2017-03/msg00004.html
It's weird that it wasn't linked to the other messages.
> I’d suggest you ping Andy on IRC or simply push them!
Done! As 56aef188a2a014e254d3c93c8a79cd1fb5a1ece6 and
720cb10c15a4606fe0dc3511db4fef325f3d9dc6.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-03-12 18:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 19:42 [PATCH] services: dovecot: Fix unix_listeners and fifo_listeners path types Clément Lassieur
2017-02-27 9:06 ` Andy Wingo
2017-02-27 9:21 ` Clément Lassieur
2017-02-27 9:39 ` Clément Lassieur
2017-02-27 9:59 ` Clément Lassieur
2017-02-27 10:27 ` Andy Wingo
2017-02-27 11:00 ` Clément Lassieur
2017-03-11 11:13 ` Ludovic Courtès
2017-03-12 0:57 ` Clément Lassieur
2017-03-12 17:01 ` Ludovic Courtès
2017-03-12 18:31 ` Clément Lassieur
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).