diff --git a/check_config/CHANGELOG.md b/check_config/CHANGELOG.md index df3b615..17981ed 100644 --- a/check_config/CHANGELOG.md +++ b/check_config/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.3.0 + +- Update base image to version 7.2.0 +- Add access to `share` folder for when using `whitelist_external_dirs` +- Fixes `fatal: unable to control: supervisor not listening` +- Show only top of the error log in add-on output +- Write full check config output to `/share/check_config.txt` +- Ensure service script does not crash when check config fails +- Hide pip version warning to avoid confusion + ## 3.2.0 - Update base image to version 7.1.0 diff --git a/check_config/build.json b/check_config/build.json index 2a4ad7d..04162ed 100644 --- a/check_config/build.json +++ b/check_config/build.json @@ -1,9 +1,9 @@ { "build_from": { - "aarch64": "homeassistant/aarch64-homeassistant-base:7.1.0", - "amd64": "homeassistant/amd64-homeassistant-base:7.1.0", - "armhf": "homeassistant/armhf-homeassistant-base:7.1.0", - "armv7": "homeassistant/armv7-homeassistant-base:7.1.0", - "i386": "homeassistant/i386-homeassistant-base:7.1.0" + "aarch64": "homeassistant/aarch64-homeassistant-base:7.2.0", + "amd64": "homeassistant/amd64-homeassistant-base:7.2.0", + "armhf": "homeassistant/armhf-homeassistant-base:7.2.0", + "armv7": "homeassistant/armv7-homeassistant-base:7.2.0", + "i386": "homeassistant/i386-homeassistant-base:7.2.0" } } diff --git a/check_config/config.json b/check_config/config.json index 51a18e0..ce623a5 100644 --- a/check_config/config.json +++ b/check_config/config.json @@ -1,6 +1,6 @@ { "name": "Check Home Assistant configuration", - "version": "3.2.0", + "version": "3.3.0", "slug": "check_config", "description": "Check current Home Assistant configuration against a new version", "url": "https://github.com/home-assistant/hassio-addons/tree/master/check_config", @@ -9,7 +9,7 @@ "startup": "once", "boot": "manual", "init": false, - "map": ["config", "ssl"], + "map": ["config", "ssl", "share:rw"], "options": { "version": "latest" }, diff --git a/check_config/rootfs/etc/services.d/check-config/finish b/check_config/rootfs/etc/services.d/check-config/finish index 41da5ed..4e3864c 100644 --- a/check_config/rootfs/etc/services.d/check-config/finish +++ b/check_config/rootfs/etc/services.d/check-config/finish @@ -2,4 +2,4 @@ # ============================================================================== # Take down the S6 supervision tree when config check is done # ============================================================================== -s6-svscanctl -t /var/run/s6/services \ No newline at end of file +s6-svscanctl -t /var/run/s6/services diff --git a/check_config/rootfs/etc/services.d/check-config/run b/check_config/rootfs/etc/services.d/check-config/run index a77e028..5a618e4 100644 --- a/check_config/rootfs/etc/services.d/check-config/run +++ b/check_config/rootfs/etc/services.d/check-config/run @@ -19,7 +19,7 @@ bashio::log.info "Installing Home Assistant: ${VERSION}..." bashio::log.info "Please be patient, this might take a few minutes..." # Install Home Assistant with the requested version -if ! PIP_OUTPUT="$(pip3 install --find-links "${WHEELS_LINKS}" "${CMD}")"; then +if ! PIP_OUTPUT="$(pip3 install --disable-pip-version-check --find-links "${WHEELS_LINKS}" "${CMD}")"; then bashio::log.error "An error occurred while installing Home Assistant:" bashio::log "${PIP_OUTPUT}" bashio::exit.nok @@ -33,20 +33,27 @@ cp -fr /config /tmp/config # Start configuration check bashio::log.info "Checking your configuration against this version..." -if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)"; then + +if ! hass -c /tmp/config --script check_config > /share/check_config.txt; then # The configuration check exited with an error bashio::log.error "The configuration check did not pass!" bashio::log.error "See the output below for more details." - bashio::log "${HASS_OUTPUT}" + + grep -v homeassistant.util.package /share/check_config.txt | head -n 15 + + bashio::log.info "The full output has been written to /share/check_config.txt" bashio::exit.nok fi # Scan configuration check output for occurrences of "ERROR" -if echo "${HASS_OUTPUT}" | grep -i ERROR > /dev/null; then +if grep -i ERROR /share/check_config.txt > /dev/null; then # An "ERROR" occurrence has been found, exit with an error bashio::log.error "Found an error in the log output of the check!" bashio::log.error "See the output below for more details." - bashio::log "${HASS_OUTPUT}" + + grep -i ERROR /share/check_config.txt + + bashio::log.info "The full output has been written to /share/check_config.txt" bashio::exit.nok fi