From 21013e40b8a59e675422fe23df913725f27e5bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 3 Sep 2018 08:29:42 +0200 Subject: alpine-amd64: reorder packages repository --- jobs/alpine-amd64.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'jobs/alpine-amd64.sh') diff --git a/jobs/alpine-amd64.sh b/jobs/alpine-amd64.sh index a529868..b737ed3 100755 --- a/jobs/alpine-amd64.sh +++ b/jobs/alpine-amd64.sh @@ -1,11 +1,13 @@ #!/bin/sh . utils -# TODO get latest uri from latest-releases.yml file +# TODO mount global alpine repository +# 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" @@ -21,7 +23,7 @@ if [ ! -d "$ROOT" ]; then chgrp abuild /var/cache/distfiles chmod g+w /var/cache/distfiles EOF - uchroot "$ROOT" build 'mkdir .abuild && echo "PACKAGER_PRIVKEY=\"/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa\"" > .abuild/abuild.conf' + 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" @@ -48,17 +50,16 @@ 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/aports" -uchroot "$ROOT" root "rm -rf /build/aports && chown -R build:build /aports && mv /aports /build/aports" +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 $(ls "$ROOT/build/aports") +uchroot "$ROOT" build buildrepo --purge personal echo_stage "Deploy" ssh upload rm -rf "deploy-alpine-amd64" -scp -r "$ROOT/build/packages" upload:deploy-alpine-amd64 +scp -r "$ROOT/build/packages/personal" upload:deploy-alpine ssh upload /bin/sh -e <