From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 17:10:17 2022 Received: (at submit) by debbugs.gnu.org; 20 Nov 2022 22:10:17 +0000 Received: from localhost ([127.0.0.1]:44821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owsVy-0003a2-M1 for submit@debbugs.gnu.org; Sun, 20 Nov 2022 17:10:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:57418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owsVt-0003Zo-M5 for submit@debbugs.gnu.org; Sun, 20 Nov 2022 17:10:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owsVt-0002j4-F2 for bug-guix@gnu.org; Sun, 20 Nov 2022 17:10:09 -0500 Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owsVr-00035X-Lb for bug-guix@gnu.org; Sun, 20 Nov 2022 17:10:09 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MZTmY-1oSgCT2q74-00WXIL for ; Sun, 20 Nov 2022 23:10:03 +0100 User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: bug-guix@gnu.org Subject: Invalid 'location' field generated in dovecot configuration Date: Sun, 20 Nov 2022 21:53:01 +0000 Message-ID: <87y1s5wa4p.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:nd7pv8mQa6ejOAlyHq4v01+BQmKaw5sqFwjHslEtllZcZFEQjSt V5gND+EzPaYbBkkFpTkUww4Lqm0IMYukLAg4/Tq6I920m67rOVkIxflddIOv8kzFnOvpMgN ZEv8/bKcTiL5JYIzpZ4gxQXqCLWoumccSi0sfNCUfkFm3U237UEe0d08/5dE4hejem+32Yr xohGQLC6Wz1xo4Vhpe8ag== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3Du/jBdJXbk=;AdIQVO51jpbmDuth/xzJ/8ccOiH iDffdZYFjKRyr7r9NCycPv1CFErtIVX0mkn3QH4ISeR770QSzg1BMLdSg5/67axhOrNiI8xxC ld69BtUH7IVA4GePny0/pXXALwX3werv9aduP3q6kbd/towsOVv96jX0wHugpjaSliaNA4/8b ySAzzIM4ZAqMNSpfb8Y/gjGHwh9phlXH5In3Vro3tYLeGXFJzTRqgrpiBmQWkTep1GLWkGmEo tTlnrzhuMQe+rD3CkymZSoHHrLbF5P1LYy6YrbFZ7N4yn4n9RjUyfoSWqTNVLFKMp4cf1AIvc 8AC+VtW+LHk5IMmhwpE2J/po+ZPAmoIMLPFioVUvQFyWZWT8M8ezpeEfBu1v09sRa9hFsYKbr s/HLkAUiZih9N4v5CWCLPufFQLf+Xv+ffyQswXvuDqYO3gl/kX980eKj8+zS20JsGio8dClLa 0v3mMKUWHBrjlpOEJDFqTgLbHWsM9Le2wNlCI8arzMn3qr9jOZyLNpR/Duab3macRVNNkTwN6 WcjuC/pwtXuUBW8/NFf1XvZhNeQvrC7fs0vPr4ed0EfgFNnghOYv3Y2X/c6xlpkpIl6tgRKSf V/AxmILIzxpQjFPg1bfNqdnJkrGXWdR+7hhSs8WVkXleNXoXGVEVWy5v7ckRlRUpADDx/KMlZ UYTAJ2KOviamIAxrPGdiSQX+HS235VcPwovxOWy1ieD5MuOrnG6VIk7AvubLYx6cugutpREmx R7r67WVo0RJKB5r45Un9gNefGFpYNvJNcTi9D6TD42V6MAVG9t4EkjBpxSmt7dMDKAe+Yorum JhERkPsZQMhsErXdKgTOaHeb9sz8BDalvgC/jZOy35cRUFsa87Lj2uujQ00a8gVQq3gRjIZ0x DyDTOal+5U3wqj2sIC+BLLEoxtCX8EB1Yrv4FSvaMXyWBmh3Q6NEZ+v0Lbq7vCL1ABDz0ysO7 W3zswqx8T1M2QlZsdH2sTB6rdXY= Received-SPF: pass client-ip=212.227.17.20; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: =2D-8<---------------cut here---------------start------------->8--- location=3D#< file: "path/to/config.scm" line: 297 column: 20> =2D-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: =2D-8<---------------cut here---------------start------------->8--- (format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf" marionette #:read 'get-string-all)) =2D-8<---------------cut here---------------end--------------->8--- Giving us the snippets like this in the config: =2D-8<---------------cut here---------------start------------->8--- $ make check-system TESTS=3D"dovecot" VERBOSE=3D1 ... namespace inbox { type=3Dprivate separator=3D prefix=3D location=3D#< file: "gnu/tests/mail.scm" line: 297 column: 20> inbox=3Dyes hidden=3Dno list=3Dyes subscriptions=3Dyes mailbox "Drafts" { auto=3Dno special_use=3D\Drafts } mailbox "Junk" { auto=3Dno special_use=3D\Junk } mailbox "Trash" { auto=3Dno special_use=3D\Trash } mailbox "Sent" { auto=3Dno special_use=3D\Sent } mailbox "Sent Messages" { auto=3Dno special_use=3D\Sent } mailbox "Drafts" { auto=3Dno special_use=3D\Drafts } } ... =2D-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: =2D-8<---------------cut here---------------start------------->8--- commit 543d971ed2a1d9eb934af1f51930741d7cc4e7ef Author: Maxim Cournoyer Date: Fri Oct 28 17:06:16 2022 -0400 services: configuration: Re-order generated record fields. =20=20=20=20 This is so that the first field of the generated record matches the fir= st one declared, which makes 'define-configuration' record API compatible with define-record-type* ones. =20=20=20=20 * 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 p= attern accordingly. =2D-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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmN6pbcYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UELMIAIk8qZ/lNX/RHsHkjdW1H6uH ZZJ2BqN1XyqqXuILp5csv0MEKE9PlpSezY5/gTn+o09kzLD/fPkKhzGDgVCTmSXV hndYGwP6bXoyUcbxOdoE7HDB1RW+euQUt+oVUQBlgnlLlWp9wR4KjF+P4+QD6ygH VbVyxD93xArLhZe7eq6cLM9hi4wYW9UkV8eGe0SnTkwn9EAZzJpLg+lg/SudnFH+ fwdSUF7lA7HCw8t2+ObFhXuaX1mQOqACy3wQWhKg/00zo0dslu8uwJptltVbuhpX +hKbfxAUOyng+Xu6Ho8JHK2waIl76KoxCuJpLKj/8u4u4dVUSiKp8rKTPchcwfM= =1HH9 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 03:11:15 2022 Received: (at 59423) by debbugs.gnu.org; 22 Nov 2022 08:11:15 +0000 Received: from localhost ([127.0.0.1]:49665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxON9-0002d7-F7 for submit@debbugs.gnu.org; Tue, 22 Nov 2022 03:11:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxON8-0002cu-3O for 59423@debbugs.gnu.org; Tue, 22 Nov 2022 03:11:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxON1-0002c4-Tw; Tue, 22 Nov 2022 03:11:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=TgGoHO2j/IJq0EOmWBk7q6tbus89mid3lqe6f03OuQU=; b=TBPmDSxgY8JufAh1zjJT qdFn97o+jcMqu860U5dd81dgn91TPm/YYsgSHFTb12t9SdWxNFAvRarvmb3rOKk0uU5BvA3cJftbZ cNhWgFxHGbOCwm5PuSxend7rN6HDg/+CwJtBFFPAVLuoEEhBllGVHh695NxPG18wm3utC6Ni3P8Dn yht1WtFpmTC/w7u/MEcgvxEwC7FKI5zi+4OScfa18rGSR7H8ILF0Ajcg66qI1mYFMBpHGippPbpVb kOvEDOKpiqIbsjDYoMiDDs87iraKpYX0r5sNZDbYMjyvRiRy2XGbyKelSAuvCo6xLZyzgERJYyDy0 vElml5Dyy2gEYA==; Received: from [89.207.171.76] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxOMy-00034x-GE; Tue, 22 Nov 2022 03:11:06 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Langlois Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> Date: Tue, 22 Nov 2022 09:10:51 +0100 In-Reply-To: <87y1s5wa4p.fsf@gmx.com> (Pierre Langlois's message of "Sun, 20 Nov 2022 21:53:01 +0000") Message-ID: <87ilj7if3o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423 Cc: 59423@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Pierre Langlois skribis: > 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: > > location=3D#< file: "path/to/config.scm" line: 297 column: 20> > > > 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 :-/. Ouch, sorry about that. > I did a `git bisect` with `guix time-machine` (this tool is invaluable) > and found the issue started with this commit: > > commit 543d971ed2a1d9eb934af1f51930741d7cc4e7ef > Author: Maxim Cournoyer > Date: Fri Oct 28 17:06:16 2022 -0400 > services: configuration: Re-order generated record fields. I believe this is now fixed. Maxim, can you confirm? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 10:36:20 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 15:36:20 +0000 Received: from localhost ([127.0.0.1]:36952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyakW-0005MW-3a for submit@debbugs.gnu.org; Fri, 25 Nov 2022 10:36:20 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:45743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyakU-0005MH-Fw for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 10:36:18 -0500 Received: by mail-qt1-f172.google.com with SMTP id cg5so2694831qtb.12 for <59423@debbugs.gnu.org>; Fri, 25 Nov 2022 07:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=0DyZZiHHNVXT6waezwcnkwlJNQmmkM+C/YEQzQJDBCM=; b=Eh/u5HFx8+Qrza/uTCFWpCT1i8lRaX87HhRNRZ86WBGchhKn1lulVQi46LlH+1P8GB UHoQ4A4045Me3is6T3DCKRORfProwVwl5Qg9GQ5cWz4UxVnClIOuJTpuHOk+8ME/nQ61 Mis3OYRTOzH7dj//Uk0Wwonvch0XQl4KoPElQW1le8e27mSJUNKnSCq9UqXJdjBOLddX +sPFLMd2S6jqPsti80bDBWvGekiYQTZFh+mPEwq3utrAhOTtTePNBezg1YbunDyDtUmL NM2Pxiv7/0RUG6zQTK9ehzSQWStskhe63h4Hg8vZYCXPE2W4SbY1rgWCRqkWKekgtopZ DNVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0DyZZiHHNVXT6waezwcnkwlJNQmmkM+C/YEQzQJDBCM=; b=2LVS4AnpehOtldNt5AhWCicDwj+4D3Xuko8qx4sn/HCAs7cK2x33hWUtF5hwjHfBmq 9H/0Z+iLhxRb69/A0tnLgQXRMQE9SJQyBh6PRU+uFCjYXtCAIRFM/33fgZyCovTic4jV baS69fHPyDWdj13a+VROFltXQARdwd69aubGiEWldT1XgnK1Dz1RT9793R6CMwK92Skv 2r8QjcILc6no5MOn2B36ihMnTRqs8AEpeVTs0W7Q5CifD2iBo6ZagQmiHWG/fccVxk3s yMAyd8LSTLD1RquQoCD1mDkCyt72oGWpkjM5D4C6aQf3Wobi0x2pB3riCR79ayQGhayh NqBw== X-Gm-Message-State: ANoB5pnBwW+vRrW4cjgwhqe0jS/6TXDMM7SIH4ePFbSyC3DD41BzCgQI 9ljJuA1ZAoOrbwziSdLmUB0lCTDyCIPhPw== X-Google-Smtp-Source: AA0mqf50vJqDb5fs14Mfr2zdHIBY4d2WjbW9ewQuLAXo9LJXOqe3Ko1Q9l0d8MthZgPo9y8IImvIqg== X-Received: by 2002:a05:622a:4245:b0:3a6:38d6:8642 with SMTP id cq5-20020a05622a424500b003a638d68642mr27091862qtb.199.1669390572749; Fri, 25 Nov 2022 07:36:12 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a16aa00b006ea7f9d8644sm2857149qkj.96.2022.11.25.07.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 07:36:12 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87ilj7if3o.fsf@gnu.org> Date: Fri, 25 Nov 2022 10:36:11 -0500 In-Reply-To: <87ilj7if3o.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 22 Nov 2022 09:10:51 +0100") Message-ID: <87mt8fjbbo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s writes: > Hi, > > Pierre Langlois skribis: > >> 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: >> >> location=3D#< file: "path/to/config.scm" line: 297 column: 20> >> >> >> 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 :-/. > > Ouch, sorry about that. That's a bad situation indeed, apologies for the breakage! >> I did a `git bisect` with `guix time-machine` (this tool is invaluable) >> and found the issue started with this commit: >> >> commit 543d971ed2a1d9eb934af1f51930741d7cc4e7ef >> Author: Maxim Cournoyer >> Date: Fri Oct 28 17:06:16 2022 -0400 >> services: configuration: Re-order generated record fields. > > I believe this is now fixed. > > Maxim, can you confirm? Pierre, has it resolved on your side? I don't use dovecot myself, and since it doesn't crash, I don't think the dovecot will be an indicator of resolution. At least, the %location field value look normal when excercised at the REPL (#f). --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 14:17:25 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 19:17:25 +0000 Received: from localhost ([127.0.0.1]:37169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyeCT-0006v7-2n for submit@debbugs.gnu.org; Fri, 25 Nov 2022 14:17:25 -0500 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:49772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyeCQ-0006ux-FC for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 14:17:22 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 4D47220822; Fri, 25 Nov 2022 20:17:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 04BAD80098; Fri, 25 Nov 2022 20:17:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EU6y7pqkrj1D; Fri, 25 Nov 2022 20:17:18 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9AF9880097; Fri, 25 Nov 2022 20:17:18 +0100 (CET) Message-ID: <0d61b5ad-1523-3dc3-2014-76f16c7011f9@makinata.eu> Date: Fri, 25 Nov 2022 19:17:18 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: 59423@debbugs.gnu.org Subject: Invalid 'location' field generated in dovecot configuration Content-Language: en-US From: mirai Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I'm also experiencing the same issue (guix describe: 7e0ad0dd0f2829d6f3776648ba7c88acf9888d7a). My guess is that 44554e7133aa60e1b453436be1e80394189cabd9 (which supersedes 543d971ed2a1d9eb934af1f51930741d7cc4e7ef) introduces a '%location' field which conflicts with 'dovecot-configuration' itself also having a field called 'location'. In fact, interesting things happen if you define a configuration with a 'location' field. With 'guix repl': ``` $ guix repl GNU Guile 3.0.8 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guix-user)> (use-modules (gnu services configuration)) (define-configuration FOO-configuration (name (string "aaa") "") (location (string "bbb") "")) ;;; :2:0: warning: shadows previous definition of `%FOO-configuration-location-procedure' at :2:0 ;;; : warning: shadows previous definition of `FOO-configuration-location' at ;;; :2:0: warning: possibly unbound variable `serialize-string' ice-9/boot-9.scm:1685:16: In procedure raise-exception: error: serialize-string: unbound variable Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ``` Code snippet for convenience: ``` (use-modules (gnu services configuration)) (define-configuration FOO-configuration (name (string "aaa") "") (location (string "bbb") "")) ``` From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 15:06:24 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 20:06:24 +0000 Received: from localhost ([127.0.0.1]:37238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyexr-00021a-SL for submit@debbugs.gnu.org; Fri, 25 Nov 2022 15:06:24 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]:33718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyexl-00021J-QV for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 15:06:21 -0500 Received: by mail-qk1-f171.google.com with SMTP id x21so3310850qkj.0 for <59423@debbugs.gnu.org>; Fri, 25 Nov 2022 12:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=IRfsVPmimxuKZ17k7N3BxSjrVMwF3WIkMe2HXum+nE4=; b=CTsob+1YGWViw+PhPIBCiWkgcsg2ksl1goZIGP9khV9Sj61pxY4xQbnVMgvPyveoWr UAF+wraW0V/ge7HUFYR1NIn0WBxHK5xQ2XN5pupRfHQo5NGUIoMS2OQ3AxxDYKfBQo5/ OcsHfZl1f+p3rlqrx48RK50cDRiSXGN8Qr8q5o8EmkIj6q3kX3E8SoPOwGsqomJo6Z8P 9oa1KD34qUP+XICuripbFwI3BC73iNJXFCsSiylySZO6MtodNd4UgxjmECW6ChcE7Wbl 88vc2lQLJ2oVCQGm4pqN9OzOmg27fO7Os8l1vKeWUk6GyZK/UOam+9AJWpUnuJMDvCgl ZLDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IRfsVPmimxuKZ17k7N3BxSjrVMwF3WIkMe2HXum+nE4=; b=d/UxDMYYjG0DqZlUJ8zHFQk3iBw6N06KWoCMYmGBXopwbOC/rp9hq17hRw0v2wf+E2 NiyjlHMZJTgqxZTP2gionAnJHr5btPwuA1YD78PzUkCD0LiAGr9IKDNPoVhpIhdpnUE7 hfN8eMyc0BGcDLzc1RNp08TVVSMG5FyXv87qaKAOCiOQEFAXyqVhutUCWzoPhP+L/091 6jwH0VAVf9d/uxenDMeTom7X6tjrEgZLdHhuMUWQ6NeZIc2WZlp8P+h+lV4Kagb2qm8f ai0CD0ql1IDiC0TW8Z2QN7r4GBtSPNKPls3f79H/MAXFX98uXWcHdfVkI1Iimk20biNL GYVA== X-Gm-Message-State: ANoB5plEb0t2lMuNsBS7bXhSrk9w6m5d0+bKk3J7iBQqp1JrGOSujvht EfgAdFkrnucAcocytDgQEambhq6At906HA== X-Google-Smtp-Source: AA0mqf7ZEiNUWW+yA9t6PJ7flW3Nms27l2bZPFGOsrwfUVIrBjmLz2wqdvCfbvFVWspQewrcDfaoCw== X-Received: by 2002:ae9:f506:0:b0:6ee:3e43:ac50 with SMTP id o6-20020ae9f506000000b006ee3e43ac50mr36396451qkg.359.1669406772013; Fri, 25 Nov 2022 12:06:12 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id d13-20020a05620a240d00b006fab68c7e87sm3322679qkn.70.2022.11.25.12.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 12:06:11 -0800 (PST) From: Maxim Cournoyer To: Pierre Langlois Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> Date: Fri, 25 Nov 2022 15:06:10 -0500 In-Reply-To: <87y1s5wa4p.fsf@gmx.com> (Pierre Langlois's message of "Sun, 20 Nov 2022 21:53:01 +0000") Message-ID: <87v8n2iytp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Pierre, Pierre Langlois writes: > 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: > > location=#< file: "path/to/config.scm" line: 297 column: 20> > > > 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: > > (format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf" > marionette > #:read 'get-string-all)) > > > Giving us the snippets like this in the config: > > $ make check-system TESTS="dovecot" VERBOSE=1 > ... > namespace inbox { > type=private > separator= > prefix= > 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 > } > } I did: $ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system Then: $ guix gc -R /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system | grep dovecot.conf /gnu/store/1ijjsm3sj8v0qj88fhlwqxgdszd6q6h7-dovecot.conf And what I see in this file is now: --8<---------------cut here---------------start------------->8--- namespace inbox { type=private separator= prefix= location= 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--- Notice that location is empty. So that's at least different to your findings, on latest commit. Can you still reproduce? Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 15:25:29 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 20:25:29 +0000 Received: from localhost ([127.0.0.1]:37274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyfGK-0002TG-LI for submit@debbugs.gnu.org; Fri, 25 Nov 2022 15:25:28 -0500 Received: from mout.gmx.net ([212.227.15.19]:45491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyfGI-0002T3-My for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 15:25:27 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MZTmO-1pVA6I0p6s-00WTr1; Fri, 25 Nov 2022 21:25:20 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87ilj7if3o.fsf@gnu.org> <87mt8fjbbo.fsf@gmail.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Fri, 25 Nov 2022 20:19:59 +0000 In-reply-to: <87mt8fjbbo.fsf@gmail.com> Message-ID: <87leny93yp.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:a0ZRwfN6v4JGyDRTgrmfuDXdWlDh0a2tPDUT67pXZpKbtm8Fmru 62hbpeyY/pE5TCpXSIg1tY5tWLsbmq2fBY8N556SvZfCFQ+hInC1m0ckBMYIKm4q11q2CqW jwN1oXDtxgsABvw6El0auHHCzUvptaKDm7jC1VISAlcnlhxY45deqVgNsLlDHooWy0Gyo4X jMbIW1058nLw4bAHCfvlw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:VwDLYiMTymg=;yhCGKmgkF9uqiHjRErSYohqkwZQ umHooq8ccvZJOuJpQFrkx1VYD2l6XGiN0WYNRh+7NC/JKIoYNxdOo3QEHCWGCkT/xB3UfIBtq 39OLcpwCOvWbJrf3eSFxRF24jZVEdVQMYCZPxCLORqaY4/4KMaFOgNuTGwEO+NgJkbzM4qyHh Q6X5nbBTs+jChKtJ60YBvUYQecsceq7bAP5NDH9qtVXaHCmtmHlNIwd6Hhl5ffAcw20lzDGBI ickpNtEfrjKv+LnwuJAIMN67N+FFmL9pU4sUH5Pix+7wJ3e79iac9+rPZE3Lr/2Lw0kKuuoQC kmHnpVwykYXFyzTqcO4CeIu1idPJT80XG+lA8EEat6ywdeUFilMDS37wqovWvLYbbMkwNnlwx MCWTfbVzSKcsFaCu4gbkI/DfOKk0wJB5IEaF8jk6LMM8+Vgy2xCPYRAVZnes2s2l798XQjAYB PyBe4ErtCAPe78089akiB2dMMOirN7/vPgNkZe2dFATA++dwruFD6MgHQYrH4OguyGvBarQtJ 4P2lZbCuCNi8T3cQF3a4ShrYrFsmioitvGjdRPzVRI+H0qdfS90c1p9Jvc2p3+lojTF99+Y6U 8+H9qwRA8xe3k1L3sqimkaaWXJORxjlitpz8yH6CHDTVnqpRir6rZRm2tDldPSGISRCtb43IX YCs2LO6V70QlwkbEVEc0m9Pv0J0CYRT4BT1FNKTMLC58kyd4GTX5fQYvZZx7Rq0CTS8FFa2gH ncjgifxzqHDU1EFJD+Y1H+76rQOS5CTzAmO1fui0wOoWgaGT4ay6cMKozgLHxCpESAYdz6gPB 4tAwtbDNxLEQu8LGEGZwjYhwExuhCyAcq2FW4AkbwmwqvizFPpitOn7QNSeS2nvhHOIds4hfW qeR3ZryUDQHZKe2mmbcvHhX4up8jTvpifzwnEBXSLhPci4rrVxQNZ028WeuSCRhlkgS1w0C9t Gp9F/fYNAX80ced6TcsV8HK/Vh0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 59423@debbugs.gnu.org, Pierre Langlois X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Maxim Cournoyer writes: > Hi, > > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Pierre Langlois skribis: >> >>> 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: >>> >>> location=3D#< file: "path/to/config.scm" line: 297 column: 20> >>> >>> >>> 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 :-/. >> >> Ouch, sorry about that. > > That's a bad situation indeed, apologies for the breakage! No worries! Bugs happen :-). It was confusing but I didn't lose any data, dovecot moved folders to archives so all I had to do was rolling guix back and move folders again. >>> I did a `git bisect` with `guix time-machine` (this tool is invaluable) >>> and found the issue started with this commit: >>> >>> commit 543d971ed2a1d9eb934af1f51930741d7cc4e7ef >>> Author: Maxim Cournoyer >>> Date: Fri Oct 28 17:06:16 2022 -0400 >>> services: configuration: Re-order generated record fields. >> >> I believe this is now fixed. >> >> Maxim, can you confirm? > > Pierre, has it resolved on your side? I don't use dovecot myself, and > since it doesn't crash, I don't think the dovecot will be an indicator > of resolution. I'm afraid I'm still experiencing the issue, I'll follow-up on the other thread. Thanks, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOBJK4YHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UVT8H/iXGWooV5G2/VYLeRY7D0RLt PK34KulPato4uILMYuSVFPEoFmNJUAlHzGpwE+cL9srySrEunjbDYMzxJnNR7AOO fIMp4dCggq4nhGBEoZRp5wus9I6zrv9DXqq/dR1/gs8/d7LwU4QrRj14AIaynvRr tHDPu4lMLfFbc9cuPnO5DBjugeldgHiIxhk5WVk4hOUpT4pNhcxJkhgYKs0Y5ifB Pnu7za2USY1v4VDFI/WHN4bzZssF2FCbq40sZGh4M3I0aow1XkhXDt78kNMXjqHq KqurBFkxq2Gvv++Cty1osrXIrmdLDMV+TuE8fK1xljuNLL3DhNU4ybZISr73cFU= =XWbG -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 15:31:07 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 20:31:07 +0000 Received: from localhost ([127.0.0.1]:37279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyfLj-0002cR-FG for submit@debbugs.gnu.org; Fri, 25 Nov 2022 15:31:07 -0500 Received: from mout.gmx.net ([212.227.17.22]:33683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyfLe-0002bu-Jm for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 15:31:02 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mqs4f-1ocVjO3zmr-00mpSe; Fri, 25 Nov 2022 21:30:52 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Fri, 25 Nov 2022 20:25:33 +0000 In-reply-to: <87v8n2iytp.fsf@gmail.com> Message-ID: <875yf293ph.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:MhMxAPmUE+vOq6oLnO2/ZjQqpv65I7U5r29aRKsdpedF2MWzRsU umHxrN5zZGvn9Hi8yvhtERACQy+DA6NMsdl12ztQaH+yaPiWI+6mvEmULFyKLGEJjYDSXZx 4zcoXzgo71R1oxNGb7xvhPROgbzb4SEfV4RH+Zqu2miYJLw0PrDk6Z98xLKZEtmF6/KlKzi ZzotPjivhldVB76jun9Fg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:crj5rNSqBoA=;GwnUWrq3PfDXvC9S7cwdde9xqX+ 3PfDQ6/5+BHlf9nnGwxcilixGqAXc73PXyJndH5cElBruqHPDPH4AmeT/B6fMaQ87TIoysFrZ rCMsvEIn0FEBDIDtsTn+eo6O9tJRXXq2EsmJ2Lh/sUvw8rHyEcUtWyRHt2spM1tQjBdGGT2c3 4t0jMiie61hrR7MmQE5OlAXPXtpwzpQhLAXhmztjVEuh+IqMyqmRXUB5tA33KYBEhDLAW79Ow aJSz6pSXt4TJJ8N5xyKnZ69qT8lw0daS40jXP/dsadGKWCbJNJuC7ayAesxiI5M4g6R7nGA+A 4IBlvcLgAzuPnF6TBjTWsbD+Sj4ylCmDY1YVZMwS6aXuTUTnaH7NCjttzVLdp0WbQ9GuVNx+D ZqUKcS4n5yq9zDb+fj0uAj+yKRE2U8QH79aMw8rOrwS/1VHfL8u2KB2i5JDP2x+0QFf/d1U64 285vgx5ohh6P4Q8JDzDijWk8Aa7557dNVpBd64xzWdkmudhtJpxS5qJTAqevLwUZad+ZGkpuY XBgMEv50XcFK5o+3GjM8E8PH3cVlQMZ0sKsPElMswe6uJwnn9CevhEuMvQFfZhvs21VNMTg9o NWUjRxjxKH3UMDwT1x/wIeUfA+H/AAQV4jPxdmbecmDmDeZiaasJLj7XhrAlTwjMrl1cMDZu2 v7kzFsrIhkMhSgp6qFkFYxceFXjjnmsXcRUv1R+UykvLzddBEBrKsdtPfW4KqC4Brv6KZAvhT GF0HmoJc3ds43t9eb0hPLKrZEBaaJQuqyNLfNGWRik4wn8jyR0cAxaqxFgDgg99ykoyXewVtN LbYOxGs8k9k8jG4Y2s2ticqFY9yfgXEMuuFlQjqsuTL4arf/ZZNplqwSW3wIn/NAKx7vAFr/d V6h4JZ9aAeB1ewyYmzNDYSqc9iSi6QSVYFECYPtyNQalBY+/M/T/kPpc6dXERLNVUCPVTRPwQ WZPD3X+GnK7TqIrQdpnPHccs7sU= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Maxim Cournoyer writes: > Hi Pierre, > > Pierre Langlois writes: > >> 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: >> >> location=#< file: "path/to/config.scm" line: 297 column: 20> >> >> >> 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: >> >> (format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf" >> marionette >> #:read 'get-string-all)) >> >> >> Giving us the snippets like this in the config: >> >> $ make check-system TESTS="dovecot" VERBOSE=1 >> ... >> namespace inbox { >> type=private >> separator= >> prefix= >> 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 >> } >> } > > I did: > > $ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' > /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system > > Then: > > $ guix gc -R /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system | grep dovecot.conf > /gnu/store/1ijjsm3sj8v0qj88fhlwqxgdszd6q6h7-dovecot.conf Oh that's a nice way of doing this, better than my hack to print the config, I'll have to remember the `guix gc -R' flag. > > And what I see in this file is now: > > namespace inbox { > type=private > separator= > prefix= > location= > 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 > } > } > > Notice that location is empty. So that's at least different to your > findings, on latest commit. Can you still reproduce? Yeah I'm afraid I still see the same issue after a `git pull` just now: --8<---------------cut here---------------start------------->8--- ~/code/guix [env]$ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system ~/code/guix [env]$ guix gc -R /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system | grep dovecot\.conf | xargs grep "^location" location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> --8<---------------cut here---------------end--------------->8--- Have you tried to rebuild from scratch, after a `make clean-go'? When first bisecting this, I was working from the git repo and couldn't reproduce the bug. Then it worked by using `guix time-machine' to bisect rather than work from git. So I'm guessing the change being in a macro, there could be residue .go files that need recompiling? Thanks, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOBJfoYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U3P4H/0ApOSqGrM1iinCzwvVjtgLz kl4wDXn9PMjrKVPrrGLl4qmyg7Oz26WRHWtfXpeXZLOAhhMqoYwKJaaYV2wkhif+ 5NyI9DX/3Z6Z6C5TKjEO8BTU3ou1SC6TEfjHvD1MjGy98Pqz6Ws8y+XvzzgCU2qm MU1zY+0yKNMlbZgdPWFeXUOCiQdBaE+bwKHljz1ISbKvQe/mxFkKhEGHffK0Wav3 8p6Vft96EgBVw9nyk3/FIMv01rRuZlZVjeIwMP8mlu8NNIp/sPKTMlNs+nrdug8c zftEvS+KNGHJqNLiYe8hfardpmbCYTQudi98aGpX2hOrS0QUs2wWGpP+R71moyY= =JqW+ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 15:52:03 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 20:52:03 +0000 Received: from localhost ([127.0.0.1]:37308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyfg2-00038P-WC for submit@debbugs.gnu.org; Fri, 25 Nov 2022 15:52:03 -0500 Received: from mout.gmx.net ([212.227.15.18]:51923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyffx-00037f-GN for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 15:52:01 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MVeI2-1pQCw63VKe-00RWFs; Fri, 25 Nov 2022 21:51:50 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Fri, 25 Nov 2022 20:50:38 +0000 In-reply-to: <875yf293ph.fsf@gmx.com> Message-ID: <87y1ry7o69.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:ojmNOJIiapeCrd75BeRigVaB/qO021BBOIrXlel2s+AwVE4/5iW WMz7tlz/3KTFM2RPRUlX96Qt2Kf4g3eogxWljl6c4u+Mp1RBmhxaV7lnBZCGtsieMdnF8gq uFeZ8MtQ8UKdV8Naf8/yRxuWMr2tBCTG3njF8LguI/PcN8JkiJ1JB9PwXGUJIvJwx/pxNLZ kPcLCwwTT7iAfDMR3UtHQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:+S9kkD9ESF0=;iS0zc4s7lCMJikHQz0kX8ixnkb4 Gr2lZNjAIsaI4tugnyUVOZnRGXY+Y8zthR9gN9akedsYPNzlx4gmQ0r1AD5CW0FOfbm5m8rEj C9KUY7fLKcaOJ53PmZzSp5NAaKERNDkbZNTjKDiXTd1lviR4UmEq3uj5BZOHMBKhqoLckya9b CMJw0W05r/28ZRHJq3ItijSV7s5n5p4WIQAwSR9wL8eQK+6QT+TBqTzV9M3ushHHroHGs2dk2 s8RUoBMQdbnSjP6qsQSPNHNHo5RMLj7pXNn4HgqL0Yglc+V85OsU0FiioKVt1ERYORsZVdHt/ t1FQ+BqQvT/XfJSrK3v+isVW01qeiHi6wI3DTNI7ZwI1zGILs9ubiPgl3TDTSxQTkoUAqoI32 L3RiNGbSB7k6SCSBe4egJpSrAP7R2Omy9YggnU+yqgPIl0cYMcXY8k4Q1vFnQyA/o2zo8ysRt Qf0wzfcxsCgjfDH8CEK4nebZfEovDO1ipTI5aUaC8a4+o7AWbFOJcWw6g3lL3YTujX4FDVc41 DyDzkoicMbqD3LXkhfy5Fm+U0YtReGXlDaoNX4GmoI+lfg8HyNLq4StFD3/DOItZZXss3xK6I 6ICIw5AMEyhDpb2OfL4A1O/CtFl26mFKwNYqX/PNKxuo23Y0/gFsVsTqj4TKR9V8s0UTFrrWD tSQM1eou4tg9APWoHHTZyiTESH9N27KCHMiM+dME++IQRXBQRN/HcOTk3zxobpvce/L3nJjX5 wapgboJA42eki582Cfdrnvz+eQX3GeADgre8LSG+i56cWHSL+Zo/RGmdShCrBfq8+nzQScUVr udESbawKWv6wBCDIh9AOGuKq1inQ9xrSf8z3HuhfDb1Nfk+cw2F7uJVZuR5jkAp6eohpxTtyt wcSXj5+rW9wOE64YSVeKJ+IahcxXjyVeMbtRfAWhmRXEE1dMkl0Q8GcA3awb8EWe1n90Ajmpi 8zj7aFh4ehviQgkrpv9kBDuRcpU= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Pierre Langlois writes: > [[PGP Signed Part:Undecided]] > > Maxim Cournoyer writes: > >> Hi Pierre, >> >> Pierre Langlois writes: >> >>> 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: >>> >>> location=#< file: "path/to/config.scm" line: 297 column: 20> >>> >>> >>> 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: >>> >>> (format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf" >>> marionette >>> #:read 'get-string-all)) >>> >>> >>> Giving us the snippets like this in the config: >>> >>> $ make check-system TESTS="dovecot" VERBOSE=1 >>> ... >>> namespace inbox { >>> type=private >>> separator= >>> prefix= >>> 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 >>> } >>> } >> >> I did: >> >> $ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' >> /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system >> >> Then: >> >> $ guix gc -R /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system | grep dovecot.conf >> /gnu/store/1ijjsm3sj8v0qj88fhlwqxgdszd6q6h7-dovecot.conf > > > > Oh that's a nice way of doing this, better than my hack to print the > config, I'll have to remember the `guix gc -R' flag. > >> >> And what I see in this file is now: >> >> namespace inbox { >> type=private >> separator= >> prefix= >> location= >> 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 >> } >> } >> >> Notice that location is empty. So that's at least different to your >> findings, on latest commit. Can you still reproduce? > > Yeah I'm afraid I still see the same issue after a `git pull` just now: > > ~/code/guix [env]$ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' > /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system > ~/code/guix [env]$ guix gc -R /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system | grep dovecot\.conf | xargs grep "^location" > location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> > > Have you tried to rebuild from scratch, after a `make clean-go'? When > first bisecting this, I was working from the git repo and couldn't > reproduce the bug. Then it worked by using `guix time-machine' to bisect > rather than work from git. > > So I'm guessing the change being in a macro, there could be residue .go > files that need recompiling? Oh, I just realized the change was reverted with 44554e7133aa60e1b453436be1e80394189cabd9, then I'm probably the one who needs to do a `make clean-go' :-). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOBKt4YHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UcaYIAJIqEwxvXPkiVl2zks5tQAVy VQN4pwUJIzycuh/B/kDtxiz83FpMTiJLFQLFYA/tWhiKNIZ/G844RQLpvLeyrWz7 zNfWGufqY5VeVWylsTP4bpsKMD4339Vg/MyCkKcsNioFdyemO80pN8hj6OaIkJtB +m1hMinjUMNbyHtXY6M/Oe7Nx48qeWmyT/VP5t6vQpZuwCXQYFCdzChv5g/ZWBYw 7jM3PsMlRPFeTssYgIsXdOZ/JWX4Hhk0IQ/2tdCO95umT09LNCBQ1vceI0f10XST 49yZvk6cDQO+DnARD30ZYl/AimEdvNZOHTQygGr/VvTYWBybA/hQj8X30TFK5w8= =9zOD -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 16:14:23 2022 Received: (at 59423) by debbugs.gnu.org; 25 Nov 2022 21:14:23 +0000 Received: from localhost ([127.0.0.1]:37322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyg1e-0003dg-IC for submit@debbugs.gnu.org; Fri, 25 Nov 2022 16:14:23 -0500 Received: from mout.gmx.net ([212.227.17.21]:54149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyg1a-0003dR-U8 for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 16:14:21 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N1wpt-1orz6A0fcH-012KoP; Fri, 25 Nov 2022 22:14:11 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Fri, 25 Nov 2022 21:09:49 +0000 In-reply-to: <87y1ry7o69.fsf@gmx.com> Message-ID: <87cz9a7n4y.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:rTRe1Yxs+JvNVo7WagYsJz/k5OeqlkrJJPF7T4/U4dvLvon6cbC WUE+Nd4eEZgCdVk4VfncCiaXY2zNsntjlpB5BP7BhSwK5tpgrVeknkD36PM3LCs9JtIxKNM ex+XfI8S7PvoXqbMu9VhIpakSqf29y77zZ++2IpxN2kHEpSRhYqwK1z/Ub2ax+UuJa8Scxz 6nNJ0OHGsdPBE82CoRgnw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:KwXDDrlOSSk=;a93yPDnX2jP7SVIL3an2LJf11fo RGU8sp+61bwyHOx28VQIB74blQDhYGNRYrFUSNv3ARsfI34RtmCf2MGaCb+4+wZLXRf3C17k+ zdHnRvOpG9RgeZmE+w3kYu3Vv6mpB5QDUKkX+WOjt/a/JazZazm9nMFzeGMvW2LYJ9Afl2sdg xoEhv51DD5GPdBCxPKqJZhV0+q8i5D3dBvjUxqY4iuwmFw2tOBQ5TQnBtndd+12jjpfStb4Il uMp/lPLRsZiIW9PAAQkXj1+YGh2ep99Sk86Q94mx1HecdqxivEfzK6E2WiQnz+b7TurPuOSqu 2t3XQe7G/VSqeSTHvkbB/u2EKq3qCgYo0T6tadDm87NBz1ZowWiTw/h5PaLZyk0h/pjinzqLg KVi75i9Ml56XlGDyrkqi/VeQwmdihb3mFZimyp9dIQHeyqw2gPmZaDebh0yoHnR0xTBKkbJDS cOMBdY/nf9ehRoH/63M+K0GwaFm5fF4cATWI+tB63WUrHtrPWz8bwJHGFVX8Zi+x26G0Nu12x JCTp+zQ8SP+fSKf5VFAxPk6CMBq1rCyKqFEFNlcOgHTiPqZa0NpBM83sy0qCDh4RO1AgclfSX rQ6O/UmehZP+R0thOXz/CK5GAjSZUwG6Ui/5WllEOkjVR77CeuxwCyDr6UAGjl71Zk3DMyAqz 9YsJI+EDRBox41rk1DkQV3nFxYBzjMLmjgN5UeyHfRcaQEjXYkRFGUR2MBYIfVYouRs3itRyM 8RtGPOGoYuaCwi1xxGECIlmAnjTStj5sCZbCK8OJbsHiNBnO4cn85so2NnHd/5IVRfrHEdJMq MuPRmgvz72Bvw0HrpQCC6UrtumuJSQk4VDYgLpSY1BVLJOGbPDodbyKhk/JjROmeN0obQZmfK hfCllLdp9gYpw+nzrtUvAZyPvLQ+xDXOkZ0eXK5yuVWzo3yJnnwX2j6YmMn8hJnYZuO5ns9pX 8g1i/xszWUbQ4i2cL+WvWAhUsZo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Pierre Langlois writes: > [[PGP Signed Part:Undecided]] > > Pierre Langlois writes: > >> [[PGP Signed Part:Undecided]] >> >> Maxim Cournoyer writes: >> >>> Hi Pierre, >>> >>> Pierre Langlois writes: >>> >>>> 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: >>>> >>>> location=#< file: "path/to/config.scm" line: 297 column: 20> >>>> >>>> >>>> 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: >>>> >>>> (format #t "~a\n" (wait-for-file "/etc/dovecot/dovecot.conf" >>>> marionette >>>> #:read 'get-string-all)) >>>> >>>> >>>> Giving us the snippets like this in the config: >>>> >>>> $ make check-system TESTS="dovecot" VERBOSE=1 >>>> ... >>>> namespace inbox { >>>> type=private >>>> separator= >>>> prefix= >>>> 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 >>>> } >>>> } >>> >>> I did: >>> >>> $ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' >>> /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system >>> >>> Then: >>> >>> $ guix gc -R /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system | grep dovecot.conf >>> /gnu/store/1ijjsm3sj8v0qj88fhlwqxgdszd6q6h7-dovecot.conf >> >> >> >> Oh that's a nice way of doing this, better than my hack to print the >> config, I'll have to remember the `guix gc -R' flag. >> >>> >>> And what I see in this file is now: >>> >>> namespace inbox { >>> type=private >>> separator= >>> prefix= >>> location= >>> 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 >>> } >>> } >>> >>> Notice that location is empty. So that's at least different to your >>> findings, on latest commit. Can you still reproduce? >> >> Yeah I'm afraid I still see the same issue after a `git pull` just now: >> >> ~/code/guix [env]$ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' >> /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system >> ~/code/guix [env]$ guix gc -R /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system | grep dovecot\.conf | xargs grep "^location" >> location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> >> >> Have you tried to rebuild from scratch, after a `make clean-go'? When >> first bisecting this, I was working from the git repo and couldn't >> reproduce the bug. Then it worked by using `guix time-machine' to bisect >> rather than work from git. >> >> So I'm guessing the change being in a macro, there could be residue .go >> files that need recompiling? > > Oh, I just realized the change was reverted with > 44554e7133aa60e1b453436be1e80394189cabd9, then I'm probably the one who > needs to do a `make clean-go' :-). I'm afraid I can still reproduce the issue after a fresh rebuild, I can also reproduce it outside of the git checkout: --8<---------------cut here---------------start------------->8--- $ guix describe Generation 1026 Nov 25 2022 20:11:23 (current) guix 7e0ad0d repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 7e0ad0dd0f2829d6f3776648ba7c88acf9888d7a (... snip ...) $ guix gc -R `guix system build -e '(@@ (gnu tests mail) %dovecot-os)'` | grep dovecot\.conf | xargs head -n 20 listen=*,:: dict { } passdb { driver=pam } userdb { driver=passwd override_fields= } plugin { } namespace inbox { type=private separator= prefix= location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> inbox=yes hidden=no list=yes --8<---------------cut here---------------end--------------->8--- Now I'm confused :-/. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOBMB0YHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U4qQIAMj3YRNMbJnjRT3elfLYX98h 6rs3j/wn2aQRyfrXwkpzzqEuiPKkc5PP6BU5o5p0ESlfd8bTwyX/DSiPw0ltaQmu iTqjFPxgv0Cp06aK4HaPceQnrh7flnCPnNA4VW3SgNIiamKcKFhwZLVcv4aDGfsG f8FJd/Lo91akrwqVnAwskaGwiPIBHgz99lVlIGzKTyZl0V70pYpXGt1dHT2uamOW /kr0ssv74tVKNiFQANqB6TfSObZSqg3i+C9A2n9OrVqhLonDTa21fMR7rkvGbA+U qjd3H8JA802E3DG+kSB6x5ylz2epwBKUUATI+iVVbiSVCX2Ft+Hr3fOPY4rypjE= =7Iry -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 21:54:59 2022 Received: (at 59423) by debbugs.gnu.org; 26 Nov 2022 02:54:59 +0000 Received: from localhost ([127.0.0.1]:37580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oylLH-0005b3-15 for submit@debbugs.gnu.org; Fri, 25 Nov 2022 21:54:59 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:44012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oylLE-0005ap-GB for 59423@debbugs.gnu.org; Fri, 25 Nov 2022 21:54:57 -0500 Received: by mail-qt1-f180.google.com with SMTP id a27so3489861qtw.10 for <59423@debbugs.gnu.org>; Fri, 25 Nov 2022 18:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=TpoxdryMtcLsBP8UWA9srG4OEY6EwVy291wH05v/wT0=; b=KWZSzRQb+Q5tKZYuRoXmaEzQQ2SVYJRku3eyVEzRVKduxbX8iBcMlQ4Cg7kaGqtY14 Vd4W4FRLGiVVGz+P1KK+Bo4di+FLFFMk0iVXO6zh+lA+LDkrY6JlWw1QA44l83B6Fgrw SGCB1uPtZiipU/rSdK2Gg6a+Cegq+TwGo9pnne8QqY7RqljMy8yM0PUWNAXVRQmmEDSh Sth69uTSOTfTtt8BvyBMqEHjdl3LQCMOmt6kOhpl144k/5BkzrQlPK9cnsDEFeWEbj1k 7Fwx4ttrfLonikWI4Bdse9oVroWAV47Mg52kYLx/hX/5o5chmvQD0bG9+LZ2qI45JR4C G9xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TpoxdryMtcLsBP8UWA9srG4OEY6EwVy291wH05v/wT0=; b=pdONAn9y7EHh1eCJoyLSTzNQKwTBcvAzNocP0iW/hQnmPMNpoW5ZlrYXlPav/ks4DP i05ic02X0PEz7fL5fOPjw90sPtck5jU5r+8QBK0E2rCXrasA/S6wo/qd/bQd7lLkdCpJ PYb2A4TLTp7BjnheL+xZK1K92kuv2FjjcpfOUIx15dzoQjulYU+XafB5KzsIHXsomNCV I8ucQspytGDS85eM3eRJxOf7LCzPqBKvNVZGQtmVu+zKxje4qePzZuV2x99OkGVZ9bkn j+OjyCzPnApPhkWgOObMgWmDYFTdDQeO4m9LOuM+QMq0nOQsVx6WI3YoVzAkWsVgr4Ui 96sw== X-Gm-Message-State: ANoB5pmXpjOFEAu9cNNKlFJDbtv13IUU95nR7qM6FBL3SMNiV+zQ9s5n ahf+P9l+diZwjZ945zTqcFkHr3tUXyI= X-Google-Smtp-Source: AA0mqf6DaPOSnXUtzS+0l4Pk6J2n0eHI15oPCYesi3Y49exa09wHrU6MQQ4QmYWJMl43qsEaxGfnHw== X-Received: by 2002:ac8:4987:0:b0:3a5:274c:611e with SMTP id f7-20020ac84987000000b003a5274c611emr38188613qtq.143.1669431290781; Fri, 25 Nov 2022 18:54:50 -0800 (PST) Received: from hurd (dsl-154-228.b2b2c.ca. [66.158.154.228]) by smtp.gmail.com with ESMTPSA id bp7-20020a05620a458700b006f956766f76sm3864203qkb.1.2022.11.25.18.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 18:54:50 -0800 (PST) From: Maxim Cournoyer To: Pierre Langlois Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> Date: Fri, 25 Nov 2022 21:54:49 -0500 In-Reply-To: <87cz9a7n4y.fsf@gmx.com> (Pierre Langlois's message of "Fri, 25 Nov 2022 21:09:49 +0000") Message-ID: <87fse6fmrq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Pierre, Pierre Langlois writes: [...] >>>> I did: >>>> >>>> $ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' >>>> /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system >>>> >>>> Then: >>>> >>>> $ guix gc -R /gnu/store/gpl6g2ia84kc41zma7ik9y4p3kik5aiy-system | grep dovecot.conf >>>> /gnu/store/1ijjsm3sj8v0qj88fhlwqxgdszd6q6h7-dovecot.conf OK, after 'make clean-go' and rebuilding everything, I now see the issue with the above: --8<---------------cut here---------------start------------->8--- location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> --8<---------------cut here---------------end--------------->8--- So, that's that. >>> Yeah I'm afraid I still see the same issue after a `git pull` just now: >>> >>> ~/code/guix [env]$ ./pre-inst-env guix system build -e '(@@ (gnu tests mail) %dovecot-os)' >>> /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system >>> ~/code/guix [env]$ guix gc -R >>> /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system | grep >>> dovecot\.conf | xargs grep "^location" >>> location=#< file: "gnu/tests/mail.scm" line: 297 column: 20> >>> >>> Have you tried to rebuild from scratch, after a `make clean-go'? When >>> first bisecting this, I was working from the git repo and couldn't >>> reproduce the bug. Then it worked by using `guix time-machine' to bisect >>> rather than work from git. >>> >>> So I'm guessing the change being in a macro, there could be residue .go >>> files that need recompiling? >> >> Oh, I just realized the change was reverted with >> 44554e7133aa60e1b453436be1e80394189cabd9, then I'm probably the one who >> needs to do a `make clean-go' :-). The change was reinstated as part of the mcron update, in 44554e7133aa60e1b453436be1e80394189cabd9. The bit that seems to cause the issue here (still not clearly understood) is probably this one: --8<---------------cut here---------------start------------->8--- diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 636c49ccba..dacfc52ba9 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -242,17 +242,17 @@ (define-record-type* #,(id #'stem #'< #'stem #'>) stem #,(id #'stem #'make- #'stem) #,(id #'stem #'stem #'?) - (%location #,(id #'stem #'stem #'-location) - (default (and=> (current-source-location) - source-properties->location)) - (innate)) #,@(map (lambda (name getter def) #`(#,name #,getter (default #,def) (sanitize #,(id #'stem #'validate- #'stem #'- name)))) #'(field ...) #'(field-getter ...) - #'(field-default ...))) + #'(field-default ...)) + (%location #,(id #'stem #'stem #'-location) + (default (and=> (current-source-location) + source-properties->location)) + (innate))) (define #,(id #'stem #'stem #'-fields) (list (configuration-field --8<---------------cut here---------------end--------------->8--- Reverting it would likely fix the issue (haven't tried), but it'd be nice to have a clear understanding of what's going on. It may have unmasked a bug waiting to bite. The issue seems to be with the serialization of the object nested in the record. I tried this at the REPL: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,m (gnu services mail) scheme@(gnu services mail)> (namespace-configuration (name "inbox")) $8 = #< name: "inbox" type: "private" separator: "" prefix: "" location: "" inbox?: #f hidden?: #f list?: #t subscriptions?: #t mailboxes: () %location: #f> scheme@(gnu services mail)> (serialize-configuration $8 namespace-configuration-fields) name=inbox type=private separator= prefix= location=#f inbox=no hidden=no list=yes subscriptions=yes $9 = # --8<---------------cut here---------------end--------------->8--- But as you can see, it doesn't reproduce in this environment. I'll keep experimenting. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 14:38:28 2022 Received: (at 59423) by debbugs.gnu.org; 26 Nov 2022 19:38:28 +0000 Received: from localhost ([127.0.0.1]:41481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz10O-0006PM-8Q for submit@debbugs.gnu.org; Sat, 26 Nov 2022 14:38:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:51635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz10K-0006PD-Jk for 59423@debbugs.gnu.org; Sat, 26 Nov 2022 14:38:27 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N4hvb-1or4oy2ENj-011giL; Sat, 26 Nov 2022 20:38:15 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Sat, 26 Nov 2022 19:32:37 +0000 In-reply-to: <87fse6fmrq.fsf@gmail.com> Message-ID: <87cz995wwu.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:Wti0A3CGONpwj3WlJnOvaDerYz4hse28BoD1T6Jz2LNPg2suPIp ZmM9JcvvFfds9sPyKfPD31h9RMVc1NBYcFaO6DsoBvwVxCBrSHKKdQZaBcyq+Ao52cin8GE fyCHlf44O21YrBh2FawyLOq6NhjZylyXRV1me+ribI67UclQF4R7bO+N5fHZlSpj7a+EL7l vfyslS4qjw4TEH5gHgLhw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PiKJvwNLSEE=;1tcZTXfTTDoZHd2hCqVGofjpyKS lRAJ7xkVngIPnG+2XxNzJmiZgmUMn54PESneB0VSPzQnilVywS8yG1pDjyctRt18jpwjQQ4MK zxcYuGfSduuaamiphpC0pesMYZxkKjTkWq4VPAS6CDkED9tKpxiUr1WXOGvHxt0kUbSCpjrFE NgGVtzRIXV61CgjULm7E9lx/u8Hb8K36YyQ1cjNuMnr1jJesHhTMYn+2rxfoRzCZrWhQbeWkH 6OTwXS7enaLy2atpXcN2OAvtWPjIl0xlYe05H6eq6U8KKbNWVgXkL2O4M5aa2L3IBsUODurcx n0e8RDOfh2d2civZNiToj69zCEYe6zjCRhkIHxOo3/MVCnKscJQe5blDBZgdu0T4UlhmDj55E P836jSS2FOq2VTSsbWxXYq4NVzuLTcVbgMRDrppvuyGOKqE+6QJWFa6WtaI4X4j36Vpva/Wj4 KyrSZmNqYKTqITXiS1E7gW/J+A7H8vcHOt38xNA9ilQ8PmUAgmSW+Rou2fy70n/N8BaWerS+o 49HxFt4oISh5cWprDQzOvBOMXEfd9uzg4NVIcUx7iMEdVimFoJkQhBU3sVZsWz12kTFR4hIy+ nAfL7o8dEnBvpm7LvyZfm+cj0vYeChnTsKUfLl5WER+lm2djjFfeOkbgwJGyeV8wBTNQhof3h 0QVxSFTS8yO3TVOShw0S7ydcv2T8s8LTofOVHbs6IuxP9ZbuF6uR0HbEG5w6Ai1xgHGV7J6Jh oewF0WMHAxa/loS/4fiRHypd2yIOYgmCooysK7O3AYse8v/YaA30vEHV4aygmn8MY9tuLwmdq 8WQT+prGf5AmvkAV26Q21A+MJOiEF0JFD4XtGuXYYdkKk0ikeG4kDd0WzJn6+XG7Im37rXVN9 nbGdxQj36Eu1pc/DUmHP0s9HkcgwGHPIS7jFYkH8BQIxak+P3++yxohAUEu4qdvSsJZvFG/sz l8q+xg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Maxim, Maxim Cournoyer writes: [...] >>>> Yeah I'm afraid I still see the same issue after a `git pull` just now: >>>> >>>> ~/code/guix [env]$ ./pre-inst-env guix system build -e '(@@ (gnu tests= mail) %dovecot-os)' >>>> /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system >>>> ~/code/guix [env]$ guix gc -R >>>> /gnu/store/ayfvf5s561q955kv8wrkklrvq3ga3qpy-system | grep >>>> dovecot\.conf | xargs grep "^location" >>>> location=3D#< file: "gnu/tests/mail.scm" line: 297 column: 2= 0> >>>> >>>> Have you tried to rebuild from scratch, after a `make clean-go'? When >>>> first bisecting this, I was working from the git repo and couldn't >>>> reproduce the bug. Then it worked by using `guix time-machine' to bise= ct >>>> rather than work from git. >>>> >>>> So I'm guessing the change being in a macro, there could be residue .go >>>> files that need recompiling? >>> >>> Oh, I just realized the change was reverted with >>> 44554e7133aa60e1b453436be1e80394189cabd9, then I'm probably the one who >>> needs to do a `make clean-go' :-). > > The change was reinstated as part of the mcron update, in > 44554e7133aa60e1b453436be1e80394189cabd9. The bit that seems to cause > the issue here (still not clearly understood) is probably this one: > > diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.= scm > index 636c49ccba..dacfc52ba9 100644 > --- a/gnu/services/configuration.scm > +++ b/gnu/services/configuration.scm > @@ -242,17 +242,17 @@ (define-record-type* #,(id #'stem #'< #'stem #'>) > stem > #,(id #'stem #'make- #'stem) > #,(id #'stem #'stem #'?) > - (%location #,(id #'stem #'stem #'-location) > - (default (and=3D> (current-source-location) > - source-properties->location)) > - (innate)) > #,@(map (lambda (name getter def) > #`(#,name #,getter (default #,def) > (sanitize > #,(id #'stem #'validate- #'stem #'- = name)))) > #'(field ...) > #'(field-getter ...) > - #'(field-default ...))) > + #'(field-default ...)) > + (%location #,(id #'stem #'stem #'-location) > + (default (and=3D> (current-source-location) > + source-properties->location)) > + (innate))) >=20=20 > (define #,(id #'stem #'stem #'-fields) > (list (configuration-field > > > Reverting it would likely fix the issue (haven't tried), but it'd be > nice to have a clear understanding of what's going on. It may have > unmasked a bug waiting to bite. > > The issue seems to be with the serialization of the > object nested in the > record. I tried this at the REPL: > > scheme@(guile-user)> ,m (gnu services mail) > scheme@(gnu services mail)> (namespace-configuration (name "inbox")) > $8 =3D #< name: "inbox" type: "private" separato= r: "" prefix: "" location: "" inbox?: #f hidden?: #f list?: #t subscription= s?: #t mailboxes: () %location: #f> > scheme@(gnu services mail)> (serialize-configuration $8 namespace-configu= ration-fields) > name=3Dinbox > type=3Dprivate > separator=3D > prefix=3D > location=3D#f The location here should probably be empty rather than `#f' no? It looks as though the value is coming from the internal %location, rather than the user-provided location. If the two fields can shadow each other, then indeed, that looks like an existing bug that was exposed by the reordering, rather than a bug with the reorder itself. I'll if I can find anything the macro, it looks quite complex to me :-). > inbox=3Dno > hidden=3Dno > list=3Dyes > subscriptions=3Dyes > $9 =3D # > > But as you can see, it doesn't reproduce in this environment. I'll keep = experimenting. Thanks for looking into this! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOCayEYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UJgsH/1KrMAZoMc0iCSG+uravBtrs PME4RibTpBGu5Wph10vhLpwM/n92SxwKugUFnDebODbbXAD4MpVlB5QeT7YRAIEF ksUg1+lUKhgFAGtQqjLY4HT6QVCgn5mz0srG02ruGl942MIOPjgWN3FdvQyexyz6 wFVep+4i5Ka8wCGUwpYtRGlxOa+vMwc9u8CuSLICjZs1p4YClk3K0z3NxYGJuvWt hR4DSTDAdXkRC9QX81LC6uuj8w6Moq4XuMOlv5oNNAHUAVZQizdE/yKEW+4c7hl9 FWKe6ysEgEloN9UicoPxJRFAiWOL1fP9A2H6Y9fdAauP6yBJJNrMhcyDPwLRW0E= =2/cA -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 18:17:26 2022 Received: (at 59423) by debbugs.gnu.org; 26 Nov 2022 23:17:26 +0000 Received: from localhost ([127.0.0.1]:41662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz4QH-0008Uh-RC for submit@debbugs.gnu.org; Sat, 26 Nov 2022 18:17:26 -0500 Received: from mout01.posteo.de ([185.67.36.65]:43583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz4QF-0008UY-MT for 59423@debbugs.gnu.org; Sat, 26 Nov 2022 18:17:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A6A41240026 for <59423@debbugs.gnu.org>; Sun, 27 Nov 2022 00:17:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669504637; bh=jGtXMyuhW+8mA9zoy1U3tyZ47w0nXKXQTpU6tKmyG70=; h=From:To:Subject:Date:From; b=HFnOpU1ZAW10bYxmVC3B3YiTQkOONyh69eh3/7J804bg+wcAf6ZyKpdEMZkEniwtD 9aO4c/GjeXhnXFcq8yjFGgpRpBWD9XsWEF7gPylnvUkLB6yokTIwR7bjMyaHc8GPNN srrjtFGwMkpzW0Vet2f1bPR0/Av2bLHunqflkZP8eI0bVa7AF7oe/TcutX3cCiCCwW qa8onaNe1IHU6DzisQPdGPdBfgWkGpQz4MrwoJUEqagv5jxkf2IAajWKbSLL0IwmWc FF++r9hCcSfHHk4n8HtSRYC+NL/UZSSqeblJjgLBAcWbh5R2RwwUK+JCGmjgidcqnD KVbEMHRiuPbGg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NKSLL2YZYz9rxN for <59423@debbugs.gnu.org>; Sun, 27 Nov 2022 00:17:13 +0100 (CET) From: Fredrik Salomonsson To: 59423@debbugs.gnu.org Subject: Invalid 'location' field generated in dovecot configuration Date: Sat, 26 Nov 2022 23:17:11 +0000 Message-ID: <878rjxxq4o.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, I think I encountered the same bug when I updated my home rofi service to use a configuration. It also has a `location` entry but it takes an integer. Here is a repro to reproduce it using `guix repl`: scheme@(guix-user)> (use-modules (gnu services configuration)) scheme@(guix-user)> (define (serialize-integer f v) (number->string v)) scheme@(guix-user)> (define-configuration repro-configuration (location (integer 2) "set location")) ;;; :3:0: warning: shadows previous definition of `%repro-configuration-location-procedure' at :3:0 ;;; : warning: shadows previous definition of `repro-configuration-location' at scheme@(guix-user)> (serialize-configuration (repro-configuration) repro-configuration-fields) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure number->string: Wrong type argument in position 1: #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix-user) [1]> ,q scheme@(guix-user)> (repro-configuration) $1 = #< location: 2 %location: #f> Note the warning about location being shadowed. And it looks like %location is trying to use `serialize-integer` but failing as it is #f. Here is what `guix describe` reports on what guix version I'm running: Generation 13 nov 26 2022 15:05:06 (current) guix 68925b5 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 68925b5ee7e0d96b0c84ae98a633eea5097bf511 I hope this helps with debugging this. -- s/Fred[re]+i[ck]+/Fredrik/g From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 21:33:45 2022 Received: (at 59423) by debbugs.gnu.org; 27 Nov 2022 02:33:45 +0000 Received: from localhost ([127.0.0.1]:41768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz7UG-00022h-Dl for submit@debbugs.gnu.org; Sat, 26 Nov 2022 21:33:44 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:41864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz7UC-00022b-5N for 59423@debbugs.gnu.org; Sat, 26 Nov 2022 21:33:43 -0500 Received: by mail-qv1-f53.google.com with SMTP id d13so5189759qvj.8 for <59423@debbugs.gnu.org>; Sat, 26 Nov 2022 18:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=d03yTBxTt/bXODYVZpUz2nfBSwL9TLEVvY/rFuIVMh8=; b=pob8KIQuT8tDlYGkci37nEQaD18kNr1MOUWnK7LrBSz0une3o4+vLluZCBW0Ry/T7X MFoP3p9w3rQfqfjUcstbflIysWk5KxoyPbE3S2ES76nQJ3EE1pQt8//V3zAP5HRd0l6h 0ATilRenrBTMQJfiBcmv7gXLmsNSsCo1R/+2nclDUqjjFD74m5KKH8QrTkKoRhrELDna gVdrP9kU2Th8XfeRLeB+4U9DPJSvikdEN+LR/dkE9cYMSZkXp5i8WGfYMTEm/Ck2cq9z E5DU6amlMtphjHTNo5N72DeXiXt1/kAgHEUGDCcHS71PP28LyhnwqhHrtcml1wKJ/Pyy Db0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=d03yTBxTt/bXODYVZpUz2nfBSwL9TLEVvY/rFuIVMh8=; b=v9zs2II1jyxzWLnBJRF1W8boWYRIaNmy1+l5vieL0Qc/F0oCjzCqOpwJ0vMh2jxyVP WCBo4atd6MMVFEj+z/k8ZXDLVXRSDB8f7NQU5+nRw3qirWRkdMabMEHoQSEpEmz5EtLr xr7R5HQJD0j5o+/tLhf3DX4XRypQVDG2Bna+23kv/buAIJqh0zWnKJz7/IzvwJibUrWX 4i/mICNGwMtvUVf56KWH6F9oypeNK6avWQ6PMIv7X7+cl/oY8XsoXinKpufljxvD3Uhl Ufu0/Xp+nkV+P/fhaXUl3dkVtkaEIEunDaAwse3vwXGMQadfuIylec8xn/YriRwazJLI 1PIg== X-Gm-Message-State: ANoB5pm0GkIK9xPgKxRIJ1GvC3t6Xa1cqI4MjCN7GH9NB23tU9xY7DSt kBPXpJdnGj/EAq2QPZhXNE8= X-Google-Smtp-Source: AA0mqf65xU9M8ryEmAONsdVEMdPcoXHzpdPH4Qkj1sCRFt7l6w1MTsatAoKr7uRmyFayFQnWlzDv3w== X-Received: by 2002:a0c:fec9:0:b0:4c6:91b5:27c3 with SMTP id z9-20020a0cfec9000000b004c691b527c3mr39519275qvs.97.1669516414394; Sat, 26 Nov 2022 18:33:34 -0800 (PST) Received: from hurd (dsl-151-252.b2b2c.ca. [66.158.151.252]) by smtp.gmail.com with ESMTPSA id m17-20020a05620a291100b006fa8299b4d5sm5718338qkp.100.2022.11.26.18.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Nov 2022 18:33:33 -0800 (PST) From: Maxim Cournoyer To: Pierre Langlois Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> Date: Sat, 26 Nov 2022 21:33:32 -0500 In-Reply-To: <87cz995wwu.fsf@gmx.com> (Pierre Langlois's message of "Sat, 26 Nov 2022 19:32:37 +0000") Message-ID: <87o7stw2gz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Pierre, Pierre Langlois writes: > Hi Maxim, > > Maxim Cournoyer writes: [...] >> The change was reinstated as part of the mcron update, in >> 44554e7133aa60e1b453436be1e80394189cabd9. The bit that seems to cause >> the issue here (still not clearly understood) is probably this one: >> >> diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm >> index 636c49ccba..dacfc52ba9 100644 >> --- a/gnu/services/configuration.scm >> +++ b/gnu/services/configuration.scm >> @@ -242,17 +242,17 @@ (define-record-type* #,(id #'stem #'< #'stem #'>) >> stem >> #,(id #'stem #'make- #'stem) >> #,(id #'stem #'stem #'?) >> - (%location #,(id #'stem #'stem #'-location) >> - (default (and=> (current-source-location) >> - source-properties->location)) >> - (innate)) >> #,@(map (lambda (name getter def) >> #`(#,name #,getter (default #,def) >> (sanitize >> #,(id #'stem #'validate- #'stem #'- name)))) >> #'(field ...) >> #'(field-getter ...) >> - #'(field-default ...))) >> + #'(field-default ...)) >> + (%location #,(id #'stem #'stem #'-location) >> + (default (and=> (current-source-location) >> + source-properties->location)) >> + (innate))) >> >> (define #,(id #'stem #'stem #'-fields) >> (list (configuration-field >> >> >> Reverting it would likely fix the issue (haven't tried), but it'd be >> nice to have a clear understanding of what's going on. It may have >> unmasked a bug waiting to bite. >> >> The issue seems to be with the serialization of the >> object nested in the >> record. I tried this at the REPL: >> >> scheme@(guile-user)> ,m (gnu services mail) >> scheme@(gnu services mail)> (namespace-configuration (name "inbox")) >> $8 = #< name: "inbox" type: "private" separator: "" prefix: "" location: "" inbox?: #f hidden?: #f list?: #t subscriptions?: #t mailboxes: () %location: #f> >> scheme@(gnu services mail)> (serialize-configuration $8 namespace-configuration-fields) >> name=inbox >> type=private >> separator= >> prefix= >> location=#f > > The location here should probably be empty rather than `#f' no? It looks > as though the value is coming from the internal %location, rather than > the user-provided location. Good eye! Perhaps my earlier simple session was able to reproduce after all! #f sure doesn't read as a successfully serialized value :-). It probably came from %location, which is set to #f when working at the REPL. > If the two fields can shadow each other, > then indeed, that looks like an existing bug that was exposed by the > reordering, rather than a bug with the reorder itself. > > I'll if I can find anything the macro, it looks quite complex to me :-). It's not only to you, if that helps. It's rather... intimidating ^^'. Looking at it again, the problem is not so mysterious after all... The %location field has its accessor set to be: --8<---------------cut here---------------start------------->8--- (%location #,(id #'stem #'stem #'-location) (default (and=> (current-source-location) source-properties->location)) (innate))) --8<---------------cut here---------------end--------------->8--- #,(id #'stem #'stem #'-location) which gets expanded to namespace-configuration-location, which shadows that of the now preceding "location" field. The bug in the previous condition would have been reversed; the source location would have been shadowed by the "location" field value. Ludovic, would you have an idea of where the %location field or its CONFIGURATION-location accessor come into play? I tried tracing it in the source, but I only see it being set and the location being pulled from the sanitizer via "(datum->syntax #'value (syntax-source #'value)" in (gnu services configuration) around line 227, which is the location that would get printed in the error handler CALL-WITH-ERROR-HANDLING from (guix ui): --8<---------------cut here---------------start------------->8--- ((formatted-message? c) (apply report-error (and (error-location? c) (error-location c)) (gettext (formatted-message-string c) %gettext-domain) (formatted-message-arguments c)) (when (fix-hint? c) (display-hint (condition-fix-hint c))) (exit 1)) --8<---------------cut here---------------end--------------->8--- I could be wrong, but since the "location" of a field appears to be an "intrinsic" property rather than something explicitly attached to it, perhaps there's no need for a "location" accessor? Or it could be named differently, such as "%location" to reduce the risk of clashing with user-defined fields. Does that make sense? -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 10:02:06 2022 Received: (at 59423) by debbugs.gnu.org; 28 Nov 2022 15:02:06 +0000 Received: from localhost ([127.0.0.1]:49075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozfe2-0005AN-Bu for submit@debbugs.gnu.org; Mon, 28 Nov 2022 10:02:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozfe0-00059s-2i for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 10:02:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozfdn-0005Vi-45; Mon, 28 Nov 2022 10:01:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=/pcxllbWI2sHAkYTX5VZszQNejpyDsVsJ70b9MlHKI0=; b=NokVW6lFzu9C0nBolwhS DQW8/Pjs1yVj/jo7luuDdJtPoz87Rs0xI4rXGgelXHgS3D72XsJ/Y9poCCb/cwwHhBd7LkYr5Lpnv 9IUn4Q5KqvZizBi4vBAgamCOeulGmk3zVu8B75rDYv1xArkCJqvtoGriB4fCAle3pfNe0OXYmxv3r henOYFAL+9mmu4HupjBoybokBlKWic3ea0M5B9f67A1bsWxpMA+q+DJZIcJ21x05ri/FRjCw4Jusd zMBum1pAfH1Ll+hRBO6hRxIkmNLrMaGI7PwiYrpri7lrf7wiiMj5M/vPzfHWnSO/9yxX+qw4EkAL6 8G/YeXSt5NIr9Q==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozfdm-0003uO-I8; Mon, 28 Nov 2022 10:01:50 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 8 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Miel X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 28 Nov 2022 16:01:47 +0100 In-Reply-To: <87o7stw2gz.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 26 Nov 2022 21:33:32 -0500") Message-ID: <87pmd7ceck.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: >>> The issue seems to be with the serialization of the >>> object nested in the >>> record. I tried this at the REPL: >>> >>> scheme@(guile-user)> ,m (gnu services mail) >>> scheme@(gnu services mail)> (namespace-configuration (name "inbox")) >>> $8 =3D #< name: "inbox" type: "private" separa= tor: "" prefix: "" location: "" inbox?: #f hidden?: #f list?: #t subscripti= ons?: #t mailboxes: () %location: #f> >>> scheme@(gnu services mail)> (serialize-configuration $8 namespace-confi= guration-fields) >>> name=3Dinbox >>> type=3Dprivate >>> separator=3D >>> prefix=3D >>> location=3D#f >> >> The location here should probably be empty rather than `#f' no? It looks >> as though the value is coming from the internal %location, rather than >> the user-provided location. Uh. >> I'll if I can find anything the macro, it looks quite complex to me :-). > > It's not only to you, if that helps. It's rather... intimidating ^^'. [...] > Ludovic, would you have an idea of where the %location field or its > CONFIGURATION-location accessor come into play? We have this: (define-record-type* #,(id #'stem #'< #'stem #'>) stem #,(id #'stem #'make- #'stem) #,(id #'stem #'stem #'?) #,@(map (lambda (name getter def) #`(#,name #,getter (default #,def) (sanitize #,(id #'stem #'validate- #'stem #'- name)))) #'(field ...) #'(field-getter ...) #'(field-default ...)) (%location #,(id #'stem #'stem #'-location) (default (and=3D> (current-source-location) source-properties->location)) (innate))) That generates two accessors called =E2=80=98namespace-configuration-locati= on=E2=80=99. The second one shadows the first one. With commit 44554e7133aa60e1b453436be1e80394189cabd9, the second one is the =E2=80=9Cwr= ong=E2=80=9D one: =E2=80=98namespace-configuration-location=E2=80=99 now returns the =E2= =80=98%location=E2=80=99 field, not the user-specified =E2=80=98location=E2=80=99 field. (I reporte= d that issue in .) What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9? After that we can work on renaming the =E2=80=98location=E2=80=99 field of while preserving backward compatibility. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 15:01:17 2022 Received: (at 59423) by debbugs.gnu.org; 28 Nov 2022 20:01:17 +0000 Received: from localhost ([127.0.0.1]:50583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozkJY-0001pY-PF for submit@debbugs.gnu.org; Mon, 28 Nov 2022 15:01:17 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:42882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozkJW-0001pS-9v for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 15:01:14 -0500 Received: by mail-qt1-f173.google.com with SMTP id h24so7478506qta.9 for <59423@debbugs.gnu.org>; Mon, 28 Nov 2022 12:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GXm4QlejbQ7viDyTi/OclQr2cs7wHrpO0VxGuVNUkn0=; b=JtoDxYiANdDnZVnNzXEudDzPZTCs33wjxugcmccmpJnhNUSf+/myxjt1EwpOntg2ZV dHn/NBvXKxPP+nGUxAC0fvVunDZq8ftNmzhBwAAml7J1JQnJHnav5EdyPRHQfpuulkYT ca01kQmVYaIGMS0Hj352gRmE5BaJdwieU0pZGD2mjjpDT/OdyoI7Hhl+2zuaZ7i7/Bz+ oeUunY7yAPqp7GfBoOLr6xkhDplI3+cCP1zPHkbYFecnAwM+1hyr5cJhpmtrmJ9VN7VF KhyKLlPp+0hSsH/+2FKpaGM06M1qouOsYUFcJ813/MBpmku8P8eYb1N2cLsI5oZf6TxX WSOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GXm4QlejbQ7viDyTi/OclQr2cs7wHrpO0VxGuVNUkn0=; b=miAOkrOEulTrAGFW3t5Db03LQpXLkH3ZoKCDDQMauzEHGrPUTbMOAmFDXfBGpWFpYY TIzITuLlIR1kK4qpyXnDskOA71ejWC4lBdPCu2PMeVe6HqehytIideBEX6ETOCpw0Ogf AgMpS9DZJjoAiDjbdBRS7s12mR24uum9iVmAUqxm+ukH8JooyfRnnEO/9ZIAqFbcWATJ zGqdmDouPYQMXthCuE3F+1AzQkkJYaV1mqkYii5LL2UrW3rIn/1SpK9T6yhVz84jFXmw xMqatOORqLjw3nQeKhFcfu5nGkI7KCjfCi3oxcTGqgPx7PvmAOCOfKdk34XGnRccETH7 Yldw== X-Gm-Message-State: ANoB5pn0H/mc+oYAvUpzZFF6inpUTvdJNdJnCahKWNz92xguZfKjwHK7 9iIRwaANcFU8LcrbhpXvhVZpTeZsmb3Jkw== X-Google-Smtp-Source: AA0mqf5lCX6j2V92t8dvZ4JLA8WU0FbUMKNGVbuDIZvFOQ4I1QpJtvRsP0i7u86Zip9ncO3zqAL6mA== X-Received: by 2002:ac8:7615:0:b0:3a5:1be7:3603 with SMTP id t21-20020ac87615000000b003a51be73603mr49644722qtq.168.1669665659368; Mon, 28 Nov 2022 12:00:59 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1004]) by smtp.gmail.com with ESMTPSA id v2-20020ac873c2000000b003a57f822157sm7346084qtp.90.2022.11.28.12.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 12:00:58 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> Date: Mon, 28 Nov 2022 15:00:58 -0500 In-Reply-To: <87pmd7ceck.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 28 Nov 2022 16:01:47 +0100") Message-ID: <87sfi2svb9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >>>> The issue seems to be with the serialization of the >>>> object nested in the >>>> record. I tried this at the REPL: >>>> >>>> scheme@(guile-user)> ,m (gnu services mail) >>>> scheme@(gnu services mail)> (namespace-configuration (name "inbox")) >>>> $8 =3D #< name: "inbox" type: "private" >>>> separator: "" prefix: "" location: "" inbox?: #f hidden?: #f >>>> list?: #t subscriptions?: #t mailboxes: () %location: #f> >>>> scheme@(gnu services mail)> (serialize-configuration $8 namespace-conf= iguration-fields) >>>> name=3Dinbox >>>> type=3Dprivate >>>> separator=3D >>>> prefix=3D >>>> location=3D#f >>> >>> The location here should probably be empty rather than `#f' no? It looks >>> as though the value is coming from the internal %location, rather than >>> the user-provided location. > > Uh. > >>> I'll if I can find anything the macro, it looks quite complex to me :-). >> >> It's not only to you, if that helps. It's rather... intimidating ^^'. > > [...] > >> Ludovic, would you have an idea of where the %location field or its >> CONFIGURATION-location accessor come into play? > > We have this: > > (define-record-type* #,(id #'stem #'< #'stem #'>) > stem > #,(id #'stem #'make- #'stem) > #,(id #'stem #'stem #'?) > #,@(map (lambda (name getter def) > #`(#,name #,getter (default #,def) > (sanitize > #,(id #'stem #'validate- #'stem #'- name)= ))) > #'(field ...) > #'(field-getter ...) > #'(field-default ...)) > (%location #,(id #'stem #'stem #'-location) > (default (and=3D> (current-source-location) > source-properties->location)) > (innate))) > > That generates two accessors called =E2=80=98namespace-configuration-loca= tion=E2=80=99. > The second one shadows the first one. Yes. You didn't address my question directly though, so let me ask it again: where is this %location field access (named "location") used? It seems nowhere. Thus, we can simply rename it without impacting anything, right (except theoretical usages in the wild, since in the API). > With commit 44554e7133aa60e1b453436be1e80394189cabd9, the second one > is the =E2=80=9Cwrong=E2=80=9D one: =E2=80=98namespace-configuration-loca= tion=E2=80=99 now returns the > =E2=80=98%location=E2=80=99 field, not the user-specified =E2=80=98locati= on=E2=80=99 field. (I > reported that issue in .) > > What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9? No. If we revert something, it won't be that whole commit, but just the moving of the field in the define-configuration produced record. > After that we can work on renaming the =E2=80=98location=E2=80=99 field of > while preserving backward compatibility. Why do we have to massage the user facing record (namespace-configuration) instead of the underlying mechanics? The macro should serve us, not the other way around :-). See my idea to simply rename/remove that automatically produced "location" accessor which appears unused to me. Would that work? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 16:34:08 2022 Received: (at 59423) by debbugs.gnu.org; 28 Nov 2022 21:34:08 +0000 Received: from localhost ([127.0.0.1]:51005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozllP-0002iz-P2 for submit@debbugs.gnu.org; Mon, 28 Nov 2022 16:34:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozllN-0002ib-8Z for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 16:34:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozllH-0005AR-SS; Mon, 28 Nov 2022 16:33:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=tEJNm2VniQSxmGysFu5MdQFhtIPGhTqsOJD9KmtQD48=; b=nxy9QR6oaRtaARbzu280 +gbDk5JSkIcXMcaLiVJEPHffkMzfMHbsS9Y/JS0kmfS/WCCTQ0uXpJ+MjZL8hD9eHfVCBf6Cg5MTO zhUPLq0nFlzscm0B88LPXgcyOMN16qrrPi1cOmd3LY1WXLa8B30kfEMpDS37gHuXxca6aBVw2jHIm tyZs4XQsV9u9r3Sz2wOIKbbo/uYszTkfMuP1ezAYs70AlIMFpgd/aKTXFuZcgH9RoQPgLMr/kqCEe z3yimUJmG7utIjNwCLKt8NV0w5Nsf7CdRJZx76V6rJK4taTn3KM/7FrcPwHzE6mDTVAQfLxPKMyxX VM0KjhY51eoXTw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozllH-0005OA-Fs; Mon, 28 Nov 2022 16:33:59 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 8 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Miel X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 28 Nov 2022 22:33:57 +0100 In-Reply-To: <87sfi2svb9.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 28 Nov 2022 15:00:58 -0500") Message-ID: <8735a2ahmi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Maxim, Maxim Cournoyer skribis: >> We have this: >> >> (define-record-type* #,(id #'stem #'< #'stem #'>) >> stem >> #,(id #'stem #'make- #'stem) >> #,(id #'stem #'stem #'?) >> #,@(map (lambda (name getter def) >> #`(#,name #,getter (default #,def) >> (sanitize >> #,(id #'stem #'validate- #'stem #'- name= )))) >> #'(field ...) >> #'(field-getter ...) >> #'(field-default ...)) >> (%location #,(id #'stem #'stem #'-location) >> (default (and=3D> (current-source-location) >> source-properties->location)) >> (innate))) >> >> That generates two accessors called =E2=80=98namespace-configuration-loc= ation=E2=80=99. >> The second one shadows the first one. > > Yes. You didn't address my question directly though, so let me ask it > again: where is this %location field access (named "location") used? When doing something like this: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,m(gnu services mail) scheme@(gnu services mail)> (namespace-configuration (name "inbox")) $1 =3D #< name: "inbox" type: "private" separator:= "" prefix: "" location: "" inbox?: #f hidden?: #f list?: #t subscriptions?= : #t mailboxes: () %location: #f> scheme@(gnu services mail)> (serialize-configuration $1 namespace-configura= tion-fields) name=3Dinbox type=3Dprivate separator=3D prefix=3D location=3D#f inbox=3Dno hidden=3Dno list=3Dyes subscriptions=3Dyes $2 =3D # --8<---------------cut here---------------end--------------->8--- =E2=80=A6 the field is accessed via its accessor, =E2=80=98name-configuration-location=E2=80=99. We can kinda see it here: --8<---------------cut here---------------start------------->8--- scheme@(gnu services mail)> ,pp namespace-configuration-fields $1 =3D (#< name: name type: string getter: # predicate: # serializer: # default-v= alue-thunk: # doc= umentation: "Name for this namespace."> #< name: type type: string getter: # predicate: # = serializer: # default-value-th= unk: # documentat= ion: "Namespace type: @samp{private}, @samp{shared} or @samp{public}."> [=E2=80=A6] #< name: location type: string getter: # predicate: # serializer: # default-= value-thunk: # do= cumentation: "Physical location of the mailbox. This is in same format as\n= mail_location, which is also the default for it."> [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- Each record has a =E2=80=98getter=E2=80=99 field that= refers to the accessor. In the case of =E2=80=98location=E2=80=99, that=E2=80=99s th= e =E2=80=9Cwrong=E2=80=9D accessor=E2=80=94the accessor of =E2=80=98%location=E2=80=99. I hope that addresses your question! >> What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9? > > No. If we revert something, it won't be that whole commit, but just the > moving of the field in the define-configuration produced record. Yes, that=E2=80=99s what I meant; sorry for the confusion. >> After that we can work on renaming the =E2=80=98location=E2=80=99 field = of >> while preserving backward compatibility. > > Why do we have to massage the user facing record > (namespace-configuration) instead of the underlying mechanics? The > macro should serve us, not the other way around :-). See my idea to > simply rename/remove that automatically produced "location" accessor > which appears unused to me. Would that work? What would need renaming in this case is the accessor, not the field. In you proposed renaming the accessor to *-source-location instead of *-location. That sounds like a good idea to me. We should get unbound-variable warnings in modules that use the previous name, so we=E2=80=99ll see if that breaks something. The only downside is that the convention elsewhere in the code is -location, not -source-location. So the other option is to rename =E2=80=98location=E2=80=99 in . That also has the advantage of being less intrusive. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 28 20:59:06 2022 Received: (at 59423) by debbugs.gnu.org; 29 Nov 2022 01:59:06 +0000 Received: from localhost ([127.0.0.1]:52288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozptq-0001aL-2p for submit@debbugs.gnu.org; Mon, 28 Nov 2022 20:59:06 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:39591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozpto-0001Zx-QA for 59423@debbugs.gnu.org; Mon, 28 Nov 2022 20:59:05 -0500 Received: by mail-qv1-f48.google.com with SMTP id r15so8268342qvm.6 for <59423@debbugs.gnu.org>; Mon, 28 Nov 2022 17:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=F0VQO2J+1f+HDUPuXX2G8oMhZe8Sop2UCOo8Yfeo41Q=; b=SjZpk9qvcBWI6QZRGBUaOSgUxvthT7S7DWFCfg/X6y7sSlmX+EmKywWJH8FHyKqv+d oimBzR4bMMn9bWjTo0hv28/uDk3AqEczm1OsDJh0GPT3ZOUh4KoiPMrH3OgGIiRfnUz0 szCe1oqvT4BuRJMDZXLhAbE0HUMmWTxfiMP7363fEKnW9bldL3EjRO7PvhJA2EeHEZgT Ltth13/i1EY1BfcT9+cU9OqrsNDzlWryQEJOxaVpP18SuFOLA1UEkfLLxZM2FCWlFjP3 pdnVy2JE9Sm7zkMFwwA+uNx2i+yoMQXp96GRVxYNYUT4eBUBFzbtP46QwbvQr9lgMiyz HR7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F0VQO2J+1f+HDUPuXX2G8oMhZe8Sop2UCOo8Yfeo41Q=; b=U1jtIpWbQmeSD72bv+uxyeC6AMQ/RXD0zi1WtpGXldovMrjTogjXmS//QQYVzPRCsu YCmPdOSo/l8E/5kwJI1gCi3UdMZ8OLWOek89Uza1c4eqnJQP8cp6eScmElgA4MOTMBuQ rVsPz49XViABRLlLgsE1QK7xsyDMN3L0sSDEL2103rkZHevT6kGRCbpCKhSsEYb0IjAN j8oc6tbKMWO6TjWG7Wje7EFATREG3GGpEtWKqqMjZo12EFNeoRpAp17YEmIO95aBT8O+ HEpz/sIibe5PDLFNJMc7m2JKatNvM6tYMp2KPAW4getpVLAJqbSHOJ7q2T1Kl10Wjj3V grwA== X-Gm-Message-State: ANoB5pm5W7tjhaIdyws02jSpalvaSrlpNXwe+oqEjHr3jSQE2pdxmbEp WI8XoqPgwHNKdCcKiQycvYMp/0merkOm/g== X-Google-Smtp-Source: AA0mqf4O9gF65BABFTls9ztanA3a/H0qO4fYF5sn7RVEovgv8hLEHnAo7FQLQFmywV7g0lY+2RdFJg== X-Received: by 2002:a05:6214:2ac:b0:4bb:6837:9f8a with SMTP id m12-20020a05621402ac00b004bb68379f8amr32172798qvv.66.1669687139089; Mon, 28 Nov 2022 17:58:59 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1004]) by smtp.gmail.com with ESMTPSA id x26-20020ac8539a000000b00398df095cf5sm7753394qtp.34.2022.11.28.17.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 17:58:58 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> Date: Mon, 28 Nov 2022 20:58:57 -0500 In-Reply-To: <8735a2ahmi.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 28 Nov 2022 22:33:57 +0100") Message-ID: <87a64aseqm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >>> We have this: >>> >>> (define-record-type* #,(id #'stem #'< #'stem #'>) >>> stem >>> #,(id #'stem #'make- #'stem) >>> #,(id #'stem #'stem #'?) >>> #,@(map (lambda (name getter def) >>> #`(#,name #,getter (default #,def) >>> (sanitize >>> #,(id #'stem #'validate- #'stem #'- nam= e)))) >>> #'(field ...) >>> #'(field-getter ...) >>> #'(field-default ...)) >>> (%location #,(id #'stem #'stem #'-location) >>> (default (and=3D> (current-source-location) >>> source-properties->location)) >>> (innate))) >>> >>> That generates two accessors called =E2=80=98namespace-configuration-lo= cation=E2=80=99. >>> The second one shadows the first one. >> >> Yes. You didn't address my question directly though, so let me ask it >> again: where is this %location field access (named "location") used? [...] > =E2=80=A6 the field is accessed via its accessor, > =E2=80=98name-configuration-location=E2=80=99. We can kinda see it here: [...] > Each record has a =E2=80=98getter=E2=80=99 field th= at refers to > the accessor. In the case of =E2=80=98location=E2=80=99, that=E2=80=99s = the =E2=80=9Cwrong=E2=80=9D > accessor=E2=80=94the accessor of =E2=80=98%location=E2=80=99. > > I hope that addresses your question! No :-). I meant why do we even set a default accessor for the *source location* information (in the (gnu service configuration) macros); it's that one that doesn't seem to get used (or I'm blind to it!), at least via this accessor. If it's not strictly necessary, we can stop producing it, and that would solve the problem. Does that make sense? I'm not talking about namespace-location; that one has the right to be! I'm talking about the auto-generated x-location or y-location, where x and y are configuration records that were specified via 'define-configuration'. [...] > What would need renaming in this case is the accessor, not the field. > In you proposed renaming the > accessor to *-source-location instead of *-location. That sounds like a > good idea to me. We should get unbound-variable warnings in modules > that use the previous name, so we=E2=80=99ll see if that breaks something. > > The only downside is that the convention elsewhere in the code is > -location, not -source-location. What about giving it an even more cryptic accessor name like -%location or dropping it entirely as suggested above? > So the other option is to rename =E2=80=98location=E2=80=99 in > . That also has the advantage of being less > intrusive. I don't like that alternative, because 'location' seems likely to be used for future services and reintroduce the same name clash problem. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 15:33:18 2022 Received: (at 59423) by debbugs.gnu.org; 1 Dec 2022 20:33:18 +0000 Received: from localhost ([127.0.0.1]:41763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0qFC-0001V5-A3 for submit@debbugs.gnu.org; Thu, 01 Dec 2022 15:33:18 -0500 Received: from mout.gmx.net ([212.227.15.18]:42669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0qF9-0001Uz-0S for 59423@debbugs.gnu.org; Thu, 01 Dec 2022 15:33:16 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MRTN9-1pNkJi3c7Z-00NTmD; Thu, 01 Dec 2022 21:33:07 +0100 References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration Date: Thu, 01 Dec 2022 20:29:23 +0000 In-reply-to: <87sfi2svb9.fsf@gmail.com> Message-ID: <878rjqg8zh.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:tJelljKDSakBjaEQRTdMmaSdH6iYWM1bnw9YImvHTQadlhAve9K ym4gBFSfVSy0WV3t76WZvXhhROyXTuNQ6HhqNREelVXjJ9u1CXnBEN2BNadm/Ww5nHz2Xye 03+oRXc1ABpzxIzKI4GjuQkl4n1OFxrTyaFDltEQym8dai8+GU6XWIsEgTAOk3h0/Daan8R YE2MPAVjoq8uBziUGytsw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5P+KtyT6yT4=;z2clTlYhPcz65DM47OZVFgWjVfK 6m72hZVa+XySrAPLzkDoCstMh2E5T4YoGbAyWL+Y2hYwe39vLIwog7yekaxAdT5ugyn8dq7q8 ojVv3tZzk9XNMlUz8bRLD9HAPvQLIvOJbn+YieRM/Fv+uAHukTP7WU0QUoWWa3akTJwNR5yMZ UVBZoUTkq8f++VvcHETpvlHlasqnofD/ET6oW1mVAUOS2SGQn0ICIadFdOcU3Bl4Io10HcGP9 csunojbT2rztA+KkMuSlGc59gOIY1ZQ78oOySGx5PXeqoj5l+OITHY3v+pmZ2AwDbZ2YAl83h PAcu0ccQBDbWBY6Io9W6/HGJHH8gAcjwwAqYEr5RKAZbEglsWxMfyCksoyyWyE3YR2NKUZK+X zSUB+IH8wSY0dMoFN2dAIqccFKnPzp8vbSVWzR47p1v6I5WinddXjd9N4pUMCK9apbJ4byw/8 kCkqlX32WLA3kIyHnQvwOQJCMi7q0+zwbsOBdGSP4LjDIITddiqXmd7U9Mnyb5FJaPjNB0SN2 Bozo1wWFBg0dHTv5zkXgcd61hBB0VJVNYpw7OTrmNqL8O2LPmg4PpGucLTcf+U++M6KTITpSm K9WnjiLLqUpA9k6T0gpsCASrs3YMmc5/ikGpVeI3gtKuODgFBPjCBmQ3iJAd3pKAK3yNf2uiy i3dJjMqA4145I7asgpHlUzeYCGgthVm2lhJFQT2rKhFURe1Bk8xNkEDO36yyjsomlDzLhMGkK FrVHrMOJQ3S9d3Q0i8+HUSiTjuuEf7utxNmuaQUfZAWtVse1YQSrsw4PdwqZE4vH75ol+xbmu 8TJjKRqH2S+CAS4k8sULPtDeQJhSiv3PXIEfO5OrHUgVjgOibWdgcOTMjVUvs0e5HpL3dh/Lx Wl9GIx/1BMBiSP1j18c7532SGynYHYamOUMmFddn3O6y8dZM7ZZmh8j426pNniw8tO8Qr1+VO 7qgKvg4KLAxhHTxmc6g0FMmsqSI= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59423 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 59423@debbugs.gnu.org, Pierre Langlois X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Maxim, Maxim Cournoyer writes: > Hi Ludovic, > > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Maxim Cournoyer skribis: >> >>>>> The issue seems to be with the serialization of the >>>>> object nested in the >>>>> record. I tried this at the REPL: >>>>> >>>>> scheme@(guile-user)> ,m (gnu services mail) >>>>> scheme@(gnu services mail)> (namespace-configuration (name "inbox")) >>>>> $8 =3D #< name: "inbox" type: "private" >>>>> separator: "" prefix: "" location: "" inbox?: #f hidden?: #f >>>>> list?: #t subscriptions?: #t mailboxes: () %location: #f> >>>>> scheme@(gnu services mail)> (serialize-configuration $8 namespace-con= figuration-fields) >>>>> name=3Dinbox >>>>> type=3Dprivate >>>>> separator=3D >>>>> prefix=3D >>>>> location=3D#f >>>> >>>> The location here should probably be empty rather than `#f' no? It loo= ks >>>> as though the value is coming from the internal %location, rather than >>>> the user-provided location. >> >> Uh. >> >>>> I'll if I can find anything the macro, it looks quite complex to me :-= ). >>> >>> It's not only to you, if that helps. It's rather... intimidating ^^'. >> >> [...] >> >>> Ludovic, would you have an idea of where the %location field or its >>> CONFIGURATION-location accessor come into play? >> >> We have this: >> >> (define-record-type* #,(id #'stem #'< #'stem #'>) >> stem >> #,(id #'stem #'make- #'stem) >> #,(id #'stem #'stem #'?) >> #,@(map (lambda (name getter def) >> #`(#,name #,getter (default #,def) >> (sanitize >> #,(id #'stem #'validate- #'stem #'- name= )))) >> #'(field ...) >> #'(field-getter ...) >> #'(field-default ...)) >> (%location #,(id #'stem #'stem #'-location) >> (default (and=3D> (current-source-location) >> source-properties->location)) >> (innate))) >> >> That generates two accessors called =E2=80=98namespace-configuration-loc= ation=E2=80=99. >> The second one shadows the first one. > > Yes. You didn't address my question directly though, so let me ask it > again: where is this %location field access (named "location") used? It > seems nowhere. Thus, we can simply rename it without impacting > anything, right (except theoretical usages in the wild, since in the > API). > >> With commit 44554e7133aa60e1b453436be1e80394189cabd9, the second one >> is the =E2=80=9Cwrong=E2=80=9D one: =E2=80=98namespace-configuration-loc= ation=E2=80=99 now returns the >> =E2=80=98%location=E2=80=99 field, not the user-specified =E2=80=98locat= ion=E2=80=99 field. (I >> reported that issue in .) >> >> What do you think of reverting 44554e7133aa60e1b453436be1e80394189cabd9? > > No. If we revert something, it won't be that whole commit, but just the > moving of the field in the define-configuration produced record. If we don't have an obvious solution to the issue and it may need more time, how do you feel about reverting the changes? Unless there is a work around that could be applied until a nicer more permanent solution is found (although those temporary fixes do tend to stick around sometimes :-) ). Thanks, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOJD4IYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UdmEIAKCNdfejC57nQg0O6it/1Dnb lblErihr6bIM/GDJTAztq6gMz5l6uAJDclk29tdNYhX9DYnLq204icIi6AwgOgqO HPMZFulMkyUtpv3DEgw+nnA1Nxc3qvi8Ypar8Di7zGKMWkc+pGYhNNsS4NEDFkNQ 36RP4c3qrwSippf56dLhXnHezrQs7rv5rgBqDXHXQdDFnnr0iqKOELoBzXCLQW1K uMeVlynhXgi3FuabpV2qBK2n3iUWhhuXurxxh89p1vcSGzqCmwk1jIZIUgML/9LK pajihOFEVjIjZpC+SomZwfDCUFVTmoWGnbJolte9Cj59SPcQIRqlNn1i0muv6+U= =YENY -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 17:04:26 2022 Received: (at submit) by debbugs.gnu.org; 1 Dec 2022 22:04:26 +0000 Received: from localhost ([127.0.0.1]:42227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0rf9-0002LG-KY for submit@debbugs.gnu.org; Thu, 01 Dec 2022 17:04:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:42326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0rf2-0002L8-Jh for submit@debbugs.gnu.org; Thu, 01 Dec 2022 17:04:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0rf1-0004FF-Ci for bug-guix@gnu.org; Thu, 01 Dec 2022 17:04:04 -0500 Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0rez-0002Bv-8D for bug-guix@gnu.org; Thu, 01 Dec 2022 17:04:03 -0500 Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N7R1J-1ovHeR3jMD-017kSw; Thu, 01 Dec 2022 23:03:39 +0100 References: <87y1s5wa4p.fsf@gmx.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Pierre Langlois To: bug-guix@gnu.org Subject: Re: Invalid 'location' field generated in dovecot configuration Date: Thu, 01 Dec 2022 21:55:27 +0000 In-reply-to: <87y1s5wa4p.fsf@gmx.com> Message-ID: <87359ydbnq.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:U20m6NpfuUgLXQOr0LbtZ8Kj4/0jgt6sc0FJVgTobIhvMjenYjz P84DDbD/Pzs7SX/Sdq5gqt6wrvlMolOtJXxBmztxRn0JEBP5Xs4tylanLKwP8IXRusI4zDP K5osYkLCOV0MM2OBuv0K8PO0wbKCjJ0oD+4ewJNm45KwRBwETPyYTRYz4IyPDySfhctCGjj WMFCOyUNXnUGbqYQ0Us4w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:/29Eda6/8Vs=;DpIBh18e27D5W+ox4eZ1OYhwTut symV1so9ShGxMTJwbL01/SBjBoO6a/Nc4bbNp4GW2JyXsFCQmyfd9DtJ4SQMRq8Fin2y+xK0J 65PiorbKBJ2cJWCZvwJ4X3QooK7XBslR+UzTIfENVp3Kd/nCfuEJfcImhM2aXNkNAObfgGDO1 nvKrKpUGLIl1G+qRc/PKViEwWRjvf6/MY5BwcH7ojjlRuKjA8jorDaPjXnrtOISXiWnC2bgIK ZkTugieJw8vk0QFez/Twy6eBdH3E4X4eHx7M5Oxkzp9iFUB/x1CubN0pOhbwmXFRFfEFMvS3t pkMpLj/+QsXfVGFq7kVcehp+ixZlZfShsA6kIK5xu2dmSLdn9p4hVWzAZWBVRepw1HJjYjRtX 8Stb5TjxCvQi0up5WhWvzmnlCG/EuMK3lQXF96eKnzCME8BzFiJQJzJEfYoUYxiFmLgZCImYt yWq1PjV4ObMfm9HxEDWzB/vTbyAMP5LmaxDvErpeJU+u5ouM2mR4WtSFG5p81oHqoCoEw/U9e sgKoMsI5yEuNtHB7H5oCfckTXhyNeIP1ktMUCRJZm0xn7HKxOhxuOXL5NZ4wX/LIktT8hbkBj 5Ae+z2kSC58e997bDHEI/Z35JVHk5AYKIaPvvBkXSqybDn11Z7tbx3UkrxsakdluDQF9xJVmy A6n/vs4TY2YnRgxDfIyGreQ8glovKcxfjDhhSWCNcY0GSOCnjtOJ0zCe2zCAY+3pL2v6W4JTA fAn86sVIRc238YG/GYUV50t1GrWAV2+yA33CGjDlZTtNFdQ+akgj2jLJJ/F/e9qCcwG3yhTZz CHNHOvC4OQ6SyVMHRFSvx5xXIQ61nf8wQz24JQe90xGDU+aRkfEpe6dMpBenpdirPMGDUQHSg a4eV1/zWYOZV+c5kna/5J05LNODuhKflHlhQLJRPmb41iq6aw8stqq5uGp0TbQNqZePKeIu/u enzCFpQIfuZ2p4Z+PU8NNp4utOY= Received-SPF: pass client-ip=212.227.17.22; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: mirai X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi all! As suggested by mirai off-list, it would be nice to have a test that would have caught the issue. How do people feel about something along the following patch? The idea is to use namespaces in the dovecot config to declare the INBOX and another additional mailbox. The bug is quite obscure and not really about dovecot itself, so I don't think adding such a test is strictly necessary, maybe more tests for the configuration macro would be good instead. But I figured expanding the dovecot system test can't hurt. Let me know if you agree and I'll format it properly. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmOJJLkYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UtskH/RIxgitO9VsL35yspk8stnRm tQVFcOTEL7bdJrF0YKakC6YXar+K87tlTAeTkWOIv1KLwRP6sxKXiWvFEHWMFv5q mXE7xZMw/6EDkBVdmdFNzone0e6Gx4W3fKLlzojMwhwK7ZMjsF9K+v7BNq1zLHVI UW3ps9XsaLiUdvZ2YiVxcIV4WKhTg1hLmR5UbRy4TDM3GKQAdtV0ZxLUwS+f+PKw SzZoJO4OQ/1cLFzrR0EsfsqufloGU5K4WOXU/U8HVsBylgugbSz/LcajgRYeSjUN E3CQNpt9upx2WsR6nzJyDHAg3RQJ214k8BfxX6AUOcZ9vhgs+hiZh3MiNISnNEI= =651r -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=test.diff diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index f13751b72f..8a2dbd798f 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -301,8 +301,19 @@ (define %dovecot-os (auth-anonymous-username "alice") (mail-location (string-append "maildir:~/Maildir" - ":INBOX=~/Maildir/INBOX" - ":LAYOUT=fs")))))) + ":LAYOUT=fs")) + (namespaces + (list + (namespace-configuration + (name "INBOX") + (inbox? #t) + (separator "/") + (location "maildir:~/Maildir/INBOX")) + (namespace-configuration + (name "guix-devel") + (separator "/") + (prefix "guix-devel/") + (location "maildir:~/Maildir/guix-devel")))))))) (define (run-dovecot-test) "Return a test of an OS running Dovecot service." @@ -351,9 +362,10 @@ (define message "From: test@example.com\n\ (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) - (test-assert "accept an email" + (define-syntax-rule (with-imap-connection imap exp ...) (let ((imap (socket AF_INET SOCK_STREAM 0)) - (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143))) + (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143)) + (body (lambda (imap) exp ...))) (connect imap addr) ;; Be greeted. (read-line imap) ;OK @@ -362,6 +374,43 @@ (define message "From: test@example.com\n\ (read-line imap) ;+ (write-line "c2lyaGM=" imap) (read-line imap) ;OK + + (let ((ok (body imap))) + ;; Logout + (write-line "a LOGOUT" imap) + (close imap) + ok))) + + (define (marionette-read-new-mail mailbox marionette) + (marionette-eval + `(begin + (use-modules (ice-9 ftw) + (ice-9 match)) + (match (scandir ,mailbox) + (("." ".." message-file) + (call-with-input-file + (string-append ,mailbox message-file) + get-string-all)))) + marionette)) + + (test-assert "accept an email" + (with-imap-connection imap + ;; Append a message to the INBOX mailbox + (write-line (format #f "a APPEND INBOX {~a}" + (number->string (message-length message))) + imap) + (read-line imap) ;+ + (write-line message imap) + (read-line imap) ;OK + #t)) + + (test-equal "mail arrived" + message + (marionette-read-new-mail "/home/alice/Maildir/INBOX/new/" + marionette)) + + (test-assert "accept an email in fresh mailbox" + (with-imap-connection imap ;; Create a TESTBOX mailbox (write-line "a CREATE TESTBOX" imap) (read-line imap) ;OK @@ -372,24 +421,16 @@ (define message "From: test@example.com\n\ (read-line imap) ;+ (write-line message imap) (read-line imap) ;OK - ;; Logout - (write-line "a LOGOUT" imap) - (close imap) #t)) - (test-equal "mail arrived" + (test-equal "mail arrived in fresh mailbox" message - (marionette-eval - '(begin - (use-modules (ice-9 ftw) - (ice-9 match)) - (let ((TESTBOX/new "/home/alice/Maildir/TESTBOX/new/")) - (match (scandir TESTBOX/new) - (("." ".." message-file) - (call-with-input-file - (string-append TESTBOX/new message-file) - get-string-all))))) - marionette)) + (marionette-read-new-mail "/home/alice/Maildir/TESTBOX/new/" + marionette)) + + (test-assert "mailbox exists" + (marionette-eval `(file-exists? "/home/alice/Maildir/guix-devel") + marionette)) (test-end)))) --=-=-= Content-Type: text/plain Thanks, Pierre --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 04:31:07 2022 Received: (at 59423) by debbugs.gnu.org; 2 Dec 2022 09:31:07 +0000 Received: from localhost ([127.0.0.1]:45594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p12Nv-0004bn-Ec for submit@debbugs.gnu.org; Fri, 02 Dec 2022 04:31:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p12Nr-0004bP-5c for 59423@debbugs.gnu.org; Fri, 02 Dec 2022 04:31:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p12Nl-0005sp-Oz; Fri, 02 Dec 2022 04:30:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=psS9f0zy+nu47SjOxFqcWpGCCj5ihhPYxwFYUd53slU=; b=Xm00TzsUfqNKi/DFb0h+ nQ5cjTHYBvvKcgwajTre36hB2Yx5937cezDkVP4DREGigLhq0IehqeXGRQpbth5AGnLCaj7KZ1xKK tV7NgEQiH9HuCuoP81EqpCZJhg/+U4CVQoVsm+fnz9/iMKd5QpqblOzNhQrOPCoLNrIT13mjDQ3de cZWVsUVSzzuXJME4VDimUAxG2fekGkFf7GyCmQ2uvVjig8InVw+qfNwuFhOcYR3UQpRDEg9O9OPz5 MWtGZqxkIrs+aGhAaYXwwAJmCsFCO2gPfZ548lh+0A6Myyg1NAeTBaQRtNNcGg0gAJmKIwoMX0g3z Ybkem1WofS4rcA==; Received: from [193.50.110.137] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p12Nl-0004sy-AP; Fri, 02 Dec 2022 04:30:57 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> Date: Fri, 02 Dec 2022 10:30:55 +0100 In-Reply-To: <87a64aseqm.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 28 Nov 2022 20:58:57 -0500") Message-ID: <87iliuup80.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Maxim, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: [...] >>>> That generates two accessors called =E2=80=98namespace-configuration-l= ocation=E2=80=99. >>>> The second one shadows the first one. >>> >>> Yes. You didn't address my question directly though, so let me ask it >>> again: where is this %location field access (named "location") used? > > [...] > >> =E2=80=A6 the field is accessed via its accessor, >> =E2=80=98name-configuration-location=E2=80=99. We can kinda see it here: > > [...] > >> Each record has a =E2=80=98getter=E2=80=99 field t= hat refers to >> the accessor. In the case of =E2=80=98location=E2=80=99, that=E2=80=99s= the =E2=80=9Cwrong=E2=80=9D >> accessor=E2=80=94the accessor of =E2=80=98%location=E2=80=99. >> >> I hope that addresses your question! > > No :-). I meant why do we even set a default accessor for the *source > location* information (in the (gnu service configuration) macros); it's > that one that doesn't seem to get used (or I'm blind to it!), at least > via this accessor. If it's not strictly necessary, we can stop > producing it, and that would solve the problem. Like I wrote, I think it=E2=80=99s necessary, even if not used now. We=E2=80=99ve been knowingly shipping a broken Dovecot for two weeks now. = As I wrote, and as Pierre suggested, can we just revert the =E2=80=98%location= =E2=80=99 field shuffling for now? I can even do it on your behalf. After that we can continue that discussion (though I don=E2=80=99t have muc= h to add to be honest). Thanks in advance! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 04:34:19 2022 Received: (at control) by debbugs.gnu.org; 2 Dec 2022 09:34:19 +0000 Received: from localhost ([127.0.0.1]:45611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p12R1-0004dB-1F for submit@debbugs.gnu.org; Fri, 02 Dec 2022 04:34:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p12Qz-0004d2-PG for control@debbugs.gnu.org; Fri, 02 Dec 2022 04:34:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p12Qu-0006b8-Iq for control@debbugs.gnu.org; Fri, 02 Dec 2022 04:34:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=678X4mv0ecsqM1Tvttc7gLGFTp52cltKXl6GU+qLDFU=; b=nLgs8qVc7BASj/ i7qO9Asu+UfOCtsCDBFafA39KvBgp2K4OGOWCFqNScGuEwGHuC+s/KSq4FhsZazoKcAho/bt60G3H wpPCER7EFWQNm6cOVJtMD6UhHceNPlQl7RYlMi48AMS8gL+yLLtOflH+K7CAMb6pCH6ddqjb6KyuD z6FJ+5nAo0SOj9Ak5skyGj6CY0NAnHdFcwPnntTkN0OL8kmtnCQlAmpaQSiePnE/j3++9PI/1xQ0J bJvwL1ViQcxERbj7k37GWsMvURM5HIF52xKH2+oeWphRH3apz5knqUJTLdGHrr7Z9pZP/bkQ8xD2a O0tjZVrTHzFdgY/gowOA==; Received: from [193.50.110.137] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p12Qs-00035z-9V for control@debbugs.gnu.org; Fri, 02 Dec 2022 04:34:12 -0500 Date: Fri, 02 Dec 2022 10:34:09 +0100 Message-Id: <87edtiup2m.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #59423 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 59423 important quit From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 16:18:54 2022 Received: (at 59423) by debbugs.gnu.org; 2 Dec 2022 21:18:54 +0000 Received: from localhost ([127.0.0.1]:48938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1DQs-0001Qc-0q for submit@debbugs.gnu.org; Fri, 02 Dec 2022 16:18:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1DQo-0001QV-Uu for 59423@debbugs.gnu.org; Fri, 02 Dec 2022 16:18:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1DQj-0004D5-MD; Fri, 02 Dec 2022 16:18:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=PXrNwSwl3Vhm7yNMzbRNmKeJD0abqDYGOhj3TkApVvY=; b=AZ+qO9q6G8IOKgOeroqu omcAPPZPl4eYTaoMZoiFrJ8rUOHlSuX0j/4OkXLK4+1mG+ypu2Z6VOeqUXrsCewJWVSDhjjbgXvU6 RXjePAb0ZNm1Pe3bpvBIUASHMIZgmOgbS7kF37AwPBPX3yR2J5ziFXS5cu1HWStc3A5AH1d3HHWRh WmPlu2N+NkPqPl3BTtvoPS/gUztR+a4hfDECIGMOshc3uvV5u11zqxYMVZuSOqf1RFrRpUBV5FOJ4 69NZbpWtOLGzILSFGOEoKwd61GIY+i0mkZmz+K1IFNG0D2Volpqu0DN7gE0Cl4EpYo23RcHg9PfBW srkwzq4xxZKU/A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1DQh-0004VJ-VX; Fri, 02 Dec 2022 16:18:45 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> <87iliuup80.fsf@gnu.org> Date: Fri, 02 Dec 2022 22:18:41 +0100 In-Reply-To: <87iliuup80.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 02 Dec 2022 10:30:55 +0100") Message-ID: <878rjpqzbi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423 Cc: Pierre Langlois , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > Maxim Cournoyer skribis: [...] >> No :-). I meant why do we even set a default accessor for the *source >> location* information (in the (gnu service configuration) macros); it's >> that one that doesn't seem to get used (or I'm blind to it!), at least >> via this accessor. If it's not strictly necessary, we can stop >> producing it, and that would solve the problem. > > Like I wrote, I think it=E2=80=99s necessary, even if not used now. To complement this answer: key high-level record types usually have a =E2=80=98location=E2=80=99 field: , , , , , etc. The rationale is that it allows us to report accurate location info for errors and warnings, to jump to their definition, and so on. For configuration records this is not a common pattern, but the rationale holds. =E2=80=98zabbix-front-end-config=E2=80=99 uses the =E2=80= =98%location=E2=80=99 field, but it seems to be the only one so far. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 21:24:42 2022 Received: (at 59423) by debbugs.gnu.org; 3 Dec 2022 02:24:42 +0000 Received: from localhost ([127.0.0.1]:50289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1ICo-0002r8-9F for submit@debbugs.gnu.org; Fri, 02 Dec 2022 21:24:42 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:42759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1ICk-0002r1-7I for 59423@debbugs.gnu.org; Fri, 02 Dec 2022 21:24:40 -0500 Received: by mail-qt1-f178.google.com with SMTP id h24so7693088qta.9 for <59423@debbugs.gnu.org>; Fri, 02 Dec 2022 18:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=8Qbuuzc9llTquXxiyRKB3tW6vZlHgAyGWcfVKiU/uQk=; b=gaAgkntzD35lpWYictNZLkt+agLsaCcfepaG+q1IR7+eN5J2fRqn9xgqrmN73/8Z3Z pDhi5Gko7EIHBV6TmL1c9XULYTU4bb5Cvaf4a6EV35Hazy4v9J+DaaYDF7cHFD2cGJnu P8eFKzNHzpb/pjSpIqVvvTN/Tfix0qRabENaDH0evzjOnVLdHNEYKVqvm44zNmMQDGd1 /+vbiGzhcCAhJJiVXovjADa+L8xhsEkAeQIOxv0j8dlwF4xYzq0XC+NtCSZAVxHArujS 691l5uuhENO0erRvbARDGXhFK4aA1Xp6nAGn3JByIomilYnSRZH9DP1sqZ4X3p/dJf4a o6XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8Qbuuzc9llTquXxiyRKB3tW6vZlHgAyGWcfVKiU/uQk=; b=39xWx3A3sIjPCsU9zgjj93B54q9HuZRREWBGgXYR2qzxBt90kqoeZH+JOXiR1DjdpE TnRPHEbGNiXOd2EqksWfcfVYzw3njb89LSEcxe+/ysxvqZAVXEiGyeeBM9DJpTcAJTAa xUl/GDXu/4UIJgN6S1yI0LFZNSfuwhm8Hlg8eJRmoqrEUiXjBMcENqhkeedcgfNFTg1n TC+/mLp6RSPclWLKMUgyjY0HvA8Hu2rLgdmW8zO5u/ixXILMYlnMhyCpGfq0uz3bpUEY A+waABVhnOH29pKTtFiOquH0urAexvWnJNat6rvjtpMbmkC8taNM50EXBcD1wABHFoik dSdQ== X-Gm-Message-State: ANoB5pl+ymxWP7Uwyl+Y2XQGkhPVWevOTz4Ug6BJU66etZtcHKzR/zwO byEJymuiEoYUl62v+JUwIxk= X-Google-Smtp-Source: AA0mqf7xqD6BLhEyEvp+JSKtRWRkrQslBPf2hUUKUveSx3kYssBLjoOCH0Wjx31yHCbNdnj9/7/a/w== X-Received: by 2002:ac8:6f19:0:b0:3a5:3cee:e35 with SMTP id bs25-20020ac86f19000000b003a53cee0e35mr68192602qtb.526.1670034272526; Fri, 02 Dec 2022 18:24:32 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id j11-20020ac8550b000000b003434d3b5938sm5317939qtq.2.2022.12.02.18.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 18:24:31 -0800 (PST) From: Maxim Cournoyer To: Pierre Langlois Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87359ydbnq.fsf@gmx.com> Date: Fri, 02 Dec 2022 21:24:29 -0500 In-Reply-To: <87359ydbnq.fsf@gmx.com> (Pierre Langlois's message of "Thu, 01 Dec 2022 21:55:27 +0000") Message-ID: <878rjpgr6q.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59423 Cc: mirai , 59423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Pierre, Pierre Langlois writes: > Hi all! > > As suggested by mirai off-list, it would be nice to have a test that > would have caught the issue. How do people feel about something along > the following patch? The idea is to use namespaces in the dovecot config > to declare the INBOX and another additional mailbox. > > The bug is quite obscure and not really about dovecot itself, so I don't > think adding such a test is strictly necessary, maybe more tests for the > configuration macro would be good instead. But I figured expanding the > dovecot system test can't hurt. Let me know if you agree and I'll format > it properly. Thanks for the diff! I've turned it into a patch and was ready to apply it, but 2 tests are always failing, even after addressing this issue; could you look into why? It looks good otherwise. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tests-Expound-Dovecot-test-suite.patch >From 149790c4bd264d81938596cdbfa3376f31f9182f Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Fri, 2 Dec 2022 14:17:25 -0500 Subject: [PATCH] tests: Expound Dovecot test suite. Relates to . * gnu/tests/mail.scm (%dovecot-os) [services] : Add two namespaces. (run-dovecot-test) : New syntax. : New test. : Use with-imap-connection. : New test. : Adjust test. : New test. Signed-off-by: Maxim Cournoyer --- gnu/tests/mail.scm | 79 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 19 deletions(-) diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index f13751b72f..8a2dbd798f 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -301,8 +301,19 @@ (define %dovecot-os (auth-anonymous-username "alice") (mail-location (string-append "maildir:~/Maildir" - ":INBOX=~/Maildir/INBOX" - ":LAYOUT=fs")))))) + ":LAYOUT=fs")) + (namespaces + (list + (namespace-configuration + (name "INBOX") + (inbox? #t) + (separator "/") + (location "maildir:~/Maildir/INBOX")) + (namespace-configuration + (name "guix-devel") + (separator "/") + (prefix "guix-devel/") + (location "maildir:~/Maildir/guix-devel")))))))) (define (run-dovecot-test) "Return a test of an OS running Dovecot service." @@ -351,9 +362,10 @@ (define message "From: test@example.com\n\ (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) - (test-assert "accept an email" + (define-syntax-rule (with-imap-connection imap exp ...) (let ((imap (socket AF_INET SOCK_STREAM 0)) - (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143))) + (addr (make-socket-address AF_INET INADDR_LOOPBACK 8143)) + (body (lambda (imap) exp ...))) (connect imap addr) ;; Be greeted. (read-line imap) ;OK @@ -362,6 +374,43 @@ (define message "From: test@example.com\n\ (read-line imap) ;+ (write-line "c2lyaGM=" imap) (read-line imap) ;OK + + (let ((ok (body imap))) + ;; Logout + (write-line "a LOGOUT" imap) + (close imap) + ok))) + + (define (marionette-read-new-mail mailbox marionette) + (marionette-eval + `(begin + (use-modules (ice-9 ftw) + (ice-9 match)) + (match (scandir ,mailbox) + (("." ".." message-file) + (call-with-input-file + (string-append ,mailbox message-file) + get-string-all)))) + marionette)) + + (test-assert "accept an email" + (with-imap-connection imap + ;; Append a message to the INBOX mailbox + (write-line (format #f "a APPEND INBOX {~a}" + (number->string (message-length message))) + imap) + (read-line imap) ;+ + (write-line message imap) + (read-line imap) ;OK + #t)) + + (test-equal "mail arrived" + message + (marionette-read-new-mail "/home/alice/Maildir/INBOX/new/" + marionette)) + + (test-assert "accept an email in fresh mailbox" + (with-imap-connection imap ;; Create a TESTBOX mailbox (write-line "a CREATE TESTBOX" imap) (read-line imap) ;OK @@ -372,24 +421,16 @@ (define message "From: test@example.com\n\ (read-line imap) ;+ (write-line message imap) (read-line imap) ;OK - ;; Logout - (write-line "a LOGOUT" imap) - (close imap) #t)) - (test-equal "mail arrived" + (test-equal "mail arrived in fresh mailbox" message - (marionette-eval - '(begin - (use-modules (ice-9 ftw) - (ice-9 match)) - (let ((TESTBOX/new "/home/alice/Maildir/TESTBOX/new/")) - (match (scandir TESTBOX/new) - (("." ".." message-file) - (call-with-input-file - (string-append TESTBOX/new message-file) - get-string-all))))) - marionette)) + (marionette-read-new-mail "/home/alice/Maildir/TESTBOX/new/" + marionette)) + + (test-assert "mailbox exists" + (marionette-eval `(file-exists? "/home/alice/Maildir/guix-devel") + marionette)) (test-end)))) base-commit: 83350bf56b20f3106cd9eeab80b70a9eaf810a48 -- 2.38.1 --=-=-= Content-Type: text/plain -- Thanks, Maxim --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 22:05:23 2022 Received: (at 59423-done) by debbugs.gnu.org; 3 Dec 2022 03:05:23 +0000 Received: from localhost ([127.0.0.1]:50450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1IqA-0003Fk-TN for submit@debbugs.gnu.org; Fri, 02 Dec 2022 22:05:23 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:41865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Iq7-0003Fa-Ku for 59423-done@debbugs.gnu.org; Fri, 02 Dec 2022 22:05:21 -0500 Received: by mail-qv1-f51.google.com with SMTP id d13so4661619qvj.8 for <59423-done@debbugs.gnu.org>; Fri, 02 Dec 2022 19:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=DjwmKcT4HFr8RE8NSGx63jE/GWoowcBi9VMLufi0/g0=; b=etFs5c0mzn6yMCXxhsm/d3pkiYGyzUkicCZsd70yonvyggsWzZCWcunCgSniDXfFr0 cR17dOIRnw1++MRjPBGjHPbL4IudmP6pj8zrckScY7FM7e4AY2w3pQrgQxHtHavy+YaW Z1F0Zp8DbLznbxMkM2Nq4J2Q88bXA66glWgKNVHpwEvfsah+Rf3odaOlGzQ5s6DtYzlx kLkLWM7dO/4M6wZfpRWkreCHyvzvRwZYzMYA23ND1JpZbKlf01DuoM2JxrhZoUuJQIWD 0ZcYpXM498/Jp1bOyZl0Z6CwQaRXdjx5fYQhrOZZYhSr2Ro/QoiVVwc3MsaYPni3cCeW ZwZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DjwmKcT4HFr8RE8NSGx63jE/GWoowcBi9VMLufi0/g0=; b=Tl19BU7Txz4vuRfzLE1MmC/030SFxXbhYZdFsfuROY/R2Phq5gFxBD+Aoik1XaXLUE Rfuh6JY0WoFcvWPp/GnPzfdpUBt2ZtP7r826vhFMmgAVl9onhI8gWyUQai9r/nDBEFk0 o6Bhq5lPq3Pt7e62QtBzyvRn9Jjg64QQwLUcGVG0ek7YWUwYLBpgHqv/18j55GCksbt4 5y9XeBKXsnJZgd/16Cn1OTQD0Hxzx0wXWAsQPAs8GjmpE3sTdHfoH30Ad+x0P2qCgmOZ ZOf8xZU9/pHe0z3F/Rj6u5R3D/6Warw4R3DUo/a+Gm2qcb2DW8btAiRZ9wZ9pPqcs7tv hVmA== X-Gm-Message-State: ANoB5pmenKvraUGsZGXICaXTa9f8U7m68OAfJs5rdN1TnV0IK0vNjvwI aKfZS7JyO4Xvpk+XUHrl5szt60tGk4w= X-Google-Smtp-Source: AA0mqf4O/psV+ifc/9Go/yxc5vEbJ5zWGn4dgVzGaQM+WCxJCTDGXGliCiclv4MPIiJ7qtnzoM+gpQ== X-Received: by 2002:ad4:5402:0:b0:4c7:2804:d69a with SMTP id f2-20020ad45402000000b004c72804d69amr10630602qvt.21.1670036713751; Fri, 02 Dec 2022 19:05:13 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id az20-20020a05620a171400b006e42a8e9f9bsm6730252qkb.121.2022.12.02.19.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:05:13 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> <87iliuup80.fsf@gnu.org> <878rjpqzbi.fsf@gnu.org> Date: Fri, 02 Dec 2022 22:05:12 -0500 In-Reply-To: <878rjpqzbi.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 02 Dec 2022 22:18:41 +0100") Message-ID: <874judgpav.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423-done Cc: Pierre Langlois , 59423-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> Maxim Cournoyer skribis: > > [...] > >>> No :-). I meant why do we even set a default accessor for the *source >>> location* information (in the (gnu service configuration) macros); it's >>> that one that doesn't seem to get used (or I'm blind to it!), at least >>> via this accessor. If it's not strictly necessary, we can stop >>> producing it, and that would solve the problem. >> >> Like I wrote, I think it=E2=80=99s necessary, even if not used now. > > To complement this answer: key high-level record types usually have a > =E2=80=98location=E2=80=99 field: , , , = , > , etc. The rationale is that it allows us to report > accurate location info for errors and warnings, to jump to their > definition, and so on. > > For configuration records this is not a common pattern, but the > rationale holds. =E2=80=98zabbix-front-end-config=E2=80=99 uses the =E2= =80=98%location=E2=80=99 field, > but it seems to be the only one so far. Thanks for this extra bit of information and for spotting this usage. I think "location" is likely to conflict for the general purpose 'define-configuration' generated records, so I've renamed the "location" *accessor* to "source-location". In the near future I want to migrate more service configurations to the 'define-configuration' machinery, to benefit from its useful self-validating property. For now I wouldn't feel at ease doing so unless raw record matching (not yet using 'match-record') works the same way, since we still have many occurrences making use of that (often via match-lambda). For that reason, I prefer to not revert the record layout until we've gotten rid of all the match-lambda matching record fields directly (which will take some time). I've applied the rename fix to master. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 11:53:22 2022 Received: (at 59423-done) by debbugs.gnu.org; 4 Dec 2022 16:53:22 +0000 Received: from localhost ([127.0.0.1]:58642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1sEz-00048N-Sy for submit@debbugs.gnu.org; Sun, 04 Dec 2022 11:53:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1sEy-00048H-F7 for 59423-done@debbugs.gnu.org; Sun, 04 Dec 2022 11:53:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1sEs-0001We-T0; Sun, 04 Dec 2022 11:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Ci1Cbe5ChbKqr1IBwIBWnC11+nc5GKrNWrTCr0AHSME=; b=H8/klEe8GKuTiGENKK6G viQvD9kzOjljDivzzXRbPVm69DQ+SWzApyVVx3eLG7i0PLoVzucqG7LqKoLiW6xURrCJGjBcBIxln gydl9RnB83Vdv/IiZSyMpVr4IzOhmpqac62KOz3Oiov70tRKl8cQlyFevJlp+o8jnbrVDaYoRdiX2 cKXxJKssJIf/nYiBUGlzotOVdOzpFf4DjfwGYAhXYepwKTiLHx73sYH/s8TgRm6WNXbD9arSBtV3Q E7YeynI+gj5hm2EuwykOiiuN0C35SQpQ/R/Mg2mUoRKnz9phEhHJZemOkOaVem6hgoxOH7fgvWcsT 0szgtYWMZvCTMg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1sEs-0007FA-6l; Sun, 04 Dec 2022 11:53:14 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> <87iliuup80.fsf@gnu.org> <878rjpqzbi.fsf@gnu.org> <874judgpav.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Frimaire an 231 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour du Sapin X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 04 Dec 2022 17:53:11 +0100 In-Reply-To: <874judgpav.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 02 Dec 2022 22:05:12 -0500") Message-ID: <87h6ybm7pk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423-done Cc: Pierre Langlois , 59423-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Maxim Cournoyer skribis: > Thanks for this extra bit of information and for spotting this usage. I > think "location" is likely to conflict for the general purpose > 'define-configuration' generated records, so I've renamed the "location" > *accessor* to "source-location". Thank you. It wasn=E2=80=99t my preferred solution=C2=B9 but I think it=E2=80=99s a go= od one. =C2=B9 https://issues.guix.gnu.org/59423#15-lineno81 > In the near future I want to migrate more service configurations to the > 'define-configuration' machinery, to benefit from its useful > self-validating property. For now I wouldn't feel at ease doing so > unless raw record matching (not yet using 'match-record') works the same > way, since we still have many occurrences making use of that (often via > match-lambda). For that reason, I prefer to not revert the record > layout until we've gotten rid of all the match-lambda matching record > fields directly (which will take some time). Right, especially given that =E2=80=98match-record=E2=80=99 was added in 20= 17. :-) We=E2=80=99ll have to discuss the implications of a possible move to =E2=80=98define-configuration=E2=80=99. For example, =E2=80=98define-confi= guration=E2=80=99 cannot report missing field values (for fields that lack a default value) at macro-expansion time, contrary to plain =E2=80=98define-record-type*=E2=80= =99. Anyway, future work! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 04 16:43:55 2022 Received: (at 59423-done) by debbugs.gnu.org; 4 Dec 2022 21:43:55 +0000 Received: from localhost ([127.0.0.1]:59950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wmB-00034U-6z for submit@debbugs.gnu.org; Sun, 04 Dec 2022 16:43:55 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]:45976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1wm9-00034O-Di for 59423-done@debbugs.gnu.org; Sun, 04 Dec 2022 16:43:53 -0500 Received: by mail-qk1-f171.google.com with SMTP id v8so3685872qkg.12 for <59423-done@debbugs.gnu.org>; Sun, 04 Dec 2022 13:43:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=iHgWffcE54iIhHXlekEH+1MtpO0+9p7GY+zUPqndhlI=; b=dNGU9Mcvxi9j5cGBzHTsKgLjsyOtsIfcT3HiXqYS0X2/+gYMk7oteN665i0K/fu7Yr YolmZz+7ny90cCqtZykpEjxluDRC5dQNrIKNnYl52Y599AZi63vj7d9wfB7P5C/PFwpa bxI1lw3bhONzA6Cx7NqCNP0R7CMAV3wPWtxo9OISI6x45HlqZ9s7Og8MfAGOPr/LyGNv biDc2i33xTkh1wb0S9vAHje3earqquITxiZfp+cOQquFIPJ7Q2dmrEngy4z18GVugXWV NkY+usivNFssXF+t1OD3K6sHoJ+qXWGieI3OmqooS+8qibRuVbgnBeTcSH69EF/+vmkt aCbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iHgWffcE54iIhHXlekEH+1MtpO0+9p7GY+zUPqndhlI=; b=548Cd763hh5y5NIu4EJxWiZioBiPVcfJbf1A55Zscn9q8OukhN7dNLhWfAArMlkhoT 4f1x0rTIOwnpqYWn989ufPqqySz6qJ7n+SI4nWPUuWwxPEWSH20Eo1HztkcmwfsxuSid 4O9AhGYf4qBYe0EpaEza3cQ1Qn+vhtIMJ+BTP/Y0kBVt0Tc2lwH3F4UcOB0cmXvg9+Pf khjJivlMlyf495mKISkQAnV4A8+b6dI29PH/EmyTqus9cDEuV7LnxP2vl54x028DXQaw 26tDRr0MA8A++Mj3I4TzUqeutXm0CcQDcRmnIkE3B4BMsV+wbfGHp8KGICbV6uAgeE0m wP/g== X-Gm-Message-State: ANoB5pk78yvF5xnFGCTjp52x+vcWVIBLLjGh0hzchjODh08Sxd3WxStm N7o1EtgJt+MMsSvVNOzr3jwlPQnCPX8= X-Google-Smtp-Source: AA0mqf6SieGm5fSvUWSswjkVSFc3Z7TLCSm6UwbKlHTXtSqqdzERWf/z4OoJqq9P2qeumrCButcOsw== X-Received: by 2002:a05:620a:178a:b0:6fc:b2d2:252c with SMTP id ay10-20020a05620a178a00b006fcb2d2252cmr7520611qkb.512.1670190227700; Sun, 04 Dec 2022 13:43:47 -0800 (PST) Received: from hurd (dsl-156-154.b2b2c.ca. [66.158.156.154]) by smtp.gmail.com with ESMTPSA id w21-20020a05620a0e9500b006e07228ed53sm10658209qkm.18.2022.12.04.13.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Dec 2022 13:43:47 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> <87iliuup80.fsf@gnu.org> <878rjpqzbi.fsf@gnu.org> <874judgpav.fsf@gmail.com> <87h6ybm7pk.fsf@gnu.org> Date: Sun, 04 Dec 2022 16:43:46 -0500 In-Reply-To: <87h6ybm7pk.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sun, 04 Dec 2022 17:53:11 +0100") Message-ID: <87tu2a6e0d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59423-done Cc: Pierre Langlois , 59423-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Maxim Cournoyer skribis: > >> Thanks for this extra bit of information and for spotting this usage. I >> think "location" is likely to conflict for the general purpose >> 'define-configuration' generated records, so I've renamed the "location" >> *accessor* to "source-location". > > Thank you. > > It wasn=E2=80=99t my preferred solution=C2=B9 but I think it=E2=80=99s a = good one. > > =C2=B9 https://issues.guix.gnu.org/59423#15-lineno81 > >> In the near future I want to migrate more service configurations to the >> 'define-configuration' machinery, to benefit from its useful >> self-validating property. For now I wouldn't feel at ease doing so >> unless raw record matching (not yet using 'match-record') works the same >> way, since we still have many occurrences making use of that (often via >> match-lambda). For that reason, I prefer to not revert the record >> layout until we've gotten rid of all the match-lambda matching record >> fields directly (which will take some time). > > Right, especially given that =E2=80=98match-record=E2=80=99 was added in = 2017. :-) Hehe! I had started adapting all the match-lambda, and got overwhelmed by the changes needed. So I think progressively (i.e., small) be easier to review or revert in case of errors. > We=E2=80=99ll have to discuss the implications of a possible move to > =E2=80=98define-configuration=E2=80=99. For example, =E2=80=98define-con= figuration=E2=80=99 cannot > report missing field values (for fields that lack a default value) at > macro-expansion time, contrary to plain =E2=80=98define-record-type*=E2= =80=99. Anyway, > future work! OK. That's optimization work rather than an impediment to migrate though, right? If so, I think the value for users of having errors on invalid field types outweighs run time efficiency :-). --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 06 03:53:27 2022 Received: (at 59423-done) by debbugs.gnu.org; 6 Dec 2022 08:53:27 +0000 Received: from localhost ([127.0.0.1]:41587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2The-0004k1-NU for submit@debbugs.gnu.org; Tue, 06 Dec 2022 03:53:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Tha-0004jv-6V for 59423-done@debbugs.gnu.org; Tue, 06 Dec 2022 03:53:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2ThU-0002km-Pq; Tue, 06 Dec 2022 03:53:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ZLV0h7IAfB/jnFrJUxYGRuHSK0EaS9K0EJeNi5pIwi8=; b=frdx/dXkDkzXaaNGoKXu F5BRhUAdNDHZHbb0XnkzGwt8Uhs1xdE/6paGBWBZTU4T69mur9zWLaZJCz0jnQvvaupHL1rRFejil vO4Td7Wmwnj1pm0S0Djmn7jxhB+tY7lThBptxXd1XepR3ebtPqjaLanEj2WbBoHobJO3b8H4Nh/oY tHomNQN5wbBSI6OriLXcSr1d3pvK9LjwPKoMCLAqhQm0bbxbeWo2SE77u1QgN1eWXhQhT3+vkR/a5 CZUmG9C3mbrP2mgPuFzrdDLmszuWk/M27RYG7aPlXumOsPA7FTH0kOhGoy8aSUnoCX1RPDmX772Kt nqcroMK/uOaTzw==; Received: from [193.50.110.137] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2ThT-00040p-MI; Tue, 06 Dec 2022 03:53:16 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59423: Invalid 'location' field generated in dovecot configuration References: <87y1s5wa4p.fsf@gmx.com> <87v8n2iytp.fsf@gmail.com> <875yf293ph.fsf@gmx.com> <87y1ry7o69.fsf@gmx.com> <87cz9a7n4y.fsf@gmx.com> <87fse6fmrq.fsf@gmail.com> <87cz995wwu.fsf@gmx.com> <87o7stw2gz.fsf@gmail.com> <87pmd7ceck.fsf@gnu.org> <87sfi2svb9.fsf@gmail.com> <8735a2ahmi.fsf@gnu.org> <87a64aseqm.fsf@gmail.com> <87iliuup80.fsf@gnu.org> <878rjpqzbi.fsf@gnu.org> <874judgpav.fsf@gmail.com> <87h6ybm7pk.fsf@gnu.org> <87tu2a6e0d.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 16 Frimaire an 231 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour de l'Ajonc X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 06 Dec 2022 09:53:11 +0100 In-Reply-To: <87tu2a6e0d.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 04 Dec 2022 16:43:46 -0500") Message-ID: <875yeooqvc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59423-done Cc: Pierre Langlois , 59423-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: >> We=E2=80=99ll have to discuss the implications of a possible move to >> =E2=80=98define-configuration=E2=80=99. For example, =E2=80=98define-co= nfiguration=E2=80=99 cannot >> report missing field values (for fields that lack a default value) at >> macro-expansion time, contrary to plain =E2=80=98define-record-type*=E2= =80=99. Anyway, >> future work! > > OK. That's optimization work rather than an impediment to migrate > though, right? If so, I think the value for users of having errors on > invalid field types outweighs run time efficiency :-). I guess my point is =E2=80=9Cwe=E2=80=99ll have to discuss=E2=80=9D. It ha= s non-obvious implications such as this one that have a visible impact on users. Ludo=E2=80=99. From unknown Sun Jun 22 00:52:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 03 Jan 2023 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator