From b7abdf81a93b69b6534a96e5d91154beaf069603 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 10 Aug 2016 07:56:13 -0700 Subject: [PATCH] always use --nogpgcheck when installing packages Summary: Except when running on the pre-upgrade release in the upgrade tests (where GPG check should always be OK). Currently we always need to use --nogpgcheck on Rawhide, and we must also use it on Branched prior to the Bodhi activation point. At present we don't really have any simple way to know when the Bodhi activation point has kicked in. We could assume that it's safe to do GPG checking for 'candidate' (not nightly) composes, but even that isn't 100% safe and isn't really the *right* thing to do. So I think for now it's best to just always use --nogpgcheck , until we come up with a decent way to check for Bodhi enablement, or releng figures things out so we can rely on packages being signed in Rawhide and in Branched before Bodhi enablement. Test Plan: Check the tests all still run, make sure I didn't miss any dnf calls. Reviewers: jskladan, garretraziel Reviewed By: garretraziel Subscribers: tflink Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D964 --- tests/freeipa_password_change_postinstall.pm | 2 +- tests/role_deploy_domain_controller.pm | 2 +- tests/server_cockpit_default_postinstall.pm | 4 ++-- tests/upgrade_run.pm | 11 +---------- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/tests/freeipa_password_change_postinstall.pm b/tests/freeipa_password_change_postinstall.pm index fbdbf816..362e7d2d 100644 --- a/tests/freeipa_password_change_postinstall.pm +++ b/tests/freeipa_password_change_postinstall.pm @@ -41,7 +41,7 @@ sub run { assert_script_run 'printf "loremipsum" | kinit test1'; # change password via CLI (back to batterystaple, as that's what # freeipa_client test expects) - assert_script_run 'dnf -y install freeipa-admintools'; + assert_script_run 'dnf -y --nogpgcheck install freeipa-admintools'; assert_script_run 'printf "batterystaple\nbatterystaple" | ipa user-mod test1 --password'; # check we can kinit again assert_script_run 'printf "batterystaple" | kinit test1'; diff --git a/tests/role_deploy_domain_controller.pm b/tests/role_deploy_domain_controller.pm index a0f2c70a..cb964511 100644 --- a/tests/role_deploy_domain_controller.pm +++ b/tests/role_deploy_domain_controller.pm @@ -24,7 +24,7 @@ sub run { assert_script_run 'dnf config-manager --set-disabled updates-testing'; # we need a lot of entropy for this, and we don't care how good # it is, so let's use haveged - assert_script_run 'dnf -y install haveged', 300; + assert_script_run 'dnf -y --nogpgcheck install haveged', 300; assert_script_run 'systemctl start haveged.service'; # read DNS server IPs from host's /etc/resolv.conf for passing to # rolectl diff --git a/tests/server_cockpit_default_postinstall.pm b/tests/server_cockpit_default_postinstall.pm index a96fde46..428bebb0 100644 --- a/tests/server_cockpit_default_postinstall.pm +++ b/tests/server_cockpit_default_postinstall.pm @@ -11,8 +11,8 @@ sub run { # we don't want updates-testing for validation purposes assert_script_run 'dnf config-manager --set-disabled updates-testing'; # install a desktop and firefox so we can actually try it - assert_script_run 'dnf -y groupinstall "base-x"', 300; - assert_script_run 'dnf -y install firefox', 120; + assert_script_run 'dnf -y --nogpgcheck groupinstall "base-x"', 300; + assert_script_run 'dnf -y --nogpgcheck install firefox', 120; $self->start_cockpit(0); # quit firefox (return to console) send_key "ctrl-q"; diff --git a/tests/upgrade_run.pm b/tests/upgrade_run.pm index 62a2bc9d..6b57778f 100644 --- a/tests/upgrade_run.pm +++ b/tests/upgrade_run.pm @@ -4,19 +4,10 @@ use testapi; sub run { my $self = shift; - my $release = lc(get_var("VERSION")); - # NOTE: this doesn't actually work yet, it's a FIXME in fedorabase - my $milestone = $self->get_milestone; - my $args = "--releasever=${release}"; - # This is excessive - after the Bodhi activation point we don't - # need --nogpgcheck for Branched. But that's hard to detect magically - if ($release eq 'rawhide' or $milestone eq 'branched') { - $args .= " --nogpgcheck"; - } # disable screen blanking (download can take a long time) script_run "setterm -blank 0"; - assert_script_run "dnf -y system-upgrade download ${args}", 6000; + assert_script_run "dnf -y --nogpgcheck system-upgrade download", 6000; upload_logs "/var/log/dnf.log"; upload_logs "/var/log/dnf.rpm.log";