1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minio_ynh.git synced 2024-09-03 19:46:18 +02:00

Bump minio version + fix migration

This commit is contained in:
Limezy 2023-02-24 14:20:12 +07:00
parent 59b9d90ba9
commit 1c2f966420
6 changed files with 36 additions and 26 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-01-25T00-19-54Z SOURCE_URL=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2023-02-22T18-23-45Z
SOURCE_SUM=e7d44bb2f808d9ada43c7b1a677b3ae8e336f5be442992cd35a1b89e545c76d5 SOURCE_SUM=9e27137008ee2e233f72dc5d774dec7cbb1175280e9fde20f1ccbe61365edc2f
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=minio SOURCE_FILENAME=minio

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-01-25T00-19-54Z SOURCE_URL=https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-02-22T18-23-45Z
SOURCE_SUM=a927c48815c1f077dd8228734275a521c2299de1aa28bc8972585e3addd59c3f SOURCE_SUM=845b8cd10199ca2bcee369b5b3fe82e13b5889b7040bff013780efc8c0a2bca4
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=minio SOURCE_FILENAME=minio

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-01-28T20-29-38Z SOURCE_URL=https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-02-16T19-20-11Z
SOURCE_SUM=ecd7b92a7a5c6e74db16fcd19950a28fa8ccb1fcc343ff37050787da346f7d4e SOURCE_SUM=04aee1a04a513a293af5ceff699113c791a54309cecd97b2dd71f111dcc45f7b
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mc SOURCE_FILENAME=mc

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-01-28T20-29-38Z SOURCE_URL=https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-02-16T19-20-11Z
SOURCE_SUM=319fb47eb7f48e3e6efff1151bb82d44463d5c23f94495146c813f9ed2531a4b SOURCE_SUM=df56bc161266efadc4cb722f4afb909738ff1eb5200f1446bcdb75fe4c272374
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mc SOURCE_FILENAME=mc

View file

@ -6,7 +6,7 @@
"en": "High Performance, Kubernetes Native Object Storage", "en": "High Performance, Kubernetes Native Object Storage",
"fr": "Serveur de stockage d'objets hautes performances" "fr": "Serveur de stockage d'objets hautes performances"
}, },
"version": "2023.01.11~ynh1", "version": "2023.02.22~ynh1",
"url": "https://min.io/", "url": "https://min.io/",
"upstream": { "upstream": {
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",

View file

@ -49,6 +49,33 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors 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 # 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" 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 # START SYSTEMD SERVICE
#================================================= #=================================================