forked from rpms/leapp-repository
9503 lines
358 KiB
Diff
9503 lines
358 KiB
Diff
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
|
||
index 4b07e4b3..2ac322e5 100644
|
||
--- a/.github/workflows/codespell.yml
|
||
+++ b/.github/workflows/codespell.yml
|
||
@@ -14,7 +14,7 @@ jobs:
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- - uses: actions/checkout@v5
|
||
+ - uses: actions/checkout@v6
|
||
- uses: codespell-project/actions-codespell@v2
|
||
with:
|
||
ignore_words_list: ro,fo,couldn,repositor,zeor,bootup
|
||
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
|
||
index 6c81713c..3b92d771 100644
|
||
--- a/.github/workflows/differential-shellcheck.yml
|
||
+++ b/.github/workflows/differential-shellcheck.yml
|
||
@@ -19,7 +19,7 @@ jobs:
|
||
|
||
steps:
|
||
- name: Repository checkout
|
||
- uses: actions/checkout@v5
|
||
+ uses: actions/checkout@v6
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
|
||
index d1b8fb2a..ddaa445b 100644
|
||
--- a/.github/workflows/unit-tests.yml
|
||
+++ b/.github/workflows/unit-tests.yml
|
||
@@ -52,7 +52,7 @@ jobs:
|
||
|
||
steps:
|
||
- name: Checkout code
|
||
- uses: actions/checkout@v5
|
||
+ uses: actions/checkout@v6
|
||
with:
|
||
# NOTE(ivasilev) fetch-depth 0 is critical here as leapp deps discovery depends on specific substring in
|
||
# commit message and default 1 option will get us just merge commit which has an unrelevant message.
|
||
diff --git a/.gitignore b/.gitignore
|
||
index 0bb92d3d..a04c7ded 100644
|
||
--- a/.gitignore
|
||
+++ b/.gitignore
|
||
@@ -115,6 +115,7 @@ ENV/
|
||
|
||
# visual studio code configuration
|
||
.vscode
|
||
+*.code-workspace
|
||
|
||
# pycharm
|
||
.idea
|
||
diff --git a/ci/.gitignore b/ci/.gitignore
|
||
new file mode 100644
|
||
index 00000000..e6f97f0f
|
||
--- /dev/null
|
||
+++ b/ci/.gitignore
|
||
@@ -0,0 +1 @@
|
||
+**/.vagrant
|
||
diff --git a/ci/ansible/ansible.cfg b/ci/ansible/ansible.cfg
|
||
new file mode 100644
|
||
index 00000000..d5c13036
|
||
--- /dev/null
|
||
+++ b/ci/ansible/ansible.cfg
|
||
@@ -0,0 +1,4 @@
|
||
+[defaults]
|
||
+callbacks_enabled=ansible.posix.profile_tasks
|
||
+stdout_callback=community.general.yaml
|
||
+pipelining=True
|
||
diff --git a/ci/ansible/docker-ce.yaml b/ci/ansible/docker-ce.yaml
|
||
new file mode 100644
|
||
index 00000000..bba5f3df
|
||
--- /dev/null
|
||
+++ b/ci/ansible/docker-ce.yaml
|
||
@@ -0,0 +1,6 @@
|
||
+---
|
||
+- name: Docker CE configuration
|
||
+ hosts: all
|
||
+ become: yes
|
||
+ roles:
|
||
+ - docker-ce
|
||
diff --git a/ci/ansible/minimal.yaml b/ci/ansible/minimal.yaml
|
||
new file mode 100644
|
||
index 00000000..517cc81b
|
||
--- /dev/null
|
||
+++ b/ci/ansible/minimal.yaml
|
||
@@ -0,0 +1,6 @@
|
||
+---
|
||
+- name: Minimal configuration
|
||
+ hosts: all
|
||
+ become: yes
|
||
+ roles:
|
||
+ - minimal
|
||
diff --git a/ci/ansible/requirements.yaml b/ci/ansible/requirements.yaml
|
||
new file mode 100644
|
||
index 00000000..13ca0224
|
||
--- /dev/null
|
||
+++ b/ci/ansible/requirements.yaml
|
||
@@ -0,0 +1,3 @@
|
||
+collections:
|
||
+ - name: community.general
|
||
+ - name: ansible.posix
|
||
diff --git a/ci/ansible/roles/docker-ce/README.md b/ci/ansible/roles/docker-ce/README.md
|
||
new file mode 100644
|
||
index 00000000..860444b1
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/README.md
|
||
@@ -0,0 +1,43 @@
|
||
+Docker CE Install and configuration
|
||
+=========
|
||
+
|
||
+Install latest version of Docker CE Engine form upstream repository. Start and enable services after installation.
|
||
+
|
||
+Requirements
|
||
+------------
|
||
+
|
||
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||
+
|
||
+Role Variables
|
||
+--------------
|
||
+
|
||
+`docker_ce_repo_checksum` in defaults/main.yaml. SHA512 Checksum of the docker-ce.repo file.
|
||
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||
+
|
||
+Dependencies
|
||
+------------
|
||
+
|
||
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||
+
|
||
+Example Playbook
|
||
+----------------
|
||
+
|
||
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||
+
|
||
+ - hosts: all
|
||
+ become: yes
|
||
+ roles:
|
||
+ - role: docker
|
||
+ vars:
|
||
+ docker_ce_repo_checksum: sha512:XXXX # You can provide the new checksum if the default one not actual
|
||
+
|
||
+
|
||
+License
|
||
+-------
|
||
+
|
||
+GPL-3.0-or-later
|
||
+
|
||
+Author Information
|
||
+------------------
|
||
+
|
||
+AlmaLinux OS Foundation
|
||
diff --git a/ci/ansible/roles/docker-ce/defaults/main.yaml b/ci/ansible/roles/docker-ce/defaults/main.yaml
|
||
new file mode 100644
|
||
index 00000000..d0fd0c09
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/defaults/main.yaml
|
||
@@ -0,0 +1,3 @@
|
||
+---
|
||
+# defaults file for docker-ce
|
||
+docker_ce_repo_checksum: sha512:1de0b99cbb427e974144f226451711dc491caef6b1256cb599ff307a687ba2d7dd959a016d4e4cfdd4acbd83423ba1f78fa89db61bab35351e35f1152aedaf5c
|
||
diff --git a/ci/ansible/roles/docker-ce/handlers/main.yaml b/ci/ansible/roles/docker-ce/handlers/main.yaml
|
||
new file mode 100644
|
||
index 00000000..a7236219
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/handlers/main.yaml
|
||
@@ -0,0 +1,2 @@
|
||
+---
|
||
+# handlers file for docker-ce
|
||
diff --git a/ci/ansible/roles/docker-ce/meta/main.yaml b/ci/ansible/roles/docker-ce/meta/main.yaml
|
||
new file mode 100644
|
||
index 00000000..aa67ded8
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/meta/main.yaml
|
||
@@ -0,0 +1,25 @@
|
||
+galaxy_info:
|
||
+ author: AlmaLinux OS Community
|
||
+ description: Install and configure Docker CE Engine
|
||
+ company: AlmaLinux OS Foundation
|
||
+
|
||
+ license: GPL-3.0-or-later
|
||
+
|
||
+ min_ansible_version: 2.11
|
||
+
|
||
+ platforms:
|
||
+ - name: EL
|
||
+ versions:
|
||
+ - 7
|
||
+ - 8
|
||
+ - 9
|
||
+
|
||
+ galaxy_tags:
|
||
+ - docker
|
||
+ - el7
|
||
+ - el8
|
||
+ - el9
|
||
+ - almalinux
|
||
+
|
||
+dependencies:
|
||
+ - minimal
|
||
diff --git a/ci/ansible/roles/docker-ce/tasks/install_docker_el7.yaml b/ci/ansible/roles/docker-ce/tasks/install_docker_el7.yaml
|
||
new file mode 100644
|
||
index 00000000..320477af
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tasks/install_docker_el7.yaml
|
||
@@ -0,0 +1,11 @@
|
||
+---
|
||
+# Install Docker
|
||
+- name: Install Docker CE Stable
|
||
+ ansible.builtin.yum:
|
||
+ name:
|
||
+ - docker-ce
|
||
+ - docker-ce-cli
|
||
+ - containerd.io
|
||
+ - docker-compose-plugin
|
||
+ update_cache: yes
|
||
+ state: present
|
||
diff --git a/ci/ansible/roles/docker-ce/tasks/install_docker_el8.yaml b/ci/ansible/roles/docker-ce/tasks/install_docker_el8.yaml
|
||
new file mode 100644
|
||
index 00000000..d44a202a
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tasks/install_docker_el8.yaml
|
||
@@ -0,0 +1,11 @@
|
||
+---
|
||
+# Install Docker
|
||
+- name: Install Docker CE Stable
|
||
+ ansible.builtin.dnf:
|
||
+ name:
|
||
+ - docker-ce
|
||
+ - docker-ce-cli
|
||
+ - containerd.io
|
||
+ - docker-compose-plugin
|
||
+ update_cache: yes
|
||
+ state: present
|
||
diff --git a/ci/ansible/roles/docker-ce/tasks/main.yaml b/ci/ansible/roles/docker-ce/tasks/main.yaml
|
||
new file mode 100644
|
||
index 00000000..989af23f
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tasks/main.yaml
|
||
@@ -0,0 +1,38 @@
|
||
+---
|
||
+# tasks file for docker-ce
|
||
+- name: Add Docker CE repository
|
||
+ ansible.builtin.get_url:
|
||
+ url: https://download.docker.com/linux/centos/docker-ce.repo
|
||
+ dest: /etc/yum.repos.d/docker-ce.repo
|
||
+ checksum: "{{ docker_ce_repo_checksum }}"
|
||
+ owner: root
|
||
+ group: root
|
||
+ mode: '0644'
|
||
+ seuser: system_u
|
||
+ serole: object_r
|
||
+ setype: system_conf_t
|
||
+
|
||
+- name: Remove older versions of Docker on EL7
|
||
+ ansible.builtin.include_tasks: remove_old_docker_el7.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '7'
|
||
+
|
||
+- name: Remove older versions of Docker on >= EL8
|
||
+ ansible.builtin.include_tasks: remove_old_docker_el8.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '8'
|
||
+
|
||
+- name: Install Docker CE Stable on EL7
|
||
+ ansible.builtin.include_tasks: install_docker_el7.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '7'
|
||
+
|
||
+- name: Install Docker CE Stable on >= EL8
|
||
+ ansible.builtin.include_tasks: install_docker_el8.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '8'
|
||
+
|
||
+- name: Start and Enable Docker services
|
||
+ ansible.builtin.systemd:
|
||
+ name: "{{ item }}"
|
||
+ enabled: yes
|
||
+ state: started
|
||
+ loop:
|
||
+ - docker.service
|
||
+ - containerd.service
|
||
diff --git a/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el7.yaml b/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el7.yaml
|
||
new file mode 100644
|
||
index 00000000..db9e0960
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el7.yaml
|
||
@@ -0,0 +1,15 @@
|
||
+---
|
||
+# Remove older versions of Docker
|
||
+- name: Uninstall older versions of Docker
|
||
+ ansible.builtin.yum:
|
||
+ name:
|
||
+ - docker
|
||
+ - docker-client
|
||
+ - docker-client-latest
|
||
+ - docker-common
|
||
+ - docker-latest
|
||
+ - docker-latest-logrotate
|
||
+ - docker-logrotate
|
||
+ - docker-engine
|
||
+ autoremove: yes
|
||
+ state: absent
|
||
diff --git a/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el8.yaml b/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el8.yaml
|
||
new file mode 100644
|
||
index 00000000..88f860cf
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tasks/remove_old_docker_el8.yaml
|
||
@@ -0,0 +1,15 @@
|
||
+---
|
||
+# Remove older versions of Docker
|
||
+- name: Uninstall older versions of Docker
|
||
+ ansible.builtin.dnf:
|
||
+ name:
|
||
+ - docker
|
||
+ - docker-client
|
||
+ - docker-client-latest
|
||
+ - docker-common
|
||
+ - docker-latest
|
||
+ - docker-latest-logrotate
|
||
+ - docker-logrotate
|
||
+ - docker-engine
|
||
+ autoremove: yes
|
||
+ state: absent
|
||
diff --git a/ci/ansible/roles/docker-ce/tests/inventory b/ci/ansible/roles/docker-ce/tests/inventory
|
||
new file mode 100644
|
||
index 00000000..878877b0
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tests/inventory
|
||
@@ -0,0 +1,2 @@
|
||
+localhost
|
||
+
|
||
diff --git a/ci/ansible/roles/docker-ce/tests/test.yaml b/ci/ansible/roles/docker-ce/tests/test.yaml
|
||
new file mode 100644
|
||
index 00000000..789ba96e
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/tests/test.yaml
|
||
@@ -0,0 +1,5 @@
|
||
+---
|
||
+- hosts: localhost
|
||
+ remote_user: root
|
||
+ roles:
|
||
+ - docker-ce
|
||
diff --git a/ci/ansible/roles/docker-ce/vars/main.yaml b/ci/ansible/roles/docker-ce/vars/main.yaml
|
||
new file mode 100644
|
||
index 00000000..7ff8a18f
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/docker-ce/vars/main.yaml
|
||
@@ -0,0 +1,2 @@
|
||
+---
|
||
+# vars file for docker-ce
|
||
diff --git a/ci/ansible/roles/minimal/README.md b/ci/ansible/roles/minimal/README.md
|
||
new file mode 100644
|
||
index 00000000..225dd44b
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/README.md
|
||
@@ -0,0 +1,38 @@
|
||
+Role Name
|
||
+=========
|
||
+
|
||
+A brief description of the role goes here.
|
||
+
|
||
+Requirements
|
||
+------------
|
||
+
|
||
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||
+
|
||
+Role Variables
|
||
+--------------
|
||
+
|
||
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||
+
|
||
+Dependencies
|
||
+------------
|
||
+
|
||
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||
+
|
||
+Example Playbook
|
||
+----------------
|
||
+
|
||
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||
+
|
||
+ - hosts: servers
|
||
+ roles:
|
||
+ - { role: username.rolename, x: 42 }
|
||
+
|
||
+License
|
||
+-------
|
||
+
|
||
+BSD
|
||
+
|
||
+Author Information
|
||
+------------------
|
||
+
|
||
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||
diff --git a/ci/ansible/roles/minimal/defaults/main.yaml b/ci/ansible/roles/minimal/defaults/main.yaml
|
||
new file mode 100644
|
||
index 00000000..4a5a46cd
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/defaults/main.yaml
|
||
@@ -0,0 +1,2 @@
|
||
+---
|
||
+# defaults file for minimal
|
||
diff --git a/ci/ansible/roles/minimal/handlers/main.yaml b/ci/ansible/roles/minimal/handlers/main.yaml
|
||
new file mode 100644
|
||
index 00000000..89105fec
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/handlers/main.yaml
|
||
@@ -0,0 +1,2 @@
|
||
+---
|
||
+# handlers file for minimal
|
||
diff --git a/ci/ansible/roles/minimal/meta/main.yaml b/ci/ansible/roles/minimal/meta/main.yaml
|
||
new file mode 100644
|
||
index 00000000..ecc81ab7
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/meta/main.yaml
|
||
@@ -0,0 +1,23 @@
|
||
+galaxy_info:
|
||
+ author: AlmaLinux OS Community
|
||
+ description: Minimal configuration for ELevate
|
||
+ company: AlmaLinux OS Foundation
|
||
+
|
||
+ license: GPL-3.0-or-later
|
||
+
|
||
+ min_ansible_version: 2.11
|
||
+
|
||
+ platforms:
|
||
+ - name: EL
|
||
+ versions:
|
||
+ - 7
|
||
+ - 8
|
||
+ - 9
|
||
+
|
||
+ galaxy_tags:
|
||
+ - elevate
|
||
+ - upgrade
|
||
+ - cleanup
|
||
+ - el7
|
||
+ - el8
|
||
+ - el9
|
||
diff --git a/ci/ansible/roles/minimal/tasks/cleanup_el7.yaml b/ci/ansible/roles/minimal/tasks/cleanup_el7.yaml
|
||
new file mode 100644
|
||
index 00000000..1b4af7c6
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tasks/cleanup_el7.yaml
|
||
@@ -0,0 +1,10 @@
|
||
+---
|
||
+# Remove old kernels
|
||
+- name: Install the yum-utils
|
||
+ ansible.builtin.yum:
|
||
+ name: yum-utils
|
||
+ state: present
|
||
+ update_cache: yes
|
||
+
|
||
+- name: Remove the old kernels on EL7
|
||
+ ansible.builtin.command: package-cleanup -y --oldkernels --count=1
|
||
diff --git a/ci/ansible/roles/minimal/tasks/cleanup_el8.yaml b/ci/ansible/roles/minimal/tasks/cleanup_el8.yaml
|
||
new file mode 100644
|
||
index 00000000..56aeefd3
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tasks/cleanup_el8.yaml
|
||
@@ -0,0 +1,7 @@
|
||
+---
|
||
+# Remove old kernels
|
||
+- name: Remove old kernels on EL8
|
||
+ ansible.builtin.command: dnf -y remove --oldinstallonly
|
||
+ register: removeoldkernels
|
||
+ changed_when: removeoldkernels.rc == 0
|
||
+ failed_when: removeoldkernels.rc > 1
|
||
diff --git a/ci/ansible/roles/minimal/tasks/main.yaml b/ci/ansible/roles/minimal/tasks/main.yaml
|
||
new file mode 100644
|
||
index 00000000..8c1b35bd
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tasks/main.yaml
|
||
@@ -0,0 +1,21 @@
|
||
+---
|
||
+# tasks file for minimal
|
||
+- name: Upgrade the packages on EL7
|
||
+ ansible.builtin.include_tasks: upgrade_el7.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '7'
|
||
+
|
||
+- name: Upgrade the packages on EL8
|
||
+ ansible.builtin.include_tasks: upgrade_el8.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '8'
|
||
+
|
||
+- name: Reboot the system
|
||
+ ansible.builtin.reboot:
|
||
+ when: upgrade_status is changed
|
||
+
|
||
+- name: Cleanup the older kernels on EL7
|
||
+ ansible.builtin.include_tasks: cleanup_el7.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '7'
|
||
+
|
||
+- name: Cleanup the older kernels on El8
|
||
+ ansible.builtin.include_tasks: cleanup_el8.yaml
|
||
+ when: ansible_facts['distribution_major_version'] == '8'
|
||
diff --git a/ci/ansible/roles/minimal/tasks/upgrade_el7.yaml b/ci/ansible/roles/minimal/tasks/upgrade_el7.yaml
|
||
new file mode 100644
|
||
index 00000000..7648a586
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tasks/upgrade_el7.yaml
|
||
@@ -0,0 +1,8 @@
|
||
+---
|
||
+# Upgrade the system
|
||
+- name: Upgrade the system
|
||
+ ansible.builtin.yum:
|
||
+ name: "*"
|
||
+ state: latest
|
||
+ update_cache: yes
|
||
+ register: upgrade_status
|
||
diff --git a/ci/ansible/roles/minimal/tasks/upgrade_el8.yaml b/ci/ansible/roles/minimal/tasks/upgrade_el8.yaml
|
||
new file mode 100644
|
||
index 00000000..0d4a5d2a
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tasks/upgrade_el8.yaml
|
||
@@ -0,0 +1,8 @@
|
||
+---
|
||
+# Upgrade the system
|
||
+- name: Upgrade the system
|
||
+ ansible.builtin.dnf:
|
||
+ name: "*"
|
||
+ state: latest
|
||
+ update_cache: yes
|
||
+ register: upgrade_status
|
||
diff --git a/ci/ansible/roles/minimal/tests/inventory b/ci/ansible/roles/minimal/tests/inventory
|
||
new file mode 100644
|
||
index 00000000..878877b0
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tests/inventory
|
||
@@ -0,0 +1,2 @@
|
||
+localhost
|
||
+
|
||
diff --git a/ci/ansible/roles/minimal/tests/test.yaml b/ci/ansible/roles/minimal/tests/test.yaml
|
||
new file mode 100644
|
||
index 00000000..db5c4c17
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/tests/test.yaml
|
||
@@ -0,0 +1,5 @@
|
||
+---
|
||
+- hosts: localhost
|
||
+ remote_user: root
|
||
+ roles:
|
||
+ - minimal
|
||
diff --git a/ci/ansible/roles/minimal/vars/main.yaml b/ci/ansible/roles/minimal/vars/main.yaml
|
||
new file mode 100644
|
||
index 00000000..b24df080
|
||
--- /dev/null
|
||
+++ b/ci/ansible/roles/minimal/vars/main.yaml
|
||
@@ -0,0 +1,2 @@
|
||
+---
|
||
+# vars file for minimal
|
||
diff --git a/ci/jenkins/ELevate_el7toel8_Development.jenkinsfile b/ci/jenkins/ELevate_el7toel8_Development.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..317209ef
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el7toel8_Development.jenkinsfile
|
||
@@ -0,0 +1,249 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'LEAPP_SRC_GIT_USER', defaultValue: 'AlmaLinux', description: 'Input name of Git user of LEAPP source', trim: true)
|
||
+ string(name: 'LEAPP_SRC_GIT_BRANCH', defaultValue: 'almalinux', description: 'Input name of Git branch of LEAPP source', trim: true)
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ sh script: 'git clone https://github.com/AlmaLinux/leapp-data.git --branch devel',
|
||
+ label: 'Fetch devel version of leapp data'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el7toel8_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum-config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"",
|
||
+ label: 'Add testing repo of ELevate'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y leapp-upgrade\"",
|
||
+ label: 'Install testing version of ELevate'
|
||
+ sh script: "vagrant upload ci/scripts/install_elevate_dev.sh install_elevate_dev.sh $targetDistro.vmName",
|
||
+ label: 'Upload installer script to VMs'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo bash install_elevate_dev.sh -u ${LEAPP_SRC_GIT_USER} -b ${LEAPP_SRC_GIT_BRANCH}\"",
|
||
+ label: 'Install development version of ELevate',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant upload leapp-data/ leapp-data/ --compress $targetDistro.vmName",
|
||
+ label: 'Upload devel branch of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mkdir -p /etc/leapp/files/vendors.d\"",
|
||
+ label: 'Create directory structrue of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo install -t /etc/leapp/files leapp-data/files/${targetDistro.leappData}/*\"",
|
||
+ label: 'Install devel version of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo install -t /etc/leapp/files/vendors.d leapp-data/vendors.d/*\"",
|
||
+ label: 'Install devel version of leapp vendor data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mv -f /etc/leapp/files/leapp_upgrade_repositories.repo.el8 /etc/leapp/files/leapp_upgrade_repositories.repo\"",
|
||
+ label: 'Configure leapp upgrade repositories for EL7toEL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mv -f /etc/leapp/files/repomap.json.el8 /etc/leapp/files/repomap.json\"",
|
||
+ label: 'Configure leapp repository mapping for EL7toEL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum -y install tree && sudo tree -ha /etc/leapp\"",
|
||
+ label: 'Check if development version of leapp data installed correctly'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start pre-upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"",
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"",
|
||
+ label: 'Answer the leapp question'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-8':
|
||
+ vm = 'almalinux_8'
|
||
+ ldata = 'almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'centos-stream-8':
|
||
+ vm = 'centosstream_8'
|
||
+ ldata = 'centos'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'oraclelinux-8':
|
||
+ vm = 'oraclelinux_8'
|
||
+ ldata = 'oraclelinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-8':
|
||
+ vm = 'rocky_8'
|
||
+ ldata = 'rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el7toel8_Internal.jenkinsfile b/ci/jenkins/ELevate_el7toel8_Internal.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..97f900fe
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el7toel8_Internal.jenkinsfile
|
||
@@ -0,0 +1,230 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el7toel8_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm\"",
|
||
+ label: 'Install the elevate-release-latest rpm packages for EL7'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"wget https://build.almalinux.org/pulp/content/copr/eabdullin1-leapp-data-internal-almalinux-8-x86_64-dr/config.repo -O /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Add pulp repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y leapp-upgrade\"",
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y $targetDistro.leappData\"",
|
||
+ label: 'Install the LEAP migration data rpm packages'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"",
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"",
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-8':
|
||
+ vm = 'almalinux_8'
|
||
+ ldata = 'leapp-data-almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'centos-stream-8':
|
||
+ vm = 'centosstream_8'
|
||
+ ldata = 'leapp-data-centos'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'oraclelinux-8':
|
||
+ vm = 'oraclelinux_8'
|
||
+ ldata = 'leapp-data-oraclelinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-8':
|
||
+ vm = 'rocky_8'
|
||
+ ldata = 'leapp-data-rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el7toel8_Internal_Dev.jenkinsfile b/ci/jenkins/ELevate_el7toel8_Internal_Dev.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..af2fabe2
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el7toel8_Internal_Dev.jenkinsfile
|
||
@@ -0,0 +1,253 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'LEAPP_SRC_GIT_USER', defaultValue: 'AlmaLinux', description: 'Input name of Git user of LEAPP source', trim: true)
|
||
+ string(name: 'LEAPP_SRC_GIT_BRANCH', defaultValue: 'almalinux', description: 'Input name of Git branch of LEAPP source', trim: true)
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ sh script: 'git clone https://github.com/AlmaLinux/leapp-data.git --branch devel',
|
||
+ label: 'Fetch devel version of leapp data'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el7toel8_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum-config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"",
|
||
+ label: 'Add testing repo of ELevate'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo wget https://build.almalinux.org/pulp/content/copr/eabdullin1-leapp-data-internal-centos7-x86_64-dr/config.repo -O /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Add pulp repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo sed -i 's|enabled=1|enabled=1\\npriority=80|' /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Set priority for pulp repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y leapp-upgrade\"",
|
||
+ label: 'Install testing version of ELevate'
|
||
+ sh script: "vagrant upload ci/scripts/install_elevate_dev.sh install_elevate_dev.sh $targetDistro.vmName",
|
||
+ label: 'Upload installer script to VMs'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo bash install_elevate_dev.sh -u ${LEAPP_SRC_GIT_USER} -b ${LEAPP_SRC_GIT_BRANCH}\"",
|
||
+ label: 'Install development version of ELevate',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant upload leapp-data/ leapp-data/ --compress $targetDistro.vmName",
|
||
+ label: 'Upload devel branch of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mkdir -p /etc/leapp/files/vendors.d\"",
|
||
+ label: 'Create directory structrue of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo install -t /etc/leapp/files leapp-data/files/${targetDistro.leappData}/*\"",
|
||
+ label: 'Install devel version of leapp data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo install -t /etc/leapp/files/vendors.d leapp-data/vendors.d/*\"",
|
||
+ label: 'Install devel version of leapp vendor data'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mv -f /etc/leapp/files/leapp_upgrade_repositories.repo.el8 /etc/leapp/files/leapp_upgrade_repositories.repo\"",
|
||
+ label: 'Configure leapp upgrade repositories for EL7toEL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo mv -f /etc/leapp/files/repomap.json.el8 /etc/leapp/files/repomap.json\"",
|
||
+ label: 'Configure leapp repository mapping for EL7toEL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum -y install tree && sudo tree -ha /etc/leapp\"",
|
||
+ label: 'Check if development version of leapp data installed correctly'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start pre-upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"",
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"",
|
||
+ label: 'Answer the leapp question'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-8':
|
||
+ vm = 'almalinux_8'
|
||
+ ldata = 'almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'centos-stream-8':
|
||
+ vm = 'centosstream_8'
|
||
+ ldata = 'centos'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'oraclelinux-8':
|
||
+ vm = 'oraclelinux_8'
|
||
+ ldata = 'oraclelinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-8':
|
||
+ vm = 'rocky_8'
|
||
+ ldata = 'rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el7toel8_Stable.jenkinsfile b/ci/jenkins/ELevate_el7toel8_Stable.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..ae9bdb57
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el7toel8_Stable.jenkinsfile
|
||
@@ -0,0 +1,228 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el7toel8_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm\"",
|
||
+ label: 'Install the elevate-release-latest rpm packages for EL7'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y leapp-upgrade\"",
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y $targetDistro.leappData\"",
|
||
+ label: 'Install the LEAP migration data rpm packages'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"",
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"",
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-8':
|
||
+ vm = 'almalinux_8'
|
||
+ ldata = 'leapp-data-almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'centos-stream-8':
|
||
+ vm = 'centosstream_8'
|
||
+ ldata = 'leapp-data-centos'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'oraclelinux-8':
|
||
+ vm = 'oraclelinux_8'
|
||
+ ldata = 'leapp-data-oraclelinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-8':
|
||
+ vm = 'rocky_8'
|
||
+ ldata = 'leapp-data-rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el7toel8_Testing.jenkinsfile b/ci/jenkins/ELevate_el7toel8_Testing.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..0f37cf2e
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el7toel8_Testing.jenkinsfile
|
||
@@ -0,0 +1,228 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el7toel8_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum-config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"",
|
||
+ label: 'Install the elevate-release-latest rpm packages for EL7'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y leapp-upgrade\"",
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo yum install -y $targetDistro.leappData\"",
|
||
+ label: 'Install the LEAP migration data rpm packages'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"",
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"",
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-8':
|
||
+ vm = 'almalinux_8'
|
||
+ ldata = 'leapp-data-almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'centos-stream-8':
|
||
+ vm = 'centosstream_8'
|
||
+ ldata = 'leapp-data-centos'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'oraclelinux-8':
|
||
+ vm = 'oraclelinux_8'
|
||
+ ldata = 'leapp-data-oraclelinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-8':
|
||
+ vm = 'rocky_8'
|
||
+ ldata = 'leapp-data-rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el8toel9_Development.jenkinsfile b/ci/jenkins/ELevate_el8toel9_Development.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..7eb5430b
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el8toel9_Development.jenkinsfile
|
||
@@ -0,0 +1,200 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label params.AGENT
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ }
|
||
+ parameters {
|
||
+ string(name: 'AGENT', defaultValue: 'almalinux-8-vagrant-libvirt-x86_64', description: 'Input label of the Jenkins Agent', trim: true)
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ string(name: 'REPO_URL', defaultValue: 'https://github.com/LKHN/el-test-auto-dev.git', description: 'URL of the pipeline repository', trim: true)
|
||
+ string(name: 'REPO_BRANCH', defaultValue: 'main', description: 'Branch of the pipeline repository', trim: true)
|
||
+ choice(name: 'SOURCE_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a source distro or all for ELevation')
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9', 'all'], description: 'Select a target distro or all to ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ }
|
||
+ stages {
|
||
+ stage('Source') {
|
||
+ steps {
|
||
+ git url: REPO_URL,
|
||
+ branch: REPO_BRANCH,
|
||
+ credentialsId: 'github-almalinuxautobot'
|
||
+ }
|
||
+ }
|
||
+ stage('Prepare Build and Test enviroment') {
|
||
+ steps {
|
||
+ sh script: 'cp Vagrantfile.el8toel9 Vagrantfile',
|
||
+ label: 'Generate the el8toel9 Vagrantfile'
|
||
+ sh script: 'sudo dnf -y install python39-devel python39-wheel',
|
||
+ label: 'Install Python 3.9, PIP and Wheel'
|
||
+ sh script: 'sudo python3 -m pip install --no-cache-dir --upgrade -r requirements.txt',
|
||
+ label: 'Install TestInfra'
|
||
+ sh script: 'git clone https://github.com/AlmaLinux/leapp-data.git --branch devel',
|
||
+ label: 'Clone the leapp-data git repository'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevation') {
|
||
+ matrix {
|
||
+ when {
|
||
+ allOf {
|
||
+ anyOf {
|
||
+ expression { params.SOURCE_DISTRO_FILTER == 'all' }
|
||
+ expression { params.SOURCE_DISTRO_FILTER == env.SOURCE_DISTRO }
|
||
+ }
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'SOURCE_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('Create and Configure Machines') {
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant destroy -f $SOURCE_DISTRO',
|
||
+ label: 'Make sure no machine present from the last retry'
|
||
+ sh script: 'vagrant up $SOURCE_DISTRO',
|
||
+ label: 'Create the source machines'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('ELevate to the all target distros') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"',
|
||
+ label: 'Add the ELevate Testing RPM repository'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf install -y leapp-upgrade\"',
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo bash /vagrant/scripts/install_elevate_dev.sh\"',
|
||
+ label: 'Install Development version of ELevate',
|
||
+ returnStatus: true
|
||
+ script {
|
||
+ def LEAPP_DATA = getLeappDataDistro(TARGET_DISTRO)
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mkdir -p /etc/leapp/files/vendors.d\"",
|
||
+ label:'Create the LEAPP directory')
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo install -t /etc/leapp/files /vagrant/leapp-data/files/${LEAPP_DATA}/*\"",
|
||
+ label:"Install the LEAPP DATA")
|
||
+ sh(script:'vagrant ssh $SOURCE_DISTRO -c \"sudo install -t /etc/leapp/files/vendors.d /vagrant/leapp-data/vendors.d/*\"',
|
||
+ label:"Install the Vendor DATA")
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mv -f /etc/leapp/files/leapp_upgrade_repositories.repo.el9 /etc/leapp/files/leapp_upgrade_repositories.repo\"",
|
||
+ label:'Set LEAPP Repos for EL8')
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mv -f /etc/leapp/files/repomap.json.el9 /etc/leapp/files/repomap.json\"",
|
||
+ label:'Set LEAPP Repo map for EL8')
|
||
+ sh(script:'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf -y install tree && sudo tree -ha /etc/leapp\"',
|
||
+ label:"Debug: Data paths")
|
||
+ }
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp preupgrade\"',
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"',
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"',
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp upgrade\"',
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: 'vagrant reload $SOURCE_DISTRO',
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: 'vagrant ssh-config $SOURCE_DISTRO >> .vagrant/ssh-config',
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal'}
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/distro/test_osinfo_$SOURCE_DISTRO-junit.xml tests/distro/test_osinfo_$SOURCE_DISTRO.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/docker/test_docker_ce_$SOURCE_DISTRO-junit.xml tests/docker/test_docker_ce.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: '**/tests/**/**-junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f',
|
||
+ label: 'Destroy All Machines'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+/*
|
||
+* Common Functions
|
||
+*/
|
||
+def getLeappDataDistro(TARGET_DISTRO) {
|
||
+ def leapp_data = ""
|
||
+
|
||
+ switch(TARGET_DISTRO) {
|
||
+ case "almalinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 9)
|
||
+ break
|
||
+
|
||
+ case "centos-stream-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 6)
|
||
+ break
|
||
+
|
||
+ case "oraclelinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 11)
|
||
+ break
|
||
+
|
||
+ case "rocky-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 5)
|
||
+ break
|
||
+
|
||
+ default:
|
||
+ leap_data = "Error: Target Distro Not Supported"
|
||
+ break
|
||
+ }
|
||
+ return leapp_data
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el8toel9_Internal.jenkinsfile b/ci/jenkins/ELevate_el8toel9_Internal.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..aa6be967
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el8toel9_Internal.jenkinsfile
|
||
@@ -0,0 +1,214 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ // choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'centos-stream-9', 'rocky-9', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'rocky-9', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el8toel9_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ // values 'almalinux-9', 'centos-stream-9', 'rocky-9'
|
||
+ values 'almalinux-9', 'rocky-9'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y https://repo.almalinux.org/elevate/elevate-release-latest-el8.noarch.rpm\"",
|
||
+ label: 'Install the elevate-release-latest rpm packages for EL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"wget https://build.almalinux.org/pulp/content/copr/eabdullin1-leapp-data-internal-centos7-x86_64-dr/config.repo -O /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Add pulp repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y leapp-upgrade\"",
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y $targetDistro.leappData\"",
|
||
+ label: 'Install the LEAP migration data rpm packages'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo sed -i \'s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/\' /etc/firewalld/firewalld.conf\"",
|
||
+ label: 'TODO'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section check_vdo.no_vdo_devices=True\"",
|
||
+ label: 'TODO'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-9':
|
||
+ vm = 'almalinux_9'
|
||
+ ldata = 'leapp-data-almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-9':
|
||
+ vm = 'rocky_9'
|
||
+ ldata = 'leapp-data-rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el8toel9_Internal_Dev.jenkinsfile b/ci/jenkins/ELevate_el8toel9_Internal_Dev.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..82626697
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el8toel9_Internal_Dev.jenkinsfile
|
||
@@ -0,0 +1,206 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label params.AGENT
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ }
|
||
+ parameters {
|
||
+ string(name: 'AGENT', defaultValue: 'almalinux-8-vagrant-libvirt-x86_64', description: 'Input label of the Jenkins Agent', trim: true)
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ string(name: 'REPO_URL', defaultValue: 'https://github.com/LKHN/el-test-auto-dev.git', description: 'URL of the pipeline repository', trim: true)
|
||
+ string(name: 'REPO_BRANCH', defaultValue: 'main', description: 'Branch of the pipeline repository', trim: true)
|
||
+ choice(name: 'SOURCE_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a source distro or all for ELevation')
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9', 'all'], description: 'Select a target distro or all to ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ }
|
||
+ stages {
|
||
+ stage('Source') {
|
||
+ steps {
|
||
+ git url: REPO_URL,
|
||
+ branch: REPO_BRANCH,
|
||
+ credentialsId: 'github-almalinuxautobot'
|
||
+ }
|
||
+ }
|
||
+ stage('Prepare Build and Test enviroment') {
|
||
+ steps {
|
||
+ sh script: 'cp Vagrantfile.el8toel9 Vagrantfile',
|
||
+ label: 'Generate the el8toel9 Vagrantfile'
|
||
+ sh script: 'sudo dnf -y install python39-devel python39-wheel',
|
||
+ label: 'Install Python 3.9, PIP and Wheel'
|
||
+ sh script: 'sudo python3 -m pip install --no-cache-dir --upgrade -r requirements.txt',
|
||
+ label: 'Install TestInfra'
|
||
+ sh script: 'git clone https://github.com/AlmaLinux/leapp-data.git --branch devel',
|
||
+ label: 'Clone the leapp-data git repository'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevation') {
|
||
+ matrix {
|
||
+ when {
|
||
+ allOf {
|
||
+ anyOf {
|
||
+ expression { params.SOURCE_DISTRO_FILTER == 'all' }
|
||
+ expression { params.SOURCE_DISTRO_FILTER == env.SOURCE_DISTRO }
|
||
+ }
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'SOURCE_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('Create and Configure Machines') {
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant destroy -f $SOURCE_DISTRO',
|
||
+ label: 'Make sure no machine present from the last retry'
|
||
+ sh script: 'vagrant up $SOURCE_DISTRO',
|
||
+ label: 'Create the source machines'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('ELevate to the all target distros') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"',
|
||
+ label: 'Add the ELevate Testing RPM repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y wget\"",
|
||
+ label: 'Install wget'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo wget https://build.almalinux.org/pulp/content/copr/eabdullin1-leapp-data-internal-almalinux-8-x86_64-dr/config.repo -O /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Add pulp repository'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo sed -i 's|enabled=1|enabled=1\\npriority=80|' /etc/yum.repos.d/internal-leapp.repo\"",
|
||
+ label: 'Set priority for pulp repository'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf install -y leapp-upgrade\"',
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo bash /vagrant/scripts/install_elevate_dev.sh\"',
|
||
+ label: 'Install Development version of ELevate',
|
||
+ returnStatus: true
|
||
+ script {
|
||
+ def LEAPP_DATA = getLeappDataDistro(TARGET_DISTRO)
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mkdir -p /etc/leapp/files/vendors.d\"",
|
||
+ label:'Create the LEAPP directory')
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo install -t /etc/leapp/files /vagrant/leapp-data/files/${LEAPP_DATA}/*\"",
|
||
+ label:"Install the LEAPP DATA")
|
||
+ sh(script:'vagrant ssh $SOURCE_DISTRO -c \"sudo install -t /etc/leapp/files/vendors.d /vagrant/leapp-data/vendors.d/*\"',
|
||
+ label:"Install the Vendor DATA")
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mv -f /etc/leapp/files/leapp_upgrade_repositories.repo.el9 /etc/leapp/files/leapp_upgrade_repositories.repo\"",
|
||
+ label:'Set LEAPP Repos for EL8')
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo mv -f /etc/leapp/files/repomap.json.el9 /etc/leapp/files/repomap.json\"",
|
||
+ label:'Set LEAPP Repo map for EL8')
|
||
+ sh(script:'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf -y install tree && sudo tree -ha /etc/leapp\"',
|
||
+ label:"Debug: Data paths")
|
||
+ }
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp preupgrade\"',
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"',
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"',
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp upgrade\"',
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: 'vagrant reload $SOURCE_DISTRO',
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: 'vagrant ssh-config $SOURCE_DISTRO >> .vagrant/ssh-config',
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal'}
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/distro/test_osinfo_$SOURCE_DISTRO-junit.xml tests/distro/test_osinfo_$SOURCE_DISTRO.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/docker/test_docker_ce_$SOURCE_DISTRO-junit.xml tests/docker/test_docker_ce.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: '**/tests/**/**-junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f',
|
||
+ label: 'Destroy All Machines'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+/*
|
||
+* Common Functions
|
||
+*/
|
||
+def getLeappDataDistro(TARGET_DISTRO) {
|
||
+ def leapp_data = ""
|
||
+
|
||
+ switch(TARGET_DISTRO) {
|
||
+ case "almalinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 9)
|
||
+ break
|
||
+
|
||
+ case "centos-stream-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 6)
|
||
+ break
|
||
+
|
||
+ case "oraclelinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 11)
|
||
+ break
|
||
+
|
||
+ case "rocky-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 5)
|
||
+ break
|
||
+
|
||
+ default:
|
||
+ leap_data = "Error: Target Distro Not Supported"
|
||
+ break
|
||
+ }
|
||
+ return leapp_data
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el8toel9_Stable.jenkinsfile b/ci/jenkins/ELevate_el8toel9_Stable.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..68f00165
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el8toel9_Stable.jenkinsfile
|
||
@@ -0,0 +1,212 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label 'x86_64 && bm'
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ parallelsAlwaysFailFast()
|
||
+ }
|
||
+ parameters {
|
||
+ // choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'centos-stream-9', 'rocky-9', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'rocky-9', 'all'], description: 'Select a target distro or all for ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ }
|
||
+ environment {
|
||
+ VAGRANT_NO_COLOR = '1'
|
||
+ }
|
||
+ stages {
|
||
+ stage('Prepare') {
|
||
+ steps {
|
||
+ sh script: 'ansible-galaxy install -r ci/ansible/requirements.yaml',
|
||
+ label: 'Install Ansible collections'
|
||
+ sh script: 'python3.11 -m venv .venv',
|
||
+ label: 'Create Python virtual environment'
|
||
+ sh script: '. .venv/bin/activate && pip install --no-color pip pytest-testinfra paramiko',
|
||
+ label: 'Install Testinfra'
|
||
+ }
|
||
+ }
|
||
+ stage('CreateSingleMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER != 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO_FILTER)
|
||
+
|
||
+ sh script: 'cp ci/vagrant/el7toel8toel9_single.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: "vagrant up $targetDistro.vmName",
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('CreateMultiMachine') {
|
||
+ when {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ }
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ sh script: 'cp ci/vagrant/el8toel9_multi.rb Vagrantfile',
|
||
+ label: 'Generate Vagrantfile'
|
||
+ sh script: 'vagrant up',
|
||
+ label: 'Create source VM'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevationAndTest') {
|
||
+ matrix {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ // values 'almalinux-9', 'centos-stream-9', 'rocky-9'
|
||
+ values 'almalinux-9', 'rocky-9'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('ELevate') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y https://repo.almalinux.org/elevate/elevate-release-latest-el8.noarch.rpm\"",
|
||
+ label: 'Install the elevate-release-latest rpm packages for EL8'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y leapp-upgrade\"",
|
||
+ label: 'Install the leap rpm package'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo dnf install -y $targetDistro.leappData\"",
|
||
+ label: 'Install the LEAP migration data rpm packages'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp preupgrade\"",
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo sed -i \'s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/\' /etc/firewalld/firewalld.conf\"",
|
||
+ label: 'TODO'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp answer --section check_vdo.no_vdo_devices=True\"",
|
||
+ label: 'TODO'
|
||
+ sh script: "vagrant ssh $targetDistro.vmName -c \"sudo leapp upgrade\"",
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: "vagrant reload $targetDistro.vmName",
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: "vagrant ssh-config $targetDistro.vmName >> .vagrant/ssh-config",
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal' }
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: 'rm -f conftest.py pytest.ini',
|
||
+ label: 'Delete root conftest.py file'
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/distro/test_osinfo_${targetDistro.vmName}.py
|
||
+ """,
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce' }
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ script {
|
||
+ def targetDistro = targetDistroSpec(TARGET_DISTRO)
|
||
+
|
||
+ sh script: """
|
||
+ . .venv/bin/activate \
|
||
+ && py.test -v --hosts=${targetDistro.vmName} \
|
||
+ --ssh-config=.vagrant/ssh-config \
|
||
+ --junit-xml ci/tests/tests/docker/test_docker_ce_${targetDistro.vmName}_junit.xml \
|
||
+ ci/tests/tests/docker/test_docker_ce.py
|
||
+ """,
|
||
+ label: 'Run the docker specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: 'ci/tests/tests/**/**_junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f --no-parallel -g',
|
||
+ label: 'Destroy VMs'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+def targetDistroSpec(distro) {
|
||
+ def spec = [:]
|
||
+
|
||
+ switch (distro) {
|
||
+ case 'almalinux-9':
|
||
+ vm = 'almalinux_9'
|
||
+ ldata = 'leapp-data-almalinux'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ case 'rocky-9':
|
||
+ vm = 'rocky_9'
|
||
+ ldata = 'leapp-data-rocky'
|
||
+
|
||
+ spec = [
|
||
+ vmName: vm,
|
||
+ leappData: ldata
|
||
+ ]
|
||
+ break
|
||
+ default:
|
||
+ spec = [
|
||
+ vmName: 'unknown',
|
||
+ leappData: 'unknown'
|
||
+ ]
|
||
+ break
|
||
+ }
|
||
+ return spec
|
||
+}
|
||
diff --git a/ci/jenkins/ELevate_el8toel9_Testing.jenkinsfile b/ci/jenkins/ELevate_el8toel9_Testing.jenkinsfile
|
||
new file mode 100644
|
||
index 00000000..79cdd472
|
||
--- /dev/null
|
||
+++ b/ci/jenkins/ELevate_el8toel9_Testing.jenkinsfile
|
||
@@ -0,0 +1,187 @@
|
||
+RETRY = params.RETRY
|
||
+TIMEOUT = params.TIMEOUT
|
||
+
|
||
+pipeline {
|
||
+ agent {
|
||
+ label params.AGENT
|
||
+ }
|
||
+ options {
|
||
+ timestamps()
|
||
+ }
|
||
+ parameters {
|
||
+ string(name: 'AGENT', defaultValue: 'almalinux-8-vagrant-libvirt-x86_64', description: 'Input label of the Jenkins Agent', trim: true)
|
||
+ string(name: 'RETRY', defaultValue: '3', description: 'Input count of retry', trim: true)
|
||
+ string(name: 'TIMEOUT', defaultValue: '60', description: 'Input timeout value in minutes', trim: true)
|
||
+ string(name: 'REPO_URL', defaultValue: 'https://github.com/LKHN/el-test-auto-dev.git', description: 'URL of the pipeline repository', trim: true)
|
||
+ string(name: 'REPO_BRANCH', defaultValue: 'main', description: 'Branch of the pipeline repository', trim: true)
|
||
+ choice(name: 'SOURCE_DISTRO_FILTER', choices: ['almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8', 'all'], description: 'Select a source distro or all for ELevation')
|
||
+ choice(name: 'TARGET_DISTRO_FILTER', choices: ['almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9', 'all'], description: 'Select a target distro or all to ELevation')
|
||
+ choice(name: 'CONF_FILTER', choices: ['minimal', 'docker-ce'], description: 'Select a configuration')
|
||
+ }
|
||
+ stages {
|
||
+ stage('Source') {
|
||
+ steps {
|
||
+ git url: REPO_URL,
|
||
+ branch: REPO_BRANCH,
|
||
+ credentialsId: 'github-almalinuxautobot'
|
||
+ }
|
||
+ }
|
||
+ stage('Prepare Build and Test enviroment') {
|
||
+ steps {
|
||
+ sh script: 'cp Vagrantfile.el8toel9 Vagrantfile',
|
||
+ label: 'Generate the el8toel9 Vagrantfile'
|
||
+ sh script: 'sudo dnf -y install python39-devel python39-wheel',
|
||
+ label: 'Install Python 3.9, PIP and Wheel'
|
||
+ sh script: 'sudo python3 -m pip install --no-cache-dir --upgrade -r requirements.txt',
|
||
+ label: 'Install TestInfra'
|
||
+ }
|
||
+ }
|
||
+ stage('ELevation') {
|
||
+ matrix {
|
||
+ when {
|
||
+ allOf {
|
||
+ anyOf {
|
||
+ expression { params.SOURCE_DISTRO_FILTER == 'all' }
|
||
+ expression { params.SOURCE_DISTRO_FILTER == env.SOURCE_DISTRO }
|
||
+ }
|
||
+ anyOf {
|
||
+ expression { params.TARGET_DISTRO_FILTER == 'all' }
|
||
+ expression { params.TARGET_DISTRO_FILTER == env.TARGET_DISTRO }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ axes {
|
||
+ axis {
|
||
+ name 'SOURCE_DISTRO'
|
||
+ values 'almalinux-8', 'centos-stream-8', 'oraclelinux-8', 'rocky-8'
|
||
+ }
|
||
+ axis {
|
||
+ name 'TARGET_DISTRO'
|
||
+ values 'almalinux-9', 'centos-stream-9', 'oraclelinux-9', 'rocky-9'
|
||
+ }
|
||
+ }
|
||
+ stages {
|
||
+ stage('Create and Configure Machines') {
|
||
+ environment {
|
||
+ CONFIG = "${CONF_FILTER}"
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant destroy -f $SOURCE_DISTRO',
|
||
+ label: 'Make sure no machine present from the last retry'
|
||
+ sh script: 'vagrant up $SOURCE_DISTRO',
|
||
+ label: 'Create the source machines'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('ELevate to the all target distros') {
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf config-manager --add-repo https://repo.almalinux.org/elevate/testing/elevate-testing.repo\"',
|
||
+ label: 'Add the ELevate Testing RPM repository'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf -y install leapp-upgrade\"',
|
||
+ label: 'Install the leap rpm package'
|
||
+ script {
|
||
+ def LEAPP_DATA = getLeappDataDistro(TARGET_DISTRO)
|
||
+ sh(script:"vagrant ssh $SOURCE_DISTRO -c \"sudo dnf -y install leapp-data-$LEAPP_DATA\"",
|
||
+ label:'Install the LEAP migration data rpm packages')
|
||
+ sh(script:'vagrant ssh $SOURCE_DISTRO -c \"sudo dnf -y install tree && sudo tree -ha /etc/leapp\"',
|
||
+ label:'Debug: Data paths')
|
||
+ }
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp preupgrade\"',
|
||
+ label: 'Start the Pre-Upgrade check',
|
||
+ returnStatus: true
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config\"',
|
||
+ label: 'Permit ssh as root login'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\"',
|
||
+ label: 'Answer the LEAP question'
|
||
+ sh script: 'vagrant ssh $SOURCE_DISTRO -c \"sudo leapp upgrade\"',
|
||
+ label: 'Start the Upgrade'
|
||
+ sh script: 'vagrant reload $SOURCE_DISTRO',
|
||
+ label: 'Reboot to the ELevate initramfs'
|
||
+ sh script: 'vagrant ssh-config $SOURCE_DISTRO >> .vagrant/ssh-config',
|
||
+ label: 'Generate the ssh-config file'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Distro Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'minimal'}
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/distro/test_osinfo_$TARGET_DISTRO-junit.xml tests/distro/test_osinfo_$TARGET_DISTRO.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ stage('Docker Tests') {
|
||
+ when {
|
||
+ anyOf {
|
||
+ expression { params.CONF_FILTER == 'docker-ce'}
|
||
+ }
|
||
+ }
|
||
+ steps {
|
||
+ retry(RETRY) {
|
||
+ timeout(time: TIMEOUT, unit: 'MINUTES') {
|
||
+ sh script: 'py.test -v --hosts=$SOURCE_DISTRO --ssh-config=.vagrant/ssh-config --junit-xml tests/docker/test_docker_ce_$SOURCE_DISTRO-junit.xml tests/docker/test_docker_ce.py',
|
||
+ label: 'Run the distro specific tests'
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ }
|
||
+ post {
|
||
+ success {
|
||
+ junit testResults: '**/tests/**/**-junit.xml',
|
||
+ skipPublishingChecks: true
|
||
+ }
|
||
+ cleanup {
|
||
+ sh script: 'vagrant destroy -f',
|
||
+ label: 'Destroy All Machines'
|
||
+ cleanWs()
|
||
+ }
|
||
+ }
|
||
+}
|
||
+
|
||
+/*
|
||
+* Common Functions
|
||
+*/
|
||
+def getLeappDataDistro(TARGET_DISTRO) {
|
||
+ def leapp_data = ""
|
||
+
|
||
+ switch(TARGET_DISTRO) {
|
||
+ case "almalinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 9)
|
||
+ break
|
||
+
|
||
+ case "centos-stream-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 6)
|
||
+ break
|
||
+
|
||
+ case "oraclelinux-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 11)
|
||
+ break
|
||
+
|
||
+ case "rocky-9":
|
||
+ leapp_data = TARGET_DISTRO.substring(0, 5)
|
||
+ break
|
||
+
|
||
+ default:
|
||
+ leap_data = "Error: Target Distro Not Supported"
|
||
+ break
|
||
+ }
|
||
+ return leapp_data
|
||
+}
|
||
diff --git a/ci/scripts/install_elevate_dev.sh b/ci/scripts/install_elevate_dev.sh
|
||
new file mode 100644
|
||
index 00000000..f9cc2903
|
||
--- /dev/null
|
||
+++ b/ci/scripts/install_elevate_dev.sh
|
||
@@ -0,0 +1,117 @@
|
||
+#!/usr/bin/env bash
|
||
+
|
||
+USER='AlmaLinux'
|
||
+BRANCH='almalinux'
|
||
+
|
||
+show_usage() {
|
||
+ echo 'Usage: sync_cloudlinux [OPTION]...'
|
||
+ echo ''
|
||
+ echo ' -h, --help show this message and exit'
|
||
+ echo ' -u, --user github user name (default: AlmaLinux)'
|
||
+ echo ' -b, --branch github branch name (default: almalinux)'
|
||
+}
|
||
+
|
||
+while [[ $# -gt 0 ]]; do
|
||
+ opt="$1"
|
||
+ case ${opt} in
|
||
+ -h|--help)
|
||
+ show_usage
|
||
+ exit 0
|
||
+ ;;
|
||
+ -u|--user)
|
||
+ USER="$2"
|
||
+ shift
|
||
+ shift
|
||
+ ;;
|
||
+ -b|--branch)
|
||
+ BRANCH="$2"
|
||
+ shift
|
||
+ shift
|
||
+ ;;
|
||
+ *)
|
||
+ echo -e "Error: unknown option ${opt}" >&2
|
||
+ exit 2
|
||
+ ;;
|
||
+ esac
|
||
+done
|
||
+
|
||
+RHEL_MAJOR_VERSION=$(rpm --eval %rhel)
|
||
+WORK_DIR="$HOME"
|
||
+NEW_LEAPP_NAME="leapp-repository-$BRANCH"
|
||
+NEW_LEAPP_DIR="$WORK_DIR/$NEW_LEAPP_NAME/"
|
||
+LEAPP_PATH='/usr/share/leapp-repository/repositories/'
|
||
+LEAPP_GPG_PATH='/etc/leapp/repos.d/system_upgrade/common/files/rpm-gpg'
|
||
+EXCLUDE_PATH='
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/files/bundled-rpms
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/files
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el7toel8
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el8toel9/files/bundled-rpms
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el8toel9/files
|
||
+/usr/share/leapp-repository/repositories/system_upgrade/el8toel9
|
||
+/usr/share/leapp-repository/repositories/system_upgrade
|
||
+/usr/share/leapp-repository/repositories/
|
||
+'
|
||
+
|
||
+
|
||
+echo "RHEL_MAJOR_VERSION=$RHEL_MAJOR_VERSION"
|
||
+echo "WORK_DIR=$WORK_DIR"
|
||
+echo "EXCLUDED_PATHS=$EXCLUDE_PATH"
|
||
+
|
||
+echo "Preserve GPG keys if any"
|
||
+for major in 8 9; do
|
||
+ test -e ${LEAPP_GPG_PATH}/${major} && mv ${LEAPP_GPG_PATH}/${major} ${WORK_DIR}/
|
||
+done
|
||
+
|
||
+
|
||
+echo 'Remove old files'
|
||
+for dir in $(find $LEAPP_PATH -type d);
|
||
+do
|
||
+ skip=0
|
||
+ for exclude in $(echo $EXCLUDE_PATH);
|
||
+ do
|
||
+ if [[ $exclude == $dir ]];then
|
||
+ skip=1
|
||
+ break
|
||
+ fi
|
||
+ done
|
||
+ if [ $skip -eq 0 ];then
|
||
+ rm -rf $dir
|
||
+ fi
|
||
+done
|
||
+
|
||
+echo "Download new tarball from https://github.com/$USER/leapp-repository/archive/$BRANCH/leapp-repository-$BRANCH.tar.gz"
|
||
+curl -s -L https://github.com/$USER/leapp-repository/archive/$BRANCH/leapp-repository-$BRANCH.tar.gz | tar -xmz -C $WORK_DIR/ || exit 1
|
||
+
|
||
+echo 'Deleting files as in spec file'
|
||
+rm -rf $NEW_LEAPP_DIR/repos/common/actors/testactor
|
||
+find $NEW_LEAPP_DIR/repos/common -name "test.py" -delete
|
||
+rm -rf `find $NEW_LEAPP_DIR -name "tests" -type d`
|
||
+find $NEW_LEAPP_DIR -name "Makefile" -delete
|
||
+if [ $RHEL_MAJOR_VERSION -eq '7' ]; then
|
||
+ rm -rf $NEW_LEAPP_DIR/repos/system_upgrade/el8toel9
|
||
+else
|
||
+ rm -rf $NEW_LEAPP_DIR/repos/system_upgrade/el7toel8
|
||
+ rm -rf $NEW_LEAPP_DIR/repos/system_upgrade/cloudlinux
|
||
+fi
|
||
+
|
||
+echo 'Copy new data to system'
|
||
+cp -r $NEW_LEAPP_DIR/repos/* $LEAPP_PATH || exit 1
|
||
+
|
||
+for DIRECTORY in $(find $LEAPP_PATH -mindepth 1 -maxdepth 1 -type d);
|
||
+do
|
||
+ REPOSITORY=$(basename $DIRECTORY)
|
||
+ if ! [ -e /etc/leapp/repos.d/$REPOSITORY ];then
|
||
+ echo "Enabling repository $REPOSITORY"
|
||
+ ln -s $LEAPP_PATH/$REPOSITORY /etc/leapp/repos.d/$REPOSITORY || exit 1
|
||
+ fi
|
||
+done
|
||
+
|
||
+echo "Restore GPG keys if any"
|
||
+for major in 8 9; do
|
||
+ rm -rf ${LEAPP_GPG_PATH}/${major}
|
||
+ test -e ${WORK_DIR}/${major} && mv ${WORK_DIR}/${major} ${LEAPP_GPG_PATH}/
|
||
+done
|
||
+
|
||
+rm -rf $NEW_LEAPP_DIR
|
||
+
|
||
+exit 0
|
||
diff --git a/ci/tests/tests/conftest.py b/ci/tests/tests/conftest.py
|
||
new file mode 100644
|
||
index 00000000..01f9443e
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/conftest.py
|
||
@@ -0,0 +1,52 @@
|
||
+import pytest
|
||
+import re
|
||
+
|
||
+
|
||
+@pytest.fixture(scope="module")
|
||
+def get_os_release(host):
|
||
+ """Get content of the /etc/os-release"""
|
||
+ os_release = host.file("/etc/os-release")
|
||
+ return os_release
|
||
+
|
||
+
|
||
+@pytest.fixture(scope="module")
|
||
+def get_redhat_release(host):
|
||
+ """Get content of the /etc/redhat-release"""
|
||
+ redhat_release = host.file("/etc/redhat-release")
|
||
+ return redhat_release
|
||
+
|
||
+
|
||
+@pytest.fixture(scope="module")
|
||
+def get_kernel_info(host):
|
||
+ """Get kernel version and vendor information"""
|
||
+ kernel_ver_pattern = re.compile(
|
||
+ f".*(^[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?).*"
|
||
+ )
|
||
+ kernel_ver_output = host.check_output("uname -r")
|
||
+ kernel_version = kernel_ver_pattern.match(kernel_ver_output).group(1)
|
||
+
|
||
+ with host.sudo():
|
||
+ kernel_vendor = host.check_output(
|
||
+ "grep -Ei '(.*kernel signing key|.*CA Server|.*Build)' /proc/keys | sed -E"
|
||
+ " 's/ +/:/g' | cut -d ':' -f 9 | uniq"
|
||
+ )
|
||
+ kernel_info = (kernel_version, kernel_vendor)
|
||
+ return kernel_info
|
||
+
|
||
+
|
||
+@pytest.fixture(scope="module", params=["glibc", "systemd", "coreutils", "rpm"])
|
||
+def get_pkg_info(host, request):
|
||
+ """Get vendor and version of installed packages"""
|
||
+ pkg_name = request.param
|
||
+ pkg_vendor = host.check_output(
|
||
+ f"rpm -qa --queryformat \"%{{VENDOR}}\n\" {request.param} | sed '$p;d' "
|
||
+ )
|
||
+ pkg_version = host.check_output(
|
||
+ f'rpm -qa --queryformat "%{{VERSION}}\n" {request.param} | sort -n | sed'
|
||
+ " '$p;d'"
|
||
+ )
|
||
+ pkg_info = (pkg_name, pkg_vendor, pkg_version)
|
||
+ # print(pkg_name)
|
||
+ # print(pkg_vendor)
|
||
+ # print(pkg_version)
|
||
+ return pkg_info
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_almalinux_8.py b/ci/tests/tests/distro/test_osinfo_almalinux_8.py
|
||
new file mode 100644
|
||
index 00000000..c5219b35
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_almalinux_8.py
|
||
@@ -0,0 +1,43 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="AlmaLinux"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="almalinux"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="8.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("AlmaLinux release 8.*")
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_pkg_info")
|
||
+class TestPkgInfo:
|
||
+ """Test vendor and version of packages"""
|
||
+
|
||
+ def test_pkg_vendor(self, get_pkg_info):
|
||
+ assert get_pkg_info[1] == "AlmaLinux"
|
||
+
|
||
+ def test_pkg_version(self, get_pkg_info):
|
||
+ if get_pkg_info[0] == "kernel":
|
||
+ assert get_pkg_info[2] == "4.18.0"
|
||
+ elif get_pkg_info[0] == "glibc":
|
||
+ assert get_pkg_info[2] == "2.28"
|
||
+ elif get_pkg_info[0] == "systemd":
|
||
+ assert get_pkg_info[2] == "239"
|
||
+ elif get_pkg_info[0] == "coreutils":
|
||
+ assert get_pkg_info[2] == "8.30"
|
||
+ else:
|
||
+ assert get_pkg_info[2] == "4.14.3"
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_almalinux_9.py b/ci/tests/tests/distro/test_osinfo_almalinux_9.py
|
||
new file mode 100644
|
||
index 00000000..1536e52b
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_almalinux_9.py
|
||
@@ -0,0 +1,52 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="AlmaLinux"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="almalinux"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="9.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("AlmaLinux release 9.*")
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_kernel_info")
|
||
+class TestKernelInfo:
|
||
+ """Test version and vendor of running kernel"""
|
||
+
|
||
+ def test_kernel_version(self, get_kernel_info):
|
||
+ assert get_kernel_info[0] == "5.14.0"
|
||
+
|
||
+ def test_kernel_vendor(self, get_kernel_info):
|
||
+ assert get_kernel_info[1] == "AlmaLinux"
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_pkg_info")
|
||
+class TestPkgInfo:
|
||
+ """Test vendor and version of packages"""
|
||
+
|
||
+ def test_pkg_vendor(self, get_pkg_info):
|
||
+ assert get_pkg_info[1] == "AlmaLinux"
|
||
+
|
||
+ def test_pkg_version(self, get_pkg_info):
|
||
+ if get_pkg_info[0] == "glibc":
|
||
+ assert get_pkg_info[2] == "2.34"
|
||
+ elif get_pkg_info[0] == "systemd":
|
||
+ assert get_pkg_info[2] == "252"
|
||
+ elif get_pkg_info[0] == "coreutils":
|
||
+ assert get_pkg_info[2] == "8.32"
|
||
+ else:
|
||
+ assert get_pkg_info[2] == "4.16.1.3"
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_centosstream_8.py b/ci/tests/tests/distro/test_osinfo_centosstream_8.py
|
||
new file mode 100644
|
||
index 00000000..995ae61e
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_centosstream_8.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="CentOS Stream"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="centos"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="8"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("CentOS Stream release 8")
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_centosstream_9.py b/ci/tests/tests/distro/test_osinfo_centosstream_9.py
|
||
new file mode 100644
|
||
index 00000000..28e47202
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_centosstream_9.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="CentOS Stream"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="centos"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="9"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("CentOS Stream release 9")
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_oraclelinux_8.py b/ci/tests/tests/distro/test_osinfo_oraclelinux_8.py
|
||
new file mode 100644
|
||
index 00000000..2080fd2f
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_oraclelinux_8.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="Oracle Linux Server"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="ol"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="8.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("Red Hat Enterprise Linux release 8.*")
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_oraclelinux_9.py b/ci/tests/tests/distro/test_osinfo_oraclelinux_9.py
|
||
new file mode 100644
|
||
index 00000000..bd5044bb
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_oraclelinux_9.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="Oracle Linux Server"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="ol"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="9.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("Red Hat Enterprise Linux release 9.*")
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_rocky_8.py b/ci/tests/tests/distro/test_osinfo_rocky_8.py
|
||
new file mode 100644
|
||
index 00000000..cce5d668
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_rocky_8.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="Rocky Linux"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="rocky"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="8.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("Rocky Linux release 8.*")
|
||
diff --git a/ci/tests/tests/distro/test_osinfo_rocky_9.py b/ci/tests/tests/distro/test_osinfo_rocky_9.py
|
||
new file mode 100644
|
||
index 00000000..ce8cccdb
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/distro/test_osinfo_rocky_9.py
|
||
@@ -0,0 +1,23 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_os_release")
|
||
+class TestOSRelease:
|
||
+ """Test values of NAME, ID and VERSION_ID"""
|
||
+
|
||
+ def test_os_rel_name(self, get_os_release):
|
||
+ assert get_os_release.contains('NAME="Rocky Linux"')
|
||
+
|
||
+ def test_os_rel_id(self, get_os_release):
|
||
+ assert get_os_release.contains('ID="rocky"')
|
||
+
|
||
+ def test_os_rel_version_id(self, get_os_release):
|
||
+ assert get_os_release.contains('VERSION_ID="9.*"')
|
||
+
|
||
+
|
||
+@pytest.mark.usefixtures("get_redhat_release")
|
||
+class TestRHRelease:
|
||
+ """Test contents of the /etc/redhat-release"""
|
||
+
|
||
+ def test_redhat_release(self, get_redhat_release):
|
||
+ assert get_redhat_release.contains("Rocky Linux release 9.*")
|
||
diff --git a/ci/tests/tests/docker/test_docker_ce.py b/ci/tests/tests/docker/test_docker_ce.py
|
||
new file mode 100644
|
||
index 00000000..3c2550c7
|
||
--- /dev/null
|
||
+++ b/ci/tests/tests/docker/test_docker_ce.py
|
||
@@ -0,0 +1,26 @@
|
||
+import pytest
|
||
+
|
||
+
|
||
+class TestDockerServices:
|
||
+ """Test docker and containerd services running and enabled"""
|
||
+
|
||
+ def test_docker_is_running(self, host):
|
||
+ assert host.service("docker.service").is_running
|
||
+
|
||
+ def test_containerd_is_running(self, host):
|
||
+ assert host.service("containerd.service").is_running
|
||
+
|
||
+ def test_docker_is_enabled(self, host):
|
||
+ assert host.service("docker.service").is_enabled
|
||
+
|
||
+ def test_containerd_is_enabled(self, host):
|
||
+ assert host.service("containerd.service").is_enabled
|
||
+
|
||
+
|
||
+class TestDockerWorking:
|
||
+ """Test docker working with the hello world container"""
|
||
+
|
||
+ def test_docker_is_working(self, host):
|
||
+ with host.sudo():
|
||
+ cmd = host.run("sudo docker run --rm hello-world")
|
||
+ assert cmd.succeeded
|
||
diff --git a/ci/vagrant/el7toel8_multi.rb b/ci/vagrant/el7toel8_multi.rb
|
||
new file mode 100644
|
||
index 00000000..a18da81d
|
||
--- /dev/null
|
||
+++ b/ci/vagrant/el7toel8_multi.rb
|
||
@@ -0,0 +1,40 @@
|
||
+# -*- mode: ruby -*-
|
||
+# vi: set ft=ruby :
|
||
+
|
||
+configuration = ENV['CONFIG']
|
||
+
|
||
+Vagrant.configure('2') do |config|
|
||
+ config.vagrant.plugins = 'vagrant-libvirt'
|
||
+
|
||
+ config.vm.synced_folder '.', '/vagrant', disabled: true
|
||
+ config.vm.box = 'generic/centos7'
|
||
+ config.vm.boot_timeout = 3600
|
||
+
|
||
+ config.vm.provider 'libvirt' do |v|
|
||
+ v.uri = 'qemu:///system'
|
||
+ v.memory = 4096
|
||
+ v.machine_type = 'q35'
|
||
+ v.cpu_mode = 'host-passthrough'
|
||
+ v.cpus = 2
|
||
+ v.disk_bus = 'scsi'
|
||
+ v.disk_driver cache: 'writeback', discard: 'unmap'
|
||
+ v.random_hostname = true
|
||
+ end
|
||
+
|
||
+ target_distros = ['almalinux', 'centosstream', 'oraclelinux', 'rocky']
|
||
+
|
||
+ target_distros.each do |target_distro|
|
||
+ config.vm.define "#{target_distro}_8" do |machine|
|
||
+ machine.vm.hostname = "#{target_distro}-8.test"
|
||
+
|
||
+ if target_distro == target_distros[-1]
|
||
+ machine.vm.provision 'ansible' do |ansible|
|
||
+ ansible.compatibility_mode = '2.0'
|
||
+ ansible.limit = 'all'
|
||
+ ansible.playbook = "ci/ansible/#{configuration}.yaml"
|
||
+ ansible.config_file = 'ci/ansible/ansible.cfg'
|
||
+ end
|
||
+ end
|
||
+ end
|
||
+ end
|
||
+end
|
||
diff --git a/ci/vagrant/el7toel8toel9_single.rb b/ci/vagrant/el7toel8toel9_single.rb
|
||
new file mode 100644
|
||
index 00000000..8cd05ac3
|
||
--- /dev/null
|
||
+++ b/ci/vagrant/el7toel8toel9_single.rb
|
||
@@ -0,0 +1,53 @@
|
||
+# -*- mode: ruby -*-
|
||
+# vi: set ft=ruby :
|
||
+
|
||
+configuration = ENV['CONFIG']
|
||
+
|
||
+Vagrant.configure('2') do |config|
|
||
+ config.vagrant.plugins = 'vagrant-libvirt'
|
||
+
|
||
+ config.vm.synced_folder '.', '/vagrant', disabled: true
|
||
+ config.ssh.disable_deprecated_algorithms = true
|
||
+ config.vm.boot_timeout = 3600
|
||
+
|
||
+ config.vm.provider 'libvirt' do |v|
|
||
+ v.uri = 'qemu:///system'
|
||
+ v.memory = 4096
|
||
+ v.machine_type = 'q35'
|
||
+ v.cpu_mode = 'host-passthrough'
|
||
+ v.cpus = 2
|
||
+ v.disk_bus = 'scsi'
|
||
+ v.disk_driver cache: 'writeback', discard: 'unmap'
|
||
+ v.random_hostname = true
|
||
+ end
|
||
+
|
||
+ # EL7toEL8
|
||
+ target_distros = ['almalinux', 'centosstream', 'oraclelinux', 'rocky']
|
||
+
|
||
+ target_distros.each do |target_distro|
|
||
+ config.vm.define "#{target_distro}_8" do |machine|
|
||
+ machine.vm.box = 'generic/centos7'
|
||
+ machine.vm.hostname = "#{target_distro}-8.test"
|
||
+ end
|
||
+ end
|
||
+
|
||
+ # EL8toEL9
|
||
+ target_distros_el9 = {
|
||
+ almalinux: 'almalinux/8',
|
||
+ # centosstream: 'generic/centos8s',
|
||
+ rocky: 'generic/rocky8'
|
||
+ }
|
||
+
|
||
+ target_distros_el9.each_pair do |vm, box|
|
||
+ config.vm.define "#{vm}_9" do |machine|
|
||
+ machine.vm.box = "#{box}"
|
||
+ machine.vm.hostname = "#{vm}-9.test"
|
||
+ end
|
||
+ end
|
||
+
|
||
+ config.vm.provision 'ansible' do |ansible|
|
||
+ ansible.compatibility_mode = '2.0'
|
||
+ ansible.playbook = "ci/ansible/#{configuration}.yaml"
|
||
+ ansible.config_file = 'ci/ansible/ansible.cfg'
|
||
+ end
|
||
+end
|
||
diff --git a/ci/vagrant/el8toel9_multi.rb b/ci/vagrant/el8toel9_multi.rb
|
||
new file mode 100644
|
||
index 00000000..370758e6
|
||
--- /dev/null
|
||
+++ b/ci/vagrant/el8toel9_multi.rb
|
||
@@ -0,0 +1,45 @@
|
||
+# -*- mode: ruby -*-
|
||
+# vi: set ft=ruby :
|
||
+
|
||
+configuration = ENV['CONFIG']
|
||
+
|
||
+Vagrant.configure('2') do |config|
|
||
+ config.vagrant.plugins = 'vagrant-libvirt'
|
||
+
|
||
+ config.vm.synced_folder '.', '/vagrant', disabled: true
|
||
+ config.ssh.disable_deprecated_algorithms = true
|
||
+ config.vm.boot_timeout = 3600
|
||
+
|
||
+ config.vm.provider 'libvirt' do |v|
|
||
+ v.uri = 'qemu:///system'
|
||
+ v.memory = 4096
|
||
+ v.machine_type = 'q35'
|
||
+ v.cpu_mode = 'host-passthrough'
|
||
+ v.cpus = 2
|
||
+ v.disk_bus = 'scsi'
|
||
+ v.disk_driver cache: 'writeback', discard: 'unmap'
|
||
+ v.random_hostname = true
|
||
+ end
|
||
+
|
||
+ target_distros = {
|
||
+ almalinux: 'almalinux/8',
|
||
+ # centosstream: 'generic/centos8s',
|
||
+ rocky: 'generic/rocky8'
|
||
+ }
|
||
+
|
||
+ target_distros.each_pair do |vm, box|
|
||
+ config.vm.define "#{vm}_9" do |machine|
|
||
+ machine.vm.box = "#{box}"
|
||
+ machine.vm.hostname = "#{vm}-9.test"
|
||
+
|
||
+ if [vm, box] == target_distros.to_a.last
|
||
+ machine.vm.provision 'ansible' do |ansible|
|
||
+ ansible.compatibility_mode = '2.0'
|
||
+ ansible.limit = 'all'
|
||
+ ansible.playbook = "ci/ansible/#{configuration}.yaml"
|
||
+ ansible.config_file = 'ci/ansible/ansible.cfg'
|
||
+ end
|
||
+ end
|
||
+ end
|
||
+ end
|
||
+end
|
||
diff --git a/etc/leapp/files/device_driver_deprecation_data.json b/etc/leapp/files/device_driver_deprecation_data.json
|
||
index a9c06956..c38c2840 100644
|
||
--- a/etc/leapp/files/device_driver_deprecation_data.json
|
||
+++ b/etc/leapp/files/device_driver_deprecation_data.json
|
||
@@ -1,6 +1,6 @@
|
||
{
|
||
"provided_data_streams": [
|
||
- "4.1"
|
||
+ "4.2"
|
||
],
|
||
"data": [
|
||
{
|
||
diff --git a/etc/leapp/files/pes-events.json b/etc/leapp/files/pes-events.json
|
||
index 964b7117..f15002d6 100644
|
||
--- a/etc/leapp/files/pes-events.json
|
||
+++ b/etc/leapp/files/pes-events.json
|
||
@@ -1,7 +1,7 @@
|
||
{
|
||
-"timestamp": "202512021706Z",
|
||
+"timestamp": "202512221307Z",
|
||
"provided_data_streams": [
|
||
-"4.1"
|
||
+"4.2"
|
||
],
|
||
"packageinfo": [
|
||
{
|
||
@@ -709181,6 +709181,956 @@ null
|
||
"minor_version": 8,
|
||
"os_name": "RHEL"
|
||
}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19922,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "v4l-utils",
|
||
+"repository": "rhel10-CRB"
|
||
+}
|
||
+],
|
||
+"set_id": 26604
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19923,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "v4l-utils",
|
||
+"repository": "rhel9-CRB"
|
||
+}
|
||
+],
|
||
+"set_id": 26605
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 7,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 8,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19924,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-postgis",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26606
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19925,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-postgis-client",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26607
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19926,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-postgis-docs",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26608
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19927,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-postgis-upgrade",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26609
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19928,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-postgis-utils",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26610
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19929,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-pgaudit",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26611
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19930,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-pgvector",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26612
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19931,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-pg_repack",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26613
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19932,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-decoderbufs",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26614
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19933,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "virt-firmware-rs",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26615
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19934,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "libexttextcat-devel",
|
||
+"repository": "rhel9-CRB"
|
||
+}
|
||
+],
|
||
+"set_id": 26616
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 7,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 8,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19935,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "rest-devel",
|
||
+"repository": "rhel9-CRB"
|
||
+}
|
||
+],
|
||
+"set_id": 26617
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 7,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 8,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19936,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "gnome-autoar-devel",
|
||
+"repository": "rhel9-CRB"
|
||
+}
|
||
+],
|
||
+"set_id": 26618
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 7,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 9,
|
||
+"minor_version": 8,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19937,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26619
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19938,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-contrib",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26620
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19939,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-docs",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26621
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19940,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-plperl",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26622
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19941,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-plpython3",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26623
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19942,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-private-devel",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26624
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19943,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-private-libs",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26625
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19944,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-server",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26626
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19945,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-server-devel",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26627
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19946,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-static",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26628
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19947,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-test",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26629
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19948,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-upgrade",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26630
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
+},
|
||
+{
|
||
+"action": 0,
|
||
+"architectures": [
|
||
+"aarch64",
|
||
+"ppc64le",
|
||
+"s390x",
|
||
+"x86_64"
|
||
+],
|
||
+"id": 19949,
|
||
+"in_packageset": {
|
||
+"package": [
|
||
+{
|
||
+"modulestreams": [
|
||
+null
|
||
+],
|
||
+"name": "postgresql18-upgrade-devel",
|
||
+"repository": "rhel10-AppStream"
|
||
+}
|
||
+],
|
||
+"set_id": 26631
|
||
+},
|
||
+"initial_release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 1,
|
||
+"os_name": "RHEL"
|
||
+},
|
||
+"modulestream_maps": [],
|
||
+"out_packageset": null,
|
||
+"release": {
|
||
+"major_version": 10,
|
||
+"minor_version": 2,
|
||
+"os_name": "RHEL"
|
||
+}
|
||
}
|
||
]
|
||
}
|
||
diff --git a/etc/leapp/files/repomap.json b/etc/leapp/files/repomap.json
|
||
index c4ae9038..bdd8c4f6 100644
|
||
--- a/etc/leapp/files/repomap.json
|
||
+++ b/etc/leapp/files/repomap.json
|
||
@@ -1,202 +1,138 @@
|
||
{
|
||
- "datetime": "202511131423Z",
|
||
+ "datetime": "202601071719Z",
|
||
"version_format": "1.3.0",
|
||
"provided_data_streams": [
|
||
- "4.1"
|
||
+ "4.2"
|
||
],
|
||
"mapping": [
|
||
{
|
||
- "source_major_version": "7",
|
||
- "target_major_version": "8",
|
||
+ "source_major_version": "8",
|
||
+ "target_major_version": "9",
|
||
"entries": [
|
||
{
|
||
- "source": "rhel7-base",
|
||
- "target": [
|
||
- "rhel8-AppStream",
|
||
- "rhel8-BaseOS"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-optional",
|
||
- "target": [
|
||
- "rhel8-CRB"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-supplementary",
|
||
- "target": [
|
||
- "rhel8-Supplementary"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-extras",
|
||
- "target": [
|
||
- "rhel8-AppStream",
|
||
- "rhel8-BaseOS"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-rt",
|
||
- "target": [
|
||
- "rhel8-RT"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-nfv",
|
||
- "target": [
|
||
- "rhel8-NFV"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel7-sap",
|
||
+ "source": "rhel8-BaseOS",
|
||
"target": [
|
||
- "rhel8-SAP-NetWeaver"
|
||
+ "rhel9-BaseOS"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-sap-hana",
|
||
+ "source": "rhel8-AppStream",
|
||
"target": [
|
||
- "rhel8-SAP-Solutions"
|
||
+ "rhel9-AppStream"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-microsoft-azure-sap-apps",
|
||
+ "source": "rhel8-CRB",
|
||
"target": [
|
||
- "rhel8-SAP-Solutions",
|
||
- "rhel8-SAP-NetWeaver",
|
||
- "rhel8-rhui-microsoft-azure-sap-apps"
|
||
+ "rhel9-CRB"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-highavailability",
|
||
+ "source": "rhel8-rhui-client-config-server-8-ha",
|
||
"target": [
|
||
- "rhel8-HighAvailability"
|
||
+ "rhel9-rhui-client-config-server-9"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-ansible-2",
|
||
+ "source": "rhel8-rhui-client-config-server-8",
|
||
"target": [
|
||
- "rhel8-ansible-2"
|
||
+ "rhel9-rhui-client-config-server-9"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-client-config-server-7",
|
||
+ "source": "rhel8-Supplementary",
|
||
"target": [
|
||
- "rhel8-rhui-client-config-server-8"
|
||
+ "rhel9-Supplementary"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-client-config-server-7-sap",
|
||
+ "source": "rhel8-RT",
|
||
"target": [
|
||
- "rhel8-rhui-client-config-server-8-sap"
|
||
+ "rhel9-RT"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-microsoft-azure-rhel7",
|
||
+ "source": "rhel8-NFV",
|
||
"target": [
|
||
- "rhel8-rhui-microsoft-azure-rhel8"
|
||
+ "rhel9-NFV"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-microsoft-sap-ha",
|
||
+ "source": "rhel8-SAP-NetWeaver",
|
||
"target": [
|
||
- "rhel8-rhui-microsoft-sap-ha"
|
||
+ "rhel9-SAP-NetWeaver"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-google-compute-engine",
|
||
+ "source": "rhel8-SAP-Solutions",
|
||
"target": [
|
||
- "rhel8-rhui-google-compute-engine-leapp"
|
||
+ "rhel9-SAP-Solutions"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel7-rhui-custom-client-at-alibaba",
|
||
- "target": [
|
||
- "rhel8-rhui-custom-client-at-alibaba"
|
||
- ]
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source_major_version": "8",
|
||
- "target_major_version": "9",
|
||
- "entries": [
|
||
- {
|
||
- "source": "rhel8-BaseOS",
|
||
+ "source": "rhel8-HighAvailability",
|
||
"target": [
|
||
- "rhel9-BaseOS"
|
||
+ "rhel9-HighAvailability"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-AppStream",
|
||
+ "source": "rhel8-Advanced-Virt",
|
||
"target": [
|
||
"rhel9-AppStream"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-CRB",
|
||
+ "source": "rhel8-Advanced-Virt-CRB",
|
||
"target": [
|
||
"rhel9-CRB"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-rhui-client-config-server-8-ha",
|
||
- "target": [
|
||
- "rhel9-rhui-client-config-server-9"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel8-rhui-client-config-server-8",
|
||
- "target": [
|
||
- "rhel9-rhui-client-config-server-9"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel8-Supplementary",
|
||
+ "source": "rhel8-jbeap-7.4",
|
||
"target": [
|
||
- "rhel9-Supplementary"
|
||
+ "rhel9-jbeap-7.4"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-RT",
|
||
+ "source": "rhel8-jbeap-8.0",
|
||
"target": [
|
||
- "rhel9-RT"
|
||
+ "rhel9-jbeap-8.0"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-NFV",
|
||
+ "source": "rhel8-jbeap-8.1",
|
||
"target": [
|
||
- "rhel9-NFV"
|
||
+ "rhel9-jbeap-8.1"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-SAP-NetWeaver",
|
||
+ "source": "rhel8-satellite-6.16",
|
||
"target": [
|
||
- "rhel9-SAP-NetWeaver"
|
||
+ "rhel9-satellite-6.16"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-SAP-Solutions",
|
||
+ "source": "rhel8-satellite-capsule-6.16",
|
||
"target": [
|
||
- "rhel9-SAP-Solutions"
|
||
+ "rhel9-satellite-capsule-6.16"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-HighAvailability",
|
||
+ "source": "rhel8-satellite-maintenance-6.16",
|
||
"target": [
|
||
- "rhel9-HighAvailability"
|
||
+ "rhel9-satellite-maintenance-6.16"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-Advanced-Virt",
|
||
+ "source": "rhel8-satellite-utils-6.16",
|
||
"target": [
|
||
- "rhel9-AppStream"
|
||
+ "rhel9-satellite-utils-6.16"
|
||
]
|
||
},
|
||
{
|
||
- "source": "rhel8-Advanced-Virt-CRB",
|
||
+ "source": "rhel8-satellite-client-6",
|
||
"target": [
|
||
- "rhel9-CRB"
|
||
+ "rhel9-satellite-client-6"
|
||
]
|
||
},
|
||
{
|
||
@@ -234,24 +170,6 @@
|
||
"target": [
|
||
"rhel9-rhui-custom-client-at-alibaba"
|
||
]
|
||
- },
|
||
- {
|
||
- "source": "rhel8-jbeap-7.4",
|
||
- "target": [
|
||
- "rhel9-jbeap-7.4"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel8-jbeap-8.0",
|
||
- "target": [
|
||
- "rhel9-jbeap-8.0"
|
||
- ]
|
||
- },
|
||
- {
|
||
- "source": "rhel8-jbeap-8.1",
|
||
- "target": [
|
||
- "rhel9-jbeap-8.1"
|
||
- ]
|
||
}
|
||
]
|
||
},
|
||
@@ -313,6 +231,12 @@
|
||
"rhel10-HighAvailability"
|
||
]
|
||
},
|
||
+ {
|
||
+ "source": "rhel9-satellite-client-6",
|
||
+ "target": [
|
||
+ "rhel10-satellite-client-6"
|
||
+ ]
|
||
+ },
|
||
{
|
||
"source": "rhel9-rhui-client-config-server-9",
|
||
"target": [
|
||
@@ -1666,6 +1590,91 @@
|
||
}
|
||
]
|
||
},
|
||
+ {
|
||
+ "pesid": "rhel10-satellite-client-6",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-aarch64-eus-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-aarch64-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-ppc64le-e4s-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "e4s",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-ppc64le-eus-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-ppc64le-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-s390x-eus-rpms",
|
||
+ "arch": "s390x",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-s390x-rpms",
|
||
+ "arch": "s390x",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-x86_64-e4s-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "e4s",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-x86_64-eus-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "10",
|
||
+ "repoid": "satellite-client-6-for-rhel-10-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
{
|
||
"pesid": "rhel10-rhui-microsoft-azure-rhel10",
|
||
"entries": [
|
||
@@ -1769,1385 +1778,75 @@
|
||
]
|
||
},
|
||
{
|
||
- "pesid": "rhel7-base",
|
||
+ "pesid": "rhel8-BaseOS",
|
||
"entries": [
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-rhui-rpms",
|
||
+ "major_version": "8",
|
||
+ "repoid": "baseos",
|
||
"arch": "aarch64",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
+ "distro": "centos"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-rpms",
|
||
- "arch": "aarch64",
|
||
+ "major_version": "8",
|
||
+ "repoid": "baseos",
|
||
+ "arch": "ppc64le",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "centos"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-9-rpms",
|
||
- "arch": "ppc64le",
|
||
+ "major_version": "8",
|
||
+ "repoid": "baseos",
|
||
+ "arch": "s390x",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "centos"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-beta-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "beta",
|
||
+ "major_version": "8",
|
||
+ "repoid": "baseos",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "centos"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-e4s-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "e4s",
|
||
+ "major_version": "8",
|
||
+ "repoid": "rhel-8-baseos-beta-rhui-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "beta",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "rhel",
|
||
+ "rhui": "aws"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-els-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "els",
|
||
+ "major_version": "8",
|
||
+ "repoid": "rhel-8-baseos-beta-rhui-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "beta",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "rhel",
|
||
+ "rhui": "aws"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-eus-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "eus",
|
||
+ "major_version": "8",
|
||
+ "repoid": "rhel-8-baseos-rhui-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
+ "distro": "rhel",
|
||
+ "rhui": "aws"
|
||
},
|
||
{
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-rpms",
|
||
- "arch": "ppc64le",
|
||
+ "major_version": "8",
|
||
+ "repoid": "rhel-8-baseos-rhui-rpms",
|
||
+ "arch": "x86_64",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-a-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-els-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-eus-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-aus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "aus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-e4s-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-els-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-releases-rhui-beta",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-e4s-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-els-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "alibaba"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-optional",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-optional-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-rhui-optional-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-9-optional-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-e4s-optional-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-els-optional-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-eus-optional-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-optional-beta-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-optional-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-a-optional-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-els-optional-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-eus-optional-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-optional-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-optional-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-aus-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "aus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-e4s-optional-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-e4s-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-els-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-eus-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-optional-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-releases-rhui-optional-beta",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-eus-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-e4s-optional-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-els-optional-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-optional-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "alibaba"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-supplementary",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-9-supplementary-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-eus-supplementary-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-supplementary-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-eus-supplementary-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-supplementary-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-eus-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-eus-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-supplementary-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-extras",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-extras-beta-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-extras-rhui-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-arm-64-extras-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-9-extras-beta-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-9-extras-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-extras-beta-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-power-le-extras-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-a-extras-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-a-extras-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-extras-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-for-system-z-extras-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-extras-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-extras-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-extras-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rhui-extras-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-extras-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-7-server-rhui-extras-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "alibaba"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rt",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-eus-rt-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rt-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rt-els-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-rt-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-nfv",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-nfv-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-sap",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-power-le-e4s-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-power-le-els-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-power-le-eus-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-power-le-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-system-z-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-system-z-els-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-system-z-eus-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-for-system-z-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-els-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-eus-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-rhui-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-for-rhel-7-server-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-sap-for-rhel-7-server-rhui-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-sap-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-sap-hana",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-for-power-le-e4s-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-for-power-le-els-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-for-power-le-eus-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-for-power-le-rpms",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-els-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-eus-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-rhui-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-sap-hana-for-rhel-7-server-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-sap-hana-for-rhel-7-server-rhui-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-sap-hana-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-highavailability",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-for-system-z-beta-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-for-system-z-rpms",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-beta-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-e4s-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-e4s-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-els-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "els",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-eus-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-eus-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-ha-for-rhel-7-server-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-rhel-ha-for-rhel-7-server-e4s-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "e4s",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-ansible-2",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhel-7-server-ansible-2-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-client-config-server-7",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-client-config-server-7",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-client-config-server-7-arm",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-client-config-server-7-sap",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-client-config-server-7-sap-bundle",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-microsoft-azure-rhel7",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-microsoft-azure-rhel7",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- },
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-microsoft-azure-rhel7-eus",
|
||
- "arch": "x86_64",
|
||
- "channel": "eus",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-microsoft-sap-ha",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-microsoft-azure-rhel7-base-sap-ha",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-google-compute-engine",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "google-compute-engine",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-microsoft-azure-sap-apps",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-microsoft-azure-rhel7-base-sap-apps",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel7-rhui-custom-client-at-alibaba",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "7",
|
||
- "repoid": "rhui-custom-rhui_client_at_alibaba",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "alibaba"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel8-BaseOS",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "baseos",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "centos"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "baseos",
|
||
- "arch": "ppc64le",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "centos"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "baseos",
|
||
- "arch": "s390x",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "centos"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "baseos",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "centos"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "rhel-8-baseos-beta-rhui-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "rhel-8-baseos-beta-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "beta",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "rhel-8-baseos-rhui-rpms",
|
||
- "arch": "aarch64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
- },
|
||
- {
|
||
- "major_version": "8",
|
||
- "repoid": "rhel-8-baseos-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "aws"
|
||
+ "distro": "rhel",
|
||
+ "rhui": "aws"
|
||
},
|
||
{
|
||
"major_version": "8",
|
||
@@ -4551,66 +3250,211 @@
|
||
"arch": "x86_64",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "google"
|
||
+ "distro": "rhel",
|
||
+ "rhui": "google"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "rhui-rhel-8-for-x86_64-highavailability-rhui-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel",
|
||
+ "rhui": "alibaba"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-ansible-2",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "ansible-2-for-rhel-8-x86_64-rhui-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel",
|
||
+ "rhui": "azure"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-jbeap-7.4",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "jb-eap-7.4-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-jbeap-8.0",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "jb-eap-8.0-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-jbeap-8.1",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "jb-eap-8.1-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-satellite-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-6.16-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-satellite-capsule-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-capsule-6.16-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-satellite-maintenance-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-maintenance-6.16-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-satellite-utils-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-utils-6.16-for-rhel-8-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel8-satellite-client-6",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-aarch64-eus-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-aarch64-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-ppc64le-e4s-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "e4s",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-ppc64le-eus-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-ppc64le-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "8",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-s390x-eus-rpms",
|
||
+ "arch": "s390x",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
},
|
||
{
|
||
"major_version": "8",
|
||
- "repoid": "rhui-rhel-8-for-x86_64-highavailability-rhui-rpms",
|
||
- "arch": "x86_64",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-s390x-rpms",
|
||
+ "arch": "s390x",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "alibaba"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel8-ansible-2",
|
||
- "entries": [
|
||
+ "distro": "rhel"
|
||
+ },
|
||
{
|
||
"major_version": "8",
|
||
- "repoid": "ansible-2-for-rhel-8-x86_64-rhui-rpms",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-x86_64-aus-rpms",
|
||
"arch": "x86_64",
|
||
- "channel": "ga",
|
||
+ "channel": "aus",
|
||
"repo_type": "rpm",
|
||
- "distro": "rhel",
|
||
- "rhui": "azure"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel8-jbeap-7.4",
|
||
- "entries": [
|
||
+ "distro": "rhel"
|
||
+ },
|
||
{
|
||
"major_version": "8",
|
||
- "repoid": "jb-eap-7.4-for-rhel-8-x86_64-rpms",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-x86_64-e4s-rpms",
|
||
"arch": "x86_64",
|
||
- "channel": "ga",
|
||
+ "channel": "e4s",
|
||
"repo_type": "rpm",
|
||
"distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel8-jbeap-8.0",
|
||
- "entries": [
|
||
+ },
|
||
{
|
||
"major_version": "8",
|
||
- "repoid": "jb-eap-8.0-for-rhel-8-x86_64-rpms",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-x86_64-eus-rpms",
|
||
"arch": "x86_64",
|
||
- "channel": "ga",
|
||
+ "channel": "eus",
|
||
"repo_type": "rpm",
|
||
"distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel8-jbeap-8.1",
|
||
- "entries": [
|
||
+ },
|
||
{
|
||
"major_version": "8",
|
||
- "repoid": "jb-eap-8.1-for-rhel-8-x86_64-rpms",
|
||
+ "repoid": "satellite-client-6-for-rhel-8-x86_64-rpms",
|
||
"arch": "x86_64",
|
||
"channel": "ga",
|
||
"repo_type": "rpm",
|
||
@@ -6305,6 +5149,190 @@
|
||
}
|
||
]
|
||
},
|
||
+ {
|
||
+ "pesid": "rhel9-jbeap-7.4",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "jb-eap-7.4-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-jbeap-8.0",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "jb-eap-8.0-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-jbeap-8.1",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "jb-eap-8.1-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-satellite-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-6.16-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-satellite-capsule-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-capsule-6.16-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-satellite-maintenance-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-maintenance-6.16-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-satellite-utils-6.16",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-utils-6.16-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
+ {
|
||
+ "pesid": "rhel9-satellite-client-6",
|
||
+ "entries": [
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-aarch64-eus-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-aarch64-rpms",
|
||
+ "arch": "aarch64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-ppc64le-e4s-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "e4s",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-ppc64le-eus-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-ppc64le-rpms",
|
||
+ "arch": "ppc64le",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-s390x-eus-rpms",
|
||
+ "arch": "s390x",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-s390x-rpms",
|
||
+ "arch": "s390x",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-x86_64-aus-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "aus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-x86_64-e4s-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "e4s",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-x86_64-eus-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "eus",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ },
|
||
+ {
|
||
+ "major_version": "9",
|
||
+ "repoid": "satellite-client-6-for-rhel-9-x86_64-rpms",
|
||
+ "arch": "x86_64",
|
||
+ "channel": "ga",
|
||
+ "repo_type": "rpm",
|
||
+ "distro": "rhel"
|
||
+ }
|
||
+ ]
|
||
+ },
|
||
{
|
||
"pesid": "rhel9-rhui-client-config-server-9",
|
||
"entries": [
|
||
@@ -6434,45 +5462,6 @@
|
||
"rhui": "alibaba"
|
||
}
|
||
]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel9-jbeap-7.4",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "9",
|
||
- "repoid": "jb-eap-7.4-for-rhel-9-x86_64-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel9-jbeap-8.0",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "9",
|
||
- "repoid": "jb-eap-8.0-for-rhel-9-x86_64-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- }
|
||
- ]
|
||
- },
|
||
- {
|
||
- "pesid": "rhel9-jbeap-8.1",
|
||
- "entries": [
|
||
- {
|
||
- "major_version": "9",
|
||
- "repoid": "jb-eap-8.1-for-rhel-9-x86_64-rpms",
|
||
- "arch": "x86_64",
|
||
- "channel": "ga",
|
||
- "repo_type": "rpm",
|
||
- "distro": "rhel"
|
||
- }
|
||
- ]
|
||
}
|
||
]
|
||
}
|
||
diff --git a/etc/leapp/transaction/to_reinstall b/etc/leapp/transaction/to_reinstall
|
||
new file mode 100644
|
||
index 00000000..c6694a8e
|
||
--- /dev/null
|
||
+++ b/etc/leapp/transaction/to_reinstall
|
||
@@ -0,0 +1,3 @@
|
||
+### List of packages (each on new line) to be reinstalled to the upgrade transaction
|
||
+### Useful for packages that have identical version strings but contain binary changes between major OS versions
|
||
+### Packages that aren't installed will be skipped
|
||
diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||
index b28ec57c..6882488a 100644
|
||
--- a/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||
+++ b/repos/system_upgrade/common/actors/addupgradebootentry/libraries/addupgradebootentry.py
|
||
@@ -91,7 +91,7 @@ def figure_out_commands_needed_to_add_entry(kernel_path, initramfs_path, args_to
|
||
'/usr/sbin/grubby',
|
||
'--add-kernel', '{0}'.format(kernel_path),
|
||
'--initrd', '{0}'.format(initramfs_path),
|
||
- '--title', 'RHEL-Upgrade-Initramfs',
|
||
+ '--title', 'ELevate-Upgrade-Initramfs',
|
||
'--copy-default',
|
||
'--make-default',
|
||
'--args', args_to_add_str
|
||
diff --git a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||
index 7341602b..b2ced8ae 100644
|
||
--- a/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||
+++ b/repos/system_upgrade/common/actors/addupgradebootentry/tests/unit_test_addupgradebootentry.py
|
||
@@ -53,7 +53,7 @@ run_args_add = [
|
||
'/usr/sbin/grubby',
|
||
'--add-kernel', '/abc',
|
||
'--initrd', '/def',
|
||
- '--title', 'RHEL-Upgrade-Initramfs',
|
||
+ '--title', 'ELevate-Upgrade-Initramfs',
|
||
'--copy-default',
|
||
'--make-default',
|
||
'--args',
|
||
diff --git a/repos/system_upgrade/common/actors/checkenabledvendorrepos/actor.py b/repos/system_upgrade/common/actors/checkenabledvendorrepos/actor.py
|
||
new file mode 100644
|
||
index 00000000..52f5af9d
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/checkenabledvendorrepos/actor.py
|
||
@@ -0,0 +1,53 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import (
|
||
+ RepositoriesFacts,
|
||
+ VendorSourceRepos,
|
||
+ ActiveVendorList,
|
||
+)
|
||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class CheckEnabledVendorRepos(Actor):
|
||
+ """
|
||
+ Create a list of vendors whose repositories are present on the system and enabled.
|
||
+ Only those vendors' configurations (new repositories, PES actions, etc.)
|
||
+ will be included in the upgrade process.
|
||
+ """
|
||
+
|
||
+ name = "check_enabled_vendor_repos"
|
||
+ consumes = (RepositoriesFacts, VendorSourceRepos)
|
||
+ produces = (ActiveVendorList)
|
||
+ tags = (IPUWorkflowTag, FactsPhaseTag.Before)
|
||
+
|
||
+ def process(self):
|
||
+ vendor_mapping_data = {}
|
||
+ active_vendors = set()
|
||
+
|
||
+ # Make a dict for easy mapping of repoid -> corresponding vendor name.
|
||
+ for vendor_src_repodata in api.consume(VendorSourceRepos):
|
||
+ for vendor_src_repo in vendor_src_repodata.source_repoids:
|
||
+ vendor_mapping_data[vendor_src_repo] = vendor_src_repodata.vendor
|
||
+
|
||
+ # Is the repo listed in the vendor map as from_repoid present on the system?
|
||
+ for repos_facts in api.consume(RepositoriesFacts):
|
||
+ for repo_file in repos_facts.repositories:
|
||
+ for repo_data in repo_file.data:
|
||
+ self.log.debug(
|
||
+ "Looking for repository {} in vendor maps".format(repo_data.repoid)
|
||
+ )
|
||
+ if repo_data.enabled and repo_data.repoid in vendor_mapping_data:
|
||
+ # If the vendor's repository is present in the system and enabled, count the vendor as active.
|
||
+ new_vendor = vendor_mapping_data[repo_data.repoid]
|
||
+ self.log.debug(
|
||
+ "Repository {} found and enabled, enabling vendor {}".format(
|
||
+ repo_data.repoid, new_vendor
|
||
+ )
|
||
+ )
|
||
+ active_vendors.add(new_vendor)
|
||
+
|
||
+ if active_vendors:
|
||
+ self.log.debug("Active vendor list: {}".format(active_vendors))
|
||
+ api.produce(ActiveVendorList(data=list(active_vendors)))
|
||
+ else:
|
||
+ self.log.info("No active vendors found, vendor list not generated")
|
||
diff --git a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||
index 56a94b5d..46c5d9b6 100755
|
||
--- a/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||
+++ b/repos/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh
|
||
@@ -390,4 +390,3 @@ getarg 'rd.break=leapp-logs' 'rd.upgrade.break=leapp-finish' && {
|
||
sync
|
||
mount -o "remount,$old_opts" "$NEWROOT"
|
||
exit $result
|
||
-
|
||
diff --git a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/actor.py b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/actor.py
|
||
index 003f3fc5..9e7bbf4a 100644
|
||
--- a/repos/system_upgrade/common/actors/distributionsignedrpmscanner/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/distributionsignedrpmscanner/actor.py
|
||
@@ -1,6 +1,6 @@
|
||
from leapp.actors import Actor
|
||
from leapp.libraries.actor import distributionsignedrpmscanner
|
||
-from leapp.models import DistributionSignedRPM, InstalledRPM, InstalledUnsignedRPM, ThirdPartyRPM
|
||
+from leapp.models import DistributionSignedRPM, InstalledRPM, InstalledUnsignedRPM, ThirdPartyRPM, VendorSignatures
|
||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
from leapp.utils.deprecation import suppress_deprecation
|
||
|
||
@@ -8,7 +8,7 @@ from leapp.utils.deprecation import suppress_deprecation
|
||
@suppress_deprecation(InstalledUnsignedRPM)
|
||
class DistributionSignedRpmScanner(Actor):
|
||
"""
|
||
- Provide data about distribution signed & third-party RPM packages.
|
||
+ Provide data about distribution signed & third-party plus vendors RPM packages.
|
||
|
||
For various checks and actions done during the upgrade it's important to
|
||
know what packages are signed by GPG keys of the installed linux system
|
||
@@ -22,11 +22,18 @@ class DistributionSignedRpmScanner(Actor):
|
||
common/files/distro/<distro>/gpg_signatures.json
|
||
where <distro> is distribution ID of the installed system (e.g. centos, rhel).
|
||
|
||
- If the file for the installed distribution is not found, end with error.
|
||
+ Fingerprints of vendors GPG keys are stored under
|
||
+ /etc/leapp/files/vendors.d/<vendor>.sigs
|
||
+ where <vendor> is name of the vendor (e.g. mariadb, postgresql).
|
||
+
|
||
+ The "Distribution" in the name of the actor is a historical artifact - the actor
|
||
+ is used for both distribution and all vendors present in config files.
|
||
+
|
||
+ If the file for the installed distribution is not find, end with error.
|
||
"""
|
||
|
||
name = 'distribution_signed_rpm_scanner'
|
||
- consumes = (InstalledRPM,)
|
||
+ consumes = (InstalledRPM, VendorSignatures)
|
||
produces = (DistributionSignedRPM, InstalledUnsignedRPM, ThirdPartyRPM)
|
||
tags = (IPUWorkflowTag, FactsPhaseTag)
|
||
|
||
diff --git a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
|
||
index f42909f0..6383a56f 100644
|
||
--- a/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/efibootorderfix/finalization/actor.py
|
||
@@ -1,17 +1,117 @@
|
||
+import os
|
||
+import re
|
||
+
|
||
+from leapp.libraries.stdlib import run, api
|
||
from leapp.actors import Actor
|
||
-from leapp.libraries.common import efi_reboot_fix
|
||
+from leapp.models import InstalledTargetKernelVersion, KernelCmdlineArg, FirmwareFacts, MountEntry
|
||
from leapp.tags import FinalizationPhaseTag, IPUWorkflowTag
|
||
+from leapp.exceptions import StopActorExecutionError
|
||
|
||
|
||
class EfiFinalizationFix(Actor):
|
||
"""
|
||
- Adjust EFI boot entry for final reboot
|
||
+ Ensure that EFI boot order is updated, which is particularly necessary
|
||
+ when upgrading to a different OS distro. Also rebuilds grub config
|
||
+ if necessary.
|
||
"""
|
||
|
||
name = 'efi_finalization_fix'
|
||
- consumes = ()
|
||
+ consumes = (KernelCmdlineArg, InstalledTargetKernelVersion, FirmwareFacts, MountEntry)
|
||
produces = ()
|
||
- tags = (FinalizationPhaseTag, IPUWorkflowTag)
|
||
+ tags = (FinalizationPhaseTag.Before, IPUWorkflowTag)
|
||
|
||
def process(self):
|
||
- efi_reboot_fix.maybe_emit_updated_boot_entry()
|
||
+ is_system_efi = False
|
||
+ ff = next(self.consume(FirmwareFacts), None)
|
||
+
|
||
+ dirname = {
|
||
+ 'AlmaLinux': 'almalinux',
|
||
+ 'CentOS Linux': 'centos',
|
||
+ 'CentOS Stream': 'centos',
|
||
+ 'Oracle Linux Server': 'redhat',
|
||
+ 'Red Hat Enterprise Linux': 'redhat',
|
||
+ 'Rocky Linux': 'rocky',
|
||
+ 'Scientific Linux': 'redhat',
|
||
+ }
|
||
+
|
||
+ efi_shimname_dict = {
|
||
+ 'x86_64': 'shimx64.efi',
|
||
+ 'aarch64': 'shimaa64.efi'
|
||
+ }
|
||
+
|
||
+ def devparts(dev):
|
||
+ """
|
||
+ NVMe block devices aren't named like SCSI/ATA/etc block devices and must be parsed differently.
|
||
+ SCSI/ATA/etc devices have a syntax resembling /dev/sdb4 for the 4th partition on the 2nd disk.
|
||
+ NVMe devices have a syntax resembling /dev/nvme0n2p4 for the 4th partition on the 2nd disk.
|
||
+ """
|
||
+ if '/dev/nvme' in dev:
|
||
+ """
|
||
+ NVMe
|
||
+ """
|
||
+ part = next(re.finditer(r'p\d+$', dev)).group(0)
|
||
+ dev = dev[:-len(part)]
|
||
+ part = part[1:]
|
||
+ else:
|
||
+ """
|
||
+ Non-NVMe (SCSI, ATA, etc)
|
||
+ """
|
||
+ part = next(re.finditer(r'\d+$', dev)).group(0)
|
||
+ dev = dev[:-len(part)]
|
||
+ return [dev, part];
|
||
+
|
||
+ with open('/etc/system-release', 'r') as sr:
|
||
+ release_line = next(line for line in sr if 'release' in line)
|
||
+ distro = release_line.split(' release ', 1)[0]
|
||
+
|
||
+ efi_bootentry_label = distro
|
||
+ distro_dir = dirname.get(distro, 'default')
|
||
+ shim_filename = efi_shimname_dict.get(api.current_actor().configuration.architecture, 'shimx64.efi')
|
||
+
|
||
+ shim_path = '/boot/efi/EFI/' + distro_dir + '/' + shim_filename
|
||
+ grub_cfg_path = '/boot/efi/EFI/' + distro_dir + '/grub.cfg'
|
||
+ bootmgr_path = '\\EFI\\' + distro_dir + '\\' + shim_filename
|
||
+
|
||
+ has_efibootmgr = os.path.exists('/sbin/efibootmgr')
|
||
+ has_shim = os.path.exists(shim_path)
|
||
+ has_grub_cfg = os.path.exists(grub_cfg_path)
|
||
+
|
||
+ if not ff:
|
||
+ raise StopActorExecutionError(
|
||
+ 'Could not identify system firmware',
|
||
+ details={'details': 'Actor did not receive FirmwareFacts message.'}
|
||
+ )
|
||
+
|
||
+ if not has_efibootmgr:
|
||
+ return
|
||
+
|
||
+ for fact in self.consume(FirmwareFacts):
|
||
+ if fact.firmware == 'efi':
|
||
+ is_system_efi = True
|
||
+ break
|
||
+
|
||
+ if is_system_efi and has_shim:
|
||
+ efidevlist = []
|
||
+ with open('/proc/mounts', 'r') as fp:
|
||
+ for line in fp:
|
||
+ if '/boot/efi' in line:
|
||
+ efidevpath = line.split(' ', 1)[0]
|
||
+ efidevpart = efidevpath.split('/')[-1]
|
||
+ if os.path.exists('/proc/mdstat'):
|
||
+ with open('/proc/mdstat', 'r') as mds:
|
||
+ for line in mds:
|
||
+ if line.startswith(efidevpart):
|
||
+ mddev = line.split(' ')
|
||
+ for md in mddev:
|
||
+ if '[' in md:
|
||
+ efimd = md.split('[', 1)[0]
|
||
+ efidp = efidevpath.replace(efidevpart, efimd)
|
||
+ efidevlist.append(efidp)
|
||
+ if len(efidevlist) == 0:
|
||
+ efidevlist.append(efidevpath)
|
||
+ for devpath in efidevlist:
|
||
+ efidev, efipart = devparts(devpath)
|
||
+ run(['/sbin/efibootmgr', '-c', '-d', efidev, '-p', efipart, '-l', bootmgr_path, '-L', efi_bootentry_label])
|
||
+
|
||
+ if not has_grub_cfg:
|
||
+ run(['/sbin/grub2-mkconfig', '-o', grub_cfg_path])
|
||
diff --git a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||
index 582a5821..18f2c33f 100644
|
||
--- a/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/filterrpmtransactionevents/actor.py
|
||
@@ -32,6 +32,7 @@ class FilterRpmTransactionTasks(Actor):
|
||
to_remove = set()
|
||
to_keep = set()
|
||
to_upgrade = set()
|
||
+ to_reinstall = set()
|
||
modules_to_enable = {}
|
||
modules_to_reset = {}
|
||
for event in self.consume(RpmTransactionTasks, PESRpmTransactionTasks):
|
||
@@ -39,13 +40,14 @@ class FilterRpmTransactionTasks(Actor):
|
||
to_install.update(event.to_install)
|
||
to_remove.update(installed_pkgs.intersection(event.to_remove))
|
||
to_keep.update(installed_pkgs.intersection(event.to_keep))
|
||
+ to_reinstall.update(installed_pkgs.intersection(event.to_reinstall))
|
||
modules_to_enable.update({'{}:{}'.format(m.name, m.stream): m for m in event.modules_to_enable})
|
||
modules_to_reset.update({'{}:{}'.format(m.name, m.stream): m for m in event.modules_to_reset})
|
||
|
||
to_remove.difference_update(to_keep)
|
||
|
||
# run upgrade for the rest of RH signed pkgs which we do not have rule for
|
||
- to_upgrade = installed_pkgs - (to_install | to_remove)
|
||
+ to_upgrade = installed_pkgs - (to_install | to_remove | to_reinstall)
|
||
|
||
self.produce(FilteredRpmTransactionTasks(
|
||
local_rpms=list(local_rpms),
|
||
@@ -53,5 +55,6 @@ class FilterRpmTransactionTasks(Actor):
|
||
to_remove=list(to_remove),
|
||
to_keep=list(to_keep),
|
||
to_upgrade=list(to_upgrade),
|
||
+ to_reinstall=list(to_reinstall),
|
||
modules_to_reset=list(modules_to_reset.values()),
|
||
modules_to_enable=list(modules_to_enable.values())))
|
||
diff --git a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py b/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||
index 32e4527b..1e595e9a 100644
|
||
--- a/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||
+++ b/repos/system_upgrade/common/actors/missinggpgkeysinhibitor/libraries/missinggpgkey.py
|
||
@@ -152,11 +152,11 @@ def _report(title, summary, keys, inhibitor=False):
|
||
)
|
||
hint = (
|
||
'Check the path to the listed GPG keys is correct, the keys are valid and'
|
||
- ' import them into the host RPM DB or store them inside the {} directory'
|
||
+ ' import them into the host RPM DB or store them inside on of the {} directories'
|
||
' prior the upgrade.'
|
||
' If you want to proceed the in-place upgrade without checking any RPM'
|
||
' signatures, execute leapp with the `--nogpgcheck` option.'
|
||
- .format(get_path_to_gpg_certs())
|
||
+ .format(','.format(get_path_to_gpg_certs()))
|
||
)
|
||
groups = [reporting.Groups.REPOSITORY]
|
||
if inhibitor:
|
||
@@ -188,7 +188,7 @@ def _report_missing_keys(keys):
|
||
summary = (
|
||
'Some of the target repositories require GPG keys that are not installed'
|
||
' in the current RPM DB or are not stored in the {trust_dir} directory.'
|
||
- .format(trust_dir=get_path_to_gpg_certs())
|
||
+ .format(trust_dir=','.join(get_path_to_gpg_certs()))
|
||
)
|
||
_report('Detected unknown GPG keys for target system repositories', summary, keys, True)
|
||
|
||
@@ -262,11 +262,12 @@ def _report_repos_missing_keys(repos):
|
||
|
||
|
||
def register_dnfworkaround():
|
||
- api.produce(DNFWorkaround(
|
||
- display_name='import trusted gpg keys to RPM DB',
|
||
- script_path=api.current_actor().get_common_tool_path('importrpmgpgkeys'),
|
||
- script_args=[get_path_to_gpg_certs()],
|
||
- ))
|
||
+ for trust_certs_dir in get_path_to_gpg_certs():
|
||
+ api.produce(DNFWorkaround(
|
||
+ display_name='import trusted gpg keys to RPM DB',
|
||
+ script_path=api.current_actor().get_common_tool_path('importrpmgpgkeys'),
|
||
+ script_args=[trust_certs_dir],
|
||
+ ))
|
||
|
||
|
||
@suppress_deprecation(TMPTargetRepositoriesFacts)
|
||
diff --git a/repos/system_upgrade/common/actors/peseventsscanner/actor.py b/repos/system_upgrade/common/actors/peseventsscanner/actor.py
|
||
index f801f1a1..cb911471 100644
|
||
--- a/repos/system_upgrade/common/actors/peseventsscanner/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/peseventsscanner/actor.py
|
||
@@ -10,7 +10,8 @@ from leapp.models import (
|
||
RepositoriesMapping,
|
||
RepositoriesSetupTasks,
|
||
RHUIInfo,
|
||
- RpmTransactionTasks
|
||
+ RpmTransactionTasks,
|
||
+ ActiveVendorList,
|
||
)
|
||
from leapp.reporting import Report
|
||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
@@ -33,6 +34,7 @@ class PesEventsScanner(Actor):
|
||
RepositoriesMapping,
|
||
RHUIInfo,
|
||
RpmTransactionTasks,
|
||
+ ActiveVendorList,
|
||
)
|
||
produces = (ConsumedDataAsset, PESRpmTransactionTasks, RepositoriesSetupTasks, Report)
|
||
tags = (IPUWorkflowTag, FactsPhaseTag)
|
||
diff --git a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_event_parsing.py b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_event_parsing.py
|
||
index f24dda68..7ee5d016 100644
|
||
--- a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_event_parsing.py
|
||
+++ b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_event_parsing.py
|
||
@@ -58,6 +58,7 @@ class Action(IntEnum):
|
||
MERGED = 5
|
||
MOVED = 6
|
||
RENAMED = 7
|
||
+ REINSTALLED = 8
|
||
|
||
|
||
def get_pes_events(pes_json_directory, pes_json_filename):
|
||
@@ -72,13 +73,14 @@ def get_pes_events(pes_json_directory, pes_json_filename):
|
||
# a case as we have no work to do in such a case here.
|
||
events_data = fetch.load_data_asset(api.current_actor(),
|
||
pes_json_filename,
|
||
+ asset_directory=pes_json_directory,
|
||
asset_fulltext_name='PES events file',
|
||
docs_url='',
|
||
docs_title='')
|
||
if not events_data:
|
||
return None
|
||
|
||
- if not events_data.get('packageinfo'):
|
||
+ if events_data.get('packageinfo') is None:
|
||
raise ValueError('Found PES data with invalid structure')
|
||
|
||
all_events = list(chain(*[parse_entry(entry) for entry in events_data['packageinfo']]))
|
||
diff --git a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||
index 02107314..de4b6945 100644
|
||
--- a/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||
+++ b/repos/system_upgrade/common/actors/peseventsscanner/libraries/pes_events_scanner.py
|
||
@@ -1,5 +1,6 @@
|
||
from collections import defaultdict, namedtuple
|
||
from functools import partial
|
||
+import os
|
||
|
||
from leapp import reporting
|
||
from leapp.exceptions import StopActorExecutionError
|
||
@@ -7,6 +8,7 @@ from leapp.libraries.actor import peseventsscanner_repomap
|
||
from leapp.libraries.actor.pes_event_parsing import Action, get_pes_events, Package
|
||
from leapp.libraries.common import rpms
|
||
from leapp.libraries.common.config import get_target_distro_id, version
|
||
+from leapp.libraries.common.repomaputils import combine_repomap_messages
|
||
from leapp.libraries.stdlib import api
|
||
from leapp.libraries.stdlib.config import is_verbose
|
||
from leapp.models import (
|
||
@@ -20,7 +22,8 @@ from leapp.models import (
|
||
RepositoriesMapping,
|
||
RepositoriesSetupTasks,
|
||
RHUIInfo,
|
||
- RpmTransactionTasks
|
||
+ RpmTransactionTasks,
|
||
+ ActiveVendorList,
|
||
)
|
||
|
||
SKIPPED_PKGS_MSG = (
|
||
@@ -31,8 +34,9 @@ SKIPPED_PKGS_MSG = (
|
||
'for details.\nThe list of these packages:'
|
||
)
|
||
|
||
+VENDORS_DIR = "/etc/leapp/files/vendors.d"
|
||
|
||
-TransactionConfiguration = namedtuple('TransactionConfiguration', ('to_install', 'to_remove', 'to_keep'))
|
||
+TransactionConfiguration = namedtuple('TransactionConfiguration', ('to_install', 'to_remove', 'to_keep', 'to_reinstall'))
|
||
|
||
|
||
def get_cloud_provider_name(cloud_provider_variant):
|
||
@@ -86,7 +90,7 @@ def get_transaction_configuration():
|
||
|
||
:return: TransactionConfiguration
|
||
"""
|
||
- transaction_configuration = TransactionConfiguration(to_install=set(), to_remove=set(), to_keep=set())
|
||
+ transaction_configuration = TransactionConfiguration(to_install=set(), to_remove=set(), to_keep=set(), to_reinstall=set())
|
||
|
||
_Pkg = partial(Package, repository=None, modulestream=None)
|
||
|
||
@@ -94,6 +98,7 @@ def get_transaction_configuration():
|
||
transaction_configuration.to_install.update(_Pkg(name=pkg_name) for pkg_name in tasks.to_install)
|
||
transaction_configuration.to_remove.update(_Pkg(name=pkg_name) for pkg_name in tasks.to_remove)
|
||
transaction_configuration.to_keep.update(_Pkg(name=pkg_name) for pkg_name in tasks.to_keep)
|
||
+ transaction_configuration.to_reinstall.update(_Pkg(name=pkg_name) for pkg_name in tasks.to_reinstall)
|
||
return transaction_configuration
|
||
|
||
|
||
@@ -133,25 +138,44 @@ def compute_pkg_changes_between_consequent_releases(source_installed_pkgs,
|
||
logger = api.current_logger()
|
||
# Start with the installed packages and modify the set according to release events
|
||
target_pkgs = set(source_installed_pkgs)
|
||
+ pkgs_to_reinstall = set()
|
||
|
||
release_events = [e for e in events if e.to_release == release]
|
||
|
||
+ def log_replaced_pkgs(removed, added):
|
||
+ removed_pkgs_str = ', '.join(str(pkg) for pkg in removed) or '[]'
|
||
+ added_pkgs_str = ', '.join(str(pkg) for pkg in added) or '[]'
|
||
+ logger.debug('Applying event %d (%s): replacing packages %s with %s',
|
||
+ event.id, event.action.name, removed_pkgs_str, added_pkgs_str)
|
||
+
|
||
for event in release_events:
|
||
# PRESENCE events have a different semantics than the other events - they add a package to a target state
|
||
# only if it had been seen (installed) during the course of the overall target packages
|
||
if event.action == Action.PRESENT:
|
||
- for pkg in event.in_pkgs:
|
||
- if pkg in seen_pkgs:
|
||
- # First remove the package with the old repository and add it back, but now with the new
|
||
- # repository. As the Package class has a custom __hash__ and __eq__ comparing only name
|
||
- # and modulestream, the pkg.repository field is ignore and therefore the add() call
|
||
- # does not update the entry.
|
||
- if pkg in target_pkgs:
|
||
- target_pkgs.remove(pkg)
|
||
- target_pkgs.add(pkg)
|
||
+ # explicitly take the common pkgs from the event.in_pkgs,
|
||
+ # intersection cannot be used as it isn't defined from which set an
|
||
+ # element is taken if two elements have the same hash and are equal
|
||
+ # (there can be optimalizations such as always iterating the
|
||
+ # smaller set).
|
||
+ seen_in_pkgs = {pkg for pkg in event.in_pkgs if pkg in seen_pkgs}
|
||
+ if seen_in_pkgs:
|
||
+ removed_pkgs = target_pkgs.intersection(seen_in_pkgs)
|
||
+ log_replaced_pkgs(removed_pkgs, seen_in_pkgs)
|
||
+
|
||
+ # First, remove the packages with the old repositories and add them
|
||
+ # back, but now with the new repositories. As the Package class has
|
||
+ # a custom __hash__ and __eq__ comparing only name and
|
||
+ # modulestream, the pkg.repository field is ignored and therefore
|
||
+ # the union() call does not update the entries.
|
||
+ target_pkgs = target_pkgs.difference(seen_in_pkgs)
|
||
+ target_pkgs = seen_in_pkgs.union(target_pkgs)
|
||
+
|
||
elif event.action == Action.DEPRECATED:
|
||
if event.in_pkgs.intersection(source_installed_pkgs):
|
||
# Remove packages with old repositories add packages with the new one
|
||
+ removed_pkgs = target_pkgs.intersection(event.in_pkgs)
|
||
+ log_replaced_pkgs(removed_pkgs, event.in_pkgs)
|
||
+
|
||
target_pkgs = target_pkgs.difference(event.in_pkgs)
|
||
target_pkgs = target_pkgs.union(event.in_pkgs)
|
||
else:
|
||
@@ -163,10 +187,7 @@ def compute_pkg_changes_between_consequent_releases(source_installed_pkgs,
|
||
# For MERGE to be relevant it is sufficient for only one of its in_pkgs to be installed
|
||
if are_all_in_pkgs_present or (event.action == Action.MERGED and is_any_in_pkg_present):
|
||
removed_pkgs = target_pkgs.intersection(event.in_pkgs)
|
||
- removed_pkgs_str = ', '.join(str(pkg) for pkg in removed_pkgs) if removed_pkgs else '[]'
|
||
- added_pkgs_str = ', '.join(str(pkg) for pkg in event.out_pkgs) if event.out_pkgs else '[]'
|
||
- logger.debug('Applying event %d (%s): replacing packages %s with %s',
|
||
- event.id, event.action, removed_pkgs_str, added_pkgs_str)
|
||
+ log_replaced_pkgs(removed_pkgs, event.out_pkgs)
|
||
|
||
# In pkgs are present, event can be applied
|
||
# Note: We do a .difference(event.out_packages) followed by an .union(event.out_packages) to overwrite
|
||
@@ -176,9 +197,12 @@ def compute_pkg_changes_between_consequent_releases(source_installed_pkgs,
|
||
target_pkgs = target_pkgs.difference(event.out_pkgs)
|
||
target_pkgs = target_pkgs.union(event.out_pkgs)
|
||
|
||
+ if (event.action == Action.REINSTALLED and is_any_in_pkg_present):
|
||
+ pkgs_to_reinstall = pkgs_to_reinstall.union(event.in_pkgs)
|
||
+
|
||
pkgs_to_demodularize = pkgs_to_demodularize.difference(event.in_pkgs)
|
||
|
||
- return (target_pkgs, pkgs_to_demodularize)
|
||
+ return (target_pkgs, pkgs_to_demodularize, pkgs_to_reinstall)
|
||
|
||
|
||
def remove_undesired_events(events, relevant_to_releases):
|
||
@@ -244,15 +268,17 @@ def compute_packages_on_target_system(source_pkgs, events, releases):
|
||
did_processing_cross_major_version = True
|
||
pkgs_to_demodularize = {pkg for pkg in target_pkgs if pkg.modulestream}
|
||
|
||
- target_pkgs, pkgs_to_demodularize = compute_pkg_changes_between_consequent_releases(target_pkgs, events,
|
||
- release, seen_pkgs,
|
||
- pkgs_to_demodularize)
|
||
+ target_pkgs, pkgs_to_demodularize, pkgs_to_reinstall = compute_pkg_changes_between_consequent_releases(
|
||
+ target_pkgs, events,
|
||
+ release, seen_pkgs,
|
||
+ pkgs_to_demodularize
|
||
+ )
|
||
seen_pkgs = seen_pkgs.union(target_pkgs)
|
||
|
||
demodularized_pkgs = {Package(pkg.name, pkg.repository, None) for pkg in pkgs_to_demodularize}
|
||
demodularized_target_pkgs = target_pkgs.difference(pkgs_to_demodularize).union(demodularized_pkgs)
|
||
|
||
- return (demodularized_target_pkgs, pkgs_to_demodularize)
|
||
+ return (demodularized_target_pkgs, pkgs_to_demodularize, pkgs_to_reinstall)
|
||
|
||
|
||
def compute_rpm_tasks_from_pkg_set_diff(source_pkgs, target_pkgs, pkgs_to_demodularize):
|
||
@@ -356,15 +382,13 @@ def get_pesid_to_repoid_map(target_pesids):
|
||
:return: Dictionary mapping the target_pesids to their corresponding repoid
|
||
"""
|
||
|
||
- repositories_map_msgs = api.consume(RepositoriesMapping)
|
||
- repositories_map_msg = next(repositories_map_msgs, None)
|
||
- if list(repositories_map_msgs):
|
||
- api.current_logger().warning('Unexpectedly received more than one RepositoriesMapping message.')
|
||
- if not repositories_map_msg:
|
||
+ repositories_map_msgs = list(api.consume(RepositoriesMapping))
|
||
+ if not repositories_map_msgs:
|
||
raise StopActorExecutionError(
|
||
'Cannot parse RepositoriesMapping data properly',
|
||
details={'Problem': 'Did not receive a message with mapped repositories'}
|
||
)
|
||
+ repositories_map_msg = combine_repomap_messages(repositories_map_msgs)
|
||
|
||
rhui_info = next(api.consume(RHUIInfo), None)
|
||
cloud_provider = rhui_info.provider if rhui_info else ''
|
||
@@ -555,6 +579,19 @@ def process():
|
||
if not events:
|
||
return
|
||
|
||
+ active_vendors = []
|
||
+ for vendor_list in api.consume(ActiveVendorList):
|
||
+ active_vendors.extend(vendor_list.data)
|
||
+
|
||
+ pes_json_suffix = "_pes.json"
|
||
+ if os.path.isdir(VENDORS_DIR):
|
||
+ vendor_pesfiles = list(filter(lambda vfile: pes_json_suffix in vfile, os.listdir(VENDORS_DIR)))
|
||
+
|
||
+ for pesfile in vendor_pesfiles:
|
||
+ if pesfile[:-len(pes_json_suffix)] in active_vendors:
|
||
+ vendor_events = get_pes_events(VENDORS_DIR, pesfile)
|
||
+ events.extend(vendor_events)
|
||
+
|
||
releases = get_relevant_releases(events)
|
||
installed_pkgs = get_installed_pkgs()
|
||
transaction_configuration = get_transaction_configuration()
|
||
@@ -568,7 +605,7 @@ def process():
|
||
events = remove_undesired_events(events, releases)
|
||
|
||
# Apply events - compute what packages should the target system have
|
||
- target_pkgs, pkgs_to_demodularize = compute_packages_on_target_system(pkgs_to_begin_computation_with,
|
||
+ target_pkgs, pkgs_to_demodularize, pkgs_to_reinstall = compute_packages_on_target_system(pkgs_to_begin_computation_with,
|
||
events, releases)
|
||
|
||
# Packages coming out of the events have PESID as their repository, however, we need real repoid
|
||
@@ -588,4 +625,5 @@ def process():
|
||
rpm_tasks = include_instructions_from_transaction_configuration(rpm_tasks, transaction_configuration,
|
||
installed_pkgs)
|
||
if rpm_tasks:
|
||
+ rpm_tasks.to_reinstall = sorted(pkgs_to_reinstall)
|
||
api.produce(rpm_tasks)
|
||
diff --git a/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py b/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||
index 503e66a3..4ec1d6e0 100644
|
||
--- a/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||
+++ b/repos/system_upgrade/common/actors/repositoriesmapping/libraries/repositoriesmapping.py
|
||
@@ -3,6 +3,7 @@ from collections import defaultdict
|
||
|
||
from leapp.exceptions import StopActorExecutionError
|
||
from leapp.libraries.common.config.version import get_source_major_version, get_target_major_version
|
||
+from leapp.libraries.common.repomaputils import RepoMapData
|
||
from leapp.libraries.common.fetch import load_data_asset
|
||
from leapp.libraries.common.rpms import get_leapp_packages, LeappComponents
|
||
from leapp.libraries.stdlib import api
|
||
@@ -16,121 +17,6 @@ REPOMAP_FILE = 'repomap.json'
|
||
"""The name of the new repository mapping file."""
|
||
|
||
|
||
-class RepoMapData:
|
||
- VERSION_FORMAT = '1.3.0'
|
||
-
|
||
- def __init__(self):
|
||
- self.repositories = []
|
||
- self.mapping = {}
|
||
-
|
||
- def add_repository(self, data, pesid):
|
||
- """
|
||
- Add new PESIDRepositoryEntry with given pesid from the provided dictionary.
|
||
-
|
||
- :param data: A dict containing the data of the added repository. The dictionary structure corresponds
|
||
- to the repositories entries in the repository mapping JSON schema.
|
||
- :type data: Dict[str, str]
|
||
- :param pesid: PES id of the repository family that the newly added repository belongs to.
|
||
- :type pesid: str
|
||
- """
|
||
- self.repositories.append(PESIDRepositoryEntry(
|
||
- repoid=data['repoid'],
|
||
- channel=data['channel'],
|
||
- rhui=data.get('rhui', ''),
|
||
- repo_type=data['repo_type'],
|
||
- arch=data['arch'],
|
||
- major_version=data['major_version'],
|
||
- pesid=pesid,
|
||
- distro=data['distro'],
|
||
- ))
|
||
-
|
||
- def get_repositories(self, valid_major_versions):
|
||
- """
|
||
- Return the list of PESIDRepositoryEntry object matching the specified major versions.
|
||
- """
|
||
- return [repo for repo in self.repositories if repo.major_version in valid_major_versions]
|
||
-
|
||
- def add_mapping(self, source_major_version, target_major_version, source_pesid, target_pesid):
|
||
- """
|
||
- Add a new mapping entry that is mapping the source pesid to the destination pesid(s),
|
||
- relevant in an IPU from the supplied source major version to the supplied target
|
||
- major version.
|
||
-
|
||
- :param str source_major_version: Specifies the major version of the source system
|
||
- for which the added mapping applies.
|
||
- :param str target_major_version: Specifies the major version of the target system
|
||
- for which the added mapping applies.
|
||
- :param str source_pesid: PESID of the source repository.
|
||
- :param Union[str|List[str]] target_pesid: A single target PESID or a list of target
|
||
- PESIDs of the added mapping.
|
||
- """
|
||
- # NOTE: it could be more simple, but I prefer to be sure the input data
|
||
- # contains just one map per source PESID.
|
||
- key = '{}:{}'.format(source_major_version, target_major_version)
|
||
- rmap = self.mapping.get(key, defaultdict(set))
|
||
- self.mapping[key] = rmap
|
||
- if isinstance(target_pesid, list):
|
||
- rmap[source_pesid].update(target_pesid)
|
||
- else:
|
||
- rmap[source_pesid].add(target_pesid)
|
||
-
|
||
- def get_mappings(self, src_major_version, dst_major_version):
|
||
- """
|
||
- Return the list of RepoMapEntry objects for the specified upgrade path.
|
||
-
|
||
- IOW, the whole mapping for specified IPU.
|
||
- """
|
||
- key = '{}:{}'.format(src_major_version, dst_major_version)
|
||
- rmap = self.mapping.get(key, None)
|
||
- if not rmap:
|
||
- return None
|
||
- map_list = []
|
||
- for src_pesid in sorted(rmap.keys()):
|
||
- map_list.append(RepoMapEntry(source=src_pesid, target=sorted(rmap[src_pesid])))
|
||
- return map_list
|
||
-
|
||
- @staticmethod
|
||
- def load_from_dict(data):
|
||
- if data['version_format'] != RepoMapData.VERSION_FORMAT:
|
||
- raise ValueError(
|
||
- 'The obtained repomap data has unsupported version of format.'
|
||
- ' Get {} required {}'
|
||
- .format(data['version_format'], RepoMapData.VERSION_FORMAT)
|
||
- )
|
||
-
|
||
- repomap = RepoMapData()
|
||
-
|
||
- # Load reposiories
|
||
- existing_pesids = set()
|
||
- for repo_family in data['repositories']:
|
||
- existing_pesids.add(repo_family['pesid'])
|
||
- for repo in repo_family['entries']:
|
||
- repomap.add_repository(repo, repo_family['pesid'])
|
||
-
|
||
- # Load mappings
|
||
- for mapping in data['mapping']:
|
||
- for entry in mapping['entries']:
|
||
- if not isinstance(entry['target'], list):
|
||
- raise ValueError(
|
||
- 'The target field of a mapping entry is not a list: {}'
|
||
- .format(entry)
|
||
- )
|
||
-
|
||
- for pesid in [entry['source']] + entry['target']:
|
||
- if pesid not in existing_pesids:
|
||
- raise ValueError(
|
||
- 'The {} pesid is not related to any repository.'
|
||
- .format(pesid)
|
||
- )
|
||
- repomap.add_mapping(
|
||
- source_major_version=mapping['source_major_version'],
|
||
- target_major_version=mapping['target_major_version'],
|
||
- source_pesid=entry['source'],
|
||
- target_pesid=entry['target'],
|
||
- )
|
||
- return repomap
|
||
-
|
||
-
|
||
def _inhibit_upgrade(msg):
|
||
local_path = os.path.join('/etc/leapp/file', REPOMAP_FILE)
|
||
hint = (
|
||
diff --git a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py
|
||
index 84895f83..62aefaf4 100644
|
||
--- a/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py
|
||
+++ b/repos/system_upgrade/common/actors/rpmtransactionconfigtaskscollector/libraries/rpmtransactionconfigtaskscollector.py
|
||
@@ -18,22 +18,37 @@ def load_tasks_file(path, logger):
|
||
return []
|
||
|
||
|
||
+def filter_out(installed_rpm_names, to_filter, debug_msg):
|
||
+ # These are the packages that aren't installed on the system.
|
||
+ filtered_ok = [pkg for pkg in to_filter if pkg not in installed_rpm_names]
|
||
+
|
||
+ # And these ones are the ones that are.
|
||
+ filtered_out = list(set(to_filter) - set(filtered_ok))
|
||
+ if filtered_out:
|
||
+ api.current_logger().debug(
|
||
+ debug_msg +
|
||
+ '\n- ' + '\n- '.join(filtered_out)
|
||
+ )
|
||
+ # We may want to use either of the two sets.
|
||
+ return filtered_ok, filtered_out
|
||
+
|
||
+
|
||
def load_tasks(base_dir, logger):
|
||
# Loads configuration files to_install, to_keep, and to_remove from the given base directory
|
||
rpms = next(api.consume(DistributionSignedRPM))
|
||
rpm_names = [rpm.name for rpm in rpms.items]
|
||
+
|
||
to_install = load_tasks_file(os.path.join(base_dir, 'to_install'), logger)
|
||
+ install_debug_msg = 'The following packages from "to_install" file will be ignored as they are already installed:'
|
||
# we do not want to put into rpm transaction what is already installed (it will go to "to_upgrade" bucket)
|
||
- to_install_filtered = [pkg for pkg in to_install if pkg not in rpm_names]
|
||
+ to_install_filtered, _ = filter_out(rpm_names, to_install, install_debug_msg)
|
||
|
||
- filtered = set(to_install) - set(to_install_filtered)
|
||
- if filtered:
|
||
- api.current_logger().debug(
|
||
- 'The following packages from "to_install" file will be ignored as they are already installed:\n- %s',
|
||
- '\n- '.join(filtered)
|
||
- )
|
||
+ to_reinstall = load_tasks_file(os.path.join(base_dir, 'to_reinstall'), logger)
|
||
+ reinstall_debug_msg = 'The following packages from "to_reinstall" file will be ignored as they are not installed:'
|
||
+ _, to_reinstall_filtered = filter_out(rpm_names, to_reinstall, reinstall_debug_msg)
|
||
|
||
return RpmTransactionTasks(
|
||
to_install=to_install_filtered,
|
||
+ to_reinstall=to_reinstall_filtered,
|
||
to_keep=load_tasks_file(os.path.join(base_dir, 'to_keep'), logger),
|
||
to_remove=load_tasks_file(os.path.join(base_dir, 'to_remove'), logger))
|
||
diff --git a/repos/system_upgrade/common/actors/scanvendorrepofiles/actor.py b/repos/system_upgrade/common/actors/scanvendorrepofiles/actor.py
|
||
new file mode 100644
|
||
index 00000000..a5e481cb
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/scanvendorrepofiles/actor.py
|
||
@@ -0,0 +1,26 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor import scanvendorrepofiles
|
||
+from leapp.models import (
|
||
+ CustomTargetRepositoryFile,
|
||
+ ActiveVendorList,
|
||
+ VendorCustomTargetRepositoryList,
|
||
+)
|
||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class ScanVendorRepofiles(Actor):
|
||
+ """
|
||
+ Load and produce custom repository data from vendor-provided files.
|
||
+ Only those vendors whose source system repoids were found on the system will be included.
|
||
+ """
|
||
+
|
||
+ name = "scan_vendor_repofiles"
|
||
+ consumes = ActiveVendorList
|
||
+ produces = (
|
||
+ CustomTargetRepositoryFile,
|
||
+ VendorCustomTargetRepositoryList,
|
||
+ )
|
||
+ tags = (FactsPhaseTag, IPUWorkflowTag)
|
||
+
|
||
+ def process(self):
|
||
+ scanvendorrepofiles.process()
|
||
diff --git a/repos/system_upgrade/common/actors/scanvendorrepofiles/libraries/scanvendorrepofiles.py b/repos/system_upgrade/common/actors/scanvendorrepofiles/libraries/scanvendorrepofiles.py
|
||
new file mode 100644
|
||
index 00000000..84392101
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/scanvendorrepofiles/libraries/scanvendorrepofiles.py
|
||
@@ -0,0 +1,72 @@
|
||
+import os
|
||
+
|
||
+from leapp.libraries.common import repofileutils
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import (
|
||
+ CustomTargetRepository,
|
||
+ CustomTargetRepositoryFile,
|
||
+ ActiveVendorList,
|
||
+ VendorCustomTargetRepositoryList,
|
||
+)
|
||
+
|
||
+
|
||
+VENDORS_DIR = "/etc/leapp/files/vendors.d/"
|
||
+REPOFILE_SUFFIX = ".repo"
|
||
+
|
||
+
|
||
+def process():
|
||
+ """
|
||
+ Produce CustomTargetRepository msgs for the vendor repo files inside the
|
||
+ <CUSTOM_REPO_DIR>.
|
||
+
|
||
+ The CustomTargetRepository messages are produced only if a "from" vendor repository
|
||
+ listed indide its map matched one of the repositories active on the system.
|
||
+ """
|
||
+ if not os.path.isdir(VENDORS_DIR):
|
||
+ api.current_logger().debug(
|
||
+ "The {} directory doesn't exist. Nothing to do.".format(VENDORS_DIR)
|
||
+ )
|
||
+ return
|
||
+
|
||
+ for repofile_name in os.listdir(VENDORS_DIR):
|
||
+ if not repofile_name.endswith(REPOFILE_SUFFIX):
|
||
+ continue
|
||
+ # Cut the .repo part to get only the name.
|
||
+ vendor_name = repofile_name[:-5]
|
||
+
|
||
+ active_vendors = []
|
||
+ for vendor_list in api.consume(ActiveVendorList):
|
||
+ active_vendors.extend(vendor_list.data)
|
||
+
|
||
+ api.current_logger().debug("Active vendor list: {}".format(active_vendors))
|
||
+
|
||
+ if vendor_name not in active_vendors:
|
||
+ api.current_logger().debug(
|
||
+ "Vendor {} not in active list, skipping".format(vendor_name)
|
||
+ )
|
||
+ continue
|
||
+
|
||
+ full_repo_path = os.path.join(VENDORS_DIR, repofile_name)
|
||
+ parsed_repofile = repofileutils.parse_repofile(full_repo_path)
|
||
+ api.current_logger().debug(
|
||
+ "Vendor {} found in active list, processing file {}".format(vendor_name, repofile_name)
|
||
+ )
|
||
+
|
||
+ api.produce(CustomTargetRepositoryFile(file=full_repo_path))
|
||
+
|
||
+ custom_vendor_repos = [
|
||
+ CustomTargetRepository(
|
||
+ repoid=repo.repoid,
|
||
+ name=repo.name,
|
||
+ baseurl=repo.baseurl,
|
||
+ enabled=repo.enabled,
|
||
+ ) for repo in parsed_repofile.data
|
||
+ ]
|
||
+
|
||
+ api.produce(
|
||
+ VendorCustomTargetRepositoryList(vendor=vendor_name, repos=custom_vendor_repos)
|
||
+ )
|
||
+
|
||
+ api.current_logger().info(
|
||
+ "The {} directory exists, vendor repositories loaded.".format(VENDORS_DIR)
|
||
+ )
|
||
diff --git a/repos/system_upgrade/common/actors/scanvendorrepofiles/tests/test_scanvendorrepofiles.py b/repos/system_upgrade/common/actors/scanvendorrepofiles/tests/test_scanvendorrepofiles.py
|
||
new file mode 100644
|
||
index 00000000..cb5c7ab7
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/scanvendorrepofiles/tests/test_scanvendorrepofiles.py
|
||
@@ -0,0 +1,131 @@
|
||
+import os
|
||
+
|
||
+from leapp.libraries.actor import scancustomrepofile
|
||
+from leapp.libraries.common import repofileutils
|
||
+from leapp.libraries.common.testutils import produce_mocked
|
||
+from leapp.libraries.stdlib import api
|
||
+
|
||
+from leapp.models import (CustomTargetRepository, CustomTargetRepositoryFile,
|
||
+ RepositoryData, RepositoryFile)
|
||
+
|
||
+
|
||
+_REPODATA = [
|
||
+ RepositoryData(repoid="repo1", name="repo1name", baseurl="repo1url", enabled=True),
|
||
+ RepositoryData(repoid="repo2", name="repo2name", baseurl="repo2url", enabled=False),
|
||
+ RepositoryData(repoid="repo3", name="repo3name", enabled=True),
|
||
+ RepositoryData(repoid="repo4", name="repo4name", mirrorlist="mirror4list", enabled=True),
|
||
+]
|
||
+
|
||
+_CUSTOM_REPOS = [
|
||
+ CustomTargetRepository(repoid="repo1", name="repo1name", baseurl="repo1url", enabled=True),
|
||
+ CustomTargetRepository(repoid="repo2", name="repo2name", baseurl="repo2url", enabled=False),
|
||
+ CustomTargetRepository(repoid="repo3", name="repo3name", baseurl=None, enabled=True),
|
||
+ CustomTargetRepository(repoid="repo4", name="repo4name", baseurl=None, enabled=True),
|
||
+]
|
||
+
|
||
+_CUSTOM_REPO_FILE_MSG = CustomTargetRepositoryFile(file=scancustomrepofile.CUSTOM_REPO_PATH)
|
||
+
|
||
+
|
||
+_TESTING_REPODATA = [
|
||
+ RepositoryData(repoid="repo1-stable", name="repo1name", baseurl="repo1url", enabled=True),
|
||
+ RepositoryData(repoid="repo2-testing", name="repo2name", baseurl="repo2url", enabled=False),
|
||
+ RepositoryData(repoid="repo3-stable", name="repo3name", enabled=False),
|
||
+ RepositoryData(repoid="repo4-testing", name="repo4name", mirrorlist="mirror4list", enabled=True),
|
||
+]
|
||
+
|
||
+_TESTING_CUSTOM_REPOS_STABLE_TARGET = [
|
||
+ CustomTargetRepository(repoid="repo1-stable", name="repo1name", baseurl="repo1url", enabled=True),
|
||
+ CustomTargetRepository(repoid="repo2-testing", name="repo2name", baseurl="repo2url", enabled=False),
|
||
+ CustomTargetRepository(repoid="repo3-stable", name="repo3name", baseurl=None, enabled=False),
|
||
+ CustomTargetRepository(repoid="repo4-testing", name="repo4name", baseurl=None, enabled=True),
|
||
+]
|
||
+
|
||
+_TESTING_CUSTOM_REPOS_BETA_TARGET = [
|
||
+ CustomTargetRepository(repoid="repo1-stable", name="repo1name", baseurl="repo1url", enabled=True),
|
||
+ CustomTargetRepository(repoid="repo2-testing", name="repo2name", baseurl="repo2url", enabled=True),
|
||
+ CustomTargetRepository(repoid="repo3-stable", name="repo3name", baseurl=None, enabled=False),
|
||
+ CustomTargetRepository(repoid="repo4-testing", name="repo4name", baseurl=None, enabled=True),
|
||
+]
|
||
+
|
||
+_PROCESS_STABLE_TARGET = "stable"
|
||
+_PROCESS_BETA_TARGET = "beta"
|
||
+
|
||
+
|
||
+class LoggerMocked(object):
|
||
+ def __init__(self):
|
||
+ self.infomsg = None
|
||
+ self.debugmsg = None
|
||
+
|
||
+ def info(self, msg):
|
||
+ self.infomsg = msg
|
||
+
|
||
+ def debug(self, msg):
|
||
+ self.debugmsg = msg
|
||
+
|
||
+ def __call__(self):
|
||
+ return self
|
||
+
|
||
+
|
||
+def test_no_repofile(monkeypatch):
|
||
+ monkeypatch.setattr(os.path, 'isfile', lambda dummy: False)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+ monkeypatch.setattr(api, 'current_logger', LoggerMocked())
|
||
+ scancustomrepofile.process()
|
||
+ msg = "The {} file doesn't exist. Nothing to do.".format(scancustomrepofile.CUSTOM_REPO_PATH)
|
||
+ assert api.current_logger.debugmsg == msg
|
||
+ assert not api.produce.called
|
||
+
|
||
+
|
||
+def test_valid_repofile_exists(monkeypatch):
|
||
+ def _mocked_parse_repofile(fpath):
|
||
+ return RepositoryFile(file=fpath, data=_REPODATA)
|
||
+ monkeypatch.setattr(os.path, 'isfile', lambda dummy: True)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+ monkeypatch.setattr(repofileutils, 'parse_repofile', _mocked_parse_repofile)
|
||
+ monkeypatch.setattr(api, 'current_logger', LoggerMocked())
|
||
+ scancustomrepofile.process()
|
||
+ msg = "The {} file exists, custom repositories loaded.".format(scancustomrepofile.CUSTOM_REPO_PATH)
|
||
+ assert api.current_logger.infomsg == msg
|
||
+ assert api.produce.called == len(_CUSTOM_REPOS) + 1
|
||
+ assert _CUSTOM_REPO_FILE_MSG in api.produce.model_instances
|
||
+ for crepo in _CUSTOM_REPOS:
|
||
+ assert crepo in api.produce.model_instances
|
||
+
|
||
+
|
||
+def test_target_stable_repos(monkeypatch):
|
||
+ def _mocked_parse_repofile(fpath):
|
||
+ return RepositoryFile(file=fpath, data=_TESTING_REPODATA)
|
||
+ monkeypatch.setattr(os.path, 'isfile', lambda dummy: True)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+ monkeypatch.setattr(repofileutils, 'parse_repofile', _mocked_parse_repofile)
|
||
+
|
||
+ scancustomrepofile.process(_PROCESS_STABLE_TARGET)
|
||
+ assert api.produce.called == len(_TESTING_CUSTOM_REPOS_STABLE_TARGET) + 1
|
||
+ for crepo in _TESTING_CUSTOM_REPOS_STABLE_TARGET:
|
||
+ assert crepo in api.produce.model_instances
|
||
+
|
||
+
|
||
+def test_target_beta_repos(monkeypatch):
|
||
+ def _mocked_parse_repofile(fpath):
|
||
+ return RepositoryFile(file=fpath, data=_TESTING_REPODATA)
|
||
+ monkeypatch.setattr(os.path, 'isfile', lambda dummy: True)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+ monkeypatch.setattr(repofileutils, 'parse_repofile', _mocked_parse_repofile)
|
||
+
|
||
+ scancustomrepofile.process(_PROCESS_BETA_TARGET)
|
||
+ assert api.produce.called == len(_TESTING_CUSTOM_REPOS_BETA_TARGET) + 1
|
||
+ for crepo in _TESTING_CUSTOM_REPOS_BETA_TARGET:
|
||
+ assert crepo in api.produce.model_instances
|
||
+
|
||
+
|
||
+def test_empty_repofile_exists(monkeypatch):
|
||
+ def _mocked_parse_repofile(fpath):
|
||
+ return RepositoryFile(file=fpath, data=[])
|
||
+ monkeypatch.setattr(os.path, 'isfile', lambda dummy: True)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+ monkeypatch.setattr(repofileutils, 'parse_repofile', _mocked_parse_repofile)
|
||
+ monkeypatch.setattr(api, 'current_logger', LoggerMocked())
|
||
+ scancustomrepofile.process()
|
||
+ msg = "The {} file exists, but is empty. Nothing to do.".format(scancustomrepofile.CUSTOM_REPO_PATH)
|
||
+ assert api.current_logger.infomsg == msg
|
||
+ assert not api.produce.called
|
||
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/actor.py b/repos/system_upgrade/common/actors/setuptargetrepos/actor.py
|
||
index 91855818..3a7e955b 100644
|
||
--- a/repos/system_upgrade/common/actors/setuptargetrepos/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/actor.py
|
||
@@ -10,7 +10,8 @@ from leapp.models import (
|
||
RHUIInfo,
|
||
SkippedRepositories,
|
||
TargetRepositories,
|
||
- UsedRepositories
|
||
+ UsedRepositories,
|
||
+ VendorCustomTargetRepositoryList
|
||
)
|
||
from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
|
||
@@ -37,7 +38,8 @@ class SetupTargetRepos(Actor):
|
||
RepositoriesFacts,
|
||
RepositoriesBlacklisted,
|
||
RHUIInfo,
|
||
- UsedRepositories)
|
||
+ UsedRepositories,
|
||
+ VendorCustomTargetRepositoryList)
|
||
produces = (TargetRepositories, SkippedRepositories)
|
||
tags = (IPUWorkflowTag, FactsPhaseTag)
|
||
|
||
diff --git a/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py b/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
|
||
index df17a217..41e10247 100644
|
||
--- a/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
|
||
+++ b/repos/system_upgrade/common/actors/setuptargetrepos/libraries/setuptargetrepos.py
|
||
@@ -1,6 +1,7 @@
|
||
from leapp.libraries.actor import setuptargetrepos_repomap
|
||
from leapp.libraries.common.config import get_source_distro_id, get_target_distro_id
|
||
from leapp.libraries.common.config.version import get_source_major_version, get_source_version
|
||
+from leapp.libraries.common.repomaputils import combine_repomap_messages
|
||
from leapp.libraries.stdlib import api
|
||
from leapp.models import (
|
||
CustomTargetRepository,
|
||
@@ -14,7 +15,8 @@ from leapp.models import (
|
||
RHUIInfo,
|
||
SkippedRepositories,
|
||
TargetRepositories,
|
||
- UsedRepositories
|
||
+ UsedRepositories,
|
||
+ VendorCustomTargetRepositoryList
|
||
)
|
||
from leapp.utils.deprecation import suppress_deprecation
|
||
|
||
@@ -83,14 +85,63 @@ def _get_mapped_repoids(repomap, src_repoids):
|
||
return mapped_repoids
|
||
|
||
|
||
+def _get_vendor_custom_repos(enabled_repos, mapping_list):
|
||
+ # Look at what source repos from the vendor mapping were enabled.
|
||
+ # If any of them are in beta, include vendor's custom repos in the list.
|
||
+ # Otherwise skip them.
|
||
+
|
||
+ result = []
|
||
+
|
||
+ # Build a dict of vendor mappings for easy lookup.
|
||
+ map_dict = {mapping.vendor: mapping for mapping in mapping_list if mapping.vendor}
|
||
+
|
||
+ for vendor_repolist in api.consume(VendorCustomTargetRepositoryList):
|
||
+ vendor_repomap = map_dict[vendor_repolist.vendor]
|
||
+
|
||
+ # Find the beta channel repositories for the vendor.
|
||
+ beta_repos = [
|
||
+ x.repoid for x in vendor_repomap.repositories if x.channel == "beta"
|
||
+ ]
|
||
+ api.current_logger().debug(
|
||
+ "Vendor {} beta repos: {}".format(vendor_repolist.vendor, beta_repos)
|
||
+ )
|
||
+
|
||
+ # Are any of the beta repos present and enabled on the system?
|
||
+ if any(rep in beta_repos for rep in enabled_repos):
|
||
+ # If so, use all repos including beta in the upgrade.
|
||
+ vendor_repos = vendor_repolist.repos
|
||
+ else:
|
||
+ # Otherwise filter beta repos out.
|
||
+ vendor_repos = [repo for repo in vendor_repolist.repos if repo.repoid not in beta_repos]
|
||
+
|
||
+ result.extend([CustomTargetRepository(
|
||
+ repoid=repo.repoid,
|
||
+ name=repo.name,
|
||
+ baseurl=repo.baseurl,
|
||
+ enabled=repo.enabled,
|
||
+ ) for repo in vendor_repos])
|
||
+
|
||
+ return result
|
||
+
|
||
+
|
||
@suppress_deprecation(RHELTargetRepository)
|
||
def process():
|
||
# Load relevant data from messages
|
||
used_repoids_dict = _get_used_repo_dict()
|
||
enabled_repoids = _get_enabled_repoids()
|
||
excluded_repoids = _get_blacklisted_repoids()
|
||
+
|
||
+ # Remember that we can't just grab one message, each vendor can have its own mapping.
|
||
+ repo_mapping_list = list(api.consume(RepositoriesMapping))
|
||
+
|
||
custom_repos = _get_custom_target_repos()
|
||
repoids_from_installed_packages = _get_repoids_from_installed_packages()
|
||
+ vendor_repos = _get_vendor_custom_repos(enabled_repoids, repo_mapping_list)
|
||
+ custom_repos.extend(vendor_repos)
|
||
+
|
||
+ api.current_logger().debug(
|
||
+ "Vendor repolist: {}".format([repo.repoid for repo in vendor_repos])
|
||
+ )
|
||
|
||
# Setup repomap handler
|
||
repo_mappig_msg = next(api.consume(RepositoriesMapping), RepositoriesMapping())
|
||
@@ -166,6 +217,10 @@ def process():
|
||
custom_repos = [repo for repo in custom_repos if repo.repoid not in excluded_repoids]
|
||
custom_repos = sorted(custom_repos, key=lambda x: x.repoid)
|
||
|
||
+ api.current_logger().debug(
|
||
+ "Final repolist: {}".format([repo.repoid for repo in custom_repos])
|
||
+ )
|
||
+
|
||
# produce message about skipped repositories
|
||
enabled_repoids_with_mapping = _get_mapped_repoids(repomap, enabled_repoids)
|
||
skipped_repoids = enabled_repoids & set(used_repoids_dict.keys()) - enabled_repoids_with_mapping
|
||
diff --git a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/libraries/transitionsystemdservicesstates.py b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/libraries/transitionsystemdservicesstates.py
|
||
index 53f53fb5..b21fe2b5 100644
|
||
--- a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/libraries/transitionsystemdservicesstates.py
|
||
+++ b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/libraries/transitionsystemdservicesstates.py
|
||
@@ -163,7 +163,7 @@ def _report_kept_enabled(tasks):
|
||
"Systemd services which were enabled on the system before the upgrade"
|
||
" were kept enabled after the upgrade. "
|
||
)
|
||
- if tasks:
|
||
+ if tasks.to_enable:
|
||
summary += (
|
||
"The following services were originally disabled by preset on the"
|
||
" upgraded system and Leapp attempted to enable them:{}{}"
|
||
@@ -193,9 +193,12 @@ def _get_newly_enabled(services_source, desired_states):
|
||
|
||
|
||
def _report_newly_enabled(newly_enabled):
|
||
+ if not newly_enabled:
|
||
+ return
|
||
+
|
||
summary = (
|
||
"The following services were disabled before the upgrade and were set"
|
||
- "to enabled by a systemd preset after the upgrade:{}{}.".format(
|
||
+ " to enabled by a systemd preset after the upgrade:{}{}".format(
|
||
FMT_LIST_SEPARATOR, FMT_LIST_SEPARATOR.join(sorted(newly_enabled))
|
||
)
|
||
)
|
||
diff --git a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/tests/test_transitionsystemdservicesstates.py b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/tests/test_transitionsystemdservicesstates.py
|
||
index 488b37d4..90ab3917 100644
|
||
--- a/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/tests/test_transitionsystemdservicesstates.py
|
||
+++ b/repos/system_upgrade/common/actors/systemd/transitionsystemdservicesstates/tests/test_transitionsystemdservicesstates.py
|
||
@@ -132,24 +132,28 @@ def test_tasks_produced_reports_created(monkeypatch):
|
||
services_source = [
|
||
SystemdServiceFile(name="rsyncd.service", state="enabled"),
|
||
SystemdServiceFile(name="test.service", state="enabled"),
|
||
+ SystemdServiceFile(name="newly_enabled.service", state="disabled"),
|
||
]
|
||
service_info_source = SystemdServicesInfoSource(service_files=services_source)
|
||
|
||
presets_source = [
|
||
SystemdServicePreset(service="rsyncd.service", state="enable"),
|
||
SystemdServicePreset(service="test.service", state="enable"),
|
||
+ SystemdServicePreset(service="newly_enabled.service", state="disable"),
|
||
]
|
||
preset_info_source = SystemdServicesPresetInfoSource(presets=presets_source)
|
||
|
||
services_target = [
|
||
SystemdServiceFile(name="rsyncd.service", state="disabled"),
|
||
SystemdServiceFile(name="test.service", state="enabled"),
|
||
+ SystemdServiceFile(name="newly_enabled.service", state="enabled"),
|
||
]
|
||
service_info_target = SystemdServicesInfoTarget(service_files=services_target)
|
||
|
||
presets_target = [
|
||
SystemdServicePreset(service="rsyncd.service", state="enable"),
|
||
SystemdServicePreset(service="test.service", state="enable"),
|
||
+ SystemdServicePreset(service="newly_enabled.service", state="enable"),
|
||
]
|
||
preset_info_target = SystemdServicesPresetInfoTarget(presets=presets_target)
|
||
|
||
@@ -188,7 +192,8 @@ def test_tasks_produced_reports_created(monkeypatch):
|
||
),
|
||
True,
|
||
),
|
||
- (None, False),
|
||
+ (SystemdServicesTasks(), False),
|
||
+ (SystemdServicesTasks(to_enable=[], to_disable=["some.service"]), False),
|
||
),
|
||
)
|
||
def test_report_kept_enabled(monkeypatch, tasks, expect_extended_summary):
|
||
@@ -202,7 +207,7 @@ def test_report_kept_enabled(monkeypatch, tasks, expect_extended_summary):
|
||
" upgraded system and Leapp attempted to enable them"
|
||
)
|
||
|
||
- assert created_reports.called
|
||
+ assert created_reports.called == 1
|
||
if expect_extended_summary:
|
||
assert extended_summary_str in created_reports.report_fields["summary"]
|
||
all(s in created_reports.report_fields['summary'] for s in tasks.to_enable)
|
||
@@ -228,15 +233,24 @@ def test_get_newly_enabled():
|
||
assert newly_enabled == ["test.service"]
|
||
|
||
|
||
-def test_report_newly_enabled(monkeypatch):
|
||
+@pytest.mark.parametrize(
|
||
+ "newly_enabled, should_report",
|
||
+ [
|
||
+ (["test.service", "other.service"], True),
|
||
+ ([], False),
|
||
+ ]
|
||
+)
|
||
+def test_report_newly_enabled(monkeypatch, newly_enabled, should_report):
|
||
created_reports = create_report_mocked()
|
||
monkeypatch.setattr(reporting, "create_report", created_reports)
|
||
|
||
- newly_enabled = ["test.service", "other.service"]
|
||
transitionsystemdservicesstates._report_newly_enabled(newly_enabled)
|
||
|
||
- assert created_reports.called
|
||
- assert all(s in created_reports.report_fields["summary"] for s in newly_enabled)
|
||
+ if should_report:
|
||
+ assert created_reports.called == 1
|
||
+ assert all(s in created_reports.report_fields["summary"] for s in newly_enabled)
|
||
+ else:
|
||
+ assert not created_reports.called
|
||
|
||
|
||
@pytest.mark.parametrize(
|
||
diff --git a/repos/system_upgrade/common/actors/systemfacts/actor.py b/repos/system_upgrade/common/actors/systemfacts/actor.py
|
||
index 59b12c87..85d4a09e 100644
|
||
--- a/repos/system_upgrade/common/actors/systemfacts/actor.py
|
||
+++ b/repos/system_upgrade/common/actors/systemfacts/actor.py
|
||
@@ -47,7 +47,7 @@ class SystemFactsActor(Actor):
|
||
GrubCfgBios,
|
||
Report
|
||
)
|
||
- tags = (IPUWorkflowTag, FactsPhaseTag,)
|
||
+ tags = (IPUWorkflowTag, FactsPhaseTag.Before,)
|
||
|
||
def process(self):
|
||
self.produce(systemfacts.get_sysctls_status())
|
||
diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||
index c825c731..62a84a85 100644
|
||
--- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||
+++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py
|
||
@@ -155,9 +155,10 @@ def _import_gpg_keys(context, install_root_dir, target_major_version):
|
||
# installation of initial packages
|
||
try:
|
||
# Import also any other keys provided by the customer in the same directory
|
||
- for certname in os.listdir(certs_path):
|
||
- cmd = ['rpm', '--root', install_root_dir, '--import', os.path.join(certs_path, certname)]
|
||
- context.call(cmd, callback_raw=utils.logging_handler)
|
||
+ for trusted_dir in certs_path:
|
||
+ for certname in os.listdir(trusted_dir):
|
||
+ cmd = ['rpm', '--root', install_root_dir, '--import', os.path.join(trusted_dir, certname)]
|
||
+ context.call(cmd, callback_raw=utils.logging_handler)
|
||
except CalledProcessError as exc:
|
||
raise StopActorExecutionError(
|
||
message=(
|
||
@@ -660,6 +661,7 @@ def _prep_repository_access(context, target_userspace):
|
||
run(["chroot", target_userspace, "/bin/bash", "-c", "su - -c update-ca-trust"])
|
||
|
||
if not rhsm.skip_rhsm():
|
||
+ _copy_certificates(context, target_userspace)
|
||
run(['rm', '-rf', os.path.join(target_etc, 'rhsm')])
|
||
context.copytree_from('/etc/rhsm', os.path.join(target_etc, 'rhsm'))
|
||
|
||
diff --git a/repos/system_upgrade/common/actors/trustedgpgkeysscanner/libraries/trustedgpgkeys.py b/repos/system_upgrade/common/actors/trustedgpgkeysscanner/libraries/trustedgpgkeys.py
|
||
index 6377f767..4c5420f6 100644
|
||
--- a/repos/system_upgrade/common/actors/trustedgpgkeysscanner/libraries/trustedgpgkeys.py
|
||
+++ b/repos/system_upgrade/common/actors/trustedgpgkeysscanner/libraries/trustedgpgkeys.py
|
||
@@ -13,13 +13,14 @@ def _get_pubkeys(installed_rpms):
|
||
pubkeys = get_pubkeys_from_rpms(installed_rpms)
|
||
db_pubkeys = [key.fingerprint for key in pubkeys]
|
||
certs_path = get_path_to_gpg_certs()
|
||
- for certname in os.listdir(certs_path):
|
||
- key_file = os.path.join(certs_path, certname)
|
||
- fps = get_gpg_fp_from_file(key_file)
|
||
- for fp in fps:
|
||
- if fp not in db_pubkeys:
|
||
- pubkeys.append(GpgKey(fingerprint=fp, rpmdb=False, filename=key_file))
|
||
- db_pubkeys += fp
|
||
+ for trusted_dir in certs_path:
|
||
+ for certname in os.listdir(trusted_dir):
|
||
+ key_file = os.path.join(trusted_dir, certname)
|
||
+ fps = get_gpg_fp_from_file(key_file)
|
||
+ for fp in fps:
|
||
+ if fp not in db_pubkeys:
|
||
+ pubkeys.append(GpgKey(fingerprint=fp, rpmdb=False, filename=key_file))
|
||
+ db_pubkeys += fp
|
||
return pubkeys
|
||
|
||
|
||
diff --git a/repos/system_upgrade/common/actors/vendorreposignaturescanner/actor.py b/repos/system_upgrade/common/actors/vendorreposignaturescanner/actor.py
|
||
new file mode 100644
|
||
index 00000000..dbf86974
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/vendorreposignaturescanner/actor.py
|
||
@@ -0,0 +1,72 @@
|
||
+import os
|
||
+
|
||
+from leapp.actors import Actor
|
||
+from leapp.models import VendorSignatures, ActiveVendorList
|
||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+VENDORS_DIR = "/etc/leapp/files/vendors.d/"
|
||
+SIGFILE_SUFFIX = ".sigs"
|
||
+
|
||
+
|
||
+class VendorRepoSignatureScanner(Actor):
|
||
+ """
|
||
+ Produce VendorSignatures messages for the vendor signature files inside the
|
||
+ <VENDORS_DIR>.
|
||
+ These messages are used to extend the list of pakcages Leapp will consider
|
||
+ signed and will attempt to upgrade.
|
||
+
|
||
+ The messages are produced only if a "from" vendor repository
|
||
+ listed indide its map matched one of the repositories active on the system.
|
||
+ """
|
||
+
|
||
+ name = 'vendor_repo_signature_scanner'
|
||
+ consumes = (ActiveVendorList)
|
||
+ produces = (VendorSignatures)
|
||
+ tags = (IPUWorkflowTag, FactsPhaseTag.Before)
|
||
+
|
||
+ def process(self):
|
||
+ if not os.path.isdir(VENDORS_DIR):
|
||
+ self.log.debug(
|
||
+ "The {} directory doesn't exist. Nothing to do.".format(VENDORS_DIR)
|
||
+ )
|
||
+ return
|
||
+
|
||
+ active_vendors = []
|
||
+ for vendor_list in self.consume(ActiveVendorList):
|
||
+ active_vendors.extend(vendor_list.data)
|
||
+
|
||
+ self.log.debug(
|
||
+ "Active vendor list: {}".format(active_vendors)
|
||
+ )
|
||
+
|
||
+ for sigfile_name in os.listdir(VENDORS_DIR):
|
||
+ if not sigfile_name.endswith(SIGFILE_SUFFIX):
|
||
+ continue
|
||
+ # Cut the suffix part to get only the name.
|
||
+ vendor_name = sigfile_name[:-5]
|
||
+
|
||
+ if vendor_name not in active_vendors:
|
||
+ self.log.debug(
|
||
+ "Vendor {} not in active list, skipping".format(vendor_name)
|
||
+ )
|
||
+ continue
|
||
+
|
||
+ self.log.debug(
|
||
+ "Vendor {} found in active list, processing file {}".format(vendor_name, sigfile_name)
|
||
+ )
|
||
+
|
||
+ full_sigfile_path = os.path.join(VENDORS_DIR, sigfile_name)
|
||
+ with open(full_sigfile_path) as f:
|
||
+ signatures = [line for line in f.read().splitlines() if line]
|
||
+
|
||
+ self.produce(
|
||
+ VendorSignatures(
|
||
+ vendor=vendor_name,
|
||
+ sigs=signatures,
|
||
+ )
|
||
+ )
|
||
+
|
||
+ self.log.info(
|
||
+ "The {} directory exists, vendor signatures loaded.".format(VENDORS_DIR)
|
||
+ )
|
||
diff --git a/repos/system_upgrade/common/actors/vendorrepositoriesmapping/actor.py b/repos/system_upgrade/common/actors/vendorrepositoriesmapping/actor.py
|
||
new file mode 100644
|
||
index 00000000..13256476
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/vendorrepositoriesmapping/actor.py
|
||
@@ -0,0 +1,19 @@
|
||
+from leapp.actors import Actor
|
||
+# from leapp.libraries.common.repomaputils import scan_vendor_repomaps, VENDOR_REPOMAP_DIR
|
||
+from leapp.libraries.actor.vendorrepositoriesmapping import scan_vendor_repomaps
|
||
+from leapp.models import VendorSourceRepos, RepositoriesMapping
|
||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class VendorRepositoriesMapping(Actor):
|
||
+ """
|
||
+ Scan the vendor repository mapping files and provide the data to other actors.
|
||
+ """
|
||
+
|
||
+ name = "vendor_repositories_mapping"
|
||
+ consumes = ()
|
||
+ produces = (RepositoriesMapping, VendorSourceRepos,)
|
||
+ tags = (IPUWorkflowTag, FactsPhaseTag.Before)
|
||
+
|
||
+ def process(self):
|
||
+ scan_vendor_repomaps()
|
||
diff --git a/repos/system_upgrade/common/actors/vendorrepositoriesmapping/libraries/vendorrepositoriesmapping.py b/repos/system_upgrade/common/actors/vendorrepositoriesmapping/libraries/vendorrepositoriesmapping.py
|
||
new file mode 100644
|
||
index 00000000..6a41d4e5
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/actors/vendorrepositoriesmapping/libraries/vendorrepositoriesmapping.py
|
||
@@ -0,0 +1,92 @@
|
||
+import os
|
||
+import json
|
||
+
|
||
+from leapp.libraries.common import fetch
|
||
+from leapp.libraries.common.config.version import get_target_major_version, get_source_major_version
|
||
+from leapp.libraries.common.repomaputils import RepoMapData
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import VendorSourceRepos, RepositoriesMapping
|
||
+from leapp.models.fields import ModelViolationError
|
||
+from leapp.exceptions import StopActorExecutionError
|
||
+
|
||
+
|
||
+VENDORS_DIR = "/etc/leapp/files/vendors.d"
|
||
+"""The folder containing the vendor repository mapping files."""
|
||
+
|
||
+
|
||
+def inhibit_upgrade(msg):
|
||
+ raise StopActorExecutionError(
|
||
+ msg,
|
||
+ details={'hint': ('Read documentation at the following link for more'
|
||
+ ' information about how to retrieve the valid file:'
|
||
+ ' https://access.redhat.com/articles/3664871')})
|
||
+
|
||
+
|
||
+def read_repofile(repofile, repodir):
|
||
+ try:
|
||
+ return json.loads(fetch.read_or_fetch(repofile, directory=repodir, allow_download=False))
|
||
+ except ValueError:
|
||
+ # The data does not contain a valid json
|
||
+ inhibit_upgrade('The repository mapping file is invalid: file does not contain a valid JSON object.')
|
||
+ return None
|
||
+
|
||
+
|
||
+def read_repomap_file(repomap_file, read_repofile_func, vendor_name):
|
||
+ json_data = read_repofile_func(repomap_file, VENDORS_DIR)
|
||
+ try:
|
||
+ repomap_data = RepoMapData.load_from_dict(json_data)
|
||
+
|
||
+ source_major = get_source_major_version()
|
||
+ target_major = get_target_major_version()
|
||
+
|
||
+ api.produce(VendorSourceRepos(
|
||
+ vendor=vendor_name,
|
||
+ source_repoids=repomap_data.get_version_repoids(source_major)
|
||
+ ))
|
||
+
|
||
+ mapping = repomap_data.get_mappings(source_major, target_major)
|
||
+ valid_major_versions = [source_major, target_major]
|
||
+
|
||
+ api.produce(RepositoriesMapping(
|
||
+ mapping=mapping,
|
||
+ repositories=repomap_data.get_repositories(valid_major_versions),
|
||
+ vendor=vendor_name
|
||
+ ))
|
||
+ except ModelViolationError as err:
|
||
+ err_message = (
|
||
+ 'The repository mapping file is invalid: '
|
||
+ 'the JSON does not match required schema (wrong field type/value): {}. '
|
||
+ 'Ensure that the current upgrade path is correct and is present in the mappings: {} -> {}'
|
||
+ .format(err, source_major, target_major)
|
||
+ )
|
||
+ inhibit_upgrade(err_message)
|
||
+ except KeyError as err:
|
||
+ inhibit_upgrade(
|
||
+ 'The repository mapping file is invalid: the JSON is missing a required field: {}'.format(err))
|
||
+ except ValueError as err:
|
||
+ # The error should contain enough information, so we do not need to clarify it further
|
||
+ inhibit_upgrade('The repository mapping file is invalid: {}'.format(err))
|
||
+
|
||
+
|
||
+def scan_vendor_repomaps(read_repofile_func=read_repofile):
|
||
+ """
|
||
+ Scan the repository mapping file and produce RepositoriesMapping msg.
|
||
+
|
||
+ See the description of the actor for more details.
|
||
+ """
|
||
+
|
||
+ map_json_suffix = "_map.json"
|
||
+ if os.path.isdir(VENDORS_DIR):
|
||
+ vendor_mapfiles = list(filter(lambda vfile: map_json_suffix in vfile, os.listdir(VENDORS_DIR)))
|
||
+
|
||
+ for mapfile in vendor_mapfiles:
|
||
+ read_repomap_file(mapfile, read_repofile_func, mapfile[:-len(map_json_suffix)])
|
||
+ else:
|
||
+ api.current_logger().debug(
|
||
+ "The {} directory doesn't exist. Nothing to do.".format(VENDORS_DIR)
|
||
+ )
|
||
+ # vendor_repomap_collection = scan_vendor_repomaps(VENDOR_REPOMAP_DIR)
|
||
+ # if vendor_repomap_collection:
|
||
+ # self.produce(vendor_repomap_collection)
|
||
+ # for repomap in vendor_repomap_collection.maps:
|
||
+ # self.produce(repomap)
|
||
diff --git a/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
|
||
index b17e8a66..3bd7376c 100644
|
||
--- a/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
|
||
+++ b/repos/system_upgrade/common/files/distro/almalinux/gpg-signatures.json
|
||
@@ -3,15 +3,24 @@
|
||
"51d6647ec21ad6ea": ["gpg-pubkey-3abb34f8-5ffd890e"],
|
||
"d36cb86cb86b3716": ["gpg-pubkey-ced7258b-6525146f"],
|
||
"2ae81e8aced7258b": ["gpg-pubkey-b86b3716-61e69f29"],
|
||
- "429785e181b961a5": ["gpg-pubkey-81b961a5-64106f70"]
|
||
+ "429785e181b961a5": ["gpg-pubkey-81b961a5-64106f70"],
|
||
+ "d07bf2a08d50eb66": []
|
||
},
|
||
"obsoleted-keys": {
|
||
"7": [],
|
||
- "8": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
"9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
"gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071",
|
||
"gpg-pubkey-ced7258b-6525146f"
|
||
],
|
||
"10": ["gpg-pubkey-b86b3716-61e69f29"]
|
||
}
|
||
+
|
||
}
|
||
diff --git a/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json b/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||
index 1092ff58..8056e825 100644
|
||
--- a/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||
+++ b/repos/system_upgrade/common/files/distro/centos/gpg-signatures.json
|
||
@@ -3,9 +3,22 @@
|
||
"24c6a8a7f4a80eb5": [],
|
||
"4eb84e71f2ee9d55": [],
|
||
"05b555b38483c65d": ["gpg-pubkey-8483c65d-5ccc5b19"],
|
||
- "1ff6a2171d997668": ["gpg-pubkey-1d997668-621e3cac", "gpg-pubkey-1d997668-61bae63b"]
|
||
+ "1ff6a2171d997668": ["gpg-pubkey-1d997668-621e3cac", "gpg-pubkey-1d997668-61bae63b"],
|
||
+ "6c7cb6ef305d49d6": []
|
||
},
|
||
"obsoleted-keys": {
|
||
+ "7": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
"10": ["gpg-pubkey-8483c65d-5ccc5b19"]
|
||
}
|
||
}
|
||
diff --git a/repos/system_upgrade/common/files/distro/cloudlinux/gpg-signatures.json b/repos/system_upgrade/common/files/distro/cloudlinux/gpg-signatures.json
|
||
new file mode 100644
|
||
index 00000000..acad9006
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/files/distro/cloudlinux/gpg-signatures.json
|
||
@@ -0,0 +1,22 @@
|
||
+{
|
||
+ "keys": [
|
||
+ "8c55a6628608cb71",
|
||
+ "d07bf2a08d50eb66",
|
||
+ "429785e181b961a5"
|
||
+ ],
|
||
+ "obsoleted-keys": {
|
||
+ "7": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
+ "10": []
|
||
+ }
|
||
+}
|
||
diff --git a/repos/system_upgrade/common/files/distro/ol/gpg-signatures.json b/repos/system_upgrade/common/files/distro/ol/gpg-signatures.json
|
||
new file mode 100644
|
||
index 00000000..a53775cf
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/files/distro/ol/gpg-signatures.json
|
||
@@ -0,0 +1,24 @@
|
||
+{
|
||
+ "keys": [
|
||
+ "72f97b74ec551f03",
|
||
+ "82562ea9ad986da3",
|
||
+ "bc4d06a08d8b756f",
|
||
+ "429785e181b961a5",
|
||
+ "d07bf2a08d50eb66"
|
||
+ ],
|
||
+ "obsoleted-keys": {
|
||
+ "7": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
+ "10": []
|
||
+ }
|
||
+}
|
||
diff --git a/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json b/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||
index d6c2328d..0b989984 100644
|
||
--- a/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||
+++ b/repos/system_upgrade/common/files/distro/rhel/gpg-signatures.json
|
||
@@ -17,7 +17,12 @@
|
||
"gpg-pubkey-db42a60e-37ea5438",
|
||
"gpg-pubkey-897da07a-3c979a7f"
|
||
],
|
||
- "9": ["gpg-pubkey-d4082792-5b32db75"],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
"10": ["gpg-pubkey-fd431d51-4ae0493b"]
|
||
}
|
||
}
|
||
diff --git a/repos/system_upgrade/common/files/distro/rocky/gpg-signatures.json b/repos/system_upgrade/common/files/distro/rocky/gpg-signatures.json
|
||
new file mode 100644
|
||
index 00000000..f1738e79
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/files/distro/rocky/gpg-signatures.json
|
||
@@ -0,0 +1,23 @@
|
||
+{
|
||
+ "keys": [
|
||
+ "15af5dac6d745a60",
|
||
+ "702d426d350d275d",
|
||
+ "429785e181b961a5",
|
||
+ "d07bf2a08d50eb66"
|
||
+ ],
|
||
+ "obsoleted-keys": {
|
||
+ "7": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
+ "10": []
|
||
+ }
|
||
+}
|
||
diff --git a/repos/system_upgrade/common/files/distro/scientific/gpg-signatures.json b/repos/system_upgrade/common/files/distro/scientific/gpg-signatures.json
|
||
new file mode 100644
|
||
index 00000000..df764b53
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/files/distro/scientific/gpg-signatures.json
|
||
@@ -0,0 +1,22 @@
|
||
+{
|
||
+ "keys": [
|
||
+ "b0b4183f192a7d7d",
|
||
+ "429785e181b961a5",
|
||
+ "d07bf2a08d50eb66"
|
||
+ ],
|
||
+ "obsoleted-keys": {
|
||
+ "7": [],
|
||
+ "8": [
|
||
+ "gpg-pubkey-2fa658e0-45700c69",
|
||
+ "gpg-pubkey-37017186-45761324",
|
||
+ "gpg-pubkey-db42a60e-37ea5438"
|
||
+ ],
|
||
+ "9": [
|
||
+ "gpg-pubkey-d4082792-5b32db75",
|
||
+ "gpg-pubkey-3abb34f8-5ffd890e",
|
||
+ "gpg-pubkey-6275f250-5e26cb2e",
|
||
+ "gpg-pubkey-73e3b907-6581b071"
|
||
+ ],
|
||
+ "10": []
|
||
+ }
|
||
+}
|
||
diff --git a/repos/system_upgrade/common/files/rhel_upgrade.py b/repos/system_upgrade/common/files/rhel_upgrade.py
|
||
index 63910fe0..4e8b380d 100644
|
||
--- a/repos/system_upgrade/common/files/rhel_upgrade.py
|
||
+++ b/repos/system_upgrade/common/files/rhel_upgrade.py
|
||
@@ -188,6 +188,7 @@ class RhelUpgradeCommand(dnf.cli.Command):
|
||
to_install = self.plugin_data['pkgs_info']['to_install']
|
||
to_remove = self.plugin_data['pkgs_info']['to_remove']
|
||
to_upgrade = self.plugin_data['pkgs_info']['to_upgrade']
|
||
+ to_reinstall = self.plugin_data['pkgs_info']['to_reinstall']
|
||
|
||
# Modules to enable
|
||
self._process_entities(entities=[available_modules_to_enable],
|
||
@@ -200,6 +201,9 @@ class RhelUpgradeCommand(dnf.cli.Command):
|
||
self._process_entities(entities=to_install, op=self.base.install, entity_name='Package')
|
||
# Packages to be upgraded
|
||
self._process_entities(entities=to_upgrade, op=self.base.upgrade, entity_name='Package')
|
||
+ # Packages to be reinstalled
|
||
+ self._process_entities(entities=to_reinstall, op=self.base.reinstall, entity_name='Package')
|
||
+
|
||
self.base.distro_sync()
|
||
|
||
if self.opts.tid[0] == 'check':
|
||
diff --git a/repos/system_upgrade/common/libraries/distro.py b/repos/system_upgrade/common/libraries/distro.py
|
||
index 04e553ac..b342d4fc 100644
|
||
--- a/repos/system_upgrade/common/libraries/distro.py
|
||
+++ b/repos/system_upgrade/common/libraries/distro.py
|
||
@@ -7,6 +7,7 @@ from leapp.libraries.common.config import get_target_distro_id
|
||
from leapp.libraries.common.config.architecture import ARCH_ACCEPTED, ARCH_X86_64
|
||
from leapp.libraries.common.config.version import get_target_major_version
|
||
from leapp.libraries.stdlib import api
|
||
+from leapp.models import VendorSignatures
|
||
|
||
|
||
def get_distribution_data(distribution):
|
||
@@ -15,12 +16,19 @@ def get_distribution_data(distribution):
|
||
distribution_config = os.path.join(distributions_path, distribution, 'gpg-signatures.json')
|
||
if os.path.exists(distribution_config):
|
||
with open(distribution_config) as distro_config_file:
|
||
- return json.load(distro_config_file)
|
||
+ distro_config_json = json.load(distro_config_file)
|
||
else:
|
||
raise StopActorExecutionError(
|
||
'Cannot find distribution signature configuration.',
|
||
details={'Problem': 'Distribution {} was not found in {}.'.format(distribution, distributions_path)})
|
||
|
||
+ # Extend with Vendors signatures
|
||
+ for siglist in api.consume(VendorSignatures):
|
||
+ for sig in siglist.sigs:
|
||
+ # Add vendor signature as a new key with empty package list
|
||
+ distro_config_json["keys"][sig] = []
|
||
+
|
||
+ return distro_config_json
|
||
|
||
# distro -> major_version -> repofile -> tuple of architectures where it's present
|
||
_DISTRO_REPOFILES_MAP = {
|
||
@@ -68,6 +76,7 @@ _DISTRO_REPOFILES_MAP = {
|
||
'/etc/yum.repos.d/almalinux.repo': ARCH_ACCEPTED,
|
||
},
|
||
'9': {
|
||
+ '/etc/yum.repos.d/almalinux.repo': ARCH_ACCEPTED,
|
||
'/etc/yum.repos.d/almalinux-appstream.repo': ARCH_ACCEPTED,
|
||
'/etc/yum.repos.d/almalinux-baseos.repo': ARCH_ACCEPTED,
|
||
'/etc/yum.repos.d/almalinux-crb.repo': ARCH_ACCEPTED,
|
||
diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||
index 7e1fd497..9e2ba376 100644
|
||
--- a/repos/system_upgrade/common/libraries/dnfplugin.py
|
||
+++ b/repos/system_upgrade/common/libraries/dnfplugin.py
|
||
@@ -89,6 +89,7 @@ def build_plugin_data(target_repoids, debug, test, tasks, on_aws):
|
||
'to_install': sorted(tasks.to_install),
|
||
'to_remove': sorted(tasks.to_remove),
|
||
'to_upgrade': sorted(tasks.to_upgrade),
|
||
+ 'to_reinstall': sorted(tasks.to_reinstall),
|
||
'modules_to_enable': sorted(['{}:{}'.format(m.name, m.stream) for m in tasks.modules_to_enable]),
|
||
},
|
||
'dnf_conf': {
|
||
diff --git a/repos/system_upgrade/common/libraries/fetch.py b/repos/system_upgrade/common/libraries/fetch.py
|
||
index baf2c4eb..44abe66b 100644
|
||
--- a/repos/system_upgrade/common/libraries/fetch.py
|
||
+++ b/repos/system_upgrade/common/libraries/fetch.py
|
||
@@ -146,7 +146,8 @@ def load_data_asset(actor_requesting_asset,
|
||
asset_filename,
|
||
asset_fulltext_name,
|
||
docs_url,
|
||
- docs_title):
|
||
+ docs_title,
|
||
+ asset_directory="/etc/leapp/files"):
|
||
"""
|
||
Load the content of the data asset with given asset_filename
|
||
and produce :class:`leapp.model.ConsumedDataAsset` message.
|
||
@@ -183,7 +184,7 @@ def load_data_asset(actor_requesting_asset,
|
||
|
||
try:
|
||
# The asset family ID has the form (major, minor), include only `major` in the URL
|
||
- raw_asset_contents = read_or_fetch(asset_filename, data_stream=data_stream_major, allow_download=False)
|
||
+ raw_asset_contents = read_or_fetch(asset_filename, directory=asset_directory, data_stream=data_stream_major, allow_download=False)
|
||
asset_contents = json.loads(raw_asset_contents)
|
||
except ValueError:
|
||
msg = 'The {0} file (at {1}) does not contain a valid JSON object.'.format(asset_fulltext_name, asset_filename)
|
||
diff --git a/repos/system_upgrade/common/libraries/gpg.py b/repos/system_upgrade/common/libraries/gpg.py
|
||
index 4c5133e7..4f7b96d6 100644
|
||
--- a/repos/system_upgrade/common/libraries/gpg.py
|
||
+++ b/repos/system_upgrade/common/libraries/gpg.py
|
||
@@ -117,12 +117,15 @@ def get_path_to_gpg_certs():
|
||
if target_product_type == 'beta':
|
||
certs_dir = '{}beta'.format(target_major_version)
|
||
distro = config.get_target_distro_id()
|
||
- return os.path.join(
|
||
- api.get_common_folder_path('distro'),
|
||
- distro,
|
||
- GPG_CERTS_FOLDER,
|
||
- certs_dir
|
||
- )
|
||
+ return [
|
||
+ "/etc/leapp/files/vendors.d/rpm-gpg/",
|
||
+ os.path.join(
|
||
+ api.get_common_folder_path('distro'),
|
||
+ distro,
|
||
+ GPG_CERTS_FOLDER,
|
||
+ certs_dir
|
||
+ )
|
||
+ ]
|
||
|
||
|
||
def is_nogpgcheck_set():
|
||
diff --git a/repos/system_upgrade/common/libraries/repomaputils.py b/repos/system_upgrade/common/libraries/repomaputils.py
|
||
new file mode 100644
|
||
index 00000000..40a6f001
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/libraries/repomaputils.py
|
||
@@ -0,0 +1,141 @@
|
||
+from collections import defaultdict
|
||
+from leapp.models import PESIDRepositoryEntry, RepoMapEntry, RepositoriesMapping
|
||
+
|
||
+class RepoMapData:
|
||
+ VERSION_FORMAT = '1.3.0'
|
||
+
|
||
+ def __init__(self):
|
||
+ self.repositories = []
|
||
+ self.mapping = {}
|
||
+
|
||
+ def add_repository(self, data, pesid):
|
||
+ """
|
||
+ Add new PESIDRepositoryEntry with given pesid from the provided dictionary.
|
||
+
|
||
+ :param data: A dict containing the data of the added repository. The dictionary structure corresponds
|
||
+ to the repositories entries in the repository mapping JSON schema.
|
||
+ :type data: Dict[str, str]
|
||
+ :param pesid: PES id of the repository family that the newly added repository belongs to.
|
||
+ :type pesid: str
|
||
+ """
|
||
+ self.repositories.append(PESIDRepositoryEntry(
|
||
+ repoid=data['repoid'],
|
||
+ channel=data['channel'],
|
||
+ rhui=data.get('rhui', ''),
|
||
+ repo_type=data['repo_type'],
|
||
+ arch=data['arch'],
|
||
+ major_version=data['major_version'],
|
||
+ pesid=pesid,
|
||
+ distro=data['distro'],
|
||
+ ))
|
||
+
|
||
+ def get_repositories(self, valid_major_versions):
|
||
+ """
|
||
+ Return the list of PESIDRepositoryEntry object matching the specified major versions.
|
||
+ """
|
||
+ return [repo for repo in self.repositories if repo.major_version in valid_major_versions]
|
||
+
|
||
+ def get_version_repoids(self, major_version):
|
||
+ """
|
||
+ Return the list of repository ID strings for repositories matching the specified major version.
|
||
+ """
|
||
+ return [repo.repoid for repo in self.repositories if repo.major_version == major_version]
|
||
+
|
||
+ def add_mapping(self, source_major_version, target_major_version, source_pesid, target_pesid):
|
||
+ """
|
||
+ Add a new mapping entry that is mapping the source pesid to the destination pesid(s),
|
||
+ relevant in an IPU from the supplied source major version to the supplied target
|
||
+ major version.
|
||
+
|
||
+ :param str source_major_version: Specifies the major version of the source system
|
||
+ for which the added mapping applies.
|
||
+ :param str target_major_version: Specifies the major version of the target system
|
||
+ for which the added mapping applies.
|
||
+ :param str source_pesid: PESID of the source repository.
|
||
+ :param Union[str|List[str]] target_pesid: A single target PESID or a list of target
|
||
+ PESIDs of the added mapping.
|
||
+ """
|
||
+ # NOTE: it could be more simple, but I prefer to be sure the input data
|
||
+ # contains just one map per source PESID.
|
||
+ key = '{}:{}'.format(source_major_version, target_major_version)
|
||
+ rmap = self.mapping.get(key, defaultdict(set))
|
||
+ self.mapping[key] = rmap
|
||
+ if isinstance(target_pesid, list):
|
||
+ rmap[source_pesid].update(target_pesid)
|
||
+ else:
|
||
+ rmap[source_pesid].add(target_pesid)
|
||
+
|
||
+ def get_mappings(self, src_major_version, dst_major_version):
|
||
+ """
|
||
+ Return the list of RepoMapEntry objects for the specified upgrade path.
|
||
+
|
||
+ IOW, the whole mapping for specified IPU.
|
||
+ """
|
||
+ key = '{}:{}'.format(src_major_version, dst_major_version)
|
||
+ rmap = self.mapping.get(key, None)
|
||
+ if not rmap:
|
||
+ return None
|
||
+ map_list = []
|
||
+ for src_pesid in sorted(rmap.keys()):
|
||
+ map_list.append(RepoMapEntry(source=src_pesid, target=sorted(rmap[src_pesid])))
|
||
+ return map_list
|
||
+
|
||
+ @staticmethod
|
||
+ def load_from_dict(data):
|
||
+ if data['version_format'] != RepoMapData.VERSION_FORMAT:
|
||
+ raise ValueError(
|
||
+ 'The obtained repomap data has unsupported version of format.'
|
||
+ ' Get {} required {}'
|
||
+ .format(data['version_format'], RepoMapData.VERSION_FORMAT)
|
||
+ )
|
||
+
|
||
+ repomap = RepoMapData()
|
||
+
|
||
+ # Load reposiories
|
||
+ existing_pesids = set()
|
||
+ for repo_family in data['repositories']:
|
||
+ existing_pesids.add(repo_family['pesid'])
|
||
+ for repo in repo_family['entries']:
|
||
+ repomap.add_repository(repo, repo_family['pesid'])
|
||
+
|
||
+ # Load mappings
|
||
+ for mapping in data['mapping']:
|
||
+ for entry in mapping['entries']:
|
||
+ if not isinstance(entry['target'], list):
|
||
+ raise ValueError(
|
||
+ 'The target field of a mapping entry is not a list: {}'
|
||
+ .format(entry)
|
||
+ )
|
||
+
|
||
+ for pesid in [entry['source']] + entry['target']:
|
||
+ if pesid not in existing_pesids:
|
||
+ raise ValueError(
|
||
+ 'The {} pesid is not related to any repository.'
|
||
+ .format(pesid)
|
||
+ )
|
||
+ repomap.add_mapping(
|
||
+ source_major_version=mapping['source_major_version'],
|
||
+ target_major_version=mapping['target_major_version'],
|
||
+ source_pesid=entry['source'],
|
||
+ target_pesid=entry['target'],
|
||
+ )
|
||
+ return repomap
|
||
+
|
||
+def combine_repomap_messages(mapping_list):
|
||
+ """
|
||
+ Combine multiple RepositoryMapping messages into one.
|
||
+ Needed because we might get more than one message if there are vendors present.
|
||
+ """
|
||
+ combined_mapping = []
|
||
+ combined_repositories = []
|
||
+ # Depending on whether there are any vendors present, we might get more than one message.
|
||
+ for msg in mapping_list:
|
||
+ combined_mapping.extend(msg.mapping)
|
||
+ combined_repositories.extend(msg.repositories)
|
||
+
|
||
+ combined_repomapping = RepositoriesMapping(
|
||
+ mapping=combined_mapping,
|
||
+ repositories=combined_repositories
|
||
+ )
|
||
+
|
||
+ return combined_repomapping
|
||
diff --git a/repos/system_upgrade/common/models/activevendorlist.py b/repos/system_upgrade/common/models/activevendorlist.py
|
||
new file mode 100644
|
||
index 00000000..de4056fb
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/models/activevendorlist.py
|
||
@@ -0,0 +1,7 @@
|
||
+from leapp.models import Model, fields
|
||
+from leapp.topics import VendorTopic
|
||
+
|
||
+
|
||
+class ActiveVendorList(Model):
|
||
+ topic = VendorTopic
|
||
+ data = fields.List(fields.String())
|
||
diff --git a/repos/system_upgrade/common/models/repositoriesmap.py b/repos/system_upgrade/common/models/repositoriesmap.py
|
||
index 842cd807..fc740606 100644
|
||
--- a/repos/system_upgrade/common/models/repositoriesmap.py
|
||
+++ b/repos/system_upgrade/common/models/repositoriesmap.py
|
||
@@ -96,3 +96,4 @@ class RepositoriesMapping(Model):
|
||
|
||
mapping = fields.List(fields.Model(RepoMapEntry), default=[])
|
||
repositories = fields.List(fields.Model(PESIDRepositoryEntry), default=[])
|
||
+ vendor = fields.Nullable(fields.String())
|
||
diff --git a/repos/system_upgrade/common/models/rpmtransactiontasks.py b/repos/system_upgrade/common/models/rpmtransactiontasks.py
|
||
index 7e2870d0..05d4e941 100644
|
||
--- a/repos/system_upgrade/common/models/rpmtransactiontasks.py
|
||
+++ b/repos/system_upgrade/common/models/rpmtransactiontasks.py
|
||
@@ -10,6 +10,7 @@ class RpmTransactionTasks(Model):
|
||
to_keep = fields.List(fields.String(), default=[])
|
||
to_remove = fields.List(fields.String(), default=[])
|
||
to_upgrade = fields.List(fields.String(), default=[])
|
||
+ to_reinstall = fields.List(fields.String(), default=[])
|
||
modules_to_enable = fields.List(fields.Model(Module), default=[])
|
||
modules_to_reset = fields.List(fields.Model(Module), default=[])
|
||
|
||
diff --git a/repos/system_upgrade/common/models/targetrepositories.py b/repos/system_upgrade/common/models/targetrepositories.py
|
||
index e1a0b646..e1d44d80 100644
|
||
--- a/repos/system_upgrade/common/models/targetrepositories.py
|
||
+++ b/repos/system_upgrade/common/models/targetrepositories.py
|
||
@@ -30,6 +30,12 @@ class CustomTargetRepository(TargetRepositoryBase):
|
||
enabled = fields.Boolean(default=True)
|
||
|
||
|
||
+class VendorCustomTargetRepositoryList(Model):
|
||
+ topic = TransactionTopic
|
||
+ vendor = fields.String()
|
||
+ repos = fields.List(fields.Model(CustomTargetRepository))
|
||
+
|
||
+
|
||
class TargetRepositories(Model):
|
||
"""
|
||
Repositories supposed to be used during the IPU process
|
||
diff --git a/repos/system_upgrade/common/models/vendorsignatures.py b/repos/system_upgrade/common/models/vendorsignatures.py
|
||
new file mode 100644
|
||
index 00000000..f456aec5
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/models/vendorsignatures.py
|
||
@@ -0,0 +1,8 @@
|
||
+from leapp.models import Model, fields
|
||
+from leapp.topics import VendorTopic
|
||
+
|
||
+
|
||
+class VendorSignatures(Model):
|
||
+ topic = VendorTopic
|
||
+ vendor = fields.String()
|
||
+ sigs = fields.List(fields.String())
|
||
diff --git a/repos/system_upgrade/common/models/vendorsourcerepos.py b/repos/system_upgrade/common/models/vendorsourcerepos.py
|
||
new file mode 100644
|
||
index 00000000..b7a219b4
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/models/vendorsourcerepos.py
|
||
@@ -0,0 +1,12 @@
|
||
+from leapp.models import Model, fields
|
||
+from leapp.topics import VendorTopic
|
||
+
|
||
+
|
||
+class VendorSourceRepos(Model):
|
||
+ """
|
||
+ This model contains the data on all source repositories associated with a specific vendor.
|
||
+ Its data is used to determine whether the vendor should be included into the upgrade process.
|
||
+ """
|
||
+ topic = VendorTopic
|
||
+ vendor = fields.String()
|
||
+ source_repoids = fields.List(fields.String())
|
||
diff --git a/repos/system_upgrade/common/topics/vendortopic.py b/repos/system_upgrade/common/topics/vendortopic.py
|
||
new file mode 100644
|
||
index 00000000..014b7afb
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/common/topics/vendortopic.py
|
||
@@ -0,0 +1,5 @@
|
||
+from leapp.topics import Topic
|
||
+
|
||
+
|
||
+class VendorTopic(Topic):
|
||
+ name = 'vendor_topic'
|
||
diff --git a/repos/system_upgrade/el8toel9/actors/addarmbootloaderworkaround/libraries/addupgradebootloader.py b/repos/system_upgrade/el8toel9/actors/addarmbootloaderworkaround/libraries/addupgradebootloader.py
|
||
index c076fe6b..2455a2f6 100644
|
||
--- a/repos/system_upgrade/el8toel9/actors/addarmbootloaderworkaround/libraries/addupgradebootloader.py
|
||
+++ b/repos/system_upgrade/el8toel9/actors/addarmbootloaderworkaround/libraries/addupgradebootloader.py
|
||
@@ -14,6 +14,22 @@ from leapp.libraries.common.grub import (
|
||
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||
from leapp.models import ArmWorkaroundEFIBootloaderInfo, EFIBootEntry, TargetUserSpaceInfo
|
||
|
||
+dirname = {
|
||
+ 'AlmaLinux': 'almalinux',
|
||
+ 'CentOS Linux': 'centos',
|
||
+ 'CentOS Stream': 'centos',
|
||
+ 'Oracle Linux Server': 'redhat',
|
||
+ 'Red Hat Enterprise Linux': 'redhat',
|
||
+ 'Rocky Linux': 'rocky',
|
||
+ 'Scientific Linux': 'redhat',
|
||
+}
|
||
+
|
||
+with open('/etc/system-release', 'r') as sr:
|
||
+ release_line = next(line for line in sr if 'release' in line)
|
||
+ distro = release_line.split(' release ', 1)[0]
|
||
+
|
||
+distro_dir = dirname.get(distro, 'default')
|
||
+
|
||
UPGRADE_EFI_ENTRY_LABEL = 'Leapp Upgrade'
|
||
|
||
ARM_SHIM_PACKAGE_NAME = 'shim-aa64'
|
||
@@ -21,7 +37,7 @@ ARM_GRUB_PACKAGE_NAME = 'grub2-efi-aa64'
|
||
|
||
EFI_MOUNTPOINT = '/boot/efi/'
|
||
LEAPP_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/leapp/')
|
||
-RHEL_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/redhat/')
|
||
+RHEL_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/', distro_dir)
|
||
UPGRADE_BLS_DIR = '/boot/upgrade-loader'
|
||
|
||
CONTAINER_DOWNLOAD_DIR = '/tmp_pkg_download_dir'
|
||
diff --git a/repos/system_upgrade/el8toel9/actors/checkkernelrt/actor.py b/repos/system_upgrade/el8toel9/actors/checkkernelrt/actor.py
|
||
new file mode 100644
|
||
index 00000000..073d7599
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el8toel9/actors/checkkernelrt/actor.py
|
||
@@ -0,0 +1,21 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor import checkkernelrt
|
||
+from leapp.models import DistributionSignedRPM, RpmTransactionTasks
|
||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class CheckKernelRT(Actor):
|
||
+ """
|
||
+ Workaround kernel-rt upgrade candidate issue during RHEL 8 to RHEL 9 upgrade.
|
||
+
|
||
+ Removes the kernel-rt metapackage to avoid RPM transaction failures and ensures
|
||
+ kernel-rt-core is explicitly upgraded so real-time kernels continue to work.
|
||
+ """
|
||
+
|
||
+ name = 'check_kernel_rt'
|
||
+ consumes = (DistributionSignedRPM,)
|
||
+ produces = (RpmTransactionTasks,)
|
||
+ tags = (IPUWorkflowTag, ChecksPhaseTag)
|
||
+
|
||
+ def process(self):
|
||
+ checkkernelrt.process()
|
||
diff --git a/repos/system_upgrade/el8toel9/actors/checkkernelrt/libraries/checkkernelrt.py b/repos/system_upgrade/el8toel9/actors/checkkernelrt/libraries/checkkernelrt.py
|
||
new file mode 100644
|
||
index 00000000..654bc77c
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el8toel9/actors/checkkernelrt/libraries/checkkernelrt.py
|
||
@@ -0,0 +1,20 @@
|
||
+from leapp.exceptions import StopActorExecutionError
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import DistributionSignedRPM, RpmTransactionTasks
|
||
+
|
||
+KERNEL_RT_PKG = 'kernel-rt'
|
||
+KERNEL_RT_CORE_PKG = 'kernel-rt-core'
|
||
+
|
||
+
|
||
+def process():
|
||
+ pkgs = next(api.consume(DistributionSignedRPM), None)
|
||
+ if not pkgs:
|
||
+ raise StopActorExecutionError("Did not receive DistributionSignedRPM message.")
|
||
+
|
||
+ has_kernel_rt = any(pkg.name == KERNEL_RT_PKG for pkg in pkgs.items)
|
||
+ if has_kernel_rt:
|
||
+ api.current_logger().debug(
|
||
+ 'Removing {} package as a workaround for problems with '
|
||
+ 'finding its best upgrade candidate.'.format(KERNEL_RT_PKG)
|
||
+ )
|
||
+ api.produce(RpmTransactionTasks(to_remove=[KERNEL_RT_PKG], to_upgrade=[KERNEL_RT_CORE_PKG]))
|
||
diff --git a/repos/system_upgrade/el8toel9/actors/checkkernelrt/tests/unit_test_checkkernelrt.py b/repos/system_upgrade/el8toel9/actors/checkkernelrt/tests/unit_test_checkkernelrt.py
|
||
new file mode 100644
|
||
index 00000000..599cfc56
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el8toel9/actors/checkkernelrt/tests/unit_test_checkkernelrt.py
|
||
@@ -0,0 +1,42 @@
|
||
+import pytest
|
||
+
|
||
+from leapp.libraries.actor import checkkernelrt
|
||
+from leapp.libraries.common.testutils import CurrentActorMocked, produce_mocked
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import DistributionSignedRPM, RPM
|
||
+
|
||
+
|
||
+def _rpm(name):
|
||
+ return RPM(
|
||
+ name=name,
|
||
+ arch='x86_64',
|
||
+ version='1',
|
||
+ release='1',
|
||
+ epoch='0',
|
||
+ packager='Red Hat',
|
||
+ pgpsig='SOME_SIG'
|
||
+ )
|
||
+
|
||
+
|
||
+@pytest.mark.parametrize(
|
||
+ ('pkgs', 'expect_produce'),
|
||
+ [
|
||
+ ([], False),
|
||
+ ([_rpm('kernel')], False),
|
||
+ ([_rpm('kernel-rt'), _rpm('kernel-rt-core'), _rpm('kernel-rt-modules'), _rpm('kernel')], True),
|
||
+ ]
|
||
+)
|
||
+def test_kernel_rt_workaround(monkeypatch, pkgs, expect_produce):
|
||
+ current_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=pkgs)])
|
||
+ monkeypatch.setattr(api, "current_actor", current_actor_mocked)
|
||
+ monkeypatch.setattr(api, 'produce', produce_mocked())
|
||
+
|
||
+ checkkernelrt.process()
|
||
+
|
||
+ if expect_produce:
|
||
+ assert api.produce.called == 1
|
||
+ rpm_tasks = api.produce.model_instances[0]
|
||
+ assert rpm_tasks.to_remove == ['kernel-rt']
|
||
+ assert rpm_tasks.to_upgrade == ['kernel-rt-core']
|
||
+ else:
|
||
+ assert not api.produce.called
|
||
diff --git a/repos/system_upgrade/el8toel9/actors/removeupgradeefientry/libraries/removeupgradeefientry.py b/repos/system_upgrade/el8toel9/actors/removeupgradeefientry/libraries/removeupgradeefientry.py
|
||
index daa7b2ca..dd604d8b 100644
|
||
--- a/repos/system_upgrade/el8toel9/actors/removeupgradeefientry/libraries/removeupgradeefientry.py
|
||
+++ b/repos/system_upgrade/el8toel9/actors/removeupgradeefientry/libraries/removeupgradeefientry.py
|
||
@@ -5,9 +5,25 @@ from leapp.exceptions import StopActorExecutionError
|
||
from leapp.libraries.stdlib import api, CalledProcessError, run
|
||
from leapp.models import ArmWorkaroundEFIBootloaderInfo
|
||
|
||
+dirname = {
|
||
+ 'AlmaLinux': 'almalinux',
|
||
+ 'CentOS Linux': 'centos',
|
||
+ 'CentOS Stream': 'centos',
|
||
+ 'Oracle Linux Server': 'redhat',
|
||
+ 'Red Hat Enterprise Linux': 'redhat',
|
||
+ 'Rocky Linux': 'rocky',
|
||
+ 'Scientific Linux': 'redhat',
|
||
+}
|
||
+
|
||
+with open('/etc/system-release', 'r') as sr:
|
||
+ release_line = next(line for line in sr if 'release' in line)
|
||
+ distro = release_line.split(' release ', 1)[0]
|
||
+
|
||
+distro_dir = dirname.get(distro, 'default')
|
||
+
|
||
EFI_MOUNTPOINT = '/boot/efi/'
|
||
LEAPP_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/leapp/')
|
||
-RHEL_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/redhat/')
|
||
+RHEL_EFIDIR_CANONICAL_PATH = os.path.join(EFI_MOUNTPOINT, 'EFI/', distro_dir)
|
||
|
||
|
||
def get_workaround_efi_info():
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/actor.py b/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/actor.py
|
||
new file mode 100644
|
||
index 00000000..eee195cf
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/actor.py
|
||
@@ -0,0 +1,18 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor import checkkrb5conf
|
||
+from leapp.models import OutdatedKrb5conf, Report
|
||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class CheckKrb5conf(Actor):
|
||
+ """
|
||
+ Create report with the location of oudated krb5 configuration files
|
||
+ """
|
||
+
|
||
+ name = 'check_krb5_conf'
|
||
+ consumes = (OutdatedKrb5conf,)
|
||
+ produces = (Report,)
|
||
+ tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||
+
|
||
+ def process(self):
|
||
+ checkkrb5conf.process()
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/libraries/checkkrb5conf.py b/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/libraries/checkkrb5conf.py
|
||
new file mode 100644
|
||
index 00000000..9feeb74e
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/checkkrb5conf/libraries/checkkrb5conf.py
|
||
@@ -0,0 +1,55 @@
|
||
+from leapp import reporting
|
||
+from leapp.exceptions import StopActorExecutionError
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import OutdatedKrb5conf
|
||
+
|
||
+FMT_LIST_SEPARATOR = "\n - "
|
||
+
|
||
+
|
||
+def __human_readable_list(unmanaged_files):
|
||
+ if unmanaged_files:
|
||
+ return FMT_LIST_SEPARATOR + FMT_LIST_SEPARATOR.join(unmanaged_files)
|
||
+ return ''
|
||
+
|
||
+
|
||
+def process():
|
||
+ msg = next(api.consume(OutdatedKrb5conf), None)
|
||
+ if not msg:
|
||
+ raise StopActorExecutionError('Expected OutdatedKrb5conf, but got None')
|
||
+
|
||
+ if msg.unmanaged_files:
|
||
+ reporting.create_report([
|
||
+ reporting.Title('Unmanaged MIT krb5 configuration file(s) will be '
|
||
+ 'updated to point to the new X.509 CA bundle file'),
|
||
+ reporting.Summary(
|
||
+ 'On RHEL 10, the location of the reference X.509 CA bundle '
|
||
+ 'file was modified. The following unmanaged MIT krb5 '
|
||
+ 'configuration files have to be updated to point to the new '
|
||
+ 'bundle file:' + __human_readable_list(msg.unmanaged_files)),
|
||
+ reporting.Severity(reporting.Severity.INFO),
|
||
+ reporting.Groups([reporting.Groups.SECURITY, reporting.Groups.AUTHENTICATION])
|
||
+ ])
|
||
+
|
||
+ if msg.rpm_provided_files:
|
||
+ file_paths_from_rpm = [f'{r.path} (provided by {r.rpm})'for r in msg.rpm_provided_files]
|
||
+ reporting.create_report([
|
||
+ reporting.Title('RPM-provided MIT krb5 configuration file(s) are '
|
||
+ 'pointing to outdated X.509 CA bundle file'),
|
||
+ reporting.Summary(
|
||
+ 'On RHEL 10, the location of the reference X.509 CA bundle '
|
||
+ 'file was modified. Some MIT krb5 configuration files on this '
|
||
+ 'system are pointing to the old bundle file, but are provided '
|
||
+ 'by third-party RPMs. You must make sure these third-party '
|
||
+ 'RPMs were updated to reflect this change, or you may be '
|
||
+ 'unable to complete Kerberos PKINIT pre-authentication (e.g. '
|
||
+ 'using user certificates, or smartcards). The following files '
|
||
+ 'are affected:' + __human_readable_list(file_paths_from_rpm)),
|
||
+ reporting.Severity(reporting.Severity.MEDIUM),
|
||
+ reporting.Groups([reporting.Groups.SECURITY, reporting.Groups.AUTHENTICATION])
|
||
+ ])
|
||
+
|
||
+ if not msg.unmanaged_files and not msg.rpm_provided_files:
|
||
+ api.current_logger().debug(
|
||
+ 'No outdated X.509 CA bundle references were found in MIT krb5 '
|
||
+ 'configuration files, thus these files will remain unchanged.'
|
||
+ )
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/actor.py b/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/actor.py
|
||
new file mode 100644
|
||
index 00000000..962978ab
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/actor.py
|
||
@@ -0,0 +1,20 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor import convertkrb5conf
|
||
+from leapp.models import OutdatedKrb5conf
|
||
+from leapp.tags import ApplicationsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class ConvertKrb5conf(Actor):
|
||
+ """
|
||
+ Replace outdated references to the /etc/ssl/certs/ca-certificates.crt CA
|
||
+ bundle by the new /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem one in
|
||
+ krb5 configuration files.
|
||
+ """
|
||
+
|
||
+ name = 'convert_krb5_conf'
|
||
+ consumes = (OutdatedKrb5conf,)
|
||
+ produces = ()
|
||
+ tags = (ApplicationsPhaseTag, IPUWorkflowTag)
|
||
+
|
||
+ def process(self):
|
||
+ convertkrb5conf.process()
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/libraries/convertkrb5conf.py b/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/libraries/convertkrb5conf.py
|
||
new file mode 100644
|
||
index 00000000..5078b5bf
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/convertkrb5conf/libraries/convertkrb5conf.py
|
||
@@ -0,0 +1,37 @@
|
||
+from leapp.libraries.stdlib import api, CalledProcessError, run
|
||
+from leapp.models import OutdatedKrb5conf
|
||
+
|
||
+
|
||
+def _backup_krb5conf(conf_file):
|
||
+ try:
|
||
+ run(['/usr/bin/cp', conf_file, conf_file + '.leappsave'])
|
||
+ except CalledProcessError:
|
||
+ return False
|
||
+ return True
|
||
+
|
||
+
|
||
+def _convert_krb5conf(conf_file):
|
||
+ with open(conf_file) as f:
|
||
+ text = f.read().replace('/etc/ssl/certs/ca-certificates.crt',
|
||
+ '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem')
|
||
+ with open(conf_file, 'w') as f:
|
||
+ f.write(text)
|
||
+
|
||
+
|
||
+def process():
|
||
+ msg = next(api.consume(OutdatedKrb5conf), None)
|
||
+ if not msg:
|
||
+ api.current_logger().error(
|
||
+ 'Expected OutdatedKrb5conf, but got None. '
|
||
+ 'Cannot apply possibly needed changes in kerberos configuration files.'
|
||
+ )
|
||
+ return
|
||
+
|
||
+ if msg.unmanaged_files:
|
||
+ for file_path in msg.unmanaged_files:
|
||
+ if not _backup_krb5conf(file_path):
|
||
+ api.current_logger().error(
|
||
+ 'Could not back up the {} file. Skipping other actions.'.format(file_path)
|
||
+ )
|
||
+ return
|
||
+ _convert_krb5conf(file_path)
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/actor.py b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/actor.py
|
||
new file mode 100644
|
||
index 00000000..5283345d
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/actor.py
|
||
@@ -0,0 +1,19 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor.scankrb5conf import fetch_outdated_krb5_conf_files
|
||
+from leapp.models import OutdatedKrb5conf
|
||
+from leapp.tags import FactsPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class ScanKrb5conf(Actor):
|
||
+ """
|
||
+ Scan the krb5 modular configuration folder for additional conf files
|
||
+ """
|
||
+
|
||
+ name = 'scan_krb5_conf'
|
||
+ consumes = ()
|
||
+ produces = (OutdatedKrb5conf,)
|
||
+ tags = (FactsPhaseTag, IPUWorkflowTag)
|
||
+
|
||
+ def process(self):
|
||
+ self.produce(fetch_outdated_krb5_conf_files(['/etc/krb5.conf',
|
||
+ '/etc/krb5.conf.d']))
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/libraries/scankrb5conf.py b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/libraries/scankrb5conf.py
|
||
new file mode 100644
|
||
index 00000000..64b7743a
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/libraries/scankrb5conf.py
|
||
@@ -0,0 +1,40 @@
|
||
+import os
|
||
+
|
||
+from leapp.libraries.common.rpms import has_package
|
||
+from leapp.libraries.stdlib import CalledProcessError, run
|
||
+from leapp.models import DistributionSignedRPM, OutdatedKrb5conf, RpmKrb5conf
|
||
+
|
||
+
|
||
+def fetch_outdated_krb5_conf_files(conf_paths, ca_bundle_path='/etc/ssl/certs/ca-certificates.crt'):
|
||
+ krb5_conf_files = set()
|
||
+ outdated_rpm_conf = []
|
||
+ outdated_conf = set()
|
||
+
|
||
+ for conf_path in conf_paths:
|
||
+ if os.path.isdir(conf_path):
|
||
+ for conf_file in os.listdir(conf_path):
|
||
+ krb5_conf_files.add(os.path.join(conf_path, conf_file))
|
||
+ else:
|
||
+ krb5_conf_files.add(conf_path)
|
||
+
|
||
+ for file_path in krb5_conf_files:
|
||
+ with open(file_path) as f:
|
||
+ if -1 != f.read().find(ca_bundle_path):
|
||
+ if file_path == '/etc/krb5.conf':
|
||
+ # The main krb5 config file is a special case. It is not
|
||
+ # modified by RPM updates, thus we have to use Leapp to do
|
||
+ # so.
|
||
+ outdated_conf.add(file_path)
|
||
+ else:
|
||
+ try:
|
||
+ rpm_nvr = run(['/usr/bin/rpm', '-qf', file_path], split=True)['stdout'][0]
|
||
+ # We only want to handle files signed by the distribution, because we have no guarantees
|
||
+ # about third party packages (we assume updated versions are already available).
|
||
+ if not has_package(DistributionSignedRPM, rpm_nvr):
|
||
+ outdated_rpm_conf.append(RpmKrb5conf(path=file_path, rpm=rpm_nvr))
|
||
+ except CalledProcessError:
|
||
+ # Files not associated with any RPM are considered unmanaged.
|
||
+ outdated_conf.add(file_path)
|
||
+
|
||
+ return OutdatedKrb5conf(unmanaged_files=list(outdated_conf),
|
||
+ rpm_provided_files=list(outdated_rpm_conf))
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_affected b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_affected
|
||
new file mode 100644
|
||
index 00000000..862c87c4
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_affected
|
||
@@ -0,0 +1,2 @@
|
||
+[libdefaults]
|
||
+pkinit_anchors = FILE:/not/affected/ca-bundle.pem
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_configured b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_configured
|
||
new file mode 100644
|
||
index 00000000..d5726c25
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_not_configured
|
||
@@ -0,0 +1,2 @@
|
||
+[libdefaults]
|
||
+ca_bundle_not_configured = true
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_outdated b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_outdated
|
||
new file mode 100644
|
||
index 00000000..44743726
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_outdated
|
||
@@ -0,0 +1,2 @@
|
||
+[libdefaults]
|
||
+pkinit_anchors = FILE:/etc/ssl/certs/ca-certificates.crt
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_uptodate b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_uptodate
|
||
new file mode 100644
|
||
index 00000000..54a1869b
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/files/krb5conf_uptodate
|
||
@@ -0,0 +1,2 @@
|
||
+[libdefaults]
|
||
+pkinit_anchors = FILE:/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/test_scankrb5conf.py b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/test_scankrb5conf.py
|
||
new file mode 100644
|
||
index 00000000..2be949cb
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/krb5conf/scankrb5conf/tests/test_scankrb5conf.py
|
||
@@ -0,0 +1,53 @@
|
||
+import os
|
||
+
|
||
+import pytest
|
||
+
|
||
+from leapp.libraries.actor import scankrb5conf
|
||
+from leapp.libraries.actor.scankrb5conf import fetch_outdated_krb5_conf_files
|
||
+from leapp.libraries.common.testutils import CurrentActorMocked
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import DistributionSignedRPM, RPM
|
||
+
|
||
+CUR_DIR = os.path.dirname(os.path.abspath(__file__))
|
||
+
|
||
+
|
||
+@pytest.mark.parametrize(
|
||
+ 'inp,exp_out',
|
||
+ [
|
||
+ (['files/krb5conf_outdated'], ['files/krb5conf_outdated']),
|
||
+ (['files/krb5conf_not_affected'], []),
|
||
+ (['files/krb5conf_not_configured'], []),
|
||
+ (['files/krb5conf_uptodate'], []),
|
||
+ (['files'], ['files/krb5conf_outdated']),
|
||
+ ],
|
||
+)
|
||
+def test_fetch_outdated_krb5_conf_files_with_files(inp, exp_out):
|
||
+ msg = fetch_outdated_krb5_conf_files([os.path.join(CUR_DIR, i) for i in inp])
|
||
+ assert len(msg.unmanaged_files) == len(exp_out)
|
||
+ assert set(msg.unmanaged_files) == set(os.path.join(CUR_DIR, o) for o in exp_out)
|
||
+
|
||
+
|
||
+def test_fetch_outdated_krb5_conf_files_rpm_provided(monkeypatch):
|
||
+ """Test that rpm_provided_files is populated when file belongs to an RPM not in DistributionSignedRPM."""
|
||
+ test_rpm_name = 'krb5-libs'
|
||
+ test_file_path = os.path.join(CUR_DIR, 'files/krb5conf_outdated')
|
||
+
|
||
+ def mock_run(cmd, split=False):
|
||
+ assert cmd == ['/usr/bin/rpm', '-qf', test_file_path]
|
||
+ return {'stdout': [test_rpm_name]}
|
||
+
|
||
+ monkeypatch.setattr(scankrb5conf, 'run', mock_run)
|
||
+
|
||
+ other_rpm = RPM(name='other-package', epoch='0', version='1.0', release='1.el9',
|
||
+ arch='x86_64', packager='Red Hat', pgpsig='RSA/SHA256')
|
||
+ dist_signed_rpms = DistributionSignedRPM(items=[other_rpm])
|
||
+ monkeypatch.setattr(api, 'current_actor', CurrentActorMocked(msgs=[dist_signed_rpms]))
|
||
+
|
||
+ msg = fetch_outdated_krb5_conf_files([test_file_path])
|
||
+
|
||
+ # File should be in rpm_provided_files since the owning RPM is not in DistributionSignedRPM
|
||
+ assert len(msg.rpm_provided_files) == 1
|
||
+ assert msg.rpm_provided_files[0].path == test_file_path
|
||
+ assert msg.rpm_provided_files[0].rpm == test_rpm_name
|
||
+ # Should not be in unmanaged_files
|
||
+ assert len(msg.unmanaged_files) == 0
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/motifcheck/actor.py b/repos/system_upgrade/el9toel10/actors/motifcheck/actor.py
|
||
new file mode 100644
|
||
index 00000000..4014e7f7
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/motifcheck/actor.py
|
||
@@ -0,0 +1,20 @@
|
||
+from leapp.actors import Actor
|
||
+from leapp.libraries.actor.motifcheck import report_installed_packages
|
||
+from leapp.models import DistributionSignedRPM, Report
|
||
+from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
|
||
+
|
||
+
|
||
+class MotifCheck(Actor):
|
||
+ """
|
||
+ Actor checking for presence of Motif installation.
|
||
+
|
||
+ Provides user with information related to upgrading systems
|
||
+ with Motif installed.
|
||
+ """
|
||
+ name = 'motif_check'
|
||
+ consumes = (DistributionSignedRPM,)
|
||
+ produces = (Report,)
|
||
+ tags = (ChecksPhaseTag, IPUWorkflowTag)
|
||
+
|
||
+ def process(self):
|
||
+ report_installed_packages()
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/motifcheck/libraries/motifcheck.py b/repos/system_upgrade/el9toel10/actors/motifcheck/libraries/motifcheck.py
|
||
new file mode 100644
|
||
index 00000000..ea69057e
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/motifcheck/libraries/motifcheck.py
|
||
@@ -0,0 +1,50 @@
|
||
+from leapp import reporting
|
||
+from leapp.libraries.common.rpms import has_package
|
||
+from leapp.models import DistributionSignedRPM
|
||
+
|
||
+# Summary for motif report
|
||
+report_motif_inst_summary = (
|
||
+ 'The Motif package has been detected on your system. Motif is no longer available in RHEL 10.'
|
||
+ ' Applications that depend on Motif will not work after the upgrade.'
|
||
+ ' You will need to either migrate to an alternative GUI toolkit (such as GTK or Qt)'
|
||
+ ' or maintain the Motif package through alternative means.'
|
||
+)
|
||
+
|
||
+report_motif_inst_hint = (
|
||
+ 'Consider migrating applications to a modern GUI toolkit before proceeding with the upgrade.'
|
||
+)
|
||
+
|
||
+# Link URL for motif report
|
||
+report_motif_inst_link_url = 'https://red.ht/rhel-10-removed-features-graphics-infrastructures'
|
||
+
|
||
+
|
||
+def _report_motif_installed():
|
||
+ """
|
||
+ Create report on motif package installation detection.
|
||
+
|
||
+ Should remind user about present motif package
|
||
+ installation, warn them about the lack of motif support in RHEL 10, and
|
||
+ redirect them to online documentation for the migration process.
|
||
+ """
|
||
+ reporting.create_report([
|
||
+ reporting.Title('Motif has been detected on your system'),
|
||
+ reporting.Summary(report_motif_inst_summary),
|
||
+ reporting.Severity(reporting.Severity.HIGH),
|
||
+ reporting.Groups([reporting.Groups.SERVICES]),
|
||
+ reporting.ExternalLink(title='RHEL 10 Removed Features - Graphics Infrastructures',
|
||
+ url=report_motif_inst_link_url),
|
||
+ reporting.RelatedResource('package', 'motif'),
|
||
+ reporting.Remediation(hint=report_motif_inst_hint),
|
||
+ ])
|
||
+
|
||
+
|
||
+def report_installed_packages():
|
||
+ """
|
||
+ Create reports according to detected motif packages.
|
||
+
|
||
+ Create the report if the motif rpm (RH signed) is installed.
|
||
+ """
|
||
+ has_motif = has_package(DistributionSignedRPM, 'motif')
|
||
+
|
||
+ if has_motif:
|
||
+ _report_motif_installed()
|
||
diff --git a/repos/system_upgrade/el9toel10/actors/motifcheck/tests/test_motifcheck.py b/repos/system_upgrade/el9toel10/actors/motifcheck/tests/test_motifcheck.py
|
||
new file mode 100644
|
||
index 00000000..f7f641b3
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/actors/motifcheck/tests/test_motifcheck.py
|
||
@@ -0,0 +1,65 @@
|
||
+import pytest
|
||
+
|
||
+from leapp import reporting
|
||
+from leapp.libraries.actor.motifcheck import report_installed_packages
|
||
+from leapp.libraries.common.testutils import create_report_mocked, CurrentActorMocked
|
||
+from leapp.libraries.stdlib import api
|
||
+from leapp.models import DistributionSignedRPM, RPM
|
||
+
|
||
+
|
||
+def _generate_rpm_with_name(name):
|
||
+ """
|
||
+ Generate new RPM model item with given name.
|
||
+
|
||
+ Parameters:
|
||
+ name (str): rpm name
|
||
+
|
||
+ Returns:
|
||
+ rpm (RPM): new RPM object with name parameter set
|
||
+ """
|
||
+ return RPM(name=name,
|
||
+ version='0.1',
|
||
+ release='1.sm01',
|
||
+ epoch='1',
|
||
+ pgpsig='RSA/SHA256, Mon 01 Jan 1970 00:00:00 AM -03, Key ID 199e2f91fd431d51',
|
||
+ packager='Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>',
|
||
+ arch='noarch')
|
||
+
|
||
+
|
||
+@pytest.mark.parametrize('has_motif', [
|
||
+ True, # with motif
|
||
+ False, # without motif
|
||
+])
|
||
+def test_actor_execution(monkeypatch, has_motif):
|
||
+ """
|
||
+ Parametrized helper function for test_actor_* functions.
|
||
+
|
||
+ First generate list of RPM models based on set arguments. Then, run
|
||
+ the actor fed with our RPM list. Finally, assert Reports
|
||
+ according to set arguments.
|
||
+
|
||
+ Parameters:
|
||
+ has_motif (bool): motif installed
|
||
+ """
|
||
+
|
||
+ # Couple of random packages
|
||
+ rpms = [_generate_rpm_with_name('sed'),
|
||
+ _generate_rpm_with_name('htop')]
|
||
+
|
||
+ if has_motif:
|
||
+ # Add motif
|
||
+ rpms += [_generate_rpm_with_name('motif')]
|
||
+
|
||
+ curr_actor_mocked = CurrentActorMocked(msgs=[DistributionSignedRPM(items=rpms)])
|
||
+ monkeypatch.setattr(api, 'current_actor', curr_actor_mocked)
|
||
+ monkeypatch.setattr(reporting, "create_report", create_report_mocked())
|
||
+
|
||
+ # Executed actor fed with out fake RPMs
|
||
+ report_installed_packages()
|
||
+
|
||
+ if has_motif:
|
||
+ # Assert for motif package installed
|
||
+ assert reporting.create_report.called == 1
|
||
+ else:
|
||
+ # Assert for no motif packages installed
|
||
+ assert not reporting.create_report.called
|
||
diff --git a/repos/system_upgrade/el9toel10/models/OutdateKrb5conf.py b/repos/system_upgrade/el9toel10/models/OutdateKrb5conf.py
|
||
new file mode 100644
|
||
index 00000000..e07c98f2
|
||
--- /dev/null
|
||
+++ b/repos/system_upgrade/el9toel10/models/OutdateKrb5conf.py
|
||
@@ -0,0 +1,22 @@
|
||
+from leapp.models import fields, Model
|
||
+from leapp.topics import SystemInfoTopic
|
||
+
|
||
+
|
||
+class RpmKrb5conf(Model):
|
||
+ topic = SystemInfoTopic
|
||
+
|
||
+ path = fields.String()
|
||
+ rpm = fields.String()
|
||
+
|
||
+
|
||
+class OutdatedKrb5conf(Model):
|
||
+ """
|
||
+ Provides a list of outdated krb5 conf files.
|
||
+ """
|
||
+ topic = SystemInfoTopic
|
||
+
|
||
+ unmanaged_files = fields.List(fields.String(), default=[])
|
||
+ rpm_provided_files = fields.List(fields.Model(RpmKrb5conf), default=[])
|
||
+ """
|
||
+ The list with the full path to the krb5 conf files.
|
||
+ """
|