From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eDTgLILTW18lLwAA0tVLHw (envelope-from ) for ; Fri, 11 Sep 2020 19:44:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id hp5BJ4LTW1/4AQAA1q6Kng (envelope-from ) for ; Fri, 11 Sep 2020 19:44:02 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 05C119400EF for ; Fri, 11 Sep 2020 19:44:01 +0000 (UTC) Received: from localhost ([::1]:59220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGoxk-0003iB-Fv for larch@yhetil.org; Fri, 11 Sep 2020 15:44:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGous-0007E0-JG for guix-patches@gnu.org; Fri, 11 Sep 2020 15:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGous-0001i2-9i for guix-patches@gnu.org; Fri, 11 Sep 2020 15:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGous-0007g3-6l for guix-patches@gnu.org; Fri, 11 Sep 2020 15:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43347] [PATCH] services: dovecot: Do not require dovecot to be globally installed. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Sep 2020 19:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43347 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43347@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.159985322029437 (code B ref -1); Fri, 11 Sep 2020 19:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Sep 2020 19:40:20 +0000 Received: from localhost ([127.0.0.1]:45614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGouC-0007ej-2F for submit@debbugs.gnu.org; Fri, 11 Sep 2020 15:40:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:39864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGou9-0007eY-Ek for submit@debbugs.gnu.org; Fri, 11 Sep 2020 15:40:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGou9-0006M2-4g for guix-patches@gnu.org; Fri, 11 Sep 2020 15:40:17 -0400 Received: from mout.gmx.net ([212.227.15.15]:53861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGou6-0001TM-N2 for guix-patches@gnu.org; Fri, 11 Sep 2020 15:40:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599853211; bh=fqZo8P0dgI9FLHFbtbtfAOYBwgIHXe+fMYPJFMrEyMA=; h=X-UI-Sender-Class:From:To:Subject:Date; b=eUKu/K7kQ5rHB3LwIB64eE2yUJVrGUVjCE65EB+E/9ebxRwzFTUfFwhgPavr/9+Ch hI+ibW9G3E51L4vLuXAboKWYCK5cCFq7EkFGV4lAfToBo1zNyN2LBeIkVJvUD1dTJv 57qvLrTeFedpg0eT+fzfbDE8Hp7XgRtTTy2LDH34= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MMofW-1k0FzT0wM8-00Ijq8 for ; Fri, 11 Sep 2020 21:40:11 +0200 User-agent: mu4e 1.4.13; emacs 27.1 From: Pierre Langlois Date: Fri, 11 Sep 2020 20:40:06 +0100 Message-ID: <87k0x09k6h.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:zaas+yERGnBnX/6irFm38zUqJ8R8G+xHfTIGvF6a2PdriCC3fHw HhOVTr5I5A6PmAy0ZDX8NyA2+JswQNja1wnpDGuBj12fZA2z+Oqxflg8tpTBJ9QW0+4f9sV SLhUUg/n31Hu+D/9SBmd6FYkguOjRAI5tifXe67BqYDI0PkroimnzNS9jfAdriXU/zS1J3Q lP9+fEmHbJ5dp3bhqm+Qg== X-UI-Out-Filterresults: notjunk:1;V03:K0:QdprK9bzYq4=:S4mHlIQUPjergQH20+4Oe3 au/n/yRQh6wVYXWqqEKPC92qPHAfjFyZZbrOJqNi9SrzGQHL1CUabd3S0BHRvUL8qsvFoMFo9 HzaZROXxG7y1iuAKpHvcmxyXn8sYijRQkEs7Vl/jV0Q+JZMDS5iWXOKF9La1I/hJ1m9j+8F2X TToIABGZFM6VVlyU7ID7retgeYXZM+bsS76zGt6nyzvgM3Qu8dAALnNtXb/sGXLENdWw/b97O rzDSyhnCTJxB2D/deWzn1pj0+z544zxrJiCpp6FwRjmkNgcKxMU9KLdV1J10pmyX4kgnPqW5o k/s5o69j2gXJmIQKVyPN152R7Zi0+1sTeWS5aM9fWJO9hNFaVlAVWhHn64TktVGQJuD0CTTXV xTtZwRUqXlcfSKNf3LSe/8p0eZIVNufxZehOUDDLD5ARNvc/DI+p/h9plz4ucQ1lPhH4+hXr+ dZIZmfWZDuludb9jadPMBFX8rIQg37C3Nd7VBpaALSs1ITEZTPbw3rRgRitd26F20joucsU0G 2w5323ywh64NJYX8SIPqobho/yTJ8p1YSzVqfMBImO28nW2T7Ixj6GEmPfBVPxoW4EWW0BF63 syNX61ye18MgcAS5phTCJFjOhh7q0m630a0MOsv0eg2zkBkBt5zbaIPiq0K/bIKUtmeLx1PxH rP1ASdIJPkxPuqovL/H1zGKBWcC5SnBcHxL5lUXR7bf5DxFntfZO/Hb0APWvww/WN7wZ11Ffw gwYETMB8VnM/cPK/tlPiVFqWfP4XEdBdjT16+1ohKJ2RTz0rZ90q/zA/e7AcQqPGpTGFnzisy XWSO/01lt28imOWICpmFPCnhIUDFTUNQYrdXCljx1uQzOEonJA28piHInl0zhVGENwXx5hfcS g/tZnCrI0Iqh0GHs/prG9JDJsthYTFjrlwg+3WDwM2/GImE45mYVN7cevjNU3X8YoIo7L4XOr Sc+ui9yRlgX9SUsj1DGwBZTHdplH6WBLObwU+zwiL26R886jH6qkc/o4SvwstawkZ0bteNs5r LopiaNF5CVfgq52t8NSn//VRgPFzchYXGuSsXRQWUH7uC3BZ7sORYsHyYQ+FkM7webOWKF+a5 D1snd14ZLsMGEXrUb8ogvaQn9M1wyy0GWVNsC18HVHi7f31steRe5X+61nBXSqpNss6ue9Un9 A7MMulQtmiDlN8tm2GRpGIJg8hLpCj0lD28vzxWinfsvbsFu+dOE0eu4P9apdCpHOhsm7y5Pu 8+dAuJhWZjAS5k2B4AXmtSs80kMmc8Mfyq/iKpA== Received-SPF: pass client-ip=212.227.15.15; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/11 15:40:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmx.net header.s=badeba3b8450 header.b=eUKu/K7k; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -2.11 X-TUID: gEJIgNebqIKj --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain 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 --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAl9b0pYYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UoIYH/0D7Xm/vRKCmPSCR8mJ/I0tG VkY5kt3AjY9kbnyaqzGypxd0jhBhhjCAsziZ/m5AUoq/Fet0Afc5dKVfXN2cdRG2 2bZ0wRTq3DuwPofEHRvIQcNkp9x/GS3tvuF5i3ByfRqxZ4xVWXuMvK+hF7vJp3cL kzH+8lmfuEfJTZS+cHShcdf/05+8dlKNboX6h/AmdByjTuSy6fCoYl6smqICMbZ+ 2Y9UxsLZ3yLkDBNO0RwTxAJqb+GNHFTEdTC6aPU6E3h8fB+TpzPfMhcpml5S5xgy CIN+hWKX6XS1kbZUzw6weVfU+KNxOQxQ/pBc5WNs+FmEwwedidwol9lr2XxtOWo= =Js9v -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-services-dovecot-Do-not-require-dovecot-to-be-global.patch Content-Transfer-Encoding: quoted-printable >From a85def0a578bc1b53b8af5e524a5ea9ce18f8403 Mon Sep 17 00:00:00 2001 From: Pierre Langlois 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 =C2=A9 2017 Carlo Zancanaro ;;; Copyright =C2=A9 2017, 2020 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2019 Kristofer Buffington +;;; Copyright =C2=A9 2020 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -1476,7 +1477,10 @@ greyed out, instead of only later giving \"not selec= table\" 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 select= able\" 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" --=20 2.28.0 --=-=-=--