From d0fae457194841cb260bf4619507c19995a8dc06 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 1 Oct 2021 13:10:41 +0200 Subject: [PATCH 01/24] Add redis --- conf/credentials.json | 10 ++++------ scripts/_common.sh | 41 ++++++++++++++++++++++++++++++++++++++--- scripts/backup | 8 -------- scripts/install | 14 +++++--------- scripts/remove | 11 +++++------ scripts/upgrade | 29 +++++++++++++---------------- 6 files changed, 65 insertions(+), 48 deletions(-) diff --git a/conf/credentials.json b/conf/credentials.json index 609603b..6d9fb45 100644 --- a/conf/credentials.json +++ b/conf/credentials.json @@ -20,14 +20,12 @@ * https://www.npmjs.com/package/ueberdb2 */ - /* An Example of MySQL Configuration */ - "dbType" : "postgres", + /* An Example of Redis Configuration */ + "dbType" : "redis", "dbSettings" : { - "user" : "__DB_NAME__", "host" : "localhost", - "port" : 5432, - "password": "__DB_PWD__", - "database": "__DB_NAME__" + "port" : 6379, + "database": "__REDIS_DB__" }, /* diff --git a/scripts/_common.sh b/scripts/_common.sh index 1112a35..a97584d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="postgresql postgresql-contrib" - nodejs_version=14 # Dependencies for AbiWord @@ -26,3 +23,41 @@ 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" +} + +# Create a master password and set up global settings +# Please always call this script in install and restore scripts +# +# usage: ynh_redis_remove_db database +# | arg: database - the database to erase +ynh_redis_remove_db() { + local db=$1 + redis-cli -n "$db" flushall +} diff --git a/scripts/backup b/scripts/backup index 617ef5e..b66f2b1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -24,7 +24,6 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -57,13 +56,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP THE POSTQRESQL DATABASE -#================================================= -ynh_print_info --message="Backing up the PostgreSQL database..." - -ynh_psql_dump_db --database="$db_name" > db.sql - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 0cc4bea..450e609 100644 --- a/scripts/install +++ b/scripts/install @@ -72,8 +72,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=6 -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - ynh_install_nodejs --nodejs_version=$nodejs_version if [ "$export" = "abiword" ]; then @@ -93,13 +91,11 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # CREATE A POSTQRESQL DATABASE #================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 +ynh_script_progression --message="Creating a Redis database..." --weight=5 -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -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 +# Configure redis +redis_db=$(ynh_redis_get_free_db) +ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -207,7 +203,7 @@ then ynh_permission_update --permission="main" --add="visitors" fi -ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin --auth_header=false +ynh_permission_create --permission="admin" --url="/admin" --allowed="$admin" --auth_header="false" #================================================= # RELOAD NGINX diff --git a/scripts/remove b/scripts/remove index 8dc44e3..101cbeb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,9 +19,9 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name +redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) export=$(ynh_app_setting_get --app=$app --key=export) +redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) #================================================= # STANDARD REMOVE @@ -63,12 +63,11 @@ ynh_script_progression --message="Removing NodeJS version for Etherpad..." --wei ynh_remove_nodejs #================================================= -# REMOVE THE POSTQRESQL DATABASE +# REMOVE THE REDIS DATABASE #================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." --weight=2 +ynh_script_progression --message="Removing the redis database..." -# Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user --db_name=$db_name +ynh_redis_remove_db "$redis_db" #================================================= # REMOVE ETHERPAD MAIN DIR diff --git a/scripts/upgrade b/scripts/upgrade index a43eb05..ac4d342 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,8 +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) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) #================================================= # CHECK VERSION @@ -37,18 +36,18 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 -# If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If redis_db doesn't exist, create it +if [ -z "$redis_db" ]; then + redis_db=$(ynh_redis_get_free_db) + ynh_app_setting_get --app=$app --key=redis_db --value=$redis_db +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -58,7 +57,7 @@ fi if ! ynh_permission_exists --permission="admin"; then # Create the required permissions - ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin --auth_header=false + ynh_permission_create --permission="admin" --url="/admin" --allowed="$admin" --auth_header="false" fi #================================================= @@ -101,7 +100,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 # Set permissions on app files @@ -122,18 +121,16 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing dependencies..." --weight=12 -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 +# 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 From 4b220e1d42433b1917c55eecc523ccc63869aa04 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 1 Oct 2021 14:13:35 +0200 Subject: [PATCH 02/24] Update _common.sh --- scripts/_common.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a97584d..57498dc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -52,8 +52,7 @@ ynh_redis_get_free_db() { echo "$db" } -# Create a master password and set up global settings -# Please always call this script in install and restore scripts +# Flush Redis key # # usage: ynh_redis_remove_db database # | arg: database - the database to erase @@ -61,3 +60,21 @@ ynh_redis_remove_db() { local db=$1 redis-cli -n "$db" flushall } + + +dump_location=/var/lib/redis/dump.rdb +#destination=/tmp/dump-$(date +"%Y%m%d").rdb +# Restore a database +# +ynh_redis_restore_db() { + cat $dump_location | redis-cli -x restore mykey $ynh_redis_get_free_db +} + + +# Dump a database +# +ynh_redis_dump_db() { + redis-cli SET mykey $db + redis-cli --raw dump mykey | head -c-1 > $dump_location +} + From deb74d148e4cad995888a8535e724baa20f6d07d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 1 Oct 2021 16:13:51 +0200 Subject: [PATCH 03/24] Fix --- scripts/_common.sh | 5 ++++- scripts/backup | 7 +++++++ scripts/restore | 14 +++----------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 57498dc..b96aed6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -74,7 +74,10 @@ ynh_redis_restore_db() { # Dump a database # ynh_redis_dump_db() { - redis-cli SET mykey $db + # Declare an array to define the options of this helper. + local db=$1 + + redis-cli SET mykey "$db" redis-cli --raw dump mykey | head -c-1 > $dump_location } diff --git a/scripts/backup b/scripts/backup index b66f2b1..0cf894b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -56,6 +56,13 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" +#================================================= +# BACKUP THE REDIS DATABASE +#================================================= +ynh_print_info --message="Backing up the Redis database..." + +ynh_redis_dump_db + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index b157204..20320fd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,9 +29,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) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= # CHECK IF ETHERPAD CAN BE RESTORED @@ -75,20 +72,15 @@ chmod 400 $final_path/credentials.json #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=7 -# Define and install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= -# RESTORE THE POSTQRESQL DATABASE +# RESTORE THE REDIS DATABASE #================================================= -ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=2 +ynh_script_progression --message="Restoring the Redis database..." --weight=1 -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 +ynh_redis_restore_db #================================================= # RESTORE SYSTEMD From ac4080a12ef13d579dc9d4e466d9f290755f2b4f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Nov 2021 23:22:48 +0100 Subject: [PATCH 04/24] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 76c5a8b..73922e8 100644 --- a/check_process +++ b/check_process @@ -24,5 +24,5 @@ Email= Notification=none ;;; Upgrade options ; commit=96653aee9379d579a655777ac274355f4afca61c - name=Merge pull request #6 from YunoHost-Apps/testing + name=Merge pull request #6 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=9001& From e21f67c6f6b9e6b5ef3444675add4eb23410e65c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Feb 2022 12:32:56 +0100 Subject: [PATCH 05/24] Update credentials.json --- conf/credentials.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/credentials.json b/conf/credentials.json index 609603b..da23822 100644 --- a/conf/credentials.json +++ b/conf/credentials.json @@ -21,13 +21,11 @@ */ /* An Example of MySQL Configuration */ - "dbType" : "postgres", + "dbType" : "redis", "dbSettings" : { - "user" : "__DB_NAME__", "host" : "localhost", - "port" : 5432, - "password": "__DB_PWD__", - "database": "__DB_NAME__" + "port" : 6379, + "database": "__REDIS_DB__" }, /* From 67d72ed9a95b091ca82f92ac6e82adf841b7ef7f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Feb 2022 12:43:14 +0100 Subject: [PATCH 06/24] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index ecb5289..7f0e372 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -19,7 +19,7 @@ location __PATH__/ { proxy_set_header Connection $connection_upgrade; # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + #include conf.d/yunohost_panel.conf.inc; } location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { From dacb4adf901031e6a446cfa77430e1db9b67085b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Feb 2022 14:24:01 +0100 Subject: [PATCH 07/24] Update credentials.json --- conf/credentials.json | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/credentials.json b/conf/credentials.json index da23822..925c908 100644 --- a/conf/credentials.json +++ b/conf/credentials.json @@ -20,7 +20,6 @@ * https://www.npmjs.com/package/ueberdb2 */ - /* An Example of MySQL Configuration */ "dbType" : "redis", "dbSettings" : { "host" : "localhost", From 4140cd58d7cae8e4855f4e500f5f65a133c13cae Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 7 Feb 2022 17:18:16 +0100 Subject: [PATCH 08/24] Fix --- scripts/_common.sh | 60 ++++++++++++++++------------------------------ scripts/backup | 7 ------ scripts/restore | 7 ------ 3 files changed, 21 insertions(+), 53 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b5fc7ed..839f144 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -29,54 +29,36 @@ libreoffice_app_dependencies="unoconv libreoffice-writer" # 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) + local result max db + result="$(redis-cli INFO keyspace)" - # get the num - max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+") + # 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 + 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..." + test "$db" -eq -1 && ynh_die --message="No available Redis databases..." - echo "$db" + echo "$db" } -# Flush Redis key +# Create a master password and set up global settings +# Please always call this script in install and restore scripts # # usage: ynh_redis_remove_db database # | arg: database - the database to erase ynh_redis_remove_db() { - local db=$1 - redis-cli -n "$db" flushall + local db=$1 + redis-cli -n "$db" flushall } - -dump_location=/var/lib/redis/dump.rdb -#destination=/tmp/dump-$(date +"%Y%m%d").rdb -# Restore a database -# -ynh_redis_restore_db() { - cat $dump_location | redis-cli -x restore mykey $ynh_redis_get_free_db -} - - -# Dump a database -# -ynh_redis_dump_db() { - # Declare an array to define the options of this helper. - local db=$1 - - redis-cli SET mykey "$db" - redis-cli --raw dump mykey | head -c-1 > $dump_location -} diff --git a/scripts/backup b/scripts/backup index 0cf894b..b66f2b1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -56,13 +56,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP THE REDIS DATABASE -#================================================= -ynh_print_info --message="Backing up the Redis database..." - -ynh_redis_dump_db - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index c129af2..e2dfc6f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,13 +74,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -#================================================= -# RESTORE THE REDIS DATABASE -#================================================= -ynh_script_progression --message="Restoring the Redis database..." --weight=1 - -ynh_redis_restore_db - #================================================= # RESTORE SYSTEMD #================================================= From 3468b5f3502c925b987a112336e671c325d6beca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 7 Feb 2022 18:44:39 +0100 Subject: [PATCH 09/24] Update nginx.conf --- conf/nginx.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index ecb5289..4b1646c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,9 +17,6 @@ location __PATH__/ { # WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; } location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { From 8337e2aa2354b9846236c7d517c35eed27fa9051 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 7 Feb 2022 18:44:59 +0100 Subject: [PATCH 10/24] Update nginx.conf --- conf/nginx.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7f0e372..4b1646c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,9 +17,6 @@ location __PATH__/ { # WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; - - # Include SSOWAT user panel. - #include conf.d/yunohost_panel.conf.inc; } location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { From 8a39c469c9cc39c23a9be5dd09cdfa4f313ed5f3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 07:27:10 +0100 Subject: [PATCH 11/24] 1.8.17 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index e7f957f..6d46a97 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.16.tar.gz -SOURCE_SUM=dfdb60910aa9df85bde8cad8729ef6a33e36014739a3e8ce105f5e96a6b99d8c +SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.17.tar.gz +SOURCE_SUM=077df9a46046f579644d26525c42008d8b758796ba447ddbd99fe1d975156f31 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 22c2a70..01f2d6e 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.16~ynh1", + "version": "1.8.17~ynh1", "url": "https://etherpad.org/", "upstream": { "license": "Apache-2.0", From cc6b43a42a23bcc1aa71c61fe0c91281eda37764 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 24 Feb 2022 06:27:17 +0000 Subject: [PATCH 12/24] 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 96a9dc2..24f25f6 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.16~ynh1 +**Shipped version:** 1.8.17~ynh1 **Demo:** https://video.etherpad.com/ diff --git a/README_fr.md b/README_fr.md index e241bee..b7010bd 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.16~ynh1 +**Version incluse :** 1.8.17~ynh1 **Démo :** https://video.etherpad.com/ From 862790599ec7d73a29c0df18fd6ecc0422eba5e9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 07:30:09 +0100 Subject: [PATCH 13/24] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 01f2d6e..ac912f6 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.16", + "admindoc": "http://etherpad.org/doc/v1.8.17", "code": "https://github.com/ether/etherpad-lite" }, "license": "Apache-2.0", From 09ccbba551b5f97119a6245409b5d4f6061ad316 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 24 Feb 2022 06:30:29 +0000 Subject: [PATCH 14/24] 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 24f25f6..f0bb26f 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.16 +* Official admin documentation: http://etherpad.org/doc/v1.8.17 * 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 b7010bd..7903fc4 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.16 +* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.17 * 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 ce0f5904ce1877a726610a26daab39906b560bda Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 09:15:51 +0100 Subject: [PATCH 15/24] Update settings.json --- conf/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/settings.json b/conf/settings.json index 7d81033..7225e41 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -191,7 +191,7 @@ /* * The default text of a pad */ - "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https:\/\/etherpad.org\n", + "defaultPadText" : "Welcome to Etherpad!\n\nThis version of Etherpad is installed without plugins and uses Redis as database.\ndatabase backup is not fully implemented.\n\nIf you are facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/etherpad_ynh", /* * Default Pad behavior. From 319af5487c5c59475c7667d59b2bad00fea6ea7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 09:33:58 +0100 Subject: [PATCH 16/24] Update manifest.json --- manifest.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index ac912f6..94e4746 100644 --- a/manifest.json +++ b/manifest.json @@ -64,7 +64,18 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de", "en", "es", "fr", "it"], + "choices": [ + "ca", + "de", + "en", + "es", + "fr", + "gl", + "hu", + "it", + "nl", + "pt" + ], "default": "en" }, { From 19ed697b3c1bedca8dfd4e92929a6edad6217085 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 09:38:32 +0100 Subject: [PATCH 17/24] Fix --- conf/settings.json | 2 +- scripts/restore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/settings.json b/conf/settings.json index 7225e41..c82ad66 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -191,7 +191,7 @@ /* * The default text of a pad */ - "defaultPadText" : "Welcome to Etherpad!\n\nThis version of Etherpad is installed without plugins and uses Redis as database.\ndatabase backup is not fully implemented.\n\nIf you are facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/etherpad_ynh", + "defaultPadText" : "Welcome to Etherpad-lite!\n\nThis version of Etherpad is installed without plugins and uses Redis as database.\nBe aware, Redis database backup and restore is not fully implemented.\n\nIf you are facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/etherpad_ynh", /* * Default Pad behavior. diff --git a/scripts/restore b/scripts/restore index e2dfc6f..53b531e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -102,7 +102,7 @@ yunohost service add $app --description="Collaborative editor" --log="/var/log/$ ynh_script_progression --message="Starting a systemd service..." --weight=8 ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --line_match="Your Etherpad version is" -sleep 120 +sleep 60 #================================================= # GENERIC FINALIZATION From 1087f5c63e6bf61d46b398abcf4a54c44805f734 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 18:38:46 +0100 Subject: [PATCH 18/24] fix --- scripts/install | 4 ++-- scripts/restore | 12 ++++++++++++ scripts/upgrade | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7ba7f31..88b8c9d 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE -password=$YNH_APP_ARG_PASSWORD +password="$YNH_APP_ARG_PASSWORD" export=$YNH_APP_ARG_EXPORT app=$YNH_APP_INSTANCE_NAME @@ -53,7 +53,7 @@ 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=language --value=$language -ynh_app_setting_set --app=$app --key=password --value=$password +ynh_app_setting_set --app=$app --key=password --value="$password" ynh_app_setting_set --app=$app --key=export --value=$export #================================================= diff --git a/scripts/restore b/scripts/restore index 53b531e..163aebc 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,6 +29,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +export=$(ynh_app_setting_get --app=$app --key=export) #================================================= # CHECK IF ETHERPAD CAN BE RESTORED @@ -89,6 +90,17 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --we ynh_restore_file --origin_path="/etc/logrotate.d/$app" +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=10 + +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 + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 460bb7e..2d40202 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,6 +24,7 @@ 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) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) +export=$(ynh_app_setting_get --app=$app --key=export) #================================================= # CHECK VERSION From a7b2d33089d3a81f918c947e70709fd9ea9c4baa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 18:41:23 +0100 Subject: [PATCH 19/24] Update install --- scripts/install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 88b8c9d..19815d7 100644 --- a/scripts/install +++ b/scripts/install @@ -75,9 +75,9 @@ ynh_script_progression --message="Installing dependencies..." --weight=6 ynh_install_nodejs --nodejs_version=$nodejs_version if [ "$export" = "abiword" ]; then - ynh_install_app_dependencies $abiword_app_depencencies + ynh_exec_warn_less ynh_install_app_dependencies $abiword_app_depencencies elif [ "$export" = "libreoffice" ]; then - ynh_install_app_dependencies $libreoffice_app_dependencies + ynh_exec_warn_less ynh_install_app_dependencies $libreoffice_app_dependencies fi #================================================= @@ -124,8 +124,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Installing Etherpad..." --weight=60 -chown -R $app $final_path - pushd $final_path ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh From 4e55d990b78aa7c39bafbb834b3b9f4e42dcc04e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 18:48:09 +0100 Subject: [PATCH 20/24] Update DISCLAIMER.md --- doc/DISCLAIMER.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index a373fcd..68d0c28 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,3 +1,10 @@ +## Etherpad Lite + +This version of Etherpad is installed without plugins and uses Redis as database. +Be aware, Redis database backup and restore is not fully implemented. + +If you want to install Etherpad with pugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", + ## Configuration You can access Etherpad's admin panel at `domain.tld/admin`. The configuration file for Etherpad is at the path `/var/www/etherpad/settings.json`. From e6323fd63fa80f83b9dd5b892afd9657104e0a7c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 24 Feb 2022 17:48:17 +0000 Subject: [PATCH 21/24] Auto-update README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index f0bb26f..9779bbb 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,13 @@ Etherpad is a real-time collaborative editor scalable to thousands of simultaneo ## Disclaimers / important information +## Etherpad Lite + +This version of Etherpad is installed without plugins and uses Redis as database. +Be aware, Redis database backup and restore is not fully implemented. + +If you want to install Etherpad with pugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", + ## Configuration You can access Etherpad's admin panel at `domain.tld/admin`. The configuration file for Etherpad is at the path `/var/www/etherpad/settings.json`. From d446f8ad207126e409195183cfecc095427bc62d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Feb 2022 22:26:51 +0100 Subject: [PATCH 22/24] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 73922e8..fdd1613 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=96653aee9379d579a655777ac274355f4afca61c + #upgrade=1 from_commit=96653aee9379d579a655777ac274355f4afca61c backup_restore=1 multi_instance=1 change_url=1 From f11e66550cf97e36e02ec8a4ea69443ee109c1e8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 28 Feb 2022 15:48:11 +0100 Subject: [PATCH 23/24] Update credentials.json --- conf/credentials.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/credentials.json b/conf/credentials.json index 925c908..64ef848 100644 --- a/conf/credentials.json +++ b/conf/credentials.json @@ -22,7 +22,7 @@ "dbType" : "redis", "dbSettings" : { - "host" : "localhost", + "host" : "127.0.0.1", "port" : 6379, "database": "__REDIS_DB__" }, From c62dfbddc2d74b50fad99f456f657904a942313b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 28 Feb 2022 15:55:21 +0100 Subject: [PATCH 24/24] 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 6d46a97..5919e11 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.17.tar.gz -SOURCE_SUM=077df9a46046f579644d26525c42008d8b758796ba447ddbd99fe1d975156f31 +SOURCE_SUM=3b51eb0259764669dedfb4d13cdbe8d4a2dea37735fe32941aac39b5def9f99b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true