From 890812427c9bfa86ea3db48f3ff15478ae6269de Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Mar 2021 09:07:54 +0100 Subject: [PATCH 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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 #=================================================