43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
set -ev
|
|
|
|
cd $(realpath $(dirname "${0}"))
|
|
|
|
# Install basic build tools
|
|
apk update
|
|
apk add git file htop less openssh-client tar xz
|
|
# Install Alpine SDK
|
|
apk add alpine-sdk
|
|
# Install Sphinx support
|
|
apk add py3-sphinx
|
|
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
|
|
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
|
|
mkdir -p /srv/build/lxc/apps /srv/build/lxc/images
|
|
|
|
# Prepare local APK repository
|
|
cp etc/nginx/conf.d/repo.conf /etc/nginx/conf.d/repo.conf
|
|
echo "172.17.0.1 repo.build.vm" >>/etc/hosts
|
|
service nginx reload
|
|
|
|
# Change LXCMgr repository
|
|
echo '{"url":"http://repo.build.vm/lxc","user":"","pwd":""}' >/etc/lxcmgr/repo.json
|
|
|
|
# Supply abuild key
|
|
# echo '/srv/build/repokey.rsa' | abuild-keygen
|
|
|
|
# Supply LXC build key
|
|
# openssl ecparam -genkey -name secp384r1 -out /srv/build/packages.key
|
|
# openssl ec -in /srv/build/packages.key -pubout -out /srv/build/lxc/packages.pub
|