From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id M1spCs3VQl97QgAA0tVLHw (envelope-from ) for ; Sun, 23 Aug 2020 20:47:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kP6EBc3VQl/5KwAAB5/wlQ (envelope-from ) for ; Sun, 23 Aug 2020 20:47:09 +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 5FF569404D2 for ; Sun, 23 Aug 2020 20:47:08 +0000 (UTC) Received: from localhost ([::1]:59008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9wtN-0005WW-ON for larch@yhetil.org; Sun, 23 Aug 2020 16:47:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9wtK-0005WM-DP for guix-patches@gnu.org; Sun, 23 Aug 2020 16:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9wtK-0003jj-4a for guix-patches@gnu.org; Sun, 23 Aug 2020 16:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k9wtK-0000q6-2a for guix-patches@gnu.org; Sun, 23 Aug 2020 16:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42899] [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 23 Aug 2020 20:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42899 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Alexey Abramov Cc: 42899@debbugs.gnu.org Received: via spool by 42899-submit@debbugs.gnu.org id=B42899.15982155763170 (code B ref 42899); Sun, 23 Aug 2020 20:47:02 +0000 Received: (at 42899) by debbugs.gnu.org; 23 Aug 2020 20:46:16 +0000 Received: from localhost ([127.0.0.1]:55191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9wsZ-0000p4-K1 for submit@debbugs.gnu.org; Sun, 23 Aug 2020 16:46:15 -0400 Received: from flashner.co.il ([178.62.234.194]:34356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9wsY-0000oq-9g for 42899@debbugs.gnu.org; Sun, 23 Aug 2020 16:46:15 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id AFBE740131; Sun, 23 Aug 2020 20:46:07 +0000 (UTC) Date: Sun, 23 Aug 2020 23:45:35 +0300 From: Efraim Flashner Message-ID: <20200823204535.GA1392@E5400> References: <20200818120037.30722-1-levenson@mmer.org> <20200818120037.30722-2-levenson@mmer.org> <20200819074132.GE10528@E5400> <87lfib2cnf.fsf@mmer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <87lfib2cnf.fsf@mmer.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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=none; 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.61 X-TUID: byu8wUvaRB7F --yEPQxsgoJgBvi8ip Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 19, 2020 at 11:44:20AM +0200, Alexey Abramov wrote: > Hi, >=20 > Efraim Flashner writes: >=20 > > How are all the XXX_MODULE_DIR variables set? Would it be possible to > > just set MODULE_DIR to /etc/dovecot/modules and leave the others as-is? > > They seem to just use a file/folder under MODULE_DIR. >=20 > They set during compilation time. If I pass it as a configuration option,= dovecot will try to install libraries there which won't work. This was enough to jog my memory that we have a couple of packages (with services) that have configure flags for one directory and install to %outputs as expected. I came up with the attached patch to make that happen. >=20 > For example: >=20 > --8<---------------cut here---------------start------------->8--- > -*- mode: rg; default-directory: "~/factory/dovecot/" -*- > rg started at Wed Aug 19 10:35:00 >=20 > /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color= always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni= --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e = AUTH_MODULE_DIR >=20 > src/auth/Makefile.am:42: -DAUTH_MODULE_DIR=3D\""$(auth_moduledir)"\" \ > src/auth/main.c:195: modules =3D module_dir_load(AUTH_MODULE_DIR, NULL, &= mod_set); > src/auth/main.c:226: modules =3D module_dir_load_missing(modules, AUTH_MO= DULE_DIR, names, > src/doveadm/doveadm-pw.c:40: modules =3D module_dir_load_missing(modules,= AUTH_MODULE_DIR, NULL, &mod_set); > src/doveadm/Makefile.am:28: -DAUTH_MODULE_DIR=3D\""$(moduledir)/auth"\" \ >=20 > rg finished (5 matches found) at Wed Aug 19 10:35:00 > --8<---------------cut here---------------end--------------->8--- >=20 > --8<---------------cut here---------------start------------->8--- > -*- mode: rg; default-directory: "~/factory/dovecot/" -*- > rg started at Wed Aug 19 11:33:25 >=20 > /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color= always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni= --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e = DOVEADM_MODULEDIR >=20 > src/doveadm/doveadm-util.c:36: modules =3D module_dir_load_missing(module= s, DOVEADM_MODULEDIR, > src/doveadm/doveadm-util.c:61: dir =3D opendir(DOVEADM_MODULEDIR); > src/doveadm/Makefile.am:29: -DDOVEADM_MODULEDIR=3D\""$(doveadm_moduledir)= "\" \ >=20 > rg finished (3 matches found) at Wed Aug 19 11:33:25 > --8<---------------cut here---------------end--------------->8--- >=20 > -- > Alexey --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-dovecot-Set-moduledir-to-global-directory.patch" Content-Transfer-Encoding: quoted-printable =46rom e4dd3230739bca94896343d64c6756d346016296 Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Sun, 23 Aug 2020 23:43:43 +0300 Subject: [PATCH] gnu: dovecot: Set moduledir to global directory. * gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set moduledir. Adjust custom 'install phase to override moduledir so it successfully installs. --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 01ba9dc057..d3d1bda1b6 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1442,7 +1442,8 @@ facilities for checking incoming mail.") `(#:configure-flags '("--sysconfdir=3D/etc" "--localstatedir=3D/var" "--with-sqlite" ; not auto-detected - "--with-lucene") + "--with-lucene" + "--with-moduledir=3D/etc/dovecot/modules") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names @@ -1459,9 +1460,13 @@ facilities for checking incoming mail.") (("cat") (which "cat"))) #t)) (replace 'install - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key outputs make-flags #:allow-other-keys) + ;; The .la files don't like having the moduledir moved. + (for-each delete-file (find-files "." "\\.la")) ;; Simple hack to avoid installing a trivial README in /etc. (apply invoke "make" "install" "sysconfdir=3D/tmp/bogus" + (string-append "moduledir=3D" (assoc-ref outputs "out") + "/lib/dovecot") make-flags)))))) (home-page "https://www.dovecot.org") (synopsis "Secure POP3/IMAP server") --=20 2.28.0 --dDRMvlgZJXvWKvBx-- --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9C1W8ACgkQQarn3Mo9 g1FHQhAAi0yLjzfMF/yvwGKeYGVpQ8v794xuNW+L1V1GO7TMMBzUFLz+XsJbj81u h6Yrpw6N24+YtEKtZkCFRwGiD0EjlWhRpZUrIFGznRJs+TphDEix/Zkf8v1slg71 YQmnRsKX3Y0Th3lXcYPqkLy6agVwTS1iucqdwd3orNObzbYeoE433P5K1P7PmsvO hSHBcIJ7TX1zfxEg2FcV3Z6GRHxlT2OYjndBaaenmS01DkHXEOH3UrRQVMnJircu EsxbgvF75IIf0DcvNpneNrC53uMcvddxB7Syavk+L64TbXgTPAr+gbW+e1QAajxu 89tXbAM9miH7YFdnJWBzubn8WeKWRqK79UWzebO3kQFjV1mmmYCyknoBLbfsmIn3 vxHkqUY3q6x9x3fRiOvxDA/Nf+9kI9s/YEyZ5GFyMRuxFuGwjZxxmTttU/pqkcJc 2HPpG5aU71OR5lM5qwdMvek+HfbR8qfHtQkkQDTTqDvvw7P4c92EmnPq3713dFze I4n0RRBuZMT9R3ESW1MMbTbWNV55tL+8wRlJnZaFCsYaiC8vlxJnK03qDtIJp+vv 1XRGC9XHBL44kBjOKoaF1KRID+va0Ac+Zmssh9QQHqsuX+6xMLWK9bnqPlA2TANz 7O1ZkJUaAJIT7k8F8JeK0C1Ri1dcPmRpPbegYpnd/vq5LRTNUpw= =dFDq -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip--