-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
nixos/dovecot: 2.3.21.1 -> 2.4.0 #388463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
nixos/dovecot: 2.3.21.1 -> 2.4.0 #388463
Conversation
|
just missed @2xsaiko 's comment on the issue:
sounds like a good idea, I'm not an expert at this but I think we can lock the module changes behind |
|
I would also like to explore whether or not we can use |
|
Ah, nice, I just started doing the same thing. Didn't get very far yet though -- just the by-name change below.
I would just set dovecot to continue being 2.3 for now, or set the module to use 2.3, and have it print a warning when used so people manually update to 2.4. Then in the next release cycle, 2.3 can be removed and hard error. I'm not sure if this is exactly how this is usually done, but take a look at how it was done for Kanidm for example. #357734 Please also move the package to by-name while you're at it (see dblsaiko@push-mputwrznzqyv).
#286184 is a start for that. |
|
by-name change... thanks for reminding me!
we should probably introduce a
ah thanks! The first thing that came to mind for my was the postgres module, but same idea!
completely missed this one... I'll do some experimenting to see what's possible while keeping the module backwards-compatible for 2.3! |
Right, that would be part of that. |
|
pulled in your commit & added 2.4 alongside 2.3... not 100% sold on the commit message but good enough for now both packages build on my machine, haven't checked any functionality (notably the two things mentioned in the original PR description abt the openssl patch and that one hunk) |
|
We'll also have to deal with the plugin packages because they are dovecot version dependent. Here's a proof of concept for pigeonhole: dblsaiko@push-sntmrkppzolr And a (as of right now very non working) change adding the package option back dblsaiko@push-truxwztylsmm |
|
uhhh is it preferable to have no broken commits? i.e. stuff that wouldn't eval? |
|
fixed both fts-xapian & exporter
probably gonna have to rebase all of this later, just wanted to get the code on here in case you or anyone else has a clue wrt that build failure |
f6622ba to
53b2306
Compare
I'd keep them separate, ordered after the commit for dovecot. (also it would eval, just not build, right?)
Huh, does it? Both of them built for me. I'll have to compare your branch to mine. |
Sounds good, and yeah I think you're right - it would still eval.
Had a typo in |
|
dovecot_fts_xapian gave me a build failure on 1.9... upstream released 1.9.1 to fix this, but that tried to install itself to the error in questionI just committed a horrible hack to fix that problem by modifying the Makefile with The problem is that around line 527 in echo " $(MKDIR_P) '$(DESTDIR)$(dovecot_moduledir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dovecot_moduledir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dovecot_moduledir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dovecot_moduledir)"; \with
which we (nixpkgs) correctly set to so my guess is that upstream somehow borked this flag and it gets mixed up somewhere with the I want to stress that I am *not* a Make, autotools or m4 expert, this is just my two cents pinging @Julm and @symphorien as maintainers of this package, maybe you guys have a better understanding of what's going on |
Oh, oops. I saw that, didn't say anything because I didn't want to be annoying reviewing every commit you make 2 seconds after you push them if there's something wrong with one, then forgot about it when I replied. (speaking of, please squash that format commit into the parent, I just forgot to format it. my pretty alejandra-style formatting vs evil nixfmt 😔) |
|
doing a diff on |
|
Hi @Jappie3 , |
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
@hesiod if I understand things correctly, adding I still think having to add the plugin to anyways, it's difficult to conditionally add |
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index 0795561b3050..80f521634b35 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -38,6 +38,8 @@ let
cfg = config.services.dovecot2;
dovecotPkg = cfg.package;
+ pigeonHolePkg = if lib.versionAtLeast cfg.package.version "2.4" then pkgs.dovecot_pigeonhole_2_4 else pkgs.dovecot_pigeonhole_2_3;
+ sievec = lib.getExe' pigeonHolePkg "sievec";
baseDir = "/run/dovecot2";
stateDir = "/var/lib/dovecot";
@@ -935,7 +937,7 @@ in
else
cp -p '${from}' '${stateDir}/sieve/${to}'
fi
- ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/sieve/${to}'
+ ${sievec} '${stateDir}/sieve/${to}'
'') cfg.sieve.scripts
)}
chown -R '${cfg.mailUser}:${cfg.mailGroup}' '${stateDir}/sieve'
@@ -947,11 +949,11 @@ in
el:
optionalString (el.before != null) ''
cp -p ${el.before} ${stateDir}/imapsieve/before/${baseNameOf el.before}
- ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/imapsieve/before/${baseNameOf el.before}'
+ ${sievec} '${stateDir}/imapsieve/before/${baseNameOf el.before}'
''
+ optionalString (el.after != null) ''
cp -p ${el.after} ${stateDir}/imapsieve/after/${baseNameOf el.after}
- ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/imapsieve/after/${baseNameOf el.after}'
+ ${sievec} '${stateDir}/imapsieve/after/${baseNameOf el.after}'
''
) cfg.imapsieve.mailbox} |
|
ah yeah, good point |
|
I think I've identified one of the config issues that I was facing earlier. I need to add an empty line to the beginning of |
thanks, should be fixed < (concatMapAttrsStringSep "\n" (key: value: " ${key} = ${value}") cfg.pluginSettings)
---
> (concatMapAttrsStringSep "\n" (key: value: ''
> ${key} = ${value}
> '') cfg.pluginSettings)and thanks for the CVE notice, I'll update the package to 2.4.2 & fix the merge conflict while I'm at it edit: building with without |
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
This PR updates the Dovecot version to 2.4. Version 2.3 will be kept around for compatibility, as 2.4 has quite a few breaking changes (https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html). Updates for all Dovecot plugins present in nixpkgs are also included.
Besides that, the NixOS module for Dovecot is also updated to support the changes to the config format.
Resolves #388262
see #410912 for a followup regarding an RFC42-style
settingsoptionThings done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.