From bca11839bd64842bdd8a8cf69463a8ac59acddf5 Mon Sep 17 00:00:00 2001 From: Grena Date: Mon, 10 Apr 2023 18:06:02 +0200 Subject: [PATCH 1/7] Fix linter --- manifest.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/manifest.json b/manifest.json index a4a0a48..01fcb31 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,6 @@ "website": "https://mosquitto.org", "demo": "https://test.mosquitto.org", "admindoc": "https://mosquitto.org/documentation/", - "userdoc": "https://yunohost.org/apps", "code": "https://github.com/eclipse/mosquitto", "cpe": "cpe:2.3:a:eclipse:mosquitto" }, @@ -32,22 +31,13 @@ { "name": "username", "type": "string", - "ask": { - "en": "Set the username for client authentication", - "fr": "Définissez le nom d'utilisateur pour l'authentification du client" - }, "example": "mosquitto", "default": "mosquitto" }, { "name": "password", - "type": "password", - "ask": { - "en": "Set the password for client authentication", - "fr": "Définissez le mot de passe pour l'authentification du client" - }, - "example": "Choose a password" + "type": "password" } ] } -} \ No newline at end of file +} From 2ebba0d4ebf060b758ba7587b4d1e60b20c68ae2 Mon Sep 17 00:00:00 2001 From: Grena Date: Mon, 10 Apr 2023 18:24:41 +0200 Subject: [PATCH 2/7] Fix repo (bullseye) --- manifest.json | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 01fcb31..83703bb 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "grena+mosquitto@grenabox.fr" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.0" }, "multi_instance": false, "services": [], diff --git a/scripts/install b/scripts/install index 9af97f0..fd4dc40 100644 --- a/scripts/install +++ b/scripts/install @@ -53,7 +53,7 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port #================================================= ynh_script_progression --message="Installing dependencies..." --weight=20 -ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian buster main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" +ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian bullseye main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index f261028..6ffd57d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,7 @@ password=$(ynh_app_setting_get --app=$app --key=password) #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=20 -ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian buster main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" +ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian bullseye main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" #================================================= # RESTORE VARIOUS FILES diff --git a/scripts/upgrade b/scripts/upgrade index fb44682..bb4376d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,7 +60,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=10 -ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian buster main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" +ynh_install_extra_app_dependencies --repo="deb https://repo.mosquitto.org/debian bullseye main" --package="$extra_pkg_dependencies" --key="http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key" --name="$app" #================================================= # SPECIFIC UPGRADE From f24ba58899596f585480cce268108a481b0041a5 Mon Sep 17 00:00:00 2001 From: Grena Date: Mon, 10 Apr 2023 20:34:45 +0200 Subject: [PATCH 3/7] Delete unnecessary files --- README.md | 52 -------------------------------------------- README_fr.md | 52 -------------------------------------------- doc/DISCLAIMER.md | 3 --- doc/DISCLAIMER_fr.md | 3 --- 4 files changed, 110 deletions(-) delete mode 100644 README.md delete mode 100644 README_fr.md delete mode 100644 doc/DISCLAIMER.md delete mode 100644 doc/DISCLAIMER_fr.md diff --git a/README.md b/README.md deleted file mode 100644 index b778c6b..0000000 --- a/README.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# Mosquitto for YunoHost - -[![Integration level](https://dash.yunohost.org/integration/mosquitto.svg)](https://dash.yunohost.org/appci/app/mosquitto) ![Working status](https://ci-apps.yunohost.org/ci/badges/mosquitto.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mosquitto.maintain.svg) - -[![Install Mosquitto with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mosquitto) - -*[Lire ce readme en français.](./README_fr.md)* - -> *This package allows you to install Mosquitto 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 - -[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password). - - -**Shipped version:** 2.0.12~ynh1 - -**Demo:** https://test.mosquitto.org -## Disclaimers / important information - -## TODO - -- [ ] Add MQTTS (MQTT with TLS) - -## Documentation and resources - -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost documentation for this app: -* Report a bug: - -## Developer info - -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing). - -To try the testing branch, please proceed like that. - -``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug -or -sudo yunohost app upgrade mosquitto -u https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug -``` - -**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md deleted file mode 100644 index e82f670..0000000 --- a/README_fr.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# Mosquitto pour YunoHost - -[![Niveau d’intégration](https://dash.yunohost.org/integration/mosquitto.svg)](https://dash.yunohost.org/appci/app/mosquitto) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mosquitto.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mosquitto.maintain.svg) - -[![Installer Mosquitto avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mosquitto) - -*[Read this readme in english.](./README.md)* - -> *Ce package vous permet d’installer Mosquitto 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 - -[Mosquitto](https://mosquitto.org/) vous permet d'interconnecter vos objets et applications avec un broker MQTT open source. Le client peut publier ou s'abonner après authentification (nom d'utilisateur, mot de passe). - - -**Version incluse :** 2.0.12~ynh1 - -**Démo :** https://test.mosquitto.org -## Avertissements / informations importantes - -## A faire - -- [ ] Ajouter MQTTS (MQTT avec TLS) - -## Documentations et ressources - -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : -* Signaler un bug : - -## Informations pour les développeurs - -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing). - -Pour essayer la branche testing, procédez comme suit. - -``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug -ou -sudo yunohost app upgrade mosquitto -u https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug -``` - -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 2a8b9dd..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,3 +0,0 @@ -## TODO - -- [ ] Add MQTTS (MQTT with TLS) diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md deleted file mode 100644 index 2a4c3bf..0000000 --- a/doc/DISCLAIMER_fr.md +++ /dev/null @@ -1,3 +0,0 @@ -## A faire - -- [ ] Ajouter MQTTS (MQTT avec TLS) From 6e0b336fbf727fb9b7b52d61aa96f487f37e25f3 Mon Sep 17 00:00:00 2001 From: Grena Date: Tue, 11 Apr 2023 22:01:00 +0200 Subject: [PATCH 4/7] Change version number --- check_process | 6 ++---- manifest.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index 3d91424..7421c32 100644 --- a/check_process +++ b/check_process @@ -7,10 +7,8 @@ pkg_linter=1 setup_nourl=1 upgrade=1 - # 1.5.7~ynh1 - upgrade=1 from_commit=3423395180264623342ee41946d10f30cd38e471 - # 2.0.8~ynh1 - upgrade=1 from_commit=74185f9e1fb58a91271cfc24630029da662b6111 + # 2.0.12~ynh1 + upgrade=1 from_commit=eb74d6d63a8bc8561d124429c9fa3bdb8f6af7a0 backup_restore=1 port_already_use=1 (1883) ;;; Options diff --git a/manifest.json b/manifest.json index 83703bb..7f0e1e3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Interconnect your objects and applications with an open source MQTT broker", "fr": "Interconnecter vos objets et vos applications grâce à un serveur MQTT open source" }, - "version": "2.0.12~ynh1", + "version": "2.0.14~ynh1", "url": "https://mosquitto.org/", "upstream": { "license": "MIT", From 3ff1f680e328f6d11c05b734d476675f63eef3b9 Mon Sep 17 00:00:00 2001 From: Grena Date: Fri, 21 Apr 2023 21:28:08 +0200 Subject: [PATCH 5/7] Fix config file overwritten (passwd) --- scripts/install | 1 + scripts/upgrade | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index fd4dc40..67178c8 100644 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/passwd" --destination="/etc/mosquitto/passwd" mosquitto_passwd -U "/etc/mosquitto/passwd" +ynh_store_file_checksum --file="/etc/mosquitto/passwd" ynh_add_config --template="../conf/mosquitto.conf" --destination="/etc/mosquitto/conf.d/default.conf" diff --git a/scripts/upgrade b/scripts/upgrade index bb4376d..fa451ff 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,6 +71,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="../conf/passwd" --destination="/etc/mosquitto/passwd" mosquitto_passwd -U "/etc/mosquitto/passwd" +ynh_store_file_checksum --file="/etc/mosquitto/passwd" ynh_add_config --template="../conf/mosquitto.conf" --destination="/etc/mosquitto/conf.d/default.conf" From 4df8dd6d756b1a4fd73125dffdc1c3e75c418bbc Mon Sep 17 00:00:00 2001 From: Grena Date: Sat, 22 Apr 2023 09:24:09 +0200 Subject: [PATCH 6/7] Clarifie password request --- check_process | 2 +- conf/passwd | 2 +- manifest.json | 12 ++++++++++-- scripts/backup | 2 +- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 9 ++++++++- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/check_process b/check_process index 7421c32..47b83d8 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest username="mosquitto" - password="pass" + userpass="mosquitto" port="1883" ; Checks pkg_linter=1 diff --git a/conf/passwd b/conf/passwd index 8728ca2..e8bc0de 100644 --- a/conf/passwd +++ b/conf/passwd @@ -1 +1 @@ -__USERNAME__:__PASSWORD__ +__USERNAME__:__USERPASS__ diff --git a/manifest.json b/manifest.json index 7f0e1e3..c4b8e52 100644 --- a/manifest.json +++ b/manifest.json @@ -31,12 +31,20 @@ { "name": "username", "type": "string", + "ask": { + "en": "Set the username for client authentication", + "fr": "Définissez le nom d'utilisateur pour l'authentification du client" + }, "example": "mosquitto", "default": "mosquitto" }, { - "name": "password", - "type": "password" + "name": "userpass", + "type": "password", + "ask": { + "en": "Set the password for client authentication", + "fr": "Définissez le mot de passe pour l'authentification du client" + } } ] } diff --git a/scripts/backup b/scripts/backup index eee2ccf..10637f0 100755 --- a/scripts/backup +++ b/scripts/backup @@ -26,7 +26,7 @@ app=$YNH_APP_INSTANCE_NAME port=$(ynh_app_setting_get --app=$app --key=port) username=$(ynh_app_setting_get --app=$app --key=username) -password=$(ynh_app_setting_get --app=$app --key=password) +userpass=$(ynh_app_setting_get --app=$app --key=userpass) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/install b/scripts/install index 67178c8..b9f40a8 100644 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_abort_if_errors #================================================= username=$YNH_APP_ARG_USERNAME -password=$YNH_APP_ARG_PASSWORD +userpass=$YNH_APP_ARG_USERPASS app=$YNH_APP_INSTANCE_NAME @@ -31,7 +31,7 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=username --value=$username -ynh_app_setting_set --app=$app --key=password --value=$password +ynh_app_setting_set --app=$app --key=userpass --value=$userpass #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/restore b/scripts/restore index 6ffd57d..bbb2a48 100755 --- a/scripts/restore +++ b/scripts/restore @@ -26,7 +26,7 @@ app=$YNH_APP_INSTANCE_NAME port=$(ynh_app_setting_get --app=$app --key=port) username=$(ynh_app_setting_get --app=$app --key=username) -password=$(ynh_app_setting_get --app=$app --key=password) +userpass=$(ynh_app_setting_get --app=$app --key=userpass) #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index fa451ff..bb6c716 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,14 @@ app=$YNH_APP_INSTANCE_NAME port=$(ynh_app_setting_get --app=$app --key=port) username=$(ynh_app_setting_get --app=$app --key=username) -password=$(ynh_app_setting_get --app=$app --key=password) +userpass=$(ynh_app_setting_get --app=$app --key=userpass) + +# Transfer and delete the old "password" key +if [ -z "$userpass" ]; then + ynh_app_setting_set --app=$app --key=userpass --value=$(ynh_app_setting_get --app=$app --key=password) + ynh_app_setting_delete --app=$app --key=password + userpass=$(ynh_app_setting_get --app=$app --key=userpass) +fi #================================================= # CHECK VERSION From b8641f0384950c4dbefe0743d8b638c65dd2647a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 22 Apr 2023 08:56:05 +0000 Subject: [PATCH 7/7] Auto-update README --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 README.md create mode 100644 README_fr.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b85280e --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ + + +# Mosquitto for YunoHost + +[![Integration level](https://dash.yunohost.org/integration/mosquitto.svg)](https://dash.yunohost.org/appci/app/mosquitto) ![Working status](https://ci-apps.yunohost.org/ci/badges/mosquitto.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mosquitto.maintain.svg) + +[![Install Mosquitto with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mosquitto) + +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install Mosquitto 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 + +[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password). + + +**Shipped version:** 2.0.14~ynh1 + +**Demo:** https://test.mosquitto.org +## Documentation and resources + +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: + +## Developer info + +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing). + +To try the testing branch, please proceed like that. + +``` bash +sudo yunohost app install https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug +or +sudo yunohost app upgrade mosquitto -u https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug +``` + +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..eff294b --- /dev/null +++ b/README_fr.md @@ -0,0 +1,45 @@ + + +# Mosquitto pour YunoHost + +[![Niveau d’intégration](https://dash.yunohost.org/integration/mosquitto.svg)](https://dash.yunohost.org/appci/app/mosquitto) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mosquitto.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mosquitto.maintain.svg) + +[![Installer Mosquitto avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mosquitto) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d’installer Mosquitto 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 + +[Mosquitto](https://mosquitto.org/) vous permet d'interconnecter vos objets et applications avec un broker MQTT open source. Le client peut publier ou s'abonner après authentification (nom d'utilisateur, mot de passe). + + +**Version incluse :** 2.0.14~ynh1 + +**Démo :** https://test.mosquitto.org +## Documentations et ressources + +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : +* Documentation YunoHost pour cette app : +* Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. + +``` bash +sudo yunohost app install https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug +ou +sudo yunohost app upgrade mosquitto -u https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug +``` + +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file