From f0100c7fcbe712b757c0dac135ce6f928b19bca5 Mon Sep 17 00:00:00 2001 From: narF Date: Thu, 30 Nov 2023 14:26:21 -0500 Subject: [PATCH 01/26] Update ADMIN.md --- doc/ADMIN.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index ef43357..0f1d6a1 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -6,16 +6,14 @@ or use `sudo yunohost app shell __APP__` then run `php occ ...` ### Configure ONLYOFFICE integration -#### With Nextcloud App (no ARM support, lower performance) +#### With YunoHost App (ARM64 support, better performance) + +For better performance and ARM64 support (Raspberry Pi, OLinuXino...), install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server) + +#### Alternative: With Nextcloud App (no ARM support, lower performance) Nextcloud features a direct integration of ONLYOFFICE (an online rich text document editor) through a Nextcloud app. To install and configure it: - Install *Community Document Server* application in your Nextcloud. That's the part that runs ONLYOFFICE server. - Install *ONLYOFFICE* application. That's the client part that will connect to an ONLYOFFICE server. - Then in Settings -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE. - -*NB: ONLYOFFICE Nextcloud App is only available for x86 architecture - for **ARM** architecture (Raspberry Pi, OLinuXino...), consider the YunoHost App below* - -#### With YunoHost App (ARM64 support, better performance) - -For better performance and ARM64 support, install ONLYOFFICE YunoHost App and connect it to Nextcloud, see the tutorial in the [doc of onlyoffice_ynh package](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server) From 3f979a4fa8bc66594b984ce1930d46a07248466f Mon Sep 17 00:00:00 2001 From: narF Date: Thu, 30 Nov 2023 14:27:57 -0500 Subject: [PATCH 02/26] Update ADMIN_fr.md --- doc/ADMIN_fr.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index c617ce3..3a691ba 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -6,7 +6,11 @@ ou utilisez `sudo yunohost app shell __APP__` puis `php occ ...` ### Configurer l'intégration d'ONLYOFFICE -#### Avec l'application Nextcloud (pas de support ARM, performances limitées) +#### Avec l'application YunoHost (support ARM64, meilleures performances) + +Pour de meilleures performances et le support de ARM64 (Raspberry Pi, OLinuXino...), installez l'app YunoHost ONLYOFFICE, voir le tutoriel dans la [doc du paquet onlyoffice_ynh](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server) + +#### Alternative: Avec l'application Nextcloud (pas de support ARM, performances limitées) Nextcloud inclut une intégration directe de ONLYOFFICE (un éditeur de texte enrichi en ligne) via une application Nextcloud. Pour l'installer et la configurer : @@ -14,8 +18,4 @@ Pour l'installer et la configurer : - Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur ONLYOFFICE. - Ensuite dans les Paramètres -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec ONLYOFFICE. -*NB : l'app Nextcloud ONLYOFFICE Community Document Server n'est disponible que sous architecture x86 - Pour un support de l'architecture **ARM** (Raspberry Pi, OLinuXino...), installez plutôt l'App YunoHost, voir ci-dessous* - -#### Avec l'application YunoHost (support ARM64, meilleures performances) - -Pour de meilleures performances et le support de ARM64, installez l'app YunoHost ONLYOFFICE, voir le tutoriel dans la [doc du paquet onlyoffice_ynh](https://github.com/YunoHost-Apps/onlyoffice_ynh/blob/master/README_fr.md#configuration-de-onlyoffice-server) +*NB : l'app Nextcloud ONLYOFFICE Community Document Server n'est disponible que sous architecture x86 From d1fc31add28bdb6ac4490cd0376ac78f4cd8cda8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 2 Dec 2023 08:55:59 +0100 Subject: [PATCH 03/26] Update POST_UPGRADE.md --- doc/POST_UPGRADE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md index 7da1480..b0a56e5 100644 --- a/doc/POST_UPGRADE.md +++ b/doc/POST_UPGRADE.md @@ -1 +1 @@ -Note that if you've installed some third-parties Nextcloud applications, they are probably disabled and you'll have to manually enable them again. \ No newline at end of file +Note that if you've installed any third-party Nextcloud applications, they have probably been disabled. If so, you'll need to manually enable them again. From 5d4f8a37302ea63b12b7848edb0b65d619d07d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:24:03 +0100 Subject: [PATCH 04/26] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 0d8a142..0d8c794 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ then exec_occ config:system:set trusted_domains 1 --value=$new_domain # Change hostname for activity notifications - exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}" + exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}" fi if [ $change_domain -eq 1 ] From 5c7d41f9a5d687e7d261cce647b89ee3a722a27f Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:39:03 +0100 Subject: [PATCH 05/26] [fix] Api permission (#633) --- scripts/change_url | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 0d8c794..6da4c8d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -49,6 +49,14 @@ then fi fi +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." + +# Temporary fix for the API permission +ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" --auth_header="false" --clear_urls + #================================================= # END OF SCRIPT #================================================= From e4a27e8ea48db392e22504ceb72ceddc7127170e Mon Sep 17 00:00:00 2001 From: ljf Date: Sat, 9 Dec 2023 23:57:08 +0100 Subject: [PATCH 06/26] [fix] php8.1 not found on nc25 -> nc27 upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index aac8c8d..186a0bd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ exec_occ() { fi if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)" - pkg_dependencies="${pkg_dependencies/$phpversion/$NEXTCLOUD_PHP_VERSION}" + pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}" ynh_install_app_dependencies "$pkg_dependencies" fi (cd "$install_dir" && ynh_exec_as "$app" \ From a4480d7da6dca319b2b7b958a4f6d47d9a2a0545 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Mon, 11 Dec 2023 01:32:39 +0100 Subject: [PATCH 07/26] [fix] Multimedia and home external storage --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a169962..c1b9599 100755 --- a/scripts/install +++ b/scripts/install @@ -160,10 +160,10 @@ exec_occ ldap:test-config '' \ # 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_dir="$1" local mount_name="$2" local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true` + "$mount_name" 'local' 'null::null' -c "datadir=$mount_dir" || true` ! [[ $mount_id =~ ^[0-9]+$ ]] \ && ynh_print_warn --message="Unable to create external storage" \ || exec_occ files_external:option "$mount_id" enable_sharing true From 1fd9f6d2f84f22c413a2d06b04a7adda8950dd98 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Mon, 11 Dec 2023 01:35:32 +0100 Subject: [PATCH 08/26] [fix] Mount multimedia and home in upgrade script --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 186a0bd..32c7001 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,10 +129,10 @@ exec_occ() { # 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_dir="$1" local mount_name="$2" local mount_id=$(exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || true) + "$mount_name" 'local' 'null::null' -c "datadir=$mount_dir" || true) ! [[ $mount_id =~ ^[0-9]+$ ]] \ && ynh_print_warn --message="Unable to create external storage" \ || exec_occ files_external:option "$mount_id" enable_sharing true From 1a4ff65d4845b1ad26bedd1eead8a041a1d7d8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:57:53 +0100 Subject: [PATCH 09/26] 28.0.0 --- manifest.toml | 2 +- scripts/upgrade.d/upgrade.27.sh | 7 +++++++ scripts/upgrade.d/upgrade.last.sh | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 scripts/upgrade.d/upgrade.27.sh diff --git a/manifest.toml b/manifest.toml index a8200f6..4fb2032 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Nextcloud" description.en = "Online storage, file sharing platform and various other applications" description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" -version = "27.1.4~ynh1" +version = "28.0.0~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.27.sh b/scripts/upgrade.d/upgrade.27.sh new file mode 100644 index 0000000..3716a7f --- /dev/null +++ b/scripts/upgrade.d/upgrade.27.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Last available Nextcloud version +next_version="28.0.0" + +# Nextcloud tarball checksum sha256 +nextcloud_source_sha256="4e8b0b74b40221e85f92ab869d0873c69a52d7e43889d9259c6259428a6a36f2" diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index b31e5b5..3716a7f 100644 --- 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="27.1.4" +next_version="28.0.0" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="bec65f2166b82c9303baf476c1e424f71aa196dad010ffe4c0c39d03990d594c" +nextcloud_source_sha256="4e8b0b74b40221e85f92ab869d0873c69a52d7e43889d9259c6259428a6a36f2" From 086cfe8054198eee72d5fc3e4c7f9189ecc2b084 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 12 Dec 2023 18:57:58 +0000 Subject: [PATCH 10/26] 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 abbfd57..73b3afe 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal -**Shipped version:** 27.1.4~ynh1 +**Shipped version:** 28.0.0~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index f4fdfaa..dc3c8b6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv * Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal -**Version incluse :** 27.1.4~ynh1 +**Version incluse :** 28.0.0~ynh1 **Démo :** https://demo.nextcloud.com/ From 4e49c46ed5983e33132528e595f6195b83441dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:13:44 +0100 Subject: [PATCH 11/26] Update app-00-add-logout_url-conf.patch --- sources/patches_last_version/app-00-add-logout_url-conf.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 919f2d4..2fdeff4 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -2,7 +2,7 @@ diff --git a/core/Controller/LoginController.php b/core/Controller/LoginControll index 13aef8f67a..55d8dbf9d1 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -119,11 +119,12 @@ class LoginController extends Controller { +@@ -97,11 +97,13 @@ class LoginController extends Controller { } $this->userSession->logout(); From 182f3c88be8253539d8229ec963c67d18f69182f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:18:13 +0100 Subject: [PATCH 12/26] Revert "Update app-00-add-logout_url-conf.patch" This reverts commit 4e49c46ed5983e33132528e595f6195b83441dff. --- sources/patches_last_version/app-00-add-logout_url-conf.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 2fdeff4..919f2d4 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -2,7 +2,7 @@ diff --git a/core/Controller/LoginController.php b/core/Controller/LoginControll index 13aef8f67a..55d8dbf9d1 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -97,11 +97,13 @@ class LoginController extends Controller { +@@ -119,11 +119,12 @@ class LoginController extends Controller { } $this->userSession->logout(); From 24fb207ce52bacbaf9d55f3d774f09468ee24dc0 Mon Sep 17 00:00:00 2001 From: Thatoo Date: Sun, 17 Dec 2023 12:48:03 +0100 Subject: [PATCH 13/26] Update nginx.conf To allow to be followed in Social app. However, still can't follow others. --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index d09ac20..1750d6a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,7 @@ location ^~ /.well-known { location = /.well-known/carddav { return 301 __PATH__/remote.php/dav/; } location = /.well-known/caldav { return 301 __PATH__/remote.php/dav/; } - location = /.well-known/webfinger { return 301 __PATH__/index.php$uri; } + location = /.well-known/webfinger { return 301 __PATH__/index.php$request_uri; } location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; } # Let Nextcloud's API for `/.well-known` URIs handle all other From ca4ad9a444a88e524e25d4a02298ed94b3bb123c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Dec 2023 18:37:29 +0100 Subject: [PATCH 14/26] Update app-00-add-logout_url-conf.patch --- .../app-00-add-logout_url-conf.patch | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 919f2d4..31ab09d 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -1,21 +1,23 @@ diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php -index 13aef8f67a..55d8dbf9d1 100644 +index db3e8a64d64..fe63a896c85 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -119,11 +119,12 @@ class LoginController extends Controller { - } - $this->userSession->logout(); - -- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute( -- 'core.login.showLoginForm', -- ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers -+ $redirectUrl = $this->config->getSystemValue('logout_url', -+ $this->urlGenerator->linkToRouteAbsolute( -+ 'core.login.showLoginForm', -+ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) - )); +@@ -97,11 +97,13 @@ class LoginController extends Controller { + } + $this->userSession->logout(); + +- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute( +- 'core.login.showLoginForm', +- ['clear' => true] // this param the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers +- )); - -+ $response = new RedirectResponse($redirectUrl); - $this->session->set('clearingExecutionContexts', '1'); - $this->session->close(); ++ $redirectUrl = $this->config->getSystemValue('logout_url', +++ $this->urlGenerator->linkToRouteAbsolute( +++ 'core.login.showLoginForm', +++ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) ++ )); ++- +++ $response = new RedirectResponse($redirectUrl); + $this->session->set('clearingExecutionContexts', '1'); + $this->session->close(); From 34e482baa9fee34055b460908c3bee83d8e3a5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Dec 2023 19:01:23 +0100 Subject: [PATCH 15/26] Update app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch --- ...eval-in-JS-scripts-for-YunoHost-tile.patch | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch index 43159c3..6ea0754 100644 --- a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch +++ b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch @@ -1,17 +1,15 @@ - lib/public/AppFramework/Http/ContentSecurityPolicy.php | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -index e9ecf00036..8e69c8d2dc 100644 +index 7f93f7004d9..c3fbee8baa7 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -@@ -44,7 +44,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { - /** @var bool Whether inline JS snippets are allowed */ - protected $inlineScriptAllowed = false; - /** @var bool Whether eval in JS scripts is allowed */ -- protected $evalScriptAllowed = false; -+ // YunoHost patch: allow for eval in JS scripts for YunoHost tile -+ protected $evalScriptAllowed = true; - /** @var bool Whether strict-dynamic should be set */ - protected $strictDynamicAllowed = null; - /** @var array Domains from which scripts can get loaded */ +@@ -43,7 +43,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { + /** @var bool Whether inline JS snippets are allowed */ + protected $inlineScriptAllowed = false; + /** @var bool Whether eval in JS scripts is allowed */ +- protected $evalScriptAllowed = false; ++ // YunoHost patch: allow for eval in JS scripts for YunoHost tile ++ protected $evalScriptAllowed = true; + /** @var bool Whether WebAssembly compilation is allowed */ + protected ?bool $evalWasmAllowed = false; + /** @var bool Whether strict-dynamic should be set */ + From 2a14a558d05edb02cf3c945a4e312ac47477acb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Dec 2023 21:06:30 +0100 Subject: [PATCH 16/26] reverting --- scripts/change_url | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 6da4c8d..0d8c794 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -49,14 +49,6 @@ then fi fi -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -# Temporary fix for the API permission -ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" --auth_header="false" --clear_urls - #================================================= # END OF SCRIPT #================================================= From 156dadf5f279fcba4b7ba536211fd6fc32a31c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Dec 2023 21:12:08 +0100 Subject: [PATCH 17/26] Revert "Update app-00-add-logout_url-conf.patch" This reverts commit ca4ad9a444a88e524e25d4a02298ed94b3bb123c. --- .../app-00-add-logout_url-conf.patch | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 31ab09d..919f2d4 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -1,23 +1,21 @@ diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php -index db3e8a64d64..fe63a896c85 100644 +index 13aef8f67a..55d8dbf9d1 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -97,11 +97,13 @@ class LoginController extends Controller { - } - $this->userSession->logout(); - -- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute( -- 'core.login.showLoginForm', -- ['clear' => true] // this param the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers -- )); -- -+ $redirectUrl = $this->config->getSystemValue('logout_url', -++ $this->urlGenerator->linkToRouteAbsolute( -++ 'core.login.showLoginForm', -++ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) -+ )); -+- -++ $response = new RedirectResponse($redirectUrl); - $this->session->set('clearingExecutionContexts', '1'); - $this->session->close(); +@@ -119,11 +119,12 @@ class LoginController extends Controller { + } + $this->userSession->logout(); + +- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute( +- 'core.login.showLoginForm', +- ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers ++ $redirectUrl = $this->config->getSystemValue('logout_url', ++ $this->urlGenerator->linkToRouteAbsolute( ++ 'core.login.showLoginForm', ++ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) + )); +- ++ $response = new RedirectResponse($redirectUrl); + $this->session->set('clearingExecutionContexts', '1'); + $this->session->close(); From ef4e806bccfda9cda1aff945e03f0f5cc9edef99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Dec 2023 21:12:15 +0100 Subject: [PATCH 18/26] Revert "Update app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch" This reverts commit 34e482baa9fee34055b460908c3bee83d8e3a5e3. --- ...eval-in-JS-scripts-for-YunoHost-tile.patch | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch index 6ea0754..43159c3 100644 --- a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch +++ b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch @@ -1,15 +1,17 @@ + lib/public/AppFramework/Http/ContentSecurityPolicy.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -index 7f93f7004d9..c3fbee8baa7 100644 +index e9ecf00036..8e69c8d2dc 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -@@ -43,7 +43,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { - /** @var bool Whether inline JS snippets are allowed */ - protected $inlineScriptAllowed = false; - /** @var bool Whether eval in JS scripts is allowed */ -- protected $evalScriptAllowed = false; -+ // YunoHost patch: allow for eval in JS scripts for YunoHost tile -+ protected $evalScriptAllowed = true; - /** @var bool Whether WebAssembly compilation is allowed */ - protected ?bool $evalWasmAllowed = false; - /** @var bool Whether strict-dynamic should be set */ - +@@ -44,7 +44,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { + /** @var bool Whether inline JS snippets are allowed */ + protected $inlineScriptAllowed = false; + /** @var bool Whether eval in JS scripts is allowed */ +- protected $evalScriptAllowed = false; ++ // YunoHost patch: allow for eval in JS scripts for YunoHost tile ++ protected $evalScriptAllowed = true; + /** @var bool Whether strict-dynamic should be set */ + protected $strictDynamicAllowed = null; + /** @var array Domains from which scripts can get loaded */ From ab33a96bc4e08ce4e8367a8a4e8bbc293fe8d176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Dec 2023 17:15:23 +0100 Subject: [PATCH 19/26] 28.0.1 --- manifest.toml | 2 +- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4fb2032..4d53e38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Nextcloud" description.en = "Online storage, file sharing platform and various other applications" description.fr = "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" -version = "28.0.0~ynh1" +version = "28.0.1~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 3716a7f..067e91b 100644 --- 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="28.0.0" +next_version="28.0.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="4e8b0b74b40221e85f92ab869d0873c69a52d7e43889d9259c6259428a6a36f2" +nextcloud_source_sha256="2f80735b443082272fe6a3b5e32137957f1fc448c75342b94b5200b29725f3a4" From f957b2b4ad432d9296b5124f20ec37e0aaad1a9c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 21 Dec 2023 16:15:29 +0000 Subject: [PATCH 20/26] 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 73b3afe..5b8a14b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ In addition to Nextcloud core features, the following are made available with th * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal -**Shipped version:** 28.0.0~ynh1 +**Shipped version:** 28.0.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index dc3c8b6..8b6334c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv * Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, Baïkal -**Version incluse :** 28.0.0~ynh1 +**Version incluse :** 28.0.1~ynh1 **Démo :** https://demo.nextcloud.com/ From aabf29a29443a10dbb1bf55d9c7741e424471880 Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 21 Dec 2023 17:48:42 +0100 Subject: [PATCH 21/26] the typo was fixed https://github.com/nextcloud/server/blame/master/core/Controller/LoginController.php#L102 --- sources/patches_last_version/app-00-add-logout_url-conf.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 919f2d4..44cce42 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -8,11 +8,11 @@ index 13aef8f67a..55d8dbf9d1 100644 - $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute( - 'core.login.showLoginForm', -- ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers +- ['clear' => true] // this param the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers + $redirectUrl = $this->config->getSystemValue('logout_url', + $this->urlGenerator->linkToRouteAbsolute( + 'core.login.showLoginForm', -+ ['clear' => true] // this param the the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) ++ ['clear' => true] // this param the code in login.js may be removed when the "Clear-Site-Data" is working in the browsers) )); - + $response = new RedirectResponse($redirectUrl); From f1402466ce6af12ea28605c7683ff8e92a578dbe Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 21 Dec 2023 17:56:45 +0100 Subject: [PATCH 22/26] Adapt the nextcloud 28 content https://github.com/nextcloud/server/blob/e231abd9bfac66e69db810c986792f9ba1a9d581/lib/public/AppFramework/Http/ContentSecurityPolicy.php#L42 --- ...-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch index 43159c3..abe9ad4 100644 --- a/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch +++ b/sources/patches_last_version/app-02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch @@ -5,13 +5,13 @@ diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public index e9ecf00036..8e69c8d2dc 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -@@ -44,7 +44,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { +@@ -42,7 +42,8 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy { /** @var bool Whether inline JS snippets are allowed */ protected $inlineScriptAllowed = false; /** @var bool Whether eval in JS scripts is allowed */ - protected $evalScriptAllowed = false; + // YunoHost patch: allow for eval in JS scripts for YunoHost tile + protected $evalScriptAllowed = true; + /** @var bool Whether WebAssembly compilation is allowed */ + protected ?bool $evalWasmAllowed = false; /** @var bool Whether strict-dynamic should be set */ - protected $strictDynamicAllowed = null; - /** @var array Domains from which scripts can get loaded */ From 83ac399638fe44f7a50e9de51d4f8cdb4659333b Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 21 Dec 2023 17:58:02 +0100 Subject: [PATCH 23/26] fix line number ``` 153105 INFO DEBUG - patching file core/Controller/LoginController.php 153105 INFO DEBUG - Hunk #1 succeeded at 97 (offset -22 lines). ``` From https://ci-apps-dev.yunohost.org/ci/job/12038 --- sources/patches_last_version/app-00-add-logout_url-conf.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 44cce42..2c81a65 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -2,7 +2,7 @@ diff --git a/core/Controller/LoginController.php b/core/Controller/LoginControll index 13aef8f67a..55d8dbf9d1 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -119,11 +119,12 @@ class LoginController extends Controller { +@@ -97,11 +97,12 @@ class LoginController extends Controller { } $this->userSession->logout(); From 1729962f9e30235134afa0df7035a2d16f2e8f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:37:25 +0100 Subject: [PATCH 24/26] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 0d8c794..0d8a142 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ then exec_occ config:system:set trusted_domains 1 --value=$new_domain # Change hostname for activity notifications - exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}" + exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}" fi if [ $change_domain -eq 1 ] From 84c71a56e9cbd9e72803ad10b0ed2dfa09aac7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:02:29 +0100 Subject: [PATCH 25/26] Update change_url --- scripts/change_url | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 0d8a142..6da4c8d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ then exec_occ config:system:set trusted_domains 1 --value=$new_domain # Change hostname for activity notifications - exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}" + exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}" fi if [ $change_domain -eq 1 ] @@ -49,6 +49,14 @@ then fi fi +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." + +# Temporary fix for the API permission +ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" --auth_header="false" --clear_urls + #================================================= # END OF SCRIPT #================================================= From 263bc166ff42b6b1c5bce2c9b5827444fc1da908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:05:34 +0100 Subject: [PATCH 26/26] Update tests.toml --- tests.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests.toml b/tests.toml index 85768fa..0e8e459 100644 --- a/tests.toml +++ b/tests.toml @@ -8,4 +8,5 @@ test_format = 1.0 test_upgrade_from.c5cf91ad.name = "Upgrade from 25.0.2" test_upgrade_from.caf917f3.name = "Upgrade from 26.0.2" + test_upgrade_from.9c6d1eea.name = "Upgrade from 27.1.4" \ No newline at end of file