Spotter-VM/build/install-toolchain.sh

40 lines
1.1 KiB
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
cp usr/bin/lxcbuild /usr/bin/lxcbuild
cp usr/bin/lxcmerge /usr/bin/lxcmerge
2019-09-20 10:13:41 +02:00
mkdir -p /srv/build/lxc/apps /srv/build/lxc/images
2018-10-26 21:54:34 +02:00
2019-06-02 11:30:53 +02:00
# Prepare local APK repository
cp etc/nginx/conf.d/apkrepo.conf /etc/nginx/conf.d/apkrepo.conf
echo "172.17.0.1 repo.spotter.cz" >>/etc/hosts
service nginx reload
# 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
2019-09-20 10:13:41 +02:00
# openssl ec -in /srv/build/packages.key -pubout -out /srv/build/lxc/packages.pub