Commit Graph
71 Commits
Author SHA1 Message Date
4ba15fe965 Use local wheels for editable Supervisor install (#7002)
The editable install of the Supervisor package resolves its build backend
(setuptools, pinned via build-system.requires in pyproject.toml) in an
isolated build environment. Unlike the runtime requirements install, this
step was not given the locally built wheels, so it resolved build
dependencies solely from the configured package indexes.

When a pinned build dependency is newer than what the Home Assistant
musllinux wheels index currently carries (e.g. a Dependabot setuptools
bump), uv's default first-index strategy never falls through to PyPI and
the editable install fails with "No solution found".

Pass the locally built wheels via --find-links, mirroring the runtime
requirements step, so the isolated build environment can satisfy build
dependencies from them.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 18:31:14 +02:00
d251d2b124 Increase s6 service stop timeout for graceful shutdown (#6892)
The s6 supervision tree only waited S6_SERVICES_GRACETIME (10s) for the
Supervisor service in /etc/services.d to stop before tearing down the rest
of the tree, which cut graceful shutdown short well before the container's
stop timeout. Now that the OS grants the Supervisor container more time to
shut down, raise S6_SERVICES_GRACETIME to 415s so a long-running graceful
shutdown can complete.

Also set S6_KILL_GRACETIME explicitly to its default of 3000ms. It only acts
as the final SIGTERM-to-SIGKILL grace at the very end of shutdown, so the
default is fine, but stating it keeps both shutdown timers documented in one
place.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:21:28 +02:00
b11eeefdb2 Update Python to 3.14.5/base image to 3.14-alpine3.22-2026.05.0 (#6874)
Update to the latest base image:
* https://github.com/home-assistant/docker-base/releases/tag/2026.05.0

This also brings Python to 3.14.5, so update it in CI.

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2026-05-22 17:13:35 +02:00
Jan ČermákandGitHub d815c0922f Flatten published Docker image (#6812)
This flattens the Docker image from 9 layers to 5 by using multi-stage
build that squashes layers into logical blocks. The first layer on top
of the base image adds system-wide packages and uv (which is not updated
so often - if it were, it may be wise to move it into the next or
separate layer; it weights roughly 50 MB) which should be preserved
between releases, while the next layer adds all Supervisor Python code
and dependencies.

This means that unless the base image or packages installed in the first
stage are changed (or in other words, only Supervisor code is changed),
only a single layer is pulled from the repository. Previously, it
generally resulted in pull of all the following 4 layers, as just a
change in the requirements invalidated the following layers. The fetched
payload size remains roughly the same.
2026-05-06 12:04:32 +02:00
Jan ČermákandGitHub 2920194f16 Update Python to 3.14.4/base image to 3.14-alpine3.22-2026.04.0 (#6810)
Update to the latest base image:
* https://github.com/home-assistant/docker-base/releases/tag/2026.04.0

This also brings Python to 3.14.4, so update it in CI.
2026-05-05 17:05:58 +02:00
Jan ČermákandGitHub a78f02eed8 Fix version/requirements parsing in setup.py, set version in Dockerfile (#6692)
* Fix version/requirements parsing in setup.py, set version in Dockerfile

Remove the step patching const.py with detected version in CI and do
this during Dockerfile version from BUILD_VERSION argument instead.

Also, fix parsing of the version in `setup.py` - it wasn't working
because it was splitting the files on "/n" instead of newlines,
resulting in all Python packages installed having version string set to
`9999.9.9.dev9999` instead of the expected version.

(Note: setuptools are doing a version string normalization, so the
installed package has stripped leading zeroes and the second component
is `9` instead of the literal `09` used in default string in all places.
Fixing this is out of scope of this change as the ideal solution would
be to change the versioning schema but it should be noted.)

Lastly, clean up builder.yaml environment variables (crane is not used
anymore after #6679).

* Generate setuptools-compatible version for PR builds

For PR builds, we're using plain commit SHA as the version. This is
perfectly fine for Docker tags but it's not acceptable for Python
package version. By fixing the setup.py bug this error surfaced. Work it
around by setting the Package version to the string we used previously
suffixed by the commit SHA as build metadata (delimited by `+`).
2026-04-01 16:01:46 +02:00
Jan ČermákandGitHub 27609ee992 Migrate builder workflow to new builder actions (#6653)
* Migrate builder workflow to new builder actions

Migrate Supervisor image build to new builder actions. The resulting images
should be identical to those built by the builder.

Refs #6646 - does not implement multi-arch manifest publishing (will be done in
a follow-up)

* Update devcontainer version to 3
2026-03-24 10:04:18 +01:00
Jan ČermákandGitHub 3c703667ce Bump uv to v0.10.9 (#6622)
* https://github.com/astral-sh/uv/blob/0.10.9/CHANGELOG.md
2026-03-11 16:17:02 +01:00
Mike DegatanoandGitHub 7e39226f42 Remove cosign from container (#6442) 2025-12-20 08:56:36 -05:00
Jan ČermákandGitHub 75cf60f0d6 Bump uv to v0.9.18 (#6436)
Bump to latest version, full changelog at:
https://github.com/astral-sh/uv/blob/0.9.18/CHANGELOG.md
2025-12-18 16:21:59 +01:00
Jan ČermákandGitHub bac072a985 Use unpublished local wheels during PR builds (#6374)
* Use unpublished local wheels during PR builds

Refactor wheel building to use the new `local-wheels-repo-path` and move wheels
building into a separate CI job. Wheels are only published on published (i.e.
release or merged dev), for PR builds they are passed as artifacts to the build
job instead.

* Address review comments

* Add trailing slash for wheels folder
* Always run the changed_files check to ensure build_wheels runs on publish
* Use full path for workflow and escape dots in changed files regexp
2025-12-02 14:08:07 +01:00
Jan ČermákandGitHub ba82eb0620 Clean up Dockerfile after dropping deprecated architectures (#6373)
Clean up unnecessary arguments that were needed for deprecated architectures,
bind-mount requirements file to reduce image bloat.
2025-12-01 19:43:19 +01:00
Jan ČermákandGitHub 07dd0b7394 Bump uv to 0.8.9 (#6097) 2025-08-13 16:27:56 +02:00
Jan ČermákandGitHub 7f54383147 Revert "Use s6-overlay read-only mode by default (#5906)" (#5921) 2025-05-27 20:00:22 +02:00
Stefan AgnerandGitHub c80fbd77c8 Use s6-overlay read-only mode by default (#5906)
To avoid accidential writes to the Supervisor root filesystem, we might
use the Docker read-only mode at one point. This is not yet the default,
but using s6-overlay with the read-only flag seems not to have any
downsides. So enable this by default.

To start Supervisor with read-only root file system teh following
arguments have to be used: `--read-only --tmpfs /run:exec`.
2025-05-22 17:30:42 +02:00
Jan ČermákandGitHub 61089c3507 Bump uv to 0.6.17 (#5854) 2025-04-29 16:57:48 +02:00
Stefan AgnerandGitHub a8d2743f56 Define CPU architecture to fix armhf builds (#5670) 2025-02-25 11:36:35 +01:00
Stefan AgnerandGitHub 37bc703bbb Disable uv cache when creating container image (#5646)
We don't intent to run uv again, so the cache is not really useful.
The cache directory size is around 80MB, however, the files are mostly
hardlinks to the original files in `/usr/local/lib/python3.13/site-packages`
so the actual saving is much smaller.
2025-02-19 10:45:22 +01:00
Robert ReschandGitHub 4054749eb2 Use uv to install supervisor (#5642) 2025-02-18 14:54:23 -05:00
Robert ReschandGitHub ad5827d33f Bump uv to 0.6.1 (#5641)
* Bump uv to 0.6.0

* Bump uv to 0.6.1
2025-02-18 19:26:36 +01:00
Jan ČermákandGitHub 249464e928 Generate Python bytecode for site-packages during build (#5640)
Since transition from pip to uv in #5152, Supervisor container doesn't
contain bytecode for site-packages anymore, and because our AppArmor
profile denies mkdir operations, the compiled *.pyc files are never
created. Enable uv --compile option to opt for the same behavior as pip
had, to fix of the AA errors and the potential penalty of compilation on
every import.
2025-02-18 18:44:37 +01:00
Mike DegatanoandGitHub 02bdc4b555 Use uv instead of pip in Supervisor (#5152)
* Migrate supervisor image from pip to uv

* Set python paths

* Put in i386 conditional to match core

* Semicolons within if statements
2024-07-03 11:51:16 -04:00
Stefan AgnerandGitHub 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 AgnerandGitHub 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 DegatanoandGitHub b04efe4eac Remove folder only deletes from current filesystem (#4653) 2023-10-26 16:55:42 -04:00
Stefan AgnerandGitHub 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 NijhofandGitHub 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 DegatanoandGitHub 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]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pascal Vizeli
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 DegatanoandGitHub 6eb8de02eb Set CRYPTOGRAPHY_OPENSSL_NO_LEGACY for OpenSSL3 (#4342) 2023-06-05 12:07:57 -04:00
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
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ørensenandGitHub 03f0a136ab Remove vcn from Dockerfile (#3241) 2021-10-19 10:08:53 +02:00
Stefan AgnerandGitHub 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
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 VizeliandGitHub a456cd645f remove git from build-dependencies (#2741) 2021-03-22 11:19:35 +01:00
Pascal VizeliandGitHub 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 VizeliandGitHub 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 VizeliandGitHub a0261dbbcc Make sure we use localhost for watchdog (#2031) 2020-09-08 13:50:33 +02:00
Pascal VizeliandGitHub 3541cbff5e Remove old dns forwarder (#1945) 2020-08-18 21:40:52 +02:00
Pascal VizeliandGitHub f77b479e45 Add timeout for clean shutdown (#1650)
* Fix overlay

* Update Dockerfile
2020-04-10 23:31:24 +02:00
Pascal VizeliandGitHub 10230b0b4c Support profiles on template (#1527) 2020-02-26 14:28:09 +01:00
Pascal VizeliandGitHub 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 VizeliandGitHub 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 VizeliandGitHub 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 VizeliandGitHub 7b8ad0782d Update Dockerfile 2019-10-23 16:06:48 +02:00
Pascal VizeliandGitHub 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 VizeliandGitHub 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