mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
ugly hacks to reapply webui changes for the anaconda updates
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
83edfb92b7
commit
b8351f9112
24
lib/utils.pm
24
lib/utils.pm
@ -463,7 +463,8 @@ sub mount_update_image {
|
||||
assert_script_run 'echo "' . $devnode . ' /mnt/updateiso iso9660 loop 0 0" >> /etc/fstab';
|
||||
assert_script_run "mount /mnt/updateiso";
|
||||
}
|
||||
if (get_var("ISO_3") && script_run "grep workaroundsiso /proc/mounts") {
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
if ($advortask ne "FEDORA-2023-eba4fbf4e7" && $advortask ne "FEDORA-2023-3172dea90a" && get_var("ISO_3") && script_run "grep workaroundsiso /proc/mounts") {
|
||||
script_run "mkdir -p /mnt/workaroundsiso";
|
||||
my $devnum = 0;
|
||||
$devnum++ if (get_var("ISO") || get_var("ISO_1"));
|
||||
@ -493,10 +494,27 @@ sub setup_workaround_repo {
|
||||
# the code that builds the image, and the workaround lists, are
|
||||
# in fedora_openqa schedule.py. If there are no workarounds, we
|
||||
# don't get an ISO
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
if ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a") {
|
||||
# return if we already did this
|
||||
return unless script_run "test -d /mnt/workaroundsiso/workarounds_repo";
|
||||
# pull in g-i-s if we're testing anaconda webUI
|
||||
assert_script_run "dnf -y install koji createrepo_c", 300;
|
||||
my $gistask = "105087418";
|
||||
$gistask = "105086686" if ($advortask eq "FEDORA-2023-3172dea90a");
|
||||
my $arch = get_var("ARCH");
|
||||
assert_script_run "mkdir -p /mnt/workaroundsiso/workarounds_repo";
|
||||
assert_script_run "pushd /mnt/workaroundsiso/workarounds_repo";
|
||||
assert_script_run "koji download-task --arch=${arch} --arch=noarch ${gistask}", 300;
|
||||
assert_script_run "createrepo .";
|
||||
assert_script_run "popd";
|
||||
}
|
||||
else {
|
||||
return unless (get_var("ISO_3"));
|
||||
my $version = shift || get_var("VERSION");
|
||||
cleanup_workaround_repo;
|
||||
mount_update_image;
|
||||
}
|
||||
my $version = shift || get_var("VERSION");
|
||||
# write a repo config file, unless this is the support_server test
|
||||
# and it is running on a different release than the update is for
|
||||
# (in this case we need the repo to exist but do not want to use
|
||||
@ -754,7 +772,7 @@ sub gnome_initial_setup {
|
||||
# the pages on F39+ live installs once the anaconda PR is
|
||||
# merged or addressed some other way
|
||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||
unless ($advortask eq "FEDORA-2023-80c0846ede" || $advortask eq "FEDORA-2023-3172dea90a") {
|
||||
unless ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a") {
|
||||
@nexts = grep { $_ ne 'keyboard' } @nexts;
|
||||
@nexts = grep { $_ ne 'timezone' } @nexts;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ sub run {
|
||||
# make the side and workarounds repos and the serial device available inside the mock root
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/updateiso/update_repo\', \'/mnt/updateiso/update_repo\'))" >> /etc/mock/openqa.cfg' if (get_var("ISO_2"));
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workaroundsiso/workarounds_repo\', \'/mnt/workaroundsiso/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if (get_var("ISO_3"));
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workaroundsiso/workarounds_repo\', \'/mnt/workaroundsiso/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if (get_var("ISO_3") || ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a"));
|
||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||
my $tag = get_var("TAG");
|
||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||
@ -55,7 +55,7 @@ sub run {
|
||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/updateiso/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if (get_var("ISO_2"));
|
||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($tag);
|
||||
# and the workaround repo if present
|
||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workaroundsiso/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if (get_var("ISO_3"));
|
||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workaroundsiso/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if (get_var("ISO_3") || ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a"));
|
||||
# also the buildroot repo, for Rawhide
|
||||
if ($version eq $rawrel) {
|
||||
$repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
||||
@ -70,11 +70,17 @@ sub run {
|
||||
assert_script_run 'git clone https://pagure.io/fedora-kickstarts.git';
|
||||
assert_script_run 'cd fedora-kickstarts';
|
||||
assert_script_run "git checkout ${branch}";
|
||||
if ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a") {
|
||||
# re-apply the change to pull in webui
|
||||
assert_script_run 'git config --global user.email "coconut@fedoraproject.org"';
|
||||
assert_script_run 'git config --global user.name "Project Coconut"';
|
||||
assert_script_run "git cherry-pick ce5b31416f0bef6ff70acc3363088a95e2ee5983";
|
||||
}
|
||||
# now add the side repo or tag repo to the appropriate repo ks
|
||||
assert_script_run 'echo "repo --name=advisory --baseurl=file:///mnt/updateiso/update_repo" >> ' . $repoks if (get_var("ISO_2"));
|
||||
assert_script_run 'echo "repo --name=openqa-testtag --baseurl=https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '" >> ' . $repoks if ($tag);
|
||||
# and the workarounds repo
|
||||
assert_script_run 'echo "repo --name=workarounds --baseurl=file:///mnt/workaroundsiso/workarounds_repo" >> ' . $repoks if (get_var("ISO_3"));
|
||||
assert_script_run 'echo "repo --name=workarounds --baseurl=file:///mnt/workaroundsiso/workarounds_repo" >> ' . $repoks if (get_var("ISO_3") || ($advortask eq "FEDORA-2023-eba4fbf4e7" || $advortask eq "FEDORA-2023-3172dea90a"));
|
||||
# and the buildroot repo, for Rawhide
|
||||
if ($version eq $rawrel) {
|
||||
assert_script_run 'echo "repo --name=koji-rawhide --baseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/" >> ' . $repoks;
|
||||
|
Loading…
Reference in New Issue
Block a user