From 4f4da1c7a14c4398b1533137f8209b9b0b7a69cc Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Fri, 23 Oct 2026 15:29:22 +0200 Subject: [PATCH] feat(roundcube): update to 1.7.5 1.7 serves only public_html, so the vhost points there and passes static.php/ as PATH_INFO. index.php no longer carries the version, iniset.php does. The complete tarball ships vendor/, so composer is gone; updatedb.sh now runs after each extract. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RywMtsL8qXG7GDY3MHq9Uh --- bundles/roundcube/items.py | 30 +++++++++++------------------- bundles/roundcube/metadata.py | 3 +-- data/roundcube/vhost.conf | 17 +++++++---------- nodes/htz.mails.py | 2 +- 4 files changed, 20 insertions(+), 32 deletions(-) diff --git a/bundles/roundcube/items.py b/bundles/roundcube/items.py index 8a8e1cc..06e7a03 100644 --- a/bundles/roundcube/items.py +++ b/bundles/roundcube/items.py @@ -34,7 +34,7 @@ actions['delete_roundcube'] = { } actions['extract_roundcube'] = { 'command': f'tar xfvz /tmp/roundcube-{roundcube_version}.tar.gz --strip 1 -C /opt/roundcube', - 'unless': f'grep -q "Version {roundcube_version}" /opt/roundcube/index.php', + 'unless': f'grep -q "\'RCMAIL_VERSION\', \'{roundcube_version}\'" /opt/roundcube/program/include/iniset.php', 'preceded_by': [ 'action:delete_roundcube', f'file:/tmp/roundcube-{roundcube_version}.tar.gz', @@ -44,12 +44,21 @@ actions['extract_roundcube'] = { ], 'triggers': [ 'action:chown_roundcube', - 'action:composer_lock_reset', ], } actions['chown_roundcube'] = { 'command': 'chown -R www-data /opt/roundcube', 'triggered': True, + 'triggers': [ + 'action:update_roundcube_database', + ], +} +actions['update_roundcube_database'] = { + 'command': "su www-data -s /bin/sh -c '/opt/roundcube/bin/updatedb.sh --package=roundcube --dir=/opt/roundcube/SQL'", + 'triggered': True, + 'needs': [ + 'file:/opt/roundcube/config/config.inc.php', + ], } @@ -80,20 +89,3 @@ files['/opt/roundcube/plugins/password/config.inc.php'] = { 'action:chown_roundcube', ], } -actions['composer_lock_reset'] = { - 'command': 'rm /opt/roundcube/composer.lock', - 'triggered': True, - 'needs': [ - 'action:chown_roundcube', - ], - 'triggers': [ - 'action:composer_install', - ], -} -actions['composer_install'] = { - 'command': "cp /opt/roundcube/composer.json-dist /opt/roundcube/composer.json && su www-data -s /bin/bash -c '/usr/bin/composer -d /opt/roundcube install'", - 'triggered': True, - 'needs': [ - 'action:chown_roundcube', - ], -} diff --git a/bundles/roundcube/metadata.py b/bundles/roundcube/metadata.py index f6b8579..f6c008f 100644 --- a/bundles/roundcube/metadata.py +++ b/bundles/roundcube/metadata.py @@ -21,7 +21,6 @@ defaults = { 'php-zip': {}, 'php-curl': {}, 'php-gd': {}, - 'composer': {}, 'php-ldap': {}, }, }, @@ -66,7 +65,7 @@ def vhost(metadata): metadata.get('mailserver/hostname'): { 'content': 'roundcube/vhost.conf', 'context': { - 'root': '/opt/roundcube', + 'root': '/opt/roundcube/public_html', }, }, }, diff --git a/data/roundcube/vhost.conf b/data/roundcube/vhost.conf index 043a017..43b7536 100644 --- a/data/roundcube/vhost.conf +++ b/data/roundcube/vhost.conf @@ -13,19 +13,16 @@ server { try_files $uri $uri/ /index.php; } - location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { - deny all; - } - location ~ ^/(bin|SQL)/ { - deny all; - } - - location ~ \.php$ { - try_files $uri =404; + # assets are served through static.php/ + location ~ \.php(?:$|/) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + set $path_info $fastcgi_path_info; + try_files $fastcgi_script_name =404; fastcgi_pass php-handler; fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include params/fastcgi; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $path_info; } location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ { diff --git a/nodes/htz.mails.py b/nodes/htz.mails.py index d9aa935..7abb484 100644 --- a/nodes/htz.mails.py +++ b/nodes/htz.mails.py @@ -174,7 +174,7 @@ }, 'roundcube': { 'product_name': 'Sublimity Mail', - 'version': '1.6.11', + 'version': '1.7.5', 'installer': False, }, 'sysctl': {