From 5560847680791c25c59803f8137e4d967d5059dd Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 24 Sep 2019 16:30:25 +0200 Subject: [PATCH 01/21] Point to right repository --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47afb8e..024716b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ OnlyOffice Document Server * Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues * App website: https://www.onlyoffice.com - * Github App website: https://github.com/ONLYOFFICE/CommunityServer + * Github App website: https://github.com/ONLYOFFICE/DocumentServer * YunoHost website: https://yunohost.org/ --- From bbbc3138dca13d921adacad910c094c0f8090f36 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 3 Apr 2020 20:13:19 +0200 Subject: [PATCH 02/21] [fix] Enseure fonts are generated --- scripts/install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index b350864..26ae24b 100644 --- a/scripts/install +++ b/scripts/install @@ -159,6 +159,14 @@ supervisorctl restart all sleep 30 +#================================================= +# REGENERATE FONTS +#================================================= +ynh_print_info --message="Generating fonts..." + +/usr/bin/documentserver-generate-allfonts.sh + + #================================================= # GENERIC FINALIZATION #================================================= From 96a234ff03fa377bd9788911b091f18e34a620fd Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 3 Apr 2020 20:14:59 +0200 Subject: [PATCH 03/21] [fix] Regenerate fonts --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f8e177e..75120c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,6 +152,13 @@ ynh_replace_string --match_string="\"rejectUnauthorized\": true" --replace_strin # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="/etc/onlyoffice/documentserver/default.json" +#================================================= +# REGENERATE FONTS +#================================================= +ynh_print_info --message="Generating fonts..." + +/usr/bin/documentserver-generate-allfonts.sh + #================================================= # GENERIC FINALIZATION #================================================= From 5c5ea91364b66e0982d1544df1ce835f730a6292 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 3 Apr 2020 20:15:57 +0200 Subject: [PATCH 04/21] [fix] Generate fonts during restore operation --- scripts/restore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/restore b/scripts/restore index 1467c11..92b9830 100644 --- a/scripts/restore +++ b/scripts/restore @@ -119,6 +119,13 @@ ynh_print_info --message="Restoring the configuration..." ynh_restore_file --origin_path="/etc/onlyoffice" +#================================================= +# REGENERATE FONTS +#================================================= +ynh_print_info --message="Generating fonts..." + +/usr/bin/documentserver-generate-allfonts.sh + #================================================= # GENERIC FINALIZATION #================================================= From e5a064cb4de23fadf87533f07180b5f8fe861f87 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 1 May 2020 15:34:50 +0200 Subject: [PATCH 05/21] Advise public install if nextcloud integration --- manifest.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 2a32d25..9ac1999 100644 --- a/manifest.json +++ b/manifest.json @@ -55,10 +55,14 @@ "name": "is_public", "type": "boolean", "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" + "en": "Is it a public application? Check the box if you want to use it with Nextcloud.", + "fr": "Est-ce une application publique ? Cocher la case si vous voulez l'intégrer dans Nextcloud." }, - "default": true + "default": true, + "help": { + "en": "You will only be able to integrate OnlyOffice in Nextcloud if both apps are public.", + "fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les intégrer." + } } ] } From 29de1e8f6d1ef9bfc6262d475d63b96beddc6ad3 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 1 May 2020 20:03:16 +0200 Subject: [PATCH 06/21] Explain server install and client config --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 024716b..414eed1 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,67 @@ -# OnlyOffice for YunoHost +# OnlyOffice Server for YunoHost [![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) [![Install OnlyOffice with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=onlyoffice) -> *This package allow you to install OnlyOffice quickly and simply on a YunoHost server. +> *This package allows you to install OnlyOffice quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview -OnlyOffice Document Server +This package installs a Document Server application supporting collaborative edition of OnlyOffice documents. Edition of documents requires a Client application such as the [OnlyOffice connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) or the [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) **Shipped version:** 5.2.8 +## Screenshots + +![](Link to a screenshot for this app) + +## Demo + +* A free 30 days demo of Document Server is available from OnlyOffice connector for Nextcloud: + * Install Nextcloud and the ONLYOFFICE app (connector) + * Go in the Nextcloud administrator settings, section ONLYOFFICE + * Tick the box `Connection to demo ONLYOFFICE Document Server`` in Server Parameters +* Some testing is also possible using [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) + +## Prerequisite +You should not install ``onlyoffice`` on your main YunoHost domain, especially if you want to use it with a ``nextcloud`` installed on the same domain. +* Add a new domain for OnlyOffice in YunoHost + * If your main YunoHost domain was provided by YunoHost, e.g. ``domain.nohost.me``, then you don't have to buy/register a new domain name + * Just click on ``I already have a domain`` + * Type e.g. ``office.domain.nohost.me`` and click on ``Add`` +* Add a Let's Encrypt certificate for this domain + +## Configuration of OnlyOffice Server +* Suppose: + * ``yunohost.domain`` is your main YunoHost domain + * you have configured ``office.yunohost.domain`` for OnlyOffice, see Prerequisite above + * you have Nextcloud installed on ``yunohost.domain/nextcloud`` or ``nextcloud.yunohost.domain`` +* Install ``onlyoffice`` using CLI or web admin + * Choose a domain name for OnlyOffice that is different from your Nextcloud domain, e.g. ``office.yunohost.domain`` (or ``office.domain.nohost.me`` previously created) + * Choose a path for OnlyOffice, e.g. ``/`` if you install on ``office.yunohost.domain`` (do not install any further app on this domain) + * The domain of your Nextcloud instance, e.g. ``yunohost.domain/nextcloud`` or ``nextcloud.yunohost.domain`` + * Is it a public application? **If you want to connect it to Nextcloud, OnlyOffice should be public**: then select ``Yes`` or ``tick the box`` + +## How to edit OnlyOffice documents? +### Web Edition in Nextcloud +Prerequisite: **OnlyOffice should be public**, see previous section. +* In Nextcloud apps store, install ``ONLYOFFICE``, i.e. the [OnlyOffice connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) +* Go in the Nextcloud ``settings``>``Administration``>``ONLYOFFICE``>``Server settings``>``Address of the Document Server`` +* Give the installation domain of your ``onlyoffice``, e.g. ``https://office.yunohost.domain/`` and click ``Save`` +* Create a new document and enjoy! + +### Desktop Edition on PC +* Download and install a [ONLYOFFICE Desktop Editor](https://www.onlyoffice.com/fr/download-desktop.aspx) +* Start the Editor and Go to ``Connect to cloud``>``Add cloud`` + * Select ``ONLYOFFICE`` and give the installation domain of your ``onlyoffice``, e.g. ``office.domain.nohost.me`` + * or (only if you connected ``onlyoffice`` to Nextcloud, see previous section) + * Select ``Nextcloud`` and give your nextcloud installation domain, e.g. ``yunohost.domain/nextcloud`` +* Create a new document and enjoy! + +## Documentation + ## YunoHost specific features +#### Multi-users support #### Supported architectures @@ -19,12 +69,21 @@ OnlyOffice Document Server * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/onlyoffice/) * Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/onlyoffice/) +## Limitations + +* + +## Additional information + +* + ## Links * Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues * App website: https://www.onlyoffice.com * Github App website: https://github.com/ONLYOFFICE/DocumentServer * YunoHost website: https://yunohost.org/ + * YunoHost documentation: If specific documentation is needed, feel free to contribute. --- From 0be17a160a8ff82d267b8ec4a8ef6fcbc45c4dc0 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 1 May 2020 20:07:27 +0200 Subject: [PATCH 07/21] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 414eed1..f5e7646 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ You should not install ``onlyoffice`` on your main YunoHost domain, especially i * you have configured ``office.yunohost.domain`` for OnlyOffice, see Prerequisite above * you have Nextcloud installed on ``yunohost.domain/nextcloud`` or ``nextcloud.yunohost.domain`` * Install ``onlyoffice`` using CLI or web admin - * Choose a domain name for OnlyOffice that is different from your Nextcloud domain, e.g. ``office.yunohost.domain`` (or ``office.domain.nohost.me`` previously created) + * Choose a domain name for OnlyOffice that is different from your Nextcloud domain, e.g. ``office.yunohost.domain`` (or ``office.domain.nohost.me``, see previous section) * Choose a path for OnlyOffice, e.g. ``/`` if you install on ``office.yunohost.domain`` (do not install any further app on this domain) * The domain of your Nextcloud instance, e.g. ``yunohost.domain/nextcloud`` or ``nextcloud.yunohost.domain`` * Is it a public application? **If you want to connect it to Nextcloud, OnlyOffice should be public**: then select ``Yes`` or ``tick the box`` @@ -53,7 +53,7 @@ Prerequisite: **OnlyOffice should be public**, see previous section. ### Desktop Edition on PC * Download and install a [ONLYOFFICE Desktop Editor](https://www.onlyoffice.com/fr/download-desktop.aspx) * Start the Editor and Go to ``Connect to cloud``>``Add cloud`` - * Select ``ONLYOFFICE`` and give the installation domain of your ``onlyoffice``, e.g. ``office.domain.nohost.me`` + * Select ``ONLYOFFICE`` and give the installation domain of your ``onlyoffice``, e.g. ``office.yunohost.domain`` * or (only if you connected ``onlyoffice`` to Nextcloud, see previous section) * Select ``Nextcloud`` and give your nextcloud installation domain, e.g. ``yunohost.domain/nextcloud`` * Create a new document and enjoy! From 867fcebf5b3fb7bc3ba84254cd8a31996cb79fae Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 1 May 2020 20:43:11 +0200 Subject: [PATCH 08/21] Propagate explanations from README to manifest --- manifest.json | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index 9ac1999..390839f 100644 --- a/manifest.json +++ b/manifest.json @@ -29,7 +29,11 @@ "en": "Choose a domain name for OnlyOffice", "fr": "Choisissez un nom de domaine pour OnlyOffice" }, - "example": "example.com" + "example": "office.yunohost.domain", + "help": { + "en": "You should not install OnlyOffice on your main YunoHost domain, especially if you want to use it with a nextcloud installed on the same domain.", + "fr": "Evitez d'installer OnlyOffice sur votre domaine Yunohost principal, surtout si vous voulez l'utiliser avec une instance Nextcloud installée sur le même domaine." + }, }, { "name": "path", @@ -38,31 +42,38 @@ "en": "Choose a path for OnlyOffice", "fr": "Choisissez un chemin pour OnlyOffice" }, - "example": "/onlyoffice", - "default": "/onlyoffice" + "example": "/onlyoffice or /", + "help": { + "en": "If you chose a subdomain, e.g. office.yunohost.domain, then you can choose root path /.", + "fr": "Si vous avez choisi un sous-domaine, ex. office.yunohost.domain, alors vous pouvez installer sur le chemin racine /." + }, }, { "name": "nextclouddomain", "type": "string", "ask": { - "en": "The domain of your Nextcloud instance", - "fr": "Le domain de votre instance Nextcloud" + "en": "The domain of the Nextcloud to connect to OnlyOffice", + "fr": "Le domaine du Nextcloud à connecter à OnlyOffice" }, - "example": "example.com", - "default": "example.com" + "example": "yunohost.domain/nextcloud or nextcloud.yunohost.domain", + "help": { + "en": "Install the OnlyOffice connector to edit documents from Nextcloud.", + "fr": "Installez le connecteur OnlyOffice pour éditer des documents dans Nextcloud." + }, + "default": "yunohost.domain/nextcloud" }, { "name": "is_public", "type": "boolean", "ask": { - "en": "Is it a public application? Check the box if you want to use it with Nextcloud.", - "fr": "Est-ce une application publique ? Cocher la case si vous voulez l'intégrer dans Nextcloud." + "en": "Is it a public application? If you want to connect the app to Nextcloud: check/true!", + "fr": "Est-ce une application publique ? Si vous voulez connecter l'app à Nextcloud : cochez/true!" }, - "default": true, "help": { - "en": "You will only be able to integrate OnlyOffice in Nextcloud if both apps are public.", - "fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les intégrer." - } + "en": "You will only be able to connect OnlyOffice to Nextcloud if both apps are public!", + "fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les connecter!" + }, + "default": true } ] } From b7589678d9beb7072efc6cbbf484ad8654220d04 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 1 May 2020 22:10:19 +0200 Subject: [PATCH 09/21] Update manifest.json --- manifest.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 390839f..81a40bf 100644 --- a/manifest.json +++ b/manifest.json @@ -33,7 +33,7 @@ "help": { "en": "You should not install OnlyOffice on your main YunoHost domain, especially if you want to use it with a nextcloud installed on the same domain.", "fr": "Evitez d'installer OnlyOffice sur votre domaine Yunohost principal, surtout si vous voulez l'utiliser avec une instance Nextcloud installée sur le même domaine." - }, + } }, { "name": "path", @@ -44,9 +44,10 @@ }, "example": "/onlyoffice or /", "help": { - "en": "If you chose a subdomain, e.g. office.yunohost.domain, then you can choose root path /.", - "fr": "Si vous avez choisi un sous-domaine, ex. office.yunohost.domain, alors vous pouvez installer sur le chemin racine /." + "en": "Root path / if you chose a subdomain, e.g. office.yunohost.domain.", + "fr": "Choisissez le chemin racine / si vous avez choisi un sous-domaine, ex. office.yunohost.domain." }, + "default": "/onlyoffice" }, { "name": "nextclouddomain", From 7af62bf60ee420ae56da8132ca22fe62cd6e9816 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sat, 2 May 2020 03:33:46 +0200 Subject: [PATCH 10/21] link nextcloud_ynh README --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5e7646..24bbd61 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,19 @@ [![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) [![Install OnlyOffice with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=onlyoffice) -> *This package allows you to install OnlyOffice quickly and simply on a YunoHost server. +> *This package allows you to install OnlyOffice Document Server quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview -This package installs a Document Server application supporting collaborative edition of OnlyOffice documents. Edition of documents requires a Client application such as the [OnlyOffice connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) or the [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) +Online collaborative edition of OnlyOffice documents requires: +1) a server part, with two installation options: + a) **This package installs an OnlyOffice Document Server**. + b) The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community) +2) a client part, such as: + a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) + b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) + +The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install 1)a) and 2)a) on one Nextcloud instance. However, performance and architecture are limited. **Shipped version:** 5.2.8 From 9590366d9ff0bff3d25e9bc2859c716781ee2f1b Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sat, 2 May 2020 03:39:03 +0200 Subject: [PATCH 11/21] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24bbd61..939883f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Online collaborative edition of OnlyOffice documents requires: a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) -The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install 1)a) and 2)a) on one Nextcloud instance. However, performance and architecture are limited. +The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install 1)b) and 2)a) on one Nextcloud instance. However, performance and architecture are limited. **Shipped version:** 5.2.8 From e652857be56330a016a1dec2507730f3ddd866c7 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sat, 2 May 2020 03:40:53 +0200 Subject: [PATCH 12/21] typo --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 939883f..477eb9f 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,14 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Online collaborative edition of OnlyOffice documents requires: 1) a server part, with two installation options: - a) **This package installs an OnlyOffice Document Server**. - b) The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community) + +a) **This package installs an OnlyOffice Document Server**. +b) The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community) + 2) a client part, such as: - a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) - b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) + +a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) +b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install 1)b) and 2)a) on one Nextcloud instance. However, performance and architecture are limited. From b9c1fa62c57591217ddfee1bd08fbd3f7729c050 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sat, 2 May 2020 03:41:37 +0200 Subject: [PATCH 13/21] typo --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 477eb9f..e88b801 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,12 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Online collaborative edition of OnlyOffice documents requires: 1) a server part, with two installation options: - -a) **This package installs an OnlyOffice Document Server**. -b) The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community) + a) **This package installs an OnlyOffice Document Server**. + b) The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community) 2) a client part, such as: - -a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) -b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) + a) The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice) + b) The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx) The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install 1)b) and 2)a) on one Nextcloud instance. However, performance and architecture are limited. From 663ebf39964e3ecade629cb84b0b9e4f037aac38 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 17:44:00 +0200 Subject: [PATCH 14/21] Improve description --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 81a40bf..c3f2d23 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "onlyoffice", "packaging_format": 1, "description": { - "en": "OnlyOffice Document Server.", - "fr": "Serveur de documents OnlyOffice." + "en": "Create and edit documents collaboratively", + "fr": "Créez et éditer des documents collaborativement" }, "version": "5.2.8~ynh1", "url": "https://www.onlyoffice.com", From 345c3280c97113ee3d3eed3157fd4a7a8778cf2f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 17:44:34 +0200 Subject: [PATCH 15/21] Require yunohost >= 3.8 for the fix about short hostname otherwise rabbitmq may fail to start --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c3f2d23..2405815 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 3.5" + "yunohost": ">= 3.8" }, "multi_instance": false, "services": [ From dbe3b369e6686d81dba00e65f14253e9d287ffc4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 17:45:31 +0200 Subject: [PATCH 16/21] These helpers are now official --- manifest.json | 2 +- scripts/ynh_add_extra_apt_repos__3 | 294 ----------------------------- 2 files changed, 1 insertion(+), 295 deletions(-) delete mode 100644 scripts/ynh_add_extra_apt_repos__3 diff --git a/manifest.json b/manifest.json index 2405815..7c719fe 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 3.8" + "yunohost": ">= 3.8.4" }, "multi_instance": false, "services": [ diff --git a/scripts/ynh_add_extra_apt_repos__3 b/scripts/ynh_add_extra_apt_repos__3 deleted file mode 100644 index 3276f00..0000000 --- a/scripts/ynh_add_extra_apt_repos__3 +++ /dev/null @@ -1,294 +0,0 @@ -#!/bin/bash - -# Pin a repository. -# -# usage: ynh_pin_repo --package=packages --pin=pin_filter [--priority=priority_value] [--name=name] [--append] -# | arg: -p, --package - Packages concerned by the pin. Or all, *. -# | arg: -i, --pin - Filter for the pin. -# | arg: -p, --priority - Priority for the pin -# | arg: -n, --name - Name for the files for this repo, $app as default value. -# | arg: -a, --append - Do not overwrite existing files. -# -# See https://manpages.debian.org/stretch/apt/apt_preferences.5.en.html for information about pinning. -# -ynh_pin_repo () { - # Declare an array to define the options of this helper. - local legacy_args=pirna - declare -Ar args_array=( [p]=package= [i]=pin= [r]=priority= [n]=name= [a]=append ) - local package - local pin - local priority - local name - local append - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - package="${package:-*}" - priority=${priority:-50} - name="${name:-$app}" - append=${append:-0} - - if [ $append -eq 1 ] - then - append="tee -a" - else - append="tee" - fi - - mkdir -p "/etc/apt/preferences.d" - echo "Package: $package -Pin: $pin -Pin-Priority: $priority" \ - | $append "/etc/apt/preferences.d/$name" -} - -# Add a repository. -# -# usage: ynh_add_repo --uri=uri --suite=suite --component=component [--name=name] [--append] -# | arg: -u, --uri - Uri of the repository. -# | arg: -s, --suite - Suite of the repository. -# | arg: -c, --component - Component of the repository. -# | arg: -n, --name - Name for the files for this repo, $app as default value. -# | arg: -a, --append - Do not overwrite existing files. -# -# Example for a repo like deb http://forge.yunohost.org/debian/ stretch stable -# uri suite component -# ynh_add_repo --uri=http://forge.yunohost.org/debian/ --suite=stretch --component=stable -# -ynh_add_repo () { - # Declare an array to define the options of this helper. - local legacy_args=uscna - declare -Ar args_array=( [u]=uri= [s]=suite= [c]=component= [n]=name= [a]=append ) - local uri - local suite - local component - local name - local append - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - name="${name:-$app}" - append=${append:-0} - - if [ $append -eq 1 ] - then - append="tee -a" - else - append="tee" - fi - - mkdir -p "/etc/apt/sources.list.d" - # Add the new repo in sources.list.d - echo "deb $uri $suite $component" \ - | $append "/etc/apt/sources.list.d/$name.list" -} - -# Add an extra repository correctly, pin it and get the key. -# -# usage: ynh_install_extra_repo --repo="repo" [--key=key_url] [--priority=priority_value] [--name=name] [--append] -# | arg: -r, --repo - Complete url of the extra repository. -# | arg: -k, --key - url to get the public key. -# | arg: -p, --priority - Priority for the pin -# | arg: -n, --name - Name for the files for this repo, $app as default value. -# | arg: -a, --append - Do not overwrite existing files. -ynh_install_extra_repo () { - # Declare an array to define the options of this helper. - local legacy_args=rkpna - declare -Ar args_array=( [r]=repo= [k]=key= [p]=priority= [n]=name= [a]=append ) - local repo - local key - local priority - local name - local append - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - name="${name:-$app}" - append=${append:-0} - key=${key:-0} - priority=${priority:-} - - if [ $append -eq 1 ] - then - append="--append" - wget_append="tee -a" - else - append="" - wget_append="tee" - fi - - # Split the repository into uri, suite and components. - # Remove "deb " at the beginning of the repo. - repo="${repo#deb }" - - # Get the uri - local uri="$(echo "$repo" | awk '{ print $1 }')" - - # Get the suite - local suite="$(echo "$repo" | awk '{ print $2 }')" - - # Get the components - local component="${repo##$uri $suite }" - - # Add the repository into sources.list.d - ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append - - # Pin the new repo with the default priority, so it won't be used for upgrades. - # Build $pin from the uri without http and any sub path - local pin="${uri#*://}" - pin="${pin%%/*}" - # Set a priority only if asked - if [ -n "$priority" ] - then - priority="--priority=$priority" - fi - ynh_pin_repo --package="*" --pin="origin \"$pin\"" $priority --name="$name" $append - - # Get the public key for the repo - if [ -n "$key" ] - then - mkdir -p "/etc/apt/trusted.gpg.d" - wget -q "$key" -O - | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.gpg > /dev/null - fi - - # Update the list of package with the new repo - ynh_package_update -} - -# Remove an extra repository and the assiociated configuration. -# -# usage: ynh_remove_extra_repo [--name=name] -# | arg: -n, --name - Name for the files for this repo, $app as default value. -ynh_remove_extra_repo () { - # Declare an array to define the options of this helper. - local legacy_args=n - declare -Ar args_array=( [n]=name= ) - local name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - name="${name:-$app}" - - ynh_secure_remove "/etc/apt/sources.list.d/$name.list" - ynh_secure_remove "/etc/apt/preferences.d/$name" - ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.gpg" - ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.asc" - - # Update the list of package to exclude the old repo - ynh_package_update -} - -# Install packages from an extra repository properly. -# -# usage: ynh_install_extra_app_dependencies --repo="repo" --package="dep1 dep2" [--key=key_url] [--name=name] -# | arg: -r, --repo - Complete url of the extra repository. -# | arg: -p, --package - The packages to install from this extra repository -# | arg: -k, --key - url to get the public key. -# | arg: -n, --name - Name for the files for this repo, $app as default value. -ynh_install_extra_app_dependencies () { - # Declare an array to define the options of this helper. - local legacy_args=rpkn - declare -Ar args_array=( [r]=repo= [p]=package= [k]=key= [n]=name= ) - local repo - local package - local key - local name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - name="${name:-$app}" - key=${key:-0} - - # Set a key only if asked - if [ -n "$key" ] - then - key="--key=$key" - fi - # Add an extra repository for those packages - ynh_install_extra_repo --repo="$repo" $key --priority=995 --name=$name - - # Install requested dependencies from this extra repository. - ynh_add_app_dependencies --package="$package" - - # Remove this extra repository after packages are installed - ynh_remove_extra_repo --name=$app -} - -#================================================= - -# patched version of ynh_install_app_dependencies to be used with ynh_add_app_dependencies - -# Define and install dependencies with a equivs control file -# This helper can/should only be called once per app -# -# usage: ynh_install_app_dependencies dep [dep [...]] -# | arg: dep - the package name to install in dependence -# You can give a choice between some package with this syntax : "dep1|dep2" -# Example : ynh_install_app_dependencies dep1 dep2 "dep3|dep4|dep5" -# This mean in the dependence tree : dep1 & dep2 & (dep3 | dep4 | dep5) -# -# Requires YunoHost version 2.6.4 or higher. -ynh_install_app_dependencies () { - local dependencies=$@ - dependencies="$(echo "$dependencies" | sed 's/\([^\<=\>]\)\ \([^(]\)/\1, \2/g')" - dependencies=${dependencies//|/ | } - local manifest_path="../manifest.json" - if [ ! -e "$manifest_path" ]; then - manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place - fi - - local version=$(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file. - if [ ${#version} -eq 0 ]; then - version="1.0" - fi - local dep_app=${app//_/-} # Replace all '_' by '-' - - # Handle specific versions - if [[ "$dependencies" =~ [\<=\>] ]] - then - # Replace version specifications by relationships syntax - # https://www.debian.org/doc/debian-policy/ch-relationships.html - # Sed clarification - # [^(\<=\>] ignore if it begins by ( or < = >. To not apply twice. - # [\<=\>] matches < = or > - # \+ matches one or more occurence of the previous characters, for >= or >>. - # [^,]\+ matches all characters except ',' - # Ex: package>=1.0 will be replaced by package (>= 1.0) - dependencies="$(echo "$dependencies" | sed 's/\([^(\<=\>]\)\([\<=\>]\+\)\([^,]\+\)/\1 (\2 \3)/g')" - fi - - cat > /tmp/${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build -Section: misc -Priority: optional -Package: ${dep_app}-ynh-deps -Version: ${version} -Depends: ${dependencies} -Architecture: all -Description: Fake package for $app (YunoHost app) dependencies - This meta-package is only responsible of installing its dependencies. -EOF - ynh_package_install_from_equivs /tmp/${dep_app}-ynh-deps.control \ - || ynh_die --message="Unable to install dependencies" # Install the fake package and its dependencies - rm /tmp/${dep_app}-ynh-deps.control - ynh_app_setting_set --app=$app --key=apt_dependencies --value="$dependencies" -} - -ynh_add_app_dependencies () { - # Declare an array to define the options of this helper. - local legacy_args=pr - declare -Ar args_array=( [p]=package= [r]=replace) - local package - local replace - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - replace=${replace:-0} - - local current_dependencies="" - if [ $replace -eq 0 ] - then - local dep_app=${app//_/-} # Replace all '_' by '-' - if ynh_package_is_installed --package="${dep_app}-ynh-deps" - then - current_dependencies="$(dpkg-query --show --showformat='${Depends}' ${dep_app}-ynh-deps) " - fi - - current_dependencies=${current_dependencies// | /|} - fi - - ynh_install_app_dependencies "${current_dependencies}${package}" -} From 530570a114c2c48fc20d4a8353b27516af956029 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 17:47:59 +0200 Subject: [PATCH 17/21] You don't need sudo... --- 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 26ae24b..f51251d 100644 --- a/scripts/install +++ b/scripts/install @@ -124,11 +124,11 @@ ynh_system_user_create --username=$app #================================================= ynh_print_info --message="Configuring Onlyoffice..." -echo onlyoffice-documentserver onlyoffice/ds-port select $port | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-user string $db_user | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/ds-port select $port | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-user string $db_user | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-name string $db_name | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #================================================= # INSTALL ONLYOFFICE diff --git a/scripts/restore b/scripts/restore index 92b9830..b2c7877 100644 --- a/scripts/restore +++ b/scripts/restore @@ -99,11 +99,11 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= ynh_print_info --message="Configuring Onlyoffice..." -echo onlyoffice-documentserver onlyoffice/ds-port select $port | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-user string $db_user | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/ds-port select $port | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-user string $db_user | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-name string $db_name | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #================================================= # REINSTALL ONLYOFFICE diff --git a/scripts/upgrade b/scripts/upgrade index 75120c5..b3a52fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,11 +126,11 @@ ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian sq ynh_print_info --message="Configuring Onlyoffice..." ynh_backup_if_checksum_is_different --file="/etc/onlyoffice/documentserver/default.json" -echo onlyoffice-documentserver onlyoffice/ds-port select $port | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | sudo debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-user string $db_user | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/ds-port select $port | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-host string 127.0.0.1 | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-user string $db_user | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections -echo onlyoffice-documentserver onlyoffice/db-name string $db_name | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #================================================= # UPGRADE ONLYOFFICE From 80035a6c0e04a5dddf93a32bec88c46bbe971fde Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 20:32:26 +0200 Subject: [PATCH 18/21] No need to source these anymore --- scripts/install | 1 - scripts/remove | 1 - scripts/restore | 1 - scripts/upgrade | 1 - 4 files changed, 4 deletions(-) diff --git a/scripts/install b/scripts/install index f51251d..4525689 100644 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_add_extra_apt_repos__3 source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/remove b/scripts/remove index 703afdd..72b5531 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_add_extra_apt_repos__3 source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/restore b/scripts/restore index b2c7877..1557668 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,7 +7,6 @@ #================================================= source ../settings/scripts/_common.sh -source ../settings/scripts/ynh_add_extra_apt_repos__3 source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b3a52fc..c4695cf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_add_extra_apt_repos__3 source /usr/share/yunohost/helpers #================================================= From 307937febe3bc3ccc5cf975ff7a5c8bdd3df044a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 21:24:05 +0200 Subject: [PATCH 19/21] Stupid hack to avoid the removal of the document server crashing dpkg --- scripts/install | 4 ++++ scripts/remove | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/scripts/install b/scripts/install index 4525689..835f4d0 100644 --- a/scripts/install +++ b/scripts/install @@ -134,6 +134,10 @@ echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set- #================================================= ynh_print_info --message="Install OnlyOffice..." +# The onlyoffice dev had the magnificent idea to add a "nginx restart" during +# the install/configure of their package, which is awful since that will +# restart nginx and the whole webadmin and maybe even the yunohost command +# running the install ... ynh_add_app_dependencies --package="onlyoffice-documentserver" #================================================= diff --git a/scripts/remove b/scripts/remove index 72b5531..6d06f9b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -36,7 +36,16 @@ supervisorctl stop all ynh_print_info --message="Removing OnlyOffice..." ynh_secure_remove --file=/var/lib/dpkg/info/onlyoffice-documentserver.prerm + +# Here you will wonder what the fuck this is, and the answer is : this is a +# fucking stupid hack because onlyoffice's dev deviced to put a "supervisorctl +# update" inside their postrm, but when their postrm is ran, supervisorctl is +# already removed ... so their removal fails which breaks dpkg. +# So instead, we trick it with this stupid link to /bin/true which is removed +# right after. +ln -s /bin/true /usr/local/bin/supervisorctl ynh_package_autopurge onlyoffice-documentserver +ynh_secure_remove /usr/local/bin/supervisorctl #================================================= # REMOVE THE POSTGRESQL DATABASE From 6dc38a243cd3f7c639b134078cfd9cf02f34df9c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 21:24:38 +0200 Subject: [PATCH 20/21] Maybe it can be a good idea to define the damn variables we're using ... --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index c4695cf..0c6a391 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,8 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) is_public=$(ynh_app_setting_get --app=$app --key=is_public) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) port=$(ynh_app_setting_get --app=$app --key=port) nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain) From 59a46b3c808cc8edaf71a1e8650f89f2840fd9b4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 23 May 2020 22:45:26 +0200 Subject: [PATCH 21/21] Fixed many things, bumping version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7c719fe..f04df52 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and edit documents collaboratively", "fr": "Créez et éditer des documents collaborativement" }, - "version": "5.2.8~ynh1", + "version": "5.5.3~ynh1", "url": "https://www.onlyoffice.com", "license": "GPL-3.0-or-later", "maintainer": {