Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Changes for building image on top Buster #36

Merged
merged 2 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions export-image/01-set-sources/00-patches/0-sources.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions stage0/00-configure-apt/files/raspi.list
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions stage0/00-configure-apt/files/sources.list
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stage0/prerun.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion stage3/00-hassbian-repo/files/hassbian.list
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions stage4/00-hassbian-repo/00-run.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions stage4/00-hassbian-repo/files/hassbian.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deb [trusted=yes] https://gitlab.com/hassbian/repository-dev/raw/master buster main

1 change: 1 addition & 0 deletions stage4/01-install-packages/00-packages
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions stage4/02-tweaks/00-run.sh
Original file line number Diff line number Diff line change
@@ -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

5 changes: 5 additions & 0 deletions stage4/03-cleanup/00-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

on_chroot << EOF
apt-get clean
EOF
Empty file added stage4/EXPORT_IMAGE
Empty file.
5 changes: 5 additions & 0 deletions stage4/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi