From e0834d082cff8cdda0f8db4074a844bd4305c443 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Nov 2021 23:19:58 +0100 Subject: [PATCH 1/9] Revert "Update credentials.json" This reverts commit 146e72d9b8d8cdb91e3f1b099e8d435b81745181. --- conf/credentials.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/conf/credentials.json b/conf/credentials.json index 6d9fb45..609603b 100644 --- a/conf/credentials.json +++ b/conf/credentials.json @@ -20,12 +20,14 @@ * https://www.npmjs.com/package/ueberdb2 */ - /* An Example of Redis Configuration */ - "dbType" : "redis", + /* An Example of MySQL Configuration */ + "dbType" : "postgres", "dbSettings" : { + "user" : "__DB_NAME__", "host" : "localhost", - "port" : 6379, - "database": "__REDIS_DB__" + "port" : 5432, + "password": "__DB_PWD__", + "database": "__DB_NAME__" }, /* From f554d801bf96954bb0d494085c5311080554f91a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Nov 2021 23:20:10 +0100 Subject: [PATCH 2/9] Revert "Update _common.sh" This reverts commit 26bc5fd62bcfa8bae27e8132cd4047872c91e3d5. --- scripts/_common.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c6117d6..599b8ce 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -26,40 +26,3 @@ libreoffice_app_dependencies="unoconv libreoffice-writer" #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# get the first available redis database -# -# usage: ynh_redis_get_free_db -# | returns: the database number to use -ynh_redis_get_free_db() { - local result max db - result=$(redis-cli INFO keyspace) - - # get the num - max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+") - - db=0 - # default Debian setting is 15 databases - for i in $(seq 0 "$max") - do - if ! echo "$result" | grep -q "db$i" - then - db=$i - break 1 - fi - db=-1 - done - - test "$db" -eq -1 && ynh_die --message="No available Redis databases..." - - echo "$db" -} - -# Flush Redis key -# -# usage: ynh_redis_remove_db database -# | arg: database - the database to erase -ynh_redis_remove_db() { - local db=$1 - redis-cli -n "$db" flushall -} From 70932472489fbce10dd8b81f43ab5a1c4493d0a8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 11:43:42 +0100 Subject: [PATCH 3/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0cc4bea..b877d2d 100644 --- a/scripts/install +++ b/scripts/install @@ -132,7 +132,7 @@ chown -R $app $final_path pushd $final_path 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 src/bin/installDeps.sh popd #================================================= From c6d88dac985751aa87bc11ce72224ec1f9ada1b6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Dec 2021 15:57:10 +0100 Subject: [PATCH 4/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 21dd592..c4d78ad 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,7 @@ "license": "Apache-2.0", "website": "https://etherpad.org/", "demo": "https://video.etherpad.com/", - "admindoc": "http://etherpad.org/doc/v1.8.14", + "admindoc": "http://etherpad.org/doc/v1.8.15", "code": "https://github.com/ether/etherpad-lite" }, "license": "Apache-2.0", From b97a0e6444b89054ec7f79f9d87e123534171999 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 3 Dec 2021 14:57:19 +0000 Subject: [PATCH 5/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df16ef4..6556d26 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation and resources * Official app website: https://etherpad.org/ -* Official admin documentation: http://etherpad.org/doc/v1.8.14 +* Official admin documentation: http://etherpad.org/doc/v1.8.15 * Upstream app code repository: https://github.com/ether/etherpad-lite * YunoHost documentation for this app: https://yunohost.org/app_etherpad * Report a bug: https://github.com/YunoHost-Apps/etherpad_ynh/issues diff --git a/README_fr.md b/README_fr.md index 0a796c0..70101be 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 ## Documentations et ressources * Site officiel de l'app : https://etherpad.org/ -* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.14 +* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.15 * Dépôt de code officiel de l'app : https://github.com/ether/etherpad-lite * Documentation YunoHost pour cette app : https://yunohost.org/app_etherpad * Signaler un bug : https://github.com/YunoHost-Apps/etherpad_ynh/issues From 5d9e8e81be833d56da2c0fe97fd8a13e6b6cc7a4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Dec 2021 18:36:03 +0100 Subject: [PATCH 6/9] Fix --- conf/app.src | 4 ++-- manifest.json | 4 ++-- scripts/restore | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conf/app.src b/conf/app.src index ef000a2..e7f957f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.15.tar.gz -SOURCE_SUM=3f4a4e1061f3fe6e6c6c5024ffc98045968c3801c9d630895ad78f5106a42e78 +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.16.tar.gz +SOURCE_SUM=dfdb60910aa9df85bde8cad8729ef6a33e36014739a3e8ce105f5e96a6b99d8c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index c4d78ad..22c2a70 100644 --- a/manifest.json +++ b/manifest.json @@ -6,13 +6,13 @@ "en": "Online editor providing collaborative editing in real-time", "fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel" }, - "version": "1.8.15~ynh1", + "version": "1.8.16~ynh1", "url": "https://etherpad.org/", "upstream": { "license": "Apache-2.0", "website": "https://etherpad.org/", "demo": "https://video.etherpad.com/", - "admindoc": "http://etherpad.org/doc/v1.8.15", + "admindoc": "http://etherpad.org/doc/v1.8.16", "code": "https://github.com/ether/etherpad-lite" }, "license": "Apache-2.0", diff --git a/scripts/restore b/scripts/restore index b157204..4b25222 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS From a7fd8b6054d86c0af8e200cfdc7d7b7b8bd0a166 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 3 Dec 2021 17:36:09 +0000 Subject: [PATCH 7/9] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6556d26..96a9dc2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Etherpad is a real-time collaborative editor scalable to thousands of simultaneous real time users. It provides full data export capabilities, and runs on your server, under your control. -**Shipped version:** 1.8.15~ynh1 +**Shipped version:** 1.8.16~ynh1 **Demo:** https://video.etherpad.com/ @@ -37,7 +37,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation and resources * Official app website: https://etherpad.org/ -* Official admin documentation: http://etherpad.org/doc/v1.8.15 +* Official admin documentation: http://etherpad.org/doc/v1.8.16 * Upstream app code repository: https://github.com/ether/etherpad-lite * YunoHost documentation for this app: https://yunohost.org/app_etherpad * Report a bug: https://github.com/YunoHost-Apps/etherpad_ynh/issues diff --git a/README_fr.md b/README_fr.md index 70101be..e241bee 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Etherpad est un éditeur collaboratif en temps réel évolutif pour des milliers d'utilisateurs simultanés en temps réel. Il fournit des capacités complètes d'exportation de données et s'exécute sur votre serveur, sous votre contrôle. -**Version incluse :** 1.8.15~ynh1 +**Version incluse :** 1.8.16~ynh1 **Démo :** https://video.etherpad.com/ @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentations et ressources * Site officiel de l'app : https://etherpad.org/ -* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.15 +* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.16 * Dépôt de code officiel de l'app : https://github.com/ether/etherpad-lite * Documentation YunoHost pour cette app : https://yunohost.org/app_etherpad * Signaler un bug : https://github.com/YunoHost-Apps/etherpad_ynh/issues From 79896e16e3d47f0bf1af2e4104255a46f814b1bb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 3 Dec 2021 18:44:05 +0100 Subject: [PATCH 8/9] Fix --- scripts/upgrade | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7d1a13d..1540a33 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ 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) password=$(ynh_app_setting_get --app=$app --key=password) +export=$(ynh_app_setting_get --app=$app --key=export) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) @@ -99,9 +100,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - + ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/settings.json $final_path/credentials.json" + ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/settings.json $final_path/credentials.json" fi # Set permissions on app files @@ -109,6 +110,17 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +if [ "$export" = "abiword" ]; then + ynh_exec_warn_less ynh_install_app_dependencies $abiword_app_depencencies +elif [ "$export" = "libreoffice" ]; then + ynh_exec_warn_less ynh_install_app_dependencies $libreoffice_app_dependencies +fi + #================================================= # NGINX CONFIGURATION #================================================= @@ -126,14 +138,14 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$nodejs_version -# #================================================= -# # MODIFY A CONFIG FILE -# #================================================= -# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 +#================================================= +# 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" -# chmod 400 "$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" +chmod 400 "$final_path/credentials.json" #================================================= # INSTALL ETHERPAD @@ -142,7 +154,7 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90 pushd $final_path 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" 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 From f344cbde2890e7edd5439872006c53934d5a4f60 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 5 Feb 2022 23:31:04 +0100 Subject: [PATCH 9/9] fix --- conf/systemd.service | 2 +- scripts/upgrade | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index c9004e3..d9b1b96 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Etherpad-lite, collaborative editing of documents in real-time. +Description=Etherpad-lite, the collaborative editor. After=syslog.target network.target postgresql.service [Service] diff --git a/scripts/upgrade b/scripts/upgrade index 1540a33..01a2322 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,9 +100,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - ynh_secure_remove --file="$final_path" + #ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/settings.json $final_path/credentials.json" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/settings.json $final_path/credentials.json" fi # Set permissions on app files @@ -141,11 +141,11 @@ 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" -chmod 400 "$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" +# chmod 400 "$final_path/credentials.json" #================================================= # INSTALL ETHERPAD @@ -155,8 +155,8 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90 pushd $final_path ynh_use_nodejs ynh_exec_warn_less 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 + #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 #=================================================