mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +00:00
Fix (hackily) install of X, Firefox and haveged on Modular
Modular composes don't include these packages, but we need them to run the web UI tests for FreeIPA and Cockpit. This is the most reasonable hack I can come up with for now: just use a non-modular fedora repo to source these packages when doing Modular compose testing. If we ever reach an all-Modular future, these packages should be available in Modular composes I guess, but for now they are not.
This commit is contained in:
parent
0e18c0fc4f
commit
ce07c418d0
@ -325,6 +325,10 @@ sub _repo_setup_compose {
|
||||
if (get_var("MODULAR")) {
|
||||
# dnf config-manager not currently available on modular composes
|
||||
assert_script_run "sed -i -e 's,enabled=1,enabled=0,g' /etc/yum.repos.d/fedora-modular-server-updates-testing.repo /etc/yum.repos.d/fedora-modular-server-updates.repo";
|
||||
# add a disabled non-modular release repo; we have to use this
|
||||
# to install some things we need for testing which aren't in
|
||||
# Modular Server composes
|
||||
assert_script_run 'printf "[fedora]\nname=Fedora $releasever - $basearch\nmetalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch\nenabled=0\nmetadata_expire=7d\nrepo_gpgcheck=0\ntype=rpm\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch\nskip_if_unavailable=True" > /etc/yum.repos.d/fedora.repo';
|
||||
# FIXME use the compose repo, as per below - easier if the repo
|
||||
# files had commented-out baseurl lines
|
||||
}
|
||||
|
@ -14,12 +14,15 @@ sub run {
|
||||
# test (in which case we're on the 'old' release at this point;
|
||||
# one of the upgrade test modules does repo_setup later)
|
||||
repo_setup() unless get_var("UPGRADE");
|
||||
# use --enablerepo=fedora for Modular compose testing (we need to
|
||||
# create and use a non-Modular repo to get some packages which
|
||||
# aren't in Modular Server composes)
|
||||
my $extraparams = '';
|
||||
$extraparams = '--enablerepo=fedora' if (get_var("MODULAR"));
|
||||
# we need a lot of entropy for this, and we don't care how good
|
||||
# it is, so let's use haveged
|
||||
unless (get_var("MODULAR")) {
|
||||
assert_script_run 'dnf -y install haveged', 300;
|
||||
assert_script_run 'systemctl start haveged.service';
|
||||
}
|
||||
assert_script_run "dnf ${extraparams} -y install haveged", 300;
|
||||
assert_script_run 'systemctl start haveged.service';
|
||||
# read DNS server IPs from host's /etc/resolv.conf for passing to
|
||||
# rolectl
|
||||
my @forwards = get_host_dns();
|
||||
|
@ -11,13 +11,18 @@ sub run {
|
||||
assert_script_run 'firewall-cmd --query-service cockpit';
|
||||
# use compose repo, disable u-t, etc.
|
||||
repo_setup();
|
||||
# use --enablerepo=fedora for Modular compose testing (we need to
|
||||
# create and use a non-Modular repo to get some packages which
|
||||
# aren't in Modular Server composes)
|
||||
my $extraparams = '';
|
||||
$extraparams = '--enablerepo=fedora' if (get_var("MODULAR"));
|
||||
# install a desktop and firefox so we can actually try it
|
||||
assert_script_run 'dnf -y groupinstall "base-x"', 300;
|
||||
assert_script_run "dnf ${extraparams} -y groupinstall 'base-x'", 300;
|
||||
# FIXME: this should probably be in base-x...X seems to fail without
|
||||
assert_script_run 'dnf -y install libglvnd-egl', 120;
|
||||
assert_script_run "dnf ${extraparams} -y install libglvnd-egl", 120;
|
||||
# try to avoid random weird font selection happening
|
||||
assert_script_run 'dnf -y install dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts', 120;
|
||||
assert_script_run 'dnf -y install firefox', 120;
|
||||
assert_script_run "dnf ${extraparams} -y install dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts", 120;
|
||||
assert_script_run "dnf ${extraparams} -y install firefox", 120;
|
||||
start_cockpit(0);
|
||||
# quit firefox (return to console)
|
||||
send_key "ctrl-q";
|
||||
|
Loading…
Reference in New Issue
Block a user