1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge branch 'testing' into hook-post-user-delete

This commit is contained in:
Éric Gaspar 2023-10-12 08:32:25 +02:00
commit 1779154754
14 changed files with 37 additions and 162 deletions

View file

@ -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:** 27.1.2~ynh2
**Demo:** https://demo.nextcloud.com/
@ -63,7 +63,6 @@ For better performance and ARM64 support, install ONLYOFFICE YunoHost App and co
* Official user documentation: <https://docs.nextcloud.com/server/latest/user_manual/en/>
* Official admin documentation: <https://docs.nextcloud.com/server/stable/admin_manual/>
* Upstream app code repository: <https://github.com/nextcloud/server>
* YunoHost documentation for this app: <https://yunohost.org/app_nextcloud>
* Report a bug: <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
## Developer info

View file

@ -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 :** 27.1.2~ynh2
**Démo :** https://demo.nextcloud.com/
@ -62,7 +62,6 @@ Pour de meilleures performances et le support de ARM64, installez l'app YunoHos
* Documentation officielle utilisateur : <https://docs.nextcloud.com/server/latest/user_manual/en/>
* Documentation officielle de ladmin : <https://docs.nextcloud.com/server/stable/admin_manual/>
* Dépôt de code officiel de lapp : <https://github.com/nextcloud/server>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_nextcloud>
* Signaler un bug : <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
## Informations pour les développeurs

View file

@ -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"

View file

@ -13,8 +13,8 @@
setup_private=1
setup_public=1
upgrade=1
#25.0.2
upgrade=1 from_commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8
#26.0.3
upgrade=1 from_commit=d02166a533dcf8aa82d49dbb6a3a2dd9a7411812
backup_restore=1
multi_instance=1
change_url=1
@ -22,6 +22,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=c5cf91ad30149e1924c23b19e93f483c3ed3edd8
name=Merge pull request #495 from YunoHost-Apps/25.0.2
; commit=d02166a533dcf8aa82d49dbb6a3a2dd9a7411812
name=Merge pull request #495 from 26.0.3
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&

View file

@ -47,6 +47,11 @@ location ^~ __PATH__/ {
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;
# The settings allows you to optimize the HTTP2 bandwitdth.
# See https://blog.cloudflare.com/delivering-http-2-upload-speed-improvements/
# for tunning hints
client_body_buffer_size 512k;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
@ -87,7 +92,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;
@ -107,7 +112,7 @@ location ^~ __PATH__/ {
fastcgi_request_buffering off;
}
location ~ ^__PATH__/(?:updater|oc[ms]-provider)(?:$|/) {
location ~ ^__PATH__/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}

View file

@ -6,7 +6,7 @@
"en": "Online storage, file sharing platform and various other applications",
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
},
"version": "26.0.2~ynh2",
"version": "27.1.2~ynh2",
"url": "https://nextcloud.com",
"upstream": {
"license": "AGPL-3.0",
@ -23,7 +23,7 @@
"email": "pierre@kayou.io"
},
"requirements": {
"yunohost": ">= 11.1.15"
"yunohost": ">= 11.2"
},
"multi_instance": true,
"services": [

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="8.1"
YNH_PHP_VERSION="8.2"
php_dependencies="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"

View file

@ -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
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# CHECK IF ARGUMENTS ARE CORRECT
#=================================================
#=================================================
# DEFINE FUNCTION
#=================================================
# Define a function to execute commands with `occ`
exec_occ() {
(cd "$final_path" && 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

View file

@ -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
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# CHECK IF ARGUMENTS ARE CORRECT
#=================================================
#=================================================
# CHECK IF AN ACTION HAS TO BE DONE
#=================================================
# Check the current status of the maintenance mode
if [ "$(grep "maintenance" "$final_path/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 "$final_path" && 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

View file

@ -336,10 +336,10 @@ 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
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path

View file

@ -139,10 +139,10 @@ mkdir -p "$datadir"
# 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
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path

View file

@ -452,10 +452,10 @@ 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
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path

View file

@ -0,0 +1,7 @@
#!/bin/bash
# Last available Nextcloud version
next_version="27.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="3d312a09b9345ac058758dd7b4059bf3cf0b1f0f1d747251b6fac3585ba6533f"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Last available Nextcloud version
next_version="26.0.2"
next_version="27.1.2"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="f3db0ec5e0aaff7c088eb34f752d77d79913bc6784e0fc47a84cdaa28e567a33"
nextcloud_source_sha256="0742b247aaee0b7044db0062f0a914aa77338c7a7d8fe7da0917147d76689721"