From 4629333cd571522d1afc60cf083e42b9b2c5bf8a Mon Sep 17 00:00:00 2001 From: Tobias Ollive Date: Fri, 14 May 2021 13:28:38 +0200 Subject: [PATCH 01/36] add support for custom data directory --- scripts/_common.sh | 10 ++++++++++ scripts/backup | 4 +++- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index adf5f21a..2647a5d2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,16 @@ pkg_dependencies="imagemagick 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}-smbclient 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" + +set_datadir() { + if [[ -f $final_path/config/config.php ]]; then + datadir=$(grep datadirectory < $final_path/config/config.php | sed "s/.*=>.'\([^']*\)'.*/\1/") + else + datadir="/home/yunohost.app/$app/data" + fi +} + + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 7ed3c7fe..69831b74 100755 --- a/scripts/backup +++ b/scripts/backup @@ -84,7 +84,9 @@ 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 +set_datadir + +ynh_backup --src_path="$datadir" --is_big #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 44f8384f..b303aa9d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -121,7 +121,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Restoring data directory..." --weight=2 -datadir="/home/yunohost.app/$app/data" +set_datadir # 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 diff --git a/scripts/upgrade b/scripts/upgrade index 5805432e..e946a0df 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -202,8 +202,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" +# Define app's data directory (defined in _common.sh) +set_datadir if [ "$upgrade_type" == "UPGRADE_APP" ] then From 921b83c56de79176a5fdc6a8d3fe8a399503f0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 16 Jul 2022 22:57:58 +0200 Subject: [PATCH 02/36] set datadir --- scripts/backup | 2 ++ scripts/restore | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/backup b/scripts/backup index 41274203..ebf77613 100755 --- a/scripts/backup +++ b/scripts/backup @@ -85,6 +85,8 @@ ynh_backup --src_path="/etc/cron.d/$app" #================================================= ynh_print_info --message="Backing up data directory..." +set_datadir + ynh_backup --src_path="$datadir" --is_big #================================================= diff --git a/scripts/restore b/scripts/restore index 425e5809..1775ff2a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -120,6 +120,8 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Restoring data directory..." --weight=2 +set_datadir + # 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 225f1bb1b358b41f3c5365ee09471b6e59ca054e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:07:17 +0100 Subject: [PATCH 03/36] move function to common.sh (#764) * move function to common.sh * Update config --- scripts/_common.sh | 6 ++++++ scripts/change_url | 6 ------ scripts/config | 6 ------ scripts/install | 6 ------ scripts/restore | 5 ----- 5 files changed, 6 insertions(+), 23 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 33c1736a..19c0decc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,12 @@ # COMMON VARIABLES AND CUSTOM HELPERS #================================================= +# Define a function to execute commands with `occ` +exec_occ() { + (cd "$install_dir" && ynh_exec_as_app \ + php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") +} + wait_nginx_reload() { # NGINX may take some time to support the new configuration, # wait for the Nextcloud configuration file to disappear from NGINX before checking the CalDAV/CardDAV URL. diff --git a/scripts/change_url b/scripts/change_url index 509b92dc..449c14b4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,12 +28,6 @@ ynh_config_change_url_nginx #================================================= ynh_script_progression "Applying $app specific modifications..." -# Define a function to execute commands with `occ` -exec_occ() { - (cd "$install_dir" && ynh_exec_as_app \ - php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - if [ $change_domain -eq 1 ] then # Change the trusted domain diff --git a/scripts/config b/scripts/config index fc45c353..a2939758 100644 --- a/scripts/config +++ b/scripts/config @@ -8,12 +8,6 @@ source /usr/share/yunohost/helpers #================================================= php_version=$(ynh_app_setting_get --key=php_version) -current_fpm_footprint=$(ynh_app_setting_get --key=fpm_footprint) - -exec_occ() { - (cd "$install_dir" && ynh_exec_as_app \ - php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} #================================================= # SPECIFIC GETTERS FOR TOML SHORT KEY diff --git a/scripts/install b/scripts/install index cd270cc0..69d7ddce 100755 --- a/scripts/install +++ b/scripts/install @@ -72,12 +72,6 @@ ynh_config_add_nginx #================================================= ynh_script_progression "Installing $app..." -# Define a function to execute commands with `occ` -exec_occ() { - (cd "$install_dir" && ynh_exec_as_app \ - php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - # Set write access for the following commands chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" diff --git a/scripts/restore b/scripts/restore index 9be6e2b8..1ed03c8e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -146,11 +146,6 @@ ynh_systemctl --service=nginx --action=reload # CHECK IF NOTIFY_PUSH WORKS #================================================= -exec_occ() { - (cd "$install_dir" && ynh_exec_as_app \ - php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - if [ $enable_notify_push -eq 1 ] then count=0 From 773ada7b68f66e4cfa2f33a93cbcbd20ee303876 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:11:25 +0100 Subject: [PATCH 04/36] add default_phone_region --- conf/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/config.json b/conf/config.json index bb800325..0063ee9a 100644 --- a/conf/config.json +++ b/conf/config.json @@ -14,6 +14,7 @@ "hashing_default_password": true, "localstorage.allowsymlinks": true, "simpleSignUpLink.shown": false, + "default_phone_region": "", "maintenance_window_start": 1, "mail_smtpmode": "smtp", "mail_smtpport": "25", From 3fb2bb691e88369560ea6fe8321eada5bdd7449e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:14:24 +0100 Subject: [PATCH 05/36] Update nginx.conf --- conf/nginx.conf | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0b6c2fd1..f521457e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,7 @@ -# Add .mjs as a file extension for javascript +# Set .mjs MIME types # Either include it in the default mime.types list # or include you can include that list explicitly and add the file extension +# and include that list explicitly or add the file extension # only for Nextcloud like below: include mime.types; types { @@ -54,8 +55,15 @@ location ^~ __PATH__/ { # for tunning hints client_body_buffer_size 512k; - # HTTP response headers borrowed from Nextcloud `.htaccess` + # HSTS settings + # WARNING: Only add the preload option once you read about + # the consequences in https://hstspreload.org/. This option + # will add the domain to a hardcoded list that is shipped + # in all major browsers and getting removed from this list + # could take several months. #more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; + + # HTTP response headers borrowed from Nextcloud `.htaccess` more_set_headers "Referrer-Policy: no-referrer"; more_set_headers "X-Content-Type-Options: nosniff"; more_set_headers "X-Download-Options: noopen"; From 25341f9ff558099f742262c939a13888a0c22d86 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:17:32 +0100 Subject: [PATCH 06/36] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 69d7ddce..fc4d6455 100755 --- a/scripts/install +++ b/scripts/install @@ -247,10 +247,12 @@ ynh_script_progression "Adding multimedia directories..." # Build YunoHost multimedia directories ynh_multimedia_build_main_dir + # Mount the user directory in Nextcloud exec_occ app:enable files_external create_external_storage "/home/yunohost.multimedia/\$user" "Multimedia" create_external_storage "/home/yunohost.multimedia/share" "Shared multimedia" + # Allow nextcloud to write into these directories ynh_multimedia_addaccess $app From 85c31870a735ffe6521cd7f622317954156c696b Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 20 Dec 2024 03:40:35 +0100 Subject: [PATCH 07/36] Fix upgrade exploding when $app is nextcloud__2, __3 etc because the virtual apt/dpkg package is named with - and not _ (#767) * Update upgrade replace correct file for nextcloud--x-ynh-deps * Update upgrade correct syntax for the helpers --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 12fe5a7b..8a20d119 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ exec_occ() { # will do magic regarding php configuration and $php_version when the php version of the dependencies changes ... php_version=$(ynh_app_setting_get --key=php_version) if [[ "$NEXTCLOUD_PHP_VERSION" != "$php_version" ]]; then - local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)" + local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app//_/-}-ynh-deps)" pkg_dependencies="${pkg_dependencies//$php_version/$NEXTCLOUD_PHP_VERSION}" # Packaging v1 ~legacy : ynh_apt_install_dependencies is designed to be called several times # but the second time it will *append* the list of dependencies rather than replace the existing dependencies From 5e4f393d374f66dc4f45378045f8eb53f08f59dd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 20 Dec 2024 03:41:53 +0100 Subject: [PATCH 08/36] Bump package revision --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6f32edfd..3b7ac246 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 = "30.0.4~ynh1" +version = "30.0.4~ynh2" maintainers = ["kay0u"] From a8378a548f6464e4b1893787c61921de2ba00b60 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 20 Dec 2024 03:41:58 +0100 Subject: [PATCH 09/36] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_pl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f9e03051..dc0c22dc 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Shipped version:** 30.0.4~ynh1 +**Shipped version:** 30.0.4~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index 19fc4b46..f104760c 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión actual:** 30.0.4~ynh1 +**Versión actual:** 30.0.4~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index a97367ef..120dd6b7 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Paketatutako bertsioa:** 30.0.4~ynh1 +**Paketatutako bertsioa:** 30.0.4~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 276d38be..38500704 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ L'adresse `/.well-known` sera automatiquement configuré pour la synchronisatio Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. -**Version incluse :** 30.0.4~ynh1 +**Version incluse :** 30.0.4~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 50121dc0..d930a5ec 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión proporcionada:** 30.0.4~ynh1 +**Versión proporcionada:** 30.0.4~ynh2 **Demo:** diff --git a/README_id.md b/README_id.md index 5cf9feaa..3d6cc343 100644 --- a/README_id.md +++ b/README_id.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versi terkirim:** 30.0.4~ynh1 +**Versi terkirim:** 30.0.4~ynh2 **Demo:** diff --git a/README_nl.md b/README_nl.md index 00322ce2..df6b6c37 100644 --- a/README_nl.md +++ b/README_nl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Geleverde versie:** 30.0.4~ynh1 +**Geleverde versie:** 30.0.4~ynh2 **Demo:** diff --git a/README_pl.md b/README_pl.md index 792231a2..2465b2b1 100644 --- a/README_pl.md +++ b/README_pl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Dostarczona wersja:** 30.0.4~ynh1 +**Dostarczona wersja:** 30.0.4~ynh2 **Demo:** diff --git a/README_ru.md b/README_ru.md index 6e60ecff..525a7f1e 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Поставляемая версия:** 30.0.4~ynh1 +**Поставляемая версия:** 30.0.4~ynh2 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 23f0f3a9..888ce826 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**分发版本:** 30.0.4~ynh1 +**分发版本:** 30.0.4~ynh2 **演示:** From be58bb1ea1798680a0f803285396526f0387714c Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:32:09 +0100 Subject: [PATCH 10/36] Patch (#768) * remove inused patch with YNH 12 * reorder patch --- ...val-in-JS-scripts-for-YunoHost-tile.patch} | 0 ...able-CSPv3-nonce_and_allow-YNH-fonts.patch | 29 ------------------- 2 files changed, 29 deletions(-) rename patches/main/{02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch => 01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch} (100%) delete mode 100644 patches/main/01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch diff --git a/patches/main/02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch b/patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch similarity index 100% rename from patches/main/02-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch rename to patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch diff --git a/patches/main/01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch b/patches/main/01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch deleted file mode 100644 index 1cbbd31a..00000000 --- a/patches/main/01-disable-CSPv3-nonce_and_allow-YNH-fonts.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php -index 993f74ae0e4..c85aadc49db 100644 ---- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php -+++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php -@@ -47,6 +47,10 @@ class ContentSecurityPolicyNonceManager { - * Check if the browser supports CSP v3 - */ - public function browserSupportsCspV3(): bool { -+ // YunoHost patch: disable CSPv3 nonces to: -+ // - avoid white page on first login from YunoHost portal -+ // - allow YunoHost tile display -+ return false; - $browserBlocklist = [ - Request::USER_AGENT_IE, - ]; -diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php -index b8bbfdb7d67..a51a15ca0e6 100644 ---- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php -+++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php -@@ -493,7 +493,8 @@ class EmptyContentSecurityPolicy { - - if (!empty($this->allowedFontDomains)) { - $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains); -- $policy .= ';'; -+ // YunoHost patch: extend font-src to load data fonts embedded in YunoHost tile script -+ $policy .= ' data:;'; - } - - if (!empty($this->allowedConnectDomains)) { From e938aeb25a13166c17fc715593baf13e2f1717a9 Mon Sep 17 00:00:00 2001 From: loowiz Date: Thu, 26 Dec 2024 03:36:44 +0000 Subject: [PATCH 11/36] Fix fail2ban failregex --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fc4d6455..51dd414f 100755 --- a/scripts/install +++ b/scripts/install @@ -285,7 +285,7 @@ ynh_config_add_logrotate ynh_script_progression "Configuring Fail2Ban..." # Create a dedicated Fail2Ban config -ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" +ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: .* \(Remote IP: .*$" #================================================= # CHECK IF NOTIFY_PUSH WORKS diff --git a/scripts/upgrade b/scripts/upgrade index 8a20d119..a4251998 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -425,7 +425,7 @@ ynh_config_add_logrotate #================================================= # Create a dedicated Fail2Ban config -ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" +ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: .* \(Remote IP: .*$" #================================================= # CHECK IF NOTIFY_PUSH WORKS From 1a1d9d1b468adc5524ba480cc9f4e3520e1e1e53 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:47:39 +0100 Subject: [PATCH 12/36] 30.0.5 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3b7ac246..64602115 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 = "30.0.4~ynh2" +version = "30.0.5~ynh1" maintainers = ["kay0u"] @@ -59,8 +59,8 @@ ram.runtime = "512M" [resources.sources] [resources.sources.main] - url = 'https://download.nextcloud.com/server/releases/nextcloud-30.0.4.tar.bz2' - sha256 = 'eb6aaba9acef442f2b3e4a996b7ee8a5ed24442f9bba681237fb28ed970e1fa5' + url = 'https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2' + sha256 = '248c6e6e612ceeeb170c4d25b8579b0af0e6613abdfa07f2fe6993426b781bea' [resources.sources.29] url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2' From 863381ce9fb7fa109467ed37df69f26489d2a62c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 Jan 2025 09:47:43 +0100 Subject: [PATCH 13/36] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_pl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index dc0c22dc..1bfe3e70 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Shipped version:** 30.0.4~ynh2 +**Shipped version:** 30.0.5~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index f104760c..ace78493 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión actual:** 30.0.4~ynh2 +**Versión actual:** 30.0.5~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 120dd6b7..3ce0e0ab 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Paketatutako bertsioa:** 30.0.4~ynh2 +**Paketatutako bertsioa:** 30.0.5~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 38500704..9c601c1d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ L'adresse `/.well-known` sera automatiquement configuré pour la synchronisatio Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. -**Version incluse :** 30.0.4~ynh2 +**Version incluse :** 30.0.5~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index d930a5ec..45ca9c68 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión proporcionada:** 30.0.4~ynh2 +**Versión proporcionada:** 30.0.5~ynh1 **Demo:** diff --git a/README_id.md b/README_id.md index 3d6cc343..dd14aea2 100644 --- a/README_id.md +++ b/README_id.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versi terkirim:** 30.0.4~ynh2 +**Versi terkirim:** 30.0.5~ynh1 **Demo:** diff --git a/README_nl.md b/README_nl.md index df6b6c37..c8e5b034 100644 --- a/README_nl.md +++ b/README_nl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Geleverde versie:** 30.0.4~ynh2 +**Geleverde versie:** 30.0.5~ynh1 **Demo:** diff --git a/README_pl.md b/README_pl.md index 2465b2b1..0a131134 100644 --- a/README_pl.md +++ b/README_pl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Dostarczona wersja:** 30.0.4~ynh2 +**Dostarczona wersja:** 30.0.5~ynh1 **Demo:** diff --git a/README_ru.md b/README_ru.md index 525a7f1e..f503fe6f 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Поставляемая версия:** 30.0.4~ynh2 +**Поставляемая версия:** 30.0.5~ynh1 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 888ce826..f46ba2f1 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**分发版本:** 30.0.4~ynh2 +**分发版本:** 30.0.5~ynh1 **演示:** From ced3d917a2cba8f958c56af25d119e26ed3e349c Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:52:05 +0100 Subject: [PATCH 14/36] Update restore --- scripts/restore | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index 1ed03c8e..82f94948 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,6 +10,13 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression "Restoring data directory..." + +ynh_restore "$data_dir" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -64,13 +71,6 @@ ynh_script_progression "Restoring the logrotate configuration..." ynh_restore "/etc/logrotate.d/$app" -#================================================= -# RESTORE THE DATA DIRECTORY -#================================================= -ynh_script_progression "Restoring data directory..." - -ynh_restore "$data_dir" - #================================================= # RESTORE USER RIGHTS #================================================= From dc0fb3debaed4d684013a5872405045734d20dce Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Jan 2025 14:30:19 +0100 Subject: [PATCH 15/36] Update upgrade (#777) --- scripts/upgrade | 308 ++++++++++++++++++++++++------------------------ 1 file changed, 153 insertions(+), 155 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8a20d119..855b8601 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,187 +137,185 @@ then fi fi -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading $app..." +#================================================= +# UPGRADE NEXTCLOUD +#================================================= +ynh_script_progression "Upgrading $app..." - # Set write access for the following commands - chown -R $app:www-data "$install_dir" - # Print the current version number of Nextcloud - exec_occ -V +# Set write access for the following commands +chown -R $app:www-data "$install_dir" +# Print the current version number of Nextcloud +exec_occ -V + +if [ "$(exec_occ config:system:get mysql.utf8mb4)" != "true" ]; then + db_pwd=$(ynh_app_setting_get --key=db_pwd) + # Change your databases character set and collation + ynh_mysql_db_shell <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" + # Set the mysql.utf8mb4 config to true in config.php + exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true" + exec_occ maintenance:repair +fi - if [ "$(exec_occ config:system:get mysql.utf8mb4)" != "true" ]; then - db_pwd=$(ynh_app_setting_get --key=db_pwd) - # Change your databases character set and collation - ynh_mysql_db_shell <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" - # Set the mysql.utf8mb4 config to true in config.php - exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true" - exec_occ maintenance:repair - fi +# Upgrade may fail if this app is enabled +# Take all apps enabled, and check if mail is one of them +# Then temporary disable the mail app +mail_app_must_be_reactived=0 + +if exec_occ app:list | awk '/Enabled/{f=1;next} /Disabled/{f=0} f' | grep -q -w mail; then + exec_occ app:disable mail + mail_app_must_be_reactived=1 +fi - # Upgrade may fail if this app is enabled - # Take all apps enabled, and check if mail is one of them - # Then temporary disable the mail app - mail_app_must_be_reactived=0 +# While the current version is not the last version, do an upgrade +while [ "$last_version" != "$current_version" ] +do - if exec_occ app:list | awk '/Enabled/{f=1;next} /Disabled/{f=0} f' | grep -q -w mail; then - exec_occ app:disable mail - mail_app_must_be_reactived=1 + next_major_version="$(( $current_major_version + 1 ))" + if [[ "$next_major_version" -ge "$last_major_version" ]]; then + ynh_print_info "Upgrading to Nextcloud $last_version" + source_id="main" + else + ynh_print_info "Upgrading to Nextcloud $next_major_version" + source_id="$next_major_version" fi - # While the current version is not the last version, do an upgrade - while [ "$last_version" != "$current_version" ] - do + # Create a temporary directory + tmpdir="${install_dir}__tmp_upgrade" + + ynh_setup_source --dest_dir="$tmpdir" --source_id="$source_id" - next_major_version="$(( $current_major_version + 1 ))" - if [[ "$next_major_version" -ge "$last_major_version" ]]; then - ynh_print_info "Upgrading to Nextcloud $last_version" - source_id="main" - else - ynh_print_info "Upgrading to Nextcloud $next_major_version" - source_id="$next_major_version" - fi - - # Create a temporary directory - tmpdir="${install_dir}__tmp_upgrade" - - ynh_setup_source --dest_dir="$tmpdir" --source_id="$source_id" - - # Backup the config file in the temp dir - cp -a "$install_dir/config/config.php" "$tmpdir/config/config.php" - - # Enable maintenance mode - exec_occ maintenance:mode --on - - # Backup 3rd party applications from the current Nextcloud - # But do not overwrite if there is any upgrade - # (apps directory already exists in Nextcloud archive) - ( - cd $install_dir/apps - for nc_app_dir in */ - do - if [ ! -d "$tmpdir/apps/$nc_app_dir" ] - then - cp -a "$nc_app_dir" "$tmpdir/apps/$nc_app_dir" - fi - done - ) - - # Replace the old Nextcloud by the new one - ynh_safe_rm "$install_dir" - mv "$tmpdir" "$install_dir" - - # Set write access for the following commands - chown -R $app:www-data "$install_dir" - # Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3) - exec_occ maintenance:mode --off - exec_occ upgrade || [ $? -eq 3 ] || ynh_die "Unable to upgrade $app" - - # Get the new current version number - current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) - current_major_version=${current_version%%.*} - - # Print the current version number of Nextcloud - exec_occ -V + # Backup the config file in the temp dir + cp -a "$install_dir/config/config.php" "$tmpdir/config/config.php" + + # Enable maintenance mode + exec_occ maintenance:mode --on + + # Backup 3rd party applications from the current Nextcloud + # But do not overwrite if there is any upgrade + # (apps directory already exists in Nextcloud archive) + ( + cd $install_dir/apps + for nc_app_dir in */ + do + if [ ! -d "$tmpdir/apps/$nc_app_dir" ] + then + cp -a "$nc_app_dir" "$tmpdir/apps/$nc_app_dir" + fi done + ) - exec_occ db:add-missing-indices -n - exec_occ db:add-missing-columns -n - exec_occ db:add-missing-primary-keys -n - exec_occ db:convert-filecache-bigint -n + # Replace the old Nextcloud by the new one + ynh_safe_rm "$install_dir" + mv "$tmpdir" "$install_dir" - #================================================= - # CONFIGURE NEXTCLOUD - #================================================= - ynh_script_progression "Reconfiguring $app..." + # Set write access for the following commands + chown -R $app:www-data "$install_dir" + # Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3) + exec_occ maintenance:mode --off + exec_occ upgrade || [ $? -eq 3 ] || ynh_die "Unable to upgrade $app" - # Verify the checksum and backup the file if it's different - ynh_backup_if_checksum_is_different "$install_dir/config/config.php" + # Get the new current version number + current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) + current_major_version=${current_version%%.*} + # Print the current version number of Nextcloud + exec_occ -V +done - nc_conf="${install_dir}/config.json" - ynh_config_add --template="config.json" --destination="$nc_conf" +exec_occ db:add-missing-indices -n +exec_occ db:add-missing-columns -n +exec_occ db:add-missing-primary-keys -n +exec_occ db:convert-filecache-bigint -n - # Reneable the mail app - if [ $mail_app_must_be_reactived -eq 1 ]; then - exec_occ app:enable mail - fi +#================================================= +# CONFIGURE NEXTCLOUD +#================================================= +ynh_script_progression "Reconfiguring $app..." - # Ensure that UpdateNotification app is disabled - exec_occ app:disable updatenotification +# Verify the checksum and backup the file if it's different +ynh_backup_if_checksum_is_different "$install_dir/config/config.php" - # Enable LDAP plugin - exec_occ app:enable user_ldap +nc_conf="${install_dir}/config.json" +ynh_config_add --template="config.json" --destination="$nc_conf" - # Update all installed apps - exec_occ app:update --all +# Reneable the mail app +if [ $mail_app_must_be_reactived -eq 1 ]; then + exec_occ app:enable mail +fi - # move the logs from the data_dir to the standard /var/log - # it would be better in the ENSURE DOWNWARD COMPATIBILITY section - # but it must be after the exec_occ() definition, so it's here - if [ -f "$data_dir/data/nextcloud.log" ]; then - mkdir -p "/var/log/$app" - chmod 750 "/var/log/$app" - mv "$data_dir"/data/nextcloud.log* "/var/log/$app" - # adapt the nextcloud config - exec_occ config:system:set logfile --value="/var/log/$app/nextcloud.log" - fi +# Ensure that UpdateNotification app is disabled +exec_occ app:disable updatenotification - # Load the config file in nextcloud - exec_occ config:import "$nc_conf" +# Enable LDAP plugin +exec_occ app:enable user_ldap - # Then remove the config file - ynh_safe_rm "$nc_conf" +# Update all installed apps +exec_occ app:update --all - #================================================= - # ALLOW USERS TO DISCONNECT FROM NEXTCLOUD - #================================================= +# move the logs from the data_dir to the standard /var/log +# it would be better in the ENSURE DOWNWARD COMPATIBILITY section +# but it must be after the exec_occ() definition, so it's here +if [ -f "$data_dir/data/nextcloud.log" ]; then + mkdir -p "/var/log/$app" + chmod 750 "/var/log/$app" + mv "$data_dir"/data/nextcloud.log* "/var/log/$app" + # adapt the nextcloud config + exec_occ config:system:set logfile --value="/var/log/$app/nextcloud.log" +fi - # Add dynamic logout URL to the config - url_base64="$(echo -n "https://$domain$path" | base64)" - old_logout_url="https://$(cat /etc/yunohost/current_host)/yunohost/sso/?action=logout" - current_logout_url="$(exec_occ config:system:get logout_url 2> /dev/null)" - if [[ "$current_logout_url" == "${old_logout_url}" ]] || [[ "$current_logout_url" == "" ]] - then - echo " - //-YunoHost- - // set logout_url according to main domain - \$main_domain = file_get_contents('/etc/yunohost/current_host'); - \$CONFIG['logout_url'] = 'https://'.\$main_domain.'/yunohost/sso/?action=logout&r=${url_base64}'; - //-YunoHost- - " >> "$install_dir/config/config.php" - fi +# Load the config file in nextcloud +exec_occ config:import "$nc_conf" - #================================================= - # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS - #================================================= - - exec_occ config:system:set overwrite.cli.url --value="https://${domain}${path}" - - #================================================= - # MOUNT HOME FOLDERS AS EXTERNAL STORAGE - #================================================= - - # Enable External Storage and create local mount to home folder as needed - if [ $user_home -eq 1 ]; then - exec_occ app:enable files_external - exec_occ files_external:list --output=json \ - | grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \ - || create_external_storage "/home/\$user" "Home" - # Iterate over users to extend their home folder permissions - for u in $(ynh_user_list); do - setfacl --modify g:$app:rwx "/home/$u" || true - done - fi +# Then remove the config file +ynh_safe_rm "$nc_conf" + +#================================================= +# ALLOW USERS TO DISCONNECT FROM NEXTCLOUD +#================================================= + +# Add dynamic logout URL to the config +url_base64="$(echo -n "https://$domain$path" | base64)" +old_logout_url="https://$(cat /etc/yunohost/current_host)/yunohost/sso/?action=logout" +current_logout_url="$(exec_occ config:system:get logout_url 2> /dev/null)" +if [[ "$current_logout_url" == "${old_logout_url}" ]] || [[ "$current_logout_url" == "" ]] +then + echo " +//-YunoHost- +// set logout_url according to main domain +\$main_domain = file_get_contents('/etc/yunohost/current_host'); +\$CONFIG['logout_url'] = 'https://'.\$main_domain.'/yunohost/sso/?action=logout&r=${url_base64}'; +//-YunoHost- + " >> "$install_dir/config/config.php" +fi + +#================================================= +# CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS +#================================================= + +exec_occ config:system:set overwrite.cli.url --value="https://${domain}${path}" - #================================================= - # STORE THE CHECKSUM OF THE CONFIG FILE - #================================================= +#================================================= +# MOUNT HOME FOLDERS AS EXTERNAL STORAGE +#================================================= - # Calculate and store the config file checksum into the app settings - ynh_store_file_checksum "${install_dir}/config/config.php" +# Enable External Storage and create local mount to home folder as needed +if [ $user_home -eq 1 ]; then + exec_occ app:enable files_external + exec_occ files_external:list --output=json \ + | grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \ + || create_external_storage "/home/\$user" "Home" + # Iterate over users to extend their home folder permissions + for u in $(ynh_user_list); do + setfacl --modify g:$app:rwx "/home/$u" || true + done fi +#================================================= +# STORE THE CHECKSUM OF THE CONFIG FILE +#================================================= + +# Calculate and store the config file checksum into the app settings +ynh_store_file_checksum "${install_dir}/config/config.php" + #================================================= # REGEN PERMISSIONS #================================================= From c6489b629415cd5d3ac9638d2e9bfc546cf6c43d Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Jan 2025 14:32:58 +0100 Subject: [PATCH 16/36] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 855b8601..0b8bbd11 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -217,6 +217,7 @@ do # Get the new current version number current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) current_major_version=${current_version%%.*} + # Print the current version number of Nextcloud exec_occ -V done From 57b41db5c3b26b3202ef944f5d51ea2618acf3d9 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Jan 2025 14:33:31 +0100 Subject: [PATCH 17/36] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 64602115..46fae87f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 12.0.9" +yunohost = ">= 12.0.10" helpers_version = "2.1" architectures = ["amd64", "arm64", "armhf"] multi_instance = true From 8947bb8b22f4956121504430acdf6aad36afd5c8 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Jan 2025 09:19:48 +0100 Subject: [PATCH 18/36] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 46fae87f..64602115 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 12.0.10" +yunohost = ">= 12.0.9" helpers_version = "2.1" architectures = ["amd64", "arm64", "armhf"] multi_instance = true From 4c23d650cfb58d51e39929346d168807dd0d994d Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 Jan 2025 12:22:34 +0100 Subject: [PATCH 19/36] Update post_user_delete (#778) --- hooks/post_user_delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post_user_delete b/hooks/post_user_delete index 7d49d24b..83908ca5 100644 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -9,7 +9,7 @@ php_version=$(ynh_app_setting_get --app=$app --key=php_version) # Define a function to execute commands with `occ` exec_occ() { - (cd "$install_dir" && ynh_exec_as_app \ + (cd "$install_dir" && sudo -u $app \ php${php_version} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } From 7f1b13d772b897435c7c1a5cc7a8ce97c78594f9 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 30 Jan 2025 20:24:27 +0100 Subject: [PATCH 20/36] Update upgrade (#779) --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 0b8bbd11..d9faaae7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -269,6 +269,11 @@ exec_occ config:import "$nc_conf" # Then remove the config file ynh_safe_rm "$nc_conf" +# Occasionally new mimetypes are added to better handle certain file types. +# Migrating the mimetypes take a long time on larger instances +# so this is not done automatically during upgrades. +exec_occ maintenance:repair --include-expensive + #================================================= # ALLOW USERS TO DISCONNECT FROM NEXTCLOUD #================================================= From 8fa00f93db0f5b301749cf1194d94327c5f6db86 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 6 Feb 2025 00:14:24 +0100 Subject: [PATCH 21/36] [fix] Remove eval JS patch cause yunohost tiles doesn't exists anymore --- ...r-eval-in-JS-scripts-for-YunoHost-tile.patch | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch diff --git a/patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch b/patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch deleted file mode 100644 index abe9ad45..00000000 --- a/patches/main/01-Allow-for-eval-in-JS-scripts-for-YunoHost-tile.patch +++ /dev/null @@ -1,17 +0,0 @@ - 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 ---- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php -+++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php -@@ -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 */ From b9d53ed027398676277b3d7373ebddb39a8af22e Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:07:12 +0100 Subject: [PATCH 22/36] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 64602115..f69f3351 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 = "30.0.5~ynh1" +version = "30.0.5~ynh2" maintainers = ["kay0u"] From 11eb850b90fda26106a0585e5ff50205b9271a0f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 9 Feb 2025 10:07:16 +0100 Subject: [PATCH 23/36] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_pl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1bfe3e70..d526eceb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Shipped version:** 30.0.5~ynh1 +**Shipped version:** 30.0.5~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index ace78493..9aad9309 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión actual:** 30.0.5~ynh1 +**Versión actual:** 30.0.5~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index 3ce0e0ab..fb061c7e 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Paketatutako bertsioa:** 30.0.5~ynh1 +**Paketatutako bertsioa:** 30.0.5~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 9c601c1d..b5d5bc9c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ L'adresse `/.well-known` sera automatiquement configuré pour la synchronisatio Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. -**Version incluse :** 30.0.5~ynh1 +**Version incluse :** 30.0.5~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 45ca9c68..e2f0ba1f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión proporcionada:** 30.0.5~ynh1 +**Versión proporcionada:** 30.0.5~ynh2 **Demo:** diff --git a/README_id.md b/README_id.md index dd14aea2..e35ecdbd 100644 --- a/README_id.md +++ b/README_id.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versi terkirim:** 30.0.5~ynh1 +**Versi terkirim:** 30.0.5~ynh2 **Demo:** diff --git a/README_nl.md b/README_nl.md index c8e5b034..31cd3d20 100644 --- a/README_nl.md +++ b/README_nl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Geleverde versie:** 30.0.5~ynh1 +**Geleverde versie:** 30.0.5~ynh2 **Demo:** diff --git a/README_pl.md b/README_pl.md index 0a131134..3f2ad5f8 100644 --- a/README_pl.md +++ b/README_pl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Dostarczona wersja:** 30.0.5~ynh1 +**Dostarczona wersja:** 30.0.5~ynh2 **Demo:** diff --git a/README_ru.md b/README_ru.md index f503fe6f..00d6152e 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Поставляемая версия:** 30.0.5~ynh1 +**Поставляемая версия:** 30.0.5~ynh2 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index f46ba2f1..0b6f2b81 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**分发版本:** 30.0.5~ynh1 +**分发版本:** 30.0.5~ynh2 **演示:** From 577da1f05a2e6b62cc18a99f6843a6a45ac92398 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:12:10 +0100 Subject: [PATCH 24/36] cleaning --- scripts/restore | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/scripts/restore b/scripts/restore index 82f94948..c1499b34 100755 --- a/scripts/restore +++ b/scripts/restore @@ -25,20 +25,14 @@ ynh_script_progression "Restoring the MySQL database..." ynh_mysql_db_shell < ./db.sql #================================================= -# RESTORE THE PHP-FPM CONFIGURATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression "Reconfiguring PHP-FPM..." +ynh_script_progression "Restoring system configurations related to $app..." -# Restore the file first, so it can have a backup if different ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" -# Recreate a dedicated PHP-FPM config ynh_config_add_phpfpm -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore "/etc/nginx/conf.d/$domain.d/$app.d" @@ -52,23 +46,13 @@ then fi #================================================= -# RESTORE THE CRON FILE +# RESTORE VARIOUS FILES #================================================= -ynh_script_progression "Restoring cron job..." ynh_restore "/etc/cron.d/$app" -#================================================= -# RESTORE LOGS -#================================================= - ynh_restore "/var/log/$app" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression "Restoring the logrotate configuration..." - ynh_restore "/etc/logrotate.d/$app" #================================================= From 529c3686a156eceaa64b7a7d48263298d463d59d Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:14:16 +0100 Subject: [PATCH 25/36] cleaning --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index fc4d6455..8a4a4ac7 100755 --- a/scripts/install +++ b/scripts/install @@ -276,7 +276,6 @@ chmod 750 $install_dir #================================================= ynh_script_progression "Configuring log rotation..." -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate #================================================= @@ -284,7 +283,6 @@ ynh_config_add_logrotate #================================================= ynh_script_progression "Configuring Fail2Ban..." -# Create a dedicated Fail2Ban config ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" #================================================= From a4c2c066d3a15d35b60439818b9a54928ade1c41 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Feb 2025 10:35:11 +0100 Subject: [PATCH 26/36] Update remove --- scripts/remove | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/remove b/scripts/remove index c506c10c..ea4e0f9b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,15 +8,15 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." +ynh_config_remove_fail2ban + +ynh_config_remove_logrotate + ynh_config_remove_nginx ynh_safe_rm "/etc/nginx/conf.d/$domain.d/$app.d" ynh_config_remove_phpfpm -ynh_config_remove_logrotate - -ynh_config_remove_fail2ban - # Remove notify push if [ $enable_notify_push -eq 1 ]; then ynh_config_remove_systemd"${app}-notify-push" From 83bb5a6cc21e5275f47785637490284f529a108b Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Tue, 11 Feb 2025 14:48:16 +0100 Subject: [PATCH 27/36] [enh] Allow login by mail (#783) --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 0063ee9a..e108e51e 100644 --- a/conf/config.json +++ b/conf/config.json @@ -50,7 +50,7 @@ "ldap_groupfilter_objectclass": "posixGroup", "ldap_group_member_assoc_attribute": "memberUid", "ldap_host": "localhost", - "ldap_login_filter": "(&(|(objectclass=posixAccount))(uid=%uid)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))", + "ldap_login_filter": "(&(|(objectclass=posixAccount))(|(uid=%uid)(mail=%uid))(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))", "ldap_login_filter_mode": "0", "ldap_port": "389", "ldap_quota_attr": "userquota", From 0d856a8c0395cb6287f976c47453b548af169384 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 13 Feb 2025 21:03:20 +0100 Subject: [PATCH 28/36] 30.0.6 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f69f3351..c994cbdc 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 = "30.0.5~ynh2" +version = "30.0.6~ynh1" maintainers = ["kay0u"] @@ -59,8 +59,8 @@ ram.runtime = "512M" [resources.sources] [resources.sources.main] - url = 'https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2' - sha256 = '248c6e6e612ceeeb170c4d25b8579b0af0e6613abdfa07f2fe6993426b781bea' + url = 'https://download.nextcloud.com/server/releases/nextcloud-30.0.6.tar.bz2' + sha256 = 'ac0e091be6920965dc0c82f149b632d6b5ade7adee84a7b3c8cfd847450a8ddc' [resources.sources.29] url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2' From 5e7de8c8df361f918523d976b61b583f843678f0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 13 Feb 2025 21:03:24 +0100 Subject: [PATCH 29/36] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_pl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d526eceb..3eec8fec 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Shipped version:** 30.0.5~ynh2 +**Shipped version:** 30.0.6~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 9aad9309..8286278b 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión actual:** 30.0.5~ynh2 +**Versión actual:** 30.0.6~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index fb061c7e..7688fe31 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Paketatutako bertsioa:** 30.0.5~ynh2 +**Paketatutako bertsioa:** 30.0.6~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index b5d5bc9c..a4850403 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ L'adresse `/.well-known` sera automatiquement configuré pour la synchronisatio Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. -**Version incluse :** 30.0.5~ynh2 +**Version incluse :** 30.0.6~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index e2f0ba1f..e66c995f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión proporcionada:** 30.0.5~ynh2 +**Versión proporcionada:** 30.0.6~ynh1 **Demo:** diff --git a/README_id.md b/README_id.md index e35ecdbd..051c1230 100644 --- a/README_id.md +++ b/README_id.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versi terkirim:** 30.0.5~ynh2 +**Versi terkirim:** 30.0.6~ynh1 **Demo:** diff --git a/README_nl.md b/README_nl.md index 31cd3d20..41995790 100644 --- a/README_nl.md +++ b/README_nl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Geleverde versie:** 30.0.5~ynh2 +**Geleverde versie:** 30.0.6~ynh1 **Demo:** diff --git a/README_pl.md b/README_pl.md index 3f2ad5f8..e14d8ff4 100644 --- a/README_pl.md +++ b/README_pl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Dostarczona wersja:** 30.0.5~ynh2 +**Dostarczona wersja:** 30.0.6~ynh1 **Demo:** diff --git a/README_ru.md b/README_ru.md index 00d6152e..ca769b70 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Поставляемая версия:** 30.0.5~ynh2 +**Поставляемая версия:** 30.0.6~ynh1 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 0b6f2b81..361abf38 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**分发版本:** 30.0.5~ynh2 +**分发版本:** 30.0.6~ynh1 **演示:** From a902183db56fa392c8b29025bdf74021ace6c3b4 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 15 Feb 2025 13:44:13 +0100 Subject: [PATCH 30/36] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index c994cbdc..716fd55f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,8 +63,8 @@ ram.runtime = "512M" sha256 = 'ac0e091be6920965dc0c82f149b632d6b5ade7adee84a7b3c8cfd847450a8ddc' [resources.sources.29] - url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.10.tar.bz2' - sha256 = 'a5863d9f13af177f27d883317f96c3d176e7b1ca70b0ddd7958494582b494577' + url = 'https://download.nextcloud.com/server/releases/nextcloud-29.0.12.tar.bz2' + sha256 = 'c020354ff3e1d2087370f70e058fe171713636ba0f073a5194adbdff3c1cafc6' prefetch = false [resources.sources.28] From 631ac0c62432b587b8d85d2276cc22048d26a2a3 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Feb 2025 09:49:38 +0100 Subject: [PATCH 31/36] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 716fd55f..2f228443 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 = "30.0.6~ynh1" +version = "30.0.6~ynh2" maintainers = ["kay0u"] From 5d711270e86d7bc220d259dec5fdfc36ade993d7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 16 Feb 2025 09:49:44 +0100 Subject: [PATCH 32/36] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 2 +- README_nl.md | 2 +- README_pl.md | 2 +- README_ru.md | 2 +- README_zh_Hans.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3eec8fec..6ee7e5fb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Shipped version:** 30.0.6~ynh1 +**Shipped version:** 30.0.6~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index 8286278b..ede697a7 100644 --- a/README_es.md +++ b/README_es.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión actual:** 30.0.6~ynh1 +**Versión actual:** 30.0.6~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index 7688fe31..1e8b8692 100644 --- a/README_eu.md +++ b/README_eu.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Paketatutako bertsioa:** 30.0.6~ynh1 +**Paketatutako bertsioa:** 30.0.6~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index a4850403..10b3fc93 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ L'adresse `/.well-known` sera automatiquement configuré pour la synchronisatio Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. -**Version incluse :** 30.0.6~ynh1 +**Version incluse :** 30.0.6~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index e66c995f..2aa8e477 100644 --- a/README_gl.md +++ b/README_gl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versión proporcionada:** 30.0.6~ynh1 +**Versión proporcionada:** 30.0.6~ynh2 **Demo:** diff --git a/README_id.md b/README_id.md index 051c1230..5c43ec19 100644 --- a/README_id.md +++ b/README_id.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Versi terkirim:** 30.0.6~ynh1 +**Versi terkirim:** 30.0.6~ynh2 **Demo:** diff --git a/README_nl.md b/README_nl.md index 41995790..3448a610 100644 --- a/README_nl.md +++ b/README_nl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Geleverde versie:** 30.0.6~ynh1 +**Geleverde versie:** 30.0.6~ynh2 **Demo:** diff --git a/README_pl.md b/README_pl.md index e14d8ff4..4dacb323 100644 --- a/README_pl.md +++ b/README_pl.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Dostarczona wersja:** 30.0.6~ynh1 +**Dostarczona wersja:** 30.0.6~ynh2 **Demo:** diff --git a/README_ru.md b/README_ru.md index ca769b70..1927610d 100644 --- a/README_ru.md +++ b/README_ru.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**Поставляемая версия:** 30.0.6~ynh1 +**Поставляемая версия:** 30.0.6~ynh2 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 361abf38..86c17fa6 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -26,7 +26,7 @@ The `/.well-known` address will be automatically configured for CalDAV and CardD The YunoHost catalog has two collaborative office suites, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) and [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), which can be integrated with Nextcloud. -**分发版本:** 30.0.6~ynh1 +**分发版本:** 30.0.6~ynh2 **演示:** From 11e30da87e2b9bb2c34ac6e4eb6ee335e4491ef1 Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 18 Feb 2025 06:56:25 +0100 Subject: [PATCH 33/36] [enh] Create custom fail2ban conf, with datepattern and more regex to catch (#785) --- conf/f2b_filter.conf | 8 ++++++++ conf/f2b_jail.conf | 6 ++++++ scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 conf/f2b_filter.conf create mode 100644 conf/f2b_jail.conf diff --git a/conf/f2b_filter.conf b/conf/f2b_filter.conf new file mode 100644 index 00000000..b212bb40 --- /dev/null +++ b/conf/f2b_filter.conf @@ -0,0 +1,8 @@ +[INCLUDES] +before = common.conf +[Definition] +_groupsre = (?:(?:,?\s*"\w+":(?:"[^"]+"|\w+))*) +failregex = ^\{%(_groupsre)s,?\s*"remoteAddr":""%(_groupsre)s,?\s*"message":"Login failed: + ^\{%(_groupsre)s,?\s*"remoteAddr":""%(_groupsre)s,?\s*"message":"Two-factor challenge failed: + ^\{%(_groupsre)s,?\s*"remoteAddr":""%(_groupsre)s,?\s*"message":"Trusted domain error. +datepattern = ,?\s*"time"\s*:\s*"%%Y-%%m-%%d[T ]%%H:%%M:%%S(%%z)?" diff --git a/conf/f2b_jail.conf b/conf/f2b_jail.conf new file mode 100644 index 00000000..4c63fc59 --- /dev/null +++ b/conf/f2b_jail.conf @@ -0,0 +1,6 @@ +[__APP__] +enabled = true +port = http,https +filter = __APP__ +logpath = /var/log/__APP__/nextcloud.log +maxretry = 5 diff --git a/scripts/install b/scripts/install index 361dc6bb..4207c31a 100755 --- a/scripts/install +++ b/scripts/install @@ -284,7 +284,7 @@ ynh_config_add_logrotate ynh_script_progression "Configuring Fail2Ban..." # Create a dedicated Fail2Ban config -ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: .* \(Remote IP: .*$" +ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" #================================================= # CHECK IF NOTIFY_PUSH WORKS diff --git a/scripts/upgrade b/scripts/upgrade index 0ef66a91..5035a69b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -429,7 +429,7 @@ ynh_config_add_logrotate #================================================= # Create a dedicated Fail2Ban config -ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: .* \(Remote IP: .*$" +ynh_config_add_fail2ban --logpath="/var/log/$app/nextcloud.log" #================================================= # CHECK IF NOTIFY_PUSH WORKS From 9049d4738a86e4b09d8476cb5e8f3cde3595804d Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 22 Feb 2025 19:06:21 +0100 Subject: [PATCH 34/36] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index a1f18b54..d7452e35 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description = Push daemon for Nextcloud clients +Description=Push daemon for Nextcloud clients [Service] Type=notify From 913ea56d78593051c158deb4f7c564767eb7adfc Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 22 Feb 2025 19:08:10 +0100 Subject: [PATCH 35/36] Update DESCRIPTION_fr.md --- doc/DESCRIPTION_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 4300e3f4..a19201ad 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -2,6 +2,6 @@ Nextcloud permet de rendre accessible et de synchroniser ses données, fichiers, Dans le cadre de YunoHost, Nextcloud s'intègre avec le SSO/portail utilisateur (les comptes YunoHost sont automatiquements connectés à Nextcloud). -L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà. +L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà. Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud. From 7d70d5658984fadb9d922382b277ac67106dda48 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Feb 2025 19:08:14 +0100 Subject: [PATCH 36/36] Auto-update READMEs --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 10b3fc93..bab75c10 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Nextcloud permet de rendre accessible et de synchroniser ses données, fichiers, Dans le cadre de YunoHost, Nextcloud s'intègre avec le SSO/portail utilisateur (les comptes YunoHost sont automatiquements connectés à Nextcloud). -L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà. +L'adresse `/.well-known` sera automatiquement configuré pour la synchronisation CalDAV et CardDAV si aucun autre service tel que Baïkal ne l'utilise déjà. Le catalogue YunoHost dispose de deux suites bureautiques collaboratives, [OnlyOffice](https://github.com/YunoHost-Apps/onlyoffice_ynh) et [Collabora](https://github.com/YunoHost-Apps/collabora_ynh), qui peuvent être intégrées à Nextcloud.