git » base-pkgbuilds.git » main » tree

[main] / pkg-spawner.sh

#!/bin/sh
set -e
su builder -c "../pkg-prep.sh $1"
mount -o remount,size=8G /tmp
SPAWN="systemd-nspawn --console=autopipe -a -M pkg-builder-$CARCH-$$ --volatile=overlay --bind=/sources"
CMD="/usr/bin/env CARCH=$CARCH $(pwd)/../pkg-spawned.sh $(pwd) $2"
if [ "$CARCH" = "aarch64" ]; then
	setarch aarch64 $SPAWN -D /buildcore64 $CMD
else
	$SPAWN --bind-ro=/var/lib/pacman/sync -D /build-core $CMD
fi