Spotter-VM/build/install-toolchain.sh

37 lines
1023 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
2020-04-04 00:17:24 +02:00
apk add git file htop less openssh-client tree
# Install Alpine SDK (for APK builds)
2019-03-19 11:32:31 +01:00
apk add alpine-sdk
# Install Sphinx support (for documentation builds)
apk add py3-sphinx py3-sphinx_rtd_theme
# Copy root profile files and settings
2020-03-12 22:56:40 +01:00
mkdir -p /root/.config/htop
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
2019-06-02 11:30:53 +02:00
# Prepare local APK repository
2019-12-18 10:13:32 +01:00
cp etc/nginx/conf.d/repo.conf /etc/nginx/conf.d/repo.conf
2019-12-09 21:41:04 +01:00
echo "172.17.0.1 repo.build.vm" >>/etc/hosts
2019-06-02 11:30:53 +02:00
service nginx reload
2020-03-13 13:22:47 +01:00
# Change SPOC repository
sed -i 's/https:\/\/repo\.spotter\.cz/http:\/\/repo.build.vm/' /etc/spoc/spoc.conf
2019-12-09 21:41:04 +01:00
# Supply abuild key
2020-03-13 17:53:31 +01:00
# echo '/root/repo.spotter.cz.rsa' | abuild-keygen
2018-11-06 22:06:33 +01:00
2020-03-13 13:22:47 +01:00
# Supply SPOC key
2020-03-12 22:56:40 +01:00
# openssl ecparam -genkey -name secp384r1 -out /etc/spoc/publish.key
# openssl ec -in /etc/spoc/publish.key -pubout -out /tmp/repository.pub