From cc42580859b331c64f11661ea630b952cbb03986 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 14 Sep 2021 13:57:19 +0200 Subject: [PATCH 01/15] Update upgrade --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8968143..daf03ee 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,6 +77,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From 5ba4fc11c798cb8d72845d3b9fe103dea08604d6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Nov 2021 13:37:57 +0100 Subject: [PATCH 02/15] 22.2.1 --- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 828abd9..5e8167b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "22.2.0~ynh1", + "version": "22.2.1~ynh1", "url": "https://nextcloud.com", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 089cab2..80d47fd 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="22.2.0" +next_version="22.2.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="273dba3ce43501b897e8b78996b50329e31da2b5402866ac20b318cdaddf3e1f" +nextcloud_source_sha256="6dc8d7f66e74110e4669eeb97d092c86dbb61079cc6d231bca90602c7b8a50ee" From 892ce81b86752daec627ecf2ae1f0715e2959caa Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 11 Nov 2021 12:38:04 +0000 Subject: [PATCH 03/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c95115f..0e30aa0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Online storage, file sharing platform and various other applications -**Shipped version:** 22.2.0~ynh1 +**Shipped version:** 22.2.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 54224bd..2bc9d28 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Stockage en ligne, plateforme de partage de fichiers et diverses autres applications -**Version incluse :** 22.2.0~ynh1 +**Version incluse :** 22.2.1~ynh1 **Démo :** https://demo.nextcloud.com/ From 094a50fe9a2779399bb659c7254053f1fb5d56c9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 11:39:25 +0100 Subject: [PATCH 04/15] Update upgrade.last.sh --- scripts/upgrade.d/upgrade.last.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 80d47fd..ed42c88 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -4,4 +4,4 @@ next_version="22.2.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="6dc8d7f66e74110e4669eeb97d092c86dbb61079cc6d231bca90602c7b8a50ee" +nextcloud_source_sha256="d01b50b7bb225181a21151a451899dd208df71cab890884255a39347d7ebbf2b" From 6508cc7d4f7661dd40585e60b89721537656c510 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Nov 2021 19:43:59 +0100 Subject: [PATCH 05/15] 22.2.2 --- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 5e8167b..f4a33a5 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "22.2.1~ynh1", + "version": "22.2.2~ynh1", "url": "https://nextcloud.com", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index ed42c88..c26aeae 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="22.2.1" +next_version="22.2.2" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="d01b50b7bb225181a21151a451899dd208df71cab890884255a39347d7ebbf2b" +nextcloud_source_sha256="943be7dbd375f4b866dcfd9821533ff39bebfd4d3ba91f8cf13905fc3fc64df0" From 8c748e14dc8cdc3b67732c3e74942cd281da4ec1 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 12 Nov 2021 18:44:05 +0000 Subject: [PATCH 06/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e30aa0..c5828c2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Online storage, file sharing platform and various other applications -**Shipped version:** 22.2.1~ynh1 +**Shipped version:** 22.2.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 2bc9d28..d384a90 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Stockage en ligne, plateforme de partage de fichiers et diverses autres applications -**Version incluse :** 22.2.1~ynh1 +**Version incluse :** 22.2.2~ynh1 **Démo :** https://demo.nextcloud.com/ From 94a633c81af6e7c98582f9bb860a1784867d2cda Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Nov 2021 15:55:55 +0100 Subject: [PATCH 07/15] extra_php_dependencies --- manifest.json | 2 +- scripts/_common.sh | 4 +--- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index f4a33a5..40e16bf 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "pierre@kayou.io" }, "requirements": { - "yunohost": ">= 4.2.8.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index a028c31..84a585a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,10 +3,8 @@ # COMMON VARIABLES #================================================= -pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at" - YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath" +pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/install b/scripts/install index 8306846..f32d139 100755 --- a/scripts/install +++ b/scripts/install @@ -104,7 +104,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=50 # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION # Used by ynh_add_nginx_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) diff --git a/scripts/restore b/scripts/restore index a3067d4..cbb84a0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -100,7 +100,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion #================================================= # RESTORE THE CRON FILE diff --git a/scripts/upgrade b/scripts/upgrade index 8dfdcea..0fe9107 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -151,7 +151,7 @@ then fi # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies" +ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint # Delete existing ini configuration file (backward compatibility) if [ -f /etc/php/$phpversion/fpm/conf.d/20-$app.ini ]; then From 383f2a004526c3760cd5622f80773e3ab9d9c9e9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Nov 2021 16:01:21 +0100 Subject: [PATCH 08/15] Add --purge option --- manifest.json | 2 +- scripts/backup | 3 ++- scripts/install | 3 +++ scripts/remove | 12 ++++++++++++ scripts/restore | 3 +-- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index f4a33a5..40e16bf 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "pierre@kayou.io" }, "requirements": { - "yunohost": ">= 4.2.8.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 1a1944a..4127420 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,6 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -84,7 +85,7 @@ ynh_backup --src_path="/etc/cron.d/$app" #================================================= ynh_print_info --message="Backing up data directory..." -ynh_backup --src_path="/home/yunohost.app/${app}/data" --is_big +ynh_backup --src_path="$datadir" --is_big #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 8306846..f39eb2e 100755 --- a/scripts/install +++ b/scripts/install @@ -130,9 +130,12 @@ ynh_add_nginx_config #================================================= # CREATE THE DATA DIRECTORY #================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 # Define app's data directory datadir="/home/yunohost.app/$app/data" +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + # Create app folders mkdir -p "$datadir" diff --git a/scripts/remove b/scripts/remove index b84d5bf..024ed93 100755 --- a/scripts/remove +++ b/scripts/remove @@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # STANDARD REMOVE @@ -46,6 +47,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$datadir" +fi + #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index a3067d4..16ca3c4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -28,6 +28,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) @@ -119,8 +120,6 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Restoring data directory..." --weight=2 -datadir="/home/yunohost.app/$app/data" - # Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. ynh_restore_file --origin_path="$datadir" --not_mandatory From 28f82d059ded0bcc4350506050ffa1bfd4447e89 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 09:03:59 +0100 Subject: [PATCH 09/15] set datadir --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8dfdcea..1a223d6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If datadir doesn't exist, create it +if [ -z "$datadir" ]; then + datadir=/home/yunohost.app/$app + ynh_app_setting_set --app=$app --key=datadir --value=$datadir +fi + # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only From c7aed56de70bae5482438629a89d53ed721e1ded Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 09:05:43 +0100 Subject: [PATCH 10/15] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 40e16bf..f4a33a5 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "pierre@kayou.io" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 4.2.8.3" }, "multi_instance": true, "services": [ From 144455835313590570a7f1c71b9de2fa02078439 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 09:30:25 +0100 Subject: [PATCH 11/15] 22.2.3 --- manifest.json | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index f4a33a5..40a41d8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online storage, file sharing platform and various other applications", "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" }, - "version": "22.2.2~ynh1", + "version": "22.2.3~ynh1", "url": "https://nextcloud.com", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index c26aeae..b210a00 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,7 +1,7 @@ #!/bin/bash # Last available Nextcloud version -next_version="22.2.2" +next_version="22.2.3" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="943be7dbd375f4b866dcfd9821533ff39bebfd4d3ba91f8cf13905fc3fc64df0" +nextcloud_source_sha256="66a29a6a490738c0abedb677cb68c7c91fabab3e6419a3c99d8b406899eb942a" From a9de4b9986d1576837a07a6fa8b4c7289487309a Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 16 Nov 2021 08:30:31 +0000 Subject: [PATCH 12/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5828c2..193b7e9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Online storage, file sharing platform and various other applications -**Shipped version:** 22.2.2~ynh1 +**Shipped version:** 22.2.3~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index d384a90..d4fa816 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Stockage en ligne, plateforme de partage de fichiers et diverses autres applications -**Version incluse :** 22.2.2~ynh1 +**Version incluse :** 22.2.3~ynh1 **Démo :** https://demo.nextcloud.com/ From be17c1b75baba58c83145c9bf82df112d1d72426 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 22:38:39 +0100 Subject: [PATCH 13/15] Update nginx.conf --- conf/nginx.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7970b97..af84758 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -21,11 +21,6 @@ location ^~ __PATH__/ { # Path to source alias __FINALPATH__/; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Add headers to serve security related headers more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; more_set_headers "Referrer-Policy: no-referrer"; From 13c7323f2d2331aed3a627d9a121c5d587b9b4b1 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 17 Nov 2021 08:09:24 +0000 Subject: [PATCH 14/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5828c2..193b7e9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Online storage, file sharing platform and various other applications -**Shipped version:** 22.2.2~ynh1 +**Shipped version:** 22.2.3~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index d384a90..d4fa816 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Stockage en ligne, plateforme de partage de fichiers et diverses autres applications -**Version incluse :** 22.2.2~ynh1 +**Version incluse :** 22.2.3~ynh1 **Démo :** https://demo.nextcloud.com/ From aebd1e9da74af978ef3bdaeb738d3582cdcda195 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 11:39:31 +0100 Subject: [PATCH 15/15] Update config.json --- conf/config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 70efa3f..9e1c8f0 100644 --- a/conf/config.json +++ b/conf/config.json @@ -12,7 +12,8 @@ "password": "" }, "hashing_default_password": true, - "localstorage.allowsymlinks": true + "localstorage.allowsymlinks": true, + "simpleSignUpLink.shown": false }, "apps": { "user_ldap": {