summaryrefslogtreecommitdiff
path: root/files/alpine
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-10-14 17:31:02 +0200
committerKarel Kočí <cynerd@email.cz>2018-10-14 20:59:19 +0200
commitd562390407eec6ecc83a9f19635258fbe83b6695 (patch)
tree922364534f2a031f8b76cc67229c287016ed5c1a /files/alpine
parent4ddbc0c658e65fb14f4c22b63fff2e56032ccf7f (diff)
downloadlaminar-cnf-d562390407eec6ecc83a9f19635258fbe83b6695.tar.gz
laminar-cnf-d562390407eec6ecc83a9f19635258fbe83b6695.tar.bz2
laminar-cnf-d562390407eec6ecc83a9f19635258fbe83b6695.zip
alpine: move it to templates and try to add qemu support
Diffstat (limited to 'files/alpine')
-rwxr-xr-xfiles/alpine/amd64.sh50
1 files changed, 0 insertions, 50 deletions
diff --git a/files/alpine/amd64.sh b/files/alpine/amd64.sh
deleted file mode 100755
index e80cc5c..0000000
--- a/files/alpine/amd64.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-. utils
-
-# TODO mount global distfiles cache
-
-# TODO get latest uri from latest-releases.yml file
-if [ ! -d "$ROOT" ]; then
- echo_stage "Setting up new root"
- wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/alpine-minirootfs-3.8.0-x86_64.tar.gz" -O alpine.tar.gz
- # TODO verify signature
- gunzip alpine.tar.gz
- tar -f alpine.tar --delete ./dev/null
- mkdir "$ROOT"
- uroot tar -xf alpine.tar -C "$ROOT"
- chmod 755 "$ROOT" # This is intentional, tar changes access rights
- uchroot "$ROOT" root /bin/sh <<EOF
- set -ex
- apk update
- apk add alpine-sdk lua-aports
- adduser -s /bin/sh -D -h /build build
- addgroup build abuild
- mkdir -p /var/cache/distfiles
- chgrp abuild /var/cache/distfiles
- chmod g+w /var/cache/distfiles
-EOF
- uchroot "$ROOT" build 'mkdir .abuild aports && echo "PACKAGER_PRIVKEY=\"/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa\"" > .abuild/abuild.conf'
- uroot cp ~/alpinelinux.rsa.key "$ROOT/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"
- uchroot "$ROOT" root 'chown build:build "/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"'
- uroot cp ~/alpinelinux.rsa.key.pub "$ROOT/etc/apk/keys/cynerd@email.cz-5b8aeb6d.rsa.pub"
- uroot cp "$JOB_FILES/abuild.conf" "$ROOT/etc/abuild.conf"
-fi
-
-echo_stage "Update system"
-uchroot "$ROOT" root 'apk update && apk upgrade'
-
-echo_stage "Get packages source"
-git_clone "git@cynerd.cz:alpine-personal-pkgs" "$ROOT/pkgs"
-uchroot "$ROOT" root "rm -rf /build/aports/personal && chown -R build:build /pkgs && mv /pkgs /build/aports/personal"
-
-echo_stage "Build packages"
-uchroot "$ROOT" build buildrepo --purge personal
-
-echo_stage "Deploy"
-ssh upload rm -rf "deploy-alpine-amd64"
-scp -r "$ROOT/build/packages/personal" upload:deploy-alpine
-ssh upload /bin/sh -e <<EOF
- rm -rf /var/www/repo/alpine
- mv deploy-alpine /var/www/repo/alpine
-EOF
-scp "$FILES"/alpine/setup.sh{,.gpg} upload:/var/www/repo/alpine/