From 4df511adf58a94d348495eb5b4e4751342dea5e0 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 1 Aug 2024 14:39:05 +0200 Subject: [PATCH 1/9] select the version you wish to track in Yunohost --- manifest.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifest.toml b/manifest.toml index 7b855d6..14e4dd9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -60,6 +60,12 @@ ram.runtime = "512M" type = "boolean" default = true + [install.version_to_follow] + ask.en = "Which version do you want" + type = "select" + choices = ["stable", "oldstable"] + default = "stable" + [resources] [resources.sources] From cfb346dce799dd5f78da0cda4b8ae1ed3b5e0134 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 1 Aug 2024 14:51:04 +0200 Subject: [PATCH 2/9] install: select between latest or oldstable version --- scripts/install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0987b84..b36fb31 100755 --- a/scripts/install +++ b/scripts/install @@ -23,8 +23,15 @@ ynh_script_progression --message="Setting up source files..." --weight=5 # Enable YunoHost patches on Nextcloud sources cp -a ../sources/patches_last_version/* ../sources/patches + +source_id="main" +if [ "$version_to_follow" == "oldstable" ]; then + last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') + last_major_version=${last_version%%.*} + source_id=$((last_major_version--)) +fi # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" +ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id" #================================================= # PHP-FPM CONFIGURATION From b5e5d83a401d4e7ebd2bf3c11a1771f7745e4408 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 22 Aug 2024 16:47:13 +0200 Subject: [PATCH 3/9] [enh] oldstable support for upgrade --- config_panel.toml | 11 ++++++++++- scripts/upgrade | 21 ++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index e5e88ae..8fd00c7 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -15,6 +15,15 @@ name = "Nextcloud configuration" ask.en = "Set permissions for all data (Can take up to several hours if users have a lot of data)" type = "button" style = "success" + + [main.version] + [main.version.version_to_follow] + ask.en = "Upgrade channel to use" + type = "select" + choices = ["stable", "oldstable"] + default = "stable" + help.en = "Recent major releases contains sometimes some annoying bugs or regressions. Using the oldstable channel during this period can be useful if you need high stability." + [main.addressbook] name = "Address book configuration" @@ -24,7 +33,7 @@ name = "Nextcloud configuration" type = "boolean" yes = "yes" no = "no" - + [main.php_fpm_config] name = "PHP-FPM configuration" diff --git a/scripts/upgrade b/scripts/upgrade index c4b764c..25be390 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,6 +35,13 @@ then ynh_die --message="Upgrading from Nextcloud < 22.2 is not supported anymore. You should first upgrade to 22.2 using: yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/41f5f902e7c7cd3c30a6793020562ba98b9bf3e9" fi +if [ -z "${version_to_follow:-}" ] +then + version_to_follow=stable + ynh_app_setting_set --app=$app --key=version_to_follow --value="$version_to_follow" +fi + + #================================================= # SPECIFIC UPGRADE #================================================= @@ -123,6 +130,11 @@ current_major_version=${current_version%%.*} last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') last_major_version=${last_version%%.*} +if [[ "$version_to_follow" == "oldstable" ]] +then + last_major_version=$((last_major_version--)) + last_version=$(ynh_read_manifest --manifest_key="resources.sources.${last_major_version}.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') +fi if [[ "$last_major_version" != "$current_major_version" ]] then @@ -164,17 +176,20 @@ then fi # While the current version is not the last version, do an upgrade - while [ "$last_version" != "$current_version" ] + while [ "$last_version" > "$current_version" ] do next_major_version="$(( $current_major_version + 1 ))" + source_id="$next_major_version" if [[ "$next_major_version" -ge "$last_major_version" ]]; then ynh_print_info --message="Upgrading to Nextcloud $last_version" cp -a ../sources/patches_last_version/* ../sources/patches - source_id="main" + if [[ "$version_to_follow" != "oldstable" ]] + then + source_id="main" + fi else ynh_print_info --message="Upgrading to Nextcloud $next_major_version" - source_id="$next_major_version" fi # Create a temporary directory From 9150d4eceefa38a7438e6af4a81a6447c24a3fd4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 22 Aug 2024 14:47:53 +0000 Subject: [PATCH 4/9] Auto-update READMEs --- ALL_README.md | 1 + README_ru.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 README_ru.md diff --git a/ALL_README.md b/ALL_README.md index 4ed64dd..e3c80d2 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -6,4 +6,5 @@ - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) - [Baca README dalam bahasa bahasa Indonesia](README_id.md) +- [Прочитать README на русский](README_ru.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..d46497c --- /dev/null +++ b/README_ru.md @@ -0,0 +1,55 @@ + + +# Nextcloud для YunoHost + +[![Уровень интеграции](https://dash.yunohost.org/integration/nextcloud.svg)](https://ci-apps.yunohost.org/ci/apps/nextcloud/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) + +[![Установите Nextcloud с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) + +*[Прочтите этот README на других языках.](./ALL_README.md)* + +> *Этот пакет позволяет Вам установить Nextcloud быстро и просто на YunoHost-сервер.* +> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* + +## Обзор + +Nextcloud lets you access and synchronize data, files, contacts and calendars between different devices (PCs or mobiles), or share them with other people (with or without accounts), and also offers advanced communication and collaborative working features. Nextcloud features its own application mechanism (see also [Nextcloud's app store](https://apps.nextcloud.com/)) for specific functionalities. + +In the context of YunoHost, Nextcloud integrates with the SSO / user portal (YunoHost accounts are automatically connected to Nextcloud). + +The `/.well-known` address will be automatically configured for CalDAV and CardDAV synchronization if no other service such as Baïkal is already using it. + + +**Поставляемая версия:** 29.0.4~ynh1 + +**Демо-версия:** + +## Снимки экрана + +![Снимок экрана Nextcloud](./doc/screenshots/screenshot.png) + +## Документация и ресурсы + +- Официальный веб-сайт приложения: +- Официальная документация пользователя: +- Официальная документация администратора: +- Репозиторий кода главной ветки приложения: +- Магазин YunoHost: +- Сообщите об ошибке: + +## Информация для разработчиков + +Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing). + +Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug +или +sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug +``` + +**Больше информации о пакетировании приложений:** From 66412c06012d23dc456fba8f2447ae414fce7683 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 22 Aug 2024 21:39:19 +0200 Subject: [PATCH 5/9] [debug] infinite loop on upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 25be390..4918b7a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | g last_major_version=${last_version%%.*} if [[ "$version_to_follow" == "oldstable" ]] then - last_major_version=$((last_major_version--)) + last_major_version=$(( $last_major_version - 1 )) last_version=$(ynh_read_manifest --manifest_key="resources.sources.${last_major_version}.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') fi @@ -178,7 +178,7 @@ then # While the current version is not the last version, do an upgrade while [ "$last_version" > "$current_version" ] do - + ynh_print_info --message="last: $last_version | current: $current_version" next_major_version="$(( $current_major_version + 1 ))" source_id="$next_major_version" if [[ "$next_major_version" -ge "$last_major_version" ]]; then From a448839b06e4f65a6f844b5cc1e90d04b72e0af6 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 22 Aug 2024 23:40:33 +0200 Subject: [PATCH 6/9] [fix] infinite loop on upgrade --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4918b7a..ea3970b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -176,9 +176,8 @@ then fi # While the current version is not the last version, do an upgrade - while [ "$last_version" > "$current_version" ] + while [[ "$last_version" > "$current_version" ]] do - ynh_print_info --message="last: $last_version | current: $current_version" next_major_version="$(( $current_major_version + 1 ))" source_id="$next_major_version" if [[ "$next_major_version" -ge "$last_major_version" ]]; then From d8fefcea6c4cbba0929737b3a0589aa2481ff58e Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 23 Aug 2024 09:52:07 +0200 Subject: [PATCH 7/9] add help key in manifest --- config_panel.toml | 5 ++--- manifest.toml | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 8fd00c7..00e0377 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -15,7 +15,7 @@ name = "Nextcloud configuration" ask.en = "Set permissions for all data (Can take up to several hours if users have a lot of data)" type = "button" style = "success" - + [main.version] [main.version.version_to_follow] ask.en = "Upgrade channel to use" @@ -24,7 +24,6 @@ name = "Nextcloud configuration" default = "stable" help.en = "Recent major releases contains sometimes some annoying bugs or regressions. Using the oldstable channel during this period can be useful if you need high stability." - [main.addressbook] name = "Address book configuration" @@ -33,7 +32,7 @@ name = "Nextcloud configuration" type = "boolean" yes = "yes" no = "no" - + [main.php_fpm_config] name = "PHP-FPM configuration" diff --git a/manifest.toml b/manifest.toml index 0353543..0076409 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,7 +61,8 @@ ram.runtime = "512M" default = true [install.version_to_follow] - ask.en = "Which version do you want" + ask.en = "Upgrade channel to use" + help.en = "Recent major releases contains sometimes some annoying bugs or regressions. Using the oldstable channel during this period can be useful if you need high stability." type = "select" choices = ["stable", "oldstable"] default = "stable" From a483dd7fc6e9743b43d1a8ea54e5375680780862 Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 23 Aug 2024 09:53:12 +0200 Subject: [PATCH 8/9] we don't want to worry about pre/post decrement --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b36fb31..b3c27f7 100755 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ source_id="main" if [ "$version_to_follow" == "oldstable" ]; then last_version=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | grep -o '[0-9][0-9]\.[0-9]\.[0-9]') last_major_version=${last_version%%.*} - source_id=$((last_major_version--)) + last_major_version=$(( $last_major_version - 1 )) fi # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id" From 8fc95edaf7b11474784bd28d06e4c90700f39954 Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 23 Aug 2024 09:53:23 +0200 Subject: [PATCH 9/9] add tests for oldstable --- tests.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests.toml b/tests.toml index cdd5e77..2685512 100644 --- a/tests.toml +++ b/tests.toml @@ -2,6 +2,8 @@ test_format = 1.0 [default] + args.version_to_follow = "stable" + # ------------------------------- # Commits to test upgrade from # ------------------------------- @@ -11,3 +13,9 @@ test_format = 1.0 test_upgrade_from.9c6d1eea.name = "Upgrade from 27.1.4" test_upgrade_from.e9f82ab7.name = "Upgrade from 28.0.6" test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes" + +[oldstable] + + args.version_to_follow = "oldstable" + test_upgrade_from.e9f82ab7.name = "Upgrade from 28.0.6" + test_upgrade_from.e9f82ab7.args.system_addressbook_exposed = "yes" \ No newline at end of file