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
tcooper commented 2023-04-30 18:48:24 +00:00 (Migrated from github.com)

Description

This PR will add support for providing an alternate location for DNF via the releasever variable through modification of /etc/dnf/vars/releasever. This feature is activated by POST with DNF_RELEASEVER=<some_value> and will often be used in concert with the DNF_CONTENTDIR POST variable to alter the DNF repository location to point at Rocky Linux staging repositories after repository definition files have been installed.

On acceptance the PR should also close #169 without merge.

How Has This Been Tested?

  • Tested with POSTs in openQA for 8.8-Beta for all standard flavors...
openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-boot.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=boot-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0

openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-minimal.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=minimal-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0

openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=package-set VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0

openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=dvd-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0

openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=universal VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0

In aggregate test suite results are visible in the following build and do not deviate significantly from non Beta POSTs...

20230501-Rocky-8.8-Beta-x86_64.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
# Description This PR will add support for providing an alternate location for DNF via the `releasever` variable through modification of `/etc/dnf/vars/releasever`. This feature is activated by `POST` with `DNF_RELEASEVER=<some_value>` and will often be used in concert with the `DNF_CONTENTDIR` `POST` variable to alter the DNF repository location to point at Rocky Linux staging repositories after repository definition files have been installed. On acceptance the PR should also close #169 without merge. # How Has This Been Tested? - Tested with `POST`s in openQA for 8.8-Beta for all standard flavors... ``` openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-boot.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=boot-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0 openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-minimal.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=minimal-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0 openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=package-set VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0 openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=dvd-iso VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0 openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky CASEDIR=https://github.com/tcooper/os-autoinst-distri-rocky.git#dnf_releasever DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta FLAVOR=universal VERSION=8.8 CURRREL=8 GRUB=ip=dhcp GRUBADD=inst.repo=https://download.rockylinux.org/stg/rocky/8.8-Beta/BaseOS/x86_64/os BUILD=20230501-Rocky-8.8-Beta-x86_64.0 ``` In aggregate test suite results are visible in the following build and do not deviate significantly from non Beta `POST`s... [20230501-Rocky-8.8-Beta-x86_64.0](https://openqa.rockylinux.org/tests/overview?distri=rocky&version=8.8&build=20230501-Rocky-8.8-Beta-x86_64.0&groupid=2) # Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] Any dependent changes have been merged and published in downstream modules
AlanMarshall (Migrated from github.com) approved these changes 2023-05-01 11:39:21 +00:00
AlanMarshall (Migrated from github.com) left a comment

Tested using:

openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky FLAVOR=package-set VERSION=8.8 CURREL=8 DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta BUILD=-"$(date +%Y%m%d.%H%M%S).0"-8.8-beta-package-set-#172

Result: All Pass and results page shows:

Screenshot 2023-05-01 at 12-28-16 openQA rocky-8 8-package-set-x86_64-Build-20230501 115410 0-8 8-beta-package-set-_172-install_package_set_graphical-server@64bit test results

All correct, nice job!

Tested using: ``` openqa-cli api -X POST isos ISO=Rocky-8.8-x86_64-dvd1.iso ARCH=x86_64 DISTRI=rocky FLAVOR=package-set VERSION=8.8 CURREL=8 DNF_CONTENTDIR=stg DNF_RELEASEVER=8.8-Beta BUILD=-"$(date +%Y%m%d.%H%M%S).0"-8.8-beta-package-set-#172 ``` Result: All Pass and results page shows: ![Screenshot 2023-05-01 at 12-28-16 openQA rocky-8 8-package-set-x86_64-Build-20230501 115410 0-8 8-beta-package-set-_172-install_package_set_graphical-server@64bit test results](https://user-images.githubusercontent.com/3416699/235446506-94fd669e-0806-4956-9ab7-771bba3f8b8c.png) All correct, nice job!
akatch (Migrated from github.com) approved these changes 2023-05-02 03:10:20 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: testing/os-autoinst-distri-rocky-migrated#172
No description provided.