From b27bedab6c86009f7d9296b7b25c1bd80493e958 Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 2 Jan 2022 16:06:35 +0100 Subject: [PATCH 1/4] Fix user group access rights --- scripts/_common.sh | 3 +++ scripts/install | 2 +- scripts/restore | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 98af024..a061af4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,6 +13,9 @@ PKG_DEPENDENCIES="python3 python3-dev python3-venv python3-pip libffi-dev libssl # Pyhton 3.9.2 will be shiped with bullseye PY_REQUIRED_VERSION=3.9.2 +# System groups allowed to homeassistant user +GROUPS="dialout,gpio,i2c" + # Check if directory/file already exists (path in argument) myynh_check_path () { [ -z "$1" ] && ynh_die "No argument supplied" diff --git a/scripts/install b/scripts/install index 2321a9e..0d70160 100644 --- a/scripts/install +++ b/scripts/install @@ -41,7 +41,7 @@ ynh_app_setting_set --app="$app" --key=path_url --value="$path_url" # create a dedicated system user ynh_script_progression --message="Creating dedicated user, rights and folders..." -ynh_system_user_create --username="$app" +ynh_system_user_create --username="$app" --groups="$GROUPS" # create a directory for the installation of Home Assistant myynh_create_dir "$final_path" diff --git a/scripts/restore b/scripts/restore index b6dd55c..914eb8e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ ynh_exec_warn_less yunohost firewall allow TCP $port # restore dedicated system user ynh_script_progression --message="Restoring dedicated user and rights folders..." -ynh_system_user_create --username="$app" +ynh_system_user_create --username="$app" --groups="$GROUPS" ynh_restore_file --origin_path="/etc/sudoers.d/$app" # restore source From a6ac1249b0d82f4da485d327e33cd8d06fd005ec Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 2 Jan 2022 16:09:06 +0100 Subject: [PATCH 2/4] Upgrade to 2021.12.7 --- manifest.json | 2 +- scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 05b2755..1918ef9 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Home automation platform", "fr": "Plateforme domotique" }, - "version": "2021.11.5~ynh1", + "version": "2021.12.7~ynh1", "url": "https://github.com/home-assistant/home-assistant", "upstream": { "license": "Apache-2.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index a061af4..de4deed 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,7 +3,7 @@ # # Release to install -VERSION=2021.11.5 +VERSION=2021.12.7 # Package dependencies PKG_DEPENDENCIES="python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5" From 7f12ccb1d0a111bdf9a6d69c85a4d5e2f08cdbf4 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 2 Jan 2022 15:09:18 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9f89d2..f29fcfd 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Home automation platform -**Shipped version:** 2021.11.5~ynh1 +**Shipped version:** 2021.12.7~ynh1 **Demo:** https://demo.home-assistant.io diff --git a/README_fr.md b/README_fr.md index d7cadca..d45b45a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Plateforme domotique -**Version incluse :** 2021.11.5~ynh1 +**Version incluse :** 2021.12.7~ynh1 **Démo :** https://demo.home-assistant.io From 1aebae182c829bcab3ad44e560466006e00c6f6a Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 2 Jan 2022 22:52:02 +0100 Subject: [PATCH 4/4] Fix user group access rights --- scripts/_common.sh | 2 +- scripts/install | 2 +- scripts/restore | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index de4deed..0bfac6b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,7 +14,7 @@ PKG_DEPENDENCIES="python3 python3-dev python3-venv python3-pip libffi-dev libssl PY_REQUIRED_VERSION=3.9.2 # System groups allowed to homeassistant user -GROUPS="dialout,gpio,i2c" +USER_GROUPS="dialout gpio i2c" # Check if directory/file already exists (path in argument) myynh_check_path () { diff --git a/scripts/install b/scripts/install index 0d70160..6778034 100644 --- a/scripts/install +++ b/scripts/install @@ -41,7 +41,7 @@ ynh_app_setting_set --app="$app" --key=path_url --value="$path_url" # create a dedicated system user ynh_script_progression --message="Creating dedicated user, rights and folders..." -ynh_system_user_create --username="$app" --groups="$GROUPS" +ynh_system_user_create --username="$app" --groups="$USER_GROUPS" # create a directory for the installation of Home Assistant myynh_create_dir "$final_path" diff --git a/scripts/restore b/scripts/restore index 914eb8e..1a4a152 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ ynh_exec_warn_less yunohost firewall allow TCP $port # restore dedicated system user ynh_script_progression --message="Restoring dedicated user and rights folders..." -ynh_system_user_create --username="$app" --groups="$GROUPS" +ynh_system_user_create --username="$app" --groups="$USER_GROUPS" ynh_restore_file --origin_path="/etc/sudoers.d/$app" # restore source