From a35f7e5e136e44aa2380f502f3f0a2d1c9af7113 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 11 Sep 2015 13:25:40 -0700 Subject: [PATCH] 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 --- createhdds.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/createhdds.sh b/createhdds.sh index 6d164ad..b6cfd58 100755 --- a/createhdds.sh +++ b/createhdds.sh @@ -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