Spotter-VM/_build/install-toolchain.sh

35 lines
945 B
Bash
Raw Normal View History

2018-10-26 21:54:34 +02:00
#!/bin/sh
2018-10-28 16:04:11 +01:00
set -ev
2018-10-26 21:54:34 +02:00
cd $(realpath $(dirname "${0}"))
# Install Alpine SDK and useful tools
2018-10-26 21:54:34 +02:00
apk update
2018-11-01 13:37:24 +01:00
apk add alpine-sdk git file htop less openssh-client openssh-server openssh-sftp-server tar xz
# Copy root profile files and settings
mkdir -p /root/.config/htop /root/.ssh
cp root/.profile /root/.profile
cp root/.ssh/authorized_keys /root/.ssh/authorized_keys
cp root/.config/htop/htoprc /root/.config/htop/htoprc
# Start SSH
rc-update add sshd boot
service sshd start
2018-10-26 21:54:34 +02:00
# Prepare abuild toolchain
2018-10-26 21:54:34 +02:00
adduser root abuild
cp etc/abuild.conf /etc/abuild.conf
# Prepare LXC build toolchain
2018-10-26 21:54:34 +02:00
cp usr/bin/fix-apk /usr/bin/fix-apk
cp usr/bin/lxc-build /usr/bin/lxc-build
cp usr/bin/lxc-pack /usr/bin/lxc-pack
# Supply abuild key
2018-11-06 22:06:33 +01:00
# echo '/srv/build/repokey.rsa' | abuild-keygen
# Supply LXC build key
2018-11-06 22:06:33 +01:00
# openssl ecparam -genkey -name secp384r1 -out /srv/build/packages.key
# openssl ec -in /srv/build/packages.key -pubout -out /srv/build/packages.pub