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

Merge pull request #338 from ericgaspar/v.20.0

Upgrade to v.20.0.0
This commit is contained in:
Kayou 2020-10-26 11:57:16 +01:00 committed by GitHub
commit b9cccdd59d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 65 additions and 68 deletions

View file

@ -9,12 +9,10 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## Overview
[Nextcloud](https://nextcloud.com) gives you freedom and control over your
own data. A personal cloud which runs on your own server. With Nextcloud
you can synchronize your files over your devices.
[Nextcloud](https://nextcloud.com) gives you freedom and control over your own data. A personal cloud which runs on your own server. With Nextcloud you can synchronize your files over your devices.
**Shipped version:** 19.0.4
**Shipped version:** 20.0.0
## Screenshots
@ -37,11 +35,11 @@ you can synchronize your files over your devices.
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.
- 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 is only available for x86 architecture - **ARM** (Raspberry Pi, …) is **not** supported*
*NB: OnlyOffice is only available for x86 architecture - **ARM** architecture is **not** supported (Raspberry Pi, OLinuXino...)*
## YunoHost specific features
@ -51,10 +49,8 @@ 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
* 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
#### Multi-users support
@ -65,13 +61,9 @@ this package:
## Limitations
To integrate the logout button to the SSO, we have to patch Nextcloud sources.
In waiting an upstream integration, the source code integrity checking has been
disabled to prevent the warning message.
To integrate the logout button to the SSO, we have to patch Nextcloud sources. In waiting an upstream integration, the source code integrity checking has been disabled to prevent the warning message.
Also, note we made the choice to disable third-parties applications at the
upgrade. It allows to prevent an unstable - and sometimes broken - Nextcloud
installation. You will just have to manually activate them after the upgrade.
Also, note we made the choice to disable third-parties applications at the upgrade. It allows to prevent an unstable - and sometimes broken - Nextcloud installation. You will just have to manually activate them after the upgrade.
Finally, the following error message in Nextcloud logs can be safely ignored:
```
@ -91,15 +83,11 @@ If you need/want to use Nextcloud `occ` command¹, you need to be in `/var/www/n
#### Migrate from ownCloud
**This is not considered as stable yet, please do it with care and only for
testing!**
**This is not considered as stable yet, please do it with care and only for testing!**
This package handles the migration from ownCloud to Nextcloud. For that, your
ownCloud application must be **up-to-date** in YunoHost.
This package handles the migration from ownCloud to Nextcloud. For that, your ownCloud application must be **up-to-date** in YunoHost.
You will then have to upgrade your ownCloud application with this repository.
This can only be done from the command-line interface - e.g. through SSH. Once
you're connected, you simply have to execute the following:
You will then have to upgrade your ownCloud application with this repository. This can only be done from the command-line interface - e.g. through SSH. Once you're connected, you simply have to execute the following:
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh owncloud --debug
@ -108,13 +96,9 @@ sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh ownc
The `--debug` option will let you see the full output. If you encounter any
issue, please paste it.
Note that a cron job will be executed at some time after the end of this
command. You must wait that before doing any other application operations!
You should see that Nextcloud is installed after that.
Note that a cron job will be executed at some time after the end of this command. You must wait that before doing any other application operations! You should see that Nextcloud is installed after that.
Note that it does not change the application label nor the URL. To rename
the label, you can execute the following - replace `Nextcloud` with whatever
you want:
Note that it does not change the application label nor the URL. To rename the label, you can execute the following - replace `Nextcloud` with whatever you want:
```bash
sudo yunohost app setting nextcloud label -v "Nextcloud"
@ -130,8 +114,7 @@ sudo yunohost app ssowatconf
---
Developers infos
----------------
## Developers infos
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing).

View file

@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
[Nextcloud](https://nextcloud.com) vous donne la liberté et le contrôle sur vos données. Un nuage personnel qui tourne sur votre serveur.
Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils.
**Version incluse :** 19.0.4
**Version incluse :** 20.0.0
## Captures d'écran
@ -34,14 +34,14 @@ Avec NextCloud vous pouvez synchroniser vos fichiers sur vos appareils.
#### Configurer l'intégration d'OnlyOffice
À partir de sa version 18, Nextcloud intégre une intégration directe de OnlyOffice (un éditeur de texte enrichi en ligne) via une application Nextcloud.
Pour l'installer et le 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.
À 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 : OnlyOffice n'est disponible que sous architecture x86 - **ARM** (Raspberry Pi, …) n'est **pas** supporté*
*NB : OnlyOffice n'est disponible que sous architecture x86 - L'architecture **ARM** n'est **pas** supporté (Raspberry Pi, OLinuXino...)*
## Caractéristiques spécifiques YunoHost
@ -79,9 +79,9 @@ Following symlinks is not allowed ('/home/yunohost.multimedia/user/Share' -> '/h
**La migration n'est pas encore considérée comme stable, merci de la faire prudemment et uniquement pour tester !**
Ce package gère la migration de OwnCloud vers Nextcloud. Pour ça, l'application OwnCloud doit **être à jour** dans YunoHost.
Ce package gère la migration de ownCloud vers Nextcloud. Pour ça, l'application ownCloud doit **être à jour** dans YunoHost.
Vous allez ensuite mettre à niveau votre OwnCloud avec ce dépôt.
Vous allez ensuite mettre à niveau votre ownCloud avec ce dépôt.
Ça ne peut être fait qu'en ligne de commande - par exemple via SSH. Une fois connecté, vous n'avez plus qu'à exécuter la commande suivante :
```bash
sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh owncloud --debug
@ -107,8 +107,7 @@ sudo yunohost app ssowatconf
---
Informations pour les développeurs
----------------
## Informations pour les développeurs
Merci de faire votre « pull request » sur la [branche testing](https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing).
Pour tester la branche testing, faites comme ceci.

View file

@ -3,10 +3,10 @@
"name": "Nextcloud",
"packaging_format": 1,
"description": {
"en": "Access & share your files, calendars, contacts, mail & more from any device, on your terms",
"fr": "Consultez et partagez vos fichiers, agendas, carnets d'adresses, emails et bien plus depuis les appareils de votre choix, sous vos conditions"
"en": "Online storage, file sharing platform and various other applications",
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
},
"version": "19.0.4~ynh1",
"version": "20.0.0~ynh1",
"url": "https://nextcloud.com",
"license": "AGPL-3.0",
"maintainer": {

View file

@ -158,7 +158,7 @@ ynh_script_progression --message="Configuring Nextcloud..." --weight=8
# Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification
# Enable ldap plugin
# Enable LDAP plugin
exec_occ app:enable user_ldap
exec_occ ldap:create-empty-config
@ -187,7 +187,7 @@ ynh_secure_remove --file="$nc_conf"
#=================================================
# Check LDAP configuration to see if everything worked well
exec_occ ldap:test-config \'\' \
exec_occ ldap:test-config '' \
|| ynh_die --message="An error occured during LDAP configuration"
#=================================================
@ -324,9 +324,9 @@ ynh_use_logrotate --logfile="$datadir/nextcloud.log"
#=================================================
# SETUP FAIL2BAN
#=================================================
ynh_script_progression --message="Configuring Fail2ban..." --weight=8
ynh_script_progression --message="Configuring Fail2Ban..." --weight=8
# Create a dedicated Fail2ban config
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#=================================================

View file

@ -73,9 +73,9 @@ ynh_remove_logrotate
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Removing Fail2ban configuration..." --weight=8
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8
# Remove the dedicated Fail2ban config
# Remove the dedicated Fail2Ban config
ynh_remove_fail2ban_config
#=================================================

View file

@ -156,7 +156,7 @@ ynh_multimedia_addaccess $app
#=================================================
# RESTORE THE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the Fail2ban configuration..." --weight=7
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=7
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"

View file

@ -147,11 +147,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
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.
# 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
# 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
@ -163,7 +163,7 @@ then
sed --in-place --regexp-extended '/^location = \/\.well\-known\/(caldav|carddav) \{/,/\}/d' "../conf/nginx.conf"
fi
# Create a dedicated nginx config
# Create a dedicated NGINX config
ynh_add_nginx_config YNH_PHP_VERSION
#=================================================
@ -179,7 +179,7 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Recreate a dedicated php-fpm config
# Recreate a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
# Delete existing ini configuration file (backward compatibility)
@ -212,8 +212,8 @@ exec_occ() {
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`
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
@ -244,9 +244,17 @@ then
# The major version is the first part of the version number
current_major_version=${current_version%%.*}
if [ ! -f upgrade.d/upgrade.$current_major_version.sh ]; then
source upgrade.d/upgrade.last.sh
else
source upgrade.d/upgrade.$current_major_version.sh
fi
# If the current version has the same major version than the next one,
# then it's the last upgrade to do
if [ "$last_major_version" -eq "$current_major_version" ]; then
# We also cover the case where the last version is the first of the current major version series
# (e.g. 20.0.0 is the latest version)
if [[ ("$last_major_version" -eq "$current_major_version") || ( ("$last_major_version" -eq "$((current_major_version+1))") && ("$next_version" == "$last_version") ) ]]; then
current_major_version=last
# Enable YunoHost patches on Nextcloud sources
cp -a ../sources/patches_last_version/* ../sources/patches
@ -330,7 +338,7 @@ then
# Ensure that UpdateNotification app is disabled
exec_occ app:disable updatenotification
# Enable plugins
# Enable LDAP plugin
exec_occ app:enable user_ldap
# Load the config file in nextcloud
@ -442,9 +450,9 @@ ynh_use_logrotate --non-append
#=================================================
# SETUP FAIL2BAN
#=================================================
ynh_script_progression --message="Reconfiguring Fail2ban..." --weight=7
ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=7
# Create a dedicated Fail2ban config
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/home/yunohost.app/$app/data/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#=================================================
@ -471,7 +479,7 @@ ynh_systemd_action --service_name=nginx --action=reload
if [ $migration_process -eq 1 ]
then
ynh_print_info --message="OwnCloud has been successfully migrated to Nextcloud! \
ynh_print_info --message="ownCloud has been successfully migrated to Nextcloud! \
A last scheduled operation will run in a couple of minutes to finish the \
migration in YunoHost side. Do not proceed any application operation while \
you don't see Nextcloud as installed."

View file

@ -0,0 +1,7 @@
#!/bin/bash
# Last available nextcloud version
next_version="20.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="a273e0151f68567f729d9a82a7e3f124ff0f0471aa17bae6bfd83c5362d84cd8"

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Last available Nextcloud version
next_version="19.0.4"
# Last available nextcloud version
next_version="20.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="465711715d64cbdf0465fcb4405f23b6f0947b85bbe12b6577c9e1602c63ae78"
nextcloud_source_sha256="a273e0151f68567f729d9a82a7e3f124ff0f0471aa17bae6bfd83c5362d84cd8"