From fd03fc267e077bf948ada8af2d9fcb3616551247 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Fri, 29 Mar 2019 19:45:28 +0100 Subject: [PATCH] homeassistant: add new package Signed-off-by: Josef Schlehofer --- lang/python/homeassistant/Makefile | 79 ++++++ lang/python/homeassistant/files/hass.init | 18 ++ ...l-dependencies-to-match-OpenWrt-ones.patch | 256 ++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 lang/python/homeassistant/Makefile create mode 100644 lang/python/homeassistant/files/hass.init create mode 100644 lang/python/homeassistant/patches/0001-treewide-bump-all-dependencies-to-match-OpenWrt-ones.patch diff --git a/lang/python/homeassistant/Makefile b/lang/python/homeassistant/Makefile new file mode 100644 index 0000000000..cee9eb26d4 --- /dev/null +++ b/lang/python/homeassistant/Makefile @@ -0,0 +1,79 @@ +# +# Copyright (C) 2019-2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=homeassistant +PKG_VERSION:=2021.1.0 +PKG_RELEASE:=1 + +PYPI_NAME:=homeassistant +PKG_HASH:=074816e884a57ce7e833fda67bd0565c8dfbee4c7506d4b79c273b45a4bb557a + +PKG_MAINTAINER:=Josef Schlehofer +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE.md +PKG_CPE_ID:=cpe:/a:home-assistant:home-assistant + +include ../pypi.mk +include $(INCLUDE_DIR)/package.mk +include ../python3-package.mk + +define Package/homeassistant + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Home Assistant + URL:=https://www.home-assistant.io/ + DEPENDS:= \ + +python3-aiohttp \ + +python3-aiohttp-cors \ + +python3-astral \ + +python3-async-timeout \ + +python3-attrs \ + +python3-bcrypt \ + +python3-ciso8601 \ + +python3-certifi \ + +python3-cryptography \ + +python3-defusedxml \ + +python3-ifaddr \ + +python3-jinja2 \ + +python3-netdisco \ + +python3-pip \ + +python3-pillow \ + +python3-pyjwt \ + +python3-pyotp \ + +python3-pytz \ + +python3-requests \ + +python3-ruamel-yaml \ + +python3-slugify \ + +python3-sqlalchemy \ + +python3-voluptuous \ + +python3-voluptuous-serialize \ + +python3-yaml \ + +python3-yarl \ + +python3-zeroconf + VARIANT:=python3 +endef + +define Package/homeassistant/description + Home Assistant is a home automation platform running on Python 3. + It is able to track and control all devices at home and offer a platform for automating control. + + It requires a minimum of 1 GB of RAM. +endef + +define Py3Package/homeassistant/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/hass.init $(1)/etc/init.d/hass +endef + +$(eval $(call Py3Package,homeassistant)) +$(eval $(call BuildPackage,homeassistant)) +$(eval $(call BuildPackage,homeassistant-src)) diff --git a/lang/python/homeassistant/files/hass.init b/lang/python/homeassistant/files/hass.init new file mode 100644 index 0000000000..50b32b7f8e --- /dev/null +++ b/lang/python/homeassistant/files/hass.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=99 +STOP=10 + +PROG=/usr/bin/hass +CONF=/srv/homeassistant + +start_service() { + mkdir -m 0755 -p "$CONF" + procd_open_instance + procd_set_param command "$PROG" -c "$CONF" + procd_set_param respawn + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} diff --git a/lang/python/homeassistant/patches/0001-treewide-bump-all-dependencies-to-match-OpenWrt-ones.patch b/lang/python/homeassistant/patches/0001-treewide-bump-all-dependencies-to-match-OpenWrt-ones.patch new file mode 100644 index 0000000000..2ebb2d09cd --- /dev/null +++ b/lang/python/homeassistant/patches/0001-treewide-bump-all-dependencies-to-match-OpenWrt-ones.patch @@ -0,0 +1,256 @@ +From d953209f6cbfdd8c9214891f42d033b8f0bfb5b6 Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer +Date: Sat, 9 Jan 2021 19:47:30 +0100 +Subject: [PATCH] treewide: bump all dependencies to match OpenWrt ones + +Mines PR's: +- PyNaCl: +https://github.com/home-assistant/core/pull/45012 +- Cryptography: +https://github.com/home-assistant/core/pull/44992 +- Attrs: +https://github.com/home-assistant/core/pull/44991 +- yarl: +https://github.com/home-assistant/core/pull/44991 + +Pillow: +https://github.com/home-assistant/core/pull/44209 + +Next step: unpin specific version of dependencies +--- + homeassistant/components/doods/manifest.json | 2 +- + homeassistant/components/image/manifest.json | 2 +- + homeassistant/components/proxy/manifest.json | 2 +- + homeassistant/components/qrcode/manifest.json | 2 +- + homeassistant/components/seven_segments/manifest.json | 2 +- + homeassistant/components/sighthound/manifest.json | 2 +- + homeassistant/components/tensorflow/manifest.json | 2 +- + homeassistant/package_constraints.txt | 11 +++++------ + requirements.txt | 8 ++++---- + requirements_all.txt | 2 +- + requirements_test_all.txt | 2 +- + setup.py | 8 ++++---- + 12 files changed, 22 insertions(+), 23 deletions(-) + +diff --git a/homeassistant/components/doods/manifest.json b/homeassistant/components/doods/manifest.json +index 0ca3444f70..ecbcd8563a 100644 +--- a/homeassistant/components/doods/manifest.json ++++ b/homeassistant/components/doods/manifest.json +@@ -2,6 +2,6 @@ + "domain": "doods", + "name": "DOODS - Dedicated Open Object Detection Service", + "documentation": "https://www.home-assistant.io/integrations/doods", +- "requirements": ["pydoods==1.0.2", "pillow==7.2.0"], ++ "requirements": ["pydoods==1.0.2", "pillow==8.1.0"], + "codeowners": [] + } +diff --git a/homeassistant/components/image/manifest.json b/homeassistant/components/image/manifest.json +index 246ea38714..6978f09ab6 100644 +--- a/homeassistant/components/image/manifest.json ++++ b/homeassistant/components/image/manifest.json +@@ -3,7 +3,7 @@ + "name": "Image", + "config_flow": false, + "documentation": "https://www.home-assistant.io/integrations/image", +- "requirements": ["pillow==7.2.0"], ++ "requirements": ["pillow==8.1.0"], + "dependencies": ["http"], + "codeowners": ["@home-assistant/core"], + "quality_scale": "internal" +diff --git a/homeassistant/components/proxy/manifest.json b/homeassistant/components/proxy/manifest.json +index 081645a4aa..65d8d21fc0 100644 +--- a/homeassistant/components/proxy/manifest.json ++++ b/homeassistant/components/proxy/manifest.json +@@ -2,6 +2,6 @@ + "domain": "proxy", + "name": "Camera Proxy", + "documentation": "https://www.home-assistant.io/integrations/proxy", +- "requirements": ["pillow==7.2.0"], ++ "requirements": ["pillow==8.1.0"], + "codeowners": [] + } +diff --git a/homeassistant/components/qrcode/manifest.json b/homeassistant/components/qrcode/manifest.json +index 00d528ba39..b16eace14f 100644 +--- a/homeassistant/components/qrcode/manifest.json ++++ b/homeassistant/components/qrcode/manifest.json +@@ -2,6 +2,6 @@ + "domain": "qrcode", + "name": "QR Code", + "documentation": "https://www.home-assistant.io/integrations/qrcode", +- "requirements": ["pillow==7.2.0", "pyzbar==0.1.7"], ++ "requirements": ["pillow==8.1.0", "pyzbar==0.1.7"], + "codeowners": [] + } +diff --git a/homeassistant/components/seven_segments/manifest.json b/homeassistant/components/seven_segments/manifest.json +index 4996ba29f8..01e0275fee 100644 +--- a/homeassistant/components/seven_segments/manifest.json ++++ b/homeassistant/components/seven_segments/manifest.json +@@ -2,6 +2,6 @@ + "domain": "seven_segments", + "name": "Seven Segments OCR", + "documentation": "https://www.home-assistant.io/integrations/seven_segments", +- "requirements": ["pillow==7.2.0"], ++ "requirements": ["pillow==8.1.0"], + "codeowners": ["@fabaff"] + } +diff --git a/homeassistant/components/sighthound/manifest.json b/homeassistant/components/sighthound/manifest.json +index a5c56b3777..99902b8dd3 100644 +--- a/homeassistant/components/sighthound/manifest.json ++++ b/homeassistant/components/sighthound/manifest.json +@@ -2,6 +2,6 @@ + "domain": "sighthound", + "name": "Sighthound", + "documentation": "https://www.home-assistant.io/integrations/sighthound", +- "requirements": ["pillow==7.2.0", "simplehound==0.3"], ++ "requirements": ["pillow==8.1.0", "simplehound==0.3"], + "codeowners": ["@robmarkcole"] + } +diff --git a/homeassistant/components/tensorflow/manifest.json b/homeassistant/components/tensorflow/manifest.json +index a8739a86d7..f039a14d5b 100644 +--- a/homeassistant/components/tensorflow/manifest.json ++++ b/homeassistant/components/tensorflow/manifest.json +@@ -7,7 +7,7 @@ + "tf-models-official==2.3.0", + "pycocotools==2.0.1", + "numpy==1.19.2", +- "pillow==7.2.0" ++ "pillow==8.1.0" + ], + "codeowners": [] + } +diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt +index 11e7dd8991..7aa1b52fe0 100644 +--- a/homeassistant/package_constraints.txt ++++ b/homeassistant/package_constraints.txt +@@ -4,11 +4,11 @@ aiohttp==3.7.1 + aiohttp_cors==0.7.0 + astral==1.10.1 + async_timeout==3.0.1 +-attrs==19.3.0 ++attrs==20.3.0 + bcrypt==3.1.7 + certifi>=2020.6.20 + ciso8601==2.1.3 +-cryptography==3.2 ++cryptography==3.3.1 + defusedxml==0.6.0 + distro==1.5.0 + emoji==0.5.4 +@@ -19,17 +19,17 @@ importlib-metadata==1.6.0;python_version<'3.8' + jinja2>=2.11.2 + netdisco==2.8.2 + paho-mqtt==1.5.1 +-pillow==7.2.0 ++pillow==8.1.0 + pip>=8.0.3,<20.3 + python-slugify==4.0.1 + pytz>=2020.1 + pyyaml==5.3.1 +-requests==2.25.0 ++requests==2.25.1 + ruamel.yaml==0.15.100 + sqlalchemy==1.3.20 + voluptuous-serialize==2.4.0 + voluptuous==0.12.1 +-yarl==1.4.2 ++yarl==1.6.2 + zeroconf==0.28.8 + + pycryptodome>=3.6.6 +@@ -57,4 +57,3 @@ btlewrap>=0.0.10 + enum34==1000000000.0.0 + typing==1000000000.0.0 + uuid==1000000000.0.0 +- +diff --git a/requirements.txt b/requirements.txt +index cbe339fd83..d6fdcd1894 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -4,7 +4,7 @@ + aiohttp==3.7.1 + astral==1.10.1 + async_timeout==3.0.1 +-attrs==19.3.0 ++attrs==20.3.0 + bcrypt==3.1.7 + certifi>=2020.6.20 + ciso8601==2.1.3 +@@ -12,13 +12,13 @@ httpx==0.16.1 + importlib-metadata==1.6.0;python_version<'3.8' + jinja2>=2.11.2 + PyJWT==1.7.1 +-cryptography==3.2 ++cryptography==3.3.1 + pip>=8.0.3,<20.3 + python-slugify==4.0.1 + pytz>=2020.1 + pyyaml==5.3.1 +-requests==2.25.0 ++requests==2.25.1 + ruamel.yaml==0.15.100 + voluptuous==0.12.1 + voluptuous-serialize==2.4.0 +-yarl==1.4.2 ++yarl==1.6.2 +diff --git a/requirements_all.txt b/requirements_all.txt +index 8e3b891c2e..38ff5f789f 100644 +--- a/requirements_all.txt ++++ b/requirements_all.txt +@@ -1122,7 +1122,7 @@ pilight==0.1.1 + # homeassistant.components.seven_segments + # homeassistant.components.sighthound + # homeassistant.components.tensorflow +-pillow==7.2.0 ++pillow==8.1.0 + + # homeassistant.components.dominos + pizzapi==0.0.3 +diff --git a/requirements_test_all.txt b/requirements_test_all.txt +index 466c072f4a..dee71e94f2 100644 +--- a/requirements_test_all.txt ++++ b/requirements_test_all.txt +@@ -551,7 +551,7 @@ pilight==0.1.1 + # homeassistant.components.seven_segments + # homeassistant.components.sighthound + # homeassistant.components.tensorflow +-pillow==7.2.0 ++pillow==8.1.0 + + # homeassistant.components.plex + plexapi==4.2.0 +diff --git a/setup.py b/setup.py +index c9acb4d82d..51cfa03104 100755 +--- a/setup.py ++++ b/setup.py +@@ -35,7 +35,7 @@ REQUIRES = [ + "aiohttp==3.7.1", + "astral==1.10.1", + "async_timeout==3.0.1", +- "attrs==19.3.0", ++ "attrs==20.3.0", + "bcrypt==3.1.7", + "certifi>=2020.6.20", + "ciso8601==2.1.3", +@@ -44,16 +44,16 @@ REQUIRES = [ + "jinja2>=2.11.2", + "PyJWT==1.7.1", + # PyJWT has loose dependency. We want the latest one. +- "cryptography==3.2", ++ "cryptography==3.3.1", + "pip>=8.0.3,<20.3", + "python-slugify==4.0.1", + "pytz>=2020.1", + "pyyaml==5.3.1", +- "requests==2.25.0", ++ "requests==2.25.1", + "ruamel.yaml==0.15.100", + "voluptuous==0.12.1", + "voluptuous-serialize==2.4.0", +- "yarl==1.4.2", ++ "yarl==1.6.2", + ] + + MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER)) +-- +2.25.1 +