1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-23 22:43:07 +00:00

Remove last vestiges of modularity stuff

This comes with a subtle behavioural change that we no longer
pass --nogpgcheck for upgrade tests, but we didn't really *mean*
to do that for anything but Rawhide, and it *shouldn't* be
necessary for Rawhide now, so let's see if everything is fine
without it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-08-14 07:55:24 -04:00
parent c2996c5ce7
commit 6a9ab101bf
4 changed files with 2 additions and 77 deletions

View File

@ -1,46 +0,0 @@
package modularity;
use strict;
use base 'Exporter';
use Exporter;
use lockapi;
use testapi;
use utils;
our @EXPORT = qw(parse_module_list is_listed);
# This subroutine takes the output from the dnf module list command
# and deletes all unnecessary stuff and returns an array of hash
# references where each hash consists of (module, stream, profile).
# The subroutine only recognizes one profile but it is enough
# for the sake of the modularity testing.
sub parse_module_list {
my $output = shift;
my @output_lines = split(/\n/, $output);
my @parsed_list;
foreach my $line (@output_lines) {
my ($module, $stream, $profile) = split(/\s+/, $line);
unless ($module =~ /Fedora|Last|Hint|Name|^$/) {
$profile =~ s/,$//;
my %module = ("module" => $module, "stream" => $stream, "profile" => $profile);
push(@parsed_list, \%module);
}
}
return @parsed_list;
}
# This subroutine iterates over the given list of module hashes and returns True
# if it finds it in the list.
sub is_listed {
my ($module, $stream, $listref) = @_;
my $found = 0;
foreach (@{$listref}) {
if ($_->{module} eq $module and $_->{stream} eq $stream) {
$found = 1;
}
}
return $found;
}

View File

@ -7,7 +7,7 @@ use Exporter;
use lockapi; use lockapi;
use testapi qw(is_serial_terminal :DEFAULT); use testapi qw(is_serial_terminal :DEFAULT);
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround/; our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround/;
# We introduce this global variable to hold the list of applications that have # We introduce this global variable to hold the list of applications that have
@ -500,10 +500,6 @@ sub disable_updates_repos {
# on dnf 4 vs. dnf 5 and really sed is just as easy # on dnf 4 vs. dnf 5 and really sed is just as easy
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing.repo'; assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing.repo';
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates.repo' if ($args{both}); assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates.repo' if ($args{both});
unless (script_run 'test -f /etc/yum.repos.d/fedora-updates-testing-modular.repo') {
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-testing-modular.repo';
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/fedora-updates-modular.repo' if ($args{both});
}
} }
sub _repo_setup_compose { sub _repo_setup_compose {
@ -518,12 +514,11 @@ sub _repo_setup_compose {
my $location = get_var("LOCATION"); my $location = get_var("LOCATION");
return unless $location; return unless $location;
disable_updates_repos(both => 1); disable_updates_repos(both => 1);
# we use script_run here as the rawhide and modular repo files # we use script_run here as the rawhide repo files
# won't always exist and we don't want to bother testing or # won't always exist and we don't want to bother testing or
# predicting their existence; assert_script_run doesn't buy you # predicting their existence; assert_script_run doesn't buy you
# much with sed as it'll return 0 even if it replaced nothing # much with sed as it'll return 0 even if it replaced nothing
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^mirrorlist,#mirrorlist,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Everything/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Everything/source,g' /etc/yum.repos.d/{fedora,fedora-rawhide}.repo", 0; script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^mirrorlist,#mirrorlist,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Everything/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Everything/source,g' /etc/yum.repos.d/{fedora,fedora-rawhide}.repo", 0;
script_run "sed -i -e 's,^metalink,#metalink,g' -e 's,^mirrorlist,#mirrorlist,g' -e 's,^#baseurl.*basearch,baseurl=${location}/Modular/\$basearch,g' -e 's,^#baseurl.*source,baseurl=${location}/Modular/source,g' /etc/yum.repos.d/{fedora-modular,fedora-rawhide-modular}.repo", 0;
# this can be used for debugging if something is going wrong # this can be used for debugging if something is going wrong
# unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') { # unless (script_run 'pushd /etc/yum.repos.d && tar czvf yumreposd.tar.gz * && popd') {
@ -1112,19 +1107,6 @@ sub check_desktop {
} }
} }
sub download_modularity_tests {
# Download the modularity test script, place in the system and then
# modify the access rights to make it executable.
my ($whitelist) = @_;
# we need python3-yaml for the script to run
assert_script_run 'dnf -y install python3-yaml', 180;
assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o /root/test.py https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/modular_functions.py', timeout => 180;
if ($whitelist eq 'whitelist') {
assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o /root/whitelist https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/whitelist', timeout => 180;
}
assert_script_run 'chmod 755 /root/test.py';
}
sub quit_firefox { sub quit_firefox {
# Quit Firefox, handling the 'close multiple tabs' warning screen if # Quit Firefox, handling the 'close multiple tabs' warning screen if
# it shows up. Expects to quit to a recognizable console # it shows up. Expects to quit to a recognizable console

View File

@ -64,13 +64,6 @@ sub run {
# For Gnome desktop only. # For Gnome desktop only.
if ($desktop eq "gnome") { if ($desktop eq "gnome") {
# FIXME workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2268590
# upgrade fails if modular repo definitions are present
# remove when that is fixed
unless (script_run "ls /etc/yum.repos.d/*modul*") {
record_soft_failure "Modular repos present! Upgrade will fail, so removing";
assert_script_run "rm -f /etc/yum.repos.d/*modul*";
}
# Switch to a user account # Switch to a user account
enter_cmd("su -l $user"); enter_cmd("su -l $user");
# Navigate to the version file directory # Navigate to the version file directory

View File

@ -14,10 +14,6 @@ sub run {
cleanup_workaround_repo; cleanup_workaround_repo;
repo_setup(); repo_setup();
my $params = "-y --releasever=${relnum}"; my $params = "-y --releasever=${relnum}";
if ($relnum > 38) {
# FIXME can probably be removed when F38 goes EOL
$params .= " --nogpgcheck --disablerepo=*modular*";
}
if (script_run "dnf ${params} system-upgrade download", 6000) { if (script_run "dnf ${params} system-upgrade download", 6000) {
record_soft_failure "dnf failed so retry with --allowerasing"; record_soft_failure "dnf failed so retry with --allowerasing";