From c2d2df7bb26a4958d09203545e22358b41cfab9b Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 25 Sep 2017 10:16:16 +0200 Subject: [PATCH] revert to pigeonhole 0.4.18 --- Dockerfile | 18 +++++++++++++++--- i_zero.patch | 12 ++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 i_zero.patch diff --git a/Dockerfile b/Dockerfile index b549851..6bb33ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,20 @@ FROM registry.gitlab.com/thallian/docker-confd-env:master -RUN apk add --no-cache dovecot dovecot-ldap libressl ssmtp ca-certificates -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ - dovecot-pigeonhole-plugin-ldap +ADD i_zero.patch /usr/include/dovecot/i_zero.patch + +RUN apk add --no-cache dovecot dovecot-ldap libressl ssmtp ca-certificates g++ openldap-dev dovecot-dev make tar && \ + cd /usr/include/dovecot && \ + patch -p1 < i_zero.patch && \ + rm /usr/include/dovecot/i_zero.patch && \ + mkdir /tmp/pigeonhole && \ + wget -qO- https://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-0.4.18.tar.gz | tar -xz -C /tmp/pigeonhole --strip 1 && \ + cd /tmp/pigeonhole && \ + ./configure --with-ldap=yes --with-dovecot=/usr/lib/dovecot && \ + make && make install && \ + rm -r /tmp/pigeonhole && \ + apk del g++ openldap-dev dovecot-dev make tar + +WORKDIR / RUN addgroup -g 1111 vmail RUN adduser -u 1111 -h /var/lib/vmail -D -G vmail vmail diff --git a/i_zero.patch b/i_zero.patch new file mode 100644 index 0000000..ecef32e --- /dev/null +++ b/i_zero.patch @@ -0,0 +1,12 @@ +diff --git a/macros.h b/macros.h +index 566c176..ebbf480 100644 +--- a/macros.h ++++ b/macros.h +@@ -240,4 +240,7 @@ + # define STATIC_ARRAY + #endif + ++#define i_zero(p) memset(p, 0, sizeof(*(p))) ++#define i_zero_safe(p) safe_memset(p, 0, sizeof(*(p))) ++ + #endif