From 383952a3f651e35dd9c384823cebdb15fb918b7d Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 12 Jul 2025 20:01:17 +0200 Subject: [PATCH] dovecot: backport upsteam fix for sort order crash on musl. --- srcpkgs/dovecot/patches/sort-order.patch | 26 ++++++++++++++++++++++++ srcpkgs/dovecot/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dovecot/patches/sort-order.patch diff --git a/srcpkgs/dovecot/patches/sort-order.patch b/srcpkgs/dovecot/patches/sort-order.patch new file mode 100644 index 00000000000..08caab9bbaa --- /dev/null +++ b/srcpkgs/dovecot/patches/sort-order.patch @@ -0,0 +1,26 @@ +From 9f3430be9133efe74e6f0c4943abc52b5a0ef789 Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Thu, 15 May 2025 09:54:18 +0300 +Subject: [PATCH] config: Fix config filter sorting order + +It was somewhat luckily working in glibc, but broke with e.g. musl libc. +This caused a crash at startup. + +Broken by 5acdd2b97ed6092d1f0204bdeb3e418180519370 +--- + src/config/config-parser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/config/config-parser.c b/src/config/config-parser.c +index 7b95c31f94..0ae5e46ddb 100644 +--- a/src/config/config-parser.c ++++ b/src/config/config-parser.c +@@ -2318,7 +2318,7 @@ static int config_parser_filter_cmp(struct config_filter_parser *const *f1, + return -1; + } + if ((*f2)->create_order <= 1) +- return -1; ++ return 1; + + /* Next, order by the number of named list filters, so more specific + filters are applied before less specific ones. (Applying is done in diff --git a/srcpkgs/dovecot/template b/srcpkgs/dovecot/template index 107eb73f7d2..a16d7e8bfe0 100644 --- a/srcpkgs/dovecot/template +++ b/srcpkgs/dovecot/template @@ -2,7 +2,7 @@ # revbump dovecot-plugin-pigeonhole when updating dovecot! pkgname=dovecot version=2.4.1r4 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-moduledir=/usr/lib/dovecot/modules --with-sql=plugin --disable-static --with-pam --with-mysql --with-pgsql