From 8a619ba379aef0581d7d0349f57c97c513bfe478 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 17 Aug 2021 10:02:31 +0200 Subject: [PATCH 1/3] Apply last example_ynh (#14) * Apply last example_ynh * Fix $biboumi_config_file * Update LICENSE * fix install * Various fixes * Cleanup * Fix variables not initialized * fix variable... again * Fix install --- LICENSE | 9 ++-- check_process | 5 ++ conf/biboumi.cfg | 8 ++-- conf/biboumi.cfg.lua | 4 +- scripts/_common.sh | 2 +- scripts/backup | 20 ++++---- scripts/install | 96 +++++++++++++++++++------------------ scripts/remove | 57 +++++++++++----------- scripts/restore | 54 ++++++++++----------- scripts/upgrade | 110 +++++++++++++++++++++++-------------------- 10 files changed, 190 insertions(+), 175 deletions(-) diff --git a/LICENSE b/LICENSE index f3cff84..62e647b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,7 @@ -File containing the license of your package. +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -More information here: -https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13---indiquer-la-licence-associ%C3%A9e-au-paquet---brouillon--auto--working- +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. diff --git a/check_process b/check_process index 993a0d6..816c1b1 100644 --- a/check_process +++ b/check_process @@ -10,6 +10,8 @@ setup_private=0 setup_public=0 upgrade=1 + # 8.3~ynh1 + upgrade=1 from_commit=6596c7e12e17a2b9149b20739e916184e71fdfbd backup_restore=1 multi_instance=0 port_already_use=1 (113) @@ -17,3 +19,6 @@ ;;; Options Email=pitchum@gramaton.org Notification=none +;;; Upgrade options + ; commit=6596c7e12e17a2b9149b20739e916184e71fdfbd + name=8.3~ynh1. diff --git a/conf/biboumi.cfg b/conf/biboumi.cfg index 6ce9189..950f1af 100644 --- a/conf/biboumi.cfg +++ b/conf/biboumi.cfg @@ -1,15 +1,15 @@ -hostname=biboumi.__DOMAIN__ -password=__SECRET__ +hostname=__APP__.__DOMAIN__ +password=__SHARED_SECRET__ #xmpp_server_ip=127.0.0.1 #port=5347 -db_name=/var/lib/biboumi/biboumi.sqlite +db_name=/var/lib/__APP__/__APP__.sqlite identd_port=__PORT__ admin=__ADMIN_JID__ realname_customization=true realname_from_jid=false log_level=1 -log_file=/var/log/biboumi/biboumi.log +log_file=/var/log/__APP__/__APP__.log #ca_file= #outgoing_bind= diff --git a/conf/biboumi.cfg.lua b/conf/biboumi.cfg.lua index 967c59c..fe8f28c 100644 --- a/conf/biboumi.cfg.lua +++ b/conf/biboumi.cfg.lua @@ -1,2 +1,2 @@ -Component "biboumi.__DOMAIN__" - component_secret = "__SECRET__" +Component "__APP__.__DOMAIN__" + component_secret = "__SHARED_SECRET__" diff --git a/scripts/_common.sh b/scripts/_common.sh index 9b9cd1b..f6c7245 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,4 +17,4 @@ pkg_dependencies="biboumi" #================================================= # FUTURE OFFICIAL HELPERS -#================================================= \ No newline at end of file +#================================================= diff --git a/scripts/backup b/scripts/backup index ae9538f..170a5e5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,6 +6,7 @@ # 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 @@ -30,27 +31,24 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= ynh_print_info --message="Declaring files to be backed up..." -#================================================= -# BACKUP THE APP MAIN DIR -#================================================= - -ynh_backup "/etc/biboumi" -ynh_backup "/var/lib/biboumi" - #================================================= # BACKUP LOGROTATE #================================================= -ynh_backup "/etc/logrotate.d/$app" +ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= -# BACKUP METRONOME CONFIG +# BACKUP VARIOUS FILES #================================================= -ynh_backup "/etc/metronome/conf.d/biboumi.cfg.lua" +ynh_backup --src_path="/etc/$app" + +ynh_backup --src_path="/var/lib/$app" + +ynh_backup --src_path="/etc/metronome/conf.d/$app.cfg.lua" #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Biboumi. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index 49ccf4f..a158774 100755 --- a/scripts/install +++ b/scripts/install @@ -25,9 +25,13 @@ admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME +shared_secret="$(ynh_string_random 25)" +admin_jid="${admin}@$app.${domain}" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= +ynh_script_progression --message="Validating installation parameters..." if dpkg --compare-versions "$(uname -r)" "<=" "4.0" then @@ -37,101 +41,103 @@ fi #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 +ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=admin --value=$admin +ynh_app_setting_set --app=$app --key=shared_secret --value=$shared_secret +ynh_app_setting_set --app=$app --key=admin_jid --value=$admin_jid #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --weight=2 +ynh_script_progression --message="Finding an available port..." -# Find a free port +# Find an available port port=$(ynh_find_port --port=113) ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=9 +ynh_script_progression --message="Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC SETUP -#================================================= -# CONFIGURE BIBOUMI -#================================================= - -# Create a secret password that will be shared by metronome and biboumi. -shared_secret="$(ynh_string_random 25)" - -# Biboumi needs at least one admin JID. -admin_jid="${admin}@biboumi.${domain}" - -biboumi_config_file="/etc/biboumi/biboumi.cfg" - -# Create the biboumi config file. -cp ../conf/biboumi.cfg "$biboumi_config_file" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="${domain}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__SECRET__" --replace_string="${shared_secret}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__PORT__" --replace_string="${port}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__ADMIN_JID__" --replace_string="${admin_jid}" --target_file="$biboumi_config_file" - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum "$biboumi_config_file" - #================================================= # CONFIGURE METRONOME #================================================= +ynh_script_progression --message="Configuring Metronome..." # Add metronome component -cp ../conf/biboumi.cfg.lua /etc/metronome/conf.d/ -ynh_replace_string --match_string="__DOMAIN__" --replace_string="${domain}" --target_file="/etc/metronome/conf.d/biboumi.cfg.lua" -ynh_replace_string --match_string="__SECRET__" --replace_string="${shared_secret}" --target_file="/etc/metronome/conf.d/biboumi.cfg.lua" +ynh_add_config --template="../conf/biboumi.cfg.lua" --destination="/etc/metronome/conf.d/$app.cfg.lua" + +chown metronome:metronome "/etc/metronome/conf.d/$app.cfg.lua" + +ynh_systemd_action --service_name=metronome --action="restart" #================================================= -# CREATE DIRECTORIES +# CREATE DATA DIRECTORY #================================================= +ynh_script_progression --message="Creating a data directory..." -mkdir -p /var/log/biboumi /var/lib/biboumi +mkdir -p /var/lib/$app # Set permissions to app files -chown _biboumi /var/log/biboumi /var/lib/biboumi /etc/biboumi +chown -R _biboumi:_biboumi "/var/lib/$app" +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." + +ynh_add_config --template="../conf/biboumi.cfg" --destination="/etc/$app/$app.cfg" + +chown -R _biboumi:_biboumi "/etc/$app/$app.cfg" + +#================================================= +# GENERIC FINALIZATION #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 +ynh_script_progression --message="Configuring log rotation..." + +mkdir -p /var/log/$app +chown -R _biboumi:_biboumi "/var/log/$app" # Use logrotate to manage application logfile(s) -ynh_use_logrotate /var/log/biboumi/ +ynh_use_logrotate #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add biboumi --description="XMPP gateway for the IRC network" --log="/var/log/biboumi/biboumi.log" +yunohost service add $app --description="XMPP gateway for the IRC network" --log="/var/log/$app/$app.log" #================================================= -# SET THE APP AS NOT USING THE SSO +# START SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Starting a systemd service..." + +# Start a systemd service +sleep 5 +ynh_systemd_action --service_name=$app --action="restart" + +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." # Prevent conflict with other apps on the same domain ynh_app_setting_set --app=$app --key=no_sso --value=1 -#================================================= -# RELOAD SERVICES -#================================================= - -ynh_systemd_action --action=restart --service_name=metronome -ynh_systemd_action --action=restart --service_name=biboumi - #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Biboumi completed" --last +ynh_script_progression --message="Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index ea6203b..9914596 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,64 +12,61 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL +# REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove a service from the admin panel, added by `yunohost service add` -if yunohost service status | grep -q $app +# 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 integration..." --weight=1 + ynh_script_progression --message="Removing $app service integration..." yunohost service remove $app fi -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=4 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing Biboumi directory..." --weight=2 - -# Remove the app directory securely -ynh_secure_remove "/etc/biboumi" -ynh_secure_remove "/var/lib/biboumi" - #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 +ynh_script_progression --message="Removing logrotate configuration..." # Remove the app-specific logrotate config ynh_remove_logrotate +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE LOGS +# REMOVE VARIOUS FILES #================================================= +ynh_script_progression --message="Removing various files..." -ynh_secure_remove "/var/log/biboumi" +# Remove data directory +ynh_secure_remove --file="/var/lib/$app" -#================================================= -# REMOVE METRONOME COMPONENT -#================================================= +# Remove a directory securely +ynh_secure_remove --file="/etc/$app" -ynh_secure_remove "/etc/metronome/conf.d/biboumi.cfg.lua" +# Remove the log files +ynh_secure_remove --file="/var/log/$app" + +# Remove Metronome component +ynh_secure_remove --file="/etc/metronome/conf.d/$app.cfg.lua" +ynh_systemd_action --action=restart --service_name=metronome #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Biboumi completed" --last +ynh_script_progression --message="Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 2b221bb..2ea9712 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,6 +6,7 @@ # 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 @@ -19,7 +20,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -28,7 +29,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +ynh_script_progression --message="Validating restoration parameters..." if dpkg --compare-versions "$(uname -r)" "<=" "4.0" then @@ -40,55 +41,52 @@ fi #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=9 +ynh_script_progression --message="Reinstalling dependencies..." -# Make sure that stretch-backports is enabled +# Define and install dependencies ynh_install_app_dependencies $pkg_dependencies #================================================= -# RESTORE THE APP MAIN DIR +# RESTORE VARIOUS FILES #================================================= +ynh_script_progression --message="Restoring various files..." -ynh_restore_file "/etc/biboumi" -ynh_restore_file "/var/lib/biboumi" +ynh_restore_file --origin_path="/etc/$app" +chown -R _biboumi:_biboumi /etc/$app -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= +ynh_restore_file --origin_path="/var/lib/$app" +chown -R _biboumi:_biboumi /var/lib/$app -yunohost service add biboumi --description="XMPP gateway for the IRC network" --log="/var/log/biboumi/biboumi.log" +ynh_restore_file --origin_path="/etc/metronome/conf.d/$app.cfg.lua" +chown metronome:metronome "/etc/metronome/conf.d/$app.cfg.lua" +ynh_systemd_action --service_name=metronome --action="restart" #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." -mkdir -p /var/log/biboumi -ynh_restore_file "/etc/logrotate.d/$app" +mkdir -p /var/log/$app +chown -R _biboumi:_biboumi "/var/log/$app" + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= -# RESTORE USER RIGHTS +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." -# Restore permissions on app files -chown _biboumi /var/log/biboumi /var/lib/biboumi /etc/biboumi +yunohost service add $app --description="XMPP gateway for the IRC network" --log="/var/log/$app/$app.log" #================================================= -# RESTORE THE METRONOME CONFIG +# START SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Starting a systemd service..." -ynh_restore_file "/etc/metronome/conf.d/biboumi.cfg.lua" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD SERVICES -#================================================= - -ynh_systemd_action --action=restart --service_name=metronome -ynh_systemd_action --action=restart --service_name=biboumi +ynh_systemd_action --service_name=$app --action="restart" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Biboumi" --last +ynh_script_progression --message="Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 788b3fe..6845241 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,31 +12,27 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) admin=$(ynh_app_setting_get --app=$app --key=admin) port=$(ynh_app_setting_get --app=$app --key=port) +shared_secret=$(ynh_app_setting_get --app=$app --key=shared_secret) +admin_jid=$(ynh_app_setting_get --app=$app --key=admin_jid) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# Prevent conflict with other apps on the same domain -ynh_app_setting_set --app=$app --key=no_sso --value=1 - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -49,81 +45,93 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# Prevent conflict with other apps on the same domain +ynh_app_setting_set --app=$app --key=no_sso --value=1 + +if [ -z "$shared_secret" ]; then + shared_secret="$(grep password "/etc/biboumi/biboumi.cfg" | cut -d= -f2)" + ynh_app_setting_set --app=$app --key=shared_secret --value=$shared_secret +fi + +if [ -z "$admin_jid" ]; then + admin_jid="${admin}@$app.${domain}" + ynh_app_setting_set --app=$app --key=admin_jid --value=$admin_jid +fi + #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=9 +ynh_script_progression --message="Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC UPGRADE -#================================================= -# CONFIGURE BIBOUMI -#================================================= - -biboumi_config_file="/etc/biboumi/biboumi.cfg" - -# Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. -ynh_backup_if_checksum_is_different "$biboumi_config_file" - -# Get shared_secret from the config file -shared_secret="$(grep password "$biboumi_config_file" | cut -d= -f2)" - -# Biboumi needs at least one admin JID. -admin_jid="${admin}@biboumi.${domain}" - -# Create the biboumi config file. -cp ../conf/biboumi.cfg /etc/biboumi/ -ynh_replace_string --match_string="__DOMAIN__" --replace_string="${domain}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__SECRET__" --replace_string="${shared_secret}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__PORT__" --replace_string="${port}" --target_file="$biboumi_config_file" -ynh_replace_string --match_string="__ADMIN_JID__" --replace_string="${admin_jid}" --target_file="$biboumi_config_file" - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum "$biboumi_config_file" - #================================================= # UPGRADE METRONOME COMPONENT #================================================= +ynh_script_progression --message="Upgrading Metronome component..." # Upgrade metronome component -cp ../conf/biboumi.cfg.lua /etc/metronome/conf.d/ -ynh_replace_string --match_string="__DOMAIN__" --replace_string="${domain}" --target_file="/etc/metronome/conf.d/biboumi.cfg.lua" -ynh_replace_string --match_string="__SECRET__" --replace_string="${shared_secret}" --target_file="/etc/metronome/conf.d/biboumi.cfg.lua" +ynh_add_config --template="../conf/biboumi.cfg.lua" --destination="/etc/metronome/conf.d/$app.cfg.lua" + +chown metronome:metronome "/etc/metronome/conf.d/$app.cfg.lua" + +ynh_systemd_action --service_name=metronome --action="restart" #================================================= -# SETUP LOGROTATE +# CREATE DIRECTORIES #================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 +ynh_script_progression --message="Creating a data directory..." -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate /var/log/biboumi/ --non-append +mkdir -p /var/lib/$app + +# Set permissions to app files +chown -R _biboumi:_biboumi "/var/lib/$app" + +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." + +ynh_add_config --template="../conf/biboumi.cfg" --destination="/etc/$app/$app.cfg" + +chown -R _biboumi:_biboumi "/etc/$app/$app.cfg" #================================================= # GENERIC FINALIZATION #================================================= -# SECURE FILES AND DIRECTORIES +# SETUP LOGROTATE #================================================= +ynh_script_progression --message="Upgrading logrotate configuration..." -# Set permissions on app files -chown _biboumi /var/log/biboumi /var/lib/biboumi /etc/biboumi +mkdir -p /var/log/$app +chown -R _biboumi:_biboumi "/var/log/$app" + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add biboumi --description="XMPP gateway for the IRC network" --log="/var/log/biboumi/biboumi.log" +yunohost service add $app --description="XMPP gateway for the IRC network" --log="/var/log/$app/$app.log" #================================================= -# RELOAD SERVICES +# START SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --action=restart --service_name=metronome -ynh_systemd_action --action=restart --service_name=biboumi +ynh_systemd_action --action=restart --service_name=$app #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Biboumi completed" --last +ynh_script_progression --message="Upgrade of $app completed" From 695eb61dc4b654d302f5b7a85b1cc7cb58692cc7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 17 Aug 2021 20:22:37 +0200 Subject: [PATCH 2/3] Apply example_ynh --- doc/.gitkeep | 0 doc/DISCLAIMER.md | 10 ++++++++++ doc/screenshots/.gitkeep | 0 manifest.json | 6 ++++++ 4 files changed, 16 insertions(+) create mode 100644 doc/.gitkeep create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/screenshots/.gitkeep diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..728a23b --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,10 @@ +Once biboumi_ynh is installed you can use any XMPP client software to join IRC channels. Any IRC channel is seen as a standard XMPP chatroom (aka MUC) with a special name. +The the name is formatted like this: `#channelname%ircservername@biboumi.yourdomain.tld`. + +For example, if you have a YunoHost server hosting domain *example.net* and you want to join the channel *#yunohost* on *irc.freenode.net* you simply need to join the MUC `#yunohost%irc.freenode.net@biboumi.example.net`. + +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * Currently, Biboumi is only tested with one domain and it must be the main domain of your YunoHost server. + +* Other infos that people should be aware of, such as: + * You can configure Biboumi with the file `/etc/biboumi/biboumi.cfg`. diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/manifest.json b/manifest.json index 3015cf0..fe33aa1 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,12 @@ }, "version": "8.3~ynh1", "url": "https://biboumi.louiz.org/", + "upstream": { + "license": "Zlib", + "website": "https://biboumi.louiz.org/", + "admindoc": "Official documentation: https://lab.louiz.org/louiz/biboumi/blob/8.3/doc/biboumi.1.rst", + "code": "https://lab.louiz.org/louiz/biboumi" + }, "license": "Zlib", "maintainer": { "name": "pitchum", From 6eea1ac02deb7ea6205e9bddf9a4ee495b3e719e Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 17 Aug 2021 18:22:43 +0000 Subject: [PATCH 3/3] Auto-update README --- README.md | 57 ++++++++++++++++++++++++++-------------------------- README_fr.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index 52d7b90..d756446 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,46 @@ + + # Biboumi for YunoHost [![Integration level](https://dash.yunohost.org/integration/biboumi.svg)](https://dash.yunohost.org/appci/app/biboumi) ![](https://ci-apps.yunohost.org/ci/badges/biboumi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/biboumi.maintain.svg) -[![Install biboumi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=biboumi) +[![Install Biboumi with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=biboumi) -> *This package allows you to install Biboumi quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install Biboumi quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Biboumi is an XMPP gateway for the IRC network. +XMPP gateway for the IRC network. + +**Shipped version:** 8.3~ynh1 + + + +## Disclaimers / important information Once biboumi_ynh is installed you can use any XMPP client software to join IRC channels. Any IRC channel is seen as a standard XMPP chatroom (aka MUC) with a special name. The the name is formatted like this: `#channelname%ircservername@biboumi.yourdomain.tld`. For example, if you have a YunoHost server hosting domain *example.net* and you want to join the channel *#yunohost* on *irc.freenode.net* you simply need to join the MUC `#yunohost%irc.freenode.net@biboumi.example.net`. -**Shipped version:** 8.3 +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * Currently, Biboumi is only tested with one domain and it must be the main domain of your YunoHost server. -## Configuration +* Other infos that people should be aware of, such as: + * You can configure Biboumi with the file `/etc/biboumi/biboumi.cfg`. -You can configure Biboumi with the file `/etc/biboumi/biboumi.cfg`. +## Documentation and resources -## Documentation - - * Official documentation: https://lab.louiz.org/louiz/biboumi/blob/8.3/doc/biboumi.1.rst - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/biboumi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/biboumi/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/biboumi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/biboumi/) - -## Limitations - -* Currently, Biboumi is only tested with one domain and it must be the main domain of your YunoHost server. - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/biboumi_ynh/issues - * App website: https://biboumi.louiz.org/ - * Upstream app repository: https://lab.louiz.org/louiz/biboumi/-/issues - * YunoHost website: https://yunohost.org/ - - --- +* Official app website: https://biboumi.louiz.org/ +* Official admin documentation: Official documentation: https://lab.louiz.org/louiz/biboumi/blob/8.3/doc/biboumi.1.rst +* Upstream app code repository: https://lab.louiz.org/louiz/biboumi +* YunoHost documentation for this app: https://yunohost.org/app_biboumi +* Report a bug: https://github.com/YunoHost-Apps/biboumi_ynh/issues ## Developer info @@ -53,3 +52,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/biboumi_ynh/tree/test or sudo yunohost app upgrade biboumi -u https://github.com/YunoHost-Apps/biboumi_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..4676065 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,52 @@ +# Biboumi pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/biboumi.svg)](https://dash.yunohost.org/appci/app/biboumi) ![](https://ci-apps.yunohost.org/ci/badges/biboumi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/biboumi.maintain.svg) +[![Installer Biboumi avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=biboumi) + +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* + +> *Ce package vous permet d'installer Biboumi rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Passerelle XMPP pour le réseau IRC. + +**Version incluse :** 8.3~ynh1 + + + +## Avertissements / informations importantes + +Once biboumi_ynh is installed you can use any XMPP client software to join IRC channels. Any IRC channel is seen as a standard XMPP chatroom (aka MUC) with a special name. +The the name is formatted like this: `#channelname%ircservername@biboumi.yourdomain.tld`. + +For example, if you have a YunoHost server hosting domain *example.net* and you want to join the channel *#yunohost* on *irc.freenode.net* you simply need to join the MUC `#yunohost%irc.freenode.net@biboumi.example.net`. + +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * Currently, Biboumi is only tested with one domain and it must be the main domain of your YunoHost server. + +* Other infos that people should be aware of, such as: + * You can configure Biboumi with the file `/etc/biboumi/biboumi.cfg`. + +## Documentations et ressources + +* Site officiel de l'app : https://biboumi.louiz.org/ +* Documentation officielle de l'admin : Official documentation: https://lab.louiz.org/louiz/biboumi/blob/8.3/doc/biboumi.1.rst +* Dépôt de code officiel de l'app : https://lab.louiz.org/louiz/biboumi +* Documentation YunoHost pour cette app : https://yunohost.org/app_biboumi +* Signaler un bug : https://github.com/YunoHost-Apps/biboumi_ynh/issues + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/biboumi_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/biboumi_ynh/tree/testing --debug +ou +sudo yunohost app upgrade biboumi -u https://github.com/YunoHost-Apps/biboumi_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file