From 512f1e558d45708aca04987255e42c3399f638e1 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 9 Dec 2022 18:47:56 +0100 Subject: [PATCH 01/11] Change upstream to Yakforms, handle migration. --- conf/extra_php-fpm.conf | 0 manifest.toml | 2 +- scripts/upgrade | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 conf/extra_php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..e69de29 diff --git a/manifest.toml b/manifest.toml index a4f2089..9f9e2c6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,7 +13,7 @@ maintainers = [] [upstream] license = "GPL-2.0-only" -website = "https://framaforms.org" +website = "https://yakforms.org" code = "https://framagit.org/yakforms/yakforms" fund = "https://soutenir.framasoft.org" diff --git a/scripts/upgrade b/scripts/upgrade index b9e1bbe..aa46e74 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,6 +12,25 @@ source /usr/share/yunohost/helpers #================================================= # ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +#================================================= +# Framaforms 2 Yakforms Backup +#================================================= +upgrade_to_yakforms=true + +if [ "$upgrade_to_yakforms" = false ]; then + pushd "$install_dir" + ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php backup + _ynh_exec_with_drush_php drush "@$app" dis framaforms + _ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms + _ynh_exec_with_drush_php drush "@$app" dis framaforms_share_results + _ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_share_results + _ynh_exec_with_drush_php drush "@$app" dis framaforms_public_results + _ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_public_results + _ynh_exec_with_drush_php drush "@$app" dis framaforms_spam + _ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms_spam + popd +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -33,6 +52,21 @@ ynh_script_progression --message="Upgrading Composer..." --weight=3 ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.composer" +#================================================= +# Framaforms 2 Yakforms Restore +#================================================= + +if [ "$upgrade_to_yakforms" = true ]; then + pushd "$install_dir" + _ynh_exec_with_drush_php drush "@$app" en yakforms + _ynh_exec_with_drush_php drush "@$app" dis yakforms_share_results + _ynh_exec_with_drush_php drush "@$app" dis yakforms_public_results + _ynh_exec_with_drush_php drush "@$app" dis yakforms_spam + ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php restore + ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php clean + popd +fi + #================================================= # UPGRADE DRUPAL #================================================= From 70c508eb9801ebdaedcd81bdb4a4d949faaf2bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:24:56 +0100 Subject: [PATCH 02/11] Update manifest.toml --- manifest.toml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9f9e2c6..22c2d5a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Framaforms" description.en = "Create online webforms and surveys" description.fr = "Créez des formulaires et questionnaires en ligne" -version = "1.0.3~ynh4" +version = "1.1~ynh1" maintainers = [] @@ -73,8 +73,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://framagit.org/yakforms/yakforms/-/archive/1.0.3/yakforms-1.0.3.tar.gz" - sha256 = "f8a8ac8789c36f07f2d1a03d13f9f6d947e499967b79ea626f7f87271a357703" + url = "https://framagit.org/yakforms/yakforms/-/archive/v1.1/yakforms-v1.1.tar.gz" + sha256 = "da30fbd9821f84f21f06b7604232f0dc9b6b6a39738bb5326ee875f173300045" autoupdate.strategy = "latest_gitlab_release" @@ -92,14 +92,14 @@ ram.runtime = "50M" "postgresql", "curl", "libzip-dev", - "php7.4-fpm", - "php7.4-cli", - "php7.4-gd", - "php7.4-mysql", - "php7.4-xml", - "php7.4-ldap", - "php7.4-mbstring", - "php7.4-pgsql", + "php8.2-fpm", + "php8.2-cli", + "php8.2-gd", + "php8.2-mysql", + "php8.2-xml", + "php8.2-ldap", + "php8.2-mbstring", + "php8.2-pgsql", ] [resources.database] From 0c69a3420e2a4572e02bba91bc941954572d488f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 13 Jul 2024 17:30:27 +0200 Subject: [PATCH 03/11] Fix conditional framaforms to yakforms --- scripts/upgrade | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index aa46e74..b906109 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -10,12 +10,17 @@ source /usr/share/yunohost/helpers #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 #================================================= # Framaforms 2 Yakforms Backup #================================================= -upgrade_to_yakforms=true + +if ynh_compare_current_package_version --comparison lt --version 1.1~ynh1; then + upgrade_to_yakforms=true +else + upgrade_to_yakforms=false +fi if [ "$upgrade_to_yakforms" = false ]; then pushd "$install_dir" From daaea6aa0471a28a119504cfd9c3e4d8fb8ef339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 13 Jul 2024 17:41:39 +0200 Subject: [PATCH 04/11] =?UTF-8?q?Rename=20app=20to=20yakforms=20(except=20?= =?UTF-8?q?the=20id=E2=80=A6=20dunno=20if=20that's=20safe)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/ADMIN.md | 2 +- doc/DESCRIPTION.md | 2 +- manifest.toml | 4 ++-- scripts/install | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 08d2fff..30c44e5 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,3 +1,3 @@ ## Configuration -You can modify some configurations using the Framaforms administration panel. You can log in with the admin user and the password you gave during installation. +You can modify some configurations using the Yakforms administration panel. You can log in with the admin user and the password you gave during installation. diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 099d32d..f6d59d6 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,2 +1,2 @@ -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. diff --git a/manifest.toml b/manifest.toml index 22c2d5a..ada0adb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "framaforms" -name = "Framaforms" +name = "Yakforms" description.en = "Create online webforms and surveys" description.fr = "Créez des formulaires et questionnaires en ligne" @@ -31,7 +31,7 @@ ram.runtime = "50M" [install.domain] type = "domain" - # Framaform doesn't seem to be installable on a subdir, disabling it for now. + # Yakform doesn't seem to be installable on a subdir, disabling it for now. # [install.path] # type = "path" # default = "/poll" diff --git a/scripts/install b/scripts/install index 6ef380a..14b6004 100644 --- a/scripts/install +++ b/scripts/install @@ -68,7 +68,7 @@ chmod 600 "$install_dir/app/sites/default/settings.php" chown "$app:$app" "$install_dir/app/sites/default/settings.php" #================================================= -# INSTALLING FRAMAFORMS WITH DRUSH +# INSTALLING YAKFORMS WITH DRUSH #================================================= ynh_script_progression --message="Installing database..." --weight=19 From 6c1ac2379447cda96d8e4f0fb56d25a553a2d3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 13 Jul 2024 17:49:17 +0200 Subject: [PATCH 05/11] Use php 7.3 --- manifest.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest.toml b/manifest.toml index ada0adb..4834fad 100644 --- a/manifest.toml +++ b/manifest.toml @@ -92,14 +92,14 @@ ram.runtime = "50M" "postgresql", "curl", "libzip-dev", - "php8.2-fpm", - "php8.2-cli", - "php8.2-gd", - "php8.2-mysql", - "php8.2-xml", - "php8.2-ldap", - "php8.2-mbstring", - "php8.2-pgsql", + "php7.3-fpm", + "php7.3-cli", + "php7.3-gd", + "php7.3-mysql", + "php7.3-xml", + "php7.3-ldap", + "php7.3-mbstring", + "php7.3-pgsql", ] [resources.database] From 9d222db170e93909f6c84f60361963d7cd22c9ed Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 13 Jul 2024 15:49:23 +0000 Subject: [PATCH 06/11] Auto-update READMEs --- README.md | 12 ++++++------ README_es.md | 12 ++++++------ README_eu.md | 12 ++++++------ README_fr.md | 12 ++++++------ README_gl.md | 12 ++++++------ README_zh_Hans.md | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index e84b154..43914b2 100644 --- a/README.md +++ b/README.md @@ -3,27 +3,27 @@ N.B.: This README was automatically generated by -# Framaforms for YunoHost +# Yakforms for YunoHost [![Integration level](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![Working status](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![Install Framaforms with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![Install Yakforms with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[Read this README in other languages.](./ALL_README.md)* -> *This package allows you to install Framaforms quickly and simply on a YunoHost server.* +> *This package allows you to install Yakforms quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**Shipped version:** 1.0.3~ynh4 +**Shipped version:** 1.1~ynh1 ## Documentation and resources -- Official app website: +- Official app website: - Upstream app code repository: - YunoHost Store: - Report a bug: diff --git a/README_es.md b/README_es.md index 3273c39..162ad6c 100644 --- a/README_es.md +++ b/README_es.md @@ -3,27 +3,27 @@ Este archivo README esta generado automaticamente -# Framaforms para Yunohost +# Yakforms para Yunohost [![Nivel de integración](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![Instalar Framaforms con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![Instalar Yakforms con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[Leer este README en otros idiomas.](./ALL_README.md)* -> *Este paquete le permite instalarFramaforms rapidamente y simplement en un servidor YunoHost.* +> *Este paquete le permite instalarYakforms rapidamente y simplement en un servidor YunoHost.* > *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* ## Descripción general -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**Versión actual:** 1.0.3~ynh4 +**Versión actual:** 1.1~ynh1 ## Documentaciones y recursos -- Sitio web oficial: +- Sitio web oficial: - Repositorio del código fuente oficial de la aplicación : - Catálogo YunoHost: - Reportar un error: diff --git a/README_eu.md b/README_eu.md index 0d191d0..fba4985 100644 --- a/README_eu.md +++ b/README_eu.md @@ -3,27 +3,27 @@ Ohart ongi: README hau automatikoki sortu da -# Framaforms YunoHost-erako +# Yakforms YunoHost-erako [![Integrazio maila](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![Instalatu Framaforms YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![Instalatu Yakforms YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* -> *Pakete honek Framaforms YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *Pakete honek Yakforms YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* > *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* ## Aurreikuspena -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**Paketatutako bertsioa:** 1.0.3~ynh4 +**Paketatutako bertsioa:** 1.1~ynh1 ## Dokumentazioa eta baliabideak -- Aplikazioaren webgune ofiziala: +- Aplikazioaren webgune ofiziala: - Jatorrizko aplikazioaren kode-gordailua: - YunoHost Denda: - Eman errore baten berri: diff --git a/README_fr.md b/README_fr.md index eefb49f..195a6c7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,27 +3,27 @@ Nota bene : ce README est automatiquement généré par -# Framaforms pour YunoHost +# Yakforms pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![Installer Framaforms avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![Installer Yakforms avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer Framaforms rapidement et simplement sur un serveur YunoHost.* +> *Ce package vous permet d’installer Yakforms rapidement et simplement sur un serveur YunoHost.* > *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**Version incluse :** 1.0.3~ynh4 +**Version incluse :** 1.1~ynh1 ## Documentations et ressources -- Site officiel de l’app : +- Site officiel de l’app : - Dépôt de code officiel de l’app : - YunoHost Store : - Signaler un bug : diff --git a/README_gl.md b/README_gl.md index ecf5363..caee086 100644 --- a/README_gl.md +++ b/README_gl.md @@ -3,27 +3,27 @@ NOTA: Este README foi creado automáticamente por -# Framaforms para YunoHost +# Yakforms para YunoHost [![Nivel de integración](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![Instalar Framaforms con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![Instalar Yakforms con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[Le este README en outros idiomas.](./ALL_README.md)* -> *Este paquete permíteche instalar Framaforms de xeito rápido e doado nun servidor YunoHost.* +> *Este paquete permíteche instalar Yakforms de xeito rápido e doado nun servidor YunoHost.* > *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* ## Vista xeral -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**Versión proporcionada:** 1.0.3~ynh4 +**Versión proporcionada:** 1.1~ynh1 ## Documentación e recursos -- Web oficial da app: +- Web oficial da app: - Repositorio de orixe do código: - Tenda YunoHost: - Informar dun problema: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index aa9ad6d..55207ed 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,27 +3,27 @@ 请勿手动编辑。 --> -# YunoHost 上的 Framaforms +# YunoHost 上的 Yakforms [![集成程度](https://dash.yunohost.org/integration/framaforms.svg)](https://ci-apps.yunohost.org/ci/apps/framaforms/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/framaforms.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/framaforms.maintain.svg) -[![使用 YunoHost 安装 Framaforms](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) +[![使用 YunoHost 安装 Yakforms](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framaforms) *[阅读此 README 的其它语言版本。](./ALL_README.md)* -> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Framaforms。* +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Yakforms。* > *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* ## 概况 -Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. +Yakforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. See this [article](https://framablog.org/2016/10/05/framaforms-noffrez-plus-les-reponses-que-vous-collectez-a-google/) and this [interview](https://framablog.org/2016/10/05/en-savoir-un-peu-plus-sur-le-projet-framaforms/) (in French) for further informations. -**分发版本:** 1.0.3~ynh4 +**分发版本:** 1.1~ynh1 ## 文档与资源 -- 官方应用网站: +- 官方应用网站: - 上游应用代码库: - YunoHost 商店: - 报告 bug: From 7a0f95d1e00a6a2f68217cd66bff27487d388232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 14 Jul 2024 12:50:25 +0200 Subject: [PATCH 07/11] Fix intsall profile --- manifest.toml | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4834fad..bf114e5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -31,7 +31,7 @@ ram.runtime = "50M" [install.domain] type = "domain" - # Yakform doesn't seem to be installable on a subdir, disabling it for now. + # Yakforms doesn't seem to be installable on a subdir, disabling it for now. # [install.path] # type = "path" # default = "/poll" diff --git a/scripts/install b/scripts/install index 14b6004..c44a8e3 100644 --- a/scripts/install +++ b/scripts/install @@ -75,7 +75,7 @@ ynh_script_progression --message="Installing database..." --weight=19 # Chown from composer/drush install chown -R "$app:www-data" "$install_dir" -_ynh_exec_with_drush_php drush "@$app" site-install framaforms_org \ +_ynh_exec_with_drush_php drush "@$app" site-install yakforms_profile \ install_configure_form.site_contact_url="https://forum.yunohost.org/t/framaforms-create-polls-using-drag-and-drop/8208" \ install_configure_form.site_default_country=FR \ -y --locale="$language" --account-name="admin" --account-pass="$password" --site-name="Framaforms" --site-mail="$admin_mail" From d7914ff7aa714871dd1cbd7ca25da476b631ef8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 14 Jul 2024 13:29:03 +0200 Subject: [PATCH 08/11] Fix framaforms -> yakforms a few times --- scripts/install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index c44a8e3..e58632b 100644 --- a/scripts/install +++ b/scripts/install @@ -76,13 +76,13 @@ ynh_script_progression --message="Installing database..." --weight=19 chown -R "$app:www-data" "$install_dir" _ynh_exec_with_drush_php drush "@$app" site-install yakforms_profile \ - install_configure_form.site_contact_url="https://forum.yunohost.org/t/framaforms-create-polls-using-drag-and-drop/8208" \ + install_configure_form.site_contact_url="https://apps.yunohost.org/app/framaforms" \ install_configure_form.site_default_country=FR \ - -y --locale="$language" --account-name="admin" --account-pass="$password" --site-name="Framaforms" --site-mail="$admin_mail" + -y --locale="$language" --account-name="admin" --account-pass="$password" --site-name="Yakforms" --site-mail="$admin_mail" _ynh_exec_with_drush_php drush "@$app" variable-set update_notify_emails "$admin_mail" -_ynh_exec_with_drush_php drush "@$app" variable-set file_private_path "/home/yunohost.app/$app/data" -_ynh_exec_with_drush_php drush "@$app" pm-enable framaforms_feature -y --resolve-dependencies -_ynh_exec_with_drush_php drush "@$app" php-eval "module_load_include('inc', 'framaforms', 'includes/framaforms.pages');create_all_pages();" || true +_ynh_exec_with_drush_php drush "@$app" variable-set file_private_path "$data_dir/data" +_ynh_exec_with_drush_php drush "@$app" pm-enable yakforms_feature -y --resolve-dependencies +_ynh_exec_with_drush_php drush "@$app" php-eval "module_load_include('inc', 'yakforms', 'includes/yakforms.pages');create_all_pages();" || true #================================================= # IMPORTING LANGUAGE PACK @@ -98,9 +98,9 @@ _ynh_exec_with_drush_php drush "@$app" cache-clear drush -y _ynh_exec_with_drush_php drush "@$app" l10n-update-refresh -y _ynh_exec_with_drush_php drush "@$app" l10n-update -y -# We don't upgrade module to avoid to erase framaforms change +# We don't upgrade module to avoid to erase Yakforms change # in drupal core and modules code -# see https://framagit.org/framasoft/framaforms/-/wikis/modifications +# see https://framagit.org/yakforms/yakforms/-/wikis/modifications # _ynh_exec_with_drush_php drush "@$app" pm-update -y #================================================= @@ -109,10 +109,10 @@ _ynh_exec_with_drush_php drush "@$app" l10n-update -y ynh_script_progression --message="Removing branding and change default settings..." --weight=1 _ynh_exec_with_drush_php drush "@$app" vset error_level 0 -_ynh_exec_with_drush_php drush "@$app" vset framaforms_notification_period_value "$expiration" -_ynh_exec_with_drush_php drush "@$app" vset framaforms_deletion_period_value "$deletion" -# Remove framaforms footer -_ynh_exec_with_drush_php drush "@$app" sql-query "UPDATE block SET region='-1', status=0 WHERE delta='framaforms_footer' AND region='footer'" +_ynh_exec_with_drush_php drush "@$app" vset yakforms_notification_period_value "$expiration" +_ynh_exec_with_drush_php drush "@$app" vset yakforms_deletion_period_value "$deletion" +# Remove yakforms footer +_ynh_exec_with_drush_php drush "@$app" sql-query "UPDATE block SET region='-1', status=0 WHERE delta='yakforms_footer' AND region='footer'" #================================================= # CONFIGURING LDAP From 3f64dba5231e937eaf10f7eb5853784bf4d36685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 14 Jul 2024 13:43:52 +0200 Subject: [PATCH 09/11] enable yakforms --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index e58632b..5deeb66 100644 --- a/scripts/install +++ b/scripts/install @@ -82,6 +82,7 @@ _ynh_exec_with_drush_php drush "@$app" site-install yakforms_profile \ _ynh_exec_with_drush_php drush "@$app" variable-set update_notify_emails "$admin_mail" _ynh_exec_with_drush_php drush "@$app" variable-set file_private_path "$data_dir/data" _ynh_exec_with_drush_php drush "@$app" pm-enable yakforms_feature -y --resolve-dependencies +_ynh_exec_with_drush_php drush "@$app" pm-enable yakforms -y --resolve-dependencies _ynh_exec_with_drush_php drush "@$app" php-eval "module_load_include('inc', 'yakforms', 'includes/yakforms.pages');create_all_pages();" || true #================================================= From 3fe655aba5e55ebf799609eeab9d7c35877f44dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 14 Jul 2024 15:22:28 +0200 Subject: [PATCH 10/11] try to fix migration --- manifest.toml | 8 ++++++++ scripts/upgrade | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bf114e5..cbd1b01 100644 --- a/manifest.toml +++ b/manifest.toml @@ -78,6 +78,14 @@ ram.runtime = "50M" autoupdate.strategy = "latest_gitlab_release" + [resources.sources.migration_script] + url = "https://framagit.org/yakforms/yakforms/-/raw/v1.1/framaforms2yakforms.php" + sha256 = "58a2e7378461dc5db70f59d69d37c0d6bd34eed224872151db5a794fdf33d07a" + format = "whatever" + extract = false + rename = "framaforms2yakforms.php" + prefetch = false + [resources.system_user] [resources.install_dir] diff --git a/scripts/upgrade b/scripts/upgrade index b906109..11cab9f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,8 +22,9 @@ else upgrade_to_yakforms=false fi -if [ "$upgrade_to_yakforms" = false ]; then +if [ "$upgrade_to_yakforms" = true ]; then pushd "$install_dir" + ynh_setup_source --source_id="migration_script" --dest_dir="$install_dir/app" ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php backup _ynh_exec_with_drush_php drush "@$app" dis framaforms _ynh_exec_with_drush_php drush "@$app" pm-uninstall framaforms From 29fef6d0a7dc7b2c0cb2f2f35ebf3958e3739a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 14 Jul 2024 17:20:14 +0200 Subject: [PATCH 11/11] fix upgrade --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 11cab9f..048dae4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,7 @@ else fi if [ "$upgrade_to_yakforms" = true ]; then - pushd "$install_dir" + pushd "$install_dir/app" ynh_setup_source --source_id="migration_script" --dest_dir="$install_dir/app" ynh_exec_as "$app" env "PATH=$PATH" "php$phpversion" framaforms2yakforms.php backup _ynh_exec_with_drush_php drush "@$app" dis framaforms @@ -63,7 +63,7 @@ ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir/.compose #================================================= if [ "$upgrade_to_yakforms" = true ]; then - pushd "$install_dir" + pushd "$install_dir/app" _ynh_exec_with_drush_php drush "@$app" en yakforms _ynh_exec_with_drush_php drush "@$app" dis yakforms_share_results _ynh_exec_with_drush_php drush "@$app" dis yakforms_public_results @@ -83,7 +83,7 @@ ynh_backup_if_checksum_is_different --file="$install_dir/app/sites/default/setti # Chown from composer/drush install chown -R "$app:www-data" "$install_dir" -pushd "$install_dir" +pushd "$install_dir/app" _ynh_exec_with_drush_php drush "@$app" variable-set --exact maintenance_mode 1 _ynh_exec_with_drush_php drush "@$app" cache-clear all # _ynh_exec_with_drush_php drush "@$app" pm-update -y drupal