GNU bug report logs -
#43347
[PATCH] services: dovecot: Do not require dovecot to be globally installed.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43347 in the body.
You can then email your comments to 43347 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Fri, 11 Sep 2020 19:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Langlois <pierre.langlois <at> gmx.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 11 Sep 2020 19:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello Guix!
I noticed recently my little dovecot mailserver failed to boot, I
tracked it down to our service installing a symlink as:
/etc/dovecot/modules -> /run/current-system/profile/lib/dovecot
However, I didn't have the dovecot package globally installed, the
service does not install it AFAICT.
We could extend the service to install dovecot into the global profile,
however instead we can just symlink /etc/dovecot/modules to the dovecot
package in the store directly.
Here's the patch to do that! WDYT?
Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]
[0001-services-dovecot-Do-not-require-dovecot-to-be-global.patch (text/x-patch, inline)]
From a85def0a578bc1b53b8af5e524a5ea9ce18f8403 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> gmx.com>
Date: Thu, 10 Sep 2020 23:25:02 +0100
Subject: [PATCH] services: dovecot: Do not require dovecot to be globally
installed.
* gnu/services/mail.scm (%dovecot-activation): Unconditionally symlink
/etc/dovecot/modules to the dovecot package's /lib dir instead of
hardcoding /run/current-system/profile/lib.
---
gnu/services/mail.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 291a2db8e1..47f686852a 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2017 Carlo Zancanaro <carlo <at> zancanaro.id.au>
;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2019 Kristofer Buffington <kristoferbuffington <at> gmail.com>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois <at> gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1476,7 +1477,10 @@ greyed out, instead of only later giving \"not selectable\" popup error.
(with-output-to-string
(lambda ()
(serialize-configuration config
- dovecot-configuration-fields)))))))
+ dovecot-configuration-fields))))))
+ (dovecot (if (opaque-dovecot-configuration? config)
+ (opaque-dovecot-configuration-dovecot config)
+ (dovecot-configuration-dovecot config))))
#~(begin
(use-modules (guix build utils))
(define (mkdir-p/perms directory owner perms)
@@ -1533,8 +1537,9 @@ greyed out, instead of only later giving \"not selectable\" popup error.
(copy-file #$(plain-file "dovecot.conf" config-str)
"/etc/dovecot/dovecot.conf")
(mkdir-p/perms "/etc/dovecot/private" user #o700)
- (unless (file-exists? moduledir)
- (symlink "/run/current-system/profile/lib/dovecot" moduledir))
+ (if (file-exists? moduledir)
+ (delete-file moduledir))
+ (symlink (string-append #$dovecot "/lib/dovecot") moduledir)
(create-self-signed-certificate-if-absent
#:private-key "/etc/dovecot/private/default.pem"
#:public-key "/etc/dovecot/default.pem"
--
2.28.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Fri, 11 Sep 2020 21:03:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Oh no, the reason for the symlink I think is that module packages could be installed in the same profile as dovecot to complement the directory. If you symlink it to dovecot, you can't install additional modules.
Instead, I would suggest to add an option to declare the set of additional modules. Create a union of this set of modules and dovecot itself, and symlink /etc/dovecot/modules to it (or confiqure dovecot to look into it directly, without using any global state, which is better in my opinion).
Le 11 septembre 2020 15:40:06 GMT-04:00, Pierre Langlois <pierre.langlois <at> gmx.com> a écrit :
>Hello Guix!
>
>I noticed recently my little dovecot mailserver failed to boot, I
>tracked it down to our service installing a symlink as:
>
> /etc/dovecot/modules -> /run/current-system/profile/lib/dovecot
>
>However, I didn't have the dovecot package globally installed, the
>service does not install it AFAICT.
>
>We could extend the service to install dovecot into the global profile,
>however instead we can just symlink /etc/dovecot/modules to the dovecot
>package in the store directly.
>
>Here's the patch to do that! WDYT?
>
>Thanks,
>Pierre
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Fri, 11 Sep 2020 21:03:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Fri, 11 Sep 2020 21:34:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 43347 <at> debbugs.gnu.org (full text, mbox):
Pierre,
Thank you very much for the bug report.
On 2020-09-11 21:40, Pierre Langlois wrote:
> I noticed recently my little dovecot mailserver failed to boot, I
> tracked it down to our service installing a symlink as:
>
> /etc/dovecot/modules -> /run/current-system/profile/lib/dovecot
>
> However, I didn't have the dovecot package globally installed, the
> service does not install it AFAICT.
Sorry, this is my fault. I've been slowly merging some Dovecot
improvements[0] into master.
While I'm happily replying from the latest Dovecot service, I run it in
an... idiosyncratic manner that had me write some glue code to test
these patches. I didn't realize that said glue was doing more work than
I, er, realized. Too much.
> We could extend the service to install dovecot into the global profile,
> however instead we can just symlink /etc/dovecot/modules to the dovecot
> package in the store directly.
Nack. That just reverts to last week's monolithic Dovecot service that
doesn't support modules, but now with pointless indirection via /etc.
Nor should the service add anything to the system profile, or expect the
user to do so.
The fix is to add a ‘modules’ field to the service configuration that,
exactly like CUPS's ‘extensions’ field, adds module packages like
dovecot-pigeonhole to the union directory that /etc/dovecot/modules
points to.
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
[0]: https://issues.guix.gnu.org/42899
Reply sent
to
Pierre Langlois <pierre.langlois <at> gmx.com>
:
You have taken responsibility.
(Fri, 11 Sep 2020 21:51:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Pierre Langlois <pierre.langlois <at> gmx.com>
:
bug acknowledged by developer.
(Fri, 11 Sep 2020 21:51:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 43347-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice writes:
> Pierre,
>
> Thank you very much for the bug report.
>
> On 2020-09-11 21:40, Pierre Langlois wrote:
>> I noticed recently my little dovecot mailserver failed to boot, I
>> tracked it down to our service installing a symlink as:
>> /etc/dovecot/modules -> /run/current-system/profile/lib/dovecot
>> However, I didn't have the dovecot package globally installed, the
>> service does not install it AFAICT.
>
> Sorry, this is my fault. I've been slowly merging some Dovecot
> improvements[0] into master.
>
> While I'm happily replying from the latest Dovecot service, I run it
> in an... idiosyncratic manner that had me write some glue code to test
> these patches. I didn't realize that said glue was doing more work
> than I, er, realized. Too much.
No worries! I see you've reverted the commits so I'll close this.
>> We could extend the service to install dovecot into the global profile,
>> however instead we can just symlink /etc/dovecot/modules to the dovecot
>> package in the store directly.
>
> Nack. That just reverts to last week's monolithic Dovecot service
> that doesn't support modules, but now with pointless indirection via
> /etc. Nor should the service add anything to the system profile, or
> expect the user to do so.
>
> The fix is to add a ‘modules’ field to the service configuration that,
> exactly like CUPS's ‘extensions’ field, adds module packages like
> dovecot-pigeonhole to the union directory that /etc/dovecot/modules
> points to.
Ah I see, I wasn't aware of the dovecot modules, the indirection being
pointless with my changes should have been a hint there was something
wrong :-).
Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Mon, 14 Sep 2020 07:14:01 GMT)
Full text and
rfc822 format available.
Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I see, let me try to fix this.
Alexey
On September 11, 2020 23:03:22 Tobias Geerinckx-Rice via Guix-patches via
<guix-patches <at> gnu.org> wrote:
> Pierre,
>
> Thank you very much for the bug report.
>
> On 2020-09-11 21:40, Pierre Langlois wrote:
>> I noticed recently my little dovecot mailserver failed to boot, I
>> tracked it down to our service installing a symlink as:
>>
>> /etc/dovecot/modules -> /run/current-system/profile/lib/dovecot
>>
>> However, I didn't have the dovecot package globally installed, the
>> service does not install it AFAICT.
>
> Sorry, this is my fault. I've been slowly merging some Dovecot
> improvements[0] into master.
>
> While I'm happily replying from the latest Dovecot service, I run it in
> an... idiosyncratic manner that had me write some glue code to test
> these patches. I didn't realize that said glue was doing more work than
> I, er, realized. Too much.
>
>> We could extend the service to install dovecot into the global profile,
>> however instead we can just symlink /etc/dovecot/modules to the dovecot
>> package in the store directly.
>
> Nack. That just reverts to last week's monolithic Dovecot service that
> doesn't support modules, but now with pointless indirection via /etc.
> Nor should the service add anything to the system profile, or expect the
> user to do so.
>
> The fix is to add a ‘modules’ field to the service configuration that,
> exactly like CUPS's ‘extensions’ field, adds module packages like
> dovecot-pigeonhole to the union directory that /etc/dovecot/modules
> points to.
>
> Kind regards,
>
> T G-R
>
> Sent from a Web browser. Excuse or enjoy my brevity.
>
> [0]: https://issues.guix.gnu.org/42899
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43347
; Package
guix-patches
.
(Mon, 14 Sep 2020 07:14:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 12 Oct 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 196 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.