diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1680dc..0cbdcf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +## [1.8.13~ynh2]() - 2021-05-14 + +#### Disabled +* [ep_automatic_logut plugin](https://github.com/YunoHost-Apps/etherpad_mypads_ynh/pull/140/files) + + ## [1.8.13~ynh1]() - 2021-03-23 #### Changed diff --git a/README.md b/README.md index 79dc6fc..99de54d 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ You can also find a configuration file for Etherpad at this path `/var/www/ether * [ep_align](https://www.npmjs.com/package/ep_align) - *Add Left/Center/Right/Justify to lines of text in a pad* * [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Adds author names to span titles* - * [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Automatically disconnects user after some period of time (Prevent server overload)* * [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Adds comments on sidebar and link it to the text.* * [ep_countable](https://www.npmjs.com/package/ep_countable) - *Adds paragraphs, words and characters count* * [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Delete pads which were never edited* diff --git a/README_fr.md b/README_fr.md index f1d4c03..ba99ff8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -53,7 +53,6 @@ Vous pouvez accéder à deux panneaux d'administration différents, pour Etherpa * [ep_align](https://www.npmjs.com/package/ep_align) - *Ajoute Gauche/Centre/Droite/Justifier à des lignes de texte dans un pad* * [ep_author_hover](https://www.npmjs.com/package/ep_author_hover) - *Ajoute des noms d'auteurs* - * [ep_automatic_logut](https://www.npmjs.com/package/ep_automatic_logut) - *Déconnecte automatiquement l'utilisateur après une certaine période de temps (Prévient la surcharge du serveur)* * [ep_comments_page](https://www.npmjs.com/package/ep_comments_page) - *Ajoute des commentaires sur la sidebar et le lie au texte.* * [ep_countable](https://www.npmjs.com/package/ep_countable) - *Ajoute l'afficher le nombre de paragraphes, de mots et de caractères* * [ep_delete_empty_pads](https://www.npmjs.com/package/ep_delete_empty_pads) - *Supprimer les pads qui n'ont jamais été édités* diff --git a/YEP.md b/YEP.md deleted file mode 100644 index e6627b2..0000000 --- a/YEP.md +++ /dev/null @@ -1,117 +0,0 @@ -#### [Level 0](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-0) -[YEP 1.1 - Nommer son app et son dépot](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 1.2 - Inscrire l'app sur un "répertoire" connu](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-12) -`Validated` - -#### [Level 1](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-1) -[YEP 2.2 - Utiliser bash pour les scripts principaux](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-22) -`Validated` -[YEP 2.5 - Copier correctement des fichiers](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-25) -`Don't know` -[YEP 2.7 - Donner des permissions suffisantes aux instructions bash](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-27) -`Validated` -[YEP 2.15 - Suivre les instructions d'installation de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-215) -`Validated` - -#### [Level 2](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-2) -[YEP 1.5 - Mettre à jour régulièrement le statut de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 2.18.2 - Gérer l'installation à la racine d’un nom de domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2182) -`Validated` - *Automatically verified.* -[YEP 2.18.3 - Gérer l'installation sur un sous-domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2183) -`Validated` - *Automatically verified.* -[YEP 2.18.4 - Gérer l'installation sur un chemin /path](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2184) -`Validated` - *Automatically verified.* -[YEP 4.6 - Gère le multi-instance](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Not yet validated` - *Automatically verified.* - -#### [Level 3](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-3) -[YEP 2.3 - Sauvegarder les réponses lors de l'installation](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-23) -`Validated` - -#### [Level 4](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-4) -[YEP 4.1 - Lier au ldap](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-41) -`Validated` -[YEP 4.2 - Lier l'authentification au sso](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-42) -`Not yet validated` - -#### [Level 5](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-5) -[YEP 1.3 - Indiquer la licence associée au paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13) -`Validated` -[YEP 2.1 - Respecter le format du manifeste](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-21) -`Validated` - *Automatically verified.* -[YEP 2.12 - Utiliser les commandes pratiques (helpers)](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-212) -`Validated` -[YEP 2.18.1 - Lancer le script d'installation d'une webapp correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2181) -`Not applicable` - -#### [Level 6](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-6) -[YEP 1.4 - Informer sur l'intention de maintenir un paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-14) -`Validated` -[YEP 1.6 - Se tenir informé sur l'évolution du packaging d'apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-16) -`Validated` -[YEP 1.7 - Ajouter l'app à l'organisation YunoHost-Apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-17) -`Validated` - *Automatically verified.* -[YEP 1.8 - Publier des demandes de test](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-18) -`Validated` -[YEP 1.9 - Documenter l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-19) -`Validated` -[YEP 1.10 - Garder un historique de version propre](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-110) -`Don't know` -[YEP 2.9 - Enlever toutes traces de l'app lors de la suppression](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-29) -`Validated` -[YEP 3.3 - Faciliter le contrôle de l'intégrité des sources](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-33) -`Validated` -[YEP 3.5 - Suivre les recommendations de la documentation de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-35) -`Validated` -[YEP 3.6 - Mettre à jour les versions contenant des CVE](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-36) -`Validated` -[YEP 4.3 - Fournir un script de sauvegarde YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-43) -`Validated` - *Automatically verified.* -[YEP 4.4 - Fournir un script de restauration YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-44) -`Validated` - *Automatically verified.* - -#### [Level 7](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-7) -[YEP 2.6 - Annuler l'action si les valeurs d'entrées sont incorrectes](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-26) -`Validated` -[YEP 3.2 - Ouvrir un port correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-32) -`Validated` - -#### [Level 8](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-8) -[YEP 2.4 - Détecter et gérer les erreurs](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-24) -`Validated` -[YEP 2.8 - Modifier correctement une configuration système](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-28) -`Validated` -[YEP 2.16 - Vérifier la disponibilité des dépendances sur ARM, x86 et x64](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-216) -`Not yet validated` - *Automatically verified.* -[YEP 2.18.5 - Gérer la tuile YunoHost pour faciliter la navigation entre les applications](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2185) -`Partially validated` -[YEP 3.4 - Isoler l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-34) -`Partially validated` -[YEP 4.5 - Utiliser les hooks](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-45) -`Not applicable` - -#### [Level 9](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-9) -[YEP 2.10 - Configurer les logs de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-210) -`Validated` -[YEP 2.11 - Utiliser une variable plutôt que l'app id directement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-211) -`Validated` -[YEP 2.13 - Traduire le paquet en anglais](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-213) -`Partially validated` -[YEP 2.14 - Remplir correctement un fichier de conf](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-214) -`Not yet validated` -[YEP 2.17 - Prendre en compte la version d'origine lors des mises à jour](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-217) -`Validated` -[YEP 4.2.1 - Déconnexion](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-421) -`Not yet validated` - -#### Other YEP -[YEP 3.1 - Ne pas demander ou stocker de mot de passe LDAP](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-31) -`Validated` -[YEP 4.7 - Ajouter un module à la CLI](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-47) -`Not applicable` -[YEP 4.8 - Ajouter un module à l'admin web](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-48) -`Not applicable` - -State of each YEP can be one of these: `Validated`, `Partially validated`, `Not yet validated`, `Not applicable`, `Don't know`. diff --git a/check_process b/check_process index 85976fe..ea0c788 100644 --- a/check_process +++ b/check_process @@ -18,7 +18,6 @@ main.pad_configuration.pad_config_chatandusers=1|0 main.pad_configuration.pad_config_alwaysshowchat=1|0 main.pad_configuration.pad_config_show_markdown=1|0 - main.pad_configuration.pad_config_automatic_logout=0|1 main.mypads_configuration.mypads=0|1 main.mypads_configuration.useldap=0|1 main.overwrite_files.overwrite_settings=0|1 @@ -36,8 +35,8 @@ backup_restore=1 multi_instance=1 change_url=1 - actions=1 - config_panel=1 + actions=0 + config_panel=0 ;; Test sans MyPads ; Manifest domain="domain.tld" (DOMAIN) diff --git a/conf/settings.json b/conf/settings.json index 8eee7b0..6a8c1b6 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -55,7 +55,7 @@ * * "password": "${PASSW}" // if PASSW is not defined would result in password === null * "password": "${PASSW:}" // if PASSW is not defined would result in password === '' - + * * If you want to use an empty value (null) as default value for a variable, * simply do not set it, without putting any colons: "${ABIWORD}". * @@ -71,10 +71,12 @@ "title": "Etherpad MyPads", /* - * favicon default name - * alternatively, set up a fully specified Url to your own favicon + * Pathname of the favicon you want to use. If null, the skin's favicon is + * used if one is provided by the skin, otherwise the default Etherpad favicon + * is used. If this is a relative path it is interpreted as relative to the + * Etherpad root directory. */ - "favicon": "favicon.ico", + "favicon": null, /* * Skin name. @@ -204,9 +206,6 @@ }, // Plugins config - // ep_automatic_logut - "automatic_logut_mins_show" : true, // Show logout time selector - "automatic_logut_url" : "../../", // Redirection URL address // ep_markdown "ep_markdown_default": false, // Setting as default @@ -265,12 +264,6 @@ */ "editOnly": false, - /* - * If set to true, those users who have a valid session will automatically be - * granted access to password protected pads. - */ - "sessionNoPassword": false, - /* * If true, all css & js will be minified before sending to the client. * @@ -341,6 +334,24 @@ */ "trustProxy": false, + /* + * Settings controlling the session cookie issued by Etherpad. + */ + "cookie": { + /* + * Value of the SameSite cookie property. "Lax" is recommended unless + * Etherpad will be embedded in an iframe from another site, in which case + * this must be set to "None". Note: "None" will not work (the browser will + * not send the cookie to Etherpad) unless https is used to access Etherpad + * (either directly or via a reverse proxy with "trustProxy" set to true). + * + * "Strict" is not recommended because it has few security benefits but + * significant usability drawbacks vs. "Lax". See + * https://stackoverflow.com/q/41841880 for discussion. + */ + "sameSite": "Lax" + }, + /* * Privacy: disable IP logging */ @@ -400,6 +411,17 @@ */ "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], + "socketIo": { + /* + * Maximum permitted client message size (in bytes). All messages from + * clients that are larger than this will be rejected. Large values make it + * possible to paste large amounts of text, and plugins may require a larger + * value to work properly, but increasing the value increases susceptibility + * to denial of service attacks (malicious clients can exhaust memory). + */ + "maxHttpBufferSize": 10000 + }, + /* * Allow Load Testing tools to hit the Etherpad Instance. * @@ -407,6 +429,11 @@ */ "loadTest": false, + /** + * Disable dump of objects preventing a clean exit + */ + "dumpOnUncleanExit": false, + /* * Disable indentation on new line when previous line ends with some special * chars (':', '[', '(', '{') @@ -417,7 +444,7 @@ */ /* - * From Etherpad 1.8.3 onwards, import and export of pads is always rate + * From Etherpad 1.8.3 onwards, import and export of pads is always rate * limited. * * The default is to allow at most 10 requests per IP in a 90 seconds window. @@ -441,21 +468,8 @@ */ "importMaxFileSize": 52428800, // 50 * 1024 * 1024 - /* - * From Etherpad 1.8.3 onwards import was restricted to authors who had - * content within the pad. - * - * This setting will override that restriction and allow any user to import - * without the requirement to add content to a pad. - * - * This setting is useful for when you use a plugin for authentication so you - * can already trust each user. - */ - "allowAnyoneToImport": false, - - /* - * From Etherpad 1.9.0 onwards, when Etherpad is in production mode commits from individual users are rate limited + * From Etherpad 1.8.5 onwards, when Etherpad is in production mode commits from individual users are rate limited * * The default is to allow at most 10 changes per IP in a 1 second window. * After that the change is rejected. @@ -466,10 +480,11 @@ // duration of the rate limit window (seconds) "duration": 1, - // maximum number of chanes per IP to allow during the rate limit window + // maximum number of changes per IP to allow during the rate limit window "points": 10 }, + /* * Toolbar buttons configuration. * @@ -518,7 +533,7 @@ "logconfig" : { "appenders": [ { "type": "console" - , // "category": "access" // only logs pad access + //, "category": "access"// only logs pad access } /* @@ -562,5 +577,8 @@ }, // logconfig /* Override any strings found in locale directories */ - "customLocaleStrings": {} + "customLocaleStrings": {}, + + /* Disable Admin UI tests */ + "enableAdminUITests": false } diff --git a/config_panel.toml b/config_panel.toml index 631ba72..232f6f5 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -41,11 +41,6 @@ name = "Etherpad configuration" ask = "Show markdown syntax?" type = "boolean" default = false - - [main.pad_configuration.pad_config_automatic_logout] - ask = "Automatic logout" - type = "boolean" - default = true [main.mypads_configuration] diff --git a/manifest.json b/manifest.json index 7f318cf..abac826 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online editor providing collaborative editing in real-time.", "fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel." }, - "version": "1.8.13~ynh1", + "version": "1.8.13~ynh2", "url": "https://framapad.org", "license": "Apache-2.0", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/_variables b/scripts/_variables index e89bc02..ffb16a7 100644 --- a/scripts/_variables +++ b/scripts/_variables @@ -16,7 +16,6 @@ mypads_version=1.7.20 # Plugin versions ep_align_version=0.3.34 ep_author_hover_version=0.3.19 -ep_automatic_logut_version=1.0.8 ep_comments_page_version=0.1.60 ep_countable_version=0.0.11 ep_delete_empty_pads_version=0.0.7 diff --git a/scripts/actions/add_remove_abiword b/scripts/actions/add_remove_abiword index 24622ee..771434a 100755 --- a/scripts/actions/add_remove_abiword +++ b/scripts/actions/add_remove_abiword @@ -33,14 +33,14 @@ app=$YNH_APP_INSTANCE_NAME # Check the dependencies of the meta packages of etherpad_mypads with apt-cache if apt-cache depends ${app//_/-}-ynh-deps | grep --quiet abiword then - # abiword is already a dependence of etherpad_mypads. - # abiword should be removed. + # Abiword is already a dependence of etherpad_mypads. + # Abiword should be removed. abiword=0 action1=removed action2=Removing else - # abiword isn't a dependence of etherpad_mypads. - # abiword should be installed. + # Abiword isn't a dependence of etherpad_mypads. + # Abiword should be installed. abiword=1 action1=installed action2=Installing @@ -50,11 +50,11 @@ ynh_print_info --message="Abiword will be $action1." if apt-cache depends ${app//_/-}-ynh-deps | grep --quiet libreoffice-writer then - # libreoffice is already a dependence of etherpad_mypads. + # LibreOffice is already a dependence of Etherpad MyPads. # Keep it libreoffice=1 else - # libreoffice isn't a dependence of etherpad_mypads. + # LibreOffice isn't a dependence of Etherpad MyPads. # Do not add it libreoffice=0 fi @@ -67,18 +67,18 @@ fi ynh_script_progression --message="$action2 AbiWord..." --weight=3 -# Load common variables, and especially abiword dependencies. +# Load common variables, and especially Abiword dependencies. source scripts/_variables dependencies="" if [ $abiword -eq 1 ] then - # Add abiword dependencies if abiword has to be installed + # Add abiword dependencies if Abiword has to be installed dependencies="$dependencies $abiword_app_depencencies" fi if [ $libreoffice -eq 1 ] then - # Add libreoffice dependencies if libreoffice is already installed to keep it as a dependence. + # Add LibreOffice dependencies if LibreOffice is already installed to keep it as a dependence. dependencies="$dependencies $libreoffice_app_dependencies" fi @@ -95,11 +95,11 @@ ynh_package_autopurge if [ $abiword -eq 1 ] then - # Set abiword as default export app + # Set Abiword as default export app yunohost app config apply $app -a "YNH_CONFIG_MAIN_EXPORT_EXPORT=abiword" elif [ $libreoffice -eq 1 ] then - # Set libreoffice as default export app + # Set LibreOffice as default export app yunohost app config apply $app -a "YNH_CONFIG_MAIN_EXPORT_EXPORT=libreoffice" else # Remove any export app diff --git a/scripts/actions/add_remove_libreoffice b/scripts/actions/add_remove_libreoffice index 24bc7dd..19d5788 100755 --- a/scripts/actions/add_remove_libreoffice +++ b/scripts/actions/add_remove_libreoffice @@ -30,17 +30,17 @@ app=$YNH_APP_INSTANCE_NAME # CHECK IF AN ACTION HAS TO BE DONE #================================================= -# Check the dependencies of the meta packages of etherpad_mypads with apt-cache +# Check the dependencies of the meta packages of Etherpad MyPads with apt-cache if apt-cache depends ${app//_/-}-ynh-deps | grep --quiet libreoffice-writer then - # libreoffice is already a dependence of etherpad_mypads. - # libreoffice should be removed. + # LibreOffice is already a dependence of Etherpad myPads. + # LibreOffice should be removed. libreoffice=0 action1=removed action2=Removing else - # libreoffice isn't a dependence of etherpad_mypads. - # libreoffice should be installed. + # LibreOffice isn't a dependence of Etherpad MyPads. + # LibreOffice should be installed. libreoffice=1 action1=installed action2=Installing @@ -50,11 +50,11 @@ ynh_print_info --message="LibreOffice will be $action1." if apt-cache depends ${app//_/-}-ynh-deps | grep --quiet abiword then - # abiword is already a dependence of etherpad_mypads. + # Abiword is already a dependence of Etherpad MyPads. # Keep it abiword=1 else - # abiword isn't a dependence of etherpad_mypads. + # Abiword isn't a dependence of Etherpad MyPads. # Do not add it abiword=0 fi @@ -73,7 +73,7 @@ source scripts/_variables dependencies="" if [ $libreoffice -eq 1 ] then - # Add LibreOffice dependencies if libreoffice has to be installed + # Add LibreOffice dependencies if LibreOffice has to be installed dependencies="$dependencies $libreoffice_app_dependencies" fi if [ $abiword -eq 1 ] diff --git a/scripts/change_url b/scripts/change_url index b3954a7..e561950 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -92,21 +92,21 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location diff --git a/scripts/config b/scripts/config index 41f406d..58e84d5 100644 --- a/scripts/config +++ b/scripts/config @@ -8,7 +8,6 @@ # Load common variables for all scripts. source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -67,17 +66,6 @@ pad_config_alwaysshowchat="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYS old_pad_config_show_markdown="$(get_config_value ep_markdown_default)" pad_config_show_markdown="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN:-$old_pad_config_show_markdown}" -# Enable/disable ep_automatic_logut -if grep -q "//.*\"automatic_logut_" $config_file -then - # Disable - old_pad_config_automatic_logout=0 -else - # Enable - old_pad_config_automatic_logout=1 -fi -pad_config_automatic_logout="${YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_AUTOMATIC_LOGOUT:-$old_pad_config_automatic_logout}" - # MyPads if [ -d $final_path/node_modules/ep_mypads ] then @@ -131,7 +119,6 @@ show_config() { ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_CHATANDUSERS=$pad_config_chatandusers" ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYSSHOWCHAT=$pad_config_alwaysshowchat" ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN=$pad_config_show_markdown" - ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_AUTOMATIC_LOGOUT=$pad_config_automatic_logout" ynh_return "YNH_CONFIG_MAIN_MYPADS_CONFIGURATION_MYPADS=$mypads" ynh_return "YNH_CONFIG_MAIN_MYPADS_CONFIGURATION_USELDAP=$useldap" ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_SETTINGS=$overwrite_settings" @@ -193,25 +180,6 @@ apply_config() { restart_etherpad=1 fi - # Plugin option ep_automatic_logut - if [ "$pad_config_automatic_logout" != "$old_pad_config_automatic_logout" ] - then - ynh_use_nodejs - #pushd "$final_path/src" - #ynh_secure_remove --file="$final_path/src/package-lock.json" #added to fix saveError ENOENT: no such file or directory - if [ "$pad_config_automatic_logout" = "0" ] - then - ynh_replace_string --match_string="^\(.*\"automatic_logut.*$\)" --replace_string="\/\/\1" --target_file="$config_file" - ynh_exec_as $app env "$ynh_node_load_PATH" npm uninstall ep_automatic_logut - else - ynh_replace_string --match_string="^\/\/\(.*\"automatic_logut.*$\)" --replace_string="\1" --target_file="$config_file" - ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_automatic_logut@${ep_automatic_logut_version} - fi - popd - chown -R $app: $final_path/node_modules - restart_etherpad=1 - fi - # Export if [ "$export" != "$old_export" ] then diff --git a/scripts/install b/scripts/install index d52d9d6..966bb0a 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -180,15 +180,15 @@ cp ../conf/settings.json "$final_path/settings.json" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" if [ "$export" = "abiword" ] then - # Get abiword binary path + # Get Abiword binary path abiword_path=`which abiword` - # Set the path of abiword into etherpad config + # Set the path of abiword into Etherpad config ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json" elif [ "$export" = "libreoffice" ] then # Get soffice binary path soffice_path=`which soffice` - # Set the path of soffice into etherpad config + # Set the path of soffice into Etherpad config ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json" fi ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" @@ -238,8 +238,6 @@ pushd "$final_path" ynh_npm install ep_align@${ep_align_version} >> $install_log 2>&1 # Framapad - Adds author names to span titles ynh_npm install ep_author_hover@${ep_author_hover_version} >> $install_log 2>&1 -# Automatically disconnects user after some period of time (Prevent server overload) -ynh_npm install ep_automatic_logut@${ep_automatic_logut_version} >> $install_log 2>&1 # Framapad - Adds comments on sidebar and link it to the text. ynh_npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1 # Framapad - Displays paragraphs, sentences, words and characters counts. @@ -253,7 +251,7 @@ ynh_npm install ep_headings2@${ep_headings2_version} >> $install_log 2>&1 # Framapad - Edit and Export as Markdown in Etherpad ynh_npm install ep_markdown@${ep_markdown_version} >> $install_log 2>&1 if [ $mypads -eq 1 ]; then - # Framapad - Groups and private pads for etherpad + # Framapad - Groups and private pads for Etherpad ynh_npm install ep_mypads@${mypads_version} >> $install_log 2>&1 fi # Framapad - Add support to do 'Spell checking' @@ -280,10 +278,7 @@ then ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$final_path/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$final_path/node_modules/ep_mypads/static/l10n/fr.json - ## Find the /div just after the field to open a pad - #mod_line=$(grep -nA5 "index.createOpenPad" $final_path/src/templates/index.html | grep "" | cut -d '-' -f 1) - ## In order to add a link to MyPads plugin. - #sed -i "$mod_line s@div>@&\n\t