summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2021-05-27 22:05:45 +0200
committerKarel Kočí <cynerd@email.cz>2021-05-27 22:05:45 +0200
commitd7dfd739824c0f5bad5db426d30d6e1a34265d88 (patch)
tree2ad0286895efd1669982f9d823cdcde6f53f410d
parentabb15581f02f4340b82d4e0f965542ce28c72f70 (diff)
downloadlaminar-cnf-d7dfd739824c0f5bad5db426d30d6e1a34265d88.tar.gz
laminar-cnf-d7dfd739824c0f5bad5db426d30d6e1a34265d88.tar.bz2
laminar-cnf-d7dfd739824c0f5bad5db426d30d6e1a34265d88.zip
alpine: build against latest-stable
-rwxr-xr-xtemplates/alpine.run10
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"