From 37eec5dd09cd00ed2daf526380d025a82003c1f5 Mon Sep 17 00:00:00 2001 From: JesusPerez Date: Thu, 13 Jan 2022 14:00:37 +0000 Subject: [PATCH] chore: update to 1.5.2 --- CHANGELOG.md | 8 ++++++++ pipeline/pipe-resource.yaml | 2 +- repo-config.yaml | 4 ++-- src/Dockerfile | 30 +++++++++++++++++++----------- src/docker-entrypoint.sh | 18 ++++++++++++++++-- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d106dc3..fa72f5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,3 +28,11 @@ source: droundcubemail-docker/fpm-alpine date: 29 June 2021 source: droundcubemail-docker/fpm-alpine + +--- + +## roundcubemail-docker 1.5.2 on php 7.4 + +date: 13 January 2022 + +source: droundcubemail-docker/fpm-alpine diff --git a/pipeline/pipe-resource.yaml b/pipeline/pipe-resource.yaml index ef330b7..92d06b8 100644 --- a/pipeline/pipe-resource.yaml +++ b/pipeline/pipe-resource.yaml @@ -7,7 +7,7 @@ spec: type: image params: - name: url - value: termas.librecloud.online/termas_librecloud/roundcubemail:1.4.11 + value: termas.librecloud.online/termas_librecloud/roundcubemail:1.5.2 --- apiVersion: tekton.dev/v1alpha1 kind: PipelineResource diff --git a/repo-config.yaml b/repo-config.yaml index fa8332f..df411a7 100644 --- a/repo-config.yaml +++ b/repo-config.yaml @@ -7,8 +7,8 @@ Source: roundcubemail-docker/fpm-alpine # Name - Version, etc Name: roundcubemail -Version: 1.4.11 +Version: 1.5.2 # To get latest IMAGE_NAME: roundcube/roundcubemail -IMAGE_MATCH: 1.4 +IMAGE_MATCH: 1.5 diff --git a/src/Dockerfile b/src/Dockerfile index 86f1807..08fc22d 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -8,13 +8,16 @@ RUN set -ex; \ bash \ coreutils \ rsync \ - tzdata + tzdata \ + aspell \ + aspell-en RUN set -ex; \ \ apk add --no-cache --virtual .build-deps \ $PHPIZE_DEPS \ icu-dev \ + freetype-dev \ imagemagick-dev \ libjpeg-turbo-dev \ libpng-dev \ @@ -23,9 +26,10 @@ RUN set -ex; \ openldap-dev \ postgresql-dev \ sqlite-dev \ + aspell-dev \ ; \ \ - docker-php-ext-configure gd; \ + docker-php-ext-configure gd --with-jpeg --with-freetype; \ docker-php-ext-configure ldap; \ docker-php-ext-install \ exif \ @@ -36,9 +40,10 @@ RUN set -ex; \ pdo_pgsql \ pdo_sqlite \ zip \ + pspell \ ; \ - pecl install imagick; \ - docker-php-ext-enable imagick; \ + pecl install imagick redis; \ + docker-php-ext-enable imagick opcache redis; \ \ runDeps="$( \ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ @@ -49,11 +54,7 @@ RUN set -ex; \ apk add --virtual .roundcubemail-phpext-rundeps imagemagick $runDeps; \ apk del .build-deps -# add composer.phar -ADD https://getcomposer.org/installer /tmp/composer-installer.php - -RUN php /tmp/composer-installer.php --install-dir=/usr/local/bin/; \ - rm /tmp/composer-installer.php +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer # expose these volumes @@ -63,7 +64,10 @@ VOLUME /var/www/html VOLUME /tmp/roundcube-temp # Define Roundcubemail version -ENV ROUNDCUBEMAIL_VERSION 1.4.11 +ENV ROUNDCUBEMAIL_VERSION 1.5.2 + +# Define the GPG key used for the bundle verification process +ENV ROUNDCUBEMAIL_KEYID "F3E4 C04B B3DB 5D42 15C4 5F7F 5AB2 BAA1 41C4 F7D5" # Download package and extract to web volume RUN set -ex; \ @@ -76,7 +80,11 @@ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ # workaround for "Cannot assign requested address", see e.g. https://github.com/inversepath/usbarmory-debian-base_image/issues/9 echo "disable-ipv6" > "$GNUPGHOME/dirmngr.conf"; \ - curl -fSL https://roundcube.net/download/pubkey.asc | gpg --batch --import -; \ + curl -fSL https://roundcube.net/download/pubkey.asc -o /tmp/pubkey.asc; \ + LC_ALL=C.UTF-8 gpg -n --show-keys --with-fingerprint --keyid-format=long /tmp/pubkey.asc | if [ $(grep -c -o 'Key fingerprint') != 1 ]; then echo 'The key file should contain only one GPG key'; exit 1; fi; \ + LC_ALL=C.UTF-8 gpg -n --show-keys --with-fingerprint --keyid-format=long /tmp/pubkey.asc | if [ $(grep -c -o "${ROUNDCUBEMAIL_KEYID}") != 1 ]; then echo 'The key ID should be the roundcube one'; exit 1; fi; \ + gpg --batch --import /tmp/pubkey.asc; \ + rm /tmp/pubkey.asc; \ gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \ gpgconf --kill all; \ mkdir /usr/src/roundcubemail; \ diff --git a/src/docker-entrypoint.sh b/src/docker-entrypoint.sh index a476dc5..50afaa6 100755 --- a/src/docker-entrypoint.sh +++ b/src/docker-entrypoint.sh @@ -18,7 +18,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then INSTALLDIR=`pwd` echo >&2 "roundcubemail found in $INSTALLDIR - installing update..." (cd /usr/src/roundcubemail && bin/installto.sh -y $INSTALLDIR) - composer.phar update --no-dev + composer update --no-dev fi if [ -f /run/secrets/roundcube_db_user ]; then @@ -68,7 +68,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then : "${ROUNDCUBEMAIL_SMTP_SERVER:=localhost}" : "${ROUNDCUBEMAIL_SMTP_PORT:=587}" : "${ROUNDCUBEMAIL_PLUGINS:=archive,zipdownload}" - : "${ROUNDCUBEMAIL_SKIN:=larry}" + : "${ROUNDCUBEMAIL_SKIN:=elastic}" : "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}" if [ ! -e config/config.inc.php ]; then @@ -81,6 +81,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then \$config['log_driver'] = 'stdout'; \$config['zipdownload_selection'] = true; \$config['des_key'] = '${GENERATED_DES_KEY}'; + \$config['enable_spellcheck'] = true; + \$config['spellcheck_engine'] = 'pspell'; include(__DIR__ . '/config.docker.inc.php'); " > config/config.inc.php @@ -108,6 +110,11 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then echo "\$config['des_key'] = getenv('ROUNDCUBEMAIL_DES_KEY');" >> config/config.docker.inc.php fi + if [ ! -z "${ROUNDCUBEMAIL_SPELLCHECK_URI}"]; then + echo "\$config['spellcheck_engine'] = 'googie';" >> config/config.docker.inc.php + echo "\$config['spellcheck_uri'] = '${ROUNDCUBEMAIL_SPELLCHECK_URI}';" >> config/config.docker.inc.php + fi + # include custom config files for fn in `ls /var/roundcube/config/*.php 2>/dev/null || true`; do echo "include('$fn');" >> config/config.docker.inc.php @@ -131,6 +138,13 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then echo "${ROUNDCUBEMAIL_LOCALE}" > /etc/locale.gen /usr/sbin/locale-gen fi + + if [ ! -z "${ROUNDCUBEMAIL_ASPELL_DICTS}" ]; then + ASPELL_PACKAGES=`echo -n "aspell-${ROUNDCUBEMAIL_ASPELL_DICTS}" | sed -E "s/[, ]+/ aspell-/g"` + which apt-get && apt-get install -y $ASPELL_PACKAGES + which apk && apk add --no-cache $ASPELL_PACKAGES + fi + fi exec "$@"