2019-04-12 18:17:28 +00:00
|
|
|
#!/bin/sh -eux
|
|
|
|
|
|
|
|
SRPM="$1"
|
|
|
|
|
|
|
|
# Grow root partition to make room for images. This only works on Fedora right now.
|
|
|
|
echo ", +" | sfdisk -N 2 -f /dev/vda
|
|
|
|
partprobe
|
2019-05-21 15:43:32 +00:00
|
|
|
pvs --noheadings -opv_name | xargs pvresize
|
|
|
|
rootlv=$(findmnt --noheadings -oSOURCE /)
|
|
|
|
lvresize $rootlv -l+100%FREE -r
|
2019-04-12 18:17:28 +00:00
|
|
|
|
2019-05-21 15:17:15 +00:00
|
|
|
rm -rf build-results
|
2019-04-12 18:17:28 +00:00
|
|
|
su builder -c "/usr/bin/mock --no-clean --resultdir build-results --rebuild $SRPM"
|
|
|
|
|
|
|
|
packages=$(find build-results -name '*.rpm' -not -name '*.src.rpm')
|
2019-05-21 15:17:15 +00:00
|
|
|
rpm -e --verbose $(basename -a ${packages[@]} | sed 's/-[0-9].*.rpm$//') || true
|
2019-04-12 18:17:28 +00:00
|
|
|
yum install -y beakerlib $packages
|
|
|
|
|
|
|
|
systemctl enable lorax-composer.socket
|
|
|
|
systemctl enable docker.service
|