summaryrefslogtreecommitdiff
path: root/user/dovecot
diff options
context:
space:
mode:
Diffstat (limited to 'user/dovecot')
-rw-r--r--user/dovecot/APKBUILD47
-rw-r--r--user/dovecot/apop.patch40
-rw-r--r--user/dovecot/time64.patch30
3 files changed, 82 insertions, 35 deletions
diff --git a/user/dovecot/APKBUILD b/user/dovecot/APKBUILD
index e56919c7f..64ac365e5 100644
--- a/user/dovecot/APKBUILD
+++ b/user/dovecot/APKBUILD
@@ -16,52 +16,27 @@ arch="all"
options="libtool"
license="LGPL-2.0+"
depends="openssl"
+makedepends="autoconf automake libtool bzip2-dev clucene-dev expat-dev krb5-dev
+ libcap-dev libsodium-dev linux-headers linux-pam-dev mariadb-dev
+ openldap-dev openssl-dev postgresql-dev sqlite-dev zlib-dev"
pkgusers="dovecot dovenull"
pkggroups="dovecot dovenull"
-makedepends="
- autoconf
- automake
- bzip2-dev
- clucene-dev
- expat-dev
- krb5-dev
- libcap-dev
- openssl-dev
- libtool
- linux-headers
- linux-pam-dev
- mariadb-dev
- openldap-dev
- postgresql-dev
- sqlite-dev
- zlib-dev
- libsodium-dev
- "
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
-subpackages="
- $pkgname-doc
- $pkgname-dev
- $pkgname-openrc
- $pkgname-lmtpd
- $pkgname-pop3d
- $pkgname-submissiond
+subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc $pkgname-lmtpd
+ $pkgname-pop3d $pkgname-submissiond
$pkgname-pigeonhole-plugin-ldap:_sieve_ldap
$pkgname-pigeonhole-plugin:_sieve
- $pkgname-sql
- $pkgname-pgsql
- $pkgname-mysql
- $pkgname-sqlite
- $pkgname-gssapi
- $pkgname-ldap
- $pkgname-fts-solr:_fts_solr
- $pkgname-fts-lucene:_fts_lucene
- "
+ $pkgname-sql $pkgname-pgsql $pkgname-mysql $pkgname-sqlite
+ $pkgname-gssapi $pkgname-ldap $pkgname-fts-solr:_fts_solr
+ $pkgname-fts-lucene:_fts_lucene"
source="https://www.dovecot.org/releases/$_pkgvermajor/dovecot-$pkgver.tar.gz
https://pigeonhole.dovecot.org/releases/$_pkgvermajor/$pkgname-$_pkgvermajor-pigeonhole-$_pigeonholever.tar.gz
skip-iconv-check.patch
split-protocols.patch
default-config.patch
ssl-paths.patch
+ time64.patch
+ apop.patch
dovecot.logrotate
dovecot.initd
"
@@ -286,5 +261,7 @@ fe4fbeaedb377d809f105d9dbaf7c1b961aa99f246b77189a73b491dc1ae0aa9c68678dde90420ec
794875dbf0ded1e82c5c3823660cf6996a7920079149cd8eed54231a53580d931b966dfb17185ab65e565e108545ecf6591bae82f935ab1b6ff65bb8ee93d7d5 split-protocols.patch
0d8f89c7ba6f884719b5f9fc89e8b2efbdc3e181de308abf9b1c1b0e42282f4df72c7bf62f574686967c10a8677356560c965713b9d146e2770aab17e95bcc07 default-config.patch
5e68a0042a7c11b3d8c411fc157f5960e2e3305dac11f4b6b880441e2b4105769ddf6c56f67a995af6e1a58f3bfa2c199ea51318a3a0e37c7ef0ae6c4109b13f ssl-paths.patch
+ee2e1916c712db77409567b4ded9c7fb7dfed295e044c19694bc369af3d4a7086caf14e97809531f76b630bc578271af6e5137985b7d4e8d2afb2a71f800912f time64.patch
+7831276d17386b204ca3aed7fdd9439f00230aa345b367567133d568c07a92bec80ca7512c20b80f692f7f6809cf4a27398c9915aae763e0c9f641650540a73b apop.patch
9f19698ab45969f1f94dc4bddf6de59317daee93c9421c81f2dbf8a7efe6acf89689f1d30f60f536737bb9526c315215d2bce694db27e7b8d7896036a59c31f0 dovecot.logrotate
d91951b81150d7a3ef6a674c0dc7b012f538164dac4b9d27a6801d31da6813b764995a438f69b6a680463e1b60a3b4f2959654f68e565fe116ea60312d5e5e70 dovecot.initd"
diff --git a/user/dovecot/apop.patch b/user/dovecot/apop.patch
new file mode 100644
index 000000000..a75c770e5
--- /dev/null
+++ b/user/dovecot/apop.patch
@@ -0,0 +1,40 @@
+From d1c5d356f36aaf9c32708cc6960fcaebe1cf6e63 Mon Sep 17 00:00:00 2001
+From: Paul Howarth <paul@city-fan.org>
+Date: Sun, 16 Aug 2020 20:32:03 +0100
+Subject: [PATCH] Fix APOP test failure on 32-bit systems
+
+The challenge timestamp is read as a hex number in mech_apop_auth_initial()
+so it should be written as hex, not decimal.
+
+Also fix compiler warnings for 32-bit architectures.
+---
+ src/auth/test-mech.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/auth/test-mech.c b/src/auth/test-mech.c
+index cf05370035..db9f85ccfc 100644
+--- a/src/auth/test-mech.c
++++ b/src/auth/test-mech.c
+@@ -192,11 +192,11 @@ static void test_mech_handle_challenge(struct auth_request *request,
+ }
+
+ static inline const unsigned char *
+-test_mech_construct_apop_challenge(unsigned int connect_uid, unsigned long *len_r)
++test_mech_construct_apop_challenge(unsigned int connect_uid, size_t *len_r)
+ {
+ string_t *apop_challenge = t_str_new(128);
+
+- str_printfa(apop_challenge,"<%lx.%u.%"PRIdTIME_T"", (unsigned long) getpid(),
++ str_printfa(apop_challenge,"<%lx.%u.%"PRIxTIME_T"", (unsigned long) getpid(),
+ connect_uid, process_start_time+10);
+ str_append_data(apop_challenge, "\0testuser\0responseoflen16-", 26);
+ *len_r = apop_challenge->used;
+@@ -323,7 +323,7 @@ static void test_mechs(void)
+ struct test_case *test_case = &tests[running_test];
+ const struct mech_module *mech = test_case->mech;
+ struct auth_request *request;
+- const char *testname = t_strdup_printf("auth mech %s %d/%lu",
++ const char *testname = t_strdup_printf("auth mech %s %d/%zu",
+ mech->mech_name,
+ running_test+1,
+ N_ELEMENTS(tests));
diff --git a/user/dovecot/time64.patch b/user/dovecot/time64.patch
new file mode 100644
index 000000000..c6f8e6261
--- /dev/null
+++ b/user/dovecot/time64.patch
@@ -0,0 +1,30 @@
+--- dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c.old 2020-08-12 12:20:41.000000000 +0000
++++ dovecot-2.3.11.3/src/lib-oauth2/oauth2-jwt.c 2020-09-15 14:21:24.285796733 +0000
+@@ -31,13 +31,13 @@
+ }
+
+ static int get_time_field(const struct json_tree *tree, const char *key,
+- long *value_r)
++ long long *value_r)
+ {
+ const char *value = get_field(tree, key);
+ int tz_offset ATTR_UNUSED;
+ if (value == NULL)
+ return 0;
+- if ((str_to_long(value, value_r) < 0 &&
++ if ((str_to_llong(value, value_r) < 0 &&
+ !iso8601_date_parse((const unsigned char*)value, strlen(value),
+ value_r, &tz_offset)) ||
+ *value_r < 0)
+@@ -283,9 +283,9 @@
+ const char *sub = get_field(tree, "sub");
+
+ int ret;
+- long t0 = time(NULL);
++ long long t0 = time(NULL);
+ /* default IAT and NBF to now */
+- long iat, nbf, exp;
++ long long iat, nbf, exp;
+ int tz_offset ATTR_UNUSED;
+
+ if (sub == NULL) {