From 7fb28a7836dbd55d63183198f3147c5d624dec5e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 20 Sep 2021 13:49:33 +0200 Subject: [PATCH 01/25] Update updater.sh --- .github/workflows/updater.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index fa5f9d2..edb6880 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -23,9 +23,9 @@ repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1] version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) -# if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then -# version=${version:1} -# fi +if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then + version=${version:1} +fi # Setting up the environment variables echo "Current version: $current_version" @@ -63,7 +63,7 @@ echo "Handling asset at $asset_url" # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) # Leave $src empty to ignore the asset case $asset_url in - *".zip"*) + *".tar.gz"*) src="app" ;; *) From 90fa1c377a516b68f2a41bd964d4c00bde53abb9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 12 Nov 2021 20:56:05 +0100 Subject: [PATCH 02/25] Fix ynh_exec_warn_less not being happy with FOO=bar --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a82f0fd..b4c3b38 100644 --- a/scripts/install +++ b/scripts/install @@ -126,9 +126,10 @@ ynh_script_progression --message="Installing The Lounge..." pushd $final_path ynh_use_nodejs - ynh_exec_warn_less NODE_ENV=production yarn install + export NODE_ENV=production + ynh_exec_warn_less yarn install yarn add webpack webpack-dev-server --dev - ynh_exec_warn_less NODE_ENV=production yarn build + ynh_exec_warn_less yarn build popd #================================================= From 8b2fc6518e9d3698dcc67b4862203c425cfa0cda Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 12 Nov 2021 20:56:32 +0100 Subject: [PATCH 03/25] Fix ynh_exec_warn_less not being happy with FOO=bar --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3ed90c3..96e2f4e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,7 +133,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then pushd $final_path ynh_use_nodejs - ynh_exec_warn_less NODE_ENV=production yarn install + export NODE_ENV=production + ynh_exec_warn_less yarn install yarn add webpack webpack-dev-server --dev ynh_exec_warn_less NODE_ENV=production yarn build popd From 20c2705a1c9c0bc5234082b1ac9450aebc586d44 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 12 Nov 2021 20:57:53 +0100 Subject: [PATCH 04/25] Fix ynh_exec_warn_less not being happy with FOO=bar --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 96e2f4e..50febd7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,9 +134,9 @@ then pushd $final_path ynh_use_nodejs export NODE_ENV=production - ynh_exec_warn_less yarn install + ynh_exec_warn_less yarn install yarn add webpack webpack-dev-server --dev - ynh_exec_warn_less NODE_ENV=production yarn build + ynh_exec_warn_less yarn build popd fi From bb20deaebedccabdb6b9a0a0a61d91405610d37d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 22:06:56 +0100 Subject: [PATCH 05/25] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index aef66c7..3f02951 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "email": "beudbeud@beudibox.fr" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ From 279b15fb109f5fc03e55ba5318b87347918ed4a4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 08:28:18 +0100 Subject: [PATCH 06/25] 4.3.0 --- check_process | 6 +++--- conf/app.src | 4 ++-- doc/DESCRIPTION_fr.md | 7 +++++++ manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/backup | 12 ++++++------ scripts/install | 34 +++++++++++++++++----------------- scripts/remove | 36 +++++++++++++++++++----------------- scripts/restore | 27 +++++++++++++-------------- scripts/upgrade | 29 ++++++++++++++--------------- 10 files changed, 83 insertions(+), 76 deletions(-) create mode 100644 doc/DESCRIPTION_fr.md diff --git a/check_process b/check_process index b8d9626..cc11177 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c + upgrade=1 from_commit=3e641515e539d8c76c00ae3dc4d411e055510770 backup_restore=1 multi_instance=0 change_url=1 @@ -20,6 +20,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=bd00c8e3ce43563f33fde073cf36b997c348d05c - name=Merge pull request #25 + ; commit=3e641515e539d8c76c00ae3dc4d411e055510770 + name=Merge pull request #42 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/conf/app.src b/conf/app.src index bc0c0f7..dd54063 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/thelounge/thelounge/archive/v4.2.0.tar.gz -SOURCE_SUM=6119c0692f03678940848ec19a8095ba67f8fdba42bb12481205314eabc0672d +SOURCE_URL=https://github.com/thelounge/thelounge/archive/v4.3.0.tar.gz +SOURCE_SUM=fa3ced790927e64bfb0917dadd7702b811bcba92207b33f23bb1f7444ad0dfc9 SOURCE_SUM_PRG=sha256sum ARCH_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..c4cf790 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,7 @@ +Client Web IRC moderne conçu pour l'auto-hébergement + +### Caractéristiques: + +- Toujours connecté +- Interface réactive +- Support multi-utilisateurs \ No newline at end of file diff --git a/manifest.json b/manifest.json index 3f02951..f032f9a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web IRC client", "fr": "Client Web IRC" }, - "version": "4.2.0~ynh5", + "version": "4.3.0~ynh1", "url": "https://thelounge.chat/", "upstream": { "license": "MIT", diff --git a/scripts/_common.sh b/scripts/_common.sh index b3656bc..ba69dff 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # nodejs version -nodejs_version=14 +nodejs_version=16 #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 634e91f..1c87766 100644 --- a/scripts/backup +++ b/scripts/backup @@ -37,6 +37,12 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" +#================================================= +# BACKUP DATADIR +#================================================= + +ynh_backup --src_path="$datadir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= @@ -49,12 +55,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP CONFIG -#================================================= - -ynh_backup --src_path="$datadir" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index b4c3b38..e90c65c 100644 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -40,7 +40,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -50,7 +50,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port 9000) @@ -59,7 +59,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." +ynh_script_progression --message="Installing dependencies..." --weight=7 # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -70,7 +70,7 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." +ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user ynh_system_user_create --username=$app --home_dir="$final_path" @@ -78,7 +78,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src @@ -91,7 +91,7 @@ chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config @@ -99,7 +99,7 @@ ynh_add_nginx_config #================================================= # CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating a data directory..." +ynh_script_progression --message="Creating a data directory..." --weight=1 datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir @@ -115,27 +115,27 @@ chown -R $app:www-data "$datadir" #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." +ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_add_config --template="../conf/config.js" --destination="$datadir/config.js" #================================================= # INSTALL THE LOUNGE #================================================= -ynh_script_progression --message="Installing The Lounge..." +ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - yarn add webpack webpack-dev-server --dev + ynh_exec_warn_less yarn add webpack webpack-dev-server --dev ynh_exec_warn_less yarn build popd #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." +ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -143,14 +143,14 @@ ynh_add_systemd_config #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path=systemd @@ -158,7 +158,7 @@ ynh_systemd_action --service_name=$app --action=start --log_path=systemd #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] @@ -169,7 +169,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -177,4 +177,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 76609f1..d1da263 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -30,14 +30,14 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) # Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." + ynh_script_progression --message="Removing $app service..." --weight=2 yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." +ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2 # Remove the dedicated systemd config ynh_remove_systemd_config @@ -45,7 +45,7 @@ ynh_remove_systemd_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." +ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove NodeJS ynh_remove_nodejs @@ -53,34 +53,36 @@ ynh_remove_nodejs #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing $app main directory..." +ynh_script_progression --message="Removing $app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=2 + ynh_secure_remove --file="$datadir" +fi + #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE THE CONFIG FILE -#================================================= -ynh_script_progression --message="Removing the config file..." - -ynh_secure_remove --file="$datadir" - #================================================= # GENERIC FINALIZATION #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user ynh_system_user_delete --username=$app @@ -89,4 +91,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 13eded8..f762792 100644 --- a/scripts/restore +++ b/scripts/restore @@ -22,7 +22,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." +ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -34,24 +34,23 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." --weight=1 -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 #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" @@ -59,7 +58,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring $app main directory..." +ynh_script_progression --message="Restoring $app main directory..." --weight=5 ynh_restore_file --origin_path="$final_path" @@ -70,7 +69,7 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE CONFIG #================================================= -ynh_script_progression --message="Restoring the config path..." +ynh_script_progression --message="Restoring the config path..." --weight=2 ynh_restore_file --origin_path="$datadir" --not_mandatory @@ -85,7 +84,7 @@ chown -R $app:www-data "$datadir" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -96,7 +95,7 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." +ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet @@ -104,14 +103,14 @@ systemctl enable $app.service --quiet #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd @@ -120,7 +119,7 @@ ynh_systemd_action --service_name=$app --action=start --log_path=systemd #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -128,4 +127,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 50febd7..ecb1fb6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -25,14 +25,13 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -47,7 +46,7 @@ ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If final_path doesn't exist, create it if [ -z "$final_path" ]; then @@ -74,14 +73,14 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." +ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +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" @@ -92,7 +91,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." + ynh_script_progression --message="Upgrading source files..." --weight=2 ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src @@ -107,7 +106,7 @@ chown -R $app:www-data $datadir #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config @@ -115,7 +114,7 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." +ynh_script_progression --message="Upgrading dependencies..." --weight=5 # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version @@ -135,7 +134,7 @@ then ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - yarn add webpack webpack-dev-server --dev + ynh_exec_warn_less yarn add webpack webpack-dev-server --dev ynh_exec_warn_less yarn build popd fi @@ -143,7 +142,7 @@ fi #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." +ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -153,21 +152,21 @@ ynh_add_systemd_config #================================================= # SECURE FILES AND DIRECTORIES #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -175,4 +174,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" +ynh_script_progression --message="Upgrade of $app completed" --last From eb2c8ff362fd4759f8dc8ae71fef7db2a7cf931c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 23 Nov 2021 07:28:25 +0000 Subject: [PATCH 07/25] Auto-update README --- README.md | 2 +- README_fr.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6db9a8e..b8c30e2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Modern web IRC client designed for self-hosting - Responsive interface - Multi-user support -**Shipped version:** 4.2.0~ynh5 +**Shipped version:** 4.3.0~ynh1 **Demo:** https://demo.thelounge.chat/ diff --git a/README_fr.md b/README_fr.md index c7612d7..0befa53 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,15 +11,15 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Modern web IRC client designed for self-hosting +Client Web IRC moderne conçu pour l'auto-hébergement -### Features: +### Caractéristiques: -- Always connected -- Responsive interface -- Multi-user support +- Toujours connecté +- Interface réactive +- Support multi-utilisateurs -**Version incluse :** 4.2.0~ynh5 +**Version incluse :** 4.3.0~ynh1 **Démo :** https://demo.thelounge.chat/ From f7b6c6bef856160e88862dcc1b9d70b0a14b6b83 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 08:52:06 +0100 Subject: [PATCH 08/25] Update upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ecb1fb6..ff13e72 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,10 +132,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then pushd $final_path ynh_use_nodejs - export NODE_ENV=production - ynh_exec_warn_less yarn install - ynh_exec_warn_less yarn add webpack webpack-dev-server --dev - ynh_exec_warn_less yarn build + #export NODE_ENV=production + yarn install --production=true --silent + yarn add webpack webpack-dev-server --dev --non-interactive + yarn build --non-interactive popd fi From e13b675ee959ec941a96ee4916632d0c00e1ce21 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 09:24:09 +0100 Subject: [PATCH 09/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e90c65c..5bc79c5 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - ynh_exec_warn_less yarn add webpack webpack-dev-server --dev + #ynh_exec_warn_less yarn add webpack webpack-dev-server --dev ynh_exec_warn_less yarn build popd From af76ec58b3ca0f3159d91b3a54842191e75dff7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 10:11:45 +0100 Subject: [PATCH 10/25] Update install --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 5bc79c5..f33e569 100644 --- a/scripts/install +++ b/scripts/install @@ -126,10 +126,10 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs - export NODE_ENV=production - ynh_exec_warn_less yarn install - #ynh_exec_warn_less yarn add webpack webpack-dev-server --dev - ynh_exec_warn_less yarn build + #export NODE_ENV=production + yarn install --production + yarn add webpack --dev + yarn build popd #================================================= From 91543d7c74da61b458357a6fd977c7a820043d63 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 10:16:49 +0100 Subject: [PATCH 11/25] Update install --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index f33e569..86b6deb 100644 --- a/scripts/install +++ b/scripts/install @@ -126,10 +126,10 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs - #export NODE_ENV=production - yarn install --production - yarn add webpack --dev - yarn build + export NODE_ENV=production + ynh_exec_warn_less yarn install + yarn add webpack webpack-dev-server --dev + ynh_exec_warn_less yarn build popd #================================================= From d58dba687ca8348623feb3da549d8721da5cd389 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 10:23:50 +0100 Subject: [PATCH 12/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 86b6deb..a4fd9f4 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - yarn add webpack webpack-dev-server --dev + yarn add webpack webpack-cli webpack-dev-server --dev ynh_exec_warn_less yarn build popd From 5507407a1fa9e87cda0e05b691105d7443f0661e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 10:26:09 +0100 Subject: [PATCH 13/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a4fd9f4..eac4d08 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - yarn add webpack webpack-cli webpack-dev-server --dev + yarn add webpack webpack-cli --dev ynh_exec_warn_less yarn build popd From c3abdcc2d93f511164f1549cff81108e75592699 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 10:28:55 +0100 Subject: [PATCH 14/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index eac4d08..d93ef8d 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - yarn add webpack webpack-cli --dev + #yarn add webpack webpack-cli --dev ynh_exec_warn_less yarn build popd From c32c103c039a426680429a87196e224168d42245 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Nov 2021 16:41:37 +0100 Subject: [PATCH 15/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d93ef8d..eac4d08 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs export NODE_ENV=production ynh_exec_warn_less yarn install - #yarn add webpack webpack-cli --dev + yarn add webpack webpack-cli --dev ynh_exec_warn_less yarn build popd From c48e912812487e28acd1fe1c18651b8425dac601 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Dec 2021 15:42:23 +0100 Subject: [PATCH 16/25] Update config.js --- conf/config.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/conf/config.js b/conf/config.js index 294fa62..065b7bc 100644 --- a/conf/config.js +++ b/conf/config.js @@ -152,8 +152,9 @@ module.exports = { // ### prefetchMaxSearchSize // - // This value sets the maximum request size made to find the Open Graph tags - // for link previews. For some sites like YouTube this can easily exceed 300 + // This value sets the maximum response size allowed when finding the Open + // Graph tags for link previews. The entire response is temporarily stored + // in memory and for some sites like YouTube this can easily exceed 300 // kilobytes. // // This value is set to `50` kilobytes by default. @@ -227,10 +228,11 @@ module.exports = { // numbers from 0 to 9. For example, `Guest%%%` may become `Guest123`. // - `username`: User name. // - `realname`: Real name. + // - `leaveMessage`: Network specific leave message (overrides global leaveMessage) // - `join`: Comma-separated list of channels to auto-join once connected. // // This value is set to connect to the official channel of The Lounge on - // irc.libera.chat by default: + // Libera.Chat by default: // // ```js // defaults: { @@ -257,6 +259,7 @@ module.exports = { username: "thelounge", realname: "The Lounge User", join: "#yunohost", + leaveMessage: "", }, // ### `lockNetwork` @@ -406,13 +409,52 @@ module.exports = { // For plain connections, use the `ldap` scheme. url: "ldap://127.0.0.1:389", + // - `tlsOptions`: LDAP connection TLS options (only used if scheme is + // `ldaps://`). It is an object whose values are Node.js' `tls.connect()` + // options. It is set to `{}` by default. + // For example, this option can be used in order to force the use of IPv6: + // ```js + // { + // host: 'my::ip::v6', + // servername: 'example.com' + // } + // ``` + tlsOptions: {}, + // - `primaryKey`: LDAP primary key. It is set to `"uid"` by default. primaryKey: "uid", // - `baseDN`: LDAP base DN, alternative to `searchDN`. For example, set it // to `"ou=accounts,dc=example,dc=com"`. // When unset, the LDAP auth logic with use `searchDN` instead to locate users. - baseDN: "ou=users,dc=yunohost,dc=org", + baseDN: "ou=users,dc=yunohost,dc=org", + + // - `searchDN`: LDAP search DN settings. This defines the procedure by + // which The Lounge first looks for the user DN before authenticating them. + // It is ignored if `baseDN` is specified. It is an object with the + // following keys: + searchDN: { + // - `rootDN`: This bind DN is used to query the server for the DN of + // the user. This is supposed to be a system user that has access in + // read-only to the DNs of the people that are allowed to log in. + // It is set to `"cn=thelounge,ou=system-users,dc=example,dc=com"` by + // default. + rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com", + + // - `rootPassword`: Password of The Lounge LDAP system user. + rootPassword: "1234", + + // - `ldapFilter`: it is set to `"(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com)"` + // by default. + filter: "(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com)", + + // - `base`: LDAP search base (search only within this node). It is set + // to `"dc=example,dc=com"` by default. + base: "dc=example,dc=com", + + // - `scope`: LDAP search scope. It is set to `"sub"` by default. + scope: "sub", + }, }, // ## Debugging settings From 5f9ffe2407b2b4fee4f2bb229b3312691aaf1427 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Dec 2021 15:44:55 +0100 Subject: [PATCH 17/25] Try to fix the install procedure trying to install the dev dependencies --- scripts/install | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index eac4d08..952e92d 100644 --- a/scripts/install +++ b/scripts/install @@ -126,10 +126,9 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs - export NODE_ENV=production - ynh_exec_warn_less yarn install - yarn add webpack webpack-cli --dev - ynh_exec_warn_less yarn build + NODE_ENV=production ynh_exec_warn_less yarn install + NODE_ENV=production yarn add webpack webpack-cli --dev + NODE_ENV=production ynh_exec_warn_less yarn build popd #================================================= From dee23bf4f01f6b56e253dacee4f9ddd3397f9632 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 11:00:00 +0100 Subject: [PATCH 18/25] Update config.js --- conf/config.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/conf/config.js b/conf/config.js index 065b7bc..eecef02 100644 --- a/conf/config.js +++ b/conf/config.js @@ -427,34 +427,7 @@ module.exports = { // - `baseDN`: LDAP base DN, alternative to `searchDN`. For example, set it // to `"ou=accounts,dc=example,dc=com"`. // When unset, the LDAP auth logic with use `searchDN` instead to locate users. - baseDN: "ou=users,dc=yunohost,dc=org", - - // - `searchDN`: LDAP search DN settings. This defines the procedure by - // which The Lounge first looks for the user DN before authenticating them. - // It is ignored if `baseDN` is specified. It is an object with the - // following keys: - searchDN: { - // - `rootDN`: This bind DN is used to query the server for the DN of - // the user. This is supposed to be a system user that has access in - // read-only to the DNs of the people that are allowed to log in. - // It is set to `"cn=thelounge,ou=system-users,dc=example,dc=com"` by - // default. - rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com", - - // - `rootPassword`: Password of The Lounge LDAP system user. - rootPassword: "1234", - - // - `ldapFilter`: it is set to `"(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com)"` - // by default. - filter: "(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com)", - - // - `base`: LDAP search base (search only within this node). It is set - // to `"dc=example,dc=com"` by default. - base: "dc=example,dc=com", - - // - `scope`: LDAP search scope. It is set to `"sub"` by default. - scope: "sub", - }, + baseDN: "ou=users,dc=yunohost,dc=org", }, // ## Debugging settings From 247f25a90a3e70bc3ae2ac901874aa9bc10ac3c9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 11:10:42 +0100 Subject: [PATCH 19/25] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 952e92d..88a79b4 100644 --- a/scripts/install +++ b/scripts/install @@ -126,9 +126,9 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs - NODE_ENV=production ynh_exec_warn_less yarn install - NODE_ENV=production yarn add webpack webpack-cli --dev - NODE_ENV=production ynh_exec_warn_less yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd #================================================= From 9c3cea40f9139e085d7c539435831bec0459abf7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 11:14:08 +0100 Subject: [PATCH 20/25] Update upgrade --- scripts/upgrade | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ff13e72..9dce280 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,10 +132,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then pushd $final_path ynh_use_nodejs - #export NODE_ENV=production - yarn install --production=true --silent - yarn add webpack webpack-dev-server --dev --non-interactive - yarn build --non-interactive + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd fi From 7b53083a992b8a381f6ba1cbef6ffb88dd821357 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 11:14:17 +0100 Subject: [PATCH 21/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 88a79b4..13082a4 100644 --- a/scripts/install +++ b/scripts/install @@ -126,7 +126,7 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd From 2a7be8b817cd031372bb576ce89226311b875477 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 12:32:32 +0100 Subject: [PATCH 22/25] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cc11177..d92550b 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=3e641515e539d8c76c00ae3dc4d411e055510770 + #upgrade=1 from_commit=3e641515e539d8c76c00ae3dc4d411e055510770 backup_restore=1 multi_instance=0 change_url=1 From 9f0056948b76ba3de5aa04c2dcab6413ed6ebd80 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 14:22:30 +0100 Subject: [PATCH 23/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 13082a4..6e15a94 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ ynh_script_progression --message="Installing The Lounge..." --weight=10 pushd $final_path ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd From 7110c5cfedef3df2c9498e79ade5f14f73d87530 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 14:26:48 +0100 Subject: [PATCH 24/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6e15a94..b83938f 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ pushd $final_path ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link + #ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd #================================================= From 8f31c4666d5ecdf9a5953aa08f5035eb1f1f3566 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 4 Jan 2022 14:31:04 +0100 Subject: [PATCH 25/25] Set env to prod --- scripts/install | 1 - scripts/upgrade | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index b83938f..01bf821 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,6 @@ pushd $final_path ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build - #ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9dce280..734454c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,10 +131,9 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st if [ "$upgrade_type" == "UPGRADE_APP" ] then pushd $final_path - ynh_use_nodejs + ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn link + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build popd fi