Commit 12897f2d authored by Ariadne Conill's avatar Ariadne Conill

buildlab: fix operation with apk-tools 2.1

parent 6a8889a1
......@@ -94,40 +94,44 @@ prepare_chroot() {
msg "Setting up repositories for mirror $mirror with version $version at $path..."
mkdir -p "$path"/etc/apk
echo "http://$mirror/alpine/$version/packages/$arch/main" >> "$path"/etc/apk/repositories
echo "http://$mirror/alpine/$version/packages/$arch/testing" >> "$path"/etc/apk/repositories
echo "http://$mirror/alpine/$version/main" >> "$path"/etc/apk/repositories
echo "http://$mirror/alpine/$version/testing" >> "$path"/etc/apk/repositories
if [ ! -z "$enablecache" ]; then
mkdir -p "$path"/var/cache/apk
ln -s /var/cache/apk "$path"/etc/apk/cache
fi
mkdir -p "$path"/var/lib/apk
echo "alpine-base" > "$path"/var/lib/apk/world
echo "alpine-base" > "$path"/etc/apk/world
mkdir -p "$path"/lib/apk/db
mkdir -p "$path"/var/lock
mkdir -p "$path"/var/cache/apk
mkdir -p "$path"/tmp
mkdir -p "$path"/etc
cp /etc/resolv.conf "$path"/etc/resolv.conf
msg "Updating package lists..."
apk --root $path --repositories "$path"/etc/apk/repositories update
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories update
msg "Installing alpine-base..."
apk --root $path --repositories "$path"/etc/apk/repositories add --initdb alpine-base
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb alpine-base
msg "Installing abuild..."
apk --root $path --repositories "$path"/etc/apk/repositories add --initdb abuild
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb abuild
msg "Installing build-base..."
apk --root $path --repositories "$path"/etc/apk/repositories add --initdb build-base
apk --arch $buildarch --root $path --repositories "$path"/etc/apk/repositories add --initdb build-base
msg "Adding abuild user..."
do_chroot_action "$path" adduser -D -G abuild abuild
echo "abuild ALL=NOPASSWD: ALL" >> "$path"/etc/sudoers
chmod 440 "$path"/etc/sudoers
msg "Generating buildlab signing keys..."
do_chroot_action "$path" su abuild -c "'abuild-keygen -ai'"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment