mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-04-02 16:22:51 +01:00
a3cf445c93c209b577b09c1b80828ec392fcdc01
* Do not use `tar_file.add` to recursively add backup folder As the folders might contain files which are being removed temporarily (e.g. shared memory file of sqlite database), relying on `tar_file.add` becomes problematic as it crashes the whole backup process if a file does not exist anymore. This becomes annoying, if the file which causes the error should be excluded by the filter. To workaround this issue, we manually iterating over the files/directories and apply filters before passing the file or directory to the `tar_file.add` method. As per [documentation](https://docs.python.org/3/library/pathlib.html#pure-paths), pure path does not access the file system. Fixes #779 Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Remove unused import Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Applied code review suggestions Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Applied codestyle Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Remove `pathlib` util and move `is_excluded_by_filter` into `tar` utils Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Rename method Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Rename `origin_dir` to `origin_path` and apply `Path` typehint Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Codestyle Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Add comment why we add the directory even if we are iterating over all its items Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Use `atomic_contents_add` from tar utils to archive addon data Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Remove unused function `exclude_filter` Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Remove unsecure default list value Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Some more codestyle Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Lowercase method name `Path.joinpath` Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Fix codestyle and use proper variable Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Add test for `_is_excluded_by_filter` Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> * Update addon.py Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
Home Assistant Supervisor
First private cloud solution for home automation
Hass.io is a Docker-based system for managing your Home Assistant installation and related applications. The system is controlled via Home Assistant which communicates with the Supervisor. The Supervisor provides an API to manage the installation. This includes changing network settings or installing and updating software.
Installation
Installation instructions can be found at https://home-assistant.io/hassio.
Development
The development of the supervisor is a bit tricky. Not difficult but tricky.
- You can use the builder to build your supervisor: https://github.com/home-assistant/hassio-builder
- Go into a HassOS device or VM and pull your supervisor.
- Set the developer modus with cli
hassio supervisor options --channel=dev - Tag it as
homeassistant/xy-hassio-supervisor:latest - Restart the service like
systemctl restart hassos-supervisor | journalctl -fu hassos-supervisor - Test your changes
Small Bugfix or improvements, make a PR. Significant change makes first an RFC.
Description
Languages
Python
95.5%
JavaScript
4.4%