From 4481f3935b9d7db0fec408125d4bfbbaef1ef439 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 4 Jun 2023 11:40:07 +0200 Subject: [PATCH 01/14] new hook post_user_delete --- hooks/post_user_delete | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 hooks/post_user_delete diff --git a/hooks/post_user_delete b/hooks/post_user_delete new file mode 100644 index 0000000..d23beb4 --- /dev/null +++ b/hooks/post_user_delete @@ -0,0 +1,16 @@ +#!/bin/bash + +source /usr/share/yunohost/helpers + +user="$1" +app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id" +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + +# Define a function to execute commands with `occ` +exec_occ() { + (cd "$final_path" && ynh_exec_as "$app" \ + php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") +} + +exec_occ user:delete $user From 7cb57770bb8cd81f737bfab927adafcb72601a3c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 Nov 2023 14:58:40 +0000 Subject: [PATCH 02/14] Auto-update README --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ee58c0..e9d6643 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Nextcloud Hub is a fully open-source on-premises content collaboration platform. ### YunoHost-specific features -In addition to Nextcloud core features, the following are made available with -this package: +In addition to Nextcloud core features, the following are made available with this package: * Integrate with YunoHost users and SSO - i.e. logout button * Allow one user to be the administrator (set at the installation) From b51676a26cbeda9698e4805467ad10eb7bff890f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:00:55 +0100 Subject: [PATCH 03/14] Update post_user_delete --- hooks/post_user_delete | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/post_user_delete b/hooks/post_user_delete index d23beb4..d824c12 100644 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -4,12 +4,12 @@ source /usr/share/yunohost/helpers user="$1" app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # Define a function to execute commands with `occ` exec_occ() { - (cd "$final_path" && ynh_exec_as "$app" \ + (cd "$install_dir" && ynh_exec_as "$app" \ php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } From 85e07053410d27efb65f6cd73f8b953203687185 Mon Sep 17 00:00:00 2001 From: Thatoo Date: Tue, 14 Nov 2023 11:40:35 +0100 Subject: [PATCH 04/14] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 36de478..e1d9016 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -150,7 +150,7 @@ location ^~ __PATH__/ { } location ~ / { - if ($request_method ~ ^(PUT|DELETE|PATCH)$) { + if ($request_method ~ ^(PUT|DELETE|PATCH|PROPFIND|PROPPATCH)$) { rewrite ^ __PATH__/index.php$request_uri last; } try_files $uri / __PATH__/index.php$request_uri; From d386d90ff0848b7e76160de400c78b5c31b43c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:08:55 +0100 Subject: [PATCH 05/14] cleaning --- manifest.toml | 3 +++ scripts/install | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index fccf19c..2e4569f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,8 +22,11 @@ cpe = "cpe:2.3:a:nextcloud:nextcloud" yunohost = ">= 11.2" architectures = ["amd64", "arm64", "armhf"] multi_instance = true + ldap = true + sso = true + disk = "50M" ram.build = "500M" ram.runtime = "512M" diff --git a/scripts/install b/scripts/install index 7b11cfb..2f16071 100755 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,7 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=50 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=5 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint From 7ff89a252512c36c0272af85dd476860a49915d0 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 11:28:03 +0100 Subject: [PATCH 06/14] [fix] Upgrade dependencies with v2 format --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5ba8ef7..99cb233 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,11 +104,12 @@ current_major_version=${current_version%%.*} # Define a function to execute commands with `occ` exec_occ() { + local pkg_dependencies = "" # Backward compatibility to upgrade from older versions if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ] then NEXTCLOUD_PHP_VERSION=$phpversion - elif [ $current_major_version -ge 25 ] + elif [ $current_major_version -ge 24 ] then NEXTCLOUD_PHP_VERSION="8.1" elif [ $current_major_version -ge 18 ] @@ -117,6 +118,11 @@ exec_occ() { else NEXTCLOUD_PHP_VERSION="7.1" fi + if ! 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} + ynh_install_app_dependencies $pkg_dependencies + if (cd "$install_dir" && ynh_exec_as "$app" \ php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } From 8c6eded2ad541c9f8581a8c566b28abd313766e4 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 11:29:54 +0100 Subject: [PATCH 07/14] [fix] minor: remove unused line --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 99cb233..b63130e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,6 @@ current_major_version=${current_version%%.*} # Define a function to execute commands with `occ` exec_occ() { - local pkg_dependencies = "" # Backward compatibility to upgrade from older versions if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ] then From ef627f820a35ee468906c7eaa1ae2b93a06995c6 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 11:33:05 +0100 Subject: [PATCH 08/14] [fix] fi fi fi o_O --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b63130e..3945139 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,7 +121,7 @@ exec_occ() { local pkg_dependencies = ${dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps} pkg_dependencies=${pkg_dependencies/$phpversion/$NEXTCLOUD_PHP_VERSION} ynh_install_app_dependencies $pkg_dependencies - if + fi (cd "$install_dir" && ynh_exec_as "$app" \ php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } From 09480c4e9d71ff923cb55962e3ddf859222b09b4 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 14:52:42 +0100 Subject: [PATCH 09/14] [fix] fi fi fi o_O --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3945139..e3f2ee7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,7 +117,7 @@ exec_occ() { else NEXTCLOUD_PHP_VERSION="7.1" fi - if ! php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then + 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} ynh_install_app_dependencies $pkg_dependencies From 655e232754ed3e979000952af873e6921acf4c94 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 15:42:05 +0100 Subject: [PATCH 10/14] [fix] not a valid identifier --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e3f2ee7..412a2b1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,7 +118,7 @@ exec_occ() { NEXTCLOUD_PHP_VERSION="7.1" fi if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; 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/$phpversion/$NEXTCLOUD_PHP_VERSION} ynh_install_app_dependencies $pkg_dependencies fi From 83215038ea0323074ca62e3e962c05fbfc7d7ed6 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 23 Nov 2023 22:26:15 +0100 Subject: [PATCH 11/14] [fix] not a valid identifier --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 412a2b1..2144d7c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,8 +119,8 @@ 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} - ynh_install_app_dependencies $pkg_dependencies + pkg_dependencies="${pkg_dependencies/$phpversion/$NEXTCLOUD_PHP_VERSION}" + ynh_install_app_dependencies "$pkg_dependencies" fi (cd "$install_dir" && ynh_exec_as "$app" \ php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") From 216ea9dd04e6a3bcb374a51b322f19d8077b233e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:31:00 +0100 Subject: [PATCH 12/14] 27.1.4 --- 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 2e4569f..a8200f6 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.3~ynh1" +version = "27.1.4~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 4a851d5..b31e5b5 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.3" +next_version="27.1.4" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="1d614935245e4a375b4ac991c02f323592b753972f86f88763fd80ed7d275793" +nextcloud_source_sha256="bec65f2166b82c9303baf476c1e424f71aa196dad010ffe4c0c39d03990d594c" From 92a914e28638d5e325123bc27510901b9a6366bd Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 24 Nov 2023 08:02:27 +0100 Subject: [PATCH 13/14] [fix] not a valid identifier --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2144d7c..b1404b7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,7 +118,7 @@ exec_occ() { NEXTCLOUD_PHP_VERSION="7.1" fi if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; 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/$phpversion/$NEXTCLOUD_PHP_VERSION}" ynh_install_app_dependencies "$pkg_dependencies" fi From 63429112a4d6ed453028cf0ca4b9b089f5115c46 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 24 Nov 2023 07:02:31 +0000 Subject: [PATCH 14/14] 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 e9d6643..abbfd57 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.3~ynh1 +**Shipped version:** 27.1.4~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index c400f05..f4fdfaa 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.3~ynh1 +**Version incluse :** 27.1.4~ynh1 **Démo :** https://demo.nextcloud.com/