From 28cd6b95ecfe30315e045ae9bd077176617dc607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 9 Jul 2024 15:46:21 +0200 Subject: [PATCH 1/7] Coding style in manifest --- manifest.toml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index fb4994b..cad1762 100644 --- a/manifest.toml +++ b/manifest.toml @@ -41,10 +41,11 @@ ram.runtime = "50M" default = "visitors" [resources] - [resources.sources.main] - url = "https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz" - sha256 = "8ce94c1403c1143a5b503f18f7b7b9a5d29e83489fc81cc7287b719df0b97236" - autoupdate.strategy = "latest_github_tag" + [resources.sources.main] + url = "https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz" + sha256 = "8ce94c1403c1143a5b503f18f7b7b9a5d29e83489fc81cc7287b719df0b97236" + + autoupdate.strategy = "latest_github_tag" [resources.system_user] @@ -54,7 +55,22 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-cli, php8.2-curl, php8.2-fileinfo, php8.2-gd, php8.2-mbstring, php8.2-mysqli, php8.2-simplexml, php8.2-xml, php8.2-intl, php8.2-ldap, php8.2-xmlrpc, php8.2-bz2, php8.2-zip" + packages = [ + "mariadb-server", + "php8.2-cli", + "php8.2-curl", + "php8.2-fileinfo", + "php8.2-gd", + "php8.2-mbstring", + "php8.2-mysqli", + "php8.2-simplexml", + "php8.2-xml", + "php8.2-intl", + "php8.2-ldap", + "php8.2-xmlrpc", + "php8.2-bz2", + "php8.2-zip", + ] [resources.database] type = "mysql" From eecb2513d7ee538a610b54685940efb0ed35ea64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 9 Jul 2024 15:46:31 +0200 Subject: [PATCH 2/7] Fix autoupdate strategy --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index cad1762..80aeb1b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -45,7 +45,8 @@ ram.runtime = "50M" url = "https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz" sha256 = "8ce94c1403c1143a5b503f18f7b7b9a5d29e83489fc81cc7287b719df0b97236" - autoupdate.strategy = "latest_github_tag" + autoupdate.strategy = "latest_github_release" + autoupdate.asset = "^glpi-.*\\.tgz" [resources.system_user] From a0a9104b5a09b070843ef75910650e230a3fbbeb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 4 Jul 2024 03:40:31 +0200 Subject: [PATCH 3/7] Upgrade to v10.0.16 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 80aeb1b..8956dea 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "GLPI" description.en = "IT Asset Management" description.fr = "Gestion des services informatiques (ITSM)" -version = "10.0.15~ynh1" +version = "10.0.16~ynh1" maintainers = [] @@ -42,8 +42,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz" - sha256 = "8ce94c1403c1143a5b503f18f7b7b9a5d29e83489fc81cc7287b719df0b97236" + url = "https://github.com/glpi-project/glpi/releases/download/10.0.16/glpi-10.0.16.tgz" + sha256 = "2c49ea2104c6a107999b28160aa3283ed23b59fb0ba7f3899f1e388830365ce0" autoupdate.strategy = "latest_github_release" autoupdate.asset = "^glpi-.*\\.tgz" From e780589d2fa5b253bd52cd676eca001ab8eef87b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 4 Jul 2024 01:40:33 +0000 Subject: [PATCH 4/7] Auto-update READMEs --- README.md | 4 ++-- README_es.md | 4 ++-- README_eu.md | 4 ++-- README_fr.md | 4 ++-- README_gl.md | 4 ++-- README_zh_Hans.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f1e0e8d..bf2d0aa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # GLPI for YunoHost -[![Integration level](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Working status](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Working status](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Install GLPI with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Shipped version:** 10.0.15~ynh1 +**Shipped version:** 10.0.16~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index c6b477b..a456539 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # GLPI para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalar GLPI con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Versión actual:** 10.0.15~ynh1 +**Versión actual:** 10.0.16~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 98e2504..6c9d80a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # GLPI YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalatu GLPI YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Paketatutako bertsioa:** 10.0.15~ynh1 +**Paketatutako bertsioa:** 10.0.16~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 21cb687..23ee9be 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # GLPI pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Installer GLPI avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -30,7 +30,7 @@ GLPI signifie Gestionnaire Libre de Parc Informatique. Il s'agit d'un progiciel - Base de connaissances et foire aux questions (FAQ) - Réservation d'actifs -**Version incluse :** 10.0.15~ynh1 +**Version incluse :** 10.0.16~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 816febb..358bbb4 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # GLPI para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalar GLPI con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Versión proporcionada:** 10.0.15~ynh1 +**Versión proporcionada:** 10.0.16~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index bb261b5..41ef2b1 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 GLPI -[![集成程度](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![工作状态](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![使用 YunoHost 安装 GLPI](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**分发版本:** 10.0.15~ynh1 +**分发版本:** 10.0.16~ynh1 ## 截图 From 6ef0a578f267f32d696fdd6cda6e23c4d41c8337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 9 Jul 2024 16:55:50 +0200 Subject: [PATCH 5/7] check system requirements on upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 1c87f75..f0ecc49 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,6 +47,7 @@ ynh_add_config --template="cron" --destination="/etc/cron.d/$app" ynh_script_progression --message="Updating the database..." --weight=1 pushd $install_dir + php$phpversion bin/console system:check_requirements php$phpversion bin/console db:update --no-interaction --no-telemetry --force popd From dc0ea675bcd73febcee1e86cec6f309586b68a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 10 Jul 2024 09:07:29 +0200 Subject: [PATCH 6/7] Coding style, reorder steps --- scripts/backup | 14 +------------- scripts/change_url | 12 +++--------- scripts/install | 27 ++++++++++++--------------- scripts/remove | 2 -- scripts/restore | 10 +++------- scripts/upgrade | 32 +++++++++++--------------------- 6 files changed, 30 insertions(+), 67 deletions(-) diff --git a/scripts/backup b/scripts/backup index e4d961e..076d3dc 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -22,23 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# BACKUP THE SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/etc/cron.d/$app" #================================================= diff --git a/scripts/change_url b/scripts/change_url index be6cde0..57c3ede 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,8 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -18,15 +14,13 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#================================================= -# SPECIFIC MODIFICATIONS #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Configuring $app..." --weight=1 -pushd $install_dir - php$phpversion bin/console glpi:config:set url_base https://$domain$path +pushd "$install_dir" + "php$phpversion" bin/console glpi:config:set url_base "https://$domain$path" popd #================================================= diff --git a/scripts/install b/scripts/install index 58fbb56..dfd9180 100644 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -20,6 +18,18 @@ ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# INSTALL THE DATABASE +#================================================= +ynh_script_progression --message="Installing $app..." --weight=1 + +pushd "$install_dir" + "php$phpversion" bin/console glpi:database:install --db-host="localhost" \ + --db-name="$db_name" --db-password="$db_pwd" --db-user="$db_user" --reconfigure --no-interaction + "php$phpversion" bin/console glpi:config:set url_base "https://$domain$path" + ynh_secure_remove --file="$install_dir/install/install.php" +popd + #================================================= # SYSTEM CONFIGURATION #================================================= @@ -33,19 +43,6 @@ ynh_add_nginx_config ynh_add_config --template="cron" --destination="/etc/cron.d/$app" -#================================================= -# SPECIFIC SETUP -#================================================= -# INSTALL THE DATABASE -#================================================= -ynh_script_progression --message="Installing $app..." --weight=1 - -pushd $install_dir - php$phpversion bin/console glpi:database:install --db-host="localhost" --db-name="$db_name" --db-password="$db_pwd" --db-user="$db_user" --reconfigure --no-interaction - php$phpversion bin/console glpi:config:set url_base https://$domain$path - ynh_secure_remove --file="$install_dir/install/install.php" -popd - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index b88f6a3..3a4f117 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= diff --git a/scripts/restore b/scripts/restore index 6a49b01..57f5420 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -18,14 +16,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE THE MYSQL DATABASE #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -38,14 +36,12 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f0ecc49..a58b1ff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,12 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -24,7 +16,17 @@ ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" #--full_replace=1 chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" + +#================================================= +# UPDATE THE DATABASE +#================================================= +ynh_script_progression --message="Updating the database..." --weight=1 + +pushd "$install_dir" + "php$phpversion" bin/console system:check_requirements + "php$phpversion" bin/console db:update --no-interaction --no-telemetry --force +popd #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -39,18 +41,6 @@ ynh_add_nginx_config ynh_add_config --template="cron" --destination="/etc/cron.d/$app" -#================================================= -# SPECIFIC UPGRADE -#================================================= -# UPDATE THE DATABASE -#================================================= -ynh_script_progression --message="Updating the database..." --weight=1 - -pushd $install_dir - php$phpversion bin/console system:check_requirements - php$phpversion bin/console db:update --no-interaction --no-telemetry --force -popd - #================================================= # END OF SCRIPT #================================================= From fa2eb32347bf1d4f02a6699a2e8e996d1ec4a83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 10 Jul 2024 09:10:58 +0200 Subject: [PATCH 7/7] full_replace=1 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index a58b1ff..7d2c1b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" #--full_replace=1 +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config files marketplace plugins" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir"