HomeAssistantRepository
:house_with_garden: Home Assistant on Gentoo Linux.
Install / Use
/learn @onkelbeh/HomeAssistantRepositoryREADME
Home Assistant for Gentoo
without Docker & Virtual Environments
https://www.home-assistant.io/ https://github.com/home-assistant/home-assistant
"Open source home automation that puts local control and privacy first."
Origin: Ireland, Home: Bavaria
Once this was a fork of Paul Healy's https://cgit.gentoo.org/user/lmiphay.git/tree/app-misc/homeassistant-bin, which seemed unmaintained to me. At first I just wanted to compile it for my personal use. This happened at Home Assistant 0.77 in September 2018. Some friends told me they wanted to use/see it, so I placed it on my public git server, and was caught by surprise by several hundred page views in the very first days. I'll do my best to keep it close to the official releases, though it might get slower during summers. After three months it had ~170 ebuilds, Nov 2019 > 1599 Ebuilds in > 830 packages are on file, 970 packages in 2380 Ebuilds in September 2020. As long as I certainly do not count automatically consolidated collections, this Overlay has grown to one of the largest Gentoo Repos during the last year.
If you have questions or suggestions: contact me, any help is very welcome. If you want to help or contribute, please join us.
Authors welcome
If you are an author of an integration / component or other stuff related to Home Assistant and I have your stuff not added already, please file a pull request, or just drop me a note. For adding a component, I need a release file in tar.gz or zip format. Tagged releases on GitHub are OK, but a
PyPI SDIST tar.gz source release would be preferred, because I can automatically merge it and it will use Gentoo's mirror system. Most of the integrations/components do both. I cannot add packages only available in wheels format. Please make sure you have a proper license assigned, selected license should be unique on all platforms (
PyPI/GitHub/Sourceforge).
2024-05 Python 3.11 removed
Python 3.11 is now removed from the core Ebuilds. For early tests, all touched Ebuilds now have 3.13 compatibility set. 3.13 is currently untested.
2024-01 again some file collisions related to snmp
The HA team now uses pysnmp-lextudio (which is imho not a bad decision). Had to apply a slight patch to the core constraints.
Best practice for now is to keep /etc/portage/profile/package.provided as it is (the snmp libs are only referenced 2 times from the main repo), remove pysnmplib and let the Ebuild install the 2 lextudio modules.
For easier install I also patched core's version of dev-python/regex.
note to the 2023-10 Update
Due to a sudden significant change in the pypi.eclass and other fundamental aspects of the Gentoo packaging system, we faced a complex and time-consuming task of updating our Ebuilds. These changes required modifications to nearly 2000 Ebuilds, impacting our ability to release updates in a timely manner.
Why the Delay?
-
Eclass Changes: The core of this delay was the extensive overhaul of the
pypi.eclass, which required substantial updates across our entire repository. -
Quality Assurance: We were committed to ensuring that the updates are thoroughly tested and that Home Assistant on Gentoo continues to meet high-quality standards.
-
Other Commitments: I've been juggling multiple responsibilities, which added to the time it took to complete these updates. Your understanding and patience are greatly appreciated.
-
Community Engagement: We sought feedback from our users and engaged with the Gentoo community to address any issues and concerns that emerged during the update process.
We appreciate your support and understanding during this period of adjustment. We are now pleased to announce that a new release is getting ready, and we are excited to deliver an updated version of Home Assistant for Gentoo.
How You Can Help:
We welcome assistance in maintaining and improving this repository. If you have some time to contribute to Ebuild maintenance, your help would be greatly appreciated. Please feel free to reach out and get involved in the project.
Thank you for your continued support and understanding.
Happy automating!
2023.10.4 another workaround for the snmp libraries
pyasn1 0.5.0 has breaking changes which cause pysnmplib to fail until they are resolved, we need to pin pyasn1 to 0.4.8 and pysnmplib to 5.0.21 to avoid the issue.
- https://github.com/pyasn1/pyasn1/pull/30#issuecomment-151756433
- https://github.com/pysnmp/pysnmp/issues/51
To get this fixed, remove dev-python/pyasn1-1.1.2 from /etc/portage/profile/package.provided, remove blocking packages and upgrade to dev-python/pysnmplib-5.0.21-r2, which then allows the installation of dev-python/pyasn1-0.4.8-r2. Finally, re-install all dependend packages.
cython-3 build issues
some packages throw errors during build time, if cython-3.0.2 is installed. Downgrade cython to 0.29.36, and these will compile (cython is only in BDEPEND). Currently, there is no other fix. For Home Assistant 2023.10.4 I had to compile
- dev-python/grpcio-1.58.0
- dev-python/grpcio-reflection-1.58.0
- dev-python/grpcio-status-1.58.0
with the old version. Make sure you have gcc-13 active.
2023-03 changed main Ebuild SRC_URI to Pypi
As the current translation files have been removed from the core (https://developers.home-assistant.io/blog/2023/02/06/translations-files-removed-from-core/), I have switched SRC_URI to Pypi, the SDIST there contains all artifacts including the translations. Unfortunately tests are not part of the PyPi SDIST, so currently we have none. I'll try to pull in the tests from the Github Tarball in one of the next Releases.
2022-10: reworked all Ebuilds, same KEYWORDS on all Ebuilds
Overdue for long, went through all Ebuilds, removed unused and old versions. All Ebuilds now have default tests turned on, and got Python 3.11 compatibility assigned. Some could not be tested yet on 3.11 (missing external dependencies). Ebuilds now are maintained with pkgdev instead of repoman and are checked against pkgcheck before release. For easier compilation tests and maintainance, all Ebuilds will now have
KEYWORDS="amd64 arm arm64 x86"
no matter of the platform they are designed to run on, e.g. on a Raspberry Pi. Please choose your modules wisely :-)
I will keep the best last two major versions of all three main Ebuilds and 2-3 versions of the current, when other Ebuilds are touched, their unreferenced versions will be removed.
As soon as 80% have been completed, dev-python/nose was deprecated (which was referenced in ALL Ebuilds) :-( 800 more packages to touch...
2022-07: file collisions with pysnmp
With 2022.7.0, Home Assistant and some components started again using pysnmplib, this causes file collisions with pysnmp, which is referred by many packages from Gentoo. pysnmp uses the same namespace as pysnmplib, and should be compatible. To avoid the collisions, add the following packages
# Workaround for replacing pysnmp with pysnmplib
dev-python/pysnmp-4.4.12-r2
dev-python/pyasn1-1.1.2
dev-python/pyasn1-modules-0.2.8-r1
dev-python/pysmi-0.3.4
to /etc/portage/profile/package.provided, so portage assumes you have them installed. Then, run emerge --depclean -a to remove them, and install dev-python/pysnmplib.
2022-03-21: new Testjobs
Thanks to @antonfischl1980 for his gentoo-ci Image and lots of help.
2022/02/26: EAPI 8 / pyproject.toml
With homeassistant-2022.3.0, setup.py was removed from core. We had to switch to pyproject.toml. All three main Ebuilds are now using EAPI 8, starting with homeassistant-2022.3.0_beta3.
2022/02/12: new frontend builds
The frontend team discontinued offering an SDIST build via Pypi, caused by space limitations there. The source from github only contains the plain source without the build artifacts (from the yarn build), so starting with home-assistant-frontend-20220203.0, we have to build our own. I made some experiments running yarn on the source during install time, but this needs nodejs and yarn on the production boxes, and furthermore, this would eat up a lot of CPU (>25 minutes of build time on bigger hosts). This did not work very well on smaller hosts. I am not an nodejs expert, above all, it seems that yarn does not fit very well into Ebuilds, we would have to allow networking in the sandbox. The (new) Ebuild is changed now to fetch the pre-built yarn/nodejs stuff from my own buildhost. The pre-built frontend is very close to the former SDIST on Pypi, but it does not (yet) include the very newest translations, but we are working on that.
