copr: aws-builder: provide more space for builds

We don't have large root partition enough, and both /tmp and
/var/lib/copr-rpmbuild eat the remaing ~3.7G.  The swap disk though is
large enough, so we can use part of it to mimic the boxes we have in
openstack.
This commit is contained in:
Pavel Raiskup 2020-01-16 00:43:03 +01:00 committed by Pierre-Yves Chibon
parent 982af092ad
commit a5d8a6233a

View file

@ -1,5 +1,6 @@
#!/usr/bin/bash
set -x
set -e
swap_device=
@ -11,5 +12,29 @@ fi
test -n "$swap_device"
mkswap "$swap_device"
swapon "$swap_device"
systemctl unmask tmp.mount
systemctl start tmp.mount
echo "\
n
p
+16G
n
p
2
w
" | fdisk "$swap_device"
mkfs.ext4 "${swap_device}p1"
mount /dev/"$swap_device"p1 /var/lib/copr-rpmbuild
chown root:mock /var/lib/copr-rpmbuild
chmod 775 /var/lib/copr-rpmbuild
mkswap "${swap_device}p2"
swapon "${swap_device}p2"