diff --git a/export-image/01-set-sources/00-patches/0-sources.diff b/export-image/01-set-sources/00-patches/0-sources.diff index 17badff14b..035eb670f4 100644 --- a/export-image/01-set-sources/00-patches/0-sources.diff +++ b/export-image/01-set-sources/00-patches/0-sources.diff @@ -3,7 +3,7 @@ Index: export-jessie/rootfs/etc/apt/sources.list.d/raspi.list --- export-jessie.orig/rootfs/etc/apt/sources.list.d/raspi.list +++ export-jessie/rootfs/etc/apt/sources.list.d/raspi.list @@ -1,3 +1,3 @@ --deb http://archive.raspberrypi.org/debian/ stretch main ui staging -+deb http://archive.raspberrypi.org/debian/ stretch main ui +-deb http://archive.raspberrypi.org/debian/ buster main ui staging ++deb http://archive.raspberrypi.org/debian/ buster main ui # Uncomment line below then 'apt-get update' to enable 'apt-get source' - #deb-src http://archive.raspberrypi.org/debian/ stretch main ui + #deb-src http://archive.raspberrypi.org/debian/ buster main ui diff --git a/stage0/00-configure-apt/files/raspi.list b/stage0/00-configure-apt/files/raspi.list index 656ab48132..70b5fd699d 100644 --- a/stage0/00-configure-apt/files/raspi.list +++ b/stage0/00-configure-apt/files/raspi.list @@ -1,3 +1,3 @@ -deb http://archive.raspberrypi.org/debian/ stretch main ui staging +deb http://archive.raspberrypi.org/debian/ buster main ui staging # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://archive.raspberrypi.org/debian/ stretch main ui +#deb-src http://archive.raspberrypi.org/debian/ buster main ui diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list index 45e5210f63..61820ac04e 100644 --- a/stage0/00-configure-apt/files/sources.list +++ b/stage0/00-configure-apt/files/sources.list @@ -1,3 +1,3 @@ -deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi +deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi +#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi diff --git a/stage0/prerun.sh b/stage0/prerun.sh index 7c09b02504..9ce3e0227f 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -1,5 +1,5 @@ #!/bin/bash -e if [ ! -d "${ROOTFS_DIR}" ]; then - bootstrap stretch "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ + bootstrap buster "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ fi diff --git a/stage3/00-hassbian-repo/files/hassbian.list b/stage3/00-hassbian-repo/files/hassbian.list index f2cec4bd7e..c9dfd41466 100644 --- a/stage3/00-hassbian-repo/files/hassbian.list +++ b/stage3/00-hassbian-repo/files/hassbian.list @@ -1 +1 @@ -deb [trusted=yes] https://gitlab.com/hassbian/repository/raw/master stretch main +deb [trusted=yes] https://gitlab.com/hassbian/repository/raw/master buster main diff --git a/stage4/00-hassbian-repo/00-run.sh b/stage4/00-hassbian-repo/00-run.sh new file mode 100755 index 0000000000..7bfa9942e1 --- /dev/null +++ b/stage4/00-hassbian-repo/00-run.sh @@ -0,0 +1,9 @@ +#!/bin/bash -e + +install -m 644 files/hassbian.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" + +#on_chroot apt-key add - < files/hassbian.gpg.key + +on_chroot << EOF +apt update +EOF diff --git a/stage4/00-hassbian-repo/files/hassbian.list b/stage4/00-hassbian-repo/files/hassbian.list new file mode 100644 index 0000000000..931996ab47 --- /dev/null +++ b/stage4/00-hassbian-repo/files/hassbian.list @@ -0,0 +1,2 @@ +deb [trusted=yes] https://gitlab.com/hassbian/repository-dev/raw/master buster main + diff --git a/stage4/01-install-packages/00-packages b/stage4/01-install-packages/00-packages new file mode 100644 index 0000000000..c4b3aa46bf --- /dev/null +++ b/stage4/01-install-packages/00-packages @@ -0,0 +1 @@ +git python3 python3-venv python3-pip bluetooth libbluetooth-dev rng-tools rpi-update htop tmux avahi-daemon libtool autoconf rfkill gvfs libssl-dev libffi-dev python-dev libudev-dev zip nodejs apt-transport-https bluez-hcidump bc figlet diff --git a/stage4/02-tweaks/00-run.sh b/stage4/02-tweaks/00-run.sh new file mode 100755 index 0000000000..12bd315185 --- /dev/null +++ b/stage4/02-tweaks/00-run.sh @@ -0,0 +1,32 @@ +#!/bin/bash -e + +on_chroot << EOF +groupadd -f -r -g 1001 homeassistant +useradd -u 1001 -g 1001 -rm homeassistant +EOF + +install -v -o 1001 -g 1001 -d ${ROOTFS_DIR}/srv/homeassistant + +on_chroot << \EOF +apt install -f hassbian-scripts +EOF + +on_chroot << EOF +systemctl enable install_homeassistant +EOF + +on_chroot << EOF +sed -i 's/PrintMotd no/PrintMotd yes/' /etc/ssh/sshd_config +rm /etc/update-motd.d/10-uname +rm /etc/motd +EOF + +on_chroot << \EOF +for GRP in dialout gpio i2c input netdev spi video; do + adduser homeassistant $GRP +done +for GRP in homeassistant; do + adduser pi $GRP +done +EOF + diff --git a/stage4/03-cleanup/00-run.sh b/stage4/03-cleanup/00-run.sh new file mode 100755 index 0000000000..071a164b96 --- /dev/null +++ b/stage4/03-cleanup/00-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot << EOF +apt-get clean +EOF diff --git a/stage4/EXPORT_IMAGE b/stage4/EXPORT_IMAGE new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage4/prerun.sh b/stage4/prerun.sh new file mode 100755 index 0000000000..9acd13cbd3 --- /dev/null +++ b/stage4/prerun.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +if [ ! -d "${ROOTFS_DIR}" ]; then + copy_previous +fi