tweak desktop creation commands and comments for F21 and F22

Summary:
For F22 we don't need to remove firewalld, as the approach to
flavor configurations was changed and the conflict wasn't
there any more. On the other hand for F21 we still do, and
we need to use yum, not dnf. So make the command run inside
virt-builder conditional on $VERSION. I figure we still might
want to create F21 images if we want to test F21->F23 upgrades.

Test Plan:
I built the new set of HDDs on BOS with this change,
so we can see if the upgrade tests all run as expected. To
check the F21 images I guess we'd have to poke at 'em with
guestfish or something.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D572
This commit is contained in:
Adam Williamson 2015-09-11 13:25:40 -07:00
parent a0e20004b5
commit a35f7e5e13

View File

@ -59,15 +59,21 @@ _EOF_
function disk_desktop {
version=$1
arch=$2
if [ ${version} -lt 22 ]
then
cmd="yum -y remove firewalld* && yum -y groupinstall 'Fedora Workstation'"
else
cmd="dnf -y groupinstall 'Fedora Workstation'"
fi
echo "Creating disk_f${version}_desktop_${arch}.img..."
# these steps are required
# 1. remove firewalld - firewalld configuration in minimal and desktop are conflicting
# 2. update fedora
# 3. install @Fedora Workstation group
# 1. update fedora
# 2. (F<22) remove firewalld - firewalld configuration in minimal and desktop are conflicting
# 3. install Fedora Workstation group
# 4. add new user on first boot
# 5. use expect to do selinux relabelling and to set password for user
# 5. use expect to set graphical boot target and set password for user
virt-builder fedora-${version} -o disk_f${version}_desktop_${arch}.img --size 20G --arch ${arch} --update \
--run-command "dnf -y remove firewalld* && dnf -y install @'Fedora Workstation'" --selinux-relabel \
--run-command "${cmd}" --selinux-relabel \
--root-password password:weakpassword --firstboot-command 'useradd -m -p "" ejohn' > /dev/null
expect <<_EOF_
log_user 0