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
|
2020-10-12 21:36:39 +02:00
|
|
|
# Install Alpine SDK (for APK builds)
|
2019-03-19 11:32:31 +01:00
|
|
|
apk add alpine-sdk
|
2020-10-12 21:36:39 +02:00
|
|
|
# Install Sphinx support (for documentation builds)
|
|
|
|
apk add py3-sphinx py3-sphinx_rtd_theme
|
2018-10-27 21:19:57 +02:00
|
|
|
|
|
|
|
# Copy root profile files and settings
|
2020-03-12 22:56:40 +01:00
|
|
|
mkdir -p /root/.config/htop
|
2018-10-27 21:19:57 +02:00
|
|
|
cp root/.profile /root/.profile
|
|
|
|
cp root/.config/htop/htoprc /root/.config/htop/htoprc
|
|
|
|
|
2019-02-26 20:24:02 +01:00
|
|
|
# Prepare abuild toolchain
|
2018-10-26 21:54:34 +02:00
|
|
|
adduser root abuild
|
|
|
|
cp etc/abuild.conf /etc/abuild.conf
|
2019-02-26 20:24:02 +01:00
|
|
|
|
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
|
2020-03-13 21:27:47 +01:00
|
|
|
sed -i 's/https:\/\/repo\.spotter\.cz/http:\/\/repo.build.vm/' /etc/spoc/spoc.conf
|
2019-12-09 21:41:04 +01:00
|
|
|
|
2019-02-26 20:24:02 +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
|