This patch worked for me on CentOS 7: <patch> diff -uNr dovecot-2.2.29/src/auth/userdb-vpopmail.c dovecot-2.2.29-new/src/auth/userdb-vpopmail.c --- dovecot-2.2.29/src/auth/userdb-vpopmail.c 2017-02-20 02:34:52.000000000 -0700 +++ dovecot-2.2.29-new/src/auth/userdb-vpopmail.c 2017-04-11 15:18:35.779004226 -0600 @@ -54,14 +54,17 @@ static const char * userdb_vpopmail_get_quota(const char *template, const char *vpop_str) { - const struct var_expand_table *tab; + struct var_expand_table *tab; string_t *quota; if (template == NULL || *vpop_str == '\0' || strcmp(vpop_str, "NOQUOTA") == 0) return ""; - tab = var_expand_table_build('q', format_maildirquota(vpop_str), '\0'); + tab = t_new(struct var_expand_table, 2); + tab[0].key = 'q'; + tab[0].value = format_maildirquota(vpop_str); + quota = t_str_new(128); var_expand(quota, template, tab); return str_c(quota); diff -uNr dovecot-2.2.29/src/lib/var-expand.h dovecot-2.2.29-new/src/lib/var-expand.h --- dovecot-2.2.29/src/lib/var-expand.h 2016-12-03 10:13:21.000000000 -0700 +++ dovecot-2.2.29-new/src/lib/var-expand.h 2017-04-11 15:14:27.054199764 -0600 @@ -36,7 +36,4 @@ If key is '\0', it's ignored. If long_key is NULL, it's ignored. */ bool var_has_key(const char *str, char key, const char *long_key) ATTR_PURE; -const struct var_expand_table * -var_expand_table_build(char key, const char *value, char key2, ...); - #endif </patch> On 4/11/2017 11:42 AM, Aki Tuomi wrote:
Stupid copypaste... can you do the change manually, it fails on tabs vs. spaces errors now. We'll get the commit out bit later.
Aki
On April 11, 2017 at 8:29 PM Bobber
wrote: Not working:
patching file userdb-vpopmail.c Hunk #1 FAILED at 54. 1 out of 1 hunk FAILED -- saving rejects to file userdb-vpopmail.c.rej
-------- Original Message -------- Subject: Re: Vpopmail Error From: Aki Tuomi
To: dovecot@dovecot.org, Bobber Date: 04/11/2017 12:13 PM diff --git a/src/auth/userdb-vpopmail.c b/src/auth/userdb-vpopmail.c index 5042dcf..d344fcd 100644 --- a/src/auth/userdb-vpopmail.c +++ b/src/auth/userdb-vpopmail.c @@ -54,7 +54,7 @@ struct vqpasswd *vpopmail_lookup_vqp(struct auth_request *request, static const char * userdb_vpopmail_get_quota(const char *template, const char *vpop_str) { - const struct var_expand_table *tab; + struct var_expand_table *tab; string_t *quota;
if (template == NULL || *vpop_str == '\0' ||
can you give this a go? It should repair the build.
Aki
On April 11, 2017 at 7:32 PM Bobber
wrote: Still not working. I'm now getting this error:
userdb-vpopmail.c: In function ‘userdb_vpopmail_get_quota’: userdb-vpopmail.c:65:13: error: assignment of member ‘key’ in read-only object tab[0].key = 'q'; ^ userdb-vpopmail.c:66:15: error: assignment of member ‘value’ in read-only object tab[0].value = format_maildirquota(vpop_str); ^ Makefile:2048: recipe for target 'auth-userdb-vpopmail.o' failed make[3]: *** [auth-userdb-vpopmail.o] Error 1 make[3]: Leaving directory '/usr/local/src/dovecot-2.2.29/src/auth' Makefile:496: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/usr/local/src/dovecot-2.2.29/src' Makefile:619: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/dovecot-2.2.29' Makefile:463: recipe for target 'all' failed make: *** [all] Error 2 -------- Original Message -------- Subject: Re: Vpopmail Error From: Timo Sirainen
To: Bobber Date: 04/11/2017 02:28 AM On 10 Apr 2017, at 23.55, Bobber mailto:bobber@kc0dxf.net> wrote: I'm trying to compile the latest Dovecot (v2.2.29) and when I run make I get this error:
> auth-userdb-vpopmail.o: In function `userdb_vpopmail_get_quota': > /usr/local/src/dovecot-2.2.29/src/auth/userdb-vpopmail.c:64: > undefined reference to `var_expand_table_build' > collect2: error: ld returned 1 exit status > Makefile:932: recipe for target 'auth' failed > make[3]: *** [auth] Error 1 > make[3]: Leaving directory '/usr/local/src/dovecot-2.2.29/src/auth' > Makefile:496: recipe for target 'all-recursive' failed > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory '/usr/local/src/dovecot-2.2.29/src' > Makefile:619: recipe for target 'all-recursive' failed > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory '/usr/local/src/dovecot-2.2.29' > Makefile:463: recipe for target 'all' failed > make: *** [all] Error 2 I'm using Debian Jessie and it's up to date. Just to make sure it wasn't something in Jessie I went back into v2.2.28 (which I've been using since it was released) and did a clean build successfully.
I've never had any problems compiling dovecot up until now. Any ideas on how to fix this? Fixed by https://github.com/dovecot/core/commit/892ba92f54b853dd7cf860eca771e441ca963...
-- *Bob Wooldridge* Blog: http://kc0dxf.net/blog/ -- *Bob Wooldridge* Blog: http://kc0dxf.net/blog/
-- Eric Broch, IMSO, DAM, NGOO, DITH, URTS White Horse Technical Consulting (WHTC)