diff --git a/Makefile b/Makefile index d2404658c..2b5ec347f 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ $(TARGETS_CONFIG): %-config: $(TARGETS): %: $(RELEASE_DIR) %-config @echo "build $@" $(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV) - cp -f $(O)/images/hassos_* $(RELEASE_DIR)/ + cp -f $(O)/images/haos_* $(RELEASE_DIR)/ # Do not clean when building for one target ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1) diff --git a/buildroot-external/meta b/buildroot-external/meta index 7ed6c0ca1..0d8af5fd6 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -2,6 +2,6 @@ VERSION_MAJOR=6 VERSION_BUILD=0 HASSOS_NAME="Home Assistant OS" -HASSOS_ID="hassos" +HASSOS_ID="haos" DEPLOYMENT="development" diff --git a/buildroot-external/ota/rauc-hook b/buildroot-external/ota/rauc-hook index f49847a60..3dc3d8fb1 100755 --- a/buildroot-external/ota/rauc-hook +++ b/buildroot-external/ota/rauc-hook @@ -2,7 +2,28 @@ ## # Hooks -env + +case "$1" in + install-check) + if [ "$RAUC_MF_COMPATIBLE" = "$RAUC_SYSTEM_COMPATIBLE" ]; then + exit 0 + fi + # Be compatible with hassos OS ID + # shellcheck disable=SC2039 + rauc_os_compatible=${RAUC_MF_COMPATIBLE/haos-/hassos-} + if [ "$rauc_os_compatible" = "$RAUC_SYSTEM_COMPATIBLE" ]; then + exit 0 + fi + echo "Compatible does not match!" 1>&2 + exit 10 + ;; + slot-install) + # Use install handlers below + ;; + *) + exit 1 + ;; +esac # Handle boot hocks if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then diff --git a/buildroot-external/scripts/ota.sh b/buildroot-external/scripts/ota.sh index 21c7c587f..1959dd777 100755 --- a/buildroot-external/scripts/ota.sh +++ b/buildroot-external/scripts/ota.sh @@ -32,6 +32,7 @@ function create_ota_update() { echo "version=$(hassos_version)" echo "[hooks]" echo "filename=hook" + echo "hooks=install-check" echo "[image.boot]" echo "filename=boot.vfat" echo "hooks=install" diff --git a/buildroot-external/scripts/post-build.sh b/buildroot-external/scripts/post-build.sh index e6cddf977..f72e01029 100755 --- a/buildroot-external/scripts/post-build.sh +++ b/buildroot-external/scripts/post-build.sh @@ -26,7 +26,7 @@ install_hassos_cli echo "ID=${HASSOS_ID}" echo "VERSION_ID=$(hassos_version)" echo "PRETTY_NAME=\"${HASSOS_NAME} $(hassos_version)\"" - echo "CPE_NAME=cpe:2.3:o:home_assistant:${HASSOS_ID}:$(hassos_version):*:${DEPLOYMENT}:*:*:*:${BOARD_ID}:*" + echo "CPE_NAME=cpe:2.3:o:home-assistant:${HASSOS_ID}:$(hassos_version):*:${DEPLOYMENT}:*:*:*:${BOARD_ID}:*" echo "HOME_URL=https://hass.io/" echo "VARIANT=\"${HASSOS_NAME} ${BOARD_NAME}\"" echo "VARIANT_ID=${BOARD_ID}"