From ff592aa79825e9861f17291c4e678dcc3a37ae50 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:46:22 +0200 Subject: [PATCH 1/2] Upgrade to v2.202 (#67) (#68) * Upgrade sources - `main` v2.202: https://github.com/webmin/webmin/releases/tag/2.202 * Auto-update READMEs Co-authored-by: YunoHost Bot --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 4 ++-- README_zh_Hans.md | 2 +- manifest.toml | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 96b12e3..6be4096 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It shall NOT be edited by hand. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**Shipped version:** 2.201~ynh1 +**Shipped version:** 2.202~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index 4171568..b4a4cd0 100644 --- a/README_es.md +++ b/README_es.md @@ -18,7 +18,7 @@ No se debe editar a mano. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**Versión actual:** 2.201~ynh1 +**Versión actual:** 2.202~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index a5b630b..73e64bc 100644 --- a/README_eu.md +++ b/README_eu.md @@ -18,7 +18,7 @@ EZ editatu eskuz. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**Paketatutako bertsioa:** 2.201~ynh1 +**Paketatutako bertsioa:** 2.202~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 34bdf7c..1f8d7f7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main. Webmin est une interface Web pour l'administration système pour Unix. À l'aide de n'importe quel navigateur Web moderne, vous pouvez configurer des comptes d'utilisateurs, Apache, DNS, le partage de fichiers et bien plus encore. Webmin supprime le besoin de modifier manuellement les fichiers de configuration Unix comme « /etc/passwd » et vous permet de gérer un système depuis la console ou à distance. -**Version incluse :** 2.201~ynh1 +**Version incluse :** 2.202~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index d26878e..e578cec 100644 --- a/README_gl.md +++ b/README_gl.md @@ -18,7 +18,7 @@ NON debe editarse manualmente. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**Versión proporcionada:** 2.201~ynh1 +**Versión proporcionada:** 2.202~ynh1 ## Capturas de pantalla diff --git a/README_id.md b/README_id.md index 5d319e4..edf0605 100644 --- a/README_id.md +++ b/README_id.md @@ -18,7 +18,7 @@ Ini TIDAK boleh diedit dengan tangan. Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**Versi terkirim:** 2.201~ynh1 +**Versi terkirim:** 2.202~ynh1 ## Tangkapan Layar @@ -27,7 +27,7 @@ Webmin is a web-based interface for system administration for Unix. Using any mo ## Dokumentasi dan sumber daya - Website aplikasi resmi: -- Repositori kode aplikasi hulu: +- Depot kode aplikasi hulu: - Gudang YunoHost: - Laporkan bug: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 274e04c..e9eee46 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -18,7 +18,7 @@ Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like `/etc/passwd`, and lets you manage a system from the console or remotely. -**分发版本:** 2.201~ynh1 +**分发版本:** 2.202~ynh1 ## 截图 diff --git a/manifest.toml b/manifest.toml index 8153c69..9236ff5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Webmin" description.en = "Web-based interface for system administration" description.fr = "Interface Web d'administration système" -version = "2.201~ynh1" +version = "2.202~ynh1" maintainers = [] @@ -37,8 +37,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/webmin/webmin/releases/download/2.201/webmin_2.201_all.deb" - sha256 = "cd4cc73b57c323707558b2eef906c86ba8b85610435eb1b40513f2bad4c612c2" + url = "https://github.com/webmin/webmin/releases/download/2.202/webmin_2.202_all.deb" + sha256 = "3a67702b05bcf64a40140d8040f93431b4a5d9627d5ee25dbec748d0c09e443c" rename = "webmin.deb" autoupdate.strategy = "latest_github_release" autoupdate.asset = "^webmin_.*_all.deb$" From 7022a1050c597ff7d88b5adffd73a75ec14d2b35 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 03:55:17 +0200 Subject: [PATCH 2/2] [autopatch] Automatic patch attempt for helpers 2.1 --- manifest.toml | 3 ++- scripts/_common.sh | 14 +------------- scripts/backup | 17 ++++------------ scripts/change_url | 22 +++++++-------------- scripts/install | 34 +++++++++++++------------------- scripts/remove | 24 ++++++++--------------- scripts/restore | 34 +++++++++++++------------------- scripts/upgrade | 48 +++++++++++++++------------------------------- 8 files changed, 63 insertions(+), 133 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9236ff5..eb506a7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,7 +15,8 @@ website = "http://www.webmin.com" code = "https://github.com/webmin/webmin" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = false ldap = false diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index f3fab18..20e6205 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,25 +1,16 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # SPECIFIC BACKUP @@ -27,10 +18,10 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP VARIOUS FILES #================================================= -ynh_backup --src_path="/etc/webmin/miniserv.conf" +ynh_backup "/etc/webmin/miniserv.conf" #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 9b3708c..d4f6a69 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,40 +1,32 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" +ynh_systemctl --service=$app --action="stop" --wait_until="Stopped LSB" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression "Starting $app's systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" --log_path="systemd" +ynh_systemctl --service=$app --action="start" --wait_until="Started LSB" --log_path="systemd" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index a44e43f..c730e26 100644 --- a/scripts/install +++ b/scripts/install @@ -1,18 +1,12 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression "Setting up source files..." tempdir="$(mktemp -d)" # Download, check integrity, uncompress and patch the source from app.src @@ -20,57 +14,55 @@ ynh_setup_source --dest_dir="$tempdir" dpkg --install $tempdir/webmin.deb -ynh_exec_warn_less ynh_secure_remove --file="$tempdir" +ynh_safe_rm "$tempdir" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_script_progression "Configuring NGINX web server..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # SPECIFIC SETUP #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." +ynh_script_progression "Adding $app's configuration..." -ynh_replace_string --match_string="port=10000" --replace_string="port=$port" --target_file="/etc/webmin/miniserv.conf" -ynh_replace_string --match_string="listen=10000" --replace_string="listen=$port" --target_file="/etc/webmin/miniserv.conf" +ynh_replace --match="port=10000" --replace="port=$port" --file="/etc/webmin/miniserv.conf" +ynh_replace --match="listen=10000" --replace="listen=$port" --file="/etc/webmin/miniserv.conf" # Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="/etc/webmin/miniserv.conf" +ynh_store_file_checksum "/etc/webmin/miniserv.conf" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." +ynh_script_progression "Configuring $app's systemd service..." # Create a dedicated systemd config systemctl daemon-reload systemctl enable $app.service --quiet -#================================================= -# GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression "Integrating service in YunoHost..." yunohost service add $app --description="Webmin Daemon" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression "Starting $app's systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="restart" --line_match="Started Webmin server daemon" --log_path="systemd" +ynh_systemctl --service=$app --action="restart" --wait_until="Started Webmin server daemon" --log_path="systemd" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index a9f46b9..3c2531c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers @@ -16,42 +10,40 @@ source /usr/share/yunohost/helpers #================================================= # 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 +if ynh_hide_warnings yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service integration..." + ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." +ynh_script_progression "Stopping and removing the systemd service..." # Remove the dedicated systemd config -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" +ynh_systemctl --service=$app --action="stop" --wait_until="Stopped LSB" --log_path="systemd" systemctl disable $app.service --quiet systemctl daemon-reload #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." +ynh_script_progression "Removing NGINX web server configuration..." # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_config_remove_nginx #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." +ynh_script_progression "Removing dependencies..." # Remove metapackage and its dependencies dpkg --remove $app -#================================================= -# GENERIC FINALIZATION #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 1261661..556238e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,7 +7,7 @@ source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression "Setting up source files..." tempdir="$(mktemp -d)" # Download, check integrity, uncompress and patch the source from app.src @@ -21,26 +15,26 @@ ynh_setup_source --dest_dir="$tempdir" dpkg --install $tempdir/webmin.deb -ynh_exec_warn_less ynh_secure_remove --file="$tempdir" +ynh_safe_rm "$tempdir" #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression "Restoring the NGINX web server configuration..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE VARIOUS FILES #================================================= -ynh_script_progression --message="Restoring various files..." +ynh_script_progression "Restoring various files..." -ynh_restore_file --origin_path="/etc/webmin/miniserv.conf" +ynh_restore "/etc/webmin/miniserv.conf" #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." +ynh_script_progression "Restoring $app's systemd service..." systemctl daemon-reload systemctl enable $app.service --quiet @@ -48,28 +42,26 @@ systemctl enable $app.service --quiet #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression "Integrating service in YunoHost..." yunohost service add $app --description="Webmin Daemon" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name=$app --action="restart" --line_match="Started LSB" --log_path="systemd" +ynh_systemctl --service=$app --action="restart" --wait_until="Started LSB" --log_path="systemd" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression "Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 2ae2878..7099e76 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,33 +1,19 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" +ynh_systemctl --service=$app --action="stop" --wait_until="Stopped LSB" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression "Setting up source files..." tempdir="$(mktemp -d)" # Download, check integrity, uncompress and patch the source from app.src @@ -35,56 +21,52 @@ ynh_setup_source --dest_dir="$tempdir" dpkg --install $tempdir/webmin.deb -ynh_exec_warn_less ynh_secure_remove --file="$tempdir" +ynh_safe_rm "$tempdir" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_script_progression "Upgrading NGINX web server configuration..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx -#================================================= -# SPECIFIC UPGRADE #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." +ynh_script_progression "Updating configuration..." -ynh_replace_string --match_string="port=10000" --replace_string="port=$port" --target_file="/etc/webmin/miniserv.conf" -ynh_replace_string --match_string="listen=10000" --replace_string="listen=$port" --target_file="/etc/webmin/miniserv.conf" +ynh_replace --match="port=10000" --replace="port=$port" --file="/etc/webmin/miniserv.conf" +ynh_replace --match="listen=10000" --replace="listen=$port" --file="/etc/webmin/miniserv.conf" # Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="/etc/webmin/miniserv.conf" +ynh_store_file_checksum "/etc/webmin/miniserv.conf" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." +ynh_script_progression "Upgrading systemd configuration..." # Create a dedicated systemd config systemctl daemon-reload systemctl enable $app.service --quiet -#================================================= -# GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression "Integrating service in YunoHost..." yunohost service add $app --description="Webmin Daemon" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name=$app --action="restart" --line_match="Started Webmin server daemon" --log_path="systemd" +ynh_systemctl --service=$app --action="restart" --wait_until="Started Webmin server daemon" --log_path="systemd" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" +ynh_script_progression "Upgrade of $app completed"