Page MenuHomeFreeBSD

[NEW-PORT] www/py-homeassistant: Open-source home automation plateform
Needs RevisionPublic

Authored by kiwi on Jan 14 2025, 8:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 10, 7:29 PM
Unknown Object (File)
Sun, Feb 9, 11:56 AM
Unknown Object (File)
Tue, Feb 4, 7:22 PM
Unknown Object (File)
Tue, Feb 4, 1:33 PM
Unknown Object (File)
Sun, Feb 2, 5:55 PM
Unknown Object (File)
Sat, Feb 1, 4:19 PM
Unknown Object (File)
Fri, Jan 31, 4:20 PM
Unknown Object (File)
Fri, Jan 31, 6:11 AM
Subscribers

Details

Reviewers
0mp
Summary
www/py-homeassistant: Open-source home automation plateform

Open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.
Perfect to run on a Raspberry Pi or a local server.

PR:     256885
Approved by:    0mp (mentor)
Co-authored-by: kiwi
Test Plan
  • portlinted / portclippied
  • build with poudriere on 14.1 and 14.2
  • tested on FreeBSD 14.2 jail and starting sucessfully

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kiwi requested review of this revision.Jan 14 2025, 8:31 PM
kiwi created this revision.

Removed PORTREVISION used for my own poudriere

BTW, did you develop this patch yourself or is it someone's work from the PR?

Used the port from the bugzilla and fixed few things.

Added co-author and fixed author of the patch on the git commit

It would be good to ask on the -ports mailing list about some extra review. Installing software via Python virtual environments is unprecedented in the ports tree I think. Or at least not well established. That is why additional review would be beneficial.

www/py-homeassistant/Makefile
63

Is it necessary? From what I understand, we do fetch anything and do not build anything, so where do all the staged files come from?

If that's not too much work, you could upload a copy of the ${TMPPLIST} file somewhere and then we can take a look.

www/py-homeassistant/files/home-assistant.in
26

Could this be done with nproc? It's available on all supported releases.

27

/usr/local here should be %%LOCALBASE%%

Also, it'd help if you could add newlines in between the environment variables

66

Please use info or debug instead of echo for messages like that.

www/py-homeassistant/pkg-message
5

Unnecessary newline.

6

What does that mean? Is there some link explaining that?

17
0mp requested changes to this revision.Fri, Jan 17, 11:17 AM
This revision now requires changes to proceed.Fri, Jan 17, 11:17 AM
kiwi marked an inline comment as done.Fri, Jan 17, 7:48 PM
kiwi added inline comments.
www/py-homeassistant/pkg-message
6

Home Assistant have several part :

  • Home Assistant Core (this port)
  • Home Assistant OS (TL:DR; Linux + docker + stuff to make it usable from Home Assistant Core)
  • Home Assistant Frontend (that will be installed into this venv)

...
All of them use Home Assistant Core to make them run.
For "easy usage", we don't add "Core"... but https://github.com/orgs/home-assistant/repositories can show all repos that can be installed thru this port (if compatible).

kiwi marked an inline comment as done.Fri, Jan 24, 5:36 PM
kiwi added inline comments.
www/py-homeassistant/Makefile
63

${TMPPLIST} have the following:

@dir /var/db/homeassistant
@(root,wheel,0755) /usr/local/etc/rc.d/home-assistant
kiwi marked 3 inline comments as done.Sun, Feb 2, 4:56 PM

Will be done in next diff (after a little test on poudriere).

www/py-homeassistant/Makefile
63

I think this part was from a previous port and can be only written using a pkg-plist.

www/py-homeassistant/files/home-assistant.in
26

Yes. Done

  • Using static pkg-plist instead of dynamic one
  • pkg-message
  • add suggested changes into home-assistant.in
0mp requested changes to this revision.Mon, Feb 3, 2:51 PM

I've done another review pass.

As I said earlier, before I approve this commit I would like to see another ports committer review and give a "reviewed by".

www/py-homeassistant/Makefile
22

This should be USES=pkgconfig:run

26

Add a comment above this line linking to a resource that says that HA requires Python 3.11?

www/py-homeassistant/files/home-assistant.in
25

Is tr necessary here?

26

Please quote home_assistant_jobs.

60

What are those variables? Can they be removed? If not, please at least use LOCALBASE instead of /usr/local.

This revision now requires changes to proceed.Mon, Feb 3, 2:51 PM

Personally, I don't like it when a service downloads / installs things at launch, isn't there another way?

www/py-homeassistant/files/home-assistant.in
65

s#Bootstaping#Bootstraping#

79

Do we really need to keep the orig file?

www/py-homeassistant/pkg-message
10–12

I failed to understand this part.

14

This service doesn't require root priv?

Personally, I don't like it when a service downloads / installs things at launch, isn't there another way?

Well, we will need loooots of python ports with specific version. Keep in mind that HA is very picky about python module you use...
For example, we are stuck on this 2024.1.3 version because next version *require* python 3.12 and the latest one needs 3.13 ...

www/py-homeassistant/pkg-message
10–12

Bluetooth support on HA is very tighted to... linux way of handling that.

14

Home assistant always runs without root priv. Even the 8123 port seems to be "hardcoded", since the official documentation speak to add nginx as reverse proxy if we need ssl/tls or something on other ports.