From 03687eb3377f7e5e11b2d124f3f1c548615cdd57 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:38:17 +0200 Subject: [PATCH 01/10] Update repository.yaml --- repository.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository.yaml b/repository.yaml index 86aadb6..59226bc 100644 --- a/repository.yaml +++ b/repository.yaml @@ -1,3 +1,3 @@ -name: Home Assistant Khadas Tools +name: Home Assistant Khadas Tools (dev) url: "https://github.com/Nicooow/homeassistant-khadas-tools" maintainer: nicow From 7a102a2f1f8fa18f179322c0684e25a1bc4315f5 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:39:25 +0200 Subject: [PATCH 02/10] remove wrong parameter --- vim3-fan-controller/config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index c366b3f..5bbd87d 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -9,7 +9,6 @@ arch: - armhf - armv7 - i386 -log_level: info startup: services privileged: - SYS_ADMIN From 8b50721ff2dd0cfd059c8b4b8759f4b5f461cc67 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:48:31 +0200 Subject: [PATCH 03/10] try new privileged --- vim3-fan-controller/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index 5bbd87d..d572211 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -1,6 +1,6 @@ name: "Khadas VIM3 Fan Controller" description: "Control the fan of the Khadas VIM3" -version: "1.0.3" +version: "1.0.3-dev1" slug: "khadas-vim3-fan" init: false arch: @@ -11,7 +11,7 @@ arch: - i386 startup: services privileged: - - SYS_ADMIN + - SYS_RESOURCE devices: - /dev/i2c-0 ingress: true From d73c15bdc8d87a25da94f5319500d89b032ee3b6 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:51:32 +0200 Subject: [PATCH 04/10] try without privileged access --- vim3-fan-controller/config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index d572211..34b77a2 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -10,8 +10,6 @@ arch: - armv7 - i386 startup: services -privileged: - - SYS_RESOURCE devices: - /dev/i2c-0 ingress: true From 4856bfef52aa285c41a046f6601bbf76626ca1cb Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:51:43 +0200 Subject: [PATCH 05/10] bump version dev2 --- vim3-fan-controller/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index 34b77a2..96be40c 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -1,6 +1,6 @@ name: "Khadas VIM3 Fan Controller" description: "Control the fan of the Khadas VIM3" -version: "1.0.3-dev1" +version: "1.0.3-dev2" slug: "khadas-vim3-fan" init: false arch: From 5cdbd14f09dd85684519d91f10042d712809960b Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:57:37 +0200 Subject: [PATCH 06/10] try with apparmor --- vim3-fan-controller/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index 96be40c..041a192 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -1,6 +1,6 @@ name: "Khadas VIM3 Fan Controller" description: "Control the fan of the Khadas VIM3" -version: "1.0.3-dev2" +version: "1.0.3-dev4" slug: "khadas-vim3-fan" init: false arch: @@ -9,6 +9,7 @@ arch: - armhf - armv7 - i386 +apparmor: true startup: services devices: - /dev/i2c-0 From b2dc8abbb34a05e8d14865c67b8736f74ad7e448 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:10:26 +0200 Subject: [PATCH 07/10] Create apparmor.txt --- vim3-fan-controller/apparmor.txt | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 vim3-fan-controller/apparmor.txt diff --git a/vim3-fan-controller/apparmor.txt b/vim3-fan-controller/apparmor.txt new file mode 100644 index 0000000..5aba1e6 --- /dev/null +++ b/vim3-fan-controller/apparmor.txt @@ -0,0 +1,35 @@ +#include + +profile khadas-vim3-fan flags=(attach_disconnected,mediate_deleted) { + #include + + capability, + file, + + # S6-Overlay + /bin/** ix, + /usr/bin/** ix, + /usr/lib/bashio/** ix, + /etc/s6/** rix, + /run/s6/** rix, + /etc/services.d/** rwix, + /etc/cont-init.d/** rwix, + /etc/cont-finish.d/** rwix, + /init rix, + /var/run/** mrwkl, + /var/run/ mrwkl, + /proc/self/attr/** mrwkl, + + # Files required + /dev/i2c-0 mrwkl, + + # Data access + /data/** rw, + + # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container + ptrace (trace,read) peer=docker-default, + + # docker daemon confinement requires explict allow rule for signal + signal (receive) set=(kill,term) peer=/usr/bin/docker, + +} From c1fb89aa9b6c766afbf67d0f5224fd6d43be20ec Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:10:41 +0200 Subject: [PATCH 08/10] bump version dev5 --- vim3-fan-controller/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index 041a192..735c031 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -1,6 +1,6 @@ name: "Khadas VIM3 Fan Controller" description: "Control the fan of the Khadas VIM3" -version: "1.0.3-dev4" +version: "1.0.3-dev5" slug: "khadas-vim3-fan" init: false arch: From 0aa2e0a12379039f43cc058738b07589f3ae6b27 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:10:49 +0200 Subject: [PATCH 09/10] bum v 1.0.4 --- vim3-fan-controller/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index 735c031..edda0ef 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -1,6 +1,6 @@ name: "Khadas VIM3 Fan Controller" description: "Control the fan of the Khadas VIM3" -version: "1.0.3-dev5" +version: "1.0.4" slug: "khadas-vim3-fan" init: false arch: From 25ab8bd877096e6ed2816515a92ede902e6f69d9 Mon Sep 17 00:00:00 2001 From: nicow <46629108+Nicooow@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:14:21 +0200 Subject: [PATCH 10/10] linter --- vim3-fan-controller/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim3-fan-controller/config.yaml b/vim3-fan-controller/config.yaml index edda0ef..0dd2aff 100644 --- a/vim3-fan-controller/config.yaml +++ b/vim3-fan-controller/config.yaml @@ -9,7 +9,7 @@ arch: - armhf - armv7 - i386 -apparmor: true +# apparmor: true # already default to true startup: services devices: - /dev/i2c-0