Upgrade roundcube fails with raspberry

My YunoHost server

Hardware:: Raspberry Pi at home
YunoHost version: 4.3.4*
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Roundcube upgrade fails because a composer php dependencies ? on a raspberry Pi 3+

logs here:

https://paste.yunohost.org/raw/wilududola

Can you test to upgrade from this repo?

sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/composer

It doesn’t match

$ sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/composer
Info: Now upgrading roundcube...
Info: [....................] > Loading installation settings...
Info: [+...................] > Backing up roundcube before upgrading (may take a while)...
Warning: 1027 /usr/share/yunohost/helpers.d/php: line 468: YNH_DEFAULT_COMPOSER_VERSION: readonly variable
Info: [#...................] > Ensuring downward compatibility...
Info: [#+..................] > Making sure dedicated system user exists...
Info: [##..................] > Upgrading source files...
Info: [##..................] > Upgrading NGINX web server configuration...
Info: [##+.................] > Upgrading dependencies...
Info: [###+................] > Upgrading PHP-FPM configuration...
Info: [####................] > Reconfiguring Roundcube...
Info: [####+++++++.........] > Updating dependencies with Composer...
Warning: Unable to install core dependencies with Composer.
Warning: [Error] Upgrade failed.
Warning: /usr/share/yunohost/helpers.d/php: line 468: YNH_DEFAULT_COMPOSER_VERSION: readonly variable
Warning: 28896 /usr/share/yunohost/helpers.d/php: line 468: YNH_DEFAULT_COMPOSER_VERSION: readonly variable
Warning: 60592 Packagers ! Please do not use a separate php ini file, merge your directives in the pool file instead.
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade roundcube: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'roundcube' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20211127-125742-app_upgrade-roundcube' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + declare -Ar args_array
Info: DEBUG - + workdir=/var/www/roundcube
Info: DEBUG - + phpversion=7.3
Info: DEBUG - + COMPOSER_HOME=/var/www/roundcube/.composer
Info: DEBUG - + COMPOSER_MEMORY_LIMIT=-1
Info: DEBUG - + php7.3 /var/www/roundcube/composer.phar install --no-dev -d /var/www/roundcube --no-interaction --no-ansi
Info: DEBUG - Loading "roundcube/plugin-installer" which is a legacy composer-installer built for Composer 1.x, it is likely to cause issues as you are running Composer 2.x.
Info: DEBUG - Do not run Composer as root/super user! See https://getcomposer.org/root for details
Info: DEBUG - Installing dependencies from lock file
Info: DEBUG - Verifying lock file contents can be installed on current platform.
Info: DEBUG - Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Info: DEBUG - Your lock file does not contain a compatible set of packages. Please run composer update.
Info: DEBUG -
Info: DEBUG -   Problem 1
Info: DEBUG -     - kolab/net_ldap3 is locked to version dev-master and an update of this package was not requested.
Info: DEBUG -     - kolab/net_ldap3 dev-master requires pear/net_ldap2 >=2.0.12 -> found pear/net_ldap2[dev-master] but it does not match the constraint.
Info: DEBUG -
Info: DEBUG - Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Info: DEBUG - + ynh_die '--message=Unable to install core dependencies with Composer.'
Info: DEBUG - + ynh_exit_properly
Error: The operation 'Upgrade the 'roundcube' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20211127-125742-app_upgrade-roundcube' to get help

full logs here: https://paste.yunohost.org/raw/pafobicewe

Hi,
Not sure if my glitch is related so feel free move it in another thread.
I also encounter some issues upgrading roundcube on an Rpi4.
The upgrade seems to upgrade on a backup I manually deleted.
https://paste.yunohost.org/raw/uwesuwakuj

Is it doable to make an upgrade without backing up?

cheers

edit: sounds good after I renaming an other backup archive with the name of the missing one. Looks like it’s necessary to remove any backups using yunohost tool and not manually.

@rodinux I made a mistake in the code… can you retry to upgrade from this branch:

sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/composer

it seems to return the same error

the logs here:
https://paste.yunohost.org/raw/megowozade

Hello, I still can’t upgrade Rouncube on the raspberry…
here are my logs
https://paste.yunohost.org/raw/gomupuboja
But I have seen something wrong the directories in /var/www/roundcube was chown by root:root. I had have a look on another raspberry (a Pi4) with roundcube, it was something like:

sudo ls -l /var/www/roundcube/
total 2844
drwxr-x---  2 roundcube www-data    4096 Nov 29 02:56 bin
-rw-r-----  1 roundcube www-data  186666 Feb  8  2021 CHANGELOG
-rw-r-----  1 roundcube www-data  198410 Nov 22 22:12 CHANGELOG.md
-rw-r-----  1 roundcube www-data    1146 Nov 29 02:58 composer.json
-rw-r-----  1 roundcube www-data    1003 Nov 22 22:12 composer.json-dist
-rw-r-----  1 roundcube www-data   92955 Nov 29 02:57 composer.lock
-rwxr-xr-x  1 root      root     2270854 Nov 29 02:57 composer.phar
drwxr-x---  2 roundcube www-data    4096 Nov 29 02:57 config
-rw-r-----  1 roundcube www-data   11582 Nov 29 02:56 index.php
-rw-r-----  1 roundcube www-data   11413 Nov 22 22:12 index.php.orig
-rw-r-----  1 roundcube www-data   12646 Nov 22 22:12 INSTALL
drwxr-x---  3 roundcube www-data    4096 Nov 29 02:56 installer
-rw-r-----  1 roundcube www-data    4431 Nov 22 22:12 jsdeps.json
-rw-r-----  1 roundcube www-data   35147 Nov 22 22:12 LICENSE
drwxr-x---  2 roundcube www-data    4096 Nov 29 02:56 logs
drwxr-x--- 38 roundcube www-data    4096 Nov 29 02:56 plugins
drwxr-x---  9 roundcube www-data    4096 Nov 29 02:56 program
drwxr-x---  3 roundcube www-data    4096 Nov 29 02:56 public_html
-rw-r-----  1 roundcube www-data    3852 Nov 22 22:12 README.md
-rw-r-----  1 roundcube www-data     967 Nov 22 22:12 SECURITY.md
drwxr-x---  5 roundcube www-data    4096 Nov 22 22:12 skins
drwxr-x---  7 roundcube www-data    4096 Nov 22 22:12 SQL
drwxr-x---  3 roundcube www-data    4096 Nov 29 02:56 temp
-rw-r-----  1 roundcube www-data    4657 Nov 22 22:12 UPGRADING
drwxr-x---  9 roundcube www-data    4096 Nov 29 02:57 vendor

So I change the ownners like this model, but I steel have the error…

Ok, I change the owners with my model and I suspect a mistake years ago here Mise à jour Roundcube: Update dependencies by running `php composer.phar update --no-dev`

Help me ! I can’t upgrade. What can I do to reinstall properly roundube ? Or can I install Rainloop instead and migrate the old mails from roundcube ?

Waouw, I have also an error trying install rainloop, logs are here
https://paste.yunohost.org/raw/afecorufoh
What is this ? :

DEBUG - + ynh_die '--message=The certificate'\''s owner does not match hostname ‘objects.githubusercontent.com’'
Info: WARNING - The certificate's owner does not match hostname ‘objects.githubusercontent.com’

Do you mean this ??

sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/composer-2

Ho, no it isn’t a solution… Perhaps something due with this: Warning in ynh backup : YNH_DEFAULT_COMPOSER_VERSION readonly variable

What can I do ??

Bon, j’ai toujours (de nouveau) pas les bonnes permissions !!

/var/www/roundcube# ls -l 
total 2336
drwxr-xr-x  2 root      root         4096 Feb 18  2021 bin
-rw-r--r--  1 root      root       186666 Feb  8  2021 CHANGELOG
-rw-r--r--  1 root      root         1238 Feb 18  2021 composer.json
-rw-r--r--  1 root      root          943 Feb  8  2021 composer.json-dist
-rw-r--r--  1 root      root        33032 Feb 18  2021 composer.lock
-rwxr-xr-x  1 root      root      1996311 Feb 18  2021 composer.phar
drwxr-xr-x  2 root      root         4096 Feb 18  2021 config
-rw-r--r--  1 root      root        12843 Feb  8  2021 index.php
-rw-r--r--  1 root      root        12864 Feb  8  2021 INSTALL
drwxr-xr-x  3 root      root         4096 Feb 18  2021 installer
-rw-r--r--  1 root      root         4087 Feb  8  2021 jsdeps.json
-rw-r--r--  1 root      root        35147 Feb  8  2021 LICENSE
drwxr-xr-x  2 roundcube roundcube    4096 Feb 18  2021 logs
drwxr-xr-x 39 root      root         4096 Feb  8  2021 plugins
drwxr-xr-x  8 root      root         4096 Feb  8  2021 program
drwxr-xr-x  3 root      root         4096 Feb 18  2021 public_html
-rw-r--r--  1 root      root         3810 Feb  8  2021 README.md
-rw-r--r--  1 root      root           26 Jul 24  2016 robots.txt
drwxr-xr-x  5 root      root         4096 Feb  8  2021 skins
drwxr-xr-x  7 root      root         4096 Feb  8  2021 SQL
drwxr-xr-x  3 roundcube roundcube   28672 Jul 15 18:11 temp
-rw-r--r--  1 root      root         4148 Feb  8  2021 UPGRADING
drwxr-xr-x  9 root      root         4096 Feb 18  2021 vendor

crotte alors !!!

Bon j’ai remis les permissions comme mon exemple d’un autre serveur sur un raspberry pour commencer !!
Ensuite, je découvre ce problème, dans celui qui fonctionne, avec la version mise à jour de roundcube 1.5.1~ynh1, j’ai ces infos pour composer:

Checking composer version: You are not running the latest stable version, run `composer self-update` to update (2.1.1 => 2.1.14)
Composer version: 2.1.1
PHP version: 7.3.33

Et celui avec rouncube 1.4.11~ynh2 qui coince pour la mise à jour (et où les permissions n’étaient pas bonnes avant)

Checking composer version: You are not running the latest stable version, run `composer self-update` to update (1.10.17 => 2.1.14)
Composer version: 1.10.17
PHP version: 7.3.33

Donc j’imagine que je dois passer d’abord à la version 2.1.1 peut-être ???

J’ai essayé aussi de faire ceci composer.phar update 2.1.1

Surtout je découvre une grosse incohérence dans les fichiers composer.json
Dans celui qui va bien

# cat composer.json
{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net"
        }
    ],
    "require": {
        "php": ">=5.5.0",
        "pear/pear-core-minimal": "~1.10.1",
        "pear/auth_sasl": "~1.1.0",
        "pear/net_idna2": "~0.2.0",
        "pear/mail_mime": "~1.10.0",
        "pear/net_smtp": "~1.10.0",
        "pear/crypt_gpg": "~1.6.3",
        "pear/net_sieve": "~1.4.5",
        "roundcube/plugin-installer": "~0.3.0",
        "masterminds/html5": "~2.7.0",
        "endroid/qr-code": "~1.6.5",
        "kolab/net_ldap3": "^1.1",
        "johndoh/contextmenu": "2.3",
        "sblaisot/automatic_addressbook": "v0.4.3",
        "roundcube/rtf-html-php": "~2.1",
        "guzzlehttp/guzzle": "^6.5.5"
    },
    "require-dev": {
        "phpunit/phpunit": "^4.8.36 || ^5.7.21"
    },
    "suggest": {
        "kolab/net_ldap3": "~1.1.1 required for connecting to LDAP",
        "mkopinsky/zxcvbn-php": "^4.4.2 required for Zxcvbn password strength driver"
    }
}

dans celui qui cloche

{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/roundcube/Net_Sieve.git"
        },
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net/"
        },
        {
            "type": "vcs",
            "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git"
        },
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net"
        }
    ],
    "require": {
        "roundcube/plugin-installer": "~0.2.0",
        "johndoh/contextmenu": "dev-release-2.1",
        "sblaisot/automatic_addressbook": "^0.4.2",
        "php": ">=5.4.0 <8",
        "pear/pear-core-minimal": "~1.10.1",
        "pear/net_socket": "~1.2.1",
        "pear/auth_sasl": "~1.1.0",
        "pear/net_idna2": "~0.2.0",
        "pear/mail_mime": "~1.10.0",
        "pear/net_smtp": "~1.8.1",
        "pear/crypt_gpg": "~1.6.3",
        "pear/net_sieve": "~1.4.3",
        "endroid/qr-code": "~1.6.5",
        "masterminds/html5": "~2.5.0",
        "kolab/net_ldap3": "dev-master"
    },
    "minimum-stability": "dev"
}

I just have installed rainloop and roundcube with no problems.
Did you check the diagnosis?

I have finally installed Rainloop with success and now remove Roundcube because it was so difficult resolve… And this resolve this mismatch issue…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.