From 2f47f9aa9b7401c1a7325de03802a3a48ae8806a Mon Sep 17 00:00:00 2001 From: pvizeli Date: Thu, 6 Apr 2017 11:52:28 +0200 Subject: [PATCH] Split build stuff to new repo --- hassio_api/README.md => API.md | 0 build-scripts/README.md | 35 -- build-scripts/docker-build-env/Dockerfile | 29 -- .../docker-build-env/create_build_env.sh | 31 -- build-scripts/docker-build-env/run-docker.sh | 76 ---- build-scripts/hassio-supervisor/create_all.sh | 15 - .../create_hassio_supervisor.sh | 76 ---- .../homeassistant/create_homeassistant.sh | 79 ---- .../resinhup-build/create_resinhup.sh | 86 ----- build-scripts/resinos-build/README.md | 5 - build-scripts/resinos-build/create_resinos.sh | 148 -------- build-scripts/yocto-build-env/Dockerfile | 58 --- .../yocto-build-env/create_build_env.sh | 31 -- build-scripts/yocto-build-env/run-resinos.sh | 68 ---- {hassio_api/hassio => hassio}/__init__.py | 0 {hassio_api/hassio => hassio}/__main__.py | 0 {hassio_api/hassio => hassio}/api/__init__.py | 0 .../hassio => hassio}/api/homeassistant.py | 0 {hassio_api/hassio => hassio}/api/host.py | 0 {hassio_api/hassio => hassio}/api/network.py | 0 .../hassio => hassio}/api/supervisor.py | 0 {hassio_api/hassio => hassio}/api/util.py | 0 {hassio_api/hassio => hassio}/bootstrap.py | 0 {hassio_api/hassio => hassio}/config.py | 0 {hassio_api/hassio => hassio}/const.py | 0 {hassio_api/hassio => hassio}/core.py | 0 .../hassio => hassio}/dock/__init__.py | 0 .../hassio => hassio}/dock/homeassistant.py | 0 .../hassio => hassio}/dock/supervisor.py | 0 .../hassio => hassio}/host_controll.py | 0 {hassio_api/hassio => hassio}/scheduler.py | 0 {hassio_api/hassio => hassio}/tools.py | 0 hassio_api/.pylint.d/hassio1.stats | Bin 1504 -> 0 bytes homeassistant/Dockerfile | 34 -- meta-hassio/conf/layer.conf | 10 - .../docker-resin-supervisor-disk.bbappend | 23 -- .../start-resin-supervisor | 22 -- .../supervisor.conf | 6 - .../update-resin-supervisor | 128 ------- .../recipes-core/dropbear/dropbear_%.bbappend | 38 -- .../dropbear/files/sync-authorized-keys | 11 - .../files/sync-authorized-keys.service | 13 - .../packagegroup-resin-connectivity.bbappend | 2 - .../packagegroups/packagegroup-resin.bbappend | 4 - .../hassio-host-controll.bb | 39 -- .../hassio-host-controll/hassio-hc | 51 --- .../hassio-host-controll/hassio-hc.service | 11 - .../resin-device-progress.bbappend | 2 - .../resin-device-progress | 5 - .../resin-device-register.bbappend | 2 - .../resin-device-register | 5 - .../resin-device-uuid.bbappend | 2 - .../resin-device-uuid/resin-device-uuid | 5 - .../resin-mounts/resin-mounts.bbappend | 17 - .../resin-mounts/home-root-.ssh.mount | 14 - .../resin-vars/resin-vars.bbappend | 2 - .../resin-vars/resin-vars/resin-vars | 60 --- .../resinhup/resinhup.bbappend | 9 - .../resinhup/resinhup/resinhup | 346 ------------------ hassio_api/pylintrc => pylintrc | 0 hassio_api/setup.py => setup.py | 0 supervisor/Dockerfile | 20 - supervisor/README.md | 20 - hassio_api/tox.ini => tox.ini | 0 64 files changed, 1638 deletions(-) rename hassio_api/README.md => API.md (100%) delete mode 100644 build-scripts/README.md delete mode 100644 build-scripts/docker-build-env/Dockerfile delete mode 100755 build-scripts/docker-build-env/create_build_env.sh delete mode 100755 build-scripts/docker-build-env/run-docker.sh delete mode 100755 build-scripts/hassio-supervisor/create_all.sh delete mode 100755 build-scripts/hassio-supervisor/create_hassio_supervisor.sh delete mode 100755 build-scripts/homeassistant/create_homeassistant.sh delete mode 100755 build-scripts/resinhup-build/create_resinhup.sh delete mode 100644 build-scripts/resinos-build/README.md delete mode 100755 build-scripts/resinos-build/create_resinos.sh delete mode 100644 build-scripts/yocto-build-env/Dockerfile delete mode 100755 build-scripts/yocto-build-env/create_build_env.sh delete mode 100755 build-scripts/yocto-build-env/run-resinos.sh rename {hassio_api/hassio => hassio}/__init__.py (100%) rename {hassio_api/hassio => hassio}/__main__.py (100%) rename {hassio_api/hassio => hassio}/api/__init__.py (100%) rename {hassio_api/hassio => hassio}/api/homeassistant.py (100%) rename {hassio_api/hassio => hassio}/api/host.py (100%) rename {hassio_api/hassio => hassio}/api/network.py (100%) rename {hassio_api/hassio => hassio}/api/supervisor.py (100%) rename {hassio_api/hassio => hassio}/api/util.py (100%) rename {hassio_api/hassio => hassio}/bootstrap.py (100%) rename {hassio_api/hassio => hassio}/config.py (100%) rename {hassio_api/hassio => hassio}/const.py (100%) rename {hassio_api/hassio => hassio}/core.py (100%) rename {hassio_api/hassio => hassio}/dock/__init__.py (100%) rename {hassio_api/hassio => hassio}/dock/homeassistant.py (100%) rename {hassio_api/hassio => hassio}/dock/supervisor.py (100%) rename {hassio_api/hassio => hassio}/host_controll.py (100%) rename {hassio_api/hassio => hassio}/scheduler.py (100%) rename {hassio_api/hassio => hassio}/tools.py (100%) delete mode 100644 hassio_api/.pylint.d/hassio1.stats delete mode 100644 homeassistant/Dockerfile delete mode 100644 meta-hassio/conf/layer.conf delete mode 100644 meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend delete mode 100644 meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor delete mode 100644 meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf delete mode 100644 meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/update-resin-supervisor delete mode 100644 meta-hassio/recipes-core/dropbear/dropbear_%.bbappend delete mode 100644 meta-hassio/recipes-core/dropbear/files/sync-authorized-keys delete mode 100644 meta-hassio/recipes-core/dropbear/files/sync-authorized-keys.service delete mode 100644 meta-hassio/recipes-core/packagegroups/packagegroup-resin-connectivity.bbappend delete mode 100644 meta-hassio/recipes-core/packagegroups/packagegroup-resin.bbappend delete mode 100644 meta-hassio/recipes-support/hassio-host-controll/hassio-host-controll.bb delete mode 100644 meta-hassio/recipes-support/hassio-host-controll/hassio-host-controll/hassio-hc delete mode 100644 meta-hassio/recipes-support/hassio-host-controll/hassio-host-controll/hassio-hc.service delete mode 100644 meta-hassio/recipes-support/resin-device-progress/resin-device-progress.bbappend delete mode 100644 meta-hassio/recipes-support/resin-device-progress/resin-device-progress/resin-device-progress delete mode 100644 meta-hassio/recipes-support/resin-device-register/resin-device-register.bbappend delete mode 100644 meta-hassio/recipes-support/resin-device-register/resin-device-register/resin-device-register delete mode 100644 meta-hassio/recipes-support/resin-device-uuid/resin-device-uuid.bbappend delete mode 100644 meta-hassio/recipes-support/resin-device-uuid/resin-device-uuid/resin-device-uuid delete mode 100644 meta-hassio/recipes-support/resin-mounts/resin-mounts.bbappend delete mode 100644 meta-hassio/recipes-support/resin-mounts/resin-mounts/home-root-.ssh.mount delete mode 100644 meta-hassio/recipes-support/resin-vars/resin-vars.bbappend delete mode 100644 meta-hassio/recipes-support/resin-vars/resin-vars/resin-vars delete mode 100644 meta-hassio/recipes-support/resinhup/resinhup.bbappend delete mode 100644 meta-hassio/recipes-support/resinhup/resinhup/resinhup rename hassio_api/pylintrc => pylintrc (100%) rename hassio_api/setup.py => setup.py (100%) delete mode 100644 supervisor/Dockerfile delete mode 100644 supervisor/README.md rename hassio_api/tox.ini => tox.ini (100%) diff --git a/hassio_api/README.md b/API.md similarity index 100% rename from hassio_api/README.md rename to API.md diff --git a/build-scripts/README.md b/build-scripts/README.md deleted file mode 100644 index f7c29f990..000000000 --- a/build-scripts/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Build Server - -You need a linux with [AUFS](https://docs.docker.com/engine/userguide/storagedriver/aufs-driver/) and docker support. You need to have the build user in docker group for he can run docker. It is not possible to run this process as root! You need also install `jq` - -Builds are published on: https://hub.docker.com/r/pvizeli/ - -## Build env - -- yocto-build-env: Allow us to build yocto resinos images -- docker-build-env: Allow us to build docker image for all archs -- resinhup-build: Create docker image for inplace update perform -- resinos-build: Create image for SD and docker for inplace update -- hassio-supervisor: Create our supervisor update -- homeassistant: Create docker image with homeassistant - - -## Create a server - -First install ubuntu server 16.04. - -Follow install instruction from docker to install it: -https://docs.docker.com/engine/installation/linux/ubuntu/ - -After that move the `builder` user into docker group. -``` -sudo groupadd docker -sudo gpasswd -a ${USER} docker -sudo service docker restart -newgrp docker -``` - -Other software: -``` -sudo apt-get install jq pigz -``` diff --git a/build-scripts/docker-build-env/Dockerfile b/build-scripts/docker-build-env/Dockerfile deleted file mode 100644 index 7d5756dce..000000000 --- a/build-scripts/docker-build-env/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM ubuntu:16.04 - -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 - -# Install docker -# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - software-properties-common \ - && rm -rf /var/lib/apt/lists/* -VOLUME /var/lib/docker -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -RUN apt-get update && apt-get install -y \ - docker-ce \ - && rm -rf /var/lib/apt/lists/* - -# setup arm binary support -RUN apt-get update && apt-get install -y \ - qemu-user-static \ - binfmt-support \ - && rm -rf /var/lib/apt/lists/* - -COPY run-docker.sh / - -WORKDIR /docker diff --git a/build-scripts/docker-build-env/create_build_env.sh b/build-scripts/docker-build-env/create_build_env.sh deleted file mode 100755 index fe1fb1388..000000000 --- a/build-scripts/docker-build-env/create_build_env.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -ev - -DOCKER_REPO=pvizeli -DOCKER_IMAGE=docker-build-env - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -# Sanity checks -if [ "$#" -ne 1 ]; then - echo "Usage: create_build_env.sh [ | NONE]" - exit 1 -fi - -DOCKER_TAG=$1 - -# Build -docker build --pull --tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} -f ${SCRIPTPATH}/Dockerfile ${SCRIPTPATH} - -# Tag -docker tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_REPO}/${DOCKER_IMAGE}:latest - -if [ ${DOCKER_TAG} != "NONE" ]; then - # push - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:latest -fi diff --git a/build-scripts/docker-build-env/run-docker.sh b/build-scripts/docker-build-env/run-docker.sh deleted file mode 100755 index 70a6e3fc1..000000000 --- a/build-scripts/docker-build-env/run-docker.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -set -e - -DOCKER_TIMEOUT=20 # Wait 20 seconds for docker to start - -cleanup() { - echo "[INFO] Running cleanup..." - - # Stop docker gracefully - echo "[INFO] Stopping in container docker..." - DOCKERPIDFILE=/var/run/docker.pid - if [ -f $DOCKERPIDFILE ] && [ -s $DOCKERPIDFILE ] && ps $(cat $DOCKERPIDFILE) | grep -q docker; then - kill $(cat $DOCKERPIDFILE) - # Now wait for it to die - STARTTIME=$(date +%s) - ENDTIME=$(date +%s) - while [ -f $DOCKERPIDFILE ] && [ -s $DOCKERPIDFILE ] && ps $(cat $DOCKERPIDFILE) | grep -q docker; do - if [ $(($ENDTIME - $STARTTIME)) -le $DOCKER_TIMEOUT ]; then - sleep 1 - ENDTIME=$(date +%s) - else - echo "[ERROR] Timeout while waiting for in container docker to die." - exit 1 - fi - done - else - echo "[WARN] Can't stop docker container." - echo "[WARN] Your host might have been left with unreleased resources (ex. loop devices)." - fi - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Start docker -echo "[INFO] Setup qemu-arm." -mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc -update-binfmts --enable qemu-arm -update-binfmts --enable qemu-aarch64 - -# Start docker -echo "[INFO] Starting docker." -dockerd 2> /dev/null & -echo "[INFO] Waiting for docker to initialize..." -STARTTIME=$(date +%s) -ENDTIME=$(date +%s) -until docker info >/dev/null 2>&1; do - if [ $(($ENDTIME - $STARTTIME)) -le $DOCKER_TIMEOUT ]; then - sleep 1 - ENDTIME=$(date +%s) - else - echo "[ERROR] Timeout while waiting for docker to come up." - exit 1 - fi -done -echo "[INFO] Docker was initialized." - -# Start barys with all the arguments requested -echo "[INFO] Running build..." -# Build -docker build --pull --tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} . -# Tag -docker tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_REPO}/${DOCKER_IMAGE}:latest - -echo "[INFO] Push image" -if [ ${DOCKER_TAG} != "NONE" ]; then - # push - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:latest -fi - -cleanup -exit 0 diff --git a/build-scripts/hassio-supervisor/create_all.sh b/build-scripts/hassio-supervisor/create_all.sh deleted file mode 100755 index 81fe5cf89..000000000 --- a/build-scripts/hassio-supervisor/create_all.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -# Sanity checks -if [ "$#" -ne 1 ]; then - echo "Usage: create_all.sh |NONE" - echo "Optional environment: BUILD_DIR" - exit 1 -fi - -for arch in "armhf" "aarch64" "i386" "amd64" -do - ./create_hassio_supervisor.sh $arch $1 -done diff --git a/build-scripts/hassio-supervisor/create_hassio_supervisor.sh b/build-scripts/hassio-supervisor/create_hassio_supervisor.sh deleted file mode 100755 index 6286519b2..000000000 --- a/build-scripts/hassio-supervisor/create_hassio_supervisor.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -set -e - -BUILD_CONTAINER_NAME=hassio-build-$$ -DOCKER_REPO=pvizeli - -cleanup() { - echo "[INFO] Cleanup." - - # Stop docker container - echo "[INFO] Cleaning up hassio-build container." - docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true - docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Sanity checks -if [ "$#" -ne 2 ]; then - echo "Usage: create_hassio_supervisor.sh |NONE" - echo "Optional environment: BUILD_DIR" - exit 1 -fi -if [ $1 != 'armhf' ] && [ $1 != 'aarch64' ] && [ $1 != 'i386' ] && [ $1 != 'amd64' ]; then - echo "Error: $1 is not a supported platform for hassio-supervisor!" - exit 1 -fi - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -ARCH=$1 -BASE_IMAGE="resin\/${ARCH}-alpine:3.5" -DOCKER_TAG=$2 -DOCKER_IMAGE=${ARCH}-hassio-supervisor -BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH} -WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/hassio-supervisor - -# setup docker -echo "[INFO] Setup docker for supervisor" -mkdir -p $BUILD_DIR -mkdir -p $WORKSPACE - -cp ../../supervisor/Dockerfile $WORKSPACE/Dockerfile -sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile -sed -i "s/%%SUPERVISOR_TAG%%/${DOCKER_TAG}/g" $WORKSPACE/Dockerfile - -cp -r ../../hassio_api $WORKSPACE/ - -# Run build -echo "[INFO] start docker build" -docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true -docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true -docker run --rm \ - -v $WORKSPACE:/docker \ - -v ~/.docker:/root/.docker \ - -e DOCKER_REPO=$DOCKER_REPO \ - -e DOCKER_IMAGE=$DOCKER_IMAGE \ - -e DOCKER_TAG=$DOCKER_TAG \ - --name $BUILD_CONTAINER_NAME \ - --privileged \ - pvizeli/docker-build-env \ - /run-docker.sh - -echo "[INFO] cleanup WORKSPACE" -cd $BUILD_DIR -rm -rf $WORKSPACE - -cleanup -exit 0 diff --git a/build-scripts/homeassistant/create_homeassistant.sh b/build-scripts/homeassistant/create_homeassistant.sh deleted file mode 100755 index c8968dd21..000000000 --- a/build-scripts/homeassistant/create_homeassistant.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -set -e - -BUILD_CONTAINER_NAME=homeassistant-build-$$ -DOCKER_REPO=pvizeli - -cleanup() { - echo "[INFO] Cleanup." - - # Stop docker container - echo "[INFO] Cleaning up homeassistant-build container." - docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true - docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Sanity checks -if [ "$#" -ne 2 ]; then - echo "Usage: create_homeassistant.sh " - echo "Optional environment: BUILD_DIR" - exit 1 -fi - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -HASS_VERS=$1 -MACHINE=$2 -BASE_IMAGE="resin\/${MACHINE}-alpine-python:3.6" -DOCKER_TAG=$1 -DOCKER_IMAGE=${MACHINE}-homeassistant -BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH} -WORKSPACE=${BUILD_DIR}/hass -HASS_GIT=${BUILD_DIR}/hass_git - -# setup docker -echo "[INFO] Setup docker for homeassistant" -mkdir -p $BUILD_DIR -mkdir -p $WORKSPACE - -echo "[INFO] load homeassistant" -cp ../../homeassistant/Dockerfile $WORKSPACE/Dockerfile - -sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile -sed -i "s/%%HASS_VERSION%%/${HASS_VERS}/g" $WORKSPACE/Dockerfile - -git https://github.com/home-assistant/home-assistant $HASS_GIT -cd $HASS_GIT && git checkout $HASS_VERS -cp $HASS_GIT/requirements.txt $WORKSPACE/ - -# Run build -echo "[INFO] start docker build" -docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true -docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true -docker run --rm \ - -v $WORKSPACE:/docker \ - -v ~/.docker:/root/.docker \ - -e DOCKER_REPO=$DOCKER_REPO \ - -e DOCKER_IMAGE=$DOCKER_IMAGE \ - -e DOCKER_TAG=$DOCKER_TAG \ - --name $BUILD_CONTAINER_NAME \ - --privileged \ - pvizeli/docker-build-env \ - /run-docker.sh - -echo "[INFO] cleanup WORKSPACE" -cd $BUILD_DIR -rm -rf $WORKSPACE -rm -rf $HASS_GIT - -cleanup -exit 0 diff --git a/build-scripts/resinhup-build/create_resinhup.sh b/build-scripts/resinhup-build/create_resinhup.sh deleted file mode 100755 index 7ff7f31b4..000000000 --- a/build-scripts/resinhup-build/create_resinhup.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -set -e - -BUILD_CONTAINER_NAME=resinhup-build-$$ -DOCKER_REPO=pvizeli - -cleanup() { - echo "[INFO] Cleanup." - - # Stop docker container - echo "[INFO] Cleaning up homeassistant-build container." - docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true - docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Sanity checks -if [ "$#" -ne 2 ]; then - echo "Usage: create_resinhup.sh " - echo "Optional environment: BUILD_DIR" - exit 1 -fi - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -MACHINE=$2 -RESINHUP_VER=$1 -BASE_IMAGE="resin\/${MACHINE}-python:3.6" -DOCKER_TAG=${MACHINE}-${RESINHUP_VER} -DOCKER_IMAGE=resinhup -BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH} -WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/resinhup - -# evaluate git repo and arch -case $MACHINE in - "raspberrypi3") - DOCKER_FILE_NAME="Dockerfile.raspberrypi3" - ;; - "raspberrypi2") - DOCKER_FILE_NAME="Dockerfile.raspberryp-pi2" - ;; - "raspberrypi") - DOCKER_FILE_NAME="Dockerfile.raspberry-pi" - ;; - *) - echo "[ERROR] ${MACHINE} unknown!" - exit 1 - ;; -esac - -# setup docker -echo "[INFO] Setup workspace" -mkdir -p $BUILD_DIR - -git clone https://github.com/pvizeli/resinhup $WORKSPACE -cd $WORKSPACE && cp $DOCKER_FILE_NAME Dockerfile - -# Run build -echo "[INFO] start docker build" -docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true -docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true -docker run --rm \ - -v $WORKSPACE:/docker \ - -v ~/.docker:/root/.docker \ - -e DOCKER_REPO=$DOCKER_REPO \ - -e DOCKER_IMAGE=$DOCKER_IMAGE \ - -e DOCKER_TAG=$DOCKER_TAG \ - --name $BUILD_CONTAINER_NAME \ - --privileged \ - pvizeli/docker-build-env \ - /run-docker.sh - -echo "[INFO] cleanup WORKSPACE" -cd $BUILD_DIR -rm -rf $WORKSPACE - -cleanup -exit 0 diff --git a/build-scripts/resinos-build/README.md b/build-scripts/resinos-build/README.md deleted file mode 100644 index df3baa2ea..000000000 --- a/build-scripts/resinos-build/README.md +++ /dev/null @@ -1,5 +0,0 @@ - -## Possible problems - -### Boost -Some times it can fail on boost build. In this case you need run `bitbake boost` inside build env. After that it work diff --git a/build-scripts/resinos-build/create_resinos.sh b/build-scripts/resinos-build/create_resinos.sh deleted file mode 100755 index a90b148fe..000000000 --- a/build-scripts/resinos-build/create_resinos.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/bin/bash - -set -e - -BUILD_CONTAINER_NAME=yocto-build-$$ -DOCKER_REPO=pvizeli - -cleanup() { - echo "[INFO] Cleanup." - - # Stop docker container - echo "[INFO] Cleaning up yocto-build container." - docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true - docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Sanity checks -if [ "$#" -ne 3 ]; then - echo "Usage: create_resinos.sh " - echo "Optional environment: BUILD_DIR, PERSISTENT_WORKDIR, RESIN_BRANCH, HASSIO_ROOT" - exit 1 -fi - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -MACHINE=$1 -HASSIO_VERSION=$2 -RESINOS_HASSIO_VERSION=$3 -PERSISTENT_WORKDIR=${PERSISTENT_WORKDIR:=~/yocto} -BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH} -WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/resin-board -HASSIO_ROOT=${HASSIO_ROOT:=$SCRIPTPATH/../..} -DOWNLOAD_DIR=$PERSISTENT_WORKDIR/shared-downloads -SSTATE_DIR=$PERSISTENT_WORKDIR/$MACHINE/sstate -RESIN_BRANCH=${RESIN_BRANCH:=master} - -# evaluate git repo and arch -case $MACHINE in - "raspberrypi" | "raspberrypi2" | "raspberrypi3") - ARCH="armhf" - RESIN_REPO="https://github.com/resin-os/resin-raspberrypi" - HOMEASSISTANT_REPOSITORY="$DOCKER_REPO/$MACHINE-homeassistant" - ;; - *) - echo "[ERROR] ${MACHINE} unknown!" - exit 1 - ;; -esac - -echo "[INFO] Checkout repository" -if [ ! -d $WORKSPACE ]; then - mkdir -p $BUILD_DIR - cd $BUILD_DIR && git clone $RESIN_REPO resin-board - if [ $RESIN_BRANCH != "master" ]; then - cd $WORKSPACE && git checkout $RESIN_BRANCH - fi - cd $WORKSPACE && git submodule update --init --recursive -fi - -echo "[INFO] Inject HassIO yocto layer" -cp -fr $HASSIO_ROOT/meta-hassio $WORKSPACE/layers/ -if [ ! -d $WORKSPACE/build/conf ]; then - sed -i 's%${TOPDIR}/../layers/meta-resin/meta-resin-common \\%${TOPDIR}/../layers/meta-resin/meta-resin-common \\\n${TOPDIR}/../layers/meta-hassio \\%g' $WORKSPACE/layers/*/conf/samples/bblayers.conf.sample -fi - -# Additional variables -BARYS_ARGUMENTS_VAR="-a HASSIO_SUPERVISOR_TAG=$HASSIO_VERSION -a HOMEASSISTANT_REPOSITORY=$HOMEASSISTANT_REPOSITORY -a RESINOS_HASSIO_VERSION=$RESINOS_HASSIO_VERSION" - -# Make sure shared directories are in place -mkdir -p $DOWNLOAD_DIR -mkdir -p $SSTATE_DIR - -# Run build -echo "[INFO] Init docker build." -docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true -docker rm --volumes $BUILD_CONTAINER_NAME 2> /dev/null || true -docker run --rm \ - -v $WORKSPACE:/yocto/resin-board \ - -v $DOWNLOAD_DIR:/yocto/shared-downloads \ - -v $SSTATE_DIR:/yocto/shared-sstate \ - -e BUILDER_UID=$(id -u) \ - -e BUILDER_GID=$(id -g) \ - --name $BUILD_CONTAINER_NAME \ - --privileged \ - pvizeli/yocto-build-env \ - /run-resinos.sh \ - --log \ - --machine "$MACHINE" \ - ${BARYS_ARGUMENTS_VAR} \ - --shared-downloads /yocto/shared-downloads \ - --shared-sstate /yocto/shared-sstate \ - --resinio - -# Write deploy artifacts -BUILD_DEPLOY_DIR=$WORKSPACE/deploy -DEVICE_TYPE_JSON=$WORKSPACE/$MACHINE.json -VERSION_HOSTOS=$(cat $WORKSPACE/build/tmp/deploy/images/$MACHINE/VERSION_HOSTOS) - -DEPLOY_ARTIFACT=$(jq --raw-output '.yocto.deployArtifact' $DEVICE_TYPE_JSON) -COMPRESSED=$(jq --raw-output '.yocto.compressed' $DEVICE_TYPE_JSON) -ARCHIVE=$(jq --raw-output '.yocto.archive' $DEVICE_TYPE_JSON) -mkdir -p $BUILD_DEPLOY_DIR -rm -rf $BUILD_DEPLOY_DIR/* # do we have anything there? -cp $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/$DEPLOY_ARTIFACT) $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT -if [ "${COMPRESSED}" == 'true' ]; then - if [ "${ARCHIVE}" == 'true' ]; then - (cd $BUILD_DEPLOY_DIR && tar --remove-files --use-compress-program pigz --directory=$DEPLOY_ARTIFACT -cvf ${DEPLOY_ARTIFACT}.tar.gz .) - else - mv $BUILD_DEPLOY_DIR/$DEPLOY_ARTIFACT $BUILD_DEPLOY_DIR/resin.img - (cd $BUILD_DEPLOY_DIR && tar --remove-files --use-compress-program pigz -cvf resin.img.tar.gz resin.img) - fi -fi -if [ -f $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/resin-image-$MACHINE.resinhup-tar) ]; then - mv -v $(readlink --canonicalize $WORKSPACE/build/tmp/deploy/images/$MACHINE/resin-image-$MACHINE.resinhup-tar) $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar -else - echo "WARNING: No resinhup package found." -fi - -cp $WORKSPACE/build/tmp/deploy/images/$MACHINE/VERSION $BUILD_DEPLOY_DIR || true -cp $WORKSPACE/build/tmp/deploy/images/$MACHINE/VERSION_HOSTOS $BUILD_DEPLOY_DIR || true -cp $DEVICE_TYPE_JSON $BUILD_DEPLOY_DIR/device-type.json -# move to deploy directory the kernel modules headers so we have it as a build artifact in jenkins -cp $WORKSPACE/build/tmp/deploy/images/$MACHINE/kernel_modules_headers.tar.gz $BUILD_DEPLOY_DIR || true - -echo "INFO: Pushing resinhup package to dockerhub" -DOCKER_IMAGE="$DOCKER_REPO/resinos-hassio" -DOCKER_TAG="$RESINOS_HASSIO_VERSION-$MACHINE" -if [ -f $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar ]; then - docker import $BUILD_DEPLOY_DIR/resinhup-$VERSION_HOSTOS.tar $DOCKER_IMAGE:$DOCKER_TAG - docker push $DOCKER_IMAGE:$DOCKER_TAG - docker rmi $DOCKER_IMAGE:$DOCKER_TAG # cleanup -else - echo "ERROR: The build didn't produce a resinhup package." - exit 1 -fi - -# Cleanup the build directory -# Keep this after writing all artifacts -exit 0 -rm -rf $WORKSPACE/build diff --git a/build-scripts/yocto-build-env/Dockerfile b/build-scripts/yocto-build-env/Dockerfile deleted file mode 100644 index 7b7c60aae..000000000 --- a/build-scripts/yocto-build-env/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM ubuntu:16.04 - -# Install the following utilities (required by poky) -RUN apt-get update && apt-get install -y \ - build-essential \ - chrpath \ - curl \ - diffstat \ - gcc-multilib \ - gawk \ - git-core \ - libsdl1.2-dev \ - texinfo \ - unzip \ - wget \ - xterm \ - cpio \ - file \ - python3 \ - && rm -rf /var/lib/apt/lists/* - -# Set the locale to UTF-8 for bulding with poky morty -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 - -# Additional host packages required by resin -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - && rm -rf /var/lib/apt/lists/* -RUN curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - -ENV NODE_VERSION node_4.x -ENV DISTRO vivid -RUN echo "deb https://deb.nodesource.com/$NODE_VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list &&\ - echo "deb-src https://deb.nodesource.com/$NODE_VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list -RUN apt-get update && apt-get install -y \ - jq \ - nodejs \ - sudo \ - && rm -rf /var/lib/apt/lists/* - -# Install docker -# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository -RUN apt-get update && apt-get install -y \ - apt-transport-https \ - ca-certificates \ - curl \ - software-properties-common \ - && rm -rf /var/lib/apt/lists/* -VOLUME /var/lib/docker -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -RUN apt-get update && apt-get install -y \ - docker-ce \ - && rm -rf /var/lib/apt/lists/* - -COPY run-resinos.sh / - -WORKDIR /yocto/resin-board diff --git a/build-scripts/yocto-build-env/create_build_env.sh b/build-scripts/yocto-build-env/create_build_env.sh deleted file mode 100755 index c4b8469de..000000000 --- a/build-scripts/yocto-build-env/create_build_env.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -ev - -DOCKER_REPO=pvizeli -DOCKER_IMAGE=yocto-build-env - -# Get the absolute script location -pushd `dirname $0` > /dev/null 2>&1 -SCRIPTPATH=`pwd` -popd > /dev/null 2>&1 - -# Sanity checks -if [ "$#" -ne 1 ]; then - echo "Usage: create_build_env.sh [ | NONE]" - exit 1 -fi - -DOCKER_TAG=$1 - -# Build -docker build --pull --tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} -f ${SCRIPTPATH}/Dockerfile ${SCRIPTPATH} - -# Tag -docker tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_REPO}/${DOCKER_IMAGE}:latest - -if [ ${DOCKER_TAG} != "NONE" ]; then - # push - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} - docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:latest -fi diff --git a/build-scripts/yocto-build-env/run-resinos.sh b/build-scripts/yocto-build-env/run-resinos.sh deleted file mode 100755 index e4477a488..000000000 --- a/build-scripts/yocto-build-env/run-resinos.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -set -e - -DOCKER_TIMEOUT=20 # Wait 20 seconds for docker to start - -cleanup() { - echo "[INFO] Running cleanup..." - - # Stop docker gracefully - echo "[INFO] Stopping in container docker..." - DOCKERPIDFILE=/var/run/docker.pid - if [ -f $DOCKERPIDFILE ] && [ -s $DOCKERPIDFILE ] && ps $(cat $DOCKERPIDFILE) | grep -q docker; then - kill $(cat $DOCKERPIDFILE) - # Now wait for it to die - STARTTIME=$(date +%s) - ENDTIME=$(date +%s) - while [ -f $DOCKERPIDFILE ] && [ -s $DOCKERPIDFILE ] && ps $(cat $DOCKERPIDFILE) | grep -q docker; do - if [ $(($ENDTIME - $STARTTIME)) -le $DOCKER_TIMEOUT ]; then - sleep 1 - ENDTIME=$(date +%s) - else - echo "[ERROR] Timeout while waiting for in container docker to die." - exit 1 - fi - done - else - echo "[WARN] Can't stop docker container." - echo "[WARN] Your host might have been left with unreleased resources (ex. loop devices)." - fi - - if [ "$1" == "fail" ]; then - exit 1 - fi -} -trap 'cleanup fail' SIGINT SIGTERM - -# Create the normal user to be used for bitbake (barys) -echo "[INFO] Creating and setting builder user $BUILDER_UID:$BUILDER_GID." -groupadd -g $BUILDER_GID builder -groupadd docker || true -useradd -m -u $BUILDER_UID -g $BUILDER_GID -G docker builder - -# Start docker -echo "[INFO] Starting docker." -dockerd 2> /dev/null & -echo "[INFO] Waiting for docker to initialize..." -STARTTIME=$(date +%s) -ENDTIME=$(date +%s) -until docker info >/dev/null 2>&1; do - if [ $(($ENDTIME - $STARTTIME)) -le $DOCKER_TIMEOUT ]; then - sleep 1 - ENDTIME=$(date +%s) - else - echo "[ERROR] Timeout while waiting for docker to come up." - exit 1 - fi -done -echo "[INFO] Docker was initialized." - -# Start barys with all the arguments requested -echo "[INFO] Running build as builder user..." -sudo -H -u builder /yocto/resin-board/resin-yocto-scripts/build/barys $@ & -barys_pid=$! -wait $barys_pid || true - -cleanup -exit 0 diff --git a/hassio_api/hassio/__init__.py b/hassio/__init__.py similarity index 100% rename from hassio_api/hassio/__init__.py rename to hassio/__init__.py diff --git a/hassio_api/hassio/__main__.py b/hassio/__main__.py similarity index 100% rename from hassio_api/hassio/__main__.py rename to hassio/__main__.py diff --git a/hassio_api/hassio/api/__init__.py b/hassio/api/__init__.py similarity index 100% rename from hassio_api/hassio/api/__init__.py rename to hassio/api/__init__.py diff --git a/hassio_api/hassio/api/homeassistant.py b/hassio/api/homeassistant.py similarity index 100% rename from hassio_api/hassio/api/homeassistant.py rename to hassio/api/homeassistant.py diff --git a/hassio_api/hassio/api/host.py b/hassio/api/host.py similarity index 100% rename from hassio_api/hassio/api/host.py rename to hassio/api/host.py diff --git a/hassio_api/hassio/api/network.py b/hassio/api/network.py similarity index 100% rename from hassio_api/hassio/api/network.py rename to hassio/api/network.py diff --git a/hassio_api/hassio/api/supervisor.py b/hassio/api/supervisor.py similarity index 100% rename from hassio_api/hassio/api/supervisor.py rename to hassio/api/supervisor.py diff --git a/hassio_api/hassio/api/util.py b/hassio/api/util.py similarity index 100% rename from hassio_api/hassio/api/util.py rename to hassio/api/util.py diff --git a/hassio_api/hassio/bootstrap.py b/hassio/bootstrap.py similarity index 100% rename from hassio_api/hassio/bootstrap.py rename to hassio/bootstrap.py diff --git a/hassio_api/hassio/config.py b/hassio/config.py similarity index 100% rename from hassio_api/hassio/config.py rename to hassio/config.py diff --git a/hassio_api/hassio/const.py b/hassio/const.py similarity index 100% rename from hassio_api/hassio/const.py rename to hassio/const.py diff --git a/hassio_api/hassio/core.py b/hassio/core.py similarity index 100% rename from hassio_api/hassio/core.py rename to hassio/core.py diff --git a/hassio_api/hassio/dock/__init__.py b/hassio/dock/__init__.py similarity index 100% rename from hassio_api/hassio/dock/__init__.py rename to hassio/dock/__init__.py diff --git a/hassio_api/hassio/dock/homeassistant.py b/hassio/dock/homeassistant.py similarity index 100% rename from hassio_api/hassio/dock/homeassistant.py rename to hassio/dock/homeassistant.py diff --git a/hassio_api/hassio/dock/supervisor.py b/hassio/dock/supervisor.py similarity index 100% rename from hassio_api/hassio/dock/supervisor.py rename to hassio/dock/supervisor.py diff --git a/hassio_api/hassio/host_controll.py b/hassio/host_controll.py similarity index 100% rename from hassio_api/hassio/host_controll.py rename to hassio/host_controll.py diff --git a/hassio_api/hassio/scheduler.py b/hassio/scheduler.py similarity index 100% rename from hassio_api/hassio/scheduler.py rename to hassio/scheduler.py diff --git a/hassio_api/hassio/tools.py b/hassio/tools.py similarity index 100% rename from hassio_api/hassio/tools.py rename to hassio/tools.py diff --git a/hassio_api/.pylint.d/hassio1.stats b/hassio_api/.pylint.d/hassio1.stats deleted file mode 100644 index 128e712e75c16f4fc91e14ac5bfbe7cf80eae6ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1504 zcmah}S##4c5KicohTbQ%Kts7gq2Vm|eS&NK#^#1|x_E*Ak8belvljHy#S2#MN;4n`2DBH&4}jr5wf zVwIg)3>BJ&(oX^kqnNJc=Etg4F=|^xkpK?nU~|U}<2H_zpE%uO^sH-V?6Ggy0;^V!z6tRK@R6K}LE?N>6F{RhZuK9-$_}{in z(qY6#kl{Cp1Q%^sLdH?u2c61{T~6UhW){OMaoNBJ!PZApI96vk25bpGG?-z3rajT+ zu_B7#(yiQ3O#ITyei9R*jsXetV-iDJY zoa$4wuvdgL{fkBo7w42K*M-w5oas}oXD@3B^%Tzb$)4IiJ7*gF}Yh)L0 z+HlKkoF@Yr1+opdHF$^B5WH){J+oSw4{%>Y4+;`;s^p9+KypO^sy6~ytd}hP* z-i(~!h0b`%Hn8g}8!WRfgiEH>7QEKj8zc9v4ev}fiFbtODjrh&eZYI2@qw*kwQa*k z^aIbIOvPs#zVvnGtIl^!{x=)GC(Z=UK9v1))jsZ=I8ShqlM&bpEq$C8~*@_ CnYs=D diff --git a/homeassistant/Dockerfile b/homeassistant/Dockerfile deleted file mode 100644 index ec2634aeb..000000000 --- a/homeassistant/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM %%BASE_IMAGE%% - -# Add version -ENV VERSION %%HASS_VERSION%% -ENV LANG C.UTF-8 - -# install core packages -RUN apk --no-cache add libuv git linux-headers eudev-dev libusb-dev - -# install component packages -RUN apk --no-cache add ffmpeg nmap net-tools - -## -# install zwave -WORKDIR /usr/src/ -RUN pip3 install --no-cache-dir cython==0.25.2 - -RUN git clone https://github.com/OpenZWave/python-openzwave \ - && cd python-openzwave \ - && git checkout v0.3.2 \ - && make build \ - && make install \ - && mkdir -p /usr/local/share/python-openzwave \ - && cp -R openzwave/config /usr/local/share/python-openzwave/config \ - && rm -rf /usr/src/python-openzwave - -## -# install pip module for components - -# install home-assistant -RUN pip3 install --no-cache-dir uvloop homeassistant==%%HASS_VERSION%% - -# Run hass -CMD [ "python", "-m", "homeassistant", "--config", "/config" ] diff --git a/meta-hassio/conf/layer.conf b/meta-hassio/conf/layer.conf deleted file mode 100644 index 21cf46586..000000000 --- a/meta-hassio/conf/layer.conf +++ /dev/null @@ -1,10 +0,0 @@ -BBPATH .= ":${LAYERDIR}" - -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "hassio" -BBFILE_PATTERN_hassio = "^${LAYERDIR}/" - -LAYERVERSION_hassio = "1" -LAYERDEPENDS_hassio = "resin-common" diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend deleted file mode 100644 index 84d52e334..000000000 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk.bbappend +++ /dev/null @@ -1,23 +0,0 @@ - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SUPERVISOR_REPOSITORY_armv5 = "pvizeli/armhf-hassio-supervisor" -SUPERVISOR_REPOSITORY_armv6 = "pvizeli/armhf-hassio-supervisor" -SUPERVISOR_REPOSITORY_armv7a = "pvizeli/armhf-hassio-supervisor" -SUPERVISOR_REPOSITORY_armv7ve = "pvizeli/armhf-hassio-supervisor" -SUPERVISOR_REPOSITORY_aarch64 = "pvizeli/aarch64-hassio-supervisor" -SUPERVISOR_REPOSITORY_x86 = "pvizeli/i386-hassio-supervisor" -SUPERVISOR_REPOSITORY_x86-64 = "pvizeli/amd64-hassio-supervisor" - -SUPERVISOR_TAG = "${HASSIO_SUPERVISOR_TAG}" -TARGET_REPOSITORY = "${SUPERVISOR_REPOSITORY}" -TARGET_TAG = "${SUPERVISOR_TAG}" - -SYSTEMD_AUTO_ENABLE = "enable" - -do_install_append () { - install -d ${D}${sysconfdir}/resin-supervisor - sed -i -e 's:@HOMEASSISTANT_REPOSITORY@:${HOMEASSISTANT_REPOSITORY}:g' ${D}${sysconfdir}/resin-supervisor/supervisor.conf - sed -i -e 's:@MACHINE@:${MACHINE}:g' ${D}${sysconfdir}/resin-supervisor/supervisor.conf - sed -i -e 's:@RESINOS_HASSIO_VERSION@:${RESINOS_HASSIO_VERSION}:g' ${D}${sysconfdir}/resin-supervisor/supervisor.conf -} diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor deleted file mode 100644 index 151bd7334..000000000 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/start-resin-supervisor +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -e - -source /usr/sbin/resin-vars -source /etc/resin-supervisor/supervisor.conf - -SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' $SUPERVISOR_IMAGE) -SUPERVISOR_CONTAINER_IMAGE_ID=$(docker inspect --format='{{.Image}}' resin_supervisor || echo "") - -runSupervisor() { - docker rm --force resin_supervisor || true - docker run --name resin_supervisor \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /var/run/hassio-hc.sock:/var/run/hassio-hc.sock \ - -v /resin-data:/data \ - -v /var/log/supervisor-log:/var/log \ - -e SUPERVISOR_SHARE=/resin-data \ - -e SUPERVISOR_NAME=resin_supervisor \ - -e HOMEASSISTANT_REPOSITORY=${HOMEASSISTANT_REPOSITORY} \ - ${SUPERVISOR_IMAGE} -} - -([ "$SUPERVISOR_IMAGE_ID" == "$SUPERVISOR_CONTAINER_IMAGE_ID" ] && docker start --attach resin_supervisor) || runSupervisor diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf deleted file mode 100644 index 22c9aaecf..000000000 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/supervisor.conf +++ /dev/null @@ -1,6 +0,0 @@ -SUPERVISOR_IMAGE=@SUPERVISOR_REPOSITORY@ -SUPERVISOR_TAG=@SUPERVISOR_TAG@ -LED_FILE=@LED_FILE@ -MACHINE=@MACHINE@ -HOMEASSISTANT_REPOSITORY=@HOMEASSISTANT_REPOSITORY@ -RESINOS_HASSIO_VERSION=@RESINOS_HASSIO_VERSION@ diff --git a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/update-resin-supervisor b/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/update-resin-supervisor deleted file mode 100644 index 207d025b2..000000000 --- a/meta-hassio/recipes-containers/docker-disk/docker-resin-supervisor-disk/update-resin-supervisor +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -set -o pipefail - -SUPERVISOR_CONFIG="/resin-data/config.json" - -# Help function -function update-resin-supervisor-help { - cat << EOF -Wrapper to run supervisor agent updates on resin distributions. -$0