-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homeassistant: update to 0.87.1 and generic installer and service #3462
homeassistant: update to 0.87.1 and generic installer and service #3462
Conversation
580a14f
to
3352494
Compare
Hi @chickenandpork, So I was following the issue #3396 closely, and finally managed to install home assistant 0.75.3 on my DS116. Unfortunatelly, I was unable to install latest version (>0.76.0) because of the required package cryptography==2.3.1. Pip was unable to install cffi-1.11.5 because there is apparently no compiler on my nas. There are further problems with home assistant components "cloud" and "discovery" (when activated in the configuration) which want to install additional python packages (e.g. netifaces, warrant==0.6.1). 1.) It is my understanding that some python packages include c-code which needs to be compiled for the processor architecture. When installing such a package with pip, it will try to download a pre-compiled version (wheel) or if none matches (e.g. for my ARM processor), then it will try to compile with a compiler on the system. Is this correct? 2.) Synology nas do not have a compiler by default, right? Is it possible to install a compiler on the nas? I tried to execute gcc (from https://sourceforge.net/projects/dsgpl/files/DSM%206.1%20Tool%20Chains/Marvell%20Armada%2038x%20Linux%203.10.102/) on the nas but got an "wrong exec format" error. Is this compiler just for cross-compilation? 3.) Is is theoretically possible to include a cross-compiled version of cffi with the python3 delivery (spk) itself? 4.) I see now, apart from python, you are also making a spk for homeassistant itself. Would such a spk already include a cross-compiled cffi? What about other packages that are dynamically installed by home assistant (depending on configuration)? 5.) What are the advantages of having a homeassistant spk compared to installing via pip? Since homeassistant is updated quite often (2 weeks interval), wouldn't it mean a lot of effort for keeping the spk version up-to-date? Thanks a lot in advance! :) |
hogi1200, send me email at {your nickname}@{my nickname}.com (it'll forward to me). Let's swap some email and you may choose to share what works for you. |
Thanks for your offer! For anyone interested, this is what I did to get the cross-compiled python packages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package requires migration to generic service support: https://github.com/SynoCommunity/spksrc/wiki/Package-Migration
You can inspire from PR #3431 as an example.
spk/homeassistant/Makefile
Outdated
@@ -1,13 +1,14 @@ | |||
SPK_NAME = homeassistant | |||
SPK_VERS = $(shell date +%Y%m%d) | |||
SPK_REV = 1 | |||
include ../../cross/$(SPK_NAME)/version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it overkill compare to simply copy-paste of version string used in all packages...
cross/homeassistant/version
Outdated
@@ -0,0 +1,2 @@ | |||
PKG_VERS = 0.77.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove that file
cross/homeassistant/Makefile
Outdated
LOCAL_FILE = $(PKG_DIST_FILE) | ||
DIST_FILE = $(DISTRIB_DIR)/$(LOCAL_FILE) | ||
DIST_EXT = $(PKG_EXT) | ||
MSG = echo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really useful?
cross/homeassistant/Makefile
Outdated
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT) | ||
PKG_DIR = $(PKG_NAME)-git$(PKG_GIT_HASH) | ||
|
||
# scaffolding to allow just a basic git clone as a downloaded archive (from cross-cc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is easier way to get git hash. See https://github.com/SynoCommunity/spksrc/blob/master/cross/gateone/Makefile as an example.
By the way, I recommend to stick to git tag 0.80.3
I have worked on it associated with #3529 |
3352494
to
6f070c9
Compare
6f070c9
to
e6f9391
Compare
Some fixes to provide:
|
74a287c
to
7b2f0f7
Compare
This is pending - I expect to include "bluepy" and "openzwave" support before publishing homeassistant in latest version. |
94120a9
to
a5febc8
Compare
…on numbers; update requirements.txt for 0.77.3
Use of generic installer and service Discard useless wizard Tested with python 3.5.6 SynoCommunity#3529
5021707
to
f6c6fb2
Compare
It now builds and runs over Python 3.6. Will now add openZwave... |
@chickenandpork Hello. I need your help... x64 builds but other cross-compiled targets fail with:
And I wonder why pip does not find/load library located at |
I can look in around 9 hrs :-/
… On Feb 26, 2019, at 09:50, Yves Martin ***@***.***> wrote:
@chickenandpork Hello. I need your help... x64 builds but other cross-compiled targets fail with:
File "src/build_bcrypt.py", line 21, in <module>
ffi = FFI()
File "/tmp/pip-build-env-ot3drld4/overlay/lib/python3.6/site-packages/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: /tmp/pip-build-env-ot3drld4/overlay/lib/python3.6/site-packages/_cffi_backend.cpython-36m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory
----------------------------------------
Command "/spksrc/native/python3/work-native/install/usr/local/bin/python3 /spksrc/native/python3/work-native/install/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp4q9sryym" failed with error code 1 in /spksrc/spk/homeassistant/work-aarch64-6.1/wheelbuild/bcrypt
You are using pip version 19.0.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
../../mk/spksrc.wheel.mk:61: recipe for target 'build_wheel_target' failed
And I wonder why pip does not find/load library located at spk/homeassistant/work-aarch64-6.1/install/var/packages/homeassistant/target/lib/python3.6/site-packages/_cffi_backend.cpython-36m-x86_64-linux-gnu.so? What/where is the site-packages location search path?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@chickenandpork Hello Allan. Sorry I missed your reply. I have understood and fixed "requirements.txt" to publish. It is OK but only local at the moment... I am working on openzwave and will create PR then. |
It’s ok, my build server was randomly synflooding, so something went bad. Nuked it. Rebuilding it. Config-as-code anyone? :-/
… On Feb 28, 2019, at 09:13, Yves Martin ***@***.***> wrote:
@chickenandpork Hello Allan. Sorry I missed your reply. I have understood and fixed "requirements.txt" to publish. It is OK but only local at the moment... I am working on openzwave and will create PR then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
* upstream/master: (151 commits) Fix build of itools (usbmuxd) for arch 88f6281 Fix compilation of cross/fuse for arch ppc853x Update templates mono: update to 5.18.0.240 (release) (SynoCommunity#3561) syncthing: update to 1.1.0 and go to 1.12 syncthing: split up firewall ports more granularly ffmpeg: fix for qoriq (SynoCommunity#3655) [Sonarr] Update to v2.0.0.5301 Update Sonarr for v3 upgrade compatibility [Lidarr] Update to v0.5.0583 [Radarr] Update to v0.2.0.1293 [Jackett] Update to v0.11.43 homeassistant: update to 0.87.1 and generic installer and service (SynoCommunity#3462) sabnzbd: update to 2.3.7 (SynoCommunity#3555) python" update to 2.7.15 (SynoCommunity#3628) tvheadend: fixes on 4.2.8 (SynoCommunity#3623) framework: improve icon generation (SynoCommunity#3172) framework: fix DISTRIB_DIR recursive definition ffmpeg: fix GMP install prefix framework: new docker image based on Debian Stretch ...
HomeAssistant is fairly outdated, and it's versioned as just a date whereas upstream uses version numbers. Additionally, I found that any build re-hit the upstream for a HEAD checkout, so any two builds are not reproducible, and the date and versions are unrelated.
I'm a real fan of caching upstream resources :)
I've used a
cross/homeassistant
as a way to pull out the upstream and store into theDISTRIB_DIR
for re-use. It's an imperfect fit (see Makefile likes 12-23), it would be cleaner to create amk/spksrc.gitpull.mk
or such to make a reusable component for this and to make it a bit cleaner. Looking for feedback on that.cross/homeassistant
stores the upstream githash and version -- this duplication is a few other packages (ie python, python3) which I saw as a source of risk. Looking for feedback.I've got an additional commit to push that improves HomeAssistant's HomeKit, but trying to keep this to a reusable diff to land and share before going further.
Resolves #3115 #3373 #3573 #3543 #3584
Requires #3396
Checklist
all-supported
completed successfully-- boilerplate -- (sorry)
I've been granted permission by my employer to contribute to spksrc without risk of IP confusion. I am required to explicitly write that my contribution to this project is solely in my personal capacity, and I am not conveying any rights to any intellectual property of any third parties.