From 7561fb4bec6580abc4bddae366539a44a53efcc1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 11 Jan 2021 19:54:45 +0100 Subject: [PATCH 1/8] Remove ownCloud migration --- README.md | 24 --------------- README_fr.md | 25 --------------- conf/owncloud_migration | 13 -------- conf/owncloud_post_migration.sh | 45 --------------------------- scripts/upgrade | 54 --------------------------------- 5 files changed, 161 deletions(-) delete mode 100644 conf/owncloud_migration delete mode 100644 conf/owncloud_post_migration.sh diff --git a/README.md b/README.md index 3c528e5..2d6e375 100644 --- a/README.md +++ b/README.md @@ -81,30 +81,6 @@ If you need/want to use Nextcloud `occ` command¹, you need to be in `/var/www/n ¹ See https://docs.nextcloud.com/server/18/admin_manual/configuration_server/occ_command.html Use this only if you know what you're doing :) -#### Migrate from ownCloud - -**This is not considered as stable yet, please do it with care and only for testing!** - -This package handles the migration from ownCloud to Nextcloud. For that, your ownCloud application must be **up-to-date** in YunoHost. - -You will then have to upgrade your ownCloud application with this repository. This can only be done from the command-line interface - e.g. through SSH. Once you're connected, you simply have to execute the following: - -```bash -sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh owncloud --debug -``` - -The `--debug` option will let you see the full output. If you encounter any -issue, please paste it. - -Note that a cron job will be executed at some time after the end of this command. You must wait that before doing any other application operations! You should see that Nextcloud is installed after that. - -Note that it does not change the application label nor the URL. To rename the label, you can execute the following - replace `Nextcloud` with whatever you want: - -```bash -sudo yunohost app setting nextcloud label -v "Nextcloud" -sudo yunohost app ssowatconf -``` - ## Links * Report a bug: https://github.com/YunoHost-Apps/nextcloud_ynh/issues diff --git a/README_fr.md b/README_fr.md index baf3cdd..0b4b066 100644 --- a/README_fr.md +++ b/README_fr.md @@ -72,31 +72,6 @@ Et enfin, le message d'erreur suivant dans les logs de Nextcloud peut être igno Following symlinks is not allowed ('/home/yunohost.multimedia/user/Share' -> '/home/yunohost.multimedia/share/' not inside '/home/yunohost.multimedia/user/') ``` -## Informations supplémentaires - -#### Migrer depuis ownCloud - -**La migration n'est pas encore considérée comme stable, merci de la faire prudemment et uniquement pour tester !** - -Ce package gère la migration de ownCloud vers Nextcloud. Pour ça, l'application ownCloud doit **être à jour** dans YunoHost. - -Vous allez ensuite mettre à niveau votre ownCloud avec ce dépôt. -Ça ne peut être fait qu'en ligne de commande - par exemple via SSH. Une fois connecté, vous n'avez plus qu'à exécuter la commande suivante : -```bash -sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh owncloud --debug -``` - -L'option `--debug` va vous permettre de visualiser entièrement les retours de la mise à niveau. Si vous rencontrez un problème, merci de nous le transmettre. - -Notez qu'une tâche cron va être exécutée une fois la fin de cette commande. Vous devez attendre qu'elle se fasse avant de faire une autre opération liée aux applications. -Vous devriez constater que Nextcloud sera installé après ça. - -Notez que ça ne changera pas le label ni l'URL. Pour renommer le label, vous pouvez exécuter la commande suivante (en remplaçant `Nextcloud` par ce que vous voulez) : -```bash -sudo yunohost app setting nextcloud label -v "Nextcloud" -sudo yunohost app ssowatconf -``` - ## Liens * Signaler un bug : https://github.com/YunoHost-Apps/nextcloud_ynh/issues diff --git a/conf/owncloud_migration b/conf/owncloud_migration deleted file mode 100644 index 4c1be85..0000000 --- a/conf/owncloud_migration +++ /dev/null @@ -1,13 +0,0 @@ -# File to migrate from Owncloud - -# Final path -/var/www/$app - -# Data directory -/home/yunohost.app/$app - -# Nginx config -/etc/nginx/conf.d/$domain.d/$app.conf - -# php-fpm config -/etc/php5/fpm/pool.d/$app.conf diff --git a/conf/owncloud_post_migration.sh b/conf/owncloud_post_migration.sh deleted file mode 100644 index 952baac..0000000 --- a/conf/owncloud_post_migration.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# Ending the migration process from Owncloud to Nextcloud - -set -u - -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source /usr/share/yunohost/helpers - -#================================================= -# SET VARIABLES -#================================================= - -old_app="__OLD_APP__" -new_app="__NEW_APP__" -script_name="$0" - -#================================================= -# MOVE HOOKS -#================================================= - -hooks_dir="/etc/yunohost/hooks.d/" -mv "$hooks_dir/post_user_create/50-$old_app" "$hooks_dir/post_user_create/50-$new_app" - -#================================================= -# DELETE OLD APP'S SETTINGS -#================================================= - -ynh_secure_remove "/etc/yunohost/apps/$old_app" -yunohost app ssowatconf - -#================================================= -# REMOVE THE OLD USER -#================================================= - -ynh_system_user_delete $old_app - -#================================================= -# DELETE THIS SCRIPT -#================================================= - -echo "rm $script_name" | at now + 1 minutes diff --git a/scripts/upgrade b/scripts/upgrade index 18e0b49..ba025f6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,44 +87,11 @@ then # Remove the option backup_core_only after the backup. ynh_app_setting_delete $app backup_core_only - - ynh_clean_setup () { - # Remove the post migration script before its execution ! - ynh_exec_warn_less ynh_secure_remove --file="/tmp/owncloud_post_migration.sh" - - # restore it if the upgrade fails - ynh_restore_upgradebackup - } fi # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# HANDLE MIGRATION FROM OWNCLOUD -#================================================= - -ynh_handle_app_migration "owncloud" "owncloud_migration" -if [ $migration_process -eq 1 ] -then - # If a migration has been performed - # Reload some values changed by the migration process - final_path=$(ynh_app_setting_get --app=$app --key=final_path) - db_name=$(ynh_app_setting_get --app=$app --key=db_name) - - # Remove the old fake package for owncloud. - # Its name is specific, so the migration process can't remove it - ynh_package_autopurge owncloud-deps - - # Change the database access in the config - ynh_replace_string "\('dbname' =>\).*" "\1 '$db_name'," "$final_path/config/config.php" - ynh_replace_string "\('dbuser' =>\).*" "\1 '$db_name'," "$final_path/config/config.php" - - # Change the path of the data directory - ynh_replace_string "\('dbuser' =>\).*" "\1 '$db_name'," "$final_path/config/config.php" - ynh_replace_string "\('datadirectory' =>.*\)$old_app" "\1$app" "$final_path/config/config.php" -fi - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -501,27 +468,6 @@ ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload -#================================================= -# FINISH MIGRATION PROCESS -#================================================= - -if [ $migration_process -eq 1 ] -then - ynh_print_info --message="ownCloud has been successfully migrated to Nextcloud! \ -A last scheduled operation will run in a couple of minutes to finish the \ -migration in YunoHost side. Do not proceed any application operation while \ -you don't see Nextcloud as installed." - - # Execute a post migration script after the end of this upgrade. - # Mainly for some cleaning - script_post_migration=owncloud_post_migration.sh - ynh_replace_string --match_string="__OLD_APP__" --replace_string="$old_app" --target_file=../conf/$script_post_migration - ynh_replace_string --match_string="__NEW_APP__" --replace_string="$app" --target_file=../conf/$script_post_migration - cp ../conf/$script_post_migration /tmp - chmod +x /tmp/$script_post_migration - (cd /tmp; echo "/tmp/$script_post_migration > /tmp/$script_post_migration.log 2>&1" | at now + 2 minutes) -fi - #================================================= # END OF SCRIPT #================================================= From ca1c1039d0f9374e1cf692502b680e6c975b0f74 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 14 Jan 2021 11:56:12 +0100 Subject: [PATCH 2/8] Upgrade to version 20.0.5 --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 4 ++-- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3c528e5..d70d922 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Nextcloud](https://nextcloud.com) gives you freedom and control over your own data. A personal cloud which runs on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 20.0.4 +**Shipped version:** 20.0.5 ## Screenshots diff --git a/README_fr.md b/README_fr.md index baf3cdd..578bba4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour [Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur. Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils. -**Version incluse :** 20.0.4 +**Version incluse :** 20.0.5 ## Captures d'écran diff --git a/manifest.json b/manifest.json index 5e3ec17..5543e9a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "20.0.4~ynh1", + "version": "20.0.5~ynh1", "url": "https://nextcloud.com", "license": "AGPL-3.0", "maintainer": { @@ -19,7 +19,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index f4b01b4..f8f4d7f 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="20.0.4" +next_version="20.0.5" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="269f1622e326f5d11e387d3861aad4e2b0e79334ae97eed5a7b3352ba7661420" +nextcloud_source_sha256="5c70dd33024012a1651fd099133d052d129a4dadc6935f44bb9c3e2b360befe3" From 6d041fda5f1d43c749b307fbe0d3698eb0b100f8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 16 Jan 2021 14:12:15 +0100 Subject: [PATCH 3/8] Put back ynh_clean_setup --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index ba025f6..24cfe02 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,6 +87,11 @@ then # Remove the option backup_core_only after the backup. ynh_app_setting_delete $app backup_core_only + + ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup + } fi # Exit if an error occurs during the execution of the script From 504c04be575b7bccc282e0a42802fb7826055019 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 21 Jan 2021 17:16:43 +0100 Subject: [PATCH 4/8] If phpversion doesn't exist, create it --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 18e0b49..8caf739 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,11 @@ if [ -z "$fpm_usage" ]; then ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi +# If phpversion doesn't exist, create it +if [ -z "$phpversion" ]; then + phpversion="$YNH_PHP_VERSION" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From 82898379b367e6f49005b4624842c279ea760ddd Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 21 Jan 2021 17:23:04 +0100 Subject: [PATCH 5/8] Set requirements to latest YNH version for a bugfix --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 5543e9a..e8b5f81 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "apps@yunohost.org" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.6" }, "multi_instance": true, "services": [ From 3792526169da3fe0bac6b89b3477577baa53d97a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Jan 2021 13:49:55 +0100 Subject: [PATCH 6/8] Upgrade doc link --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1584d4c..a455b85 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Documentation - * Official documentation: https://docs.nextcloud.com/server/19/user_manual/ + * Official documentation: https://docs.nextcloud.com/server/20/user_manual/en/ * YunoHost documentation: https://github.com/YunoHost/doc/blob/master/app_nextcloud.md ## Configuration diff --git a/README_fr.md b/README_fr.md index b5119e2..9992659 100644 --- a/README_fr.md +++ b/README_fr.md @@ -26,7 +26,7 @@ Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils. ## Documentation - * Documentation officielle : https://docs.nextcloud.com/server/19/user_manual/ + * Documentation officielle : https://docs.nextcloud.com/server/20/user_manual/fr/ * Documentation YunoHost : https://github.com/YunoHost/doc/blob/master/app_nextcloud_fr.md ## Configuration From 7ef18bdbc05f744fba6caa2b64155391a20fdb69 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 17:29:34 +0100 Subject: [PATCH 7/8] Upgrade to 2.0.6 --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- pull_request_template.md | 8 ++++---- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a455b85..b828e47 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Nextcloud](https://nextcloud.com) gives you freedom and control over your own data. A personal cloud which runs on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 20.0.5 +**Shipped version:** 20.0.6 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 9992659..c3c5a95 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour [Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur. Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils. -**Version incluse :** 20.0.5 +**Version incluse :** 20.0.6 ## Captures d'écran diff --git a/manifest.json b/manifest.json index e8b5f81..2badd9f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "20.0.5~ynh1", + "version": "20.0.6~ynh1", "url": "https://nextcloud.com", "license": "AGPL-3.0", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md index da30b7b..f501dd4 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -18,7 +18,7 @@ - [ ] **Code review** : - [ ] **Approval (LGTM)** : - [ ] **Approval (LGTM)** : -- **CI succeeded** : -[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/nextcloud_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/nextcloud_ynh%20PR-NUM-/) -*Please replace '-NUM-' in this link by the PR number.* -When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. + +## Package_check results +--- +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index f8f4d7f..dd64272 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="20.0.5" +next_version="20.0.6" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="5c70dd33024012a1651fd099133d052d129a4dadc6935f44bb9c3e2b360befe3" +nextcloud_source_sha256="859167170402b876b6ef1a37fa4aaa5617b6bf847bb5d50a94f636bae65a34b9" From ad61ac01c45dc8ef1618aa61a76c371334bf1222 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 2 Feb 2021 22:25:35 +0100 Subject: [PATCH 8/8] Upgrade to version 20.0.7 --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b828e47..e439bda 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to [Nextcloud](https://nextcloud.com) gives you freedom and control over your own data. A personal cloud which runs on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 20.0.6 +**Shipped version:** 20.0.7 ## Screenshots diff --git a/README_fr.md b/README_fr.md index c3c5a95..a949264 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour [Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur. Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils. -**Version incluse :** 20.0.6 +**Version incluse :** 20.0.7 ## Captures d'écran diff --git a/manifest.json b/manifest.json index 2badd9f..9bb361f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "20.0.6~ynh1", + "version": "20.0.7~ynh1", "url": "https://nextcloud.com", "license": "AGPL-3.0", "maintainer": { diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index dd64272..1e8134f 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="20.0.6" +next_version="20.0.7" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="859167170402b876b6ef1a37fa4aaa5617b6bf847bb5d50a94f636bae65a34b9" +nextcloud_source_sha256="8ced82b772bf0af67d5be1323e40f977429bc0a2bcc864095efc78767500b72b"