From f9152974757d1d458a812fe1dc4528dd7ad1609c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 10 Dec 2022 09:25:29 -0800 Subject: [PATCH] Use buildroot repo for Rawhide image builds also We recently started using the buildroot repo for Rawhide update tests, but weren't including it in the image build tests. This should include it in all the image build tests. Signed-off-by: Adam Williamson --- tests/_installer_build.pm | 4 +++- tests/_live_build.pm | 14 ++++++++++++-- tests/_ostree_build.pm | 7 +++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/_installer_build.pm b/tests/_installer_build.pm index 3a877da7..98b47689 100644 --- a/tests/_installer_build.pm +++ b/tests/_installer_build.pm @@ -23,7 +23,9 @@ sub run { unless ($version > $currrel) { $cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo"; } - $cmd .= " --repo=/etc/yum.repos.d/advisory.repo --repo=/etc/yum.repos.d/workarounds.repo ./results"; + $cmd .= " --repo=/etc/yum.repos.d/advisory.repo --repo=/etc/yum.repos.d/workarounds.repo"; + $cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel); + $cmd .= " ./results"; assert_script_run $cmd, 2400; # good to have the log around for checks upload_logs "pylorax.log", failok => 1; diff --git a/tests/_live_build.pm b/tests/_live_build.pm index e49fcada..b8410488 100644 --- a/tests/_live_build.pm +++ b/tests/_live_build.pm @@ -44,9 +44,15 @@ sub run { assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg'; assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg'; # add the side repo and workarounds to the config - assert_script_run 'printf "config_opts[\'dnf.conf\'] += \"\"\"\n[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n\"\"\"" >> /etc/mock/openqa.cfg'; + my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n'; + # also the buildroot repo, for Rawhide + if ($version eq $rawrel) { + $repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n'; + } + $repos .= '\"\"\"'; + assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg'; # replace metalink with mirrorlist so we don't get slow mirrors - repos_mirrorlist("/etc/mock/openqa.cfg"); + repos_mirrorlist("/etc/mock/templates/*.tpl"); # upload the config so we can check it's OK upload_logs "/etc/mock/openqa.cfg"; # now check out the kickstarts @@ -57,6 +63,10 @@ sub run { assert_script_run 'echo "repo --name=advisory --baseurl=file:///mnt/update_repo" >> ' . $repoks; # and the workarounds repo assert_script_run 'echo "repo --name=workarounds --baseurl=file:///mnt/workarounds_repo" >> ' . $repoks; + # and the buildroot repo, for Rawhide + if ($version eq $rawrel) { + assert_script_run 'echo "repo --name=koji-rawhide --baseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/\$basearch/" >> ' . $repoks; + } # FIXME: this is a workaround for #2119518, disabling oomd so it # doesn't go crazy killing things my $relnum = get_release_number; diff --git a/tests/_ostree_build.pm b/tests/_ostree_build.pm index 89955399..2ce65998 100644 --- a/tests/_ostree_build.pm +++ b/tests/_ostree_build.pm @@ -38,11 +38,14 @@ sub run { assert_script_run 'git clone https://pagure.io/workstation-ostree-config.git'; assert_script_run 'pushd workstation-ostree-config'; assert_script_run "git checkout ${branch}"; - # now copy the advisory and workaround repo config files in + # now copy the advisory, workaround repo and koji-rawhide config files assert_script_run 'cp /etc/yum.repos.d/advisory.repo .'; assert_script_run 'cp /etc/yum.repos.d/workarounds.repo .'; + assert_script_run 'cp /etc/yum.repos.d/koji-rawhide.repo .' if ($version eq $rawrel); # and add them to the config file - assert_script_run 'sed -i -e "s,repos:,repos:\n - advisory\n - workarounds,g" fedora-' . $lcsubv . '.yaml'; + my $repl = 'repos:\n - advisory\n - workarounds'; + $repl .= '\n - koji-rawhide' if ($version eq $rawrel); + assert_script_run 'sed -i -e "s,repos:,' . $repl . ',g" fedora-' . $lcsubv . '.yaml'; # upload the config so we can check it upload_logs "fedora-$lcsubv.yaml"; assert_script_run 'popd';