From e877ce9c897aa731ac9c2f757c2cf58b324dda17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Nov 2022 22:56:33 +0100 Subject: [PATCH 001/195] v2 --- conf/config_install.json | 18 +++--- conf/nginx.conf | 2 +- manifest.toml | 69 ++++++++++++++++++++++ scripts/_common.sh | 2 +- scripts/backup | 20 +++---- scripts/install | 104 ++++++++++++++++---------------- scripts/remove | 32 +++++----- scripts/restore | 66 ++++++++++----------- scripts/upgrade | 124 +++++++++++++++++++-------------------- 9 files changed, 253 insertions(+), 184 deletions(-) create mode 100644 manifest.toml diff --git a/conf/config_install.json b/conf/config_install.json index 10db7cf0..21508500 100644 --- a/conf/config_install.json +++ b/conf/config_install.json @@ -1,9 +1,9 @@ -{ - "system": { - "datadirectory": "__DATADIR__", - "trusted_domains": [ - "localhost", - "__DOMAIN__" - ] - } -} +{ + "system": { + "data_directory": "__DATA_DIR__", + "trusted_domains": [ + "localhost", + "__DOMAIN__" + ] + } +} diff --git a/conf/nginx.conf b/conf/nginx.conf index 2678d489..1cca823c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -19,7 +19,7 @@ location ^~ /.well-known { location ^~ __PATH__/ { # Path to source - alias __FINALPATH__/; + alias __INSTALL_DIR__/; # Add headers to serve security related headers more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 00000000..8be653b2 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,69 @@ +packaging_format = 2 + +id = "nextcloud" +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 = "25.0.1~ynh1" + +maintainers = ["kay0u"] + +[upstream] +license = "AGPL-3.0" +website = "https://nextcloud.com" +demo = "https://demo.nextcloud.com/" +admindoc = "https://docs.nextcloud.com/server/stable/admin_manual/" +userdoc = "https://docs.nextcloud.com/server/latest/user_manual/en/" +code = "https://github.com/nextcloud/server" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 11.0.9" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64/armel), for example: ["amd64", "i386"] +multi_instance = true +ldap = "?" # FIXME: replace with true, false, or "not_relevant" +sso = "?" # FIXME: replace with true, false, or "not_relevant" +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "domain" + + [install.path] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "path" + default = "/nextcloud" + + [install.admin] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "user" + + [install.init_main_permission] + help.en = "If enabled, Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." + help.fr = "Si cette case est cochée, Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." + type = "group" + default = "visitors" + + [install.user_home] + ask.en = "Access the users home folder from Nextcloud?" + ask.fr = "Accéder au dossier personnel des utilisateurs depuis Nextcloud ?" + type = "boolean" + default = false + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.data_dir] + + [resources.permissions] + main.url = "/" + + [resources.database] + type = "mysql" diff --git a/scripts/_common.sh b/scripts/_common.sh index ded3f70e..69b46330 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= YNH_PHP_VERSION="8.0" -pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd 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" +#REMOVEME? pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/backup b/scripts/backup index 41274203..24601fac 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,20 +14,20 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -38,7 +38,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION @@ -85,7 +85,7 @@ ynh_backup --src_path="/etc/cron.d/$app" #================================================= ynh_print_info --message="Backing up data directory..." -ynh_backup --src_path="$datadir" --is_big +ynh_backup --src_path="$data_dir" --is_big #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index c61b9e81..e36fcd68 100755 --- a/scripts/install +++ b/scripts/install @@ -14,31 +14,31 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN -user_home=$YNH_APP_ARG_USER_HOME -is_public=$YNH_APP_ARG_IS_PUBLIC +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +#REMOVEME? path=$YNH_APP_ARG_PATH +#REMOVEME? admin=$YNH_APP_ARG_ADMIN +#REMOVEME? user_home=$YNH_APP_ARG_USER_HOME +#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC phpversion=$YNH_PHP_VERSION -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +#REMOVEME? install_dir=/var/www/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path # Check machine architecture (Seens 25.0 Nextcloud doesn't support 32bit machines) if [ $YNH_ARCH == "i386" ]; @@ -49,11 +49,11 @@ fi #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +#REMOVEME? ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path +#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=user_home --value=$user_home maintenance_mode=0 @@ -64,19 +64,19 @@ ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=10 +#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=10 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=2 +#REMOVEME? ynh_script_progression --message="Creating a MySQL database..." --weight=2 -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +#REMOVEME? db_name=$(ynh_sanitize_dbid --db_name=$app) +#REMOVEME? db_user=$db_name +#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -95,19 +95,19 @@ SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true EOF -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Enable YunoHost patches on Nextcloud sources cp -a ../sources/patches_last_version/* ../sources/patches # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir="$install_dir" #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --weight=3 +#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=3 # Create a system user -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION @@ -125,7 +125,7 @@ ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage # Create a dedicated php-fpm config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION # Used by ynh_add_nginx_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION @@ -152,11 +152,11 @@ ynh_add_nginx_config ynh_script_progression --message="Creating a data directory..." --weight=1 # Define app's data directory -datadir="/home/yunohost.app/$app/data" -ynh_app_setting_set --app=$app --key=datadir --value=$datadir +#REMOVEME? data_dir="/home/yunohost.app/$app/data" +#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir # Create app folders -mkdir -p "$datadir" +mkdir -p "$data_dir" #================================================= # INSTALL NEXTCLOUD @@ -165,12 +165,12 @@ ynh_script_progression --message="Installing Nextcloud..." --weight=30 # 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 "$@") } # Set write access for the following commands -chown -R $app: "$final_path" "$datadir" +chown -R $app: "$install_dir" "$data_dir" # Define password in an intermediate var # The fact that it's called _password allows it to be @@ -182,7 +182,7 @@ exec_occ maintenance:install \ --database "mysql" --database-name $db_name \ --database-user $db_user --database-pass "$db_pwd" \ --admin-user "admin" --admin-pass "$admin_password" \ - --data-dir "$datadir" \ + --data-dir "$data_dir" \ || ynh_die --message="Unable to install Nextcloud" #================================================= @@ -198,7 +198,7 @@ exec_occ app:enable user_ldap exec_occ ldap:create-empty-config # Load the installation config file in Nextcloud -nc_conf="$final_path/config_install.json" +nc_conf="$install_dir/config_install.json" ynh_add_config --template="../conf/config_install.json" --destination="$nc_conf" exec_occ config:import "$nc_conf" @@ -207,7 +207,7 @@ exec_occ config:import "$nc_conf" ynh_secure_remove --file="$nc_conf" # Load the additional config file (used also for upgrade) -nc_conf="$final_path/config.json" +nc_conf="$install_dir/config.json" ynh_add_config --template="../conf/config.json" --destination="$nc_conf" exec_occ config:import "$nc_conf" @@ -230,10 +230,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 data_dir="$1" local mount_name="$2" local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true` + "$mount_name" 'local' 'null::null' -c "data_dir=$data_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 @@ -262,7 +262,7 @@ exec_occ config:system:get logout_url >/dev/null 2>&1 \ \$main_domain = exec('cat /etc/yunohost/current_host'); \$CONFIG['logout_url'] = 'https://'.\$main_domain.'/yunohost/sso/?action=logout'; //-YunoHost- -" >> "$final_path/config/config.php" +" >> "$install_dir/config/config.php" #================================================= # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS @@ -285,7 +285,7 @@ exec_occ user:delete admin #================================================= # Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/config/config.php" +ynh_store_file_checksum --file="$install_dir/config/config.php" #================================================= # ADD A CRON JOB @@ -327,15 +327,15 @@ ynh_multimedia_addaccess $app #================================================= # Fix app ownerships & permissions -chown -R $app:www-data "$final_path" -chown -R $app: "$datadir" -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 -chmod 640 "$final_path/config/config.php" +chown -R $app:www-data "$install_dir" +chown -R $app: "$data_dir" +find $install_dir/ -type f -print0 | xargs -0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -0 chmod 0755 +find $data_dir/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app -chmod 750 $final_path +chmod 750 $install_dir #================================================= # SETUP LOGROTATE @@ -343,7 +343,7 @@ chmod 750 $final_path ynh_script_progression --message="Configuring log rotation..." # Use logrotate to manage application logfile(s) -ynh_use_logrotate --logfile="$datadir/nextcloud.log" +ynh_use_logrotate --logfile="$data_dir/nextcloud.log" #================================================= # SETUP FAIL2BAN @@ -356,15 +356,15 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" - #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." +#REMOVEME? ynh_script_progression --message="Configuring permissions..." # Make app public if necessary -if [ $is_public -eq 1 ] +#REMOVEME? if [ $is_public -eq 1 ] then - ynh_permission_update --permission="main" --add="visitors" +#REMOVEME? ynh_permission_update --permission="main" --add="visitors" fi -ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX diff --git a/scripts/remove b/scripts/remove index 36db8795..5c092227 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,41 +12,41 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=2 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) #================================================= # STANDARD REMOVE #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=20 +#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=20 # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#REMOVEME? ynh_remove_app_dependencies #================================================= # REMOVE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Removing the MySQL database..." --weight=5 +#REMOVEME? ynh_script_progression --message="Removing the MySQL database..." --weight=5 # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#REMOVEME? ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=3 +#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=3 # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE DATA DIR @@ -56,7 +56,7 @@ ynh_secure_remove --file="$final_path" if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="$datadir" +#REMOVEME? ynh_secure_remove --file="$data_dir" fi #================================================= @@ -116,10 +116,10 @@ done #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index d0f690d5..a1fda54d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,33 +14,33 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= ynh_script_progression --message="Loading settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +#REMOVEME? fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +#REMOVEME? fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=4 +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=4 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS @@ -49,34 +49,34 @@ test ! -d $final_path \ #================================================= ynh_script_progression --message="Restoring the app main directory..." -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=9 +#REMOVEME? ynh_script_progression --message="Restoring the MySQL database..." --weight=9 -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=10 +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=10 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -124,29 +124,29 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_script_progression --message="Restoring data directory..." --weight=2 # 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 +ynh_restore_file --origin_path="$data_dir" --not_mandatory -mkdir -p "$datadir" +mkdir -p "$data_dir" #================================================= # RESTORE USER RIGHTS #================================================= # Fix app ownerships & permissions -chown -R $app:www-data "$final_path" -chown -R $app: "$datadir" -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 -chmod 640 "$final_path/config/config.php" +chown -R $app:www-data "$install_dir" +chown -R $app: "$data_dir" +find $install_dir/ -type f -print0 | xargs -0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -0 chmod 0755 +find $data_dir/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app -chmod 750 $final_path +chmod 750 $install_dir # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories for u in $(ynh_user_list); do - mkdir -p "$datadir/$u" + mkdir -p "$data_dir/$u" setfacl --modify g:$app:rwx "/home/$u" || true done diff --git a/scripts/upgrade b/scripts/upgrade index cc651422..57213237 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,21 +12,21 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=3 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=3 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -user_home=$(ynh_app_setting_get --app=$app --key=user_home) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? user_home=$(ynh_app_setting_get --app=$app --key=user_home) -maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +#REMOVEME? maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode) +#REMOVEME? fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +#REMOVEME? fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # CHECK VERSION @@ -48,19 +48,19 @@ ynh_script_progression --message="Ensuring downward compatibility..." # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi -# If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - ynh_app_setting_set --app=$app --key=final_path --value=$final_path +# If install_dir doesn't exist, create it +if [ -z "$install_dir" ]; then +#REMOVEME? install_dir=/var/www/$app +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir fi -# If datadir doesn't exist, create it -if [ -z "$datadir" ]; then - datadir=/home/yunohost.app/$app - ynh_app_setting_set --app=$app --key=datadir --value=$datadir +# If data_dir doesn't exist, create it +if [ -z "$data_dir" ]; then + data_dir=/home/yunohost.app/$app +#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir fi # Remove the option backup_core_only if it's in the settings.yml file @@ -91,15 +91,15 @@ if [ -z "$fpm_usage" ]; then fi # Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +#REMOVEME? if ynh_legacy_permissions_exists; then +#REMOVEME? ynh_legacy_permissions_delete_all ynh_app_setting_delete --app=$app --key=is_public fi # Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +#REMOVEME? if ! ynh_permission_exists --permission="api"; then +#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" fi # Delete existing ini configuration file (backward compatibility) @@ -110,12 +110,12 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 # Made a backup only after the version 11.0.0 # Before, the datas will be always saved. # Get the current version number of nextcloud/owncloud -current_version=$(grep OC_VersionString "$final_path/version.php" | cut -d\' -f2) +current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) current_major_version=${current_version%%.*} if [ $current_major_version -gt 11 ] @@ -125,42 +125,42 @@ then ynh_app_setting_set --app=$app --key=backup_core_only --value=1 # Backup the current version of the app - ynh_backup_before_upgrade +#REMOVEME? ynh_backup_before_upgrade # Remove the option backup_core_only after the backup. ynh_app_setting_delete $app backup_core_only - ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { # restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } fi # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +#REMOVEME? if ynh_legacy_permissions_exists; then +#REMOVEME? ynh_legacy_permissions_delete_all - ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" fi #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=7 +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=7 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # STANDARD UPGRADE STEPS #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION @@ -170,7 +170,7 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Recreate a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION @@ -214,23 +214,23 @@ exec_occ() { else NEXTCLOUD_PHP_VERSION="7.0" fi -(cd "$final_path" && ynh_exec_as "$app" \ +(cd "$install_dir" && ynh_exec_as "$app" \ php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } # Define a function to add an external storage # Create the external storage for the given folders and enable sharing create_external_storage() { -local datadir="$1" +local data_dir="$1" local mount_name="$2" local mount_id=$(exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true) + "$mount_name" 'local' 'null::null' -c "data_dir=$data_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 } # Define app's data directory -datadir="/home/yunohost.app/$app/data" +#REMOVEME? data_dir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -243,7 +243,7 @@ then last_major_version=${last_version%%.*} # Set write access for the following commands - chown -R $app: "$final_path" "$datadir" + chown -R $app: "$install_dir" "$data_dir" # Print the current version number of Nextcloud exec_occ -V @@ -306,13 +306,13 @@ EOF exec_occ maintenance:mode --on # Backup the config file in the temp dir - cp -a "$final_path/config/config.php" "$tmpdir/config/config.php" + cp -a "$install_dir/config/config.php" "$tmpdir/config/config.php" # 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 $final_path/apps + cd $install_dir/apps for nc_app_dir in */ do if [ ! -d "$tmpdir/apps/$nc_app_dir" ] @@ -323,12 +323,12 @@ EOF ) # Replace the old nextcloud by the new one - ynh_secure_remove --file="$final_path" - mv "$tmpdir" "$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" + mv "$tmpdir" "$install_dir" ynh_secure_remove --file="$tmpdir" # Set write access for the following commands - chown -R $app: "$final_path" "$datadir" + chown -R $app: "$install_dir" "$data_dir" # Upgrade Nextcloud (SUCCESS = 0, UP_TO_DATE = 3) exec_occ maintenance:mode --off @@ -336,7 +336,7 @@ EOF || [ $? -eq 3 ] || ynh_die --message="Unable to upgrade Nextcloud" # Get the new current version number - current_version=$(grep OC_VersionString "$final_path/version.php" | cut -d\' -f2) + current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) current_major_version=${current_version%%.*} # Print the current version number of nextcloud @@ -354,9 +354,9 @@ EOF ynh_script_progression --message="Reconfiguring Nextcloud..." --weight=9 # Verify the checksum and backup the file if it's different - ynh_backup_if_checksum_is_different --file="$final_path/config/config.php" + ynh_backup_if_checksum_is_different --file="$install_dir/config/config.php" - nc_conf="${final_path}/config.json" + nc_conf="${install_dir}/config.json" ynh_add_config --template="../conf/config.json" --destination="$nc_conf" # Reneable the mail app @@ -388,7 +388,7 @@ EOF \$main_domain = exec('cat /etc/yunohost/current_host'); \$CONFIG['logout_url'] = 'https://'.\$main_domain.'/yunohost/sso/?action=logout'; //-YunoHost- - " >> "$final_path/config/config.php" + " >> "$install_dir/config/config.php" #================================================= # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS @@ -417,7 +417,7 @@ EOF #================================================= # Calculate and store the config file checksum into the app settings - ynh_store_file_checksum --file="${final_path}/config/config.php" + ynh_store_file_checksum --file="${install_dir}/config/config.php" fi #================================================= @@ -438,15 +438,15 @@ exec_occ background:cron #================================================= # Fix app ownerships & permissions -chown -R $app:www-data "$final_path" -chown -R $app: "$datadir" -find $final_path/ -type f -print0 | xargs -0 chmod 0644 -find $final_path/ -type d -print0 | xargs -0 chmod 0755 -find $datadir/ -type f -print0 | xargs -0 chmod 0640 -find $datadir/ -type d -print0 | xargs -0 chmod 0750 -chmod 640 "$final_path/config/config.php" +chown -R $app:www-data "$install_dir" +chown -R $app: "$data_dir" +find $install_dir/ -type f -print0 | xargs -0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -0 chmod 0755 +find $data_dir/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app -chmod 750 $final_path +chmod 750 $install_dir #================================================= # WARNING ABOUT THIRD-PARTY APPS From eff9cce7c95e8bbba2d0327ccb7acded27e49c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Nov 2022 23:09:00 +0100 Subject: [PATCH 002/195] v2 --- conf/nextcloud.cron | 2 +- manifest.json | 70 ----------------- manifest.toml | 12 ++- scripts/_common.sh | 1 - scripts/actions/add_multimedia_directories | 4 +- scripts/actions/disable_maintenance | 6 +- scripts/backup | 22 ------ scripts/change_url | 9 --- scripts/config | 4 +- scripts/install | 91 +--------------------- scripts/remove | 60 -------------- scripts/restore | 51 +----------- scripts/upgrade | 63 +++------------ 13 files changed, 34 insertions(+), 361 deletions(-) delete mode 100644 manifest.json diff --git a/conf/nextcloud.cron b/conf/nextcloud.cron index 13de049d..c2a825ca 100644 --- a/conf/nextcloud.cron +++ b/conf/nextcloud.cron @@ -1 +1 @@ -*/15 * * * * __APP__ /usr/bin/php__PHPVERSION__ --define apc.enable_cli=1 -f __FINAL_PATH__/cron.php +*/15 * * * * __APP__ /usr/bin/php__PHPVERSION__ --define apc.enable_cli=1 -f __INSTALL_DIR__/cron.php diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 799055d2..00000000 --- a/manifest.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "id": "nextcloud", - "name": "Nextcloud", - "packaging_format": 1, - "description": { - "en": "Online storage, file sharing platform and various other applications", - "fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications" - }, - "version": "25.0.1~ynh1", - "url": "https://nextcloud.com", - "upstream": { - "license": "AGPL-3.0", - "website": "https://nextcloud.com", - "demo": "https://demo.nextcloud.com/", - "admindoc": "https://docs.nextcloud.com/server/stable/admin_manual/", - "userdoc": "https://docs.nextcloud.com/server/latest/user_manual/en/", - "code": "https://github.com/nextcloud/server", - "cpe": "cpe:2.3:a:nextcloud:nextcloud" - }, - "license": "AGPL-3.0", - "maintainer": { - "name": "kay0u", - "email": "pierre@kayou.io" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": true, - "services": [ - "nginx", - "php8.0-fpm", - "mysql" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/nextcloud", - "default": "/nextcloud" - }, - { - "name": "admin", - "type": "user" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin.", - "fr": "Si cette case est cochée, Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." - }, - "default": true - }, - { - "name": "user_home", - "type": "boolean", - "ask": { - "en": "Access the users home folder from Nextcloud?", - "fr": "Accéder au dossier personnel des utilisateurs depuis Nextcloud ?" - }, - "default": false - } - ] - } -} \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 8be653b2..e3d8d061 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,11 +20,11 @@ cpe = "???" # FIXME: optional but recommended if relevant, this is meant to cont fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 11.0.9" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64/armel), for example: ["amd64", "i386"] +yunohost = ">= 11.1.0" +architectures = ["amd64", "arm64"] multi_instance = true -ldap = "?" # FIXME: replace with true, false, or "not_relevant" -sso = "?" # FIXME: replace with true, false, or "not_relevant" +ldap = "true" # +sso = "true" # disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... @@ -67,3 +67,7 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.database] type = "mysql" + + [resources.apt] + packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd 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" + diff --git a/scripts/_common.sh b/scripts/_common.sh index 69b46330..8c270a69 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,6 @@ #================================================= YNH_PHP_VERSION="8.0" -#REMOVEME? pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/actions/add_multimedia_directories b/scripts/actions/add_multimedia_directories index 8b5a9aff..f6160195 100755 --- a/scripts/actions/add_multimedia_directories +++ b/scripts/actions/add_multimedia_directories @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # CHECK IF ARGUMENTS ARE CORRECT @@ -27,7 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Define a function to execute commands with `occ` exec_occ() { - (cd "$final_path" && exec_as "$app" \ + (cd "$install_dir" && exec_as "$app" \ php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } diff --git a/scripts/actions/disable_maintenance b/scripts/actions/disable_maintenance index 60e8738e..e56fd5b1 100755 --- a/scripts/actions/disable_maintenance +++ b/scripts/actions/disable_maintenance @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # CHECK IF ARGUMENTS ARE CORRECT @@ -27,7 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Check the current status of the maintenance mode -if [ "$(grep "maintenance" "$final_path/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ] +if [ "$(grep "maintenance" "$install_dir/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ] then ynh_die --message="Nextcloud isn't currently under maintenance." --ret_code=0 fi @@ -41,7 +41,7 @@ fi ynh_script_progression --message="Disabling maintenance mode..." --weight=3 ( -cd "$final_path" && exec_as "$app" \ +cd "$install_dir" && exec_as "$app" \ php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode --off ) diff --git a/scripts/backup b/scripts/backup index 24601fac..57d66b2b 100755 --- a/scripts/backup +++ b/scripts/backup @@ -9,26 +9,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -59,8 +39,6 @@ ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql -#================================================= -# SPECIFIC BACKUP #================================================= # BACKUP LOGROTATE #================================================= diff --git a/scripts/change_url b/scripts/change_url index e4e36967..147f45ad 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -21,15 +21,6 @@ new_path=$YNH_APP_NEW_PATH app=$YNH_APP_INSTANCE_NAME -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= diff --git a/scripts/config b/scripts/config index 7b6b67ea..10ee4b2e 100644 --- a/scripts/config +++ b/scripts/config @@ -68,12 +68,12 @@ get__free_footprint() { set__maintenance_mode() { if [ "$maintenance_mode" -eq "0" ]; then # If maintenance_mode was set to 0, disable maintenance mode - (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 maintenance:mode --off) ynh_print_info "Maintenance mode disabled" elif [ "$maintenance_mode" -eq "1" ]; then # If maintenance_mode was set to 1, enable maintenance mode - (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 maintenance:mode --on) ynh_print_info "Maintenance mode enabled" fi diff --git a/scripts/install b/scripts/install index e36fcd68..a36dc118 100755 --- a/scripts/install +++ b/scripts/install @@ -9,75 +9,23 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -#REMOVEME? path=$YNH_APP_ARG_PATH -#REMOVEME? admin=$YNH_APP_ARG_ADMIN -#REMOVEME? user_home=$YNH_APP_ARG_USER_HOME -#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC +user_home=$YNH_APP_ARG_USER_HOME phpversion=$YNH_PHP_VERSION -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." - -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - -# Check machine architecture (Seens 25.0 Nextcloud doesn't support 32bit machines) -if [ $YNH_ARCH == "i386" ]; -then - ynh_die --message="Sorry, Nextcloud has deprecated 32-bit support" -fi - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=user_home --value=$user_home maintenance_mode=0 ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# INSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=10 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE A MYSQL DATABASE -#================================================= -#REMOVEME? ynh_script_progression --message="Creating a MySQL database..." --weight=2 - -#REMOVEME? db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? db_user=$db_name -#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -95,20 +43,11 @@ SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true EOF -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Enable YunoHost patches on Nextcloud sources cp -a ../sources/patches_last_version/* ../sources/patches # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=3 - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -124,8 +63,6 @@ ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage # Create a dedicated php-fpm config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION -# Used by ynh_add_nginx_config -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION @@ -144,20 +81,6 @@ fi # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP -#================================================= -# CREATE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -# Define app's data directory -#REMOVEME? data_dir="/home/yunohost.app/$app/data" -#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir - -# Create app folders -mkdir -p "$data_dir" - #================================================= # INSTALL NEXTCLOUD #================================================= @@ -356,15 +279,9 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" - #================================================= # SETUP SSOWAT #================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." - -# Make app public if necessary -#REMOVEME? if [ $is_public -eq 1 ] -then -#REMOVEME? ynh_permission_update --permission="main" --add="visitors" -fi +ynh_script_progression --message="Configuring permissions..." -#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX diff --git a/scripts/remove b/scripts/remove index 5c092227..0d0ff5b5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,56 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=2 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=20 - -# Remove metapackage and its dependencies -#REMOVEME? ynh_remove_app_dependencies - -#================================================= -# REMOVE THE MYSQL DATABASE -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the MySQL database..." --weight=5 - -# Remove a database if it exists, along with the associated user -#REMOVEME? ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=3 - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - -#================================================= -# REMOVE DATA DIR -#================================================= - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --weight=1 -#REMOVEME? ynh_secure_remove --file="$data_dir" -fi - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -111,16 +61,6 @@ for i in $(ls /home); do && setfacl --remove g:$app:rwx 2>&1 done -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index a1fda54d..79712c70 100755 --- a/scripts/restore +++ b/scripts/restore @@ -9,38 +9,13 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # LOAD SETTINGS #================================================= ynh_script_progression --message="Loading settings..." -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir) - -#REMOVEME? fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -#REMOVEME? fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=4 - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " +fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # STANDARD RESTORATION STEPS @@ -54,30 +29,10 @@ ynh_restore_file --origin_path="$install_dir" #================================================= # RESTORE THE MYSQL DATABASE #================================================= -#REMOVEME? ynh_script_progression --message="Restoring the MySQL database..." --weight=9 +ynh_script_progression --message="Restoring the MySQL database..." --weight=9 -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -#REMOVEME? ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=10 - -# Define and install dependencies -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 57213237..e09d7b68 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,21 +12,12 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=3 +ynh_script_progression --message="Loading installation settings..." --weight=3 -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? user_home=$(ynh_app_setting_get --app=$app --key=user_home) - -#REMOVEME? maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode) -#REMOVEME? fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -#REMOVEME? fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +user_home=$(ynh_app_setting_get --app=$app --key=user_home) +maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode) +fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # CHECK VERSION @@ -34,12 +25,6 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -# Check machine architecture (Seens 25.0 Nextcloud doesn't support 32bit machines) -if [ $YNH_ARCH == "i386" ]; -then - ynh_die --message="Sorry, Nextcloud has deprecated 32-bit support" -fi - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -90,16 +75,10 @@ if [ -z "$fpm_usage" ]; then ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi -# Cleaning legacy permissions -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi # Create a permission if needed -#REMOVEME? if ! ynh_permission_exists --permission="api"; then -#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" fi # Delete existing ini configuration file (backward compatibility) @@ -137,31 +116,13 @@ then fi # Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors +ynh_abort_if_errors -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - -#REMOVEME? ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=7 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -170,8 +131,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Recreate a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # NGINX CONFIGURATION #================================================= From fd6943779b15d247d0f2f9c119c6332e76bfa5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Nov 2022 23:10:27 +0100 Subject: [PATCH 003/195] v2 --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index e3d8d061..a0f3f0fe 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,8 +16,7 @@ demo = "https://demo.nextcloud.com/" admindoc = "https://docs.nextcloud.com/server/stable/admin_manual/" userdoc = "https://docs.nextcloud.com/server/latest/user_manual/en/" code = "https://github.com/nextcloud/server" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. +cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] yunohost = ">= 11.1.0" From 8fd043f76c95b7219d594cffcb9b9a098f911def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:27:45 +0100 Subject: [PATCH 004/195] fix --- doc/DESCRIPTION.md | 0 manifest.toml | 17 +++++++---------- scripts/_common.sh | 2 -- tests.toml | 18 ++++++++++++++++++ 4 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 doc/DESCRIPTION.md create mode 100644 tests.toml diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 00000000..e69de29b diff --git a/manifest.toml b/manifest.toml index a0f3f0fe..513f3164 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,27 +19,24 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.1.2" architectures = ["amd64", "arm64"] multi_instance = true -ldap = "true" # -sso = "true" # -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = "true" +sso = "true" +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" [install.path] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "path" default = "/nextcloud" [install.admin] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "user" [install.init_main_permission] @@ -68,5 +65,5 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen type = "mysql" [resources.apt] - packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd 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" + packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" diff --git a/scripts/_common.sh b/scripts/_common.sh index 8c270a69..225eaa94 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" - #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 00000000..f9cdde2b --- /dev/null +++ b/tests.toml @@ -0,0 +1,18 @@ +test_format = 1.0 + +[default] + + # ------------------------------- + # Default args to use for install + # ------------------------------- + + args.user_home= ["1"] + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.212f4439.name = "Upgrade from 0.6.1~ynh2" + + + From d6f4ccbb016d800f2ddb533efdcac65d622cf7f1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 Feb 2023 21:27:49 +0000 Subject: [PATCH 005/195] Auto-update README --- README.md | 2 +- README_fr.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6fc7650f..f0d2463b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Nextcloud for YunoHost -[![Integration level](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Working status](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Working status](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index e441d529..4fdadafc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Nextcloud pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) [![Installer Nextcloud avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Nextcloud rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Nextcloud rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Stockage en ligne, plateforme de partage de fichiers et diverses autres applications @@ -21,9 +21,9 @@ Stockage en ligne, plateforme de partage de fichiers et diverses autres applicat **Démo :** https://demo.nextcloud.com/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de Nextcloud](./doc/screenshots/screenshot.png) +![Capture d’écran de Nextcloud](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -52,10 +52,10 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l’app : * Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -71,4 +71,4 @@ ou sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From ce5b9992d02d68e4a5b53dc6fcad3c5847b3e610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:35:46 +0100 Subject: [PATCH 006/195] Fix --- scripts/change_url | 2 +- scripts/config | 2 +- scripts/upgrade | 20 +------------------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 147f45ad..a7a72811 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -92,7 +92,7 @@ ynh_script_progression --message="Applying Nextcloud specific modifications..." # 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 "$@") } diff --git a/scripts/config b/scripts/config index 10ee4b2e..5a7a2ac8 100644 --- a/scripts/config +++ b/scripts/config @@ -24,7 +24,7 @@ current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) get__maintenance_mode() { # Maintenance mode status - maintenance_mode_status="$(cd "$final_path" && ynh_exec_as "$app" \ + maintenance_mode_status="$(cd "$install_dir" && ynh_exec_as "$app" \ php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode)" 2> /dev/null if echo $maintenance_mode_status | grep -q "disabled" then diff --git a/scripts/upgrade b/scripts/upgrade index e09d7b68..b94c4566 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,24 +30,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi - -# If install_dir doesn't exist, create it -if [ -z "$install_dir" ]; then -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir -fi - -# If data_dir doesn't exist, create it -if [ -z "$data_dir" ]; then - data_dir=/home/yunohost.app/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir -fi - # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only @@ -282,7 +264,7 @@ EOF ) # Replace the old nextcloud by the new one -#REMOVEME? ynh_secure_remove --file="$install_dir" + ynh_secure_remove --file="$install_dir" mv "$tmpdir" "$install_dir" ynh_secure_remove --file="$tmpdir" From 754d3211b5f30d705b8c0247c006bc41c419843f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 Feb 2023 21:38:01 +0000 Subject: [PATCH 007/195] 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 41c89dc0..542c93f1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Online storage, file sharing platform and various other applications -**Shipped version:** 25.0.3~ynh2 +**Shipped version:** 25.0.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 185c8c86..cce05c6f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Stockage en ligne, plateforme de partage de fichiers et diverses autres applications -**Version incluse :** 25.0.3~ynh2 +**Version incluse :** 25.0.1~ynh1 **Démo :** https://demo.nextcloud.com/ From c8ef5396b8fe1a7f751e44d31c89224d19585585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:45:09 +0100 Subject: [PATCH 008/195] Update manifest.toml --- manifest.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 513f3164..ab529473 100644 --- a/manifest.toml +++ b/manifest.toml @@ -58,8 +58,13 @@ ram.runtime = "50M" [resources.data_dir] - [resources.permissions] - main.url = "/" +[resources.permissions] + main.label = "api" + main.url = "re:$domain\/.well-known\/.*" + main.allowed = ["visitors, all_users"] + main.auth_header = false + main.show_tile = false + main.protected= true [resources.database] type = "mysql" From d5d5d0464ffb6b0cfcddb4ea243be1bcbdf6e55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:46:32 +0100 Subject: [PATCH 009/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ab529473..6ec15b65 100644 --- a/manifest.toml +++ b/manifest.toml @@ -58,7 +58,7 @@ ram.runtime = "50M" [resources.data_dir] -[resources.permissions] + [resources.permissions] main.label = "api" main.url = "re:$domain\/.well-known\/.*" main.allowed = ["visitors, all_users"] From c3ca5110000b392f80ea464dcdc57db77c802d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Feb 2023 21:32:05 +0100 Subject: [PATCH 010/195] add Description --- doc/DESCRIPTION.md | 12 ++++++++++++ doc/DESCRIPTION_fr.md | 12 ++++++++++++ doc/DISCLAIMER.md | 14 -------------- doc/DISCLAIMER_fr.md | 13 ------------- manifest.toml | 1 - 5 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 doc/DESCRIPTION_fr.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index e69de29b..c34ade12 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -0,0 +1,12 @@ +Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces. + +### YunoHost features: + +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) + * Allow multiple instances of this application + * Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default) + * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 00000000..c34ade12 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,12 @@ +Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces. + +### YunoHost features: + +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) + * Allow multiple instances of this application + * Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default) + * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 0a737107..a6d67111 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,5 +1,3 @@ -## Configuration - ### Configure ONLYOFFICE integration #### With Nextcloud App (no ARM support, lower performance) @@ -16,15 +14,3 @@ To install and configure it: #### 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) - - -## YunoHost specific features - -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) - * Allow multiple instances of this application - * Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default) - * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 343894c6..21100000 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,5 +1,3 @@ -## Configuration - ### Configurer l'intégration d'ONLYOFFICE #### Avec l'application Nextcloud (pas de support ARM, performances limitées) @@ -16,14 +14,3 @@ Pour l'installer et la configurer : #### 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) - - -## Caractéristiques spécifiques YunoHost - -En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suivantes sont incluses dans ce package : - - * Intégration avec les utilisateurs YunoHost et le SSO - exemple, le bouton de déconnexion - * Permet à un utilisateur d'être l'administrateur (choisi à l'installation) - * Permet de multiples instances de cette application - * Accès optionnel au répertoire home depuis les fichiers Nextcloud (à activer à l'installation, le partage étant activé par défaut) - * Utilise l'adresse `/.well-known` pour la synchronisation CalDAV et CardDAV du domaine si aucun autre service ne l'utilise déjà - par exemple, baikal diff --git a/manifest.toml b/manifest.toml index 6ec15b65..402b9e74 100644 --- a/manifest.toml +++ b/manifest.toml @@ -71,4 +71,3 @@ ram.runtime = "50M" [resources.apt] packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" - From 993807bced41d7932f207cb39e207b7e979d1855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Feb 2023 21:57:45 +0100 Subject: [PATCH 011/195] cleaning --- conf/extra_php-fpm.conf | 2 +- conf/nextcloud.cron | 2 +- scripts/_common.sh | 2 ++ scripts/install | 2 +- scripts/restore | 6 +++--- scripts/upgrade | 20 ++++++++++---------- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 5657e27f..4e9d3497 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -10,7 +10,7 @@ php_value[default_charset] = UTF-8 ; The following parameters are nevertheless recommended for Nextcloud ; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache php_value[opcache.enable_cli]=1 -php_value[opcache.interned_strings_buffer]=16 +php_value[opcache.interned_strings_buffer]=32 php_value[opcache.max_accelerated_files]=10000 php_value[opcache.memory_consumption]=128 php_value[opcache.save_comments]=1 diff --git a/conf/nextcloud.cron b/conf/nextcloud.cron index c2a825ca..31bfe2f0 100644 --- a/conf/nextcloud.cron +++ b/conf/nextcloud.cron @@ -1 +1 @@ -*/15 * * * * __APP__ /usr/bin/php__PHPVERSION__ --define apc.enable_cli=1 -f __INSTALL_DIR__/cron.php +*/5 * * * * __APP__ /usr/bin/php__PHPVERSION__ --define apc.enable_cli=1 -f __INSTALL_DIR__/cron.php diff --git a/scripts/_common.sh b/scripts/_common.sh index 225eaa94..f90cf7bf 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,8 @@ # COMMON VARIABLES #================================================= +YNH_PHP_VERSION="8.1" + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index a36dc118..c3a77f8d 100755 --- a/scripts/install +++ b/scripts/install @@ -72,7 +72,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Check if .well-known is available for this domain if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" then - ynh_print_warn --message="Another app already uses the domain $domain to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book." + ynh_print_warn --message="Another app already uses the domain $domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." # Remove lines about .well-known/carddav and caldav with sed. sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" diff --git a/scripts/restore b/scripts/restore index 79712c70..a9c6b3a9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -53,9 +53,9 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" # Check if .well-known is available for this domain if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" then - ynh_print_warn --message="Another app already uses the domain $domain to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book." + ynh_print_warn --message="Another app already uses the domain $domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." - # Remove lines about .well-known/carddav and caldav with sed. + # Remove lines about .well-known/CardDAV and CalDAV with sed. sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "/etc/nginx/conf.d/$domain.d/$app.conf" fi @@ -123,7 +123,7 @@ ynh_script_progression --message="Restoring the Fail2Ban configuration..." --wei ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" -# Make sure a log file exists (mostly for CI tests) +# Make sure a log file exists (mostly for CI tests) logfile="/home/yunohost.app/$app/data/nextcloud.log" if [ ! -f "$logfile" ]; then touch "$logfile" diff --git a/scripts/upgrade b/scripts/upgrade index d7b8c9e3..9fc6a5ea 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,9 +59,9 @@ fi # Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" -fi +#if ! ynh_permission_exists --permission="api"; then +# ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" +#fi # Delete existing ini configuration file (backward compatibility) if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then @@ -71,7 +71,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 # Made a backup only after the version 11.0.0 # Before, the datas will be always saved. @@ -86,14 +86,14 @@ then ynh_app_setting_set --app=$app --key=backup_core_only --value=1 # Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade + ynh_backup_before_upgrade # Remove the option backup_core_only after the backup. ynh_app_setting_delete $app backup_core_only -#REMOVEME? ynh_clean_setup () { + ynh_clean_setup () { # restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup + ynh_restore_upgradebackup } fi @@ -130,7 +130,7 @@ ynh_systemd_action --service_name=nginx --action=reload --line_match="Reloaded" # Check if .well-known is available for this domain if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" then - ynh_print_warn --message="Another app already uses the domain $domain to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book." + ynh_print_warn --message="Another app already uses the domain $domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." # Remove lines about .well-known/carddav and caldav with sed. sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" @@ -174,7 +174,7 @@ local mount_id=$(exec_occ files_external:create --output=json \ || exec_occ files_external:option "$mount_id" enable_sharing true } # Define app's data directory -#REMOVEME? data_dir="/home/yunohost.app/$app/data" +data_dir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -266,7 +266,7 @@ EOF done ) - # Replace the old nextcloud by the new one + # Replace the old Nextcloud by the new one ynh_secure_remove --file="$install_dir" mv "$tmpdir" "$install_dir" ynh_secure_remove --file="$tmpdir" From 81d6d1883301338d97d64b3d7de632db828c88ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Feb 2023 21:59:14 +0100 Subject: [PATCH 012/195] fix --- check_process | 27 --------------------------- tests.toml | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 check_process diff --git a/check_process b/check_process deleted file mode 100644 index 6922dcca..00000000 --- a/check_process +++ /dev/null @@ -1,27 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - admin="homer" - is_public=1 - user_home="1" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - #25.0.2 - upgrade=1 from_commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8 - backup_restore=1 - multi_instance=1 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8 - name=Merge pull request #495 from YunoHost-Apps/25.0.2 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1& diff --git a/tests.toml b/tests.toml index f9cdde2b..bb418d11 100644 --- a/tests.toml +++ b/tests.toml @@ -12,7 +12,7 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.212f4439.name = "Upgrade from 0.6.1~ynh2" + test_upgrade_from.c5cf91ad.name = "Upgrade from 25.0.2" From 7d1e3436d653658e3428b8e6233530df92b6dbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 10 Feb 2023 22:02:23 +0100 Subject: [PATCH 013/195] post install --- doc/{DISCLAIMER.md => POST_INSTALL.md} | 0 doc/{DISCLAIMER_fr.md => POST_INSTALL_fr.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename doc/{DISCLAIMER.md => POST_INSTALL.md} (100%) rename doc/{DISCLAIMER_fr.md => POST_INSTALL_fr.md} (100%) diff --git a/doc/DISCLAIMER.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/DISCLAIMER.md rename to doc/POST_INSTALL.md diff --git a/doc/DISCLAIMER_fr.md b/doc/POST_INSTALL_fr.md similarity index 100% rename from doc/DISCLAIMER_fr.md rename to doc/POST_INSTALL_fr.md From 9a8106f5b19aaa4a37155f6aededaf199a4b52f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 11 Feb 2023 09:58:50 +0100 Subject: [PATCH 014/195] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 402b9e74..ecfebff5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "50M" type = "user" [install.init_main_permission] - help.en = "If enabled, Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." - help.fr = "Si cette case est cochée, Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." + help.en = "Set to 'visitors', Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." + help.fr = "Défini sur 'visiteurs', Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." type = "group" default = "visitors" From 927803cc74cc2e09279618168bd983669a999705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:01:34 +0100 Subject: [PATCH 015/195] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ecfebff5..e44cad5b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,14 +19,14 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 11.1.2" +yunohost = ">= 11.1.6" architectures = ["amd64", "arm64"] multi_instance = true ldap = "true" sso = "true" disk = "50M" -ram.build = "50M" -ram.runtime = "50M" +ram.build = "128M" +ram.runtime = "512M" [install] [install.domain] From 97546d7492cf5d702d575f2f451d0d666bd61d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:53:17 +0100 Subject: [PATCH 016/195] Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index e44cad5b..26ed891a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -60,8 +60,7 @@ ram.runtime = "512M" [resources.permissions] main.label = "api" - main.url = "re:$domain\/.well-known\/.*" - main.allowed = ["visitors, all_users"] + main.url = "re:$domain /.well-known /.*" main.auth_header = false main.show_tile = false main.protected= true From bda9c71b7234a093c8a7411e8805f2f39b07c309 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 12 Feb 2023 21:53:22 +0000 Subject: [PATCH 017/195] Auto-update README --- README.md | 34 ++-------------------------------- README_fr.md | 22 ++-------------------- 2 files changed, 4 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 10d685f0..c705a26a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Nextcloud for YunoHost [![Integration level](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Working status](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) + [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) *[Lire ce readme en français.](./README_fr.md)* @@ -29,7 +30,7 @@ this package: * 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:** 25.0.3~ynh4 +**Shipped version:** 25.0.1~ynh1 **Demo:** https://demo.nextcloud.com/ @@ -37,37 +38,6 @@ this package: ![Screenshot of Nextcloud](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -### Configure ONLYOFFICE integration - -#### With Nextcloud App (no ARM support, lower performance) - -Starting from Nextcloud 18, it 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://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE. -- Here you go :) You should be able to create new type of documents and open them. - -*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) - - -## YunoHost specific features - -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) - * Allow multiple instances of this application - * Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default) - * Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index ba67f2eb..92779fb6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Nextcloud pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg) + [![Installer Nextcloud avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) *[Read this readme in english.](./README.md)* @@ -28,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, baikal -**Version incluse :** 25.0.3~ynh4 +**Version incluse :** 25.0.1~ynh1 **Démo :** https://demo.nextcloud.com/ @@ -36,25 +37,6 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv ![Capture d’écran de Nextcloud](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -### Configurer l'intégration d'ONLYOFFICE - -#### Avec l'application Nextcloud (pas de support ARM, performances limitées) - -À partir de sa version 18, 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 : -- Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE. -- Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur ONLYOFFICE. -- Ensuite dans les Paramètres -> ONLYOFFICE (`https://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec ONLYOFFICE. -- Et voilà :) Vous devriez pouvoir créer de nouveaux types de documents, et les ouvrir. - -*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) - ## Documentations et ressources * Site officiel de l’app : From 8f5f7079fdba76a7e90f8cdb1c220053a63e1625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:54:20 +0100 Subject: [PATCH 018/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 26ed891a..09f17c68 100644 --- a/manifest.toml +++ b/manifest.toml @@ -69,4 +69,4 @@ ram.runtime = "512M" type = "mysql" [resources.apt] - packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" + packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-pgsql php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" From 9ce42a536cf785b49f94109624061f2e15694b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:55:26 +0100 Subject: [PATCH 019/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 09f17c68..26ed891a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -69,4 +69,4 @@ ram.runtime = "512M" type = "mysql" [resources.apt] - packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-pgsql php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" + packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" From e6ad863377f73d7dfdcea47119db12b649ea3b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:57:48 +0100 Subject: [PATCH 020/195] Update config_install.json --- conf/config_install.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config_install.json b/conf/config_install.json index 21508500..adb8a6de 100644 --- a/conf/config_install.json +++ b/conf/config_install.json @@ -1,6 +1,6 @@ { "system": { - "data_directory": "__DATA_DIR__", + "datadirectory": "__DATA_DIR__", "trusted_domains": [ "localhost", "__DOMAIN__" From aeef3d9aa7174f6f3b500c8da2b569037386e12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:09:01 +0100 Subject: [PATCH 021/195] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 26ed891a..dd7e54dd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,8 +22,8 @@ cpe = "cpe:2.3:a:nextcloud:nextcloud" yunohost = ">= 11.1.6" architectures = ["amd64", "arm64"] multi_instance = true -ldap = "true" -sso = "true" +ldap = true +sso = true disk = "50M" ram.build = "128M" ram.runtime = "512M" From 9800577c5fa0af6411e88ad56d2bff48c83bc605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:09:25 +0100 Subject: [PATCH 022/195] Update install --- scripts/install | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/scripts/install b/scripts/install index c3a77f8d..bc2646af 100755 --- a/scripts/install +++ b/scripts/install @@ -276,20 +276,6 @@ ynh_script_progression --message="Configuring Fail2Ban..." --weight=8 # Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From ea8d1b411e8eb7396da93dc08ad98c7ba739539e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:10:16 +0100 Subject: [PATCH 023/195] Update upgrade --- scripts/upgrade | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9fc6a5ea..3f6ece4b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,14 +97,6 @@ then } fi -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" -fi - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -426,7 +418,7 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" - #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=nginx --action=reload +#ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload #================================================= From 354f108eaf28fdfab6c88d3f4e242c4a25d2fd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:10:32 +0100 Subject: [PATCH 024/195] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index bb418d11..e40428fd 100644 --- a/tests.toml +++ b/tests.toml @@ -6,7 +6,7 @@ test_format = 1.0 # Default args to use for install # ------------------------------- - args.user_home= ["1"] + args.user_home= ["yes"] # ------------------------------- # Commits to test upgrade from From b9a5ed00705c86da7a3ae56ab4db5cabba045df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:26:18 +0100 Subject: [PATCH 025/195] Cleaning --- scripts/backup | 19 +++++++++---------- scripts/change_url | 2 +- scripts/upgrade | 1 - 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/backup b/scripts/backup index 57d66b2b..1c500a89 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,23 +21,22 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# BACKUP THE DATA DIRECTORY #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup --src_path="$data_dir" --is_big #================================================= -# BACKUP THE PHP-FPM CONFIGURATION +# BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# BACKUP THE MYSQL DATABASE +# BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info --message="Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP LOGROTATE @@ -59,11 +58,11 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" ynh_backup --src_path="/etc/cron.d/$app" #================================================= -# BACKUP THE DATA DIRECTORY +# BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info --message="Backing up data directory..." +ynh_print_info --message="Backing up the MySQL database..." -ynh_backup --src_path="$data_dir" --is_big +ynh_mysql_dump_db --database="$db_name" > db.sql #================================================= # END OF SCRIPT diff --git a/scripts/change_url b/scripts/change_url index a7a72811..8a42c1d2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -36,7 +36,7 @@ ynh_clean_setup () { ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED diff --git a/scripts/upgrade b/scripts/upgrade index 3f6ece4b..d4aa0089 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -418,7 +418,6 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" - #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." -#ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload #================================================= From cc945067901bc06e93ff82e2f567be0f4d403295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 14:32:32 +0100 Subject: [PATCH 026/195] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index e40428fd..be2ac19c 100644 --- a/tests.toml +++ b/tests.toml @@ -6,7 +6,7 @@ test_format = 1.0 # Default args to use for install # ------------------------------- - args.user_home= ["yes"] + args.user_home= "yes" # ------------------------------- # Commits to test upgrade from From 63448f20497a2351c5f92ae09840ebcf63ad4f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:26:40 +0100 Subject: [PATCH 027/195] Update manifest.toml Co-authored-by: Alexandre Aubin --- manifest.toml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manifest.toml b/manifest.toml index dd7e54dd..1dacfb95 100644 --- a/manifest.toml +++ b/manifest.toml @@ -59,11 +59,13 @@ ram.runtime = "512M" [resources.data_dir] [resources.permissions] - main.label = "api" - main.url = "re:$domain /.well-known /.*" - main.auth_header = false - main.show_tile = false - main.protected= true + main.url = "/" + + api.url = "re:$domain\\/.well-known\\/.*" + api.auth_header = false + api.show_tile = false + api.protected= true + api.allowed = ["visitors", "all_users"] [resources.database] type = "mysql" From bf2ba7b8ea5a0f6f93354c1c8c724e363b7c1db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:53:13 +0100 Subject: [PATCH 028/195] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index d4aa0089..6e129f80 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -416,7 +416,7 @@ ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" - #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." +ynh_script_progression --message="Reloading PHP-FPM..." --weight=2 ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload From d72cb6228992bfac738db38732d7bb422f35cf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 08:41:09 +0100 Subject: [PATCH 029/195] Update upgrade --- scripts/upgrade | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6e129f80..4e0c8363 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,9 +15,6 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Loading installation settings..." --weight=3 user_home=$(ynh_app_setting_get --app=$app --key=user_home) -maintenance_mode=$(ynh_app_setting_get --app=$app --key=maintenance_mode) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # CHECK VERSION @@ -34,35 +31,29 @@ ynh_script_progression --message="Ensuring downward compatibility..." ynh_app_setting_delete --app=$app --key=backup_core_only # If maintenance_mode doesn't exist, create it -if [ -z "$maintenance_mode" ]; then +if [ -z "${maintenance_mode:-}" ]; then maintenance_mode=0 ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode fi # If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then +if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=high ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi # If fpm_free_footprint doesn't exist, create it -if [ -z "$fpm_free_footprint" ]; then +if [ -z "${fpm_free_footprint:-}" ]; then fpm_free_footprint=0 ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi # If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then +if [ -z "${fpm_usage:-}" ]; then fpm_usage=medium ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi - -# Create a permission if needed -#if ! ynh_permission_exists --permission="api"; then -# ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true" -#fi - # Delete existing ini configuration file (backward compatibility) if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini From 7cce030768ee8c35d9aeaf00e4bc6a857dbdeea0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 15 Feb 2023 18:15:03 +0000 Subject: [PATCH 030/195] Auto-update README --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 0308f363..88dc3739 100644 --- a/README.md +++ b/README.md @@ -38,25 +38,6 @@ this package: ![Screenshot of Nextcloud](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -### Configure ONLYOFFICE integration - -#### With Nextcloud App (no ARM support, lower performance) - -Starting from Nextcloud 18, it 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://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE. -- Here you go :) You should be able to create new type of documents and open them. - -*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) - ## Documentation and resources * Official app website: From d22f93579463ca3f085881aea259f5e712186949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Feb 2023 08:02:59 +0100 Subject: [PATCH 031/195] Update manifest.toml Co-authored-by: Alexandre Aubin --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 1dacfb95..71ee1a9e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,7 +61,7 @@ ram.runtime = "512M" [resources.permissions] main.url = "/" - api.url = "re:$domain\\/.well-known\\/.*" + api.url = "re:__DOMAIN__\\/.well-known\\/.*" api.auth_header = false api.show_tile = false api.protected= true From a632a82803135eecc8b8daf5d7a5a47a5751a373 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 16 Feb 2023 09:05:36 +0100 Subject: [PATCH 032/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 71ee1a9e..e92a856d 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 = ">= 11.1.6" +yunohost = ">= 11.1.7" architectures = ["amd64", "arm64"] multi_instance = true ldap = true From 924fbe7b4bc6dcd0623333abceb82d75415bfe2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Feb 2023 21:23:55 +0100 Subject: [PATCH 033/195] cleaning --- doc/{POST_INSTALL.md => ADMIN.md} | 0 doc/{POST_INSTALL_fr.md => ADMIN_fr.md} | 0 scripts/change_url | 2 -- 3 files changed, 2 deletions(-) rename doc/{POST_INSTALL.md => ADMIN.md} (100%) rename doc/{POST_INSTALL_fr.md => ADMIN_fr.md} (100%) diff --git a/doc/POST_INSTALL.md b/doc/ADMIN.md similarity index 100% rename from doc/POST_INSTALL.md rename to doc/ADMIN.md diff --git a/doc/POST_INSTALL_fr.md b/doc/ADMIN_fr.md similarity index 100% rename from doc/POST_INSTALL_fr.md rename to doc/ADMIN_fr.md diff --git a/scripts/change_url b/scripts/change_url index 8a42c1d2..049f30d4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -19,8 +19,6 @@ old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN new_path=$YNH_APP_NEW_PATH -app=$YNH_APP_INSTANCE_NAME - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From adbb8e7d122264344ac9c2e298806389079349da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Feb 2023 21:25:21 +0100 Subject: [PATCH 034/195] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index e92a856d..b7c04d17 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "512M" type = "user" [install.init_main_permission] - help.en = "Set to 'visitors', Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." - help.fr = "Défini sur 'visiteurs', Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." + help.en = "Set to 'Visitors', Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." + help.fr = "Défini sur 'Visiteurs', Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." type = "group" default = "visitors" From 3fa4fadf419ddf0523f95b0353bc955628b76db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:23:15 +0100 Subject: [PATCH 035/195] fix --- manifest.toml | 2 +- scripts/change_url | 78 +--------------------------------------------- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/manifest.toml b/manifest.toml index b7c04d17..a4813091 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 = ">= 11.1.7" +yunohost = ">= 11.1.10" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/change_url b/scripts/change_url index 049f30d4..7e9fd35f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,79 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # SPECIFIC MODIFICATIONS @@ -116,15 +49,6 @@ then fi fi -#================================================= -# GENERIC FINALISATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From 71a4b662dc270e1dfa266ed1be88bd62098aadd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:24:05 +0100 Subject: [PATCH 036/195] Update install --- scripts/install | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/install b/scripts/install index bc2646af..0c27b127 100755 --- a/scripts/install +++ b/scripts/install @@ -9,19 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -user_home=$YNH_APP_ARG_USER_HOME -phpversion=$YNH_PHP_VERSION - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." - -ynh_app_setting_set --app=$app --key=user_home --value=$user_home maintenance_mode=0 ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode From 3b4108eac2c16552ceb313d66fcec7601e007d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:24:36 +0100 Subject: [PATCH 037/195] Update upgrade --- scripts/upgrade | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4e0c8363..0fc7c910 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,13 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=3 - -user_home=$(ynh_app_setting_get --app=$app --key=user_home) - #================================================= # CHECK VERSION #================================================= From 921cf1ac1f5b8d220309bf87d4a0e90640e4bb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:25:33 +0100 Subject: [PATCH 038/195] Update _common.sh --- scripts/_common.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index f90cf7bf..65de7f20 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -42,7 +42,6 @@ is_url_handled() { fi } - #================================================= # Check available space before creating a temp directory. From 80000fc87db13177b5373b7dad5649a369b4ff5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:25:36 +0100 Subject: [PATCH 039/195] Update tests.toml --- tests.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests.toml b/tests.toml index be2ac19c..44dd5980 100644 --- a/tests.toml +++ b/tests.toml @@ -2,12 +2,6 @@ test_format = 1.0 [default] - # ------------------------------- - # Default args to use for install - # ------------------------------- - - args.user_home= "yes" - # ------------------------------- # Commits to test upgrade from # ------------------------------- From 4735b446a5663d01bac7986affc63fc3a9f38229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 22 Feb 2023 18:19:46 +0100 Subject: [PATCH 040/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a4813091..6d1725e9 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 = "25.0.1~ynh1" +version = "25.0.3~ynh3" maintainers = ["kay0u"] From b952901df31fc5a402b5e8fd046e22fd4c0f0657 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 22 Feb 2023 17:19:52 +0000 Subject: [PATCH 041/195] 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 88dc3739..f830729a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 25.0.1~ynh1 +**Shipped version:** 25.0.3~ynh3 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index c906514c..b3a7c16e 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 :** 25.0.1~ynh1 +**Version incluse :** 25.0.3~ynh3 **Démo :** https://demo.nextcloud.com/ From 12f4ac17fff6953aec522179ead0155690c6e8c7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 23 Feb 2023 14:34:36 +0000 Subject: [PATCH 042/195] 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 85f8a913..f830729a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 25.0.4~ynh1 +**Shipped version:** 25.0.3~ynh3 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index d4ef283b..b3a7c16e 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 :** 25.0.4~ynh1 +**Version incluse :** 25.0.3~ynh3 **Démo :** https://demo.nextcloud.com/ From 28e39750d5b5d9776de3971141079f8e1889348f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:52:57 +0100 Subject: [PATCH 043/195] Update manifest.toml --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6d1725e9..8f7ba691 100644 --- a/manifest.toml +++ b/manifest.toml @@ -67,8 +67,8 @@ ram.runtime = "512M" api.protected= true api.allowed = ["visitors", "all_users"] - [resources.database] - type = "mysql" - [resources.apt] - packages = "imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" + packages = "mariadb-server imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" + + [resources.database] + type = "mysql" \ No newline at end of file From c2d5eb88e414cb2c9925c986fb769398f2525a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 23 Feb 2023 23:41:40 +0100 Subject: [PATCH 044/195] Update manifest.toml --- manifest.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8f7ba691..6f7fc66d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -68,7 +68,8 @@ ram.runtime = "512M" api.allowed = ["visitors", "all_users"] [resources.apt] - packages = "mariadb-server imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php8.1-fpm php8.1-bz2 php8.1-imap php8.1-gmp php8.1-gd php8.1-intl php8.1-curl php8.1-apcu php8.1-redis php8.1-ldap php8.1-imagick php8.1-zip php8.1-mbstring php8.1-xml php8.1-mysql php8.1-igbinary php8.1-bcmath" + packages = "mariadb-server, imagemagick, libmagickcore-6.q16-6-extra, acl, tar, smbclient, at, php8.1-fpm, php8.1-bz2, php8.1-imap, php8.1-gmp, php8.1-gd, php8.1-intl, php8.1-curl, php8.1-apcu, php8.1-redis, php8.1-ldap, php8.1-imagick, php8.1-zip, php8.1-mbstring, php8.1-xml, php8.1-mysql, php8.1-igbinary, php8.1-bcmath" [resources.database] - type = "mysql" \ No newline at end of file + type = "mysql" + \ No newline at end of file From ec95a9dfbaac360455dbc547711c41012395a7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Feb 2023 13:17:10 +0100 Subject: [PATCH 045/195] Update upgrade --- scripts/upgrade | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0fc7c910..a449a53c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,31 +55,31 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 - -# Made a backup only after the version 11.0.0 -# Before, the datas will be always saved. -# Get the current version number of nextcloud/owncloud -current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) -current_major_version=${current_version%%.*} - -if [ $current_major_version -gt 11 ] -then - # Inform the backup/restore process that it should not save the data directory - # Use only for the previous backup script that doesn't set 'is_big' - ynh_app_setting_set --app=$app --key=backup_core_only --value=1 - - # Backup the current version of the app - ynh_backup_before_upgrade - - # Remove the option backup_core_only after the backup. - ynh_app_setting_delete $app backup_core_only - - ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup - } -fi +# ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 + +# # Made a backup only after the version 11.0.0 +# # Before, the datas will be always saved. +# # Get the current version number of nextcloud/owncloud +# current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) +# current_major_version=${current_version%%.*} + +# if [ $current_major_version -gt 11 ] +# then +# # Inform the backup/restore process that it should not save the data directory +# # Use only for the previous backup script that doesn't set 'is_big' +# ynh_app_setting_set --app=$app --key=backup_core_only --value=1 + +# # Backup the current version of the app +# ynh_backup_before_upgrade + +# # Remove the option backup_core_only after the backup. +# ynh_app_setting_delete $app backup_core_only + +# ynh_clean_setup () { +# # restore it if the upgrade fails +# ynh_restore_upgradebackup +# } +# fi #================================================= # PHP-FPM CONFIGURATION From b6241122b10b4f36735021401454c060fd6c9f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 26 Feb 2023 11:11:30 +0100 Subject: [PATCH 046/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6f7fc66d..e4b6846b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -25,7 +25,7 @@ multi_instance = true ldap = true sso = true disk = "50M" -ram.build = "128M" +ram.build = "300M" ram.runtime = "512M" [install] From e51db0d9f0a727debbe1c730c65f927bfaf60553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 09:47:34 +0100 Subject: [PATCH 047/195] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index e4b6846b..cbd84731 100644 --- a/manifest.toml +++ b/manifest.toml @@ -40,8 +40,8 @@ ram.runtime = "512M" type = "user" [install.init_main_permission] - help.en = "Set to 'Visitors', Nextcloud will be accessible by Nextcloud Desktop and by users without a YunoHost account. This can be changed later in the webadmin." - help.fr = "Défini sur 'Visiteurs', Nextcloud sera accessible par Nextcloud Desktop et par les utilisateurs n’ayant pas de compte YunoHost. Vous pourrez changer dans la webadmin." + help.en = "You must activate 'Visitors' if you want to connect Nextcloud Desktop client to Nextcloud server. This can be changed later via the webadmin." + help.fr = "Vous devez activer 'Visiteurs' si vous souhaitez connecter le client Nextcloud Desktop au serveur Nextcloud. Cela peut être modifié ultérieurement via l'administrateur Web." type = "group" default = "visitors" From fcfed88b838690267280e2e6fd7d1e5b8db0bf5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:07:33 +0100 Subject: [PATCH 048/195] cleaning --- conf/nginx.conf | 2 +- manifest.toml | 2 +- scripts/_common.sh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 836c1609..c5faddd5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -76,7 +76,7 @@ location ^~ __PATH__/ { } # Rules borrowed from `.htaccess` to hide certain paths from clients - location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } + location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } location ~ ^__PATH__/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; } # Ensure this block, which passes PHP files to the PHP process, is above the blocks diff --git a/manifest.toml b/manifest.toml index cbd84731..d7c3833d 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 = ">= 11.1.10" +yunohost = ">= 11.1.13" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/_common.sh b/scripts/_common.sh index 65de7f20..19e6a36f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.1" - #================================================= # EXPERIMENTAL HELPERS #================================================= From 013d6962da8ada955e7eaf6419718340b5df1cf8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 8 Mar 2023 09:09:15 +0000 Subject: [PATCH 049/195] 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 8ab537fb..f830729a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 25.0.4~ynh2 +**Shipped version:** 25.0.3~ynh3 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 42ea8e27..b3a7c16e 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 :** 25.0.4~ynh2 +**Version incluse :** 25.0.3~ynh3 **Démo :** https://demo.nextcloud.com/ From e99bce0db663355ed00448c75b91597f1d3edf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:12:29 +0100 Subject: [PATCH 050/195] Update install --- scripts/install | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/scripts/install b/scripts/install index dc8217f1..e4527727 100755 --- a/scripts/install +++ b/scripts/install @@ -15,26 +15,24 @@ source _ynh_mysql_connect_as.sh #================================================= maintenance_mode=0 -ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode +fpm_footprint="high" +fpm_free_footprint=0 +fpm_usage="medium" #================================================= -# STANDARD MODIFICATIONS -#================================================= -# INSTALL DEPENDENCIES +# STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=10 +ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_install_app_dependencies $pkg_dependencies +ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=2 - -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name +ynh_script_progression --message="Migrate MySQL database to utf8..." --weight=2 ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" @@ -66,14 +64,6 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=50 -fpm_footprint="high" -fpm_free_footprint=0 -fpm_usage="medium" - -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage - # Create a dedicated php-fpm config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION From f63eb34d6e9bdd5764cec236bbdccdf1795a0ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:13:29 +0100 Subject: [PATCH 051/195] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e4527727..b82bc1f4 100755 --- a/scripts/install +++ b/scripts/install @@ -269,7 +269,7 @@ chmod 750 $install_dir #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." +ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) ynh_use_logrotate --logfile="$data_dir/nextcloud.log" From 6de704c9332c9a3fee01216dab02a59a4e9519b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Mar 2023 10:14:40 +0100 Subject: [PATCH 052/195] Update upgrade --- scripts/upgrade | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d8190a32..faef6570 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -52,35 +52,6 @@ if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -# ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 - -# # Made a backup only after the version 11.0.0 -# # Before, the datas will be always saved. -# # Get the current version number of nextcloud/owncloud -# current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) -# current_major_version=${current_version%%.*} - -# if [ $current_major_version -gt 11 ] -# then -# # Inform the backup/restore process that it should not save the data directory -# # Use only for the previous backup script that doesn't set 'is_big' -# ynh_app_setting_set --app=$app --key=backup_core_only --value=1 - -# # Backup the current version of the app -# ynh_backup_before_upgrade - -# # Remove the option backup_core_only after the backup. -# ynh_app_setting_delete $app backup_core_only - -# ynh_clean_setup () { -# # restore it if the upgrade fails -# ynh_restore_upgradebackup -# } -# fi - #================================================= # PHP-FPM CONFIGURATION #================================================= From fbd384ac4b3b231e0fe76b9377c3913726d48878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Mar 2023 13:30:43 +0100 Subject: [PATCH 053/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d7c3833d..6c879b5a 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 = ">= 11.1.13" +yunohost = ">= 11.1.15" architectures = ["amd64", "arm64"] multi_instance = true ldap = true From 1207ba8173d2771c8f2e344d6b0549ed6847441d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Mar 2023 18:08:46 +0000 Subject: [PATCH 054/195] 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 8d87a258..f830729a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 26.0.0~ynh1 +**Shipped version:** 25.0.3~ynh3 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 9ab0c160..b3a7c16e 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 :** 26.0.0~ynh1 +**Version incluse :** 25.0.3~ynh3 **Démo :** https://demo.nextcloud.com/ From 96795c360cfada4f3d53a0e122475200fa5260da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 21 Mar 2023 19:13:19 +0100 Subject: [PATCH 055/195] add custom adress --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index a6d67111..2feddbb2 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -6,7 +6,7 @@ Starting from Nextcloud 18, it features a direct integration of ONLYOFFICE (an o 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://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE. +- Then in Settings -> ONLYOFFICE (`https://__DOMAIN__/__PATH__/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE. - Here you go :) You should be able to create new type of documents and open them. *NB: ONLYOFFICE Nextcloud App is only available for x86 architecture - for **ARM** architecture (Raspberry Pi, OLinuXino...), consider the YunoHost App below* diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 21100000..4977f09c 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -6,7 +6,7 @@ Pour l'installer et la configurer : - Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE. - Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur ONLYOFFICE. -- Ensuite dans les Paramètres -> ONLYOFFICE (`https://yourdomain.tld/nextcloud/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec 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. - Et voilà :) Vous devriez pouvoir créer de nouveaux types de documents, et les ouvrir. *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* From c0b65a47fb4a7763360677a508bac15b8b4fc97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 22 Mar 2023 08:11:58 +0100 Subject: [PATCH 056/195] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b82bc1f4..1669646a 100755 --- a/scripts/install +++ b/scripts/install @@ -280,7 +280,7 @@ ynh_use_logrotate --logfile="$data_dir/nextcloud.log" ynh_script_progression --message="Configuring Fail2Ban..." --weight=8 # Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 +ynh_add_fail2ban_config --logpath="$data_dir/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 #================================================= # END OF SCRIPT From a4c6e3a88f1bf63121cd203601ba90f713df656d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 22 Mar 2023 08:13:50 +0100 Subject: [PATCH 057/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6c879b5a..14c9081c 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 = "25.0.3~ynh3" +version = "26.0.0~ynh1" maintainers = ["kay0u"] From c9490c64ecacae98a9df9ca09b494b4c664b85ed Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 22 Mar 2023 07:13:55 +0000 Subject: [PATCH 058/195] 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 f830729a..8d87a258 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 25.0.3~ynh3 +**Shipped version:** 26.0.0~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index b3a7c16e..9ab0c160 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 :** 25.0.3~ynh3 +**Version incluse :** 26.0.0~ynh1 **Démo :** https://demo.nextcloud.com/ From f533c1a45f4e66aca1718aea706567d57fac86f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:49:23 +0200 Subject: [PATCH 059/195] cleaning --- manifest.toml | 2 +- scripts/install | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 14c9081c..1a7f29a1 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 = ">= 11.1.15" +yunohost = ">= 11.1.16" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/install b/scripts/install index 1669646a..878907eb 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,6 @@ fpm_usage="medium" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint From 256ba0a33cf94ae2e8be47fc937b7fc0873667bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 23 Apr 2023 14:02:51 +0200 Subject: [PATCH 060/195] 26.0.1 --- manifest.toml | 4 ++-- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1a7f29a1..ef5674d6 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 = "26.0.0~ynh1" +version = "26.0.1~ynh1" maintainers = ["kay0u"] @@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.18" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index fedd8f19..3819cd9e 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="26.0.0" +next_version="26.0.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="f163150363aee9366ecb5cd5259bf6756ed4f073cea78b5fa515cada7a0d0c3d" +nextcloud_source_sha256="6f9c6a1248d7c8af4ad473d73a42565f6adabad4531c5cfa57bc3497b2b64f48" From 08817785ab38564492879e2a58d4ee8651863d86 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 23 Apr 2023 12:02:55 +0000 Subject: [PATCH 061/195] 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 8d87a258..5e6eac55 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 26.0.0~ynh1 +**Shipped version:** 26.0.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 9ab0c160..ec220641 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 :** 26.0.0~ynh1 +**Version incluse :** 26.0.1~ynh1 **Démo :** https://demo.nextcloud.com/ From 30a649c520951057f3efd2ab74241bb25bc1a16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 09:02:20 +0200 Subject: [PATCH 062/195] 26.0.2 --- manifest.toml | 4 ++-- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index ef5674d6..9edf5470 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 = "26.0.1~ynh1" +version = "26.0.2~ynh1" maintainers = ["kay0u"] @@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 11.1.18" +yunohost = ">= 11.1.19" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 3819cd9e..ba24f4f0 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="26.0.1" +next_version="26.0.2" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="6f9c6a1248d7c8af4ad473d73a42565f6adabad4531c5cfa57bc3497b2b64f48" +nextcloud_source_sha256="f3db0ec5e0aaff7c088eb34f752d77d79913bc6784e0fc47a84cdaa28e567a33" From 57c0e38746b799d71be9dd46c42e448d72b7787d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 May 2023 07:02:25 +0000 Subject: [PATCH 063/195] 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 5e6eac55..43281fc9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 26.0.1~ynh1 +**Shipped version:** 26.0.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index ec220641..173f9a50 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 :** 26.0.1~ynh1 +**Version incluse :** 26.0.2~ynh1 **Démo :** https://demo.nextcloud.com/ From 03fd05668922ad23c727daa04270d840296060e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:12:19 +0200 Subject: [PATCH 064/195] Update nginx.conf --- conf/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 629a7914..1f8b965f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -104,6 +104,11 @@ location ^~ __PATH__/ { fastcgi_request_buffering off; } + location ~ ^/(?:updater|oc[ms]-provider)(?:$|/) { + try_files $uri/ =404; + index index.php; + } + location ~ \.(?:css|js|svg|gif)$ { try_files $uri / __PATH__/index.php$request_uri; expires 6M; # Cache-Control policy borrowed from `.htaccess` From 0a8bf02da85f8e84c3b102a7d7a2735400ac2059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:30:41 +0200 Subject: [PATCH 065/195] fix data_dir --- manifest.toml | 1 + scripts/install | 18 +++++++++--------- scripts/restore | 24 ++++-------------------- scripts/upgrade | 6 +++--- 4 files changed, 17 insertions(+), 32 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9edf5470..b0cd3431 100644 --- a/manifest.toml +++ b/manifest.toml @@ -57,6 +57,7 @@ ram.runtime = "512M" [resources.install_dir] [resources.data_dir] + subdirs = ["data"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 878907eb..2423baf4 100755 --- a/scripts/install +++ b/scripts/install @@ -63,8 +63,8 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=50 -# Create a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION +# Create a dedicated PHP-FPM config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint #================================================= # NGINX CONFIGURATION @@ -107,7 +107,7 @@ exec_occ maintenance:install \ --database "mysql" --database-name $db_name \ --database-user $db_user --database-pass "$db_pwd" \ --admin-user "admin" --admin-pass "$admin_password" \ - --data-dir "$data_dir" \ + --data-dir "$data_dir/data" \ || ynh_die --message="Unable to install Nextcloud" #================================================= @@ -158,10 +158,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 data_dir="$1" + local data_dir/data="$1" local mount_name="$2" local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir" || true` + "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir/data" || true` ! [[ $mount_id =~ ^[0-9]+$ ]] \ && ynh_print_warn --message="Unable to create external storage" \ || exec_occ files_external:option "$mount_id" enable_sharing true @@ -259,8 +259,8 @@ chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -0 chmod 0644 find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir @@ -271,7 +271,7 @@ chmod 750 $install_dir ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) -ynh_use_logrotate --logfile="$data_dir/nextcloud.log" +ynh_use_logrotate --logfile="$data_dir/data/nextcloud.log" #================================================= # SETUP FAIL2BAN @@ -279,7 +279,7 @@ ynh_use_logrotate --logfile="$data_dir/nextcloud.log" ynh_script_progression --message="Configuring Fail2Ban..." --weight=8 # Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="$data_dir/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 +ynh_add_fail2ban_config --logpath="$data_dir/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 36df4519..d37161d1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,14 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers source ../settings/scripts/_ynh_mysql_connect_as.sh -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading settings..." - -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -32,11 +24,6 @@ ynh_restore_file --origin_path="$install_dir" #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=9 -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd -ynh_mysql_connect_as --user=$db_name --password="$db_pwd" --database=$db_name \ - <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" - ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name --default_character_set="utf8mb4" < ./db.sql #================================================= @@ -47,9 +34,6 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50 # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion - #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= @@ -87,7 +71,7 @@ ynh_script_progression --message="Restoring data directory..." --weight=2 # 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="$data_dir" --not_mandatory -mkdir -p "$data_dir" +chown -R $app:www-data "$data_dir" #================================================= # RESTORE USER RIGHTS @@ -98,8 +82,8 @@ chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -0 chmod 0644 find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir @@ -107,7 +91,7 @@ chmod 750 $install_dir # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories for u in $(ynh_user_list); do - mkdir -p "$data_dir/$u" + mkdir -p "$data_dir/data/$u" setfacl --modify g:$app:rwx "/home/$u" || true done diff --git a/scripts/upgrade b/scripts/upgrade index faef6570..f508d3fb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,7 +121,7 @@ local mount_id=$(exec_occ files_external:create --output=json \ || exec_occ files_external:option "$mount_id" enable_sharing true } # Define app's data directory -data_dir="/home/yunohost.app/$app/data" +#data_dir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -342,8 +342,8 @@ chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" find $install_dir/ -type f -print0 | xargs -0 chmod 0644 find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/ -type d -print0 | xargs -0 chmod 0750 +find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir From 632c21395480b05d7d926184d6522ecbeff8b757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:31:33 +0200 Subject: [PATCH 066/195] Update config_install.json --- conf/config_install.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config_install.json b/conf/config_install.json index adb8a6de..616c276e 100644 --- a/conf/config_install.json +++ b/conf/config_install.json @@ -1,6 +1,6 @@ { "system": { - "datadirectory": "__DATA_DIR__", + "datadirectory": "__DATA_DIR__/data/", "trusted_domains": [ "localhost", "__DOMAIN__" From 2efa3bf776b8a2074224e51f9629cc4a227d17e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:56:40 +0200 Subject: [PATCH 067/195] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2423baf4..5a97f26a 100755 --- a/scripts/install +++ b/scripts/install @@ -158,7 +158,7 @@ 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 data_dir/data="$1" + local data_dir="$1" local mount_name="$2" local mount_id=`exec_occ files_external:create --output=json \ "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir/data" || true` From 825e67001fd8a4cf651608e3adfccbf9a7247a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 11:52:18 +0200 Subject: [PATCH 068/195] Update restore --- scripts/restore | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index d37161d1..10825016 100755 --- a/scripts/restore +++ b/scripts/restore @@ -71,8 +71,6 @@ ynh_script_progression --message="Restoring data directory..." --weight=2 # 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="$data_dir" --not_mandatory -chown -R $app:www-data "$data_dir" - #================================================= # RESTORE USER RIGHTS #================================================= @@ -91,7 +89,7 @@ chmod 750 $install_dir # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories for u in $(ynh_user_list); do - mkdir -p "$data_dir/data/$u" + mkdir -p "$data_dir/$u" setfacl --modify g:$app:rwx "/home/$u" || true done @@ -114,7 +112,7 @@ ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" # Make sure a log file exists (mostly for CI tests) -logfile="/home/yunohost.app/$app/data/nextcloud.log" +logfile="$data_dir/data/nextcloud.log" if [ ! -f "$logfile" ]; then touch "$logfile" chown $app: "$logfile" From 1fd145e59860b4bdd313b75ffccc5f5524a65f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 11:55:04 +0200 Subject: [PATCH 069/195] Update upgrade --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f508d3fb..df854d09 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,6 +93,9 @@ ynh_add_nginx_config # VERSION TO THE NEXT ONE #================================================= +current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) +current_major_version=${current_version%%.*} + # Define a function to execute commands with `occ` exec_occ() { # Backward compatibility to upgrade from older versions From 4854ab4ab5049efb1345cfe2616329eae0719758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 13:13:32 +0200 Subject: [PATCH 070/195] Update restore --- scripts/restore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/restore b/scripts/restore index 10825016..3dde00f1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,6 +34,9 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50 # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +# Recreate a dedicated php-fpm config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion + #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= From 4d481f7fdea618c76a052de00a3760c3855d8bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:55:28 +0200 Subject: [PATCH 071/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b0cd3431..2d7f4e99 100644 --- a/manifest.toml +++ b/manifest.toml @@ -69,7 +69,7 @@ ram.runtime = "512M" api.allowed = ["visitors", "all_users"] [resources.apt] - packages = "mariadb-server, imagemagick, libmagickcore-6.q16-6-extra, acl, tar, smbclient, at, php8.1-fpm, php8.1-bz2, php8.1-imap, php8.1-gmp, php8.1-gd, php8.1-intl, php8.1-curl, php8.1-apcu, php8.1-redis, php8.1-ldap, php8.1-imagick, php8.1-zip, php8.1-mbstring, php8.1-xml, php8.1-mysql, php8.1-igbinary, php8.1-bcmath" + packages = "mariadb-server, imagemagick, libmagickcore-6.q16-6-extra, acl, tar, smbclient, at, php8.2-fpm, php8.2-bz2, php8.2-imap, php8.2-gmp, php8.2-gd, php8.2-intl, php8.2-curl, php8.2-apcu, php8.2-redis, php8.2-ldap, php8.2-imagick, php8.2-zip, php8.2-mbstring, php8.2-xml, php8.2-mysql, php8.2-igbinary, php8.2-bcmath" [resources.database] type = "mysql" From 5dc1603ca8a6b8d67fdad84035c4b11f4b01b1be Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 3 Jun 2023 06:43:42 +0000 Subject: [PATCH 072/195] 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 a59e1645..43281fc9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 26.0.2~ynh2 +**Shipped version:** 26.0.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index fa3384da..173f9a50 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 :** 26.0.2~ynh2 +**Version incluse :** 26.0.2~ynh1 **Démo :** https://demo.nextcloud.com/ 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 073/195] 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 00000000..d23beb4b --- /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 8f9ded52cc0712967ed5bd6ea9cbb4b58c1ceb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 09:47:07 +0200 Subject: [PATCH 074/195] removing actions --- actions.toml | 17 ----------------- manifest.toml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 actions.toml diff --git a/actions.toml b/actions.toml deleted file mode 100644 index fc6cb0fc..00000000 --- a/actions.toml +++ /dev/null @@ -1,17 +0,0 @@ -[disable_maintenance] -name = "Disable the maintenance mode of Nextcloud" -command = "/bin/bash scripts/actions/disable_maintenance" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Disable the maintenance mode of Nextcloud if you're stuck after an upgrade" - -[add_multimedia_directories] -name = "Add multimedia directories" -command = "/bin/bash scripts/actions/add_multimedia_directories" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Add the multimedia and shared multimedia directories again" diff --git a/manifest.toml b/manifest.toml index 2d7f4e99..dafd7e53 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 = ">= 11.1.19" +yunohost = ">= 11.1.20" architectures = ["amd64", "arm64"] multi_instance = true ldap = true From 3274b1cf079e77cae9ae129e489f41b1056ad1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:03:29 +0200 Subject: [PATCH 075/195] remove actions --- scripts/actions/add_multimedia_directories | 66 ---------------------- scripts/actions/disable_maintenance | 52 ----------------- 2 files changed, 118 deletions(-) delete mode 100755 scripts/actions/add_multimedia_directories delete mode 100755 scripts/actions/disable_maintenance diff --git a/scripts/actions/add_multimedia_directories b/scripts/actions/add_multimedia_directories deleted file mode 100755 index f6160195..00000000 --- a/scripts/actions/add_multimedia_directories +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source scripts/_common.sh -source /usr/share/yunohost/helpers - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -app=$YNH_APP_INSTANCE_NAME - -install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# CHECK IF ARGUMENTS ARE CORRECT -#================================================= - -#================================================= -# DEFINE FUNCTION -#================================================= - -# Define a function to execute commands with `occ` -exec_occ() { - (cd "$install_dir" && exec_as "$app" \ - php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") -} - -# Define a function to add an external storage -# Create the external storage for the given folders and enable sharing -create_external_storage() { -local datadir="$1" -local mount_name="$2" -local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$datadir" || true` -! [[ $mount_id =~ ^[0-9]+$ ]] \ - && ynh_print_warn --message="Unable to create external storage" \ - || exec_occ files_external:option "$mount_id" enable_sharing true -} - -#================================================= -# SPECIFIC ACTION -#================================================= -# YUNOHOST MULTIMEDIA INTEGRATION -#================================================= -ynh_script_progression --message="Updating multimedia directories..." --weight=6 - -# 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 - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Execution completed" --last diff --git a/scripts/actions/disable_maintenance b/scripts/actions/disable_maintenance deleted file mode 100755 index e56fd5b1..00000000 --- a/scripts/actions/disable_maintenance +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source scripts/_common.sh -source /usr/share/yunohost/helpers - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -app=$YNH_APP_INSTANCE_NAME - -install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# CHECK IF ARGUMENTS ARE CORRECT -#================================================= - -#================================================= -# CHECK IF AN ACTION HAS TO BE DONE -#================================================= - -# Check the current status of the maintenance mode - -if [ "$(grep "maintenance" "$install_dir/config/config.php" | awk '{print $3}' | cut -d',' -f1)" != "true" ] -then - ynh_die --message="Nextcloud isn't currently under maintenance." --ret_code=0 -fi - -#================================================= -# SPECIFIC ACTION -#================================================= -# DISABLE THE MAINTENANCE MODE -#================================================= - -ynh_script_progression --message="Disabling maintenance mode..." --weight=3 - -( -cd "$install_dir" && exec_as "$app" \ - php$YNH_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode --off -) - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Execution completed" --last From 6b192d01e39ef3b89b37aa4f322212e32a099de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:11:11 +0200 Subject: [PATCH 076/195] cleaning --- scripts/change_url | 2 +- scripts/install | 6 +++--- scripts/remove | 32 +++++--------------------------- 3 files changed, 9 insertions(+), 31 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 7e9fd35f..156db53f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -19,7 +19,7 @@ ynh_change_url_nginx_config #================================================= # SPECIFIC MODIFICATIONS #================================================= -ynh_script_progression --message="Applying Nextcloud specific modifications..." --weight=2 +ynh_script_progression --message="Applying $app specific modifications..." --weight=2 # Define a function to execute commands with `occ` exec_occ() { diff --git a/scripts/install b/scripts/install index 5a97f26a..ccfde361 100755 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression --message="Setting up source files..." --weight=5 # Load the last available version source upgrade.d/upgrade.last.sh @@ -86,7 +86,7 @@ ynh_add_nginx_config #================================================= # INSTALL NEXTCLOUD #================================================= -ynh_script_progression --message="Installing Nextcloud..." --weight=30 +ynh_script_progression --message="Installing $app..." --weight=30 # Define a function to execute commands with `occ` exec_occ() { @@ -113,7 +113,7 @@ exec_occ maintenance:install \ #================================================= # CONFIGURE NEXTCLOUD #================================================= -ynh_script_progression --message="Configuring Nextcloud..." --weight=8 +ynh_script_progression --message="Configuring $app..." --weight=8 # Set the mysql.utf8mb4 config to true in config.php exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true" diff --git a/scripts/remove b/scripts/remove index 0d0ff5b5..d09cafef 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,51 +10,29 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." +# REMOVE SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=5 # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." - # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= -ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8 - # Remove the dedicated Fail2Ban config ynh_remove_fail2ban_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE THE CRON FILE -#================================================= - # Remove a cron file # TODO: Ensure that cron job is not running (How !?) ynh_secure_remove --file="/etc/cron.d/$app" -#================================================= -# CLEAN ACL IN HOME DIRECTORIES -#================================================= - +# Cleaning ACL in home directories for i in $(ls /home); do # Clean ACL in every directories in /home, except those which start with 'yunohost.' [[ ! $i == yunohost.* ]] \ From 94d52546eec8146479a0efe6560a4ace57d5eb3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:14:41 +0200 Subject: [PATCH 077/195] Update backup --- scripts/backup | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/backup b/scripts/backup index fc09803e..924f0bd3 100755 --- a/scripts/backup +++ b/scripts/backup @@ -39,13 +39,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP THE MYSQL DATABASE -#================================================= -ynh_print_info --message="Backing up the MySQL database..." - -ynh_mysql_dump_db --database="$db_name" --default_character_set="utf8mb4" > db.sql - #================================================= # SPECIFIC BACKUP #================================================= @@ -72,7 +65,7 @@ ynh_backup --src_path="/etc/cron.d/$app" #================================================= ynh_print_info --message="Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_mysql_dump_db --database="$db_name" --default_character_set="utf8mb4" > db.sql #================================================= # END OF SCRIPT From c2d3b55aa10246f7d78457c25ced9deda7b1fede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:25:38 +0200 Subject: [PATCH 078/195] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index df854d09..9bc603ec 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -118,7 +118,7 @@ create_external_storage() { local data_dir="$1" local mount_name="$2" local mount_id=$(exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir" || true) + "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir/data" || 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 c06a59c7ab3b06859eefbb87276abcb13a9ad191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:35:44 +0200 Subject: [PATCH 079/195] cleaning --- scripts/upgrade | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9bc603ec..3554a9de 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,8 +123,6 @@ 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 -#data_dir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -188,7 +186,7 @@ then # Load the value for this version source upgrade.d/upgrade.$current_major_version.sh - ynh_print_info --message="Upgrade to nextcloud $next_version" + ynh_print_info --message="Upgrade to Nextcloud $next_version" # Create an app.src for this version of Nextcloud cat > ../conf/app.src << EOF From 6cdfbf5fc5d24bffe3a85caa6502fa47e20b5980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 11:24:45 +0200 Subject: [PATCH 080/195] Update _common.sh --- scripts/_common.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 19e6a36f..8e445c12 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,19 @@ # EXPERIMENTAL HELPERS #================================================= +# Define a function to add an external storage +# Create the external storage for the given folders and enable sharing +create_external_storage() { +local datadir="$1" +local mount_name="$2" +local mount_id=`exec_occ files_external:create --output=json \ + "$mount_name" 'local' 'null::null' -c "datadir=$datadir/data" || true` +! [[ $mount_id =~ ^[0-9]+$ ]] \ + && ynh_print_warn --message="Unable to create external storage" \ + || exec_occ files_external:option "$mount_id" enable_sharing true +} + + # Check if an URL is already handled # usage: is_url_handled --domain=DOMAIN --path=PATH_URI is_url_handled() { From 444e6ce4a43004b7b71bf6cc739fe79ec943e367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 11:26:32 +0200 Subject: [PATCH 081/195] Update _common.sh --- scripts/_common.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8e445c12..19e6a36f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,19 +8,6 @@ # EXPERIMENTAL HELPERS #================================================= -# Define a function to add an external storage -# Create the external storage for the given folders and enable sharing -create_external_storage() { -local datadir="$1" -local mount_name="$2" -local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "datadir=$datadir/data" || true` -! [[ $mount_id =~ ^[0-9]+$ ]] \ - && ynh_print_warn --message="Unable to create external storage" \ - || exec_occ files_external:option "$mount_id" enable_sharing true -} - - # Check if an URL is already handled # usage: is_url_handled --domain=DOMAIN --path=PATH_URI is_url_handled() { From 2079c31ff2273d6a30c013ca92cd05a29949ccfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 11:37:06 +0200 Subject: [PATCH 082/195] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index ccfde361..ce873af5 100755 --- a/scripts/install +++ b/scripts/install @@ -158,10 +158,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 data_dir="$1" + local datadir="$1" local mount_name="$2" local mount_id=`exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir/data" || true` + "$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || 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 00583a61613e42e9efd78439bd1bfa634eb3291b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 11:40:01 +0200 Subject: [PATCH 083/195] Update upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3554a9de..5c085d40 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,10 +115,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 data_dir="$1" +local datadir="$1" local mount_name="$2" local mount_id=$(exec_occ files_external:create --output=json \ - "$mount_name" 'local' 'null::null' -c "data_dir=$data_dir/data" || true) + "$mount_name" 'local' 'null::null' -c "datadir=$data_dir/data" || 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 8dfe74737b7f6c6a124c32047d4683c0a9579a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:19:16 +0200 Subject: [PATCH 084/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index dafd7e53..58d7a39c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -25,7 +25,7 @@ multi_instance = true ldap = true sso = true disk = "50M" -ram.build = "300M" +ram.build = "500M" ram.runtime = "512M" [install] From 8cecb3af05986aa824291f2f0ea0f9ec62bf3fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:36:15 +0200 Subject: [PATCH 085/195] Update upgrade --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5c085d40..64c3c7e5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,9 +99,12 @@ current_major_version=${current_version%%.*} # Define a function to execute commands with `occ` exec_occ() { # Backward compatibility to upgrade from older versions - if [ $current_major_version = "last" ] || [ $current_major_version -ge 24 ] + if [ $current_major_version = "last" ] then NEXTCLOUD_PHP_VERSION=$phpversion + elif [ $current_major_version -ge 24 ] + then + NEXTCLOUD_PHP_VERSION="8.0" elif [ $current_major_version -ge 15 ] then NEXTCLOUD_PHP_VERSION="7.4" From fc177df863606e4f1a1c7271947c0089a45bd46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 13:50:53 +0200 Subject: [PATCH 086/195] Update upgrade --- scripts/upgrade | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 64c3c7e5..5c085d40 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,12 +99,9 @@ current_major_version=${current_version%%.*} # Define a function to execute commands with `occ` exec_occ() { # Backward compatibility to upgrade from older versions - if [ $current_major_version = "last" ] + if [ $current_major_version = "last" ] || [ $current_major_version -ge 24 ] then NEXTCLOUD_PHP_VERSION=$phpversion - elif [ $current_major_version -ge 24 ] - then - NEXTCLOUD_PHP_VERSION="8.0" elif [ $current_major_version -ge 15 ] then NEXTCLOUD_PHP_VERSION="7.4" From 195de623082ff1a5b92e5f1e7706e368c8d7afdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:28:15 +0200 Subject: [PATCH 087/195] #584 --- scripts/install | 8 ++++---- scripts/restore | 8 ++++---- scripts/upgrade | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index ce873af5..85e1ca41 100755 --- a/scripts/install +++ b/scripts/install @@ -257,10 +257,10 @@ ynh_multimedia_addaccess $app # Fix app ownerships & permissions chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 +find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 +find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir diff --git a/scripts/restore b/scripts/restore index 3dde00f1..90d8fbab 100755 --- a/scripts/restore +++ b/scripts/restore @@ -81,10 +81,10 @@ ynh_restore_file --origin_path="$data_dir" --not_mandatory # Fix app ownerships & permissions chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 +find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 +find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir diff --git a/scripts/upgrade b/scripts/upgrade index 5c085d40..cd5db61b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -341,10 +341,10 @@ exec_occ background:cron # Fix app ownerships & permissions chown -R $app:www-data "$install_dir" chown -R $app: "$data_dir" -find $install_dir/ -type f -print0 | xargs -0 chmod 0644 -find $install_dir/ -type d -print0 | xargs -0 chmod 0755 -find $data_dir/data/ -type f -print0 | xargs -0 chmod 0640 -find $data_dir/data/ -type d -print0 | xargs -0 chmod 0750 +find $install_dir/ -type f -print0 | xargs -r0 chmod 0644 +find $install_dir/ -type d -print0 | xargs -r0 chmod 0755 +find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 +find $data_dir/data/ -type d -print0 | xargs -r0 chmod 0750 chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir From dce54d8f45cbac07c5ca60fce10723fa1f444a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:47:38 +0200 Subject: [PATCH 088/195] 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 156db53f..0d8a1424 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -41,7 +41,7 @@ then # Check if .well-known is available for this domain if is_url_handled --domain="$new_domain" --path="/.well-known/caldav" || is_url_handled --domain="$new_domain" --path="/.well-known/carddav" then - ynh_print_warn --message="Another app already uses the domain $new_domain to serve a caldav/carddav feature. You may encounter issues when dealing with your calendar or address book." + ynh_print_warn --message="Another app already uses the domain $new_domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." # Remove lines about .well-known/carddav and caldav with sed. sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "/etc/nginx/conf.d/$new_domain.d/$app.conf" From 2d88325ab6bfe3ec5fda545175346891a6e73f37 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 12 Jun 2023 11:17:03 +0000 Subject: [PATCH 089/195] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c38ca36f..43281fc9 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ this package: * 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:** 26.0.2~ynh3 - +**Shipped version:** 26.0.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index b2310919..173f9a50 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,8 +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 :** 26.0.2~ynh3 - +**Version incluse :** 26.0.2~ynh1 **Démo :** https://demo.nextcloud.com/ From c80b08ab36cfe6652a432df6cf16e5a80ac1f529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:55:28 +0200 Subject: [PATCH 090/195] update apps during upgrade --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index cd5db61b..30639a78 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -271,6 +271,9 @@ EOF # Enable LDAP plugin exec_occ app:enable user_ldap + # Update all installed apps + exec_occ app:update --all + # Load the config file in nextcloud exec_occ config:import "$nc_conf" From b8c87fdcecb67334913f4b1114bcbd919431b6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Jun 2023 09:29:46 +0200 Subject: [PATCH 091/195] how to CLI --- doc/ADMIN.md | 4 ++++ doc/ADMIN_fr.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 2feddbb2..297d3924 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,3 +1,7 @@ +### How to use CLI commande + +`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` + ### Configure ONLYOFFICE integration #### With Nextcloud App (no ARM support, lower performance) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 4977f09c..17a332bb 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,3 +1,7 @@ +### Comment utiliser la commande CLI + +`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` + ### Configurer l'intégration d'ONLYOFFICE #### Avec l'application Nextcloud (pas de support ARM, performances limitées) From b48cf22c278e8c28215e013cf0d0948ba3c40208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Jun 2023 09:33:16 +0200 Subject: [PATCH 092/195] cleaning --- doc/ADMIN.md | 3 +-- doc/ADMIN_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 297d3924..b72d2bb0 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -6,12 +6,11 @@ #### With Nextcloud App (no ARM support, lower performance) -Starting from Nextcloud 18, it features a direct integration of ONLYOFFICE (an online rich text document editor) through a Nextcloud app. +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. -- Here you go :) You should be able to create new type of documents and open them. *NB: ONLYOFFICE Nextcloud App is only available for x86 architecture - for **ARM** architecture (Raspberry Pi, OLinuXino...), consider the YunoHost App below* diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 17a332bb..a34ae96c 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -6,12 +6,11 @@ #### Avec l'application Nextcloud (pas de support ARM, performances limitées) -À partir de sa version 18, Nextcloud inclut une intégration directe de ONLYOFFICE (un éditeur de texte enrichi en ligne) via une application Nextcloud. +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 : - Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE. - 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. -- Et voilà :) Vous devriez pouvoir créer de nouveaux types de documents, et les ouvrir. *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* From fb61cba65100cc96c87cc04383e603e09a340609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Jun 2023 12:01:49 +0200 Subject: [PATCH 093/195] Update tests.toml --- tests.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests.toml b/tests.toml index 44dd5980..85768fa3 100644 --- a/tests.toml +++ b/tests.toml @@ -7,6 +7,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" + \ No newline at end of file From 38b2b7e965440f65cfba8c5be3e4afcea04737ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Jun 2023 13:28:52 +0200 Subject: [PATCH 094/195] 27.0.0 --- manifest.toml | 2 +- scripts/upgrade.d/upgrade.26.sh | 7 +++++++ scripts/upgrade.d/upgrade.last.sh | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 scripts/upgrade.d/upgrade.26.sh diff --git a/manifest.toml b/manifest.toml index 58d7a39c..52c0f947 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 = "26.0.2~ynh1" +version = "27.0.0~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.26.sh b/scripts/upgrade.d/upgrade.26.sh new file mode 100644 index 00000000..59b4622b --- /dev/null +++ b/scripts/upgrade.d/upgrade.26.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Last available Nextcloud version +next_version="27.0.0" + +# Nextcloud tarball checksum sha256 +nextcloud_source_sha256="3d312a09b9345ac058758dd7b4059bf3cf0b1f0f1d747251b6fac3585ba6533f" diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index ba24f4f0..59b4622b 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="26.0.2" +next_version="27.0.0" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="f3db0ec5e0aaff7c088eb34f752d77d79913bc6784e0fc47a84cdaa28e567a33" +nextcloud_source_sha256="3d312a09b9345ac058758dd7b4059bf3cf0b1f0f1d747251b6fac3585ba6533f" From d6446cbe33abbce49394eb9ee34190596f4f25bd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 13 Jun 2023 11:28:58 +0000 Subject: [PATCH 095/195] 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 43281fc9..719d640c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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:** 26.0.2~ynh1 +**Shipped version:** 27.0.0~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 173f9a50..c4437523 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 :** 26.0.2~ynh1 +**Version incluse :** 27.0.0~ynh1 **Démo :** https://demo.nextcloud.com/ From b671f959813c2538c054994a4ee39ba54c6843d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:02:00 +0200 Subject: [PATCH 096/195] cleaning --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index b72d2bb0..cbd7a82a 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -10,7 +10,7 @@ Nextcloud features a direct integration of ONLYOFFICE (an online rich text docum 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. +- 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* diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index a34ae96c..a449e528 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -10,7 +10,7 @@ Nextcloud inclut une intégration directe de ONLYOFFICE (un éditeur de texte en Pour l'installer et la configurer : - Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE. - 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. +- 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* From b081780ae1ed677ca1e5f303db5286201cb5b513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:15:59 +0200 Subject: [PATCH 097/195] fix --- manifest.toml | 4 ++-- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 52c0f947..bcc20829 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.0.0~ynh1" +version = "27.0.1~ynh1" maintainers = ["kay0u"] @@ -19,7 +19,7 @@ code = "https://github.com/nextcloud/server" cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.1.21" architectures = ["amd64", "arm64"] multi_instance = true ldap = true diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 59b4622b..32b7722d 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.0.0" +next_version="27.0.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="3d312a09b9345ac058758dd7b4059bf3cf0b1f0f1d747251b6fac3585ba6533f" +nextcloud_source_sha256="3976b5e8f58f934ddbeb7cc49ac33b11ad3adbd7f6d5d0908a0fc36a160c27bd" From 93df16f2b76c893576023a0bfc0c0bd55e1f8dd0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 20 Jul 2023 15:16:05 +0000 Subject: [PATCH 098/195] 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 719d640c..de84a491 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.0.0~ynh1 +**Shipped version:** 27.0.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index c4437523..539a463b 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.0.0~ynh1 +**Version incluse :** 27.0.1~ynh1 **Démo :** https://demo.nextcloud.com/ From f30ce6fb4584be94af12620b0879324e2ed6e9a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 30 Jul 2023 08:30:28 +0100 Subject: [PATCH 099/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bcc20829..84f5b063 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 = ">= 11.1.21" +yunohost = ">= 11.2" architectures = ["amd64", "arm64"] multi_instance = true ldap = true From 39ecdc53da11ba85b5dbcab2845f180f5f14779d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:41:03 +0200 Subject: [PATCH 100/195] 27.0.2 --- 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 84f5b063..47bb3b9e 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.0.1~ynh1" +version = "27.0.2~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 32b7722d..99a48292 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.0.1" +next_version="27.0.2" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="3976b5e8f58f934ddbeb7cc49ac33b11ad3adbd7f6d5d0908a0fc36a160c27bd" +nextcloud_source_sha256="7a2dcea43aa3b8fb303347efda4c6f37733cca113c8ee16dd9f0e5fb68c7212f" From bccca31d4e36802cf912f48bb0958e755f812f92 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 11 Aug 2023 09:41:08 +0000 Subject: [PATCH 101/195] 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 de84a491..465375d0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.0.1~ynh1 +**Shipped version:** 27.0.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 539a463b..f3c768b6 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.0.1~ynh1 +**Version incluse :** 27.0.2~ynh1 **Démo :** https://demo.nextcloud.com/ From 90a700e13788232891ff472130a127fbc4de6f18 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Aug 2023 23:04:23 +0200 Subject: [PATCH 102/195] #591 --- conf/nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 395a5c52..1e49f622 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -105,6 +105,14 @@ location ^~ __PATH__/ { fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_intercept_errors on; fastcgi_request_buffering off; + + fastcgi_read_timeout 600; + fastcgi_send_timeout 600; + fastcgi_connect_timeout 600; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; } location ~ ^__PATH__/(?:updater|oc[ms]-provider)(?:$|/) { From 5a174307c607fe1a0a60443ac03b3123c80e08c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Sep 2023 16:47:49 +0200 Subject: [PATCH 103/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 47bb3b9e..b013e70d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,7 +20,7 @@ cpe = "cpe:2.3:a:nextcloud:nextcloud" [integration] yunohost = ">= 11.2" -architectures = ["amd64", "arm64"] +architectures = ["amd64", "arm64", "armhf"] multi_instance = true ldap = true sso = true From d9cbf046fd401758f9ead30dd35e6219d7b6669a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Sep 2023 21:29:51 +0200 Subject: [PATCH 104/195] 27.1.0 --- 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 b013e70d..4a57d81b 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.0.2~ynh1" +version = "27.1.0~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 99a48292..1040e226 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.0.2" +next_version="27.1.0" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="7a2dcea43aa3b8fb303347efda4c6f37733cca113c8ee16dd9f0e5fb68c7212f" +nextcloud_source_sha256="c3167059e69c517b7ae07f3bb0b832433d324675859081fe953ea41bc7df1242" From 5a72380d4534a4ef3b1458f41d205364993364e8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Sep 2023 19:29:58 +0000 Subject: [PATCH 105/195] 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 465375d0..25d99984 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.0.2~ynh1 +**Shipped version:** 27.1.0~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index f3c768b6..4929825b 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.0.2~ynh1 +**Version incluse :** 27.1.0~ynh1 **Démo :** https://demo.nextcloud.com/ From cc605dc4eb39f972a112c517948ff236eef45e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:22:01 +0200 Subject: [PATCH 106/195] 27.1.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 4a57d81b..f90617bc 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.0~ynh1" +version = "27.1.1~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 1040e226..9e6becf0 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.0" +next_version="27.1.1" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="c3167059e69c517b7ae07f3bb0b832433d324675859081fe953ea41bc7df1242" +nextcloud_source_sha256="3a91500566874675676fa3b5bfae2587a839cde41dfac5318043b162c1311fab" From 4fd1ef1b3b5a1a2b6b541b035412aa2ecdb30f75 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 21 Sep 2023 11:22:05 +0000 Subject: [PATCH 107/195] 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 25d99984..655d87d1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.0~ynh1 +**Shipped version:** 27.1.1~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 4929825b..1ffd833f 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.0~ynh1 +**Version incluse :** 27.1.1~ynh1 **Démo :** https://demo.nextcloud.com/ From 698a40827adba0b33ea66f572caad4d975ca1aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:21:16 +0200 Subject: [PATCH 108/195] 27.1.2 --- 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 f90617bc..c6155101 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.1~ynh1" +version = "27.1.2~ynh1" maintainers = ["kay0u"] diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 9e6becf0..09a19f6d 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.1" +next_version="27.1.2" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="3a91500566874675676fa3b5bfae2587a839cde41dfac5318043b162c1311fab" +nextcloud_source_sha256="0742b247aaee0b7044db0062f0a914aa77338c7a7d8fe7da0917147d76689721" From 7bfeb14ad1023eff1cb7565faaa0fe13ed967e94 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 6 Oct 2023 06:21:21 +0000 Subject: [PATCH 109/195] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 655d87d1..36f664c0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.1~ynh1 +**Shipped version:** 27.1.2~ynh1 **Demo:** https://demo.nextcloud.com/ @@ -44,7 +44,6 @@ this package: * Official user documentation: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 1ffd833f..c198a085 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.1~ynh1 +**Version incluse :** 27.1.2~ynh1 **Démo :** https://demo.nextcloud.com/ @@ -43,7 +43,6 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : * Signaler un bug : ## Informations pour les développeurs From b46b53195ef4d2aff11a97931af5b36f234d6039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:45:47 +0200 Subject: [PATCH 110/195] Update nginx.conf --- conf/nginx.conf | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index f87ee5d4..5852047b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -21,18 +21,9 @@ location ^~ __PATH__/ { # Path to source alias __INSTALL_DIR__/; - # Add headers to serve security related headers - more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; - more_set_headers "Referrer-Policy: no-referrer"; - more_set_headers "X-Content-Type-Options: nosniff"; - more_set_headers "X-Download-Options: noopen"; - more_set_headers "X-Frame-Options: SAMEORIGIN"; - more_set_headers "X-Permitted-Cross-Domain-Policies: none"; - more_set_headers "X-Robots-Tag: noindex, nofollow"; - more_set_headers "X-XSS-Protection: 1; mode=block"; - # Set max upload size client_max_body_size 10G; + client_body_timeout 300s; fastcgi_buffers 64 4K; # Enable gzip but do not remove ETag headers @@ -52,6 +43,16 @@ location ^~ __PATH__/ { # for tunning hints client_body_buffer_size 512k; + # Add headers to serve security related headers + more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; + more_set_headers "Referrer-Policy: no-referrer"; + more_set_headers "X-Content-Type-Options: nosniff"; + more_set_headers "X-Download-Options: noopen"; + more_set_headers "X-Frame-Options: SAMEORIGIN"; + more_set_headers "X-Permitted-Cross-Domain-Policies: none"; + more_set_headers "X-Robots-Tag: noindex, nofollow"; + more_set_headers "X-XSS-Protection: 1; mode=block"; + # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; @@ -92,7 +93,7 @@ location ^~ __PATH__/ { # Required for legacy support # https://github.com/nextcloud/documentation/pull/2197#issuecomment-721432337 # This line fix the ldap admin page - rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri; + rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; set $path_info $fastcgi_path_info; @@ -120,7 +121,7 @@ location ^~ __PATH__/ { send_timeout 600; } - location ~ ^__PATH__/(?:updater|oc[ms]-provider)(?:$|/) { + location ~ ^__PATH__/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } From 4476498872a89b9006ba53e3ab84f5f32329a593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:46:12 +0200 Subject: [PATCH 111/195] Update nginx.conf --- conf/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5852047b..d14ba9f0 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,7 +12,9 @@ location ^~ /.well-known { location = /.well-known/webfinger { return 301 __PATH__/index.php$uri; } location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; } - try_files $uri $uri/ =404; + # Let Nextcloud's API for `/.well-known` URIs handle all other + # requests by passing them to the front-end controller. + return 301 __PATH__/index.php$request_uri; } #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; From ee03b250708c92c0e0e3756278be341942270ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:22:29 +0200 Subject: [PATCH 112/195] add mail setup --- conf/config.json | 8 +++++++- manifest.toml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 9e1c8f02..e71af9d8 100644 --- a/conf/config.json +++ b/conf/config.json @@ -13,7 +13,13 @@ }, "hashing_default_password": true, "localstorage.allowsymlinks": true, - "simpleSignUpLink.shown": false + "simpleSignUpLink.shown": false, + "mail_smtpmode": "smtp", + "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@__DOMAIN__:587/?tls=True", + "mail_smtpport": 587, + "mail_smtpauth": true, + "mail_smtpname": "__APP__", + "mail_smtppassword": "__MAIL_PWD__" }, "apps": { "user_ldap": { diff --git a/manifest.toml b/manifest.toml index c6155101..ee171844 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,6 +53,7 @@ ram.runtime = "512M" [resources] [resources.system_user] + allow_email = true [resources.install_dir] From f2e491a7a4946b03d2dc315d3ddb783b2397d33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:31:43 +0200 Subject: [PATCH 113/195] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index e71af9d8..2c0f3449 100644 --- a/conf/config.json +++ b/conf/config.json @@ -15,7 +15,7 @@ "localstorage.allowsymlinks": true, "simpleSignUpLink.shown": false, "mail_smtpmode": "smtp", - "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@__DOMAIN__:587/?tls=True", + "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@localhost:587/?tls=True", "mail_smtpport": 587, "mail_smtpauth": true, "mail_smtpname": "__APP__", From 711050a22e340652160b1c9120224b4992e52710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:52:14 +0200 Subject: [PATCH 114/195] Update config.json --- conf/config.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/config.json b/conf/config.json index 2c0f3449..18909f84 100644 --- a/conf/config.json +++ b/conf/config.json @@ -15,11 +15,9 @@ "localstorage.allowsymlinks": true, "simpleSignUpLink.shown": false, "mail_smtpmode": "smtp", - "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@localhost:587/?tls=True", - "mail_smtpport": 587, - "mail_smtpauth": true, - "mail_smtpname": "__APP__", - "mail_smtppassword": "__MAIL_PWD__" + "mail_smtphost": "localhost", + "mail_smtpport": 25, + "mail_smtpauth": false }, "apps": { "user_ldap": { From cae89b069c9266966767910f5e2f805ef03e74ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:58:06 +0200 Subject: [PATCH 115/195] Revert "Update config.json" This reverts commit 711050a22e340652160b1c9120224b4992e52710. --- conf/config.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/config.json b/conf/config.json index 18909f84..2c0f3449 100644 --- a/conf/config.json +++ b/conf/config.json @@ -15,9 +15,11 @@ "localstorage.allowsymlinks": true, "simpleSignUpLink.shown": false, "mail_smtpmode": "smtp", - "mail_smtphost": "localhost", - "mail_smtpport": 25, - "mail_smtpauth": false + "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@localhost:587/?tls=True", + "mail_smtpport": 587, + "mail_smtpauth": true, + "mail_smtpname": "__APP__", + "mail_smtppassword": "__MAIL_PWD__" }, "apps": { "user_ldap": { From 263b17638ca9ddd7b21f0e0ddc9fb3c180d1486d Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:50:57 +0200 Subject: [PATCH 116/195] Provide proper mail configuration --- conf/config.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/conf/config.json b/conf/config.json index 2c0f3449..1cd7f95d 100644 --- a/conf/config.json +++ b/conf/config.json @@ -15,11 +15,21 @@ "localstorage.allowsymlinks": true, "simpleSignUpLink.shown": false, "mail_smtpmode": "smtp", - "mail_smtphost": "smtp://__APP__:__MAIL_PWD__@localhost:587/?tls=True", - "mail_smtpport": 587, - "mail_smtpauth": true, + "mail_smtpport": "25", + "mail_smtpauth": 1, "mail_smtpname": "__APP__", - "mail_smtppassword": "__MAIL_PWD__" + "mail_smtppassword": "__MAIL_PWD__", + "mail_sendmailmode": "smtp", + "mail_from_address": "__APP__", + "mail_domain": "__DOMAIN__", + "mail_smtphost": "localhost", + "mail_smtpstreamoptions": { + "ssl": { + "allow_self_signed": true, + "verify_peer": false, + "verify_peer_name": false + } + } }, "apps": { "user_ldap": { From b4180e0479579fd142a245b8748034351d74cd04 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 12 Oct 2023 06:30:19 +0000 Subject: [PATCH 117/195] 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 aabc104c..36f664c0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.2~ynh2 +**Shipped version:** 27.1.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 3c89b6d2..c198a085 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.2~ynh2 +**Version incluse :** 27.1.2~ynh1 **Démo :** https://demo.nextcloud.com/ From 45fe24293be3ab013b046d57fcc3826749600af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:03:59 +0200 Subject: [PATCH 118/195] Update extra_php-fpm.conf --- conf/extra_php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 4e9d3497..feee90b0 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -8,7 +8,7 @@ php_value[default_charset] = UTF-8 ; OPcache is already activated by default ; php_value[opcache.enable]=1 ; The following parameters are nevertheless recommended for Nextcloud -; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache +; see here: https://docs.nextcloud.com/server/20/admin_manual/installation/server_tuning.html#enable-php-opcache php_value[opcache.enable_cli]=1 php_value[opcache.interned_strings_buffer]=32 php_value[opcache.max_accelerated_files]=10000 From 8558d812d59c050b6e20650720525d56be72e70a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 21 Oct 2023 19:32:46 +0000 Subject: [PATCH 119/195] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87a89195..36f664c0 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ this package: * 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.2~ynh3 - +**Shipped version:** 27.1.2~ynh1 **Demo:** https://demo.nextcloud.com/ diff --git a/README_fr.md b/README_fr.md index 6ca66372..c198a085 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,8 +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.2~ynh3 - +**Version incluse :** 27.1.2~ynh1 **Démo :** https://demo.nextcloud.com/ From 2699202daf19eb9799305e8facfdcc53068c63c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:32:53 +0200 Subject: [PATCH 120/195] Update nginx.conf --- conf/nginx.conf | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9f73bfd3..fda76269 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,10 @@ -location ^~ /.well-known { + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` # The following 2 rules are only needed for the user_webfinger app. @@ -23,7 +29,7 @@ location ^~ __PATH__/ { # Path to source alias __INSTALL_DIR__/; - # Set max upload size + # set max upload size and increase upload timeout: client_max_body_size 10G; client_body_timeout 300s; fastcgi_buffers 64 4K; @@ -45,7 +51,7 @@ location ^~ __PATH__/ { # for tunning hints client_body_buffer_size 512k; - # Add headers to serve security related headers + # HTTP response headers borrowed from Nextcloud `.htaccess` more_set_headers "Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;"; more_set_headers "Referrer-Policy: no-referrer"; more_set_headers "X-Content-Type-Options: nosniff"; @@ -77,12 +83,6 @@ location ^~ __PATH__/ { } } - location = __PATH__/robots.txt { - allow all; - log_not_found off; - access_log off; - } - # Rules borrowed from `.htaccess` to hide certain paths from clients location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } location ~ ^__PATH__/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; } @@ -93,8 +93,6 @@ location ^~ __PATH__/ { # `/nextcloud/index.php` to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { # Required for legacy support - # https://github.com/nextcloud/documentation/pull/2197#issuecomment-721432337 - # This line fix the ldap admin page rewrite ^__PATH__/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) __PATH__/index.php$request_uri; fastcgi_split_path_info ^(.+?\.php)(/.*)$; @@ -111,6 +109,7 @@ location ^~ __PATH__/ { fastcgi_param front_controller_active true; # Enable pretty urls fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of nextcloud response to inject ynh scripts fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_intercept_errors on; fastcgi_request_buffering off; @@ -130,7 +129,7 @@ location ^~ __PATH__/ { location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ { try_files $uri / __PATH__/index.php$request_uri; - expires 6M; # Cache-Control policy borrowed from `.htaccess` + more_set_headers "Cache-Control: public, max-age=15778463, $asset_immutable"; access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { @@ -144,6 +143,11 @@ location ^~ __PATH__/ { access_log off; # Optional: Don't log access to assets } + # Rule borrowed from `.htaccess` + location __PATH__/remote { + return 301 __PATH__/remote.php$request_uri; + } + location ~ / { if ($request_method ~ ^(PUT|DELETE|PATCH)$) { rewrite ^ __PATH__/index.php$request_uri last; From 46c59266976328bf2b176661a97eb6e3acd5ca0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:56:58 +0200 Subject: [PATCH 121/195] Update nginx.conf --- conf/nginx.conf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index fda76269..6e0eb5d4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,9 +1,3 @@ - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` From 5898a165bc88949dc3820b0d4e31d4f12828e829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:58:57 +0200 Subject: [PATCH 122/195] 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 6e0eb5d4..9598907d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ - location ^~ /.well-known { +location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` # The following 2 rules are only needed for the user_webfinger app. From dd843e771ea856c6cb82923789dd51b4fdf77dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 18:01:02 +0200 Subject: [PATCH 123/195] Update nginx.conf --- conf/nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9598907d..9fdb221b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -77,6 +77,12 @@ location ^~ __PATH__/ { } } + location = __PATH__/robots.txt { + allow all; + log_not_found off; + access_log off; + } + # Rules borrowed from `.htaccess` to hide certain paths from clients location ~ ^__PATH__/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; } location ~ ^__PATH__/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; } From 24871407542ee3a5263325d7207cbb70042311b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 18:03:34 +0200 Subject: [PATCH 124/195] 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 9fdb221b..8ce72b8a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -129,7 +129,7 @@ location ^~ __PATH__/ { location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ { try_files $uri / __PATH__/index.php$request_uri; - more_set_headers "Cache-Control: public, max-age=15778463, $asset_immutable"; + expires 6M; # Cache-Control policy borrowed from `.htaccess` access_log off; # Optional: Don't log access to assets location ~ \.wasm$ { From 9d934893f23424fc5c118fe9f4bcf2fa87715afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:21:01 +0200 Subject: [PATCH 125/195] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ee171844..fccf19c9 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.2~ynh1" +version = "27.1.3~ynh1" maintainers = ["kay0u"] From cd7cc707a2762095a0f422c7d8d005464b50b4cc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 Oct 2023 09:21:10 +0000 Subject: [PATCH 126/195] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36f664c0..5ee58c08 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ this package: * 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.2~ynh1 +**Shipped version:** 27.1.3~ynh1 **Demo:** https://demo.nextcloud.com/ @@ -44,6 +44,7 @@ this package: * Official user documentation: * Official admin documentation: * Upstream app code repository: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index c198a085..c400f051 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.2~ynh1 +**Version incluse :** 27.1.3~ynh1 **Démo :** https://demo.nextcloud.com/ @@ -43,6 +43,7 @@ En plus des fonctionnalités principales de Nextcloud, les fonctionnalités suiv * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From d934c27e447ddcafe95b8d2f2cfcb1f78331fc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:41:38 +0200 Subject: [PATCH 127/195] Update upgrade.last.sh --- scripts/upgrade.d/upgrade.last.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 09a19f6d..4a851d5c 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.2" +next_version="27.1.3" # Nextcloud tarball checksum sha256 -nextcloud_source_sha256="0742b247aaee0b7044db0062f0a914aa77338c7a7d8fe7da0917147d76689721" +nextcloud_source_sha256="1d614935245e4a375b4ac991c02f323592b753972f86f88763fd80ed7d275793" From a37ef189fb3b8f701e47272e71ef43e0da4b8625 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 29 Oct 2023 16:09:01 +0000 Subject: [PATCH 128/195] Implement phpflags and advertise command --- doc/ADMIN.md | 2 ++ doc/ADMIN_fr.md | 2 ++ scripts/install | 2 ++ scripts/upgrade | 6 +++++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index cbd7a82a..ef43357a 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,6 +2,8 @@ `sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +or use `sudo yunohost app shell __APP__` then run `php occ ...` + ### Configure ONLYOFFICE integration #### With Nextcloud App (no ARM support, lower performance) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index a449e528..c617ce34 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,6 +2,8 @@ `sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +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) diff --git a/scripts/install b/scripts/install index 85e1ca41..a6f03365 100755 --- a/scripts/install +++ b/scripts/install @@ -18,6 +18,7 @@ maintenance_mode=0 fpm_footprint="high" fpm_free_footprint=0 fpm_usage="medium" +phpflags="--define apc.enable_cli=1" #================================================= # STORE SETTINGS FROM MANIFEST @@ -27,6 +28,7 @@ ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 30639a78..accab235 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,12 +41,16 @@ if [ -z "${fpm_free_footprint:-}" ]; then ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi -# If fpm_usage doesn't exist, create it if [ -z "${fpm_usage:-}" ]; then fpm_usage=medium ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi +if [ -z "${phpflags:-}" ]; then + phpflags="--define apc.enable_cli=1" + ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags +fi + # Delete existing ini configuration file (backward compatibility) if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini From 2763028257eb6e45f9d963712b4f453a37f07ea5 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 29 Oct 2023 16:11:30 +0000 Subject: [PATCH 129/195] Fix comments in upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index accab235..bfaec82f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,11 +41,13 @@ if [ -z "${fpm_free_footprint:-}" ]; then ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi +# If fpm_usage doesn't exist, create it if [ -z "${fpm_usage:-}" ]; then fpm_usage=medium ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi +# If phpflags doesn't exist, create it if [ -z "${phpflags:-}" ]; then phpflags="--define apc.enable_cli=1" ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags From 19cb6388fc184c750f43d544ecd8ab30e3a36e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:33:56 +0100 Subject: [PATCH 130/195] 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 8ce72b8a..5fb848f8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -107,7 +107,7 @@ location ^~ __PATH__/ { fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice fastcgi_param front_controller_active true; # Enable pretty urls - fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of nextcloud response to inject ynh scripts + fastcgi_param HTTP_ACCEPT_ENCODING ""; # Disable encoding of Nextcloud response to inject ynh scripts fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_intercept_errors on; From bcbdb177a6bac4ae9939b80fb90ab6313cef1cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:34:49 +0100 Subject: [PATCH 131/195] Update DESCRIPTION.md --- doc/DESCRIPTION.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 4a3dbc8c..3d35dc46 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -2,8 +2,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 aab1e0b13a0f6f34ec238a1c62934fffb5abbdc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:35:59 +0100 Subject: [PATCH 132/195] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a6f03365..7b11cfb5 100755 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ chown -R $app: "$install_dir" "$data_dir" # Define password in an intermediate var # The fact that it's called _password allows it to be -# picked up by Yunohost's auto-redact mecanism +# picked up by YunoHost's auto-redact mecanism admin_password="$(ynh_string_random --length=6)" # Install Nextcloud using a temporary admin user From d7d24bd648f6b1bd5226db53925fa9b79800c8a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:36:43 +0100 Subject: [PATCH 133/195] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index bfaec82f..170e7433 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -246,7 +246,7 @@ EOF current_version=$(grep OC_VersionString "$install_dir/version.php" | cut -d\' -f2) current_major_version=${current_version%%.*} - # Print the current version number of nextcloud + # Print the current version number of Nextcloud exec_occ -V done From 91c059acd73241f238e5ab34196311f3f6b78b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:38:13 +0100 Subject: [PATCH 134/195] Update nginx.conf --- conf/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5fb848f8..36de4782 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -126,7 +126,8 @@ location ^~ __PATH__/ { try_files $uri/ =404; index index.php; } - + + # Serve static files location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ { try_files $uri / __PATH__/index.php$request_uri; expires 6M; # Cache-Control policy borrowed from `.htaccess` From 98bef85aca66bf4b9ff1e7d8eedca5ead8654fd8 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Tue, 31 Oct 2023 04:46:53 +0100 Subject: [PATCH 135/195] [fix] Upgrade from 25 --- scripts/upgrade | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index eb1adb6f..4528543a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -208,14 +208,17 @@ ynh_add_nginx_config # Define a function to execute commands with `occ` exec_occ() { # Backward compatibility to upgrade from older versions - if [ $current_major_version = "last" ] || [ $current_major_version -ge 24 ] + if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ] then NEXTCLOUD_PHP_VERSION=$phpversion - elif [ $current_major_version -ge 15 ] + elif [ $current_major_version -ge 25 ] + then + NEXTCLOUD_PHP_VERSION="8.1" + elif [ $current_major_version -ge 18 ] then NEXTCLOUD_PHP_VERSION="7.4" else - NEXTCLOUD_PHP_VERSION="7.0" + NEXTCLOUD_PHP_VERSION="7.1" fi (cd "$final_path" && ynh_exec_as "$app" \ php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") From 7cb57770bb8cd81f737bfab927adafcb72601a3c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 Nov 2023 14:58:40 +0000 Subject: [PATCH 136/195] Auto-update README --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ee58c08..e9d6643d 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 137/195] 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 d23beb4b..d824c122 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 138/195] 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 36de4782..e1d90164 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 139/195] cleaning --- manifest.toml | 3 +++ scripts/install | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index fccf19c9..2e4569f7 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 7b11cfb5..2f160713 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 140/195] [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 5ba8ef76..99cb233a 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 141/195] [fix] minor: remove unused line --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 99cb233a..b63130e8 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 142/195] [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 b63130e8..39451390 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 143/195] [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 39451390..e3f2ee79 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 144/195] [fix] not a valid identifier --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e3f2ee79..412a2b17 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 145/195] [fix] not a valid identifier --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 412a2b17..2144d7c6 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 146/195] 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 2e4569f7..a8200f67 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 4a851d5c..b31e5b56 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 147/195] [fix] not a valid identifier --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2144d7c6..b1404b76 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 148/195] 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 e9d6643d..abbfd578 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 c400f051..f4fdfaa0 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/ From f57d83163625260f420351753c64fdb61918a7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:44:09 +0100 Subject: [PATCH 149/195] add post upgrade message --- doc/POST_UPGRADE.md | 1 + doc/POST_UPGRADE_fr.md | 1 + scripts/upgrade | 11 ----------- 3 files changed, 2 insertions(+), 11 deletions(-) create mode 100644 doc/POST_UPGRADE.md create mode 100644 doc/POST_UPGRADE_fr.md diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md new file mode 100644 index 00000000..7da14807 --- /dev/null +++ b/doc/POST_UPGRADE.md @@ -0,0 +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 diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md new file mode 100644 index 00000000..9fe2b100 --- /dev/null +++ b/doc/POST_UPGRADE_fr.md @@ -0,0 +1 @@ +Notez que si vous avez installé des applications Nextcloud tierces, elles sont probablement désactivées et vous devrez les réactiver manuellement. \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index b1404b76..bf104984 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -366,17 +366,6 @@ chmod 640 "$install_dir/config/config.php" chmod 755 /home/yunohost.app chmod 750 $install_dir -#================================================= -# WARNING ABOUT THIRD-PARTY APPS -#================================================= - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - # Warn about possible disabled apps - ynh_print_warn --message="Note that if you've installed some third-parties Nextcloud applications, \ - they are probably disabled and you'll have to manually enable them again." -fi - #================================================= # SETUP LOGROTATE #================================================= From 043712257ee9c89f898537828cc74431639ad553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 09:00:59 +0100 Subject: [PATCH 150/195] 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 e1d90164..d09ac20c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -126,7 +126,7 @@ location ^~ __PATH__/ { try_files $uri/ =404; index index.php; } - + # Serve static files location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ { try_files $uri / __PATH__/index.php$request_uri; From 76fb4fbc9e77896e90188f53f6213f879b23be2c Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 30 Nov 2023 00:26:52 +0100 Subject: [PATCH 151/195] [fix] Upgrade failing due to obsolete use of mysqlpwd --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index bf104984..85ab5595 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,7 +155,7 @@ then exec_occ -V if [ "$(exec_occ config:system:get mysql.utf8mb4)" != "true" ]; then - db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) + db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) # Change your databases character set and collation ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" From beb3eacc9a64be29ef446469f2ffe05b8b4f06ad Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 30 Nov 2023 01:09:03 +0100 Subject: [PATCH 152/195] augment "opcache.revalidate_freq" from 1 to 60 (#541) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [enh] revalidate_freq to 60 --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: ljf (zamentur) --- conf/extra_php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index feee90b0..fd92447d 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -14,7 +14,7 @@ php_value[opcache.interned_strings_buffer]=32 php_value[opcache.max_accelerated_files]=10000 php_value[opcache.memory_consumption]=128 php_value[opcache.save_comments]=1 -php_value[opcache.revalidate_freq]=1 +php_value[opcache.revalidate_freq]=60 ; https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1 php_value[apc.enabled]=1 php_value[apc.enable_cli]=1 From 8efdae92176cc29d27291db752c6c97709b5f86b Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 30 Nov 2023 11:45:53 +0100 Subject: [PATCH 153/195] [fix] overwrite.cli.url should contains path --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2f160713..a169962d 100755 --- a/scripts/install +++ b/scripts/install @@ -198,7 +198,7 @@ exec_occ config:system:get logout_url >/dev/null 2>&1 \ # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS #================================================= -exec_occ config:system:set overwrite.cli.url --value="https://${domain}" +exec_occ config:system:set overwrite.cli.url --value="https://${domain}${path}" #================================================= # REMOVE THE TEMPORARY ADMIN AND SET THE TRUE ONE From ac91d3a6769747fd3819484ae8c02446e5cc0a30 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 30 Nov 2023 11:48:18 +0100 Subject: [PATCH 154/195] [fix] Upgrade the bad overwrite.cli.url with path --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 85ab5595..aac8c8d3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -312,7 +312,7 @@ EOF # CHANGE HOSTNAME FOR ACTIVITY NOTIFICATIONS #================================================= - exec_occ config:system:set overwrite.cli.url --value="https://${domain}" + exec_occ config:system:set overwrite.cli.url --value="https://${domain}${path}" #================================================= # MOUNT HOME FOLDERS AS EXTERNAL STORAGE From f0100c7fcbe712b757c0dac135ce6f928b19bca5 Mon Sep 17 00:00:00 2001 From: narF Date: Thu, 30 Nov 2023 14:26:21 -0500 Subject: [PATCH 155/195] 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 ef43357a..0f1d6a1f 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 156/195] 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 c617ce34..3a691ba2 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 157/195] 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 7da14807..b0a56e5c 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 158/195] 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 0d8a1424..0d8c7948 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 159/195] [fix] Api permission (#633) --- scripts/change_url | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 0d8c7948..6da4c8dd 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 160/195] [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 aac8c8d3..186a0bd5 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 161/195] [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 a169962d..c1b95994 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 162/195] [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 186a0bd5..32c7001a 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 163/195] 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 a8200f67..4fb20323 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 00000000..3716a7f2 --- /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 b31e5b56..3716a7f2 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 164/195] 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 abbfd578..73b3afed 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 f4fdfaa0..dc3c8b6c 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 165/195] 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 919f2d49..2fdeff40 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 166/195] 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 2fdeff40..919f2d49 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 167/195] 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 d09ac20c..1750d6a5 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 168/195] 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 919f2d49..31ab09de 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 169/195] 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 43159c36..6ea0754f 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 170/195] reverting --- scripts/change_url | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 6da4c8dd..0d8c7948 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 171/195] Revert "Update app-00-add-logout_url-conf.patch" This reverts commit ca4ad9a444a88e524e25d4a02298ed94b3bb123c. --- .../app-00-add-logout_url-conf.patch | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 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 31ab09de..919f2d49 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 -- )); +@@ -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) + )); - -+ $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(); ++ $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 172/195] 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 6ea0754f..43159c36 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 173/195] 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 4fb20323..4d53e38d 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 3716a7f2..067e91bf 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 174/195] 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 73b3afed..5b8a14bf 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 dc3c8b6c..8b6334cc 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 175/195] 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 919f2d49..44cce429 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 176/195] 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 43159c36..abe9ad45 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 177/195] 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 44cce429..2c81a655 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 178/195] 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 0d8c7948..0d8a1424 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 179/195] 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 0d8a1424..6da4c8dd 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 180/195] Update tests.toml --- tests.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests.toml b/tests.toml index 85768fa3..0e8e459a 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 From 5116bde160a9c33c9d1cd927765baf5281a813c6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 7 Jan 2024 17:27:45 +0100 Subject: [PATCH 181/195] Update change_url: add tmp debug ... --- scripts/change_url | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 6da4c8dd..420f4cd9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -62,3 +62,10 @@ ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" -- #================================================= ynh_script_progression --message="Change of URL completed for $app" --last + +# Tmp debug for the stupid trusted domain issue x_x +ynh_print_info $(cat /var/www/nextcloud/config/config.php) + +systemctl restart php${phpversion}-fpm + +sleep 5 From b90f5e934cd669eaab47f0406f710190bbb1251b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 7 Jan 2024 17:29:08 +0100 Subject: [PATCH 182/195] 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 420f4cd9..615883e3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -64,7 +64,7 @@ ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" -- ynh_script_progression --message="Change of URL completed for $app" --last # Tmp debug for the stupid trusted domain issue x_x -ynh_print_info $(cat /var/www/nextcloud/config/config.php) +cat /var/www/nextcloud/config/config.php >&$YNH_STDINFO systemctl restart php${phpversion}-fpm From 3259e4abb5126fb4b4f6ab1ef1fd9c6d841b2b89 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:34:02 +0100 Subject: [PATCH 183/195] Update change_url: properly reload php-fpm when changing trusted_domains --- scripts/change_url | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 615883e3..4ba48b33 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -29,24 +29,24 @@ exec_occ() { if [ $change_domain -eq 1 ] then - # Change the trusted domain - exec_occ config:system:set trusted_domains 1 --value=$new_domain + # Change the trusted domain + exec_occ config:system:set trusted_domains 1 --value=$new_domain - # Change hostname for activity notifications + # Change hostname for activity notifications exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}" -fi -if [ $change_domain -eq 1 ] -then - # Check if .well-known is available for this domain - if is_url_handled --domain="$new_domain" --path="/.well-known/caldav" || is_url_handled --domain="$new_domain" --path="/.well-known/carddav" - then - ynh_print_warn --message="Another app already uses the domain $new_domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." + # Reload php fpm, necessary for force nextcloud to re-read config.php, cf opcache.revalidate_freq + ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload + + # Check if .well-known is available for this domain + if is_url_handled --domain="$new_domain" --path="/.well-known/caldav" || is_url_handled --domain="$new_domain" --path="/.well-known/carddav" + then + ynh_print_warn --message="Another app already uses the domain $new_domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." - # Remove lines about .well-known/carddav and caldav with sed. - sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "/etc/nginx/conf.d/$new_domain.d/$app.conf" - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - fi + # Remove lines about .well-known/carddav and caldav with sed. + sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "/etc/nginx/conf.d/$new_domain.d/$app.conf" + ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" + fi fi #================================================= @@ -62,10 +62,3 @@ ynh_permission_url --permission="api" --url="re:$new_domain\/.well-known\/.*" -- #================================================= ynh_script_progression --message="Change of URL completed for $app" --last - -# Tmp debug for the stupid trusted domain issue x_x -cat /var/www/nextcloud/config/config.php >&$YNH_STDINFO - -systemctl restart php${phpversion}-fpm - -sleep 5 From 5932bdc22ffc36d1f698634c14db69807967a3e8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 8 Jan 2024 20:00:44 +0100 Subject: [PATCH 184/195] Update upgrade: fix inconsistent handling of the php version stuff between major upgrades --- scripts/upgrade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 32c7001a..c7fd701f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ exec_occ() { # Backward compatibility to upgrade from older versions if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ] then - NEXTCLOUD_PHP_VERSION=$phpversion + NEXTCLOUD_PHP_VERSION="8.2" elif [ $current_major_version -ge 24 ] then NEXTCLOUD_PHP_VERSION="8.1" @@ -117,7 +117,11 @@ exec_occ() { else NEXTCLOUD_PHP_VERSION="7.1" fi - if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then + + # NB : be super careful when designing this part of the code, because calling ynh_install_app_dependencies + # will do magic regarding php configuration and $phpversion when the php version of the dependencies changes ... + phpversion=$(ynh_app_setting_set --app=$app --key=phpversion) + if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]; 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 e1651583be54bee2d276a150d29211fedb04c119 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 8 Jan 2024 21:54:18 +0100 Subject: [PATCH 185/195] Update upgrade: stupid typo --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c7fd701f..6950f48c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,7 +121,7 @@ exec_occ() { # NB : be super careful when designing this part of the code, because calling ynh_install_app_dependencies # will do magic regarding php configuration and $phpversion when the php version of the dependencies changes ... phpversion=$(ynh_app_setting_set --app=$app --key=phpversion) - if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]; then + if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]]; 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 10c7976d054d1b17d884185c4a1e35dc7b2d0350 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Jan 2024 23:00:49 +0100 Subject: [PATCH 186/195] During upgrade, the backup of config.php should occurr before the maintenance mode is set to on, otherwise the restored version will have maintenance=true and appear as manually modified.. --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6950f48c..ac1c1e17 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -221,12 +221,12 @@ EOF # Install the next nextcloud version in $tmpdir ynh_setup_source --dest_dir="$tmpdir" - # Enable maintenance mode - exec_occ maintenance:mode --on - # 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) From f2829d02bc69b59249133053760d807f5e6cf58f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Jan 2024 23:02:58 +0100 Subject: [PATCH 187/195] Zgrompf --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ac1c1e17..fd7a5f6d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,7 +120,7 @@ exec_occ() { # NB : be super careful when designing this part of the code, because calling ynh_install_app_dependencies # will do magic regarding php configuration and $phpversion when the php version of the dependencies changes ... - phpversion=$(ynh_app_setting_set --app=$app --key=phpversion) + phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]]; then local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)" pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}" From bee14c89729b694f0953ece8f9143f1721ff6821 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Jan 2024 23:10:11 +0100 Subject: [PATCH 188/195] Simplify the overly complex mess about fpm_usage, fpm_footprint ... and fpm_free_footprint doesn't seem to even be something used anywhere --- scripts/config | 2 +- scripts/install | 25 +++---------------------- scripts/remove | 6 ------ scripts/restore | 8 +------- scripts/upgrade | 30 +----------------------------- 5 files changed, 6 insertions(+), 65 deletions(-) diff --git a/scripts/config b/scripts/config index 5a7a2ac8..35e9cd0f 100644 --- a/scripts/config +++ b/scripts/config @@ -120,7 +120,7 @@ ynh_app_config_validate() { ynh_app_config_apply() { _ynh_app_config_apply - ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint + ynh_add_fpm_config } ynh_app_config_run $1 diff --git a/scripts/install b/scripts/install index c1b95994..fe87cb8f 100755 --- a/scripts/install +++ b/scripts/install @@ -1,33 +1,13 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers source _ynh_mysql_connect_as.sh -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - maintenance_mode=0 -fpm_footprint="high" -fpm_free_footprint=0 -fpm_usage="medium" phpflags="--define apc.enable_cli=1" -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags #================================================= @@ -65,8 +45,9 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= 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 +ynh_app_setting_set --app=$app --key=fpm_footprint --value=high +ynh_app_setting_set --app=$app --key=fpm_usage --value=medium +ynh_add_fpm_config #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index d09cafef..c39ac68c 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index 90d8fbab..fe6be1ea 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers source ../settings/scripts/_ynh_mysql_connect_as.sh @@ -35,7 +29,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=50 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +ynh_add_fpm_config #================================================= # RESTORE THE NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index fd7a5f6d..f84cb991 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,18 +1,8 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - upgrade_type=$(ynh_check_app_version_changed) #================================================= @@ -29,24 +19,6 @@ if [ -z "${maintenance_mode:-}" ]; then ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode fi -# If fpm_footprint doesn't exist, create it -if [ -z "${fpm_footprint:-}" ]; then - fpm_footprint=high - ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_free_footprint doesn't exist, create it -if [ -z "${fpm_free_footprint:-}" ]; then - fpm_free_footprint=0 - ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "${fpm_usage:-}" ]; then - fpm_usage=medium - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - # If phpflags doesn't exist, create it if [ -z "${phpflags:-}" ]; then phpflags="--define apc.enable_cli=1" @@ -64,7 +36,7 @@ fi ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config #================================================= # NGINX CONFIGURATION From fe63ef6dfc01132a654a65a50d8f825d0b51823a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Jan 2024 23:33:05 +0100 Subject: [PATCH 189/195] Fix custom getter for fpm_free_footprint >_> --- scripts/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config b/scripts/config index 35e9cd0f..1b5e26bc 100644 --- a/scripts/config +++ b/scripts/config @@ -49,7 +49,7 @@ get__fpm_footprint() { fi } -get__free_footprint() { +get__fpm_free_footprint() { # Free footprint value for php-fpm # Check if current_fpm_footprint is an integer if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null From 07ed2f2ecd56041e56117a5ba331dc9b47b01e82 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 9 Jan 2024 19:45:52 +0100 Subject: [PATCH 190/195] No need to create the 'maintenance_mode' thing because there's a custom getter ... --- scripts/install | 2 -- scripts/upgrade | 6 ------ 2 files changed, 8 deletions(-) diff --git a/scripts/install b/scripts/install index fe87cb8f..6e5858a7 100755 --- a/scripts/install +++ b/scripts/install @@ -4,10 +4,8 @@ source _common.sh source /usr/share/yunohost/helpers source _ynh_mysql_connect_as.sh -maintenance_mode=0 phpflags="--define apc.enable_cli=1" -ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f84cb991..6e082f11 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,12 +13,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only -# If maintenance_mode doesn't exist, create it -if [ -z "${maintenance_mode:-}" ]; then - maintenance_mode=0 - ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode -fi - # If phpflags doesn't exist, create it if [ -z "${phpflags:-}" ]; then phpflags="--define apc.enable_cli=1" From 862ee4f08f02be9dee1debaacfa7ff5b8b1dd8df Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 9 Jan 2024 19:53:18 +0100 Subject: [PATCH 191/195] Rework upgrade script to move the fpm config, nginx and all system configurations at the end --- scripts/upgrade | 114 +++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 64 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6e082f11..280eb7d0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,40 +24,6 @@ if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini fi -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 - -# Recreate a dedicated PHP-FPM config -ynh_add_fpm_config - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" - -# Delete current NGINX configuration to be able to check if .well-known is already served. -ynh_remove_nginx_config -ynh_app_setting_delete --app=$app --key="checksum__etc_nginx_conf.d_$domain.d_$app.conf" - -# Wait untils NGINX has fully reloaded -ynh_systemd_action --service_name=nginx --action=reload --line_match="Reloaded" --log_path="systemd" - -# Check if .well-known is available for this domain -if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" -then - ynh_print_warn --message="Another app already uses the domain $domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." - - # Remove lines about .well-known/carddav and caldav with sed. - sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" -fi - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC UPGRADE #================================================= @@ -309,21 +275,9 @@ EOF fi #================================================= -# UPDATE THE CRON JOB -#================================================= - -cron_path="/etc/cron.d/$app" -ynh_add_config --template="../conf/nextcloud.cron" --destination="$cron_path" -chown root: "$cron_path" -chmod 644 "$cron_path" - -exec_occ background:cron - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES +# REGEN SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Reapplying file permissions..." --weight=2 # Fix app ownerships & permissions chown -R $app:www-data "$install_dir" @@ -337,30 +291,62 @@ chmod 755 /home/yunohost.app chmod 750 $install_dir #================================================= -# SETUP LOGROTATE +# REGEN SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." +ynh_script_progression --message="Regenerating system configurations for $app..." --weight=2 + +# ------- +# PHP-FPM +# ------- + +ynh_add_fpm_config + +# ------- +# NGINX +# ------- + +# Delete current NGINX configuration to be able to check if .well-known is already served. +ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_remove_nginx_config +ynh_app_setting_delete --app=$app --key="checksum__etc_nginx_conf.d_$domain.d_$app.conf" -# Use logrotate to manage app-specific logfile(s) +# Wait untils NGINX has fully reloaded +ynh_systemd_action --service_name=nginx --action=reload --line_match="Reloaded" --log_path="systemd" + +# Check if .well-known is available for this domain +if is_url_handled --domain="$domain" --path="/.well-known/caldav" || is_url_handled --domain="$domain" --path="/.well-known/carddav" +then + ynh_print_warn --message="Another app already uses the domain $domain to serve a CalDAV/CardDAV feature. You may encounter issues when dealing with your calendar or address book." + + # Remove lines about .well-known/carddav and caldav with sed. + sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "../conf/nginx.conf" +fi + +# Create a dedicated NGINX config +ynh_add_nginx_config + +# ------- +# CRON JOB +# ------- +cron_path="/etc/cron.d/$app" +ynh_add_config --template="../conf/nextcloud.cron" --destination="$cron_path" +chown root: "$cron_path" +chmod 644 "$cron_path" + +exec_occ background:cron + +# ------- +# LOGROTATE +# ------- ynh_use_logrotate --non-append -#================================================= -# SETUP FAIL2BAN -#================================================= -ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=7 +# ------- +# FAIL2BAN +# ------- # Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: ''.*$" --max_retry=5 -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading PHP-FPM..." --weight=2 - -ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload - #================================================= # END OF SCRIPT #================================================= From 3e9462656ebd60b0e5179b3ed342f9fcf9e67c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:56:53 +0100 Subject: [PATCH 192/195] Add .mjs as a file extension --- conf/nginx.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1750d6a5..6375a8b6 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,13 @@ -location ^~ /.well-known { +# Add .mjs as a file extension for javascript +# Either include it in the default mime.types list +# or include you can include that list explicitly and add the file extension +# only for Nextcloud like below: +include mime.types; +types { + text/javascript js mjs; +} + + location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` # The following 2 rules are only needed for the user_webfinger app. From 874a0c516a58a19bbe6ec94598c08d90eb43af76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:57:20 +0100 Subject: [PATCH 193/195] 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 6375a8b6..9ab915b7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ types { text/javascript js mjs; } - location ^~ /.well-known { +location ^~ /.well-known { # The following 6 rules are borrowed from `.htaccess` # The following 2 rules are only needed for the user_webfinger app. From 2f11e708b6027bce7951b06b042f32076533a4a0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:49:37 +0100 Subject: [PATCH 194/195] Update ADMIN.md --- doc/ADMIN.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 0f1d6a1f..e9b7da81 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,19 +1,24 @@ -### How to use CLI commande +### Manually running Nextcloud commands -`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +You can run Nextcloud commands from the command line using: -or use `sudo yunohost app shell __APP__` then run `php occ ...` +``` +sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ... +``` -### Configure ONLYOFFICE integration +Alternatively, you may open a 'Nextcloud shell' with `sudo yunohost app shell __APP__`, then run `php occ ...` + +### ONLYOFFICE integration + +ONLYOFFICE is an online rich text document editor which can be integrated in Nextcloud #### 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) +For better performance and ARM64 support (Raspberry Pi, OLinuXino...), install the [OnlyOffice YunoHost app](https://apps.yunohost.org/app/onlyoffice) 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: +Nextcloud features a direct integration of ONLYOFFICE through a Nextcloud app. - 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. From b4f66f67c5a634696a0020e241b88edcf4d80a88 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:54:31 +0100 Subject: [PATCH 195/195] Update ADMIN_fr.md --- doc/ADMIN_fr.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 3a691ba2..85445bd2 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,21 +1,24 @@ -### Comment utiliser la commande CLI +### Exécuter manuellement des commandes Nextcloud -`sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +Vous pouvez lancer des commandes Nextcloud depuis la ligne de commande avec: -ou utilisez `sudo yunohost app shell __APP__` puis `php occ ...` +``` +sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ... +``` -### Configurer l'intégration d'ONLYOFFICE +Ou bien, vous pouvez ouvrir un "shell Nextcloud" avec `sudo yunohost app shell __APP__`, puis lancer `php occ ...` + +### Intégration d'ONLYOFFICE + +ONLYOFFICE est un éditeur de texte enrichi en ligne qui peut s'intégrer dans Nextcloud #### 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) +Pour de meilleures performances et le support de ARM64 (Raspberry Pi, OLinuXino...), installez l'[app YunoHost OnlyOffice](https://apps.yunohost.org/app/onlyoffice), puis connectez-la à Nextcloud : 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) +#### 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 : +Nextcloud inclut une intégration directe via une application Nextcloud. - Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE. - 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