Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (55 sloc) 2.43 KB
#!/bin/bash
depends_on zlib ## opportunistic linking, for compressed mbox, maildir and dbox files
depends_on bzip2 ## opportunistic linking, for compressed mbox, maildir and dbox files
depends_on xz ## opportunistic linking, for compressed mbox, maildir and dbox files
depends_on liblz4 ## opportunistic linking, for compressed mbox, maildir and dbox files
depends_on openssl ## opportunistic linking, for encrypted transfers with clients
fetch_source http://dovecot.org/releases/2.3/dovecot-2.3.2.tar.gz 711e2068b5f45b2b5ffe9819b5ed119b49e2da9c
do_unpack
do_patch_inline << EOF ## work around old libc that can't handle const int
--- dovecot-2.2.15.tar.gz.orig/src/auth/db-checkpassword.c 2014-06-02 15:50:10.000000000 +0400
+++ dovecot-2.2.15.tar.gz/src/auth/db-checkpassword.c 2015-02-14 15:40:33.972000000 +0300
@@ -428,19 +428,20 @@
{
struct chkpw_auth_request *request =
hash_table_lookup(db->clients, POINTER_CAST(status->pid));
+ int stat = status->status;
i_assert(request != NULL);
hash_table_remove(db->clients, POINTER_CAST(status->pid));
request->exited = TRUE;
- if (WIFSIGNALED(status->status)) {
+ if (WIFSIGNALED(stat)) {
auth_request_log_error(request->request, AUTH_SUBSYS_DB,
"Child %s died with signal %d",
- dec2str(status->pid), WTERMSIG(status->status));
+ dec2str(status->pid), WTERMSIG(stat));
checkpassword_internal_failure(&request);
- } else if (WIFEXITED(status->status)) {
- request->exit_status = WEXITSTATUS(status->status);
+ } else if (WIFEXITED(stat)) {
+ request->exit_status = WEXITSTATUS(stat);
auth_request_log_debug(request->request, AUTH_SUBSYS_DB,
"exit_status=%d", request->exit_status);
@@ -449,7 +450,7 @@
/* shouldn't happen */
auth_request_log_debug(request->request, AUTH_SUBSYS_DB,
"Child %s exited with status=%d",
- dec2str(status->pid), status->status);
+ dec2str(status->pid), stat);
checkpassword_internal_failure(&request);
}
}
EOF
CONFFLAGS=(
--localstatedir=$PREFIX/var
--with-moduledir=$PREFIX/lib/dovecot/modules
--sysconfdir=$PREFIX/etc
--without-libcap
--without-pam
--without-stemmer
--without-textcat
--without-icu
--without-apparmor
)
do_compile "${CONFFLAGS[@]}"
mkdir -p $PREFIX/var/log