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}"))
|
|
|
|
|
2018-10-27 21:19:57 +02:00
|
|
|
# Install Alpine SDK and useful tools
|
2018-10-26 21:54:34 +02:00
|
|
|
apk update
|
2018-11-01 13:37:24 +01:00
|
|
|
apk add alpine-sdk git file htop less openssh-client openssh-server openssh-sftp-server tar xz
|
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/.ssh/authorized_keys /root/.ssh/authorized_keys
|
|
|
|
cp root/.config/htop/htoprc /root/.config/htop/htoprc
|
|
|
|
|
|
|
|
# Start SSH
|
|
|
|
rc-update add sshd boot
|
|
|
|
service sshd start
|
2018-10-26 21:54:34 +02:00
|
|
|
|
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
|