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
|
2019-03-19 14:04:13 +01:00
|
|
|
apk add py3-sphinx
|
2019-03-19 11:32:31 +01:00
|
|
|
pip3 install recommonmark sphinx-markdown-tables
|
2018-10-27 21:19:57 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
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
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2019-02-26 20:24:02 +01:00
|
|
|
# Supply abuild key
|
2018-11-06 22:06:33 +01:00
|
|
|
# echo '/srv/build/repokey.rsa' | abuild-keygen
|
|
|
|
|
2019-02-26 20:24:02 +01:00
|
|
|
# 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
|