From 932ff388ef9244192c3301a3088bdafb3a3a7257 Mon Sep 17 00:00:00 2001 From: fgma Date: Wed, 4 Jan 2023 18:46:31 +0100 Subject: [PATCH 1/8] minio: update to 2022-10-24T18-35-07Z --- cross/minio-client/Makefile | 4 ++-- cross/minio-client/digests | 6 +++--- cross/minio/Makefile | 4 ++-- cross/minio/digests | 6 +++--- spk/minio/Makefile | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cross/minio-client/Makefile b/cross/minio-client/Makefile index cee86a28a17..ade4dae5d74 100644 --- a/cross/minio-client/Makefile +++ b/cross/minio-client/Makefile @@ -1,8 +1,8 @@ PKG_NAME = minio-client REAL_PKG_NAME = mc -PKG_VERS = 2022-08-28T20-08-11Z +PKG_VERS = 2022-12-13T00-23-28Z PKG_RELEASE_TAG = $(subst :,-,$(PKG_VERS)) -PKG_COMMIT_ID = a64491e101feeaf68735a20c204d06993ba531e5 +PKG_COMMIT_ID = 4b4cab0441f000db100c5b5d9329221181bf61f2 PKG_EXT = tar.gz PKG_DIST_PREFIX = RELEASE.$(PKG_RELEASE_TAG) PKG_DIST_NAME = $(PKG_DIST_PREFIX).$(PKG_EXT) diff --git a/cross/minio-client/digests b/cross/minio-client/digests index c1ec4b4b91b..034e1a39fc1 100644 --- a/cross/minio-client/digests +++ b/cross/minio-client/digests @@ -1,3 +1,3 @@ -minio-client-RELEASE.2022-08-28T20-08-11Z.tar.gz SHA1 4b0108d01be3eeb62b0802ce5258fd3c00afb8ac -minio-client-RELEASE.2022-08-28T20-08-11Z.tar.gz SHA256 2c0f867067f8325c5dd011bac7bad7d9652c9229f03ec50a1564012ed46f6b87 -minio-client-RELEASE.2022-08-28T20-08-11Z.tar.gz MD5 225d798b5cbf064cbb2f57c277652557 +minio-client-RELEASE.2022-12-13T00-23-28Z.tar.gz SHA1 193205663e7bbdb53dd71cf02011983420cd9157 +minio-client-RELEASE.2022-12-13T00-23-28Z.tar.gz SHA256 66fd150ae742e8ac2fa839eef4a50b863f68ca69e867818b7999bef718c145ba +minio-client-RELEASE.2022-12-13T00-23-28Z.tar.gz MD5 7f804c6d6f082f77d4592473d1e35408 diff --git a/cross/minio/Makefile b/cross/minio/Makefile index 8b669b753ff..e74443983fc 100644 --- a/cross/minio/Makefile +++ b/cross/minio/Makefile @@ -1,7 +1,7 @@ PKG_NAME = minio -PKG_VERS = 2022-09-07T22-25-02Z +PKG_VERS = 2022-10-24T18-35-07Z PKG_RELEASE_TAG = $(subst :,-,$(PKG_VERS)) -PKG_COMMIT_ID = bb855499e1519f31c03c9b91c0f9f10cb6439253 +PKG_COMMIT_ID = fc6c7949727ec261cd57fbdb02fa7575d0fd8e61 PKG_EXT = tar.gz PKG_DIST_PREFIX = RELEASE.$(PKG_RELEASE_TAG) PKG_DIST_NAME = $(PKG_DIST_PREFIX).$(PKG_EXT) diff --git a/cross/minio/digests b/cross/minio/digests index c88e81b71b3..0664fb84fa2 100644 --- a/cross/minio/digests +++ b/cross/minio/digests @@ -1,3 +1,3 @@ -minio-RELEASE.2022-09-07T22-25-02Z.tar.gz SHA1 c8938831d28bc98b372e1b2a980b03b2fa22a6ad -minio-RELEASE.2022-09-07T22-25-02Z.tar.gz SHA256 dc82945606b5f7468fc2c2e58866f5b170a6c32a76f1507d0c39ed27a4483dee -minio-RELEASE.2022-09-07T22-25-02Z.tar.gz MD5 b602b27d913b553c443853dfb0cd2b18 +minio-RELEASE.2022-10-24T18-35-07Z.tar.gz SHA1 56c371d566f26085a541f06c8b833651c4834f69 +minio-RELEASE.2022-10-24T18-35-07Z.tar.gz SHA256 c9814e0b856c86d0a360cfb464401c3a106dfad50174e8c9897839320bcc5410 +minio-RELEASE.2022-10-24T18-35-07Z.tar.gz MD5 88f3bbb662b17dc6cb873b3e9488d8c7 diff --git a/spk/minio/Makefile b/spk/minio/Makefile index 867da17cc54..91abbb751c8 100644 --- a/spk/minio/Makefile +++ b/spk/minio/Makefile @@ -1,6 +1,6 @@ SPK_NAME = minio -SPK_VERS = 2022.09.07 -SPK_REV = 15 +SPK_VERS = 2022.10.24 +SPK_REV = 16 SPK_ICON = src/minio.png DSM_UI_DIR = app @@ -11,7 +11,7 @@ UNSUPPORTED_ARCHS = $(PPC_ARCHS) MAINTAINER = fgma DESCRIPTION = MinIO is a high performance object storage server compatible with Amazon S3 APIs. This Package includes the 'minio-client' \(mc\). DISPLAY_NAME = MinIO -CHANGELOG = "1. Update to MinIO 2022-09-07T22-25-02Z. Multiple minor feature releases and security releases.
2. Include minio-client (mc) in the package (named 'minio-client' and availalbe in the path, to use the client as 'mc' your have to specify the full path: /var/packages/minio/target/bin/mc).
3. Format of the environment-variables file has changed. Custom variables are exported by default and must not be defined with export anymore." +CHANGELOG = "1. Update to MinIO 2022-10-24T18-35-07Z. Multiple minor feature releases and security releases.
2. Include minio-client (mc) in the package (named 'minio-client' and availalbe in the path, to use the client as 'mc' your have to specify the full path: /var/packages/minio/target/bin/mc).
3. Format of the environment-variables file has changed. Custom variables are exported by default and must not be defined with export anymore." LICENSE_FILE = $(WORK_DIR)/src/github.com/minio/minio/LICENSE HOMEPAGE = https://min.io/ LICENSE = AGPLv3.0 From 6f8b0b5a8d350a4aea4606ff88e745f9df16d3f1 Mon Sep 17 00:00:00 2001 From: fgma Date: Fri, 24 Feb 2023 20:41:32 +0100 Subject: [PATCH 2/8] minio: update changelog --- spk/minio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spk/minio/Makefile b/spk/minio/Makefile index 91abbb751c8..745c7083cb4 100644 --- a/spk/minio/Makefile +++ b/spk/minio/Makefile @@ -11,7 +11,7 @@ UNSUPPORTED_ARCHS = $(PPC_ARCHS) MAINTAINER = fgma DESCRIPTION = MinIO is a high performance object storage server compatible with Amazon S3 APIs. This Package includes the 'minio-client' \(mc\). DISPLAY_NAME = MinIO -CHANGELOG = "1. Update to MinIO 2022-10-24T18-35-07Z. Multiple minor feature releases and security releases.
2. Include minio-client (mc) in the package (named 'minio-client' and availalbe in the path, to use the client as 'mc' your have to specify the full path: /var/packages/minio/target/bin/mc).
3. Format of the environment-variables file has changed. Custom variables are exported by default and must not be defined with export anymore." +CHANGELOG = "1. Update to MinIO 2022-10-24T18-35-07Z. Multiple minor feature releases and security releases.
2. Last version supporting legacy “FS-mode” backend. All newer versions will not be able to read data from old installations anymore." LICENSE_FILE = $(WORK_DIR)/src/github.com/minio/minio/LICENSE HOMEPAGE = https://min.io/ LICENSE = AGPLv3.0 From db39b38b653bd1c670c3a69be765889ec3ffc925 Mon Sep 17 00:00:00 2001 From: fgma Date: Fri, 10 Nov 2023 21:51:04 +0100 Subject: [PATCH 3/8] minio: end of life note in install wizard --- cross/minio-client/Makefile | 2 +- cross/minio/Makefile | 2 +- spk/minio/src/wizard/install_uifile | 17 +++++++++++++++++ spk/minio/src/wizard/upgrade_uifile.sh | 17 +++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/cross/minio-client/Makefile b/cross/minio-client/Makefile index ade4dae5d74..f5d86e032c6 100644 --- a/cross/minio-client/Makefile +++ b/cross/minio-client/Makefile @@ -25,7 +25,7 @@ GO_BIN_DIR = $(GO_SRC_DIR)/$(REAL_PKG_NAME) ENV += GO111MODULE=on -GO_BUILD_ARGS = -tags kqueue +GO_BUILD_ARGS = -tags kqueue -buildvcs=false GO_LDFLAGS = -s -w GO_LDFLAGS += -X github.com/minio/mc/cmd.ReleaseTag=$(PKG_RELEASE_TAG) diff --git a/cross/minio/Makefile b/cross/minio/Makefile index e74443983fc..eaa2ffa99e9 100644 --- a/cross/minio/Makefile +++ b/cross/minio/Makefile @@ -23,7 +23,7 @@ GO_BIN_DIR = $(GO_SRC_DIR)/$(PKG_NAME) ENV += GO111MODULE=on -GO_BUILD_ARGS = -tags kqueue +GO_BUILD_ARGS = -tags kqueue -buildvcs=false GO_LDFLAGS = -s -w GO_LDFLAGS += -X github.com/minio/minio/cmd.ReleaseTag=$(PKG_RELEASE_TAG) diff --git a/spk/minio/src/wizard/install_uifile b/spk/minio/src/wizard/install_uifile index 215fa926cd1..263c1ebcf8a 100644 --- a/spk/minio/src/wizard/install_uifile +++ b/spk/minio/src/wizard/install_uifile @@ -96,5 +96,22 @@ ] } ] + }, + { + "step_title": "MinIO - end of life for filesystem mode", + "items": [ + { + "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. This is the only way to receive future updates of MinIO. A new MinIO package with a different name will be provided in future." + }, + { + "desc": "To check if you're affected by this change check your buckets manually by looking into each folder on your diskstation. If there is exactly a single file per S3 object you need to migrate your data. Otherwise you're already running a single-node single-drive deployment an can upgrade to the new MinIO package in future without a migration." + }, + { + "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" + }, + { + "desc": "For a regular user it is suggested to run an instance of MinIO on a seperate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from you diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + } + ] } ] \ No newline at end of file diff --git a/spk/minio/src/wizard/upgrade_uifile.sh b/spk/minio/src/wizard/upgrade_uifile.sh index 9f5e8cd967f..70a5df3b79a 100644 --- a/spk/minio/src/wizard/upgrade_uifile.sh +++ b/spk/minio/src/wizard/upgrade_uifile.sh @@ -114,6 +114,23 @@ cat < $SYNOPKG_TEMP_LOGFILE ] } ] + }, + { + "step_title": "MinIO - end of life for filesystem mode", + "items": [ + { + "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. This is the only way to receive future updates of MinIO. A new MinIO package with a different name will be provided in future." + }, + { + "desc": "To check if you're affected by this change check your buckets manually by looking into each folder on your diskstation. If there is exactly a single file per S3 object you need to migrate your data. Otherwise you're already running a single-node single-drive deployment an can upgrade to the new MinIO package in future without a migration." + }, + { + "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" + }, + { + "desc": "For a regular user it is suggested to run an instance of MinIO on a seperate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from you diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + } + ] } ] EOF From 545390941a44a72455ebb6d17193586868d6d2c6 Mon Sep 17 00:00:00 2001 From: fgma Date: Sat, 18 Nov 2023 20:42:34 +0100 Subject: [PATCH 4/8] minio: fix typos in wizard --- spk/minio/src/wizard/install_uifile | 2 +- spk/minio/src/wizard/upgrade_uifile.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spk/minio/src/wizard/install_uifile b/spk/minio/src/wizard/install_uifile index 263c1ebcf8a..2595a150660 100644 --- a/spk/minio/src/wizard/install_uifile +++ b/spk/minio/src/wizard/install_uifile @@ -110,7 +110,7 @@ "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" }, { - "desc": "For a regular user it is suggested to run an instance of MinIO on a seperate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from you diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + "desc": "For a regular user it is suggested to run an instance of MinIO on a separate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from your diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." } ] } diff --git a/spk/minio/src/wizard/upgrade_uifile.sh b/spk/minio/src/wizard/upgrade_uifile.sh index 70a5df3b79a..a66356cc42a 100644 --- a/spk/minio/src/wizard/upgrade_uifile.sh +++ b/spk/minio/src/wizard/upgrade_uifile.sh @@ -128,7 +128,7 @@ cat < $SYNOPKG_TEMP_LOGFILE "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" }, { - "desc": "For a regular user it is suggested to run an instance of MinIO on a seperate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from you diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + "desc": "For a regular user it is suggested to run an instance of MinIO on a separate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from your diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." } ] } From 6727bb7a37570705df37ae965f6a479a49762082 Mon Sep 17 00:00:00 2001 From: fgma Date: Sat, 18 Nov 2023 21:11:21 +0100 Subject: [PATCH 5/8] minio: fix version information in binaries --- cross/minio-client/Makefile | 3 ++- cross/minio/Makefile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cross/minio-client/Makefile b/cross/minio-client/Makefile index f5d86e032c6..d8a968de8f7 100644 --- a/cross/minio-client/Makefile +++ b/cross/minio-client/Makefile @@ -28,9 +28,10 @@ ENV += GO111MODULE=on GO_BUILD_ARGS = -tags kqueue -buildvcs=false GO_LDFLAGS = -s -w +GO_LDFLAGS += -X github.com/minio/mc/cmd.Version=$(PKG_VERS) GO_LDFLAGS += -X github.com/minio/mc/cmd.ReleaseTag=$(PKG_RELEASE_TAG) -GO_LDFLAGS += -X github.com/minio/mc/cmd.CopyrightYear=$(firstword $(subst -, ,$(PKG_VERS))) GO_LDFLAGS += -X github.com/minio/mc/cmd.CommitID=$(PKG_COMMIT_ID) +GO_LDFLAGS += -X github.com/minio/mc/cmd.CopyrightYear=$(firstword $(subst -, ,$(PKG_VERS))) include ../../mk/spksrc.cross-go.mk diff --git a/cross/minio/Makefile b/cross/minio/Makefile index eaa2ffa99e9..be9d6b28eeb 100644 --- a/cross/minio/Makefile +++ b/cross/minio/Makefile @@ -26,9 +26,11 @@ ENV += GO111MODULE=on GO_BUILD_ARGS = -tags kqueue -buildvcs=false GO_LDFLAGS = -s -w +GO_LDFLAGS += -X github.com/minio/minio/cmd.Version=$(PKG_VERS) GO_LDFLAGS += -X github.com/minio/minio/cmd.ReleaseTag=$(PKG_RELEASE_TAG) -GO_LDFLAGS += -X github.com/minio/minio/cmd.CopyrightYear=$(firstword $(subst -, ,$(PKG_VERS))) GO_LDFLAGS += -X github.com/minio/minio/cmd.CommitID=$(PKG_COMMIT_ID) +GO_LDFLAGS += -X github.com/minio/minio/cmd.ShortCommitID=$(shell echo $(PKG_COMMIT_ID) | cut -c1-12) +GO_LDFLAGS += -X github.com/minio/minio/cmd.CopyrightYear=$(firstword $(subst -, ,$(PKG_VERS))) include ../../mk/spksrc.cross-go.mk From b52e3436845114955ab0db85d6f8b967ba5ada9d Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 7 Sep 2024 16:03:11 +0200 Subject: [PATCH 6/8] migrate to redesigned shared folder handing - adjust wizard for shared folders - use SHARE_PATH variable instead of WIZARD_DATA_VOLUME and WIZARD_DATA_DIRECTORY --- spk/minio/Makefile | 3 +- spk/minio/src/service-setup.sh | 4 +-- spk/minio/src/wizard/install_uifile | 41 +++--------------------- spk/minio/src/wizard/upgrade_uifile.sh | 44 +++----------------------- 4 files changed, 11 insertions(+), 81 deletions(-) diff --git a/spk/minio/Makefile b/spk/minio/Makefile index 745c7083cb4..beb762a71ce 100644 --- a/spk/minio/Makefile +++ b/spk/minio/Makefile @@ -21,8 +21,7 @@ WIZARDS_DIR = src/wizard STARTABLE = yes SERVICE_USER = auto SERVICE_SETUP = src/service-setup.sh -SERVICE_WIZARD_SHARE = wizard_data_directory -USE_DATA_SHARE_WORKER = yes +SERVICE_WIZARD_SHARENAME = wizard_data_directory FWPORTS = src/minio.sc # Console Port (API Port is 9000) ADMIN_PORT = 9001 diff --git a/spk/minio/src/service-setup.sh b/spk/minio/src/service-setup.sh index ac8562d3fb6..51ad771f89a 100644 --- a/spk/minio/src/service-setup.sh +++ b/spk/minio/src/service-setup.sh @@ -14,8 +14,6 @@ SVC_WRITE_PID=y service_postinst () { echo HOME="${SYNOPKG_PKGVAR}" >> ${INST_VARIABLES} - echo WIZARD_DATA_VOLUME="${wizard_data_volume}" >> ${INST_VARIABLES} - echo WIZARD_DATA_DIRECTORY="${wizard_data_directory}" >> ${INST_VARIABLES} echo MINIO_ROOT_USER="${wizard_root_user}" >> ${INST_VARIABLES} echo MINIO_ROOT_PASSWORD="${wizard_root_password}" >> ${INST_VARIABLES} } @@ -44,5 +42,5 @@ service_prestart () # Load custom variables export_variables_from_file "${ENV_VARIABLES}" - SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/minio server --quiet --console-address :${CONSOLE_PORT} --anonymous ${WIZARD_DATA_VOLUME}/${WIZARD_DATA_DIRECTORY}" + SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/minio server --quiet --console-address :${CONSOLE_PORT} --anonymous ${SHARE_PATH}" } diff --git a/spk/minio/src/wizard/install_uifile b/spk/minio/src/wizard/install_uifile index 2595a150660..5ec2fcec217 100644 --- a/spk/minio/src/wizard/install_uifile +++ b/spk/minio/src/wizard/install_uifile @@ -2,42 +2,9 @@ { "step_title": "MinIO configuration", "items": [ - { - "type": "combobox", - "desc": "Please select a volume to use for the data folder", - "subitems": [ - { - "key": "wizard_data_volume", - "desc": "Volume name", - "displayField": "display_name", - "valueField": "volume_path", - "editable": false, - "mode": "remote", - "api_store": { - "api": "SYNO.Core.Storage.Volume", - "method": "list", - "version": 1, - "baseParams": { - "limit": -1, - "offset": 0, - "location": "internal" - }, - "root": "volumes", - "idProperty": "volume_path", - "fields": [ - "display_name", - "volume_path" - ] - }, - "validator": { - "fn": "{console.log(arguments);return true;}" - } - } - ] - }, { "type": "textfield", - "desc": "Data shared folder (using the volume chosen above)", + "desc": "Data shared folder. This must be a name for the shared folder only, without any path. This share is created at installation when it does not already exist.", "subitems": [ { "key": "wizard_data_directory", @@ -46,15 +13,15 @@ "validator": { "allowBlank": false, "regex": { - "expr": "/^[\\w _-]+$/", - "errorText": "Subdirectories are not supported." + "expr": "/^[^<>: */?\"]*/", + "errorText": "Share name must be a folder name only. Path separators, spaces and other special chars are not allowed." } } } ] }, { - "desc": "The folder will be created on demand as regular DSM shared folder for the service user sc-minio. For details about the DSM permissions see Permission Management.

" + "desc": "If you let the installer create the shared folder, it is created under the same volume as the package is installed. If you want to use a different volume for the share, you must create the shared folder in DSM Control Panel before, and enter the name of the existing share in the field above." }, { "desc": "Please define the following credentials to access the MinIO services:" diff --git a/spk/minio/src/wizard/upgrade_uifile.sh b/spk/minio/src/wizard/upgrade_uifile.sh index a66356cc42a..5079a65730f 100644 --- a/spk/minio/src/wizard/upgrade_uifile.sh +++ b/spk/minio/src/wizard/upgrade_uifile.sh @@ -19,60 +19,26 @@ cat < $SYNOPKG_TEMP_LOGFILE { "step_title": "MinIO configuration", "items": [ - { - "type": "combobox", - "desc": "Please select a volume to use for the data folder", - "subitems": [ - { - "key": "wizard_data_volume", - "desc": "Volume name", - "defaultValue": "${WIZARD_DATA_VOLUME}", - "displayField": "display_name", - "valueField": "volume_path", - "editable": false, - "mode": "remote", - "api_store": { - "api": "SYNO.Core.Storage.Volume", - "method": "list", - "version": 1, - "baseParams": { - "limit": -1, - "offset": 0, - "location": "internal" - }, - "root": "volumes", - "idProperty": "volume_path", - "fields": [ - "display_name", - "volume_path" - ] - }, - "validator": { - "fn": "{console.log(arguments);return true;}" - } - } - ] - }, { "type": "textfield", - "desc": "Data shared folder (using the volume chosen above)", + "desc": "Data shared folder. This must be a name for the shared folder only, without any path. This share is created at installation when it does not already exist.", "subitems": [ { "key": "wizard_data_directory", "desc": "Data shared folder", - "defaultValue": "${WIZARD_DATA_DIRECTORY}", + "defaultValue": "${SHARE_NAME}", "validator": { "allowBlank": false, "regex": { - "expr": "/^[\\\\w _-]+$/", - "errorText": "Subdirectories are not supported." + "expr": "/^[^<>: */?\"]*/", + "errorText": "Share name must be a folder name only. Path separators, spaces and other special chars are not allowed." } } } ] }, { - "desc": "The folder will be created on demand as regular DSM shared folder for the service user sc-minio. For details about the DSM permissions see Permission Management.

" + "desc": "If you let the installer create the shared folder, it is created under the same volume as the package is installed. If you want to use a different volume for the share, you must create the shared folder in DSM Control Panel before, and enter the name of the existing share in the field above." }, { "desc": "Please define the following credentials to access the MinIO services:" From 99cd8f49e83edb91c52870b20407bdc68d02839e Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sun, 8 Sep 2024 01:48:57 +0200 Subject: [PATCH 7/8] update install and upgrade wizards - add notes to the installation wizard that the "Migration notes" apply only when the shared folder already contains a minio data structure - evaluate existing data format in upgrade wizard and show related "Migration notes" - reusing an existing installation with the new format will have no upgrade issues - reusing an existing installation with the filesystem format will not get any future update - when changing the shared folder on upgrade, the data format is unknown and it is unknown whether future updates will work - add link to the 'Migrate from Gateway or Filesystem Mode' page --- spk/minio/src/wizard/install_uifile | 11 +-- spk/minio/src/wizard/upgrade_uifile.sh | 110 +++++++++++++++++++++---- 2 files changed, 99 insertions(+), 22 deletions(-) diff --git a/spk/minio/src/wizard/install_uifile b/spk/minio/src/wizard/install_uifile index 5ec2fcec217..5cda1e11e78 100644 --- a/spk/minio/src/wizard/install_uifile +++ b/spk/minio/src/wizard/install_uifile @@ -65,19 +65,16 @@ ] }, { - "step_title": "MinIO - end of life for filesystem mode", + "step_title": "MinIO - Migration Notes", "items": [ { - "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. This is the only way to receive future updates of MinIO. A new MinIO package with a different name will be provided in future." + "desc": "The following notes apply only in the case where the shared folder already contains a MinIO data structure." }, { - "desc": "To check if you're affected by this change check your buckets manually by looking into each folder on your diskstation. If there is exactly a single file per S3 object you need to migrate your data. Otherwise you're already running a single-node single-drive deployment an can upgrade to the new MinIO package in future without a migration." + "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. Future MinIO packages will support the new format only." }, { - "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" - }, - { - "desc": "For a regular user it is suggested to run an instance of MinIO on a separate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from your diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + "desc": "Because of the complexity and risks involved, an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so, see Migrate from Gateway or Filesystem Mode." } ] } diff --git a/spk/minio/src/wizard/upgrade_uifile.sh b/spk/minio/src/wizard/upgrade_uifile.sh index 5079a65730f..65d084772f5 100644 --- a/spk/minio/src/wizard/upgrade_uifile.sh +++ b/spk/minio/src/wizard/upgrade_uifile.sh @@ -2,22 +2,105 @@ INST_ETC="/var/packages/${SYNOPKG_PKGNAME}/etc" INST_VARIABLES="${INST_ETC}/installer-variables" +MINIO_DATA_FORMAT="unknown" # Reload wizard variables stored by postinst if [ -r "${INST_VARIABLES}" ]; then - # we cannot source the file to reload variables, when values have special characters. - # This works even with following characers (e.g. for passwords): " ' < \ > :space: = $ | ... - while read -r _line; do - _key="$(echo ${_line} | cut --fields=1 --delimiter='=')" - _value="$(echo ${_line} | cut --fields=2- --delimiter='=')" - declare -g "${_key}=${_value}" - done < ${INST_VARIABLES} + # we cannot source the file to reload variables, when values have special characters. + # This works even with following characers (e.g. for passwords): " ' < \ > :space: = $ | ... + while read -r _line; do + _key="$(echo ${_line} | cut --fields=1 --delimiter='=')" + _value="$(echo ${_line} | cut --fields=2- --delimiter='=')" + declare -g "${_key}=${_value}" + done < ${INST_VARIABLES} fi +# Evaluate the current data format +if [ -d "${SHARE_PATH}" ]; then + if [ -d "${SHARE_PATH}/.minio.sys" ]; then + if [ -r "${SHARE_PATH}/.minio.sys/format.json" ]; then + MINIO_DATA_FORMAT=$(cat "${SHARE_PATH}/.minio.sys/format.json" | jq '.format' | tr -d '"') + fi + fi +fi + + +TITLE_STEP_1="MinIO configuration" +TITLE_STEP_2="MinIO - Migration Notes" + +UPDATE_TEXT_INFO="This MinIO installation uses already the new data format.
You will be able to update to future minio package versions." +UPDATE_TEXT_WARNING1="This MinIO installation uses the FS data format.
Future minio versions will not be installable without prior manual data migration." +UPDATE_TEXT_WARNING2="You changed the MinIO data directory or the data format could not be evaluated.
Future minio versions will only be installable when the folder does not contain MinIO data in the FS Format." + +quote_json () +{ + sed -e 's|\\|\\\\|g' -e 's|\"|\\\"|g' +} + +deactivateFunction () +{ + DEACTIVATE=$(/bin/cat< $SYNOPKG_TEMP_LOGFILE [ { - "step_title": "MinIO configuration", + "step_title": "${TITLE_STEP_1}", + "deactivate_v2": "$(deactivateFunction)", "items": [ { "type": "textfield", @@ -82,19 +165,16 @@ cat < $SYNOPKG_TEMP_LOGFILE ] }, { - "step_title": "MinIO - end of life for filesystem mode", + "step_title": "${TITLE_STEP_2}", "items": [ { - "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. This is the only way to receive future updates of MinIO. A new MinIO package with a different name will be provided in future." - }, - { - "desc": "To check if you're affected by this change check your buckets manually by looking into each folder on your diskstation. If there is exactly a single file per S3 object you need to migrate your data. Otherwise you're already running a single-node single-drive deployment an can upgrade to the new MinIO package in future without a migration." + "desc": "This text is set before activating this page." }, { - "desc": "Because of the complexity and risks involved an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so called 'Migrate from Gateway or Filesystem Mode'" + "desc": "MinIO removed support for the filesystem mode which is a 1:1 mapping of buckets to files on disk. If your deployment uses filesystem mode you need to manually migrate to single-node single-drive deployment setup. Future MinIO packages will support the new format only." }, { - "desc": "For a regular user it is suggested to run an instance of MinIO on a separate system and migrate your data to this new instance. This system could be a desktop, single board computer or a server. If possible you can mount the storage from your diskstation over the network and use it directly during the migration process. After a successful migration replace the data of your current MinIO installation on your diskstation. Please stop MinIO before replacing your data and restart it afterwards." + "desc": "Because of the complexity and risks involved, an automatic upgrade process is not available. The official MinIO documentation provides a guide for doing so, see Migrate from Gateway or Filesystem Mode." } ] } From 9a0ab9cc75cb46e707e0657ff136f1243506ac72 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 9 Sep 2024 01:09:12 +0200 Subject: [PATCH 8/8] fix upgrade wizard for DSM 6 --- spk/minio/src/service-setup.sh | 16 ++++++++-------- spk/minio/src/wizard/upgrade_uifile.sh | 23 +++++++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/spk/minio/src/service-setup.sh b/spk/minio/src/service-setup.sh index 51ad771f89a..04788eb3b5b 100644 --- a/spk/minio/src/service-setup.sh +++ b/spk/minio/src/service-setup.sh @@ -13,9 +13,9 @@ SVC_WRITE_PID=y service_postinst () { - echo HOME="${SYNOPKG_PKGVAR}" >> ${INST_VARIABLES} - echo MINIO_ROOT_USER="${wizard_root_user}" >> ${INST_VARIABLES} - echo MINIO_ROOT_PASSWORD="${wizard_root_password}" >> ${INST_VARIABLES} + echo HOME="${SYNOPKG_PKGVAR}" >> ${INST_VARIABLES} + echo MINIO_ROOT_USER="${wizard_root_user}" >> ${INST_VARIABLES} + echo MINIO_ROOT_PASSWORD="${wizard_root_password}" >> ${INST_VARIABLES} } # function to read and export variables from a text file @@ -36,11 +36,11 @@ export_variables_from_file () service_prestart () { - # Reload wizard variables stored by postinst - export_variables_from_file "${INST_VARIABLES}" + # Reload wizard variables stored by postinst + export_variables_from_file "${INST_VARIABLES}" - # Load custom variables - export_variables_from_file "${ENV_VARIABLES}" + # Load custom variables + export_variables_from_file "${ENV_VARIABLES}" - SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/minio server --quiet --console-address :${CONSOLE_PORT} --anonymous ${SHARE_PATH}" + SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/minio server --quiet --console-address :${CONSOLE_PORT} --anonymous ${SHARE_PATH}" } diff --git a/spk/minio/src/wizard/upgrade_uifile.sh b/spk/minio/src/wizard/upgrade_uifile.sh index 65d084772f5..4287cc8619a 100644 --- a/spk/minio/src/wizard/upgrade_uifile.sh +++ b/spk/minio/src/wizard/upgrade_uifile.sh @@ -15,11 +15,21 @@ if [ -r "${INST_VARIABLES}" ]; then done < ${INST_VARIABLES} fi + +# Evaluate the current data path +FORMER_SHARE_NAME="${SHARE_NAME}" +FORMER_SHARE_PATH="${SHARE_PATH}" +if [ -n "${WIZARD_DATA_VOLUME}" -a -n "${WIZARD_DATA_DIRECTORY}" ]; then + FORMER_SHARE_NAME="${WIZARD_DATA_DIRECTORY}" + FORMER_SHARE_PATH="${WIZARD_DATA_VOLUME}/${WIZARD_DATA_DIRECTORY}" +fi + + # Evaluate the current data format -if [ -d "${SHARE_PATH}" ]; then - if [ -d "${SHARE_PATH}/.minio.sys" ]; then - if [ -r "${SHARE_PATH}/.minio.sys/format.json" ]; then - MINIO_DATA_FORMAT=$(cat "${SHARE_PATH}/.minio.sys/format.json" | jq '.format' | tr -d '"') +if [ -d "${FORMER_SHARE_PATH}" ]; then + if [ -d "${FORMER_SHARE_PATH}/.minio.sys" ]; then + if [ -r "${FORMER_SHARE_PATH}/.minio.sys/format.json" ]; then + MINIO_DATA_FORMAT=$(cat "${FORMER_SHARE_PATH}/.minio.sys/format.json" | jq '.format' | tr -d '"') fi fi fi @@ -37,6 +47,7 @@ quote_json () sed -e 's|\\|\\\\|g' -e 's|\"|\\\"|g' } +# when leaving step1 set first text in step2 deactivateFunction () { DEACTIVATE=$(/bin/cat< $SYNOPKG_TEMP_LOGFILE { "key": "wizard_data_directory", "desc": "Data shared folder", - "defaultValue": "${SHARE_NAME}", + "defaultValue": "${FORMER_SHARE_NAME}", "validator": { "allowBlank": false, "regex": {