From 77917f5cc64b444db2a76def92161186db66670b Mon Sep 17 00:00:00 2001 From: Peter Adam Date: Thu, 7 Dec 2023 23:45:02 +0100 Subject: [PATCH] scripts: Install arm64 rspamd from official repository (#3686) * scripts: Install rspamd from official repository instead of debian backports on arm64 architecture * Remove unnecessary deb-src repository for rspamd * Remove note about ARM64 rspamd version, update CHANGELOG.md --------- Co-authored-by: Peter Adam --- CHANGELOG.md | 2 ++ docs/content/config/security/rspamd.md | 4 ---- target/scripts/build/packages.sh | 23 ++++------------------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ef5057..10d2bb25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ All notable changes to this project will be documented in this file. The format - **Internal**: - The container startup welcome log message now references `DMS_RELEASE` ([#3676](https://github.com/docker-mailserver/docker-mailserver/pull/3676)) - `VERSION` was incremented for prior releases to be notified of the v13.0.1 patch release ([#3676](https://github.com/docker-mailserver/docker-mailserver/pull/3676)) +- **Rspamd:** + - Switch to official arm64 packages to avoid segfaults ([#3686](https://github.com/docker-mailserver/docker-mailserver/pull/3686)) ## [v13.0.1](https://github.com/docker-mailserver/docker-mailserver/releases/tag/v13.0.1) diff --git a/docs/content/config/security/rspamd.md b/docs/content/config/security/rspamd.md index 442e5e78..fe9bd5ea 100644 --- a/docs/content/config/security/rspamd.md +++ b/docs/content/config/security/rspamd.md @@ -8,10 +8,6 @@ Rspamd is a ["fast, free and open-source spam filtering system"][rspamd-homepage If you want to have a look at the default configuration files for Rspamd that DMS packs, navigate to [`target/rspamd/` inside the repository][dms-default-configuration]. Please consult the [section "The Default Configuration"](#the-default-configuration) section down below for a written overview. -!!! note "AMD64 vs ARM64" - - We are currently doing a best-effort installation of Rspamd for ARM64 (from the Debian backports repository for Debian 11). The current version difference as of 23rd Apr 2023: AMD64 is at version 3.5 | ARM64 is at version 3.4. - [rspamd-homepage]: https://rspamd.com/ [dms-default-configuration]: https://github.com/docker-mailserver/docker-mailserver/tree/master/target/rspamd diff --git a/target/scripts/build/packages.sh b/target/scripts/build/packages.sh index 97ebae04..ec468d41 100644 --- a/target/scripts/build/packages.sh +++ b/target/scripts/build/packages.sh @@ -130,29 +130,14 @@ function _install_dovecot() { function _install_rspamd() { _log 'trace' 'Adding Rspamd package signatures' local DEB_FILE='/etc/apt/sources.list.d/rspamd.list' - local RSPAMD_PACKAGE_NAME - # We try getting the most recent version of Rspamd for aarch64 (from an official source, which - # is the backports repository). The version for aarch64 is 3.2; the most recent version for amd64 - # that we get with the official PPA is 3.4. - # - # Not removing it later is fine as you have to explicitly opt into installing a backports package - # which is not something you could be doing by accident. - if [[ $(uname --machine) == 'aarch64' ]]; then - echo '# Official Rspamd PPA does not support aarch64, so we use the Bullseye backports' >"${DEB_FILE}" - echo 'deb [arch=arm64] http://deb.debian.org/debian bullseye-backports main' >>"${DEB_FILE}" - RSPAMD_PACKAGE_NAME='rspamd/bullseye-backports' - else - curl -sSfL https://rspamd.com/apt-stable/gpg.key | gpg --dearmor >/etc/apt/trusted.gpg.d/rspamd.gpg - local URL='[arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/ bullseye main' - echo "deb ${URL}" >"${DEB_FILE}" - echo "deb-src ${URL}" >>"${DEB_FILE}" - RSPAMD_PACKAGE_NAME='rspamd' - fi + curl -sSfL https://rspamd.com/apt-stable/gpg.key | gpg --dearmor >/etc/apt/trusted.gpg.d/rspamd.gpg + local URL='[signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/ bullseye main' + echo "deb ${URL}" >"${DEB_FILE}" _log 'debug' 'Installing Rspamd' apt-get "${QUIET}" update - apt-get "${QUIET}" --no-install-recommends install "${RSPAMD_PACKAGE_NAME}" 'redis-server' + apt-get "${QUIET}" --no-install-recommends install 'rspamd' 'redis-server' } function _install_fail2ban() {