From fbafc332637e5962881b5f1be7505d342c802ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 11:36:53 +0100 Subject: [PATCH 01/14] manifestv2 --- check_process | 19 ------ doc/{DISCLAIMER.md => ADMIN.md} | 2 +- doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 2 +- manifest.json | 50 ---------------- manifest.toml | 75 ++++++++++++++++++++++++ scripts/_common.sh | 3 - scripts/backup | 10 ++-- scripts/install | 84 ++------------------------- scripts/remove | 53 ++++------------- scripts/restore | 14 ++--- scripts/upgrade | 42 +++++++------- tests.toml | 7 +++ 12 files changed, 131 insertions(+), 230 deletions(-) delete mode 100644 check_process rename doc/{DISCLAIMER.md => ADMIN.md} (92%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (92%) delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/check_process b/check_process deleted file mode 100644 index 6cad445..0000000 --- a/check_process +++ /dev/null @@ -1,19 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - password="1Strong-Password" - nextcloud_domain="nextcloud.tld" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=0 - setup_public=1 - upgrade=1 - backup_restore=1 - multi_instance=0 - change_url=0 -;;; Options -Email= -Notification=none diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 92% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md index 94c0f98..2b834ac 100644 --- a/doc/DISCLAIMER.md +++ b/doc/ADMIN.md @@ -1,7 +1,7 @@ ## Configuration **Settings:** -The settings of Collabora are at `https://office.domain.tld/browser/dist/admin/admin.html`. +The settings of Collabora are at `https://__DOMAIN__/browser/dist/admin/admin.html`. - User: admin - Password: The password set during the installation. (If you forgot it, you can find it again in `/etc/coolwsd/coolwsd.xml`). diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 92% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md index ea64e03..cffb337 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/ADMIN_fr.md @@ -1,7 +1,7 @@ ## Configuration **Paramètres :** -Les paramètres de Collabora sont à `https://office.domain.tld/browser/dist/admin/admin.html`. +Les paramètres de Collabora sont à `https://__DOMAIN__/browser/dist/admin/admin.html`. - Utilisateur : admin - Mot de passe : Le mot de passe défini lors de l'installation. (Si vous l'avez oublié, vous pouvez le retrouver dans `/etc/coolwsd/coolwsd.xml`). diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 153e1f7..0000000 --- a/manifest.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "Collabora Online", - "id": "collabora", - "packaging_format": 1, - "description": { - "en": "LibreOffice-based online office suite with collaborative editing", - "fr": "Suite office en ligne et collaborative, basée sur LibreOffice" - }, - "version": "22.05.14.3~ynh1", - "url": "https://collaboraoffice.com", - "upstream": { - "license": "MPL-2.0", - "website": "https://collaboraoffice.com", - "admindoc": "https://www.collaboraoffice.com/code/" - }, - "license": "MPL-2.0", - "maintainer": { - "name": "rafi59", - "email": "rafi59_dev@srvmaison.fr.nf" - }, - "requirements": { - "yunohost": ">= 11.2" - }, - "multi_instance": false, - "services": [ - "nginx" - ], - "arguments": { - "install" : [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "password", - "type": "password" - }, - { - "name": "nextcloud_domain", - "type": "string", - "ask": { - "en": "The domain of your Nextcloud instance", - "fr": "Le domain de votre instance Nextcloud" - }, - "example": "example.com/nextcloud", - "default": "" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..3ac57ca --- /dev/null +++ b/manifest.toml @@ -0,0 +1,75 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json + +packaging_format = 2 + +id = "collabora" +name = "Collabora Online" +description.en = "LibreOffice-based online office suite with collaborative editing" +description.fr = "Suite office en ligne et collaborative, basée sur LibreOffice" + +version = "22.05.14.3~ynh1" + +maintainers = ["rafi59"] + +[upstream] +license = "MPL-2.0" +website = "https://collaboraoffice.com" +admindoc = "https://www.collaboraoffice.com/code/" +cpe = "cpe:2.3:a:collabora:online" + +[integration] +yunohost = ">= 11.2" +architectures = ["amd64", "i386", "arm64"] +multi_instance = false +ldap = "not_relevant" +sso = "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] + type = "domain" + + [install.init_main_permission] + help.en = "You will only be able to connect Collabora to Nextcloud if both apps are public!" + help.fr = "Nextcloud et Collabora doivent être des applications publiques si vous voulez les connecter !" + type = "group" + default = "visitors" + + [install.password] + type = "password" + + [install.nextcloud_domain] + ask.en = "The domain of your Nextcloud instance" + ask.fr = "Le domain de votre instance Nextcloud" + type = "string" + example = "example.com/nextcloud" + default = "" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + + [resources.ports] + main.default = 9980 + + [resources.apt] + packages = [ + "hunspell-de-de", + "hunspell-en-gb", + "hunspell-fr", + "hunspell", + ] + + [resources.apt.extras.collabora] + repo = "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " + key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" + packages = [ + "coolwsd", + "code-brand" + ] diff --git a/scripts/_common.sh b/scripts/_common.sh index 94e9d8f..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="coolwsd code-brand hunspell-de-de hunspell-en-gb hunspell-fr hunspell" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 0884082..32782c7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,20 +14,20 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # 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 -domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/install b/scripts/install index 6d59bae..4b22c5a 100644 --- a/scripts/install +++ b/scripts/install @@ -10,59 +10,10 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# MANAGE SCRIPT FAILURE +# INITIALIZE AND STORE SETTINGS #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url="/" -password=$YNH_APP_ARG_PASSWORD -nextcloud_domain=$YNH_APP_ARG_NEXTCLOUD_DOMAIN - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 - -if dpkg-architecture --is armhf -then - ynh_die --message="Sorry, this app can not be installed on an ARM architecture" -fi - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 - -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=password --value=$password -ynh_app_setting_set --app=$app --key=nextcloud_domain --value=$nextcloud_domain - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 - -# Find a free port -port=$(ynh_find_port --port=9980) -ynh_app_setting_set --app=$app --key=port --value=$port +ynh_app_setting_set --app="$app" --key=password --value="$password" #================================================= # CONFIGURE ONLYOFFICE @@ -78,26 +29,13 @@ ynh_add_config --template="../conf/coolwsd.xml" --destination="/etc/coolwsd/cool chmod 640 "/etc/coolwsd/coolwsd.xml" #================================================= -# INSTALL DEPENDENCIES +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=10 - -DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) -ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=3 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" #================================================= @@ -111,20 +49,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=5 # NB. : we need a stupid *re*start because the service is in fact already started during the damn package install ... so it won't find a recent "Ready to accept connection" match ... ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="systemd" --line_match="Ready to accept connections" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -ynh_permission_update --permission="main" --add="visitors" --show_tile="false" - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 588d3ed..777208f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,63 +10,30 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) - -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status "coolwsd" >/dev/null -then - ynh_script_progression --message="Removing coolwsd service integration..." --weight=1 - yunohost service remove "coolwsd" +if ynh_exec_warn_less yunohost service status "coolwsd" >/dev/null; then + yunohost service remove "coolwsd" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config --service="coolwsd" -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory" -# on apt remove -touch /etc/apt/apt.conf.d/25loolwsd - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= - # Remove a directory securely ynh_secure_remove --file="/etc/coolwsd" + +# FIXME: is it still required? +# Fix "rm: cannot remove '/etc/apt/apt.conf.d/25loolwsd': No such file or directory" +# on apt remove +touch /etc/apt/apt.conf.d/25loolwsd + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index dbf3f14..a358701 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,21 +14,21 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # 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..." --weight=1 -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) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) #================================================= # STANDARD RESTORATION STEPS @@ -51,10 +51,10 @@ chmod 640 "/etc/coolwsd/coolwsd.xml" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=10 +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=10 DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) -ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index 78a4120..7762fb3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,15 +12,15 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -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) -port=$(ynh_app_setting_get --app=$app --key=port) -password=$(ynh_app_setting_get --app="$app" --key=password) -nextcloud_domain=$(ynh_app_setting_get --app="$app" --key=nextcloud_domain) +#REMOVEME? domain=$(ynh_app_setting_get --app="$app" --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? password=$(ynh_app_setting_get --app="$app" --key=password) +#REMOVEME? nextcloud_domain=$(ynh_app_setting_get --app="$app" --key=nextcloud_domain) #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -33,13 +33,13 @@ then fi # If db_name doesn't exist, create it -if [ -z "$path_url" ]; then - path_url="/" - ynh_app_setting_set --app=$app --key=path_url --value=$path_url +if [ -z "$path" ]; then + path="/" +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path fi -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 @@ -47,17 +47,17 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # restore it if the upgrade fails ynh_clean_check_starting - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # REMOVE OLD SERVICE INTEGRATION IN YUNOHOST @@ -108,10 +108,10 @@ chmod 640 "/etc/coolwsd/coolwsd.xml" #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=10 +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=10 DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) -ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -130,9 +130,9 @@ ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="syste #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..6a40a92 --- /dev/null +++ b/tests.toml @@ -0,0 +1,7 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json + +test_format = 1.0 + +[default] + + # test_upgrade_from.5725c85c09f1d3b76d12a4dc4d367ec911cd0019.name = "Last packaging v1 version" From 7637853076ed2f81e8eff7b7d8c844af28206a3d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 29 Jan 2024 10:36:59 +0000 Subject: [PATCH 02/14] Auto-update README --- README.md | 24 ------------------------ README_fr.md | 24 ------------------------ 2 files changed, 48 deletions(-) diff --git a/README.md b/README.md index a0c578e..d12f998 100644 --- a/README.md +++ b/README.md @@ -35,30 +35,6 @@ Collabora Online is a powerful LibreOffice-based online office that supports all ![Screenshot of Collabora Online](./doc/screenshots/Nextcloud-writer.png) -## Disclaimers / important information - -## Configuration - -**Settings:** -The settings of Collabora are at `https://office.domain.tld/browser/dist/admin/admin.html`. - -- User: admin -- Password: The password set during the installation. (If you forgot it, you can find it again in `/etc/coolwsd/coolwsd.xml`). - -## Connexion to Nextcloud - -If you want to connect with Nextcloud, you have to install the [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) app in Nextcloud, and configure it with the domain of your Collabora installation. - -*:warning: There are several Collabora Online apps. Be sure **not** to install the `Collabora Online - Built-in CODE server` apps, which are a lightwheigt version of this Collabora package. :warning:* - -## Limitations - -**ARM platform not supported.** If you want to run Collabora on Nextcloud, there is a lightweight version of the Collabora server for ARM, called [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) which can easily connect with the [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) app. - -**CODE has a warning limitation** - -![](https://www.libreoffice.org/assets/Uploads/LibreOffice-Online-limit.png) - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index b2d4222..7d44914 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,30 +34,6 @@ Collabora Online est une suite bureautique en ligne open source basé sur LibreO ![Capture d’écran de Collabora Online](./doc/screenshots/Nextcloud-writer.png) -## Avertissements / informations importantes - -## Configuration - -**Paramètres :** -Les paramètres de Collabora sont à `https://office.domain.tld/browser/dist/admin/admin.html`. - -- Utilisateur : admin -- Mot de passe : Le mot de passe défini lors de l'installation. (Si vous l'avez oublié, vous pouvez le retrouver dans `/etc/coolwsd/coolwsd.xml`). - -## Connexion à Nextcloud - -Si vous souhaitez vous connecter à Nextcloud, vous devez installer l'application [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) dans Nextcloud, et la configurer avec le domaine de votre installation Collabora. - -*:warning: Il existe plusieurs applications Collabora Online. Assurez-vous **de ne pas** installer les applications `Collabora Online - Built-in CODE server`, qui sont une version allégée de ce package Collabora. :warning:* - -## Limites - -**Plateforme ARM non prise en charge.** Si vous souhaitez exécuter Collabora sur Nextcloud, il existe une version allégée du serveur Collabora pour ARM, appelée [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) qui peut facilement se connecter à l'application [Collabora Online](https://apps.nextcloud.com/apps/richdocuments). - -**CODE a une limitation d'avertissement** - -![](https://www.libreoffice.org/assets/Uploads/LibreOffice-Online-limit.png) - ## Documentations et ressources * Site officiel de l’app : From bc49537ea64e5aabe618480014839bafbe823b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 11:51:14 +0100 Subject: [PATCH 03/14] Fix tests args --- tests.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.toml b/tests.toml index 6a40a92..81081c2 100644 --- a/tests.toml +++ b/tests.toml @@ -4,4 +4,6 @@ test_format = 1.0 [default] + args.nextcloud_domain = "nextcloud.tld" + # test_upgrade_from.5725c85c09f1d3b76d12a4dc4d367ec911cd0019.name = "Last packaging v1 version" From b4dd95912618e8da47f1cd933ddd51cc8688afc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 12:35:22 +0100 Subject: [PATCH 04/14] fix apt repository --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 3ac57ca..15f497d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -67,7 +67,7 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen ] [resources.apt.extras.collabora] - repo = "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " + repo = "deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./ " key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" packages = [ "coolwsd", From 1c0d37c805fdf7aa4aad6a15b09cd8a06f349923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 13:39:09 +0100 Subject: [PATCH 05/14] debug --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 4b22c5a..3e1b6f6 100644 --- a/scripts/install +++ b/scripts/install @@ -38,6 +38,8 @@ ynh_add_nginx_config yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" +ynh_exec_warn systemctl cat coolwsd + #================================================= # GENERIC FINALIZATION #================================================= From edc571353f4a383ba45b1dfed6a172e06fb289a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 13:48:39 +0100 Subject: [PATCH 06/14] Fix file permissions --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 3e1b6f6..a7813d9 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,9 @@ ynh_script_progression --message="Installing config file..." --weight=2 # because we're in a reverse proxy context... mkdir -p /etc/coolwsd ynh_add_config --template="../conf/coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" + chmod 640 "/etc/coolwsd/coolwsd.xml" +chown cool:root -R /etc/coolwsd #================================================= # SYSTEM CONFIGURATION From 26ce270ffb1dab94747cc963814cc67981501eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 14:05:39 +0100 Subject: [PATCH 07/14] try to fix install start --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a7813d9..df65daa 100644 --- a/scripts/install +++ b/scripts/install @@ -51,7 +51,9 @@ ynh_script_progression --message="Starting a systemd service..." --weight=5 # Start a systemd service # NB. : we need a stupid *re*start because the service is in fact already started during the damn package install ... so it won't find a recent "Ready to accept connection" match ... -ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="systemd" --line_match="Ready to accept connections" +ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" +ynh_systemd_action --service-name="coolwsd" --action="reset-failed" +ynh_systemd_action --service_name="coolwsd" --action="start" --log_path="systemd" --line_match="Ready to accept connections" #================================================= # END OF SCRIPT From fe0de4212ce9fe8116dcf7422b0d06e199e6e6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 14:05:51 +0100 Subject: [PATCH 08/14] disable not implemented change_url --- scripts/install | 2 +- tests.toml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index df65daa..71d8e02 100644 --- a/scripts/install +++ b/scripts/install @@ -52,7 +52,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=5 # Start a systemd service # NB. : we need a stupid *re*start because the service is in fact already started during the damn package install ... so it won't find a recent "Ready to accept connection" match ... ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" -ynh_systemd_action --service-name="coolwsd" --action="reset-failed" +systemctl reset-failed coolwsd ynh_systemd_action --service_name="coolwsd" --action="start" --log_path="systemd" --line_match="Ready to accept connections" #================================================= diff --git a/tests.toml b/tests.toml index 81081c2..cd550e9 100644 --- a/tests.toml +++ b/tests.toml @@ -6,4 +6,6 @@ test_format = 1.0 args.nextcloud_domain = "nextcloud.tld" + exclude = ["change_url"] + # test_upgrade_from.5725c85c09f1d3b76d12a4dc4d367ec911cd0019.name = "Last packaging v1 version" From 0b78db8c099ff907c01f9c6306ce67a66626c074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 14:32:20 +0100 Subject: [PATCH 09/14] continue packaging v2 --- scripts/backup | 23 +------------- scripts/install | 8 ++--- scripts/restore | 47 +++++++---------------------- scripts/upgrade | 80 ++++++------------------------------------------- 4 files changed, 25 insertions(+), 133 deletions(-) diff --git a/scripts/backup b/scripts/backup index 32782c7..637142e 100644 --- a/scripts/backup +++ b/scripts/backup @@ -10,25 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# 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? domain=$(ynh_app_setting_get --app=$app --key=domain) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -41,9 +22,7 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP CONFIGURATION +# BACKUP VARIOUS FILES #================================================= ynh_backup --src_path="/etc/coolwsd/coolwsd.xml" diff --git a/scripts/install b/scripts/install index 71d8e02..615a4d6 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_script_progression --message="Installing config file..." --weight=2 # config directory which of course doesn't exists and we want to disable SSL # because we're in a reverse proxy context... mkdir -p /etc/coolwsd -ynh_add_config --template="../conf/coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" +ynh_add_config --template="coolwsd.xml" --destination="/etc/coolwsd/coolwsd.xml" chmod 640 "/etc/coolwsd/coolwsd.xml" chown cool:root -R /etc/coolwsd @@ -40,8 +40,6 @@ ynh_add_nginx_config yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" -ynh_exec_warn systemctl cat coolwsd - #================================================= # GENERIC FINALIZATION #================================================= @@ -49,10 +47,12 @@ ynh_exec_warn systemctl cat coolwsd #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=5 -# Start a systemd service # NB. : we need a stupid *re*start because the service is in fact already started during the damn package install ... so it won't find a recent "Ready to accept connection" match ... ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" +# The service installed by the deb package failed in loop, thus the reset-failed. systemctl reset-failed coolwsd + +# Start a systemd service ynh_systemd_action --service_name="coolwsd" --action="start" --log_path="systemd" --line_match="Ready to accept connections" #================================================= diff --git a/scripts/restore b/scripts/restore index a358701..a03a214 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,26 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading settings..." --weight=1 - -#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) - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -44,17 +24,9 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Restoring the configuration..." --weight=3 ynh_restore_file --origin_path="/etc/coolwsd/coolwsd.xml" + chmod 640 "/etc/coolwsd/coolwsd.xml" - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=10 - -DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null +chown cool:root -R /etc/coolwsd #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -63,17 +35,20 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" +#================================================= +# GENERIC FINALIZATION #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Starting a systemd service..." --weight=5 -ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="systemd" --line_match="Ready to accept connections" +# NB. : we need a stupid *re*start because the service is in fact already started during the damn package install ... so it won't find a recent "Ready to accept connection" match ... +ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" +# The service installed by the deb package failed in loop, thus the reset-failed. +systemctl reset-failed coolwsd -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 +# Start a systemd service +ynh_systemd_action --service_name="coolwsd" --action="start" --log_path="systemd" --line_match="Ready to accept connections" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7762fb3..0247200 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,65 +9,23 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#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? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? password=$(ynh_app_setting_get --app="$app" --key=password) -#REMOVEME? nextcloud_domain=$(ynh_app_setting_get --app="$app" --key=nextcloud_domain) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 -if ynh_compare_current_package_version --comparison le --version 6.4.10~ynh2 -then - ynh_die --message="Upgrade from version 6.4.10 is not possible. You must uninstall and reinstall Collabora package manually" +if ynh_compare_current_package_version --comparison le --version 6.4.10~ynh2; then + ynh_die --message="Upgrade from version 6.4.10 is not possible. You must uninstall and reinstall Collabora package manually" fi -# If db_name doesn't exist, create it -if [ -z "$path" ]; then - path="/" -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -fi - -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # restore it if the upgrade fails - ynh_clean_check_starting -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # REMOVE OLD SERVICE INTEGRATION IN YUNOHOST #================================================= # Remove the old service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status "loolwsd" >/dev/null -then - ynh_script_progression --message="Removing loolwsd service integration..." --weight=1 - yunohost service remove "loolwsd" +if ynh_exec_warn_less yunohost service status "loolwsd" >/dev/null; then + ynh_script_progression --message="Removing loolwsd service integration..." --weight=1 + yunohost service remove "loolwsd" fi #================================================= @@ -87,14 +45,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=5 ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" --line_match="Stopped Collabora Online WebSocket Daemon" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE CONFIG #================================================= @@ -106,17 +56,12 @@ chown cool: "/etc/coolwsd/coolwsd.xml" chmod 640 "/etc/coolwsd/coolwsd.xml" #================================================= -# UPGRADE DEPENDENCIES +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=10 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -DEBIAN_VERSION_NUMBER=$(cat /etc/debian_version | head -n 1 | cut -f1 -d .) -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://collaboraoffice.com/repos/CollaboraOnline/CODE-debian${DEBIAN_VERSION_NUMBER} ./ " --package="$pkg_dependencies" --key="https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C54D189F4BA284D" 2>/dev/null - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +# Create a dedicated NGINX config +ynh_add_nginx_config yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" @@ -127,13 +72,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=3 ynh_systemd_action --service_name="coolwsd" --action="restart" --log_path="systemd" --line_match="Ready to accept connections" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From 69389a3799cdb9a891cabfcb5e04e9b1a935b511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 15:15:34 +0100 Subject: [PATCH 10/14] Use a index.html instead of return in nginx --- conf/nginx.conf | 11 ++++++----- conf/root_index.html | 7 +++++++ scripts/install | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 conf/root_index.html diff --git a/conf/nginx.conf b/conf/nginx.conf index 436d7e5..5a7c4f8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,4 @@ -rewrite ^$ /; -location ~ ^/$ { - default_type text/plain; - return 200 "This is where Collabora Online is installed. To actually be useful, this needs to be integrated in a front-end such as Nextcloud for example."; -} +# rewrite ^$ / permanent; # static files location ^~ /browser { @@ -50,3 +46,8 @@ location ^~ /cool/adminws { proxy_set_header Host $host; proxy_read_timeout 36000s; } + +location / { + alias __INSTALL_DIR__/; + index index.html; +} diff --git a/conf/root_index.html b/conf/root_index.html new file mode 100644 index 0000000..f638df0 --- /dev/null +++ b/conf/root_index.html @@ -0,0 +1,7 @@ + + + + +This is where Collabora Online is installed. To actually be useful, this needs to be integrated in a front-end such as Nextcloud for example. + + diff --git a/scripts/install b/scripts/install index 615a4d6..4a2ac59 100644 --- a/scripts/install +++ b/scripts/install @@ -15,6 +15,15 @@ source /usr/share/yunohost/helpers ynh_app_setting_set --app="$app" --key=password --value="$password" +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 + +ynh_add_config --template="root_index.html" --destination="$install_dir/index.html" + +chown -R "$app:www-data" "$install_dir" + #================================================= # CONFIGURE ONLYOFFICE #================================================= From f09a2a447158022d40bd4fe99454f73c696321b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 16:41:57 +0100 Subject: [PATCH 11/14] Update doc --- doc/ADMIN.md | 10 +--------- doc/ADMIN_fr.md | 9 +-------- doc/POST_INSTALL.md | 1 + doc/PRE_INSTALL.md | 8 ++++++++ doc/PRE_INSTALL_fr.md | 7 +++++++ 5 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 doc/POST_INSTALL.md create mode 100644 doc/PRE_INSTALL.md create mode 100644 doc/PRE_INSTALL_fr.md diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 2b834ac..0f6d826 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -6,16 +6,8 @@ The settings of Collabora are at `https://__DOMAIN__/browser/dist/admin/admin.ht - User: admin - Password: The password set during the installation. (If you forgot it, you can find it again in `/etc/coolwsd/coolwsd.xml`). -## Connexion to Nextcloud +## Connection to Nextcloud If you want to connect with Nextcloud, you have to install the [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) app in Nextcloud, and configure it with the domain of your Collabora installation. *:warning: There are several Collabora Online apps. Be sure **not** to install the `Collabora Online - Built-in CODE server` apps, which are a lightwheigt version of this Collabora package. :warning:* - -## Limitations - -**ARM platform not supported.** If you want to run Collabora on Nextcloud, there is a lightweight version of the Collabora server for ARM, called [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) which can easily connect with the [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) app. - -**CODE has a warning limitation** - -![](https://www.libreoffice.org/assets/Uploads/LibreOffice-Online-limit.png) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index cffb337..e29f1d9 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -11,11 +11,4 @@ Les paramètres de Collabora sont à `https://__DOMAIN__/browser/dist/admin/admi Si vous souhaitez vous connecter à Nextcloud, vous devez installer l'application [Collabora Online](https://apps.nextcloud.com/apps/richdocuments) dans Nextcloud, et la configurer avec le domaine de votre installation Collabora. *:warning: Il existe plusieurs applications Collabora Online. Assurez-vous **de ne pas** installer les applications `Collabora Online - Built-in CODE server`, qui sont une version allégée de ce package Collabora. :warning:* - -## Limites - -**Plateforme ARM non prise en charge.** Si vous souhaitez exécuter Collabora sur Nextcloud, il existe une version allégée du serveur Collabora pour ARM, appelée [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) qui peut facilement se connecter à l'application [Collabora Online](https://apps.nextcloud.com/apps/richdocuments). - -**CODE a une limitation d'avertissement** - -![](https://www.libreoffice.org/assets/Uploads/LibreOffice-Online-limit.png) +ice-Online-limit.png) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..20ceac5 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1 @@ +You can now use Collabora Online with Nextcloud, see the admin panel for more information! diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md new file mode 100644 index 0000000..897e4d2 --- /dev/null +++ b/doc/PRE_INSTALL.md @@ -0,0 +1,8 @@ + +## ARM platform not supported + +If you want to run Collabora on Nextcloud, there is a lightweight version of the Collabora server for ARM, called [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) which can easily connect with the [Nextcloud Office](https://apps.nextcloud.com/apps/richdocuments) app. + +## Usage limitation + +![LibreOffice online has a warning when more than 10 documents or more than 20 connections are in use.](https://www.libreoffice.org/assets/Uploads/LibreOffice-Online-limit.png) diff --git a/doc/PRE_INSTALL_fr.md b/doc/PRE_INSTALL_fr.md new file mode 100644 index 0000000..271e068 --- /dev/null +++ b/doc/PRE_INSTALL_fr.md @@ -0,0 +1,7 @@ +## Plateforme ARM non prise en charge + +Si vous souhaitez exécuter Collabora sur Nextcloud, il existe une version allégée du serveur Collabora pour ARM, appelée [Collabora Online - Built-in CODE Server (ARM64)](https://apps.nextcloud.com/apps/richdocumentscode_arm64) qui peut facilement se connecter à l'application [Collabora Online](https://apps.nextcloud.com/apps/richdocuments). + +## Avertissement de limite d'usage + +![LibreOffice online a un avertissement quand plus de 10 documents ou plus de 20 connections sont utilisées.](https://www.libreoffice.org/assets/Uploads/LibreOff From 6a18432052c7526855c8f123bddc49def36d6689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 16:43:01 +0100 Subject: [PATCH 12/14] Fix backup-restore --- scripts/backup | 6 ++++++ scripts/restore | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/backup b/scripts/backup index 637142e..59b1d7d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,6 +15,12 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= + +ynh_backup --src_path="$install_dir" + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index a03a214..8151baf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -11,12 +11,16 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION +# RESTORE THE APP MAIN DIR #================================================= +ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore_file --origin_path="$install_dir" + +### $install_dir will automatically be initialized with some decent +### permissions by default ... however, you may need to recursively reapply +### ownership to all files such as after the ynh_setup_source step +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE CONFIGURATION @@ -29,9 +33,11 @@ chmod 640 "/etc/coolwsd/coolwsd.xml" chown cool:root -R /etc/coolwsd #================================================= -# INTEGRATE SERVICE IN YUNOHOST +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" yunohost service add "coolwsd" --description="Collabora online office suite" --log="/var/log/$app/$app.log" From 90301bdef5f6a90049d806fb6204df077f2328a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 16:44:12 +0100 Subject: [PATCH 13/14] fix upgrade --- scripts/upgrade | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0247200..7d34b90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,12 +28,7 @@ if ynh_exec_warn_less yunohost service status "loolwsd" >/dev/null; then yunohost service remove "loolwsd" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the old systemd service..." --weight=1 - -# Remove the dedicated systemd config +# Remove the legacy systemd config ynh_remove_systemd_config --service="loolwsd" #================================================= @@ -45,6 +40,15 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=5 ynh_systemd_action --service_name="coolwsd" --action="stop" --log_path="systemd" --line_match="Stopped Collabora Online WebSocket Daemon" +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 + +ynh_add_config --template="root_index.html" --destination="$install_dir/index.html" + +chown -R "$app:www-data" "$install_dir" + #================================================= # UPGRADE CONFIG #================================================= From 89efbb77a0842ee2f281c3bf2ab268e12296259b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 29 Jan 2024 17:09:06 +0100 Subject: [PATCH 14/14] remove fixmes --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 15f497d..910367a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,9 +23,9 @@ architectures = ["amd64", "i386", "arm64"] multi_instance = false ldap = "not_relevant" sso = "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, ... +disk = "1G" +ram.build = "300M" +ram.runtime = "600M" [install] [install.domain]