diff options
Diffstat (limited to 'buildlab.in')
-rwxr-xr-x | buildlab.in | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/buildlab.in b/buildlab.in index 29795a3..cb4c368 100755 --- a/buildlab.in +++ b/buildlab.in @@ -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'" |