From 2c6adee0e088051e7db4356bca5dc2cd6cc23d8c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 29 Dec 2020 17:55:29 +0100 Subject: [PATCH 01/48] Update app.src --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index fcc4502..43caaf7 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.7.tar.gz -SOURCE_SUM=b17c8a2e10192a88cf56946ee968edc061d3687c345a1284cbc3f90c6b7cc995 +SOURCE_SUM=39212e8b2ab025643367664238279ba189104ddadf8f18db8feb02ceda538867 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From e17fdb86837b429861699d3b56d44ca3c49e44df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 9 Jan 2021 22:49:22 +0100 Subject: [PATCH 02/48] Finding an available port --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b2f051f..2fa2a9a 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=9001) From 5e486ae90015707b60a42147c1f4b182d8ec84e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 11 Jan 2021 18:12:20 +0100 Subject: [PATCH 03/48] Update nginx.conf --- conf/nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index a7d3852..93e5657 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,6 +12,7 @@ location __PATH__/ { # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf proxy_buffering off; + more_set_headers "X-Frame-Options : ALLOWALL"; proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpProxyModule proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used From 1e6fc9ca00976a08f74bab1b40c11450230d85b7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 13 Jan 2021 23:08:13 +0100 Subject: [PATCH 04/48] Remove dot --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 2fa2a9a..b07ab10 100644 --- a/scripts/install +++ b/scripts/install @@ -172,7 +172,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 -yunohost service add $app --description="Collaborative editor." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 5dc0ae4..a54e912 100644 --- a/scripts/restore +++ b/scripts/restore @@ -99,7 +99,7 @@ chmod 600 $final_path/credentials.json #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 -yunohost service add $app --description="Collaborative editor." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log" #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 4503d4a..ee058e5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -162,7 +162,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Collaborative editor." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE From 378e7f7320b52ee0a1c84cd466d5d28feae29f1a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 13 Jan 2021 23:10:20 +0100 Subject: [PATCH 05/48] Fix --- scripts/install | 4 +--- scripts/upgrade | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index b07ab10..c250403 100644 --- a/scripts/install +++ b/scripts/install @@ -115,7 +115,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # INSTALL ETHERPAD #================================================= -ynh_script_progression --message="Installing Etherpad..." --weight=90 +ynh_script_progression --message="Installing Etherpad..." --weight=60 chown -R $app: $final_path @@ -130,12 +130,10 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=6 cp ../conf/settings.json $final_path/settings.json - ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" cp ../conf/credentials.json $final_path/credentials.json - ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json" ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json" ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json" diff --git a/scripts/upgrade b/scripts/upgrade index ee058e5..e34d7e3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,12 +128,10 @@ popd || ynh_die ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 cp ../conf/settings.json $final_path/settings.json - ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" cp ../conf/credentials.json $final_path/credentials.json - ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json" ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json" ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json" From 672eadf72bc323c56f8b9e3927457d506ad62097 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 11:12:39 +0100 Subject: [PATCH 06/48] Fix --- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 779dc26..da00220 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.7~ynh1", + "version": "1.8.7~ynh2", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 5075c93..72e3749 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib apt-transport-https" -nodejs_version=12 +nodejs_version=14 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index c250403..cb8f5ab 100644 --- a/scripts/install +++ b/scripts/install @@ -119,7 +119,7 @@ ynh_script_progression --message="Installing Etherpad..." --weight=60 chown -R $app: $final_path -pushd "$final_path" || ynh_die +pushd $final_path || ynh_die ynh_use_nodejs ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh popd || ynh_die diff --git a/scripts/upgrade b/scripts/upgrade index e34d7e3..027ad0c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=42 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -117,7 +117,7 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90 chown -R $app: $final_path -pushd "$final_path" || ynh_die +pushd $final_path || ynh_die ynh_use_nodejs ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh popd || ynh_die From 0e1c2225f177af7a1fb2e9b99fa4a0d139d7b568 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 11:14:01 +0100 Subject: [PATCH 07/48] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 72e3749..5075c93 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib apt-transport-https" -nodejs_version=14 +nodejs_version=12 #================================================= # PERSONAL HELPERS From 3572448646adffdab8abd03ddaa0d8ddc5199f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 20 Jan 2021 08:08:34 +0100 Subject: [PATCH 08/48] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4838f7..c47715d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation - * Official documentation: http://etherpad.org/doc/v1.8.6 + * Official documentation: http://etherpad.org/doc/v1.8.7 * YunoHost documentation: https://yunohost.org/#/app_etherpad ## YunoHost specific features From ef65301846313111986571671de27cbb55bae314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 20 Jan 2021 08:08:58 +0100 Subject: [PATCH 09/48] Update README_fr.md --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 7f6b6f8..4780b48 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation - * Documentation officielle : http://etherpad.org/doc/v1.8.6 + * Documentation officielle : http://etherpad.org/doc/v1.8.7 * Documentation YunoHost : https://yunohost.org/#/app_etherpad ## Fonctionnalités spécifiques à YunoHost From 281fea00dd572845e977acd41ddc6112e68fe0a0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Jan 2021 12:18:26 +0100 Subject: [PATCH 10/48] Fix --- scripts/_common.sh | 4 ++-- scripts/install | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5075c93..d4ee246 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib apt-transport-https" -nodejs_version=12 +nodejs_version=14 #================================================= # PERSONAL HELPERS @@ -32,4 +32,4 @@ ynh_exec_as() { else sudo -u "$USER" "$@" fi -} \ No newline at end of file +} diff --git a/scripts/install b/scripts/install index cb8f5ab..4a503c0 100644 --- a/scripts/install +++ b/scripts/install @@ -188,7 +188,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= From f9a6f0b14cfffb3daa4e26cc031312305aba5de6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Jan 2021 12:34:55 +0100 Subject: [PATCH 11/48] Fix --- conf/settings.json | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/settings.json b/conf/settings.json index add9c66..6dd132a 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -252,7 +252,7 @@ * Not setting this may cause problems during deployment. * Set to 0 to disable caching. */ - "maxAge": 21600, // 60 * 60 * 6 = 6 hours + "maxAge": 99999999, // 60 * 60 * 6 = 6 hours /* * Absolute path to the Abiword executable. diff --git a/manifest.json b/manifest.json index da00220..3b2bb2c 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.3" }, "multi_instance": true, "services": [ From c1e5ea40482accdaa47a25c72ace7bb051302eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 25 Jan 2021 23:35:39 +0100 Subject: [PATCH 12/48] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c47715d..8421a61 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ > *This package allow you to install Etherpad-Lite 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.* -> :warning: This package installs Etherpad-Lite (without MyPads and plugins). It uses PostgreSQL as a database. +> :warning: This package installs Etherpad-Lite (without MyPads and plugins). It uses PostgreSQL as database. >If you want to install Etherpad with the MyPads plugin, use the [Etherpad MyPads package](https://github.com/YunoHost-Apps/etherpad_mypads_ynh). ## Overview From a343540d462848e87329bc81ec68ac73289dc0a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 2 Feb 2021 09:38:42 +0100 Subject: [PATCH 13/48] small Fixes --- issue_template.md | 55 ++++++++++++++++++++++++++++++++++++++++ pull_request_template.md | 16 ++++++++++++ scripts/install | 4 ++- scripts/upgrade | 12 +++++++++ 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 issue_template.md create mode 100644 pull_request_template.md diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 0000000..44b1d7b --- /dev/null +++ b/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 Etherpad 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 etherpad + ``` +- *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/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000..6c28fc5 --- /dev/null +++ b/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. +- [ ] 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/install b/scripts/install index 4a503c0..b87daba 100644 --- a/scripts/install +++ b/scripts/install @@ -183,7 +183,7 @@ ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --lin #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] @@ -191,6 +191,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 027ad0c..ac21571 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,18 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + +if ! ynh_permission_exists --permission="admin"; then + # Create the required permissions + ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From 22f92b688fd8fb50afc5558de93ef0cddec9190a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 11:37:42 +0100 Subject: [PATCH 14/48] Upgrade to version 1.8.8 --- README.md | 4 ++-- README_fr.md | 4 ++-- check_process | 5 +++-- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 23 +++++------------------ scripts/upgrade | 11 ++--------- 7 files changed, 17 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 8421a61..bc1fb30 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.7 +**Shipped version:** 1.8.8 ## Screenshots @@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation - * Official documentation: http://etherpad.org/doc/v1.8.7 + * Official documentation: http://etherpad.org/doc/v1.8.8 * YunoHost documentation: https://yunohost.org/#/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 4780b48..250abbe 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.7 +**Version embarquée :** 1.8.8 ## Captures d'écran @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation - * Documentation officielle : http://etherpad.org/doc/v1.8.7 + * Documentation officielle : http://etherpad.org/doc/v1.8.8 * Documentation YunoHost : https://yunohost.org/#/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/check_process b/check_process index 12788aa..34cdadc 100644 --- a/check_process +++ b/check_process @@ -20,6 +20,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=a343540d462848e87329bc81ec68ac73289dc0a1 backup_restore=1 multi_instance=1 port_already_use=0 @@ -28,6 +29,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=a343540d462848e87329bc81ec68ac73289dc0a1 + name=small Fixes manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=9001& diff --git a/conf/app.src b/conf/app.src index 43caaf7..8bbfa8d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.7.tar.gz -SOURCE_SUM=39212e8b2ab025643367664238279ba189104ddadf8f18db8feb02ceda538867 +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.8.tar.gz +SOURCE_SUM=20c9c63504e9a53ed5f5eb7c3fb80df1ac916cce22ce272135c6f15fe7ea4da1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 3b2bb2c..8ff9192 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.7~ynh2", + "version": "1.8.8~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/install b/scripts/install index b87daba..d8326f3 100644 --- a/scripts/install +++ b/scripts/install @@ -69,7 +69,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=12 +ynh_script_progression --message="Installing dependencies..." --weight=6 ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies @@ -85,8 +85,6 @@ ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -115,7 +113,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # INSTALL ETHERPAD #================================================= -ynh_script_progression --message="Installing Etherpad..." --weight=60 +ynh_script_progression --message="Installing Etherpad..." --weight=2 chown -R $app: $final_path @@ -127,21 +125,10 @@ popd || ynh_die #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Configuring Etherpad..." --weight=6 +ynh_script_progression --message="Configuring Etherpad..." --weight=60 -cp ../conf/settings.json $final_path/settings.json -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" -ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" - -cp ../conf/credentials.json $final_path/credentials.json -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= +ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" +ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/settings.json" diff --git a/scripts/upgrade b/scripts/upgrade index ac21571..6750370 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,15 +139,8 @@ popd || ynh_die #================================================= ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 -cp ../conf/settings.json $final_path/settings.json -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" -ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" - -cp ../conf/credentials.json $final_path/credentials.json -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/credentials.json" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/credentials.json" +ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" +ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= # GENERIC FINALIZATION From 01047ca2448b26ae41aa05d0217aee0d5ffc166b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 11:52:58 +0100 Subject: [PATCH 15/48] Update settings.json --- conf/settings.json | 98 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 23 deletions(-) diff --git a/conf/settings.json b/conf/settings.json index 6dd132a..e6f9f2f 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -232,12 +232,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. * @@ -308,6 +302,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 */ @@ -362,11 +374,62 @@ "percentageToScrollWhenUserPressesArrowUp": 0 }, + /* + * User accounts. These accounts are used by: + * - default HTTP basic authentication if no plugin handles authentication + * - some but not all authentication plugins + * - some but not all authorization plugins + * + * User properties: + * - password: The user's password. Some authentication plugins will ignore + * this. + * - is_admin: true gives access to /admin. Defaults to false. If you do not + * uncomment this, /admin will not be available! + * - readOnly: If true, this user will not be able to create new pads or + * modify existing pads. Defaults to false. + * - canCreate: If this is true and readOnly is false, this user can create + * new pads. Defaults to true. + * + * Authentication and authorization plugins may define additional properties. + * + * WARNING: passwords should not be stored in plaintext in this file. + * If you want to mitigate this, please install ep_hash_auth and + * follow the section "secure your installation" in README.md + */ + + /* + "users": { + "admin": { + // 1) "password" can be replaced with "hash" if you install ep_hash_auth + // 2) please note that if password is null, the user will not be created + "password": "changeme1", + "is_admin": true + }, + "user": { + // 1) "password" can be replaced with "hash" if you install ep_hash_auth + // 2) please note that if password is null, the user will not be created + "password": "changeme1", + "is_admin": false + } + }, + */ + /* * Restrict socket.io transport methods */ "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. * @@ -408,21 +471,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. @@ -433,7 +483,7 @@ // 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 }, @@ -530,5 +580,7 @@ }, // logconfig /* Override any strings found in locale directories */ - "customLocaleStrings": {} -} + "customLocaleStrings": {}, + + /* Disable Admin UI tests */ + "enableAdminUITests": false \ No newline at end of file From 9f782db1d2aaaeb1dc7863639f65dcdf6a6bd02f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 12:40:54 +0100 Subject: [PATCH 16/48] Update settings.json --- conf/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/settings.json b/conf/settings.json index e6f9f2f..906af3c 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -583,4 +583,5 @@ "customLocaleStrings": {}, /* Disable Admin UI tests */ - "enableAdminUITests": false \ No newline at end of file + "enableAdminUITests": false +} From 2e6946bde150a18190387510bbcbe40c0bbe80e2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 12:42:26 +0100 Subject: [PATCH 17/48] Fix --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index d8326f3..d85f86f 100644 --- a/scripts/install +++ b/scripts/install @@ -119,7 +119,7 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs - ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh + ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh popd || ynh_die #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6750370..563eead 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,7 +131,7 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs - ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh + ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh popd || ynh_die #================================================= From d4ba05bafde590074a4af2f213347026c875f14a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 13:56:09 +0100 Subject: [PATCH 18/48] Update upgrade --- scripts/upgrade | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 563eead..522e509 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,6 +122,14 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 + +ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" +ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" + #================================================= # INSTALL ETHERPAD #================================================= @@ -131,17 +139,10 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs + ynh_secure_remove --file="$final_path/bin" ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh popd || ynh_die -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 - -ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" - #================================================= # GENERIC FINALIZATION #================================================= From cbab00065d8497998a270e7a18014687af66c1e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 15:03:39 +0100 Subject: [PATCH 19/48] Update upgrade --- scripts/upgrade | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 522e509..1fc7b93 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,11 +137,24 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90 chown -R $app: $final_path -pushd $final_path || ynh_die - ynh_use_nodejs - ynh_secure_remove --file="$final_path/bin" - ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh -popd || ynh_die +# pushd $final_path || ynh_die +# ynh_use_nodejs +# ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh +# popd || ynh_die + +pushd $final_path + mkdir -p node_modules + cd node_modules + [ -e ep_etherpad-lite ] || ln -s $final_path/src ep_etherpad-lite + cd ep_etherpad-lite + npm ci --no-optional +popd || { + rm -rf $final_path/src/node_modules +} + +# Remove all minified data to force node creating it new + +rm -f $final_path/var/minified* #================================================= # GENERIC FINALIZATION From 4b2be8fccf70fd50f616da7521644d97801f26fe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 15:55:03 +0100 Subject: [PATCH 20/48] Update check_process --- check_process | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 34cdadc..121054c 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,6 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=a343540d462848e87329bc81ec68ac73289dc0a1 backup_restore=1 multi_instance=1 port_already_use=0 @@ -29,6 +28,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=a343540d462848e87329bc81ec68ac73289dc0a1 - name=small Fixes + ; commit= + name= manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=9001& From d864115d038dc1c0d4f59fb59a7fc5ec0aabe444 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Feb 2021 16:02:29 +0100 Subject: [PATCH 21/48] Fix --- scripts/install | 2 +- scripts/upgrade | 22 ++++------------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/scripts/install b/scripts/install index d85f86f..68e5bf8 100644 --- a/scripts/install +++ b/scripts/install @@ -92,7 +92,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir=$final_path #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 1fc7b93..490deb9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,24 +137,10 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90 chown -R $app: $final_path -# pushd $final_path || ynh_die -# ynh_use_nodejs -# ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh -# popd || ynh_die - -pushd $final_path - mkdir -p node_modules - cd node_modules - [ -e ep_etherpad-lite ] || ln -s $final_path/src ep_etherpad-lite - cd ep_etherpad-lite - npm ci --no-optional -popd || { - rm -rf $final_path/src/node_modules -} - -# Remove all minified data to force node creating it new - -rm -f $final_path/var/minified* +pushd $final_path || ynh_die + ynh_use_nodejs + ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh +popd || ynh_die #================================================= # GENERIC FINALIZATION From c0466767572c5966b49e4090652ee99a699506f0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Feb 2021 16:23:32 +0100 Subject: [PATCH 22/48] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 68e5bf8..795b560 100644 --- a/scripts/install +++ b/scripts/install @@ -119,7 +119,7 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs - ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh + ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh popd || ynh_die #================================================= From 9ef19b25843d7fc6f2b19c63a4fec30ff8d3b15e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Feb 2021 16:25:08 +0100 Subject: [PATCH 23/48] Upgrade to version 1.8.9 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bc1fb30..110582e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.8 +**Shipped version:** 1.8.9 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 250abbe..e8ed282 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.8 +**Version embarquée :** 1.8.9 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 8bbfa8d..7b0702f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.8.tar.gz -SOURCE_SUM=20c9c63504e9a53ed5f5eb7c3fb80df1ac916cce22ce272135c6f15fe7ea4da1 +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.9.tar.gz +SOURCE_SUM=8954af79cde7bc8b10b8d0fca6ed772228cf7bacb50af845b235d553bb24a919 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 8ff9192..dd6c9ac 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.8~ynh1", + "version": "1.8.9~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { From 7e4bb9f6aded16b00b136268a4dd8bfaceb14c96 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Feb 2021 19:50:57 +0100 Subject: [PATCH 24/48] Upgrade to 1.8.10 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 110582e..8c5a4d0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.9 +**Shipped version:** 1.8.10 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e8ed282..ca76076 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.9 +**Version embarquée :** 1.8.10 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 7b0702f..21f5cb6 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.9.tar.gz -SOURCE_SUM=8954af79cde7bc8b10b8d0fca6ed772228cf7bacb50af845b235d553bb24a919 +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.10.tar.gz +SOURCE_SUM=8151e7532b2bf956431438be8983d0b8d009c50d8b186026bff07dc3b6a1a84c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index dd6c9ac..0df64ef 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.9~ynh1", + "version": "1.8.10~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { From 4d252dacbba36a0392144c0595e7b7df4471c934 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Feb 2021 20:40:17 +0100 Subject: [PATCH 25/48] Update check_process --- check_process | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 121054c..89a85f6 100644 --- a/check_process +++ b/check_process @@ -20,6 +20,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=96653aee9379d579a655777ac274355f4afca61c backup_restore=1 multi_instance=1 port_already_use=0 @@ -28,6 +29,6 @@ Email= Notification=none ;;; Upgrade options - ; commit= - name= + ; commit=96653aee9379d579a655777ac274355f4afca61c + name=Merge pull request #6 from YunoHost-Apps/testing manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=9001& From a8e3a8006feb6e52ef09bf7d1753747059889ddd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Feb 2021 09:06:40 +0100 Subject: [PATCH 26/48] Fix --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/change_url | 2 +- scripts/install | 5 ++--- scripts/upgrade | 5 +++++ 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8c5a4d0..cac9539 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation - * Official documentation: http://etherpad.org/doc/v1.8.8 + * Official documentation: http://etherpad.org/doc/v1.8.10 * YunoHost documentation: https://yunohost.org/#/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index ca76076..5ce9dbd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation - * Documentation officielle : http://etherpad.org/doc/v1.8.8 + * Documentation officielle : http://etherpad.org/doc/v1.8.10 * Documentation YunoHost : https://yunohost.org/#/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/manifest.json b/manifest.json index 0df64ef..594d1ff 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ diff --git a/scripts/change_url b/scripts/change_url index dc86cc3..c473434 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -70,7 +70,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/install b/scripts/install index 795b560..524ec78 100644 --- a/scripts/install +++ b/scripts/install @@ -128,10 +128,9 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" +nh_store_file_checksum --file="$final_path/settings.json" -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/settings.json" +ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 490deb9..6163872 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,8 +127,13 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 +ynh_backup_if_checksum_is_different --file="$final_path/settings.json" ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" +ynh_store_file_checksum --file="$final_path/settings.json" + +ynh_backup_if_checksum_is_different --file="$final_path/credentials.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" +ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= # INSTALL ETHERPAD From 9c7531602b1417a45701ea4d1596102d3622cf21 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Feb 2021 18:20:51 +0100 Subject: [PATCH 27/48] Small fixes --- scripts/install | 1 - scripts/upgrade | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 524ec78..27ae7ec 100644 --- a/scripts/install +++ b/scripts/install @@ -51,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 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=admin --value=$admin -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=password --value=$password diff --git a/scripts/upgrade b/scripts/upgrade index 6163872..8bc0dd9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) port=$(ynh_app_setting_get --app=$app --key=port) From 0930d9d9e519a14a4e769dca1414ff656eb19142 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Feb 2021 18:57:38 +0100 Subject: [PATCH 28/48] Upgrade to version 1.8.11 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cac9539..d91e69a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.10 +**Shipped version:** 1.8.11 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5ce9dbd..9e5ea54 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.10 +**Version embarquée :** 1.8.11 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 21f5cb6..e37d405 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.10.tar.gz -SOURCE_SUM=8151e7532b2bf956431438be8983d0b8d009c50d8b186026bff07dc3b6a1a84c +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.11.tar.gz +SOURCE_SUM=b9b9916d8e1b1ebe6dac5ebc0f24fa1ea064ddfd1307919bef2b58d7a8d5339c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 594d1ff..4fe4331 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.10~ynh1", + "version": "1.8.11~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { From 43003817efe8341656934265c52f6aa61f25fb85 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Feb 2021 18:58:57 +0100 Subject: [PATCH 29/48] Update settings.json --- conf/settings.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/conf/settings.json b/conf/settings.json index 906af3c..a994259 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -535,9 +535,7 @@ */ "logconfig" : { "appenders": [ - { "type": "console" - //, "category": "access"// only logs pad access - } + { "type": "console"} /* , { "type": "file" From 62ca38b6dcd600a2000a0742e921483bea0f1f7f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Feb 2021 19:53:19 +0100 Subject: [PATCH 30/48] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 27ae7ec..e4c375a 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -nh_store_file_checksum --file="$final_path/settings.json" +ynh_store_file_checksum --file="$final_path/settings.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" ynh_store_file_checksum --file="$final_path/credentials.json" From 890812427c9bfa86ea3db48f3ff15478ae6269de Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Mar 2021 09:07:54 +0100 Subject: [PATCH 31/48] Upgrade to version 1.8.12 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d91e69a..a951567 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.11 +**Shipped version:** 1.8.12 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 9e5ea54..f071e43 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.11 +**Version embarquée :** 1.8.12 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index e37d405..20e60a6 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.11.tar.gz -SOURCE_SUM=b9b9916d8e1b1ebe6dac5ebc0f24fa1ea064ddfd1307919bef2b58d7a8d5339c +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.12.tar.gz +SOURCE_SUM=a5d490e75aa7a710c28bcc9b88efce528713f83f70e8984b3f9bc661e997d04f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 4fe4331..6890bc4 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.11~ynh1", + "version": "1.8.12~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { From 4ad15f0841f86ebd4fe9a3b8d7d223192271a1ec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Mar 2021 13:12:54 +0100 Subject: [PATCH 32/48] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8bc0dd9..5d102c3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -144,6 +144,8 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh + ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force + ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade popd || ynh_die #================================================= From c829140598a9f3a3d1ade5a89dbe435deddb4ac2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 09:06:29 +0100 Subject: [PATCH 33/48] Update manifest.json --- manifest.json | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/manifest.json b/manifest.json index 6890bc4..6ced4f2 100644 --- a/manifest.json +++ b/manifest.json @@ -24,29 +24,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Etherpad", - "fr": "Choisissez un nom de domaine pour Etherpad" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Etherpad", - "fr": "Choisissez un chemin pour Etherpad" - }, "example": "/etherpad", "default": "/etherpad" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If enabled, Etherpad will be accessible by people who do not have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, Etherpad sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." @@ -66,19 +54,11 @@ { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l'administrateur" - }, "example": "johndoe" }, { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "example": "Choose a password" } ] From b730c603f850bc35708fb39b0ce7530080204005 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Mar 2021 11:05:51 +0100 Subject: [PATCH 34/48] Add proper permission for config file --- scripts/install | 17 +++++++++-------- scripts/restore | 17 +++++++++-------- scripts/upgrade | 17 +++++++++-------- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/scripts/install b/scripts/install index e4c375a..38f20cc 100644 --- a/scripts/install +++ b/scripts/install @@ -74,6 +74,14 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=4 + +# Create a system user +ynh_system_user_create --username=$app --home_dir=$final_path + #================================================= # CREATE A POSTQRESQL DATABASE #================================================= @@ -101,14 +109,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=4 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=4 - -# Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path - #================================================= # INSTALL ETHERPAD #================================================= @@ -140,6 +140,7 @@ ynh_store_file_checksum --file="$final_path/credentials.json" # Set permissions to app files chown -R $app: $final_path +chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index a54e912..e00fc2c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -51,6 +51,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -78,20 +86,13 @@ ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path - #================================================= # RESTORE USER RIGHTS #================================================= # Restore permissions on app files chown -R $app: $final_path +chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5d102c3..e864757 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,6 +84,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=42 ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -113,14 +121,6 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # MODIFY A CONFIG FILE #================================================= @@ -156,6 +156,7 @@ popd || ynh_die # Set permissions on app files chown -R $app: $final_path +chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= From e05c9d12139a3fda2d052f9ae6c1b6608523ccaa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Mar 2021 11:14:55 +0100 Subject: [PATCH 35/48] Not password to protect --- scripts/install | 1 - scripts/restore | 1 - scripts/upgrade | 1 - 3 files changed, 3 deletions(-) diff --git a/scripts/install b/scripts/install index 38f20cc..3629704 100644 --- a/scripts/install +++ b/scripts/install @@ -140,7 +140,6 @@ ynh_store_file_checksum --file="$final_path/credentials.json" # Set permissions to app files chown -R $app: $final_path -chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index e00fc2c..4535ce5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,7 +92,6 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name # Restore permissions on app files chown -R $app: $final_path -chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e864757..4105b1a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,7 +156,6 @@ popd || ynh_die # Set permissions on app files chown -R $app: $final_path -chmod 600 $final_path/settings.json chmod 600 $final_path/credentials.json #================================================= From 8f1b799b5efab4673ac209f930e75852d76b7da4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Mar 2021 19:40:57 +0100 Subject: [PATCH 36/48] Upgrade to version 1.8.13 --- README.md | 4 ++-- README_fr.md | 4 ++-- conf/app.src | 4 ++-- conf/systemd.service | 2 +- manifest.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a951567..2feca79 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time. -**Shipped version:** 1.8.12 +**Shipped version:** 1.8.13 ## Screenshots @@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation - * Official documentation: http://etherpad.org/doc/v1.8.10 + * Official documentation: http://etherpad.org/doc/v1.8.13 * YunoHost documentation: https://yunohost.org/#/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index f071e43..366bcce 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst ## Résumé Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps. -**Version embarquée :** 1.8.12 +**Version embarquée :** 1.8.13 ## Captures d'écran @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation - * Documentation officielle : http://etherpad.org/doc/v1.8.10 + * Documentation officielle : http://etherpad.org/doc/v1.8.13 * Documentation YunoHost : https://yunohost.org/#/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/conf/app.src b/conf/app.src index 20e60a6..2e84639 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.12.tar.gz -SOURCE_SUM=a5d490e75aa7a710c28bcc9b88efce528713f83f70e8984b3f9bc661e997d04f +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.13.tar.gz +SOURCE_SUM=c83052daf3b0af8aa3c19a8308e21fcbcfecca99aeb3e8047383875f855443f1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index 1c7dfcb..cd402e8 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment="NODE_ENV=production" Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=__FINALPATH__/node_modules/ep_etherpad-lite/node/server.js +ExecStart=__FINALPATH__/src/bin/run.sh Restart=always [Install] diff --git a/manifest.json b/manifest.json index 6ced4f2..c532a0c 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.12~ynh1", + "version": "1.8.13~ynh1", "url": "https://etherpad.org/", "license": "Apache-2.0", "maintainer": { From 160fc38886f27cf9ffcea11cdb0d74863cb15839 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 19:58:29 +0100 Subject: [PATCH 37/48] protect final_path --- scripts/install | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 3629704..a049c8c 100644 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,7 @@ ynh_store_file_checksum --file="$final_path/credentials.json" # Set permissions to app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/restore b/scripts/restore index 4535ce5..970dd1e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,6 +92,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name # Restore permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4105b1a..0fb973a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,6 +156,7 @@ popd || ynh_die # Set permissions on app files chown -R $app: $final_path +chmod o-rwx $final_path chmod 600 $final_path/credentials.json #================================================= From 84df8c4f14bce5092b5c2a113576c9c759f478d2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 21:37:10 +0100 Subject: [PATCH 38/48] Fix --- scripts/_common.sh | 2 +- scripts/install | 2 -- scripts/upgrade | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d4ee246..2eab5a8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql postgresql-contrib apt-transport-https" +pkg_dependencies="postgresql postgresql-contrib" nodejs_version=14 diff --git a/scripts/install b/scripts/install index a049c8c..c88762f 100644 --- a/scripts/install +++ b/scripts/install @@ -127,10 +127,8 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_store_file_checksum --file="$final_path/settings.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" -ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 0fb973a..ee6b278 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,13 +126,9 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 -ynh_backup_if_checksum_is_different --file="$final_path/settings.json" ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_store_file_checksum --file="$final_path/settings.json" -ynh_backup_if_checksum_is_different --file="$final_path/credentials.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" -ynh_store_file_checksum --file="$final_path/credentials.json" #================================================= # INSTALL ETHERPAD From a38eee9949c7873738694aa5b84a979680cfae9a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 22:11:15 +0100 Subject: [PATCH 39/48] Fix --- README.md | 2 +- README_fr.md | 2 +- check_process | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2feca79..0e2ab32 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation * Official documentation: http://etherpad.org/doc/v1.8.13 - * YunoHost documentation: https://yunohost.org/#/app_etherpad + * YunoHost documentation: https://yunohost.org/en/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 366bcce..f583c69 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation * Documentation officielle : http://etherpad.org/doc/v1.8.13 - * Documentation YunoHost : https://yunohost.org/#/app_etherpad + * Documentation YunoHost : https://yunohost.org/fr/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/check_process b/check_process index 89a85f6..4c14d9c 100644 --- a/check_process +++ b/check_process @@ -23,7 +23,6 @@ upgrade=1 from_commit=96653aee9379d579a655777ac274355f4afca61c backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= From fc0d56e690f44d0775b62ee2670fd6fc2ac714dd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 3 Apr 2021 18:23:33 +0200 Subject: [PATCH 40/48] Fix badges --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0e2ab32..89e8870 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f #### Supported architectures -* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/) +* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/) +* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/) ## Limitations diff --git a/README_fr.md b/README_fr.md index f583c69..8e95378 100644 --- a/README_fr.md +++ b/README_fr.md @@ -44,8 +44,8 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain #### Architectures supportées -* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/) +* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/) +* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/) ## Limitations From 4509bde31350a82b7cfd844c586b20d553f19c57 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Apr 2021 00:00:14 +0200 Subject: [PATCH 41/48] fix --- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/upgrade | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index c532a0c..872cf2e 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 2eab5a8..7e4dd21 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql postgresql-contrib" -nodejs_version=14 +nodejs_version=15 #================================================= # PERSONAL HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index ee6b278..adf6c51 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,7 +127,6 @@ ynh_install_nodejs --nodejs_version=$nodejs_version ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" - ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= @@ -161,7 +160,7 @@ chmod 600 $final_path/credentials.json ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +ynh_add_systemd_config #================================================= # INTEGRATE SERVICE IN YUNOHOST From f7ed7462a28bb39cb21635a1e8f951c9a3740452 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Apr 2021 00:07:13 +0200 Subject: [PATCH 42/48] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c88762f..70c0007 100644 --- a/scripts/install +++ b/scripts/install @@ -118,6 +118,7 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs + npm install -g npm@latest ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh popd || ynh_die @@ -147,7 +148,7 @@ chmod 600 $final_path/credentials.json ynh_script_progression --message="Configuring a systemd service..." --weight=4 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +ynh_add_systemd_config #================================================= # INTEGRATE SERVICE IN YUNOHOST From 7a3ff195093c159033698f1676e7a3cbc8a96ec7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 24 Apr 2021 00:12:33 +0200 Subject: [PATCH 43/48] Update install --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 70c0007..b579862 100644 --- a/scripts/install +++ b/scripts/install @@ -118,7 +118,6 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs - npm install -g npm@latest ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh popd || ynh_die From 68017c2c36e493ed57bb4456a8e5b2899f71e39b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 3 May 2021 21:50:31 +0200 Subject: [PATCH 44/48] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 872cf2e..9aaf1b8 100644 --- a/manifest.json +++ b/manifest.json @@ -48,7 +48,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de", "en", "es", "fr", "it", "pt"], + "choices": ["de", "en", "es", "fr", "it"], "default": "en" }, { From ef12895a0a83e10620dfe6c8374630d18f24ab18 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 3 May 2021 22:01:18 +0200 Subject: [PATCH 45/48] Fix --- README.md | 2 +- README_fr.md | 2 +- scripts/_common.sh | 13 ------------- scripts/install | 1 - 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 89e8870..12f2b8c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *[Lire ce readme en français.](./README_fr.md)* > *This package allow you to install Etherpad-Lite 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.* +If you don't have YunoHost, please see [here](https://yunohost.org/install) to know how to install and enjoy it.* > :warning: This package installs Etherpad-Lite (without MyPads and plugins). It uses PostgreSQL as database. >If you want to install Etherpad with the MyPads plugin, use the [Etherpad MyPads package](https://github.com/YunoHost-Apps/etherpad_mypads_ynh). diff --git a/README_fr.md b/README_fr.md index 8e95378..8f72fdc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,7 +6,7 @@ *[Read this readme in english.](./README.md)* > *Ce package vous permet d'installer Etherpad-Lite rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.* +Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/install_fr) pour savoir comment l'installer et en profiter.* > :warning: Ce paquet installe Etherpad-Lite (sans MyPads et divers plugins). Il utilise PostgreSQL comme base de données. > Si vous souhaitez installer Etherpad avec MyPads, utilisez le paquet [Etherpad MyPads](https://github.com/YunoHost-Apps/etherpad_mypads_ynh). diff --git a/scripts/_common.sh b/scripts/_common.sh index 7e4dd21..1554048 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -20,16 +20,3 @@ nodejs_version=15 #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Execute a command as another user -# usage: ynh_exec_as USER COMMAND [ARG ...] -ynh_exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval "$@" - else - sudo -u "$USER" "$@" - fi -} diff --git a/scripts/install b/scripts/install index b579862..67e0fa6 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,6 @@ popd || ynh_die ynh_script_progression --message="Configuring Etherpad..." --weight=60 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" - ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= From b32f5c356e3bc4bbfd79d804fa9efbf081d5c8c1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 11:28:33 +0200 Subject: [PATCH 46/48] Add templates --- issue_template.md => .github/ISSUE_TEMPLATE.md | 4 ++-- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++++++++ pull_request_template.md | 16 ---------------- 3 files changed, 18 insertions(+), 18 deletions(-) rename issue_template.md => .github/ISSUE_TEMPLATE.md (94%) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 pull_request_template.md diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 94% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index 44b1d7b..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 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 Etherpad itself. Refer to its documentation or repository for help.* + - *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.* --- @@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install etherpad + 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:* 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/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!"* From 6cd40de444b7703fa2cde8a880ee9cd05e036de9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 11:29:30 +0200 Subject: [PATCH 47/48] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 9aaf1b8..99b42e9 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ From f7c4da91cfbf131e122adb64d466459c11da54b8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 15 May 2021 08:46:50 +0200 Subject: [PATCH 48/48] Set requirements to 4.2.4 --- check_process | 12 +++++------- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/check_process b/check_process index 4c14d9c..b1374b7 100644 --- a/check_process +++ b/check_process @@ -1,17 +1,15 @@ # See here for more information # https://github.com/YunoHost/package_check#syntax-check_process-file -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" language="fr" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 password="pass" - port="9001" (PORT) + port="9001" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 99b42e9..fb6a5b7 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://etherpad.org/", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/install b/scripts/install index 67e0fa6..3a2351b 100644 --- a/scripts/install +++ b/scripts/install @@ -124,7 +124,7 @@ popd || ynh_die #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Configuring Etherpad..." --weight=60 +ynh_script_progression --message="Configuring Etherpad..." --weight=20 ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" diff --git a/scripts/upgrade b/scripts/upgrade index adf6c51..f1cf73a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,7 +101,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/settings.json $final_path/credentials.json" fi #================================================= @@ -124,10 +124,10 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 +# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 -ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" -ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" +# ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json" +# ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= # INSTALL ETHERPAD