fix esphome 'configuration before the command' issue

This commit is contained in:
Andreas Billmeier 2021-08-08 08:14:54 +02:00 committed by Andreas Billmeier
parent 7578dd9339
commit 85c4275b3f
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
3 changed files with 134 additions and 0 deletions

View File

@ -1,6 +1,7 @@
AUX esphome.conf.d 349 BLAKE2B 54df063ef9805fd8de3eeb4f77331b22c256786817a305d9b3b8d1fcfb11a39b080a7630f70b5b36a2321446e18d54c67db94a64e3fe0d731b626734e2721148 SHA512 ea6e04b41ed7a885b239ff4547442f4589152ba612df040f950eafa85e31daf9a6791a2d93351401dc0ac633f62fd5f3c2c89f77c2d92ac94f7bf8d7ff92e5ff
AUX esphome.init.d-r1 605 BLAKE2B c6443e2a9730638bda08bda51638d4cd8ee965526ae0fdb04d74a1b376ea7b461d5925b0fe8cb35cc991709a824c1c942902cfbdbe99823b39bd80abf46ca5f3 SHA512 98ef2a6d5524152e24b04b1e644e5672e6bebee8b68fbcc37b46f403fdbf1de24547e394ce52281b6ff5711a987c56c9f55c36b9ae871433ca7a4d3fc6e19297
AUX esphome.init.d-r2 650 BLAKE2B 106e71245d76858dcd3deccfae0f4880053a39d7c280ca79a74adbf44ebff73c56fe7903a3dc1c1a3088d513be2e98c6edc2742ff137b384cbf088967395c09b SHA512 b983ca4b4645e5b79cab2804bc6fc0220a61e2b0234d6f7655c7eaef6cf507bc9791ec16843bee0767c9f3f0dbd88e28b93c39a9e945ca6a5e849dec5c58aa64
AUX esphome.init.d-r3 650 BLAKE2B dc3750f8749e6183d0496b575a46fc55430b89bf973c75bf83c91b688f67e458d828b116e207042797852d5340967609224b806dc09190f92b8ebdcbf55e5388 SHA512 48cbcc982e95ff4d4486edf8ca91f742026f1745f23e4339d01dca016461ff0da2c37ee1539a5750e2d0ee339408bfbe16ff4b8c6cb2dcbbd97e382b7f0759d3
DIST esphome-1.16.2.tar.gz 1299627 BLAKE2B ea294ac96c1e5b2528a48aed50e17abaf629b66bd0386cf1ad91d87cd32683ba11d9f288fb8505f10b7b4f3f41242916b918de97d891391b634a12140bed2960 SHA512 fbd042ce818f35612f4f3d2b10b629f249436b705a49c1ad1cbf6f69db1c699da1938a81b0e222ad786929f281e798981da470034dbc2be1a915fe24cc73413f
DIST esphome-1.17.2.tar.gz 1338970 BLAKE2B 4ec0524d56325b3137d4240f90776e23fe3895a0e9a0fd846cd2cb24834cc525f82bd3bdd282df2bb0da0e82496acddedbe00fc86a250aa4aab5a0db9ade4da1 SHA512 37c3eaed3ab42e174060d35f63a08de76e47ec27c3319b4a89a0efd9ed4cda190d56fc845b746bfeb3bd30a1d78cb6dd26e99ca7e1d0eca78f138dd510a5edca
DIST esphome-1.19.4.tar.gz 978617 BLAKE2B a4a39c64e00e7e102a07ee2b801b68960c4a1fba86f3a018a3de9c255fe991d98ad5df9f6c8f027d51dcbe11efcbe95d797998a66252a6e92d15a88faaa07a60 SHA512 684958ed92415b33d59c43c04d42db97f10735e4bfa936c70480f1fdb80b544738a4293b5c1ebf534137de8bfb543290f3afd939005df585a8736639e78b19ef
@ -10,6 +11,7 @@ EBUILD esphome-1.16.2.ebuild 3038 BLAKE2B b9d98f42fae14eb76e4d84a15260db85040f82
EBUILD esphome-1.17.2.ebuild 2824 BLAKE2B 097193d93e287a96885614b59970950ec2eaf67d3816047358e2351ec76930f7b52c7a7fe1e53a416947a6a87e05f91dd8b07712fd0196d4d4488d4ad11f6207 SHA512 2609553202c0d5b4064831abd49bdeac885631c9cf00b8e953963abec6f99d4ca3f1296e8e28fb43a61dbd9da5681a7dcf769430ca6bebe8bc023421cb15ec5a
EBUILD esphome-1.19.4.ebuild 3104 BLAKE2B ffbd16c2d4d8728814955d729ffd50a4ade1e1e3b8329395cdb1099219e2a654af7a38a56c35a2a5a757ee79efaafa938d9e2c6cfa3405fedebba52c2b92bf39 SHA512 a16c18e703b82948576da9aa176987b218ef763a6355599fabb1f5ef852b8818d0b5f8792955cceee18789bca1401cfdea3fa2b565c212c7f51585b278dc1c6a
EBUILD esphome-1.20.1.ebuild 2956 BLAKE2B 859a3bdb8d414cfc945d742e4f0d58ece240344883c39b8bc74ba8913b878274ce6288bcc2d00833a7917fb5f409d062225f90771fa4b386462585c8b5c246e4 SHA512 bcad5a83a47f8671c45e9f8c74a4860a140d52a544fd4b1d119f85c77bd732d5ca03c16ec9fb18741136a4f0df21fdf14f4e1870db4fad8213030b4c75376ba6
EBUILD esphome-1.20.4-r1.ebuild 2956 BLAKE2B 9c9c19bccb85bbaa3686363d5a83b4f5e71b5e236d0f97320c12d1ed2c8528bdabb7927eb00b0b0e6e9789004d1b87388e90d347f97bba01082d20d628b9f09b SHA512 b870452c88b7e7c47d737cb3706fa85c8956ef37c7647f22adc0b73108f47d92e993c548e2e7937a0de421a1265030016782973f3963dbde34912029da16489b
EBUILD esphome-1.20.4.ebuild 2956 BLAKE2B 2c6d67ea3c1c0ac5fdff633b0636c7daa8d116bc7a32d3597703adf31aca75251a42243d49dff1d67b6a26064c7c0f2c456f587f59e1e9ebbdfb69221a9b2843 SHA512 c6c8cde698eec457c4206c506e555ed3121c0a856b37c177d052daaea73c26d126a0add2cc039e8cda579bdf65ba71e9b5cdec30bf9b044f937fb74b7459040c
EBUILD esphome-9999.ebuild 3899 BLAKE2B b95184694faaced0b20ce5ae6059580d379dfc7df0c1ec63b2b4008c24dced09bdab2006fda17f32a7f37d56d87001b4b404517ab0ae69aee5d02fe68388a448 SHA512 b9fba1fb4ea6a9a52a1616869c9e582d115aa60ea404406ba53d54d8ae4eb80ec0fecd304c2cc32b3f213ad2f96fdab2ef6fa74d639c1c7dcbbc9d1e04fd8f2e
MISC metadata.xml 447 BLAKE2B abbb8e7fe21d59bb5dd077af1a58f2ca1e9ba399df38d2b6f16e64e0b363006c31908312aa03df6597ca69a4e85fdcebfbf02fbb56e5bf2b5a792109df29189f SHA512 df303f1b969fb49ea13f77adb2105ea86ed2f883b0936643134978408d5fc86d5b23b47d1e19101c800fa615c75c09248712077f8a8fb71f4c1cf5f4023cac26

View File

@ -0,0 +1,101 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_SINGLE_IMPL=1
inherit readme.gentoo-r1 distutils-r1
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/esphome/esphome.git"
EGIT_BRANCH="dev"
S="${WORKDIR}/${P}/"
else
MY_P=${P/_beta/b}
MY_PV=${PV/_beta/b}
SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}/"
fi
DESCRIPTION="Make creating custom firmwares for ESP32/ESP8266 super easy."
HOMEPAGE="https://github.com/esphome/esphome https://pypi.org/project/esphome/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 x86 ~amd64-linux ~x86-linux"
IUSE="+server test"
DOCS="README.md"
RDEPEND="
server? ( acct-group/${PN} acct-user/${PN} )
$(python_gen_cond_dep '
~dev-python/voluptuous-0.12.1[${PYTHON_USEDEP}]
~dev-python/pyyaml-5.4.1[${PYTHON_USEDEP}]
~dev-python/paho-mqtt-1.5.1[${PYTHON_USEDEP}]
~dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
server? ( ~www-servers/tornado-6.1[${PYTHON_USEDEP}] )
~dev-libs/protobuf-3.17.3
~dev-python/protobuf-python-3.17.3[${PYTHON_USEDEP}]
~dev-python/tzlocal-2.1[${PYTHON_USEDEP}]
~dev-python/pytz-2021.1[${PYTHON_USEDEP}]
~dev-python/pyserial-3.5[${PYTHON_USEDEP}]
server? ( ~dev-python/ifaddr-0.1.7[${PYTHON_USEDEP}] )
~dev-embedded/platformio-5.1.1
~dev-embedded/esptool-3.1[${PYTHON_USEDEP}]
~dev-python/click-7.1.2[${PYTHON_USEDEP}]
~dev-embedded/esphome-dashboard-20210728.0[${PYTHON_USEDEP}]
')"
BDEPEND="
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
test? (
dev-python/nose[${PYTHON_MULTI_USEDEP}]
dev-python/pytest[${PYTHON_MULTI_USEDEP}]
dev-python/pytest-cov[${PYTHON_MULTI_USEDEP}]
dev-python/pytest-mock[${PYTHON_MULTI_USEDEP}]
dev-python/pytest-asyncio[${PYTHON_MULTI_USEDEP}]
dev-python/asyncmock[${PYTHON_MULTI_USEDEP}]
dev-python/hypothesis[${PYTHON_MULTI_USEDEP}]
)
')"
DISABLE_AUTOFORMATTING=1
DOC_CONTENTS="
The ESPHome dashboard listens on port 6052
ESPHome configuration is in: /etc/${PN}
dashboard command line arguments are configured in: /etc/conf.d/${PN}
logging is to: /var/log/${PN}/{dashboard,warnings}.log
support at https://git.edevau.net/onkelbeh/HomeAssistantRepository
"
python_install_all() {
dodoc ${DOCS}
distutils-r1_python_install_all
if use server; then
keepdir "/etc/${PN}"
fowners -R "${PN}:${PN}" "/etc/${PN}"
keepdir "/var/log/${PN}"
fowners -R "${PN}:${PN}" "/var/log/${PN}"
newconfd "${FILESDIR}/${PN}.conf.d" "${PN}"
newinitd "${FILESDIR}/${PN}.init.d-r3" "${PN}"
readme.gentoo_create_doc
fi
}
pkg_postinst() {
if use server; then
readme.gentoo_print_elog
fi
}
python_test() {
nosetests --verbose || die
py.test -v -v || die
}

View File

@ -0,0 +1,31 @@
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="ESPHome dashboard"
command_user="esphome:esphome"
command="/usr/bin/esphome"
command_args="
dashboard
/etc/esphome
${ESPHOME_OPTS}
"
output_log="/var/log/esphome/stdout.log"
error_log="/var/log/esphome/dashboard.log"
command_background=yes
pidfile=/run/esphome.pid
depend() {
need net
after bootmisc
}
start_pre() {
checkpath --file --owner $command_user --mode 0644 $output_log
checkpath --file --owner $command_user --mode 0644 $error_log
export ESPHOME_DASHBOARD_USE_PING="true"
}