diff options
Diffstat (limited to 'templates/alpine.run')
-rwxr-xr-x | templates/alpine.run | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/alpine.run b/templates/alpine.run index 6811191..a24695d 100755 --- a/templates/alpine.run +++ b/templates/alpine.run @@ -27,17 +27,18 @@ mkdir -p "$TWORKSPACE/distfiles" "$WORKSPACE/packages" if [ ! -d "$ROOT" ]; then # Prepare new root if there is none - rootfs="$(curl "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/latest-releases.yaml" | \ + # TODO switch to latest-stable + rootfs="$(curl "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/latest-releases.yaml" | \ yq -r 'map(select(.flavor == "alpine-minirootfs")) | .[0].file')" echo_stage "Setting up new root" - wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/$ARCH/$rootfs" -O alpine.tar.gz + wget "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/$rootfs" -O alpine.tar.gz # TODO verify signature mkdir "$ROOT" uroot tar -xzf alpine.tar.gz -C "$ROOT" chmod 755 "$ROOT" # This is intentional, tar changes access rights MOUNT="" uchroot root <<EOF set -e - apk update + sed -i -e 's/v[[:digit:]]\..*\//latest-stable\//g' /etc/apk/repositories apk add alpine-sdk lua-aports adduser -s /bin/sh -D -h /build build addgroup build abuild @@ -57,7 +58,8 @@ EOF fi echo_stage "Update system" -uchroot root 'apk update && apk upgrade' +uchroot root "sed -i -e 's/v[[:digit:]]\..*\//latest-stable\//g' /etc/apk/repositories" +uchroot root 'apk update && apk upgrade -a' echo_stage "Get packages source" git_clone "git@cynerd.cz:alpine-personal-pkgs" "$ROOT/pkgs" |