From 1c2f966420b9fe1ec28ccdc3ed7316a34414bcc4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:20:12 +0700 Subject: [PATCH 01/16] Bump minio version + fix migration --- conf/amd64.src | 4 ++-- conf/arm64.src | 4 ++-- conf/mc_amd64.src | 4 ++-- conf/mc_arm64.src | 4 ++-- manifest.json | 2 +- scripts/upgrade | 44 +++++++++++++++++++++++++++----------------- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index d126eba..55e14ad 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-01-25T00-19-54Z -SOURCE_SUM=e7d44bb2f808d9ada43c7b1a677b3ae8e336f5be442992cd35a1b89e545c76d5 +SOURCE_URL=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-02-22T18-23-45Z +SOURCE_SUM=9e27137008ee2e233f72dc5d774dec7cbb1175280e9fde20f1ccbe61365edc2f SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=minio diff --git a/conf/arm64.src b/conf/arm64.src index 6e613a6..e040d83 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-01-25T00-19-54Z -SOURCE_SUM=a927c48815c1f077dd8228734275a521c2299de1aa28bc8972585e3addd59c3f +SOURCE_URL=https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-02-22T18-23-45Z +SOURCE_SUM=845b8cd10199ca2bcee369b5b3fe82e13b5889b7040bff013780efc8c0a2bca4 SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=minio diff --git a/conf/mc_amd64.src b/conf/mc_amd64.src index a32de2d..811390f 100644 --- a/conf/mc_amd64.src +++ b/conf/mc_amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-01-28T20-29-38Z -SOURCE_SUM=ecd7b92a7a5c6e74db16fcd19950a28fa8ccb1fcc343ff37050787da346f7d4e +SOURCE_URL=https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-02-16T19-20-11Z +SOURCE_SUM=04aee1a04a513a293af5ceff699113c791a54309cecd97b2dd71f111dcc45f7b SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mc diff --git a/conf/mc_arm64.src b/conf/mc_arm64.src index 610837a..cb88b4b 100644 --- a/conf/mc_arm64.src +++ b/conf/mc_arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-01-28T20-29-38Z -SOURCE_SUM=319fb47eb7f48e3e6efff1151bb82d44463d5c23f94495146c813f9ed2531a4b +SOURCE_URL=https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-02-16T19-20-11Z +SOURCE_SUM=df56bc161266efadc4cb722f4afb909738ff1eb5200f1446bcdb75fe4c272374 SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mc diff --git a/manifest.json b/manifest.json index a287fb5..096cb16 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "High Performance, Kubernetes Native Object Storage", "fr": "Serveur de stockage d'objets hautes performances" }, - "version": "2023.01.11~ynh1", + "version": "2023.02.22~ynh1", "url": "https://min.io/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/upgrade b/scripts/upgrade index a187156..9555e60 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,6 +49,33 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1 +then + ynh_script_progression --message="Moving old Filesystem to secure MinIO start" + tmp="/tmp/minio" + mkdir "$tmp" + chown -R $app:www-data "$tmp" + pushd "$tmp/" + for d in * ; do + if [ "$d" == "*" ] + then + ynh_script_progression --message="No buckets to migrate" + else + ynh_script_progression --message="Moving $d..." + ynh_exec_warn_less sudo -u $app ./mc cp --recursive "minio/$d" "$tmp/$d" + popd + ynh_secure_remove --file="$datadir" + ynh_exec_warn_less mkdir "$datadir" + chmod 750 "$datadir" + chmod -R o-rwx "$datadir" + chown -R $app:www-data "$datadir" +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -128,23 +155,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="A High Performance, Kubernetes Native Object Storage" --log="/var/log/$app/$app.log" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1 -then - ynh_script_progression --message="Moving old Filesystem to secure MinIO start" - tmp="/tmp/minio" - ynh_exec_warn_less cp -Ra "$datadir" "$tmp" - ynh_secure_remove --file="$datadir" - ynh_exec_warn_less mkdir "$datadir" - chmod 750 "$datadir" - chmod -R o-rwx "$datadir" - chown -R $app:www-data "$datadir" -fi - #================================================= # START SYSTEMD SERVICE #================================================= From 740d0ce6413a47e829ec4a6baff011b5c186227f Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:23:36 +0700 Subject: [PATCH 02/16] Stupid mistake --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 9555e60..dad2d28 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,6 +68,7 @@ then else ynh_script_progression --message="Moving $d..." ynh_exec_warn_less sudo -u $app ./mc cp --recursive "minio/$d" "$tmp/$d" + done popd ynh_secure_remove --file="$datadir" ynh_exec_warn_less mkdir "$datadir" From 3b5ade954cdde152778cdebca486d2c347827380 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:24:26 +0700 Subject: [PATCH 03/16] Another stupid mistake --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index dad2d28..2faa835 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,6 +68,7 @@ then else ynh_script_progression --message="Moving $d..." ynh_exec_warn_less sudo -u $app ./mc cp --recursive "minio/$d" "$tmp/$d" + fi done popd ynh_secure_remove --file="$datadir" From 648ce6115832e7a9b80d9040649b056e36a23b39 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:26:16 +0700 Subject: [PATCH 04/16] Force migration until 2023.02.22 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2faa835..1aba05e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,7 +54,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1 +if ynh_compare_current_package_version --comparison lt --version 2023.02.22~ynh1 then ynh_script_progression --message="Moving old Filesystem to secure MinIO start" tmp="/tmp/minio" From 9d8481dcdf7770d152329fb4d7775df47e7ac986 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:26:59 +0700 Subject: [PATCH 05/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1aba05e..9e37b4f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,7 +54,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -if ynh_compare_current_package_version --comparison lt --version 2023.02.22~ynh1 +if ynh_compare_current_package_version --comparison le --version 2023.02.22~ynh1 then ynh_script_progression --message="Moving old Filesystem to secure MinIO start" tmp="/tmp/minio" From 85a56d8923f4e21e5598ae1f15706fd5c463423f Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:27:39 +0700 Subject: [PATCH 06/16] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 9e37b4f..ac3c07c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,6 +76,8 @@ then chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" +else + ynh_script_progression --message="No migration to be done" fi #================================================= From 6d17d52048dc84db6ea8839b72218fa20ccc3a61 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:30:09 +0700 Subject: [PATCH 07/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ac3c07c..27d2c59 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,7 +60,7 @@ then tmp="/tmp/minio" mkdir "$tmp" chown -R $app:www-data "$tmp" - pushd "$tmp/" + pushd "$datadir/" for d in * ; do if [ "$d" == "*" ] then From 35769860c7c768c567ef136e94f049ecea348dda Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 14:55:58 +0700 Subject: [PATCH 08/16] Update backup --- scripts/backup | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/backup b/scripts/backup index 67278fd..059aa77 100755 --- a/scripts/backup +++ b/scripts/backup @@ -46,6 +46,7 @@ ynh_backup --src_path="$final_path" # BACKUP THE DATA DIR #================================================= +ynh_print_info --message="WARNING : by default, the buckets are not saved (use is big option)..." ynh_backup --src_path="$datadir" --is_big #================================================= From b7f47f2ee2d5d3253f1ecf49397a962e447030f4 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 15:06:07 +0700 Subject: [PATCH 09/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 27d2c59..3e30e8f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,7 +67,7 @@ then ynh_script_progression --message="No buckets to migrate" else ynh_script_progression --message="Moving $d..." - ynh_exec_warn_less sudo -u $app ./mc cp --recursive "minio/$d" "$tmp/$d" + ynh_exec_warn_less sudo -u $app $mc_path/mc cp --recursive "minio/$d" "$tmp/$d" fi done popd From 2f657dfd174e58cfcf87b821c2f897c1366f20d7 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 15:09:02 +0700 Subject: [PATCH 10/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3e30e8f..302c0c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,7 +67,7 @@ then ynh_script_progression --message="No buckets to migrate" else ynh_script_progression --message="Moving $d..." - ynh_exec_warn_less sudo -u $app $mc_path/mc cp --recursive "minio/$d" "$tmp/$d" + ynh_exec_warn_less sudo -u $app $mc_path/mc cp --recursive "minio/$d" "$tmp/" fi done popd From 8b157b5d13cf272d938b6bd53bcf68f3e3ede2e2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 15:13:28 +0700 Subject: [PATCH 11/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 302c0c5..34a5c31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -187,7 +187,7 @@ popd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1 +if ynh_compare_current_package_version --comparison le --version 2023.02.22~ynh1 then ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode" pushd "$tmp/" From 0c219315b7dae8da50468a59e204e3ea422a6a3c Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 24 Feb 2023 15:22:15 +0700 Subject: [PATCH 12/16] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 34a5c31..dd7533c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -199,7 +199,7 @@ then ynh_script_progression --message="Migrating bucket $d" pushd $mc_path ynh_exec_warn_less sudo -u $app ./mc mb minio/"$d" - ynh_exec_warn_less sudo -u $app ./mc mirror --preserve "$tmp/$d" "minio/$d" + ynh_exec_warn_less sudo -u $app ./mc cp --recursive "$tmp/$d" "minio/$d" # This is a hack, but it will make outline_ynh users' lifes much easier ! if [ "$d" == "outlinestorage" ] then From c2aafe3de896a89471a1b26cc4d80ccc2a9b091c Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 25 Feb 2023 00:58:06 +0700 Subject: [PATCH 13/16] Update upgrade --- scripts/upgrade | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index dd7533c..68a4976 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,7 +56,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." if ynh_compare_current_package_version --comparison le --version 2023.02.22~ynh1 then - ynh_script_progression --message="Moving old Filesystem to secure MinIO start" + ynh_script_progression --message="Mirroring old Filesystem to secure MinIO start" tmp="/tmp/minio" mkdir "$tmp" chown -R $app:www-data "$tmp" @@ -67,7 +67,7 @@ then ynh_script_progression --message="No buckets to migrate" else ynh_script_progression --message="Moving $d..." - ynh_exec_warn_less sudo -u $app $mc_path/mc cp --recursive "minio/$d" "$tmp/" + ynh_exec_warn_less sudo -u $app $mc_path/mc mirror --preserve "minio/$d" "$tmp/$d" fi done popd @@ -189,6 +189,10 @@ ynh_script_progression --message="Ensuring downward compatibility..." if ynh_compare_current_package_version --comparison le --version 2023.02.22~ynh1 then + if ynh_compare_current_package_version --comparison gt --version 2022.09.01~ynh1 + then + ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" + fi ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode" pushd "$tmp/" for d in * ; do @@ -199,7 +203,7 @@ then ynh_script_progression --message="Migrating bucket $d" pushd $mc_path ynh_exec_warn_less sudo -u $app ./mc mb minio/"$d" - ynh_exec_warn_less sudo -u $app ./mc cp --recursive "$tmp/$d" "minio/$d" + ynh_exec_warn_less sudo -u $app ./mc mirror --preserve "$tmp/$d" "minio/$d" # This is a hack, but it will make outline_ynh users' lifes much easier ! if [ "$d" == "outlinestorage" ] then From 14e6d6a8097f08258498c80e6976dbd7fceeed75 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 25 Feb 2023 01:10:13 +0700 Subject: [PATCH 14/16] Update upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 68a4976..9970059 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,10 @@ then ynh_exec_warn_less sudo -u $app $mc_path/mc mirror --preserve "minio/$d" "$tmp/$d" fi done + if ynh_compare_current_package_version --comparison gt --version 2022.09.01~ynh1 + then + ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" + fi popd ynh_secure_remove --file="$datadir" ynh_exec_warn_less mkdir "$datadir" @@ -189,10 +193,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." if ynh_compare_current_package_version --comparison le --version 2023.02.22~ynh1 then - if ynh_compare_current_package_version --comparison gt --version 2022.09.01~ynh1 - then - ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" - fi ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode" pushd "$tmp/" for d in * ; do From 12a10904fe75e38aba0264dd01ba61c4a64c4c07 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 4 Mar 2023 00:01:37 +0700 Subject: [PATCH 15/16] Fix CI --- check_process | 1 - scripts/upgrade | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index fa8fdb1..6cdf741 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,6 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=1ef6a65e00dbb39dac8919cf6c5f4313fea8462e backup_restore=1 multi_instance=0 port_already_use=0 diff --git a/scripts/upgrade b/scripts/upgrade index 9970059..d11cf75 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,7 +70,15 @@ then ynh_exec_warn_less sudo -u $app $mc_path/mc mirror --preserve "minio/$d" "$tmp/$d" fi done - if ynh_compare_current_package_version --comparison gt --version 2022.09.01~ynh1 + if ynh_compare_current_package_version --comparison eq --version 2022.09.01~ynh1 + then + ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" + fi + if ynh_compare_current_package_version --comparison eq --version 2022.11.11~ynh1 + then + ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" + fi + if ynh_compare_current_package_version --comparison eq --version 2023.01.11~ynh1 then ynh_die --message="Sorry, your MinIO instance requires a complex manual migration. Please contact Limezy on the Yunohost forum" fi From b7eecdec7eb3c8911ad33ca2d4afa79695dae4b2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 20 Mar 2023 16:20:50 +0000 Subject: [PATCH 16/16] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 872b651..fa036cd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # MinIO server for YunoHost [![Integration level](https://dash.yunohost.org/integration/minio.svg)](https://dash.yunohost.org/appci/app/minio) ![Working status](https://ci-apps.yunohost.org/ci/badges/minio.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/minio.maintain.svg) + [![Install MinIO server with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=minio) *[Lire ce readme en français.](./README_fr.md)* @@ -18,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads. -**Shipped version:** 2023.01.11~ynh1 +**Shipped version:** 2023.02.22~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 1cb7f3e..12dd81d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # MinIO server pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/minio.svg)](https://dash.yunohost.org/appci/app/minio) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/minio.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/minio.maintain.svg) + [![Installer MinIO server avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=minio) *[Read this readme in english.](./README.md)* @@ -18,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads. -**Version incluse :** 2023.01.11~ynh1 +**Version incluse :** 2023.02.22~ynh1 ## Captures d’écran