From: Pierre Langlois <pierre.langlois@gmx.com>
To: 59423@debbugs.gnu.org
Subject: bug#59423: Invalid 'location' field generated in dovecot configuration
Date: Sun, 20 Nov 2022 21:53:01 +0000 [thread overview]
Message-ID: <87y1s5wa4p.fsf@gmx.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2959 bytes --]
Hi Guix!
After updating the system, the dovecot service got confused and started
moving around all mailboxes. I looked up the configuration and noticed
strange invalid syntax for the location field:
--8<---------------cut here---------------start------------->8---
location=#<<location> file: "path/to/config.scm" line: 297 column: 20>
--8<---------------cut here---------------end--------------->8---
Because the # character is interpreted as a comment, dovecot doesn't
crash and instead moves mailboxes around in weird ways I don't quite
understand :-/.
This can actually be reproduced locally with the dovecot system test if
one dumps the following expression to check the configuration:
--8<---------------cut here---------------start------------->8---
(format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf"
marionette
#:read 'get-string-all))
--8<---------------cut here---------------end--------------->8---
Giving us the snippets like this in the config:
--8<---------------cut here---------------start------------->8---
$ make check-system TESTS="dovecot" VERBOSE=1
...
namespace inbox {
type=private
separator=
prefix=
location=#<<location> file: "gnu/tests/mail.scm" line: 297 column: 20>
inbox=yes
hidden=no
list=yes
subscriptions=yes
mailbox "Drafts" {
auto=no
special_use=\Drafts
}
mailbox "Junk" {
auto=no
special_use=\Junk
}
mailbox "Trash" {
auto=no
special_use=\Trash
}
mailbox "Sent" {
auto=no
special_use=\Sent
}
mailbox "Sent Messages" {
auto=no
special_use=\Sent
}
mailbox "Drafts" {
auto=no
special_use=\Drafts
}
}
...
--8<---------------cut here---------------end--------------->8---
I did a `git bisect` with `guix time-machine` (this tool is invaluable)
and found the issue started with this commit:
--8<---------------cut here---------------start------------->8---
commit 543d971ed2a1d9eb934af1f51930741d7cc4e7ef
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri Oct 28 17:06:16 2022 -0400
services: configuration: Re-order generated record fields.
This is so that the first field of the generated record matches the first one
declared, which makes 'define-configuration' record API compatible with
define-record-type* ones.
* gnu/services/configuration.scm (define-configuration-helper): Move the
%location field below the ones declared by the user.
* gnu/services/monitoring.scm (zabbix-front-end-config): Adjust match pattern
accordingly.
--8<---------------cut here---------------end--------------->8---
Sooo, I'm guessing this is something to do with the configuration field
being named "location", and /maybe/ we're patching it with the origin
location of the configuration, something like that? I don't understand
how this works well enough to be able to thing of any fixes.
Thanks,
Pierre
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
next reply other threads:[~2022-11-20 22:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-20 21:53 Pierre Langlois [this message]
2022-11-22 8:10 ` bug#59423: Invalid 'location' field generated in dovecot configuration Ludovic Courtès
2022-11-25 15:36 ` Maxim Cournoyer
2022-11-25 20:19 ` Pierre Langlois
2022-11-25 19:17 ` mirai
2022-11-25 20:06 ` Maxim Cournoyer
2022-11-25 20:25 ` Pierre Langlois
2022-11-25 20:50 ` Pierre Langlois
2022-11-25 21:09 ` Pierre Langlois
2022-11-26 2:54 ` Maxim Cournoyer
2022-11-26 19:32 ` Pierre Langlois
2022-11-27 2:33 ` Maxim Cournoyer
2022-11-28 15:01 ` Ludovic Courtès
2022-11-28 20:00 ` Maxim Cournoyer
2022-11-28 21:33 ` Ludovic Courtès
2022-11-29 1:58 ` Maxim Cournoyer
2022-12-02 9:30 ` Ludovic Courtès
2022-12-02 21:18 ` Ludovic Courtès
2022-12-03 3:05 ` Maxim Cournoyer
2022-12-04 16:53 ` Ludovic Courtès
2022-12-04 21:43 ` Maxim Cournoyer
2022-12-06 8:53 ` Ludovic Courtès
2022-12-01 20:29 ` Pierre Langlois
2022-11-26 23:17 ` Fredrik Salomonsson
2022-12-01 21:55 ` Pierre Langlois
2022-12-03 2:24 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1s5wa4p.fsf@gmx.com \
--to=pierre.langlois@gmx.com \
--cc=59423@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).