Spotter-VM/_build/install-toolchain.sh

35 lines
910 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}"))
2019-03-19 11:32:31 +01:00
# Install basic build tools
2018-10-26 21:54:34 +02:00
apk update
2019-03-22 08:49:00 +01:00
apk add git file htop less openssh-client tar xz
2019-03-19 11:32:31 +01:00
# Install Alpine SDK
apk add alpine-sdk
# Install Sphinx support
apk add py3-sphinx
2019-03-19 11:32:31 +01:00
pip3 install recommonmark sphinx-markdown-tables
# Copy root profile files and settings
mkdir -p /root/.config/htop /root/.ssh
cp root/.profile /root/.profile
cp root/.config/htop/htoprc /root/.config/htop/htoprc
# 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