From 411984928415e5cbfdd3c473f171dfd3c3383c96 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Date: Sat, 25 May 2024 19:49:45 +0200 Subject: [PATCH] update: Dovecot FTS Xapian from 1.5.5 to 1.7.12 (#4034) * update `compile.sh` and Dovecot FTS Xapian to 1.7.12 - I updated from 1.5.5. Moreover, I adjusted the script to have what I consider better style. * update Dockerfile to use recent updates * update CHANGELOG --- CHANGELOG.md | 1 + Dockerfile | 4 ++-- target/scripts/build/compile.sh | 22 +++++++++++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f8adb9..c791ac5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ The most noteworthy change of this release is the update of the container's base - The symbol weights of SPF, DKIM and DMARC have been adjusted again. Fixes a bug and includes more appropriate combinations of symbols ([#3913](https://github.com/docker-mailserver/docker-mailserver/pull/3913), [#3923](https://github.com/docker-mailserver/docker-mailserver/pull/3923)) - **Dovecot:** - `logwatch` now filters out non-error logs related to the status of the `index-worker` process for FTS indexing. ([#4012](https://github.com/docker-mailserver/docker-mailserver/pull/4012)) + - updated FTS Xapian from version 1.5.5 to 1.7.12 ### Fixes diff --git a/Dockerfile b/Dockerfile index bf688ec1..854c2332 100644 --- a/Dockerfile +++ b/Dockerfile @@ -82,8 +82,8 @@ EOF # install fts_xapian plugin -COPY --from=stage-compile dovecot-fts-xapian-1.5.5_1.5.5_*.deb / -RUN dpkg -i /dovecot-fts-xapian-1.5.5_1.5.5_*.deb && rm /dovecot-fts-xapian-1.5.5_1.5.5_*.deb +COPY --from=stage-compile dovecot-fts-xapian-1.7.12_1.7.12_*.deb / +RUN dpkg -i /dovecot-fts-xapian-1.7.12_1.7.12_*.deb && rm /dovecot-fts-xapian-1.7.12_1.7.12_*.deb COPY target/dovecot/*.inc target/dovecot/*.conf /etc/dovecot/conf.d/ COPY target/dovecot/dovecot-purge.cron /etc/cron.d/dovecot-purge.disabled diff --git a/target/scripts/build/compile.sh b/target/scripts/build/compile.sh index 56feea72..4c6fba82 100644 --- a/target/scripts/build/compile.sh +++ b/target/scripts/build/compile.sh @@ -8,21 +8,29 @@ set -eE -u -o pipefail # shellcheck source=../helpers/log.sh source /usr/local/bin/helpers/log.sh +# shellcheck disable=SC2310 _log_level_is 'trace' && QUIET='-y' || QUIET='-qq' function _compile_dovecot_fts_xapian() { apt-get "${QUIET}" update - apt-get "${QUIET}" --no-install-recommends install automake libtool pkg-config libicu-dev libsqlite3-dev libxapian-dev make build-essential dh-make devscripts dovecot-dev - curl -Lso dovecot-fts-xapian.tar.gz https://github.com/grosjo/fts-xapian/releases/download/1.5.5/dovecot-fts-xapian-1.5.5.tar.gz - tar xzvf dovecot-fts-xapian.tar.gz - cd fts-xapian-1.5.5 - USER=root dh_make -p dovecot-fts-xapian-1.5.5 --single --native --copyright gpl2 -y + apt-get "${QUIET}" --no-install-recommends install \ + automake libtool pkg-config libicu-dev libsqlite3-dev libxapian-dev make build-essential dh-make devscripts dovecot-dev + + local XAPIAN_VERSION='1.7.12' + curl -sSfL -o dovecot-fts-xapian.tar.gz \ + "https://github.com/grosjo/fts-xapian/releases/download/${XAPIAN_VERSION}/dovecot-fts-xapian-${XAPIAN_VERSION}.tar.gz" + tar xf dovecot-fts-xapian.tar.gz + + cd "fts-xapian-${XAPIAN_VERSION}" + USER=root dh_make -p "dovecot-fts-xapian-${XAPIAN_VERSION}" --single --native --copyright gpl2 -y + rm debian/*.ex cp PACKAGES/DEB/control debian/ cp PACKAGES/DEB/changelog debian/ cp PACKAGES/DEB/compat debian/ - sed -i 's/1\.4\.11-6/1.5.5/g' debian/control - sed -i 's/1\.4\.11-6/1.5.5/g' debian/changelog + + sed -i -E "s|(dovecot-fts-xapian)-[1-9\.-]+|\1-${XAPIAN_VERSION}|g" debian/control + sed -i -E "s|(dovecot-fts-xapian)-[1-9\.-]+ \(.*\)(.*)|\1-${XAPIAN_VERSION} (${XAPIAN_VERSION})\2|g" debian/changelog debuild -us -uc -B | tee /tmp/debuild.log 2>&1 }