Need help with python based port (home assistant)

Rozhuk Ivan rozhuk.im at gmail.com
Mon Nov 23 20:40:45 UTC 2020


On Mon, 23 Nov 2020 19:26:49 +0100
Mateusz Piotrowski <0mp at FreeBSD.org> wrote:

> > Questions:
> >
> > 1. Is it ok that I use hack to change required deps versions?
> > Or how to deal with it?  
> It is OK to change the required deps as long as the program keeps
> working. Sometimes, however, we just add new ports for the specific
> desired versions of the dependencies (e.g.,
> py37-sphinxcontrib-websupport11 and py37-sphinxcontrib-websupport).

Ok.


> > 2. Is it ok that HA download all deps that required into HA
> > work dir?
> > Should I add all these deps in port to prevent this?  
> If I understand correctly, HA is missing some runtime dependencies.
> Each runtime dependency should be specified (e.g., via RUN_DEPENDS).

HA deps to run - already in makefile.
But HA have many plugins, every plugin have its own dep list.
HA requires at least some of plugins to run "core" with GUI.
There is a very big deps list: https://github.com/home-assistant/core/blob/dev/requirements_all.txt
HA on startup download and install plugins deps into HA work dir (path may be set via command line).

HA has 960+ plugins.
It is to many for hands job. I can write some shell script to do most work.
Makefile will require to much time to process all options, like nginx but longer.


To prevent autoinstall:
- run with: --skip-pip  Skips pip install of required packages on startup
- patch all required versions to versions => vers in ports tree
- add all deps to port Makefile
- some plugins requires other plugins


On other side, Kodi downloads python plugins into its own work dir, some of them - same things that in ports tree.


There is 2 ways:

1. Allow HA download and install all deps that required for plugins.
All or almost all things will work, like on other HA platforms.

2. Allow user to chose plugins to install, istall all deps from ports tree,
do not allow HA auto install anything.
Only some of plugins will available and work. 5-30% from start.




More information about the freebsd-ports mailing list