add support to specify dnf releasever during POST #172

Merged
tcooper merged 1 commits from dnf_releasever into develop 2023-05-02 03:10:32 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit b1e46166ec - Show all commits

View File

@ -99,7 +99,7 @@ These variables should be set when tests are scheduled (when running `isos post`
| `KOJITASK` | A Koji task ID. If set, the modified 'update testing' flow for testing scratch builds will be used: post-install tests will be run with the packages from the update, starting from the stable release base disk images | | `KOJITASK` | A Koji task ID. If set, the modified 'update testing' flow for testing scratch builds will be used: post-install tests will be run with the packages from the update, starting from the stable release base disk images |
| `DISTRI` | contains distribution name (should be same as in WebUI, probably `rocky`) | | `DISTRI` | contains distribution name (should be same as in WebUI, probably `rocky`) |
| `VERSION` | contains version of distribution | | `VERSION` | contains version of distribution |
| `FLAVOR` | indicates what type of distribution is used. Three Pungi properties, joined with `-`: `variant`, `type`, and `format`. e.g.: `Server-dvd-iso`. Special value `universal` is used to schedule the group of tests that should be run once each per arch per compose, against the 'best' available ISO | | `FLAVOR` | indicates what type of distribution is used. Three Pungi properties, joined with `-`: `variant`, `type`, and `format`. e.g.: `dvd-iso`. Special value `universal` is used to schedule the group of tests that should be run once each per arch per compose, against the 'best' available ISO |
| `ARCH` | is set to architecture that will be used (`x86_64`, `i686`) | | `ARCH` | is set to architecture that will be used (`x86_64`, `i686`) |
| `BUILD` | contains Pungi compose_id (something like `Rocky-8.4-20210801.n.0`) | | `BUILD` | contains Pungi compose_id (something like `Rocky-8.4-20210801.n.0`) |
| `LABEL` | contains Pungi compose label, if it has one (otherwise should be unset) - e.g `RC-1.5` | | `LABEL` | contains Pungi compose label, if it has one (otherwise should be unset) - e.g `RC-1.5` |
@ -108,3 +108,5 @@ These variables should be set when tests are scheduled (when running `isos post`
| `UP1REL` | the source release for "1-release" upgrade tests (usually but not always same as `CURRREL`) | | `UP1REL` | the source release for "1-release" upgrade tests (usually but not always same as `CURRREL`) |
| `UP2REL` | the source release for "2-release" upgrade tests (currently always same as `PREVREL`) | | `UP2REL` | the source release for "2-release" upgrade tests (currently always same as `PREVREL`) |
| `LOCATION` | contains Pungi base compose location (something like `https://kojipkgs.rockylinux.org/compose/branched/Rocky-8.4-20210801.n.0/compose/`) | | `LOCATION` | contains Pungi base compose location (something like `https://kojipkgs.rockylinux.org/compose/branched/Rocky-8.4-20210801.n.0/compose/`) |
| `DNF_CONTENTDIR` | the value to change `/etc/dnf/vars/contentdir` to (eg. `stg/rocky`) allowing repository reconfiguration to point at staging (usually but not always used with `DNF_RELEASEVER`) |
| `DNF_RELEASEVER` | the value to change `/etc/dnf/vars/releasever` to (eg. `8.8-Beta`) allowing repository reconfiguration to point at a specific release (usually but not always used with `DNF_CONTENTDIR`) |

View File

@ -141,6 +141,7 @@ sub run {
push(@actions, 'abrt') if (get_var("ABRT", '') eq "system"); push(@actions, 'abrt') if (get_var("ABRT", '') eq "system");
push(@actions, 'rootpw') if (get_var("INSTALLER_NO_ROOT")); push(@actions, 'rootpw') if (get_var("INSTALLER_NO_ROOT"));
push(@actions, 'stagingrepos') if (get_var("DNF_CONTENTDIR")); push(@actions, 'stagingrepos') if (get_var("DNF_CONTENTDIR"));
push(@actions, 'releasever') if (get_var("DNF_RELEASEVER"));
# memcheck test doesn't need to reboot at all. Rebooting from GUI # memcheck test doesn't need to reboot at all. Rebooting from GUI
# for lives is unreliable. And if we're already doing something # for lives is unreliable. And if we're already doing something
# else at a console, we may as well reboot from there too # else at a console, we may as well reboot from there too
@ -202,6 +203,9 @@ sub run {
} }
assert_script_run 'printf "stg/rocky\n" > ' . $mount . '/etc/dnf/vars/contentdir'; assert_script_run 'printf "stg/rocky\n" > ' . $mount . '/etc/dnf/vars/contentdir';
} }
if (grep { $_ eq 'releasever' } @actions) {
assert_script_run 'printf "%s\n" "' . get_var("DNF_RELEASEVER") . '" > ' . $mount . '/etc/dnf/vars/releasever';
}
type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions); type_string "reboot\n" if (grep { $_ eq 'reboot' } @actions);
} }