aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/setup-alpine
diff options
context:
space:
mode:
Diffstat (limited to '.travis/setup-alpine')
-rwxr-xr-x.travis/setup-alpine33
1 files changed, 33 insertions, 0 deletions
diff --git a/.travis/setup-alpine b/.travis/setup-alpine
new file mode 100755
index 00000000000..a922dff671f
--- /dev/null
+++ b/.travis/setup-alpine
@@ -0,0 +1,33 @@
+#!/bin/sh
+# vim: set ts=4:
+set -eu
+
+. "$(dirname "$0")"/common.sh
+
+title 'Setting up Alpine Linux'
+
+mkdir -p "${ALPINE_ROOT}${CLONE_DIR}"
+mount --bind "$CLONE_DIR" "${ALPINE_ROOT}${CLONE_DIR}"
+
+alpine_run <<-EOF
+ apk add alpine-sdk lua-aports
+
+ adduser -G users -s /bin/sh -D $ALPINE_USER
+ addgroup $ALPINE_USER abuild
+ addgroup $ALPINE_USER wheel
+
+ echo '%wheel ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/wheel
+
+ sed -i 's/JOBS=[0-9]*/JOBS=$(nproc)/' /etc/abuild.conf
+
+ mkdir -p /var/cache/distfiles
+ chmod a+w /var/cache/distfiles
+
+ # Hack to disable apk's progress bar.
+ install -m755 -D .travis/abuild-apk /usr/local/bin/abuild-apk
+EOF
+
+# This key will not be used anywhere, just to make abuild happy...
+alpine_run $ALPINE_USER <<-EOF
+ abuild-keygen -ain
+EOF