From d892f6e95491645685f0bcbfefc75df677230661 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 18 Sep 2022 03:17:45 +0200 Subject: [PATCH 1/2] Upgrade to 2.4.18~ynh3 --- .travis.yml | 12 ------------ check_process | 2 ++ manifest.json | 2 +- scripts/_common.sh | 6 ++++-- scripts/backup | 5 +++++ scripts/change_url | 3 +-- scripts/install | 28 +++++++++++++++------------- scripts/remove | 2 +- scripts/restore | 10 +++++++--- scripts/upgrade | 15 +++++++-------- 10 files changed, 43 insertions(+), 42 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3404bd9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -{ - "language": "node_js", - "before_install": [ - "git clone https://github.com/YunoHost/package_linter /tmp/package_linter" - ], - "script": [ - "/tmp/package_linter/package_linter.py ./" - ], - "group": "stable", - "dist": "trusty", - "os": "linux" -} diff --git a/check_process b/check_process index 70cdcac..83fa91e 100644 --- a/check_process +++ b/check_process @@ -15,6 +15,8 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=03e787291ba1104f195fdeb5103071b9546b4ad5 + # 2.4.18~ynh2 + upgrade=1 from_commit=8fcdd9d4e05b1d5e4f98dd57ac3659c060330916 backup_restore=1 multi_instance=0 port_already_use=0 diff --git a/manifest.json b/manifest.json index 19e0756..d30bd1f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Minimalist Drag & drop file sharing app", "fr": "Application minimaliste de partage de fichiers" }, - "version": "2.4.18~ynh2", + "version": "2.4.18~ynh3", "url": "https://github.com/broncowdd/BoZoN", "upstream": { "license": "AGPL-3.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index 660f7d8..05bfbfd 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,10 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="php$YNH_DEFAULT_PHP_VERSION-zip php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-gd" +php_dependencies="php$YNH_DEFAULT_PHP_VERSION-zip php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-gd" + +# dependencies used by the app (must be on a single line) +pkg_dependencies="$php_dependencies" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 7b168bf..083559b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,4 +1,5 @@ #!/bin/bash + #================================================= # GENERIC START #================================================= @@ -12,6 +13,10 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/change_url b/scripts/change_url index f5c3329..99d5d36 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -32,12 +32,11 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" diff --git a/scripts/install b/scripts/install index 28ae206..489985e 100644 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,10 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -30,7 +34,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 datadir="/home/yunohost.app/$app" @@ -46,7 +50,7 @@ ynh_user_exists --username="$admin" #================================================= # 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 @@ -66,7 +70,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # 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" @@ -86,7 +90,7 @@ mv "$tmpdir" "$final_path" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." +ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config @@ -94,7 +98,7 @@ ynh_add_fpm_config #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 if [ "$path_url" != "/" ]; then ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="../conf/nginx.conf" @@ -106,7 +110,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 @@ -116,7 +120,7 @@ mkdir -p $datadir #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." +ynh_script_progression --message="Adding a configuration file..." --weight=1 ## create private & data folders myynh_create_dir "$final_path/private" @@ -140,17 +144,15 @@ ynh_permission_update --permission="main" --add="visitors" ## fill the superadmin creation form (helper ynh_local_curl doesn't work due to --data vs --data-urlencode ?) admin_url="/index.php?p=login" admin=$(myynh_urlencode $admin) -ynh_print_OFF - password=$(myynh_urlencode $password) - ynh_local_curl $admin_url "creation=1" "login=$admin" "pass=$password" "confirm=$password" -ynh_print_ON +password=$(myynh_urlencode $password) +ynh_local_curl $admin_url "creation=1" "login=$admin" "pass=$password" "confirm=$password" #================================================= # GENERIC FINALIZATION #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring SSOwat..." --weight=1 if [ $is_public -eq 0 ]; then # escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html) @@ -163,7 +165,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 diff --git a/scripts/remove b/scripts/remove index f524320..fd8378f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -37,7 +37,7 @@ ynh_secure_remove --file="$final_path" # 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..." + ynh_script_progression --message="Removing app data directory..." --weight=1 ynh_secure_remove --file="$datadir" fi diff --git a/scripts/restore b/scripts/restore index 9f44279..ea5e939 100644 --- a/scripts/restore +++ b/scripts/restore @@ -13,6 +13,10 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -57,7 +61,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." +ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$datadir" --not_mandatory @@ -76,14 +80,14 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 303c64d..6dd2602 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,7 +25,7 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." +ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) @@ -37,7 +37,6 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -72,7 +71,7 @@ fi #================================================= # 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" @@ -108,7 +107,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config @@ -116,7 +115,7 @@ ynh_add_fpm_config #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 if [ "$path_url" != "/" ]; then ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="../conf/nginx.conf" @@ -128,7 +127,7 @@ ynh_add_nginx_config #================================================= # CLEAN PHP SESSIONS STORED IN /var/lib/phpx/sessions #================================================= -ynh_script_progression --message="Cleaning php sessions stored..." +ynh_script_progression --message="Cleaning php sessions stored..." --weight=1 if [ -d "/usr/lib/php5" ]; then [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean @@ -141,7 +140,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 From 255ed39d0f159546d558c897a877125dc25c9653 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 18 Sep 2022 01:17:50 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c75096..7727b03 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in BoZoN is a minimalist Drag & drop file sharing app. -**Shipped version:** 2.4.18~ynh2 +**Shipped version:** 2.4.18~ynh3 + ## Screenshots diff --git a/README_fr.md b/README_fr.md index a2a1054..51b709b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour BoZoN is a minimalist Drag & drop file sharing app. -**Version incluse :** 2.4.18~ynh2 +**Version incluse :** 2.4.18~ynh3 + ## Captures d'écran