From b60691e6f30382c288606f8859b1ccd7eefa8f81 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 10 Aug 2019 14:46:34 +0200 Subject: [PATCH 1/5] Fix scope of exec_occ function --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8e75255..320381e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -176,16 +176,16 @@ ynh_install_app_dependencies $pkg_dependencies # VERSION TO THE NEXT ONE #================================================= +# Define a function to execute commands with `occ` +exec_occ() { +(cd "$final_path" && exec_as "$app" \ + php occ --no-interaction --no-ansi "$@") +} + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading nextcloud..." --weight=3 - # Define a function to execute commands with `occ` - exec_occ() { - (cd "$final_path" && exec_as "$app" \ - php occ --no-interaction --no-ansi "$@") - } - # Load the last available version source upgrade.d/upgrade.last.sh last_version=$next_version From 8482d00f1a43aed960a4e5a91ebb889c4d182b67 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 10 Aug 2019 17:20:47 +0200 Subject: [PATCH 2/5] Change scope of create_external_storage as well --- scripts/upgrade | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 320381e..f6bdc01 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -182,6 +182,18 @@ exec_occ() { php occ --no-interaction --no-ansi "$@") } +# Define a function to add an external storage +# Create the external storage for the given folders and enable sharing +create_external_storage() { +local datadir="$1" +local mount_name="$2" +local mount_id=`exec_occ files_external:create --output=json \ + "$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true` +! [[ $mount_id =~ ^[0-9]+$ ]] \ + && ynh_print_warn --message="Unable to create external storage" \ + || exec_occ files_external:option "$mount_id" enable_sharing true +} + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading nextcloud..." --weight=3 @@ -323,18 +335,6 @@ then # MOUNT HOME FOLDERS AS EXTERNAL STORAGE #================================================= - # Define a function to add an external storage - # Create the external storage for the given folders and enable sharing - create_external_storage() { - local datadir="$1" - local mount_name="$2" - local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true` - ! [[ $mount_id =~ ^[0-9]+$ ]] \ - && ynh_print_warn --message="Unable to create external storage" \ - || exec_occ files_external:option "$mount_id" enable_sharing true - } - # Enable External Storage and create local mount to home folder as needed if [ $user_home -eq 1 ]; then exec_occ app:enable files_external From b9d8e09fee2538e76b93e86b2829dcd51c7df867 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 10 Aug 2019 19:28:43 +0200 Subject: [PATCH 3/5] Change also datadir's scope --- scripts/upgrade | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f6bdc01..2e3f7ec 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -193,6 +193,8 @@ local mount_id=`exec_occ files_external:create --output=json \ && ynh_print_warn --message="Unable to create external storage" \ || exec_occ files_external:option "$mount_id" enable_sharing true } +# Define app's data directory +datadir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -202,9 +204,6 @@ then source upgrade.d/upgrade.last.sh last_version=$next_version - # Define app's data directory - datadir="/home/yunohost.app/$app/data" - # Set write access for the following commands chown -R $app: "$final_path" "$datadir" From a870ce02377788333914baea21face817ac25a06 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 11 Aug 2019 14:11:28 +0200 Subject: [PATCH 4/5] Avoid OPcache errors (fixes #209) --- conf/php-fpm.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index f13ed6d..31d62f2 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -433,7 +433,10 @@ env[PATH] = $PATH php_value[upload_max_filesize] = 10G php_value[post_max_size] = 10G php_value[default_charset] = UTF-8 -php_value[opcache.enable]=1 +; OPcache is already activated by default +; php_value[opcache.enable]=1 +; The following parameters are nevertheless recommended for Nextcloud +; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache php_value[opcache.enable_cli]=1 php_value[opcache.interned_strings_buffer]=8 php_value[opcache.max_accelerated_files]=10000 From 4318322f6304161f7ba212e9160d6348f66875dd Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 17 Aug 2019 09:06:49 +0200 Subject: [PATCH 5/5] Upgrade to upstream version 15.0.11 --- README.md | 2 +- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5d39562..86e1b19 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 own data. A personal cloud which run on your own server. With Nextcloud you can synchronize your files over your devices. -**Shipped version:** 15.0.10 +**Shipped version:** 15.0.11 ## Screenshots diff --git a/manifest.json b/manifest.json index 8230b77..a774500 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms", "fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions" }, - "version": "15.0.10~ynh1", + "version": "15.0.11~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 6df5d10..2c20cb6 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,10 +1,10 @@ #!/bin/bash # Last available nextcloud version -next_version="15.0.10" +next_version="15.0.11" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="494511fcda6e823e8dfb571fcf3b9ddc433148449acb080104f4165d2f2f4d43" +nextcloud_source_sha256="59cdde8e7a4a15606efc246e37adf6401b0b4a60f33289be8725d675b9c2ae26" # This function will only be executed upon applying the last upgrade referenced above last_upgrade_operations () {