diff options
author | BrainDamage | 2023-05-26 07:18:58 +0200 |
---|---|---|
committer | BrainDamage | 2023-05-26 07:18:58 +0200 |
commit | e257f7298a4e79b60a53ccff087b3be219cdd457 (patch) | |
tree | 6e5d4cf8979cb13ea66ee91b8f33cb1632c3521b | |
parent | e07febe8cf8880889e209a8e8b97d9bcfaf12fd4 (diff) | |
download | aur-e257f7298a4e79b60a53ccff087b3be219cdd457.tar.gz |
fixed cache paths to be consistent
unpinned dependency versions
cleaned up the scripts a bit
added more dependencies to avoid rebuilding half of python
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | hass-update.service | 24 | ||||
-rw-r--r-- | hass.env | 1 | ||||
-rw-r--r-- | hass.service | 6 |
5 files changed, 59 insertions, 20 deletions
@@ -1,40 +1,54 @@ pkgbase = home-assistant-service-pip pkgdesc = Self installing package of Home Assistant using pip - pkgver = 6 - pkgrel = 2 + pkgver = 8 + pkgrel = 1 url = https://home-assistant.io/ install = hass.install arch = any license = APACHE depends = gcc + depends = pkgconf + depends = python-aiodiscover depends = python-aiohttp depends = python-aiohttp-cors depends = python-astral depends = python-async-timeout + depends = python-atomicwrites depends = python-attrs depends = python-awesomeversion depends = python-bcrypt + depends = python-build depends = python-certifi depends = python-ciso8601 depends = python-cryptography + depends = python-dateutil depends = python-defusedxml + depends = python-fnvhash + depends = python-home-assistant-bluetooth depends = python-httpx + depends = python-ifaddr + depends = python-installer depends = python-jinja + depends = python-lru-dict depends = python-mutagen + depends = python-orjson depends = python-pillow depends = python-pip + depends = python-pynacl depends = python-pyjwt depends = python-pytz depends = python-requests depends = python-ruamel-yaml depends = python-slugify depends = python-sqlalchemy + depends = python-typing_extensions depends = python-voluptuous depends = python-voluptuous-serialize depends = python-wheel depends = python-yaml depends = python-yarl depends = python-zeroconf + depends = python-setuptools depends = python depends = rust optdepends = net-tools: Nmap host discovery @@ -46,10 +60,10 @@ pkgbase = home-assistant-service-pip source = hass.sysusers source = hass.tmpfiles source = hass.env - sha256sums = 927203a5ef14fa74ff14e089a31ee9f24b750b4b939ef402f350b85df976f6dd - sha256sums = f1a47e94b6c85571dc2a2aec8a917f85692f77d7c4ff3063f4676c5b062988c8 + sha256sums = c4d15648e7e325b6f695c528912ec6f440064efde44715d81a8f3dd6d4210ef8 + sha256sums = 2f1ad3bfa518a12695265463790bdf30b9389312f0194d601723a05036948f50 sha256sums = ee49a7bb8ce2cf2bb34f53708d205aea4e16c25c1cb9d3925d562286ab499852 sha256sums = ac019d391343821e63039b0f55eb7d5129acb3e3a04e7c3fb47870a773e3079b - sha256sums = 635bd69c105ee08fe3b60c613519dcc10833288c9c04536dbe0dedf50f3e12d0 + sha256sums = 6532f9bd1027f7c40f825d95d6cf5b7ca0ea8be9c71c173f02490a49e07572f4 pkgname = home-assistant-service-pip @@ -1,41 +1,55 @@ pkgname=home-assistant-service-pip _serviceName=hass pkgdesc='Self installing package of Home Assistant using pip' -pkgver=6 -pkgrel=2 +pkgver=8 +pkgrel=1 arch=('any') url='https://home-assistant.io/' license=(APACHE) depends=( gcc + pkgconf + python-aiodiscover python-aiohttp python-aiohttp-cors python-astral python-async-timeout + python-atomicwrites python-attrs python-awesomeversion python-bcrypt + python-build python-certifi python-ciso8601 python-cryptography + python-dateutil python-defusedxml + python-fnvhash + python-home-assistant-bluetooth python-httpx + python-ifaddr + python-installer python-jinja + python-lru-dict python-mutagen + python-orjson python-pillow python-pip + python-pynacl python-pyjwt python-pytz python-requests python-ruamel-yaml python-slugify python-sqlalchemy + python-typing_extensions python-voluptuous python-voluptuous-serialize python-wheel python-yaml python-yarl python-zeroconf + python-setuptools python rust ) @@ -44,11 +58,11 @@ optdepends=( 'openzwave: Z-Wave integration' ) source=("${_serviceName}.service" "${_serviceName}-update.service" "${_serviceName}.sysusers" "${_serviceName}.tmpfiles" "${_serviceName}.env") -sha256sums=('927203a5ef14fa74ff14e089a31ee9f24b750b4b939ef402f350b85df976f6dd' - 'f1a47e94b6c85571dc2a2aec8a917f85692f77d7c4ff3063f4676c5b062988c8' +sha256sums=('c4d15648e7e325b6f695c528912ec6f440064efde44715d81a8f3dd6d4210ef8' + '2f1ad3bfa518a12695265463790bdf30b9389312f0194d601723a05036948f50' 'ee49a7bb8ce2cf2bb34f53708d205aea4e16c25c1cb9d3925d562286ab499852' 'ac019d391343821e63039b0f55eb7d5129acb3e3a04e7c3fb47870a773e3079b' - '635bd69c105ee08fe3b60c613519dcc10833288c9c04536dbe0dedf50f3e12d0') + '6532f9bd1027f7c40f825d95d6cf5b7ca0ea8be9c71c173f02490a49e07572f4') backup=("etc/${_serviceName}.env") install="${_serviceName}.install" provides=('home-assistant') diff --git a/hass-update.service b/hass-update.service index bb2d118cb562..b158c264559e 100644 --- a/hass-update.service +++ b/hass-update.service @@ -8,8 +8,9 @@ Group=hass LogsDirectory=hass StateDirectory=hass hass-installation CacheDirectory=hass -Environment=CARGO_HOME=%C/hass/cargo -Environment=PYTHON_EGG_CACHE=%C/hass/python-eggs +Environment=XDG_CACHE_HOME=%C/hass +Environment=CARGO_HOME=${XDG_CACHE_HOME}/cargo +Environment=PYTHON_EGG_CACHE=${XDG_CACHE_HOME}/python-eggs Environment=VIRTUAL_ENV=%S/hass-installation WorkingDirectory=~ @@ -19,15 +20,26 @@ Type=oneshot # install or upgrade the python venv, we want ExecStart=python -m venv --system-site-packages --upgrade "${VIRTUAL_ENV}" -# upgrade home assistant and all its necessary libs +# install/upgrade home assistant and all its necessary libs ExecStart=%S/hass-installation/bin/pip install --no-warn-script-location --upgrade homeassistant +# delete old site packages from old versions of python ExecStart=sh -c '\ + baseVenvLib=$(%S/hass-installation/bin/python -c "import os.path as path; import site; print(path.dirname(path.dirname(site.getsitepackages()[0])))"); \ + curSitePackagesRel=$(%S/hass-installation/bin/python -c "import os.path as path; import site; print(path.basename(path.dirname(path.relpath(site.getsitepackages()[0],\'${VIRTUAL_ENV}/lib\'))))"); \ + echo "keeping ${curSitePackagesRel} out of "${baseVenvLib}"; \ find \ - $(%S/hass-installation/bin/python -c "import os.path as path; import site; print(path.dirname(path.dirname(site.getsitepackages()[0])))") -mindepth 1 -type d \ - -path $(%S/hass-installation/bin/python -c "import os.path as path; import site; print(path.basename(path.dirname(path.relpath(site.getsitepackages()[0],'${VIRTUAL_ENV}/lib'))))") -prune \ + "${baseVenvLib}" -mindepth 1 -type d \ + -path "${curSitePackagesRel}" -prune \ -print0 \ | xargs --no-run-if-empty -0 rm --verbose --recursive' - +# remove pinned dependencies +ExecStart=sh -c '\ + sitePackages=$(%S/hass-installation/bin/python -c "import os.path as path; import site; print(site.getsitepackages()[0])"); \ + find \ + "${sitePackages}/homeassistant" \ + -name "package_constraints.txt" \ + -o -name "manifest.json" \ + -exec sed -i "s/==/>=/g" {} \;' LockPersonality=true RestrictRealtime=true @@ -1,3 +1,2 @@ # set to the number of jobs for the machine # Environment=MAKEFLAGS="-j4" -# Environment=NPY_NUM_BUILD_JOBS="4"
\ No newline at end of file diff --git a/hass.service b/hass.service index 94695b02a7f3..a6e941c64d54 100644 --- a/hass.service +++ b/hass.service @@ -11,10 +11,10 @@ Group=hass LogsDirectory=hass StateDirectory=hass hass-installation CacheDirectory=hass -Environment=CARGO_HOME=%C/hass/cargo -Environment=PYTHON_EGG_CACHE=%C/hass/python-eggs -Environment=VIRTUAL_ENV=%S/hass-installation Environment=XDG_CACHE_HOME=%C/hass +Environment=CARGO_HOME=${XDG_CACHE_HOME}/cargo +Environment=PYTHON_EGG_CACHE=${XDG_CACHE_HOME}/python-eggs +Environment=VIRTUAL_ENV=%S/hass-installation WorkingDirectory=~ EnvironmentFile=-/etc/hass.env |