Upgrade de Grav plante

Mon serveur YunoHost

Matériel: Serveur Dédié acheté en ligne
Version de YunoHost: 4.3.6.2
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

La nouvelle version 1.7.30~ynh1 de Grav n’a pas voulu se faire correctement. J’ai deux sites avec Grav.

sudo yunohost tools update
Info: Fetching available upgrades for system packages...
Info: Updating application catalog...
Success! The application catalog has been updated!
apps: 
  0: 
    current_version: 1.7.26.1~ynh1
    id: grav__2
    label: GravDocs
    new_version: 1.7.30~ynh1
  1: 
    current_version: 1.7.26.1~ynh1
    id: grav
    label: Grav
    new_version: 1.7.30~ynh1
system:

en essayant d’upgrader, il y a eu un crash

[...........................................................]
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + local src_filename=
Info: DEBUG - + src_sumprg=sha256sum
Info: DEBUG - + src_in_subdir=true
Info: DEBUG - + src_format=zip
Info: DEBUG - ++ echo zip
Info: DEBUG - ++ tr '[:upper:]' '[:lower:]'
Info: DEBUG - + src_format=zip
Info: DEBUG - + src_extract=true
Info: DEBUG - + '[' '' = '' ']'
Info: DEBUG - + src_filename=app-upgrade.zip
Info: DEBUG - + local local_src=/opt/yunohost-apps-src/grav/app-upgrade.zip
Info: DEBUG - + mkdir -p /var/cache/yunohost/download/grav/
Info: DEBUG - + src_filename=/var/cache/yunohost/download/grav/app-upgrade.zip
Info: DEBUG - + test -e /opt/yunohost-apps-src/grav/app-upgrade.zip
Info: DEBUG - + '[' -n https://github.com/getgrav/grav/releases/download/1.7.30/grav-update-v1.7.30.zip ']'
Info: DEBUG - ++ wget --tries 3 --no-dns-cache --timeout 900 --no-verbose --output-document=/var/cache/yunohost/download/grav/app-upgrade.zip https://github.com/getgrav/grav/releases/download/1.7.30/grav-update-v1.7.30.zip
Info: DEBUG - + out='2022-02-10 23:58:19 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/22553797/0835a4c1-dc9b-44eb-8ab9-19e264b5a126?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220210%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220210T225818Z&X-Amz-Expires=300&X-Amz-Signature=2b3c911ab5971f2776ac2c459e56996f58fe0c6e0067d1d9cd9317f0ad24c4db&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=22553797&response-content-disposition=attachment%3B%20filename%3Dgrav-update-v1.7.30.zip&response-content-type=application%2Foctet-stream [9108997/9108997] -> "/var/cache/yunohost/download/grav/app-upgrade.zip" [1]'
Info: DEBUG - + sha256sum --check --status
Info: DEBUG - + ynh_die '--message=Corrupt source'
Info: DEBUG - + ynh_exit_properly
Error: The app 'grav__2' failed to upgrade, and as a consequence the following apps' upgrades have been cancelled: grav__2, grav

Le log plus détailé ici: https://paste.yunohost.org/raw/pibivorepo

On dirait que c’est la source de l’app qui est corrompue ?

Si c’est bien les sources qui provoquent une erreur, j’ai proposé un PR à @tituspijean https://github.com/YunoHost-Apps/grav_ynh/pull/102, mais je ne peux pas affirmer que ce soit la solution…
Enfin si, après un test de mon patch

sudo yunohost app upgrade grav__2 -u https://github.com/rodinux/grav_ynh/tree/patch-1
Info: Now upgrading grav__2...
Info: [....................] > Loading installation settings...
Info: [+...................] > Ensuring downward compatibility...
Info: [#++++...............] > Backing up the app before upgrading (may take a while)...
Info: [#####++.............] > Upgrading source files...
Info: [#######++...........] > Upgrading NGINX web server configuration...
Info: [#########+..........] > Upgrading dependencies...
Info: [##########+++.......] > Making sure dedicated system user exists...
Info: [#############+......] > Upgrading PHP-FPM configuration...
Info: [##############+++...] > Installing and configuring LDAP plugin...
Info: [#################+..] > Updating all plugins...
Warning: Automatic plugin upgrade has failed, you can upgrade them from your Grav admin panel.
Info: [##################+.] > Reloading NGINX web server and PHP-FPM...
Info: [####################] > Upgrade of grav__2 completed
Success! grav__2 upgraded
Success! Upgrade complete

Par contre, je ne comprends pas pourquoi sur ce premier site mis à jour (grav__2), j’ai pu mettre à jour 4 plugins, mais pas sur le dernier (grav) ? Est-ce que les plugins ont une version différente suivant les thèmes ?
Non, une histoire de cache peut-être, du coup j’ai découvert une solution, en ssh et en utilisateur root aller à la racine du site et avec la commande gpm

cd /var/www/grav
sudo -u grav bin/gpm update

Géniale cette commande !

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