Commit Graph

49 Commits

Author SHA1 Message Date
Stefan Agner 3d5bd2adef
Use find to delete files recursively (#4732)
* Use find to delete files recursively

Instead of using rm -rf use find to delete files recursively. This
has the added benefit that we do not need to rely on shell expansion.

In particular, shell expansion caused the --one-file-system flag to
not work as intended: The idea was that the content of a (left-over)
bind mounted directory would not get deleted. However, since shell
expansion passed the directory to rm, rm happily deleted also files in
that bind mounted directory.

* Pass arguments correctly

* Fix argument order and stderr output

* Improve error handling

Log with exception level if there is an OS level error. Decode the
stderr output correctly.

* Remove unnecessary newline
2023-11-27 11:36:30 -05:00
Stefan Agner 6762a4153a
Revert "Revert "Update base images to 3.11-alpine3.18 (#4639)" (#4646)" (#4657)
This reverts commit 7c576da32c.

With the AppArmor profile updated Supervisor on Alpine 3.18 should work
fine now.
2023-11-02 11:29:15 +01:00
Mike Degatano b04efe4eac
Remove folder only deletes from current filesystem (#4653) 2023-10-26 16:55:42 -04:00
Stefan Agner 7c576da32c
Revert "Update base images to 3.11-alpine3.18 (#4639)" (#4646)
This reverts commit b1010c3c61.

It seems that the git version deployed with the latest Alpine doesn't
play nice with Supervisor. Specifically it leads to "fatal: cannot exec
'remote-https': Permission denied" errors.
2023-10-23 15:48:50 -04:00
Franck Nijhof b1010c3c61
Update base images to 3.11-alpine3.18 (#4639)
* Update base images to 3.11-alpine3.18

* Adjust hadolint
2023-10-19 10:53:58 +02:00
Mike Degatano 2c8e6ca0cd
Switch from ruamel.yaml to pyyaml (#4555)
* Switch from ruamel.yaml to pyyaml

* Use CLoader and CDumper when available
2023-09-13 08:57:01 +02:00
dependabot[bot] be87082502
Bump home-assistant/builder from 2023.06.0 to 2023.06.1 (#4404)
* Bump home-assistant/builder from 2023.06.0 to 2023.06.1

Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2023.06.0 to 2023.06.1.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2023.06.0...2023.06.1)

---
updated-dependencies:
- dependency-name: home-assistant/builder
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Support cosign & ditch Codenotary

* use curl

* Not using docker.io anymore

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2023-06-26 18:17:55 +02:00
Mike Degatano 6eb8de02eb
Set CRYPTOGRAPHY_OPENSSL_NO_LEGACY for OpenSSL3 (#4342) 2023-06-05 12:07:57 -04:00
Mike Degatano 96065ed704
Bump to python 3.10 and alpine 3.16 (#3791)
* Bump to python 3.10

* 3.10 is not a number

* Musllinux wheels link

* Revert attrs 22.1.0 -> 21.2.0 for wheel

* Revert cryptography for wheel & pylint fix

* Precommit and devcontainer to 3.10

* pyupgrade rewriting things

* revert

* Update builder.yml

* fix rust

* Update builder.yml

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2022-08-16 14:33:23 +02:00
Pascal Vizeli 3478005e70
Using CAS for content-trust (#3382)
* Using CAS for content-trust

* v2

* Fix linting errors

* Adjust field checked for status in CAS response

* CI workflow needs CAS not VCN now

* Use cwd in test as code won't be in /usr/src

* Pre-cache CAS pub key for supervisor

* Cas doesn't actually need key file executable

Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-10 09:21:21 +01:00
Joakim Sørensen 03f0a136ab
Remove vcn from Dockerfile (#3241) 2021-10-19 10:08:53 +02:00
Stefan Agner 7a6663ba80
Use Python dbus-next D-Bus library (#3234)
* Use the correct interface name to get properties of systemd

It seems that gdbus (or systemd) automatically pick the correct
interface and return the properties. However, dbussy requires the
correct interface name to get all properties.

* Don't expect array from Strength property

The property returns a type "y" which equates to "guchar":
https://developer-old.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.AccessPoint.html#gdbus-property-org-freedesktop-NetworkManager-AccessPoint.Strength

It seems that the old D-Bus implementation returned an array. With
dbus-next a integer is returned, so no list indexing required.

* Support signals and remove no longer used tests and code

* Pass rauc update file path as string

That is what the interface is expecting, otherwise the new lib chocks on
the Pathlib type.

* Support Network configuration with dbus-next

Assemble Python native objects and pass them to dbus-next. Use dbus-next
specific Variant class where necessary.

* Use org.freedesktop.NetworkManager.Connection.Active.StateChanged

org.freedesktop.NetworkManager.Connection.Active.PropertyChanged is
depricated. Also it seems that StateChanged leads to fewer and more
accurate signals.

* Pass correct data type to RequestScan.

RequestScan expects an option dictionary. Pass an empty option
dictionary to it.

* Update unit tests

Replace gdbus specific fixtures with json files representing the return
values. Those can be easily converted into native Python objects.

* Rename D-Bus utils module gdbus to dbus
2021-10-18 23:06:44 +02:00
Pascal Vizeli d54c23952f
Codenotary vcn 0.9.8 - System trust check (#3070)
* Update codenotary 0.9.8

* Fix lint

* ditch wrong code

* Fix run health check

* remove old code

* better structured

* more cleaner

* Fix core

* Add tests

* addjust test

* Split checks

* Update supervisor/resolution/checks/core_trust.py

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Fix line end

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-08-24 12:19:08 +02:00
Pascal Vizeli a456cd645f
remove git from build-dependencies (#2741) 2021-03-22 11:19:35 +01:00
Pascal Vizeli 392d0e929b
Fix access to needs.init.outputs.publish (#2728)
* Fix access to needs.init.outputs.publish

* Update Dockerfile
2021-03-16 21:03:19 +01:00
Pascal Vizeli b342073ba9
Install vcn inside docker container (#2727)
* Install vcn inside docker container

* ditch multistage

* Fix docker file

* fix lint
2021-03-16 20:31:30 +01:00
Pascal Vizeli a0261dbbcc
Make sure we use localhost for watchdog (#2031) 2020-09-08 13:50:33 +02:00
Pascal Vizeli 3541cbff5e
Remove old dns forwarder (#1945) 2020-08-18 21:40:52 +02:00
Pascal Vizeli f77b479e45
Add timeout for clean shutdown (#1650)
* Fix overlay

* Update Dockerfile
2020-04-10 23:31:24 +02:00
Pascal Vizeli 10230b0b4c
Support profiles on template (#1527) 2020-02-26 14:28:09 +01:00
Pascal Vizeli 2495cda5ec
Add Pulse audio control basics (#1525)
* Add Pulse audio control basics

* add functionality

* Fix handling

* Give access to all

* Fix latest issues

* revert docker

* Fix pipeline
2020-02-26 11:48:11 +01:00
Pascal Vizeli 0212d027fb
Add Audio layer / PulseAudio (#1523)
* Improve alsa handling

* use default from image

* create alsa folder

* Map config into addon

* Add Audio object

* Fix dbus

* add host group file

* Fix persistent file

* Use new template

* fix lint

* Fix lint

* add API

* Update new base image / build system

* Add audio container

* extend new audio settings

* provide pulse client config

* Adjust files

* Use without auth

* reset did not exists now

* cleanup old alsa layer

* fix tasks

* fix black

* fix lint

* Add dbus support

* add dbus adjustments

* Fixups
2020-02-25 18:37:06 +01:00
Pascal Vizeli 4ac7f7dcf0
Rename Hass.io -> Supervisor (#1522)
* Rename Hass.io -> Supervisor

* part 2

* fix lint

* fix auth name
2020-02-21 17:55:41 +01:00
Pascal Vizeli 7b8ad0782d
Update Dockerfile 2019-10-23 16:06:48 +02:00
Pascal Vizeli 8d84a8a62e
Update panel & support panel on devcontainer (#1163)
* Update panel & support panel on devcontainer

* small cleanups

* small size
2019-07-16 12:23:03 +02:00
Pascal Vizeli 85ed4d9e8d
Update Dockerfile 2019-07-11 19:25:07 +02:00
Pascal Vizeli 51efcefdab Compile only hassio 2019-06-24 23:21:15 +00:00
Pascal Vizeli d31ab5139d compile all 2019-06-24 23:09:08 +00:00
Pascal Vizeli 626a9f06c4
Update to alpine 3.10 (#1135) 2019-06-24 18:49:43 +02:00
Jakub 7bd77c6e99 Append devlinks to serial dev_list (#1131)
* append devlinks to dev_list

* replace eudev-libs with eudev

* include only devlinks starting with /dev/serial/by-id

* add missing package, move udev init to entry.sh

* fix mode on entry.sh

* Update homeassistant.py

* Update homeassistant.py
2019-06-24 09:53:54 +02:00
Pascal Vizeli 9ce9e10dfd
WIP: Split add-on store logic (#1067)
* Split add-on store logic

* finish data model

* Cleanup models

* Cleanup imports

* split up store addons

* More cleanup

* Go to stable

* Fix layout

* Cleanup interface

* Fix restore/snapshot

* Fix algo

* Fix reload task

* Fix typing / remove indirect add-on references

* Fix version

* Fix repository data

* Fix addon repo

* Fix api check

* Fix API return

* Fix model

* Temp fix available

* Fix lint

* Fix install

* Fix partial restore

* Fix store restore

* Fix ingress port

* Fix API

* Fix style
2019-05-07 17:27:00 +02:00
Pascal Vizeli 749d45bf13
Update Dockerfile 2019-05-03 12:18:27 +02:00
Pascal Vizeli 2c84daefab
Debugger (#1070)
* Add debuger to supervisor

* Fix init

* Fix lint
2019-05-03 12:02:32 +02:00
Pascal Vizeli 7f074142bf
Replace pycrpytodome with cryptocraphy (#923)
* Replace pycrpytodome with cryptocraphy

* Fix typing

* fix typing

* Fix lints

* Fix build

* Add musl libc

* Fix lint

* fix lint

* Fix algo

* Add more typing fix crypto imports v2

* Fix padding
2019-02-20 10:30:22 +01:00
Pascal Vizeli ddb29ea9b1
Speedup build 2018-11-20 17:17:04 +01:00
Pascal Vizeli 85fbde8e36
Fix Dockerfile 2018-08-16 01:42:56 +02:00
Pascal Vizeli 0d4a808449
Improve docker build cache for supervisor (#651) 2018-08-15 23:52:52 +02:00
Pascal Vizeli ec823edd8f
Cleanup docker image (#617) 2018-08-04 00:41:14 +02:00
Pascal Vizeli a0fb91af29
Use requirements.txt (#607)
* Create requirements.txt

* Update setup.py

* Update Dockerfile

* Update Dockerfile

* Update requirements.txt

* Update requirements.txt

* Update Dockerfile

* Update tox.ini
2018-07-27 16:34:47 +02:00
Pascal Vizeli b4ea28af4e
Update uvloop to 0.11.0 (#597) 2018-07-24 16:16:26 +02:00
Pascal Vizeli 5fbff75da8
Support new base images (#571)
* Support new base images

* Update Dockerfile

* Update setup.py
2018-07-17 23:32:50 +02:00
Pascal Vizeli 495c45564a
Update libuv (#529) 2018-06-26 00:21:49 +02:00
Pascal Vizeli 7769d6fff1
Cleanup and fixup Apparmor implementation (#509)
* Cleanup and fixup Apparmor implementation

* Update addon.py

* Update validate.py

* Create apparmor.py

* Update exceptions.py

* Update apparmor.py

* Create apparmor.py

* Update const.py

* Update bootstrap.py

* Update const.py

* Update config.py

* Update addons.py

* Update apparmor.py

* Add support for host AppArmor

* Update apparmor.py

* Update apparmor.py

* Update apparmor.py

* Update apparmor.py

* Update apparmor.py

* Update addon.py

* Update apparmor.py

* Update addon.py

* Update addon.py

* Update addon.py

* Update addon.py

* Update const.py

* Update supervisor.py

* Update supervisor.py

* Update supervisor.py

* Add snapshot support

* some cleanup

* Cleanup v2

* Update aiohttp

* fix lint

* fix bugs

* Add info logs
2018-06-20 00:09:18 +02:00
Pascal Vizeli d6b3a36714
Update Dockerfile 2018-05-02 22:52:08 +02:00
Pascal Vizeli 157e48f946 Initial Dbus support 2018-04-19 23:27:20 +02:00
Pascal Vizeli 587047f9d6
Add support for encrypted snapshot files (#354)
* Add support for encrypted files

* Update tar.py

* Update tar.py

* Update tar.py

* Update addon.py

* Update API.md

* Update API.md

* Update tar.py

* cleanup snapshot

* Update API.md

* Update const.py

* Update const.py

* Update validate.py

* Update homeassistant.py

* Update homeassistant.py

* Update validate.py

* Update validate.py

* Update snapshot.py

* Update utils.py

* Update snapshot.py

* Update utils.py

* Update snapshot.py

* Update validate.py

* Update snapshot.py

* Update validate.py

* Update const.py

* fix lint

* Update snapshot.py

* Update __init__.py

* Update snapshot.py

* Update __init__.py

* Update __init__.py

* Finish snapshot object

* Fix struct

* cleanup snapshot flow

* fix some points

* Add API upload

* fix lint

* Update voluptuous

* fix docker

* Update snapshots.py

* fix versions

* fix schema

* fix schema

* fix api

* fix path

* Handle import better

* fix routing

* fix bugs

* fix bug

* cleanup gz

* fix some bugs

* fix stage

* Fix

* fix

* protect None password

* fix API

* handle exception better

* fix

* fix remove of addons

* fix bug

* clenaup code

* fix none tasks

* Encrypt Home-Assistant

* fix decrypt

* fix binary
2018-02-17 15:52:33 +01:00
Pascal Vizeli 7349234638
Use uvloop & aiohttp C extension (#279)
* Update Dockerfile

* Update __main__.py

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile
2017-12-12 23:38:33 +01:00
Pascal Vizeli e5e28747d4
Cleanup dockerfile 2017-12-10 22:13:40 +01:00
Pascal Vizeli d56af22d5e Dockerfiles for new build system 2017-09-27 17:17:08 +02:00