From 0edc29690bc1d27c70c2fa7768233c1702bcfcb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:16:35 +0200 Subject: [PATCH] Testing (#62) * Small fixes * 1.7.0 (#4) * Upgrde to v.1.7.0 * Set requirements to 3.8.1 * Update README.md * Upgrade to 1.7.1 (#6) * Add limitations * Avoid to buid frontend bundle * Remove PostegrSQL warning * Update README.md Add you should reload service for changes in config to be registered. * Add restart systemd tuto * Change version * Finding an available port * Upgrade to version 1.7.2 (#12) * Patch (#17) * Cleaning up * Update manifest.json * Cleaning up * Secure config file * Remove yarn * Update change_url * Update change_url * Revert "Remove yarn" This reverts commit a8cabf0c0addf8f9c4569b27ae04512db5c93df0. * Update change_url * Update systemd.service * Update systemd.service * Cleaning up * Fix * fix badges * Upgrade to version 1.8.0 (#21) * Upgrade to version 1.8.0 * Upgrade to 1.8.0 * Upgrade to 1.8.0 * Upgrade to version 1.8.1 * [autopatch] Update issue and PR templates (#25) Co-authored-by: Yunohost-Bot <> * Add templates * Upgrade to 1.8.2 * Update check_process * Add templates * Auto-update README * Set new requirements (#28) * Fix * Simplify config * Auto-update README Co-authored-by: Yunohost-Bot <> * Update manifest.json * Auto-update README * 1.9.0 (#31) * 1.9.0 * Update manifest.json * Auto-update README * Systemd hardening (#33) * Update systemd.service * Update app.src * Update manifest.json * 1.9.1 (#34) * Upgrade to 1.9.1 * 1.9.2 (#36) * Remove replace_string * Fix (#39) * Update manifest.json * Auto-update README * Update config.json.example * Update config.json.example * 1.9.3 * Auto-update README * 1.9.4 (#42) * 1.9.4 * Auto-update README Co-authored-by: yunohost-bot * Auto-update README * Update manifest.json * Update _common.sh * set relative path for --keep opt * Update manifest.json * Auto-update README * 1.9.5 * Auto-update README * 1.9.6 * Auto-update README * Add more security as default (#47) * Add more security as default * Auto-update README * Update config.json.example * Update change_url Co-authored-by: yunohost-bot * Update manifest.json * Auto-update README * Update install * Fix * Add allow free url to config panel * Add FreeURL authentication * Update config.json.example * Fix * remove yarn cache * Auto-update README * 1.9.7 * Auto-update README * Update change_url * Update systemd.service * Update systemd.service * Update install * FIx * Update manifest.json * Auto-update README * Update manifest.json * Version 2 (#58) * v2 * fix * Auto-update README * Update manifest.toml * fix * Update install * Update upgrade * Update change_url * Update install * fix * Auto-update README * Fix * Auto-update README * Fix * fix * Update manifest.toml * fix * fix * Auto-update README * Update tests.toml --------- Co-authored-by: yunohost-bot * cleaning * 1.9.8 * Auto-update README --------- Co-authored-by: Eauchat <34686393+eauchat@users.noreply.github.com> Co-authored-by: Alexandre Aubin Co-authored-by: YunoHost Bot Co-authored-by: Yunohost-Bot <> Co-authored-by: yunohost-bot Co-authored-by: yalh76 --- README.md | 2 +- README_fr.md | 2 +- manifest.toml | 8 ++++---- scripts/_common.sh | 2 +- scripts/install | 4 +--- scripts/remove | 22 +++------------------- scripts/restore | 29 +++++------------------------ scripts/upgrade | 20 ++++++-------------- 8 files changed, 22 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 692fe0e..15628a4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ You can use it to easily collaborate on notes, graphs and even presentations in - Easy to use permission system - Low system requirements -**Shipped version:** 1.9.7~ynh3 +**Shipped version:** 1.9.8~ynh1 **Demo:** https://demo.hedgedoc.org/ diff --git a/README_fr.md b/README_fr.md index 569a67c..1ed5ab4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ You can use it to easily collaborate on notes, graphs and even presentations in - Easy to use permission system - Low system requirements -**Version incluse :** 1.9.7~ynh3 +**Version incluse :** 1.9.8~ynh1 **Démo :** https://demo.hedgedoc.org/ diff --git a/manifest.toml b/manifest.toml index c8d75f4..14fddb0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "HedgeDoc" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "1.9.7~ynh3" +version = "1.9.8~ynh1" maintainers = ["eric_G"] @@ -17,7 +17,7 @@ admindoc = "https://docs.hedgedoc.org/" code = "https://github.com/hedgedoc/hedgedoc" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = true ldap = true @@ -45,8 +45,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/hedgedoc/hedgedoc/releases/download/1.9.7/hedgedoc-1.9.7.tar.gz" - sha256 = "c9bd99c65cf45fa1d7808855b46abbfa13b24400254d8da5e81dae2965494bb3" + url = "https://github.com/hedgedoc/hedgedoc/releases/download/1.9.8/hedgedoc-1.9.8.tar.gz" + sha256 = "dca402c47804b7b2ac0a2bcf715b8e570a9e617c87c150f5ff2a2b35b764c349" autoupdate.strategy = "latest_github_tag" [resources.ports] diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..9195d57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=18 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 795873a..a48110b 100644 --- a/scripts/install +++ b/scripts/install @@ -51,12 +51,10 @@ chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated systemd config ynh_add_systemd_config yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" diff --git a/scripts/remove b/scripts/remove index dbd13c5..159acb6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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 @@ -22,27 +23,10 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - -# Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - ynh_remove_nodejs -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5 - -# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index eee9898..f41173e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -9,15 +9,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE 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" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -48,32 +39,22 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=5 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" #================================================= -# START SYSTEMD SERVICE +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fc592db..b67cf3e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,28 +70,27 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -# Create a dedicated nginx config ynh_add_nginx_config -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -# Create a dedicated systemd config ynh_add_systemd_config +yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" + #============================================== # INSTALL HEDGEDOC #============================================== if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=20 + ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=20 -pushd "$install_dir" + pushd "$install_dir" ynh_secure_remove /usr/local/share/.cache/yarn ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile @@ -99,13 +98,6 @@ pushd "$install_dir" popd fi -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - -yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #=================================================