Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

18 changed files with 1622 additions and 778 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/leapp-0.20.0.tar.gz
/leapp-0.18.0.tar.gz
/leapp-0.19.0.tar.gz

View File

@ -1 +0,0 @@
a9b310b4ba20d6ce8f3e4e261035f5f0fcf553d7 SOURCES/leapp-0.20.0.tar.gz

View File

@ -0,0 +1,872 @@
From bc7fce7288ed8f642be561947aa9d7c7f3047097 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20He=C4=8Dko?= <michal.sk.com@gmail.com>
Date: Mon, 3 Mar 2025 12:32:42 +0100
Subject: [PATCH 1/7] CI:packit: update e2e tests to reflect current IPU paths
The current source version used in e2e tests is 8.6 and the target version is 9.0, which are unsupported. This patch bumps the source/target versions used in the CI to source=8.10 and target=9.4. There is also a job with target=9.6, which is expected to be failing until 9.6 is released.
Also rhel 7 & python2 is not supported anymore. Dropping these obsoleted tests.
---
.github/workflows/tmt-tests.yml | 27 +-
.packit.yaml | 649 ++++----------------------------
2 files changed, 94 insertions(+), 582 deletions(-)
diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml
index d994f31..d047cb3 100644
--- a/.github/workflows/tmt-tests.yml
+++ b/.github/workflows/tmt-tests.yml
@@ -69,62 +69,61 @@ jobs:
&& ! startsWith(github.event.comment.body, '/rerun-sst')
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
- call_workflow_tests_86to90_integration:
+ call_workflow_tests_810to94_integration:
needs: call_workflow_copr_build
uses: ./.github/workflows/reuse-tests-8to9.yml
secrets: inherit
with:
copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*7to8)(?!.*max_sst)"
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
- pull_request_status_name: "8.6to9.0"
+ variables: 'SOURCE_RELEASE=8.10;TARGET_RELEASE=9.4;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
+ pull_request_status_name: "8.10to9.4"
if: |
github.event.issue.pull_request
&& ! startsWith(github.event.comment.body, '/rerun-sst')
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
- call_workflow_tests_88to92_integration:
+ call_workflow_tests_810to96_integration:
needs: call_workflow_copr_build
uses: ./.github/workflows/reuse-tests-8to9.yml
secrets: inherit
with:
copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*7to8)(?!.*max_sst)"
- variables: 'SOURCE_RELEASE=8.8;TARGET_RELEASE=9.2;LEAPP_DEVEL_TARGET_RELEASE=9.2;RHSM_REPOS=rhel-8-for-x86_64-appstream-beta-rpms,rhel-8-for-x86_64-baseos-beta-rpms;LEAPPDATA_BRANCH=upstream'
- compose: "RHEL-8.8.0-Nightly"
- pull_request_status_name: "8.8to9.2"
- tmt_context: "distro=rhel-8.8"
+ variables: 'SOURCE_RELEASE=8.10;TARGET_RELEASE=9.6;LEAPP_DEVEL_TARGET_RELEASE=9.6;RHSM_REPOS=rhel-8-for-x86_64-appstream-beta-rpms,rhel-8-for-x86_64-baseos-beta-rpms;LEAPPDATA_BRANCH=upstream'
+ pull_request_status_name: "8.8to9.6"
+ tmt_context: "distro=rhel-8.10"
if: |
github.event.issue.pull_request
&& ! startsWith(github.event.comment.body, '/rerun-sst')
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
- call_workflow_tests_86to90_sst:
+ call_workflow_tests_810to94_sst:
needs: call_workflow_copr_build
uses: ./.github/workflows/reuse-tests-8to9.yml
secrets: inherit
with:
copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
tmt_plan_regex: "^(?!.*tier[2-3].*)(.*max_sst.*)"
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
- pull_request_status_name: "8.6to9.0-sst"
+ variables: 'SOURCE_RELEASE=8.10;TARGET_RELEASE=9.4;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;LEAPPDATA_BRANCH=upstream'
+ pull_request_status_name: "8.10to9.4-sst"
update_pull_request_status: 'false'
if: |
github.event.issue.pull_request
&& startsWith(github.event.comment.body, '/rerun-sst')
&& contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
- call_workflow_tests_86to90_aws:
+ call_workflow_tests_810to94_aws:
needs: call_workflow_copr_build
uses: ./.github/workflows/reuse-tests-8to9.yml
secrets: inherit
with:
copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*7to8)(.*e2e)"
- compose: "RHEL-8.6-rhui"
+ compose: "RHEL-8.10-rhui"
environment_settings: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"}}'
pull_request_status_name: "8to9-aws-e2e"
- variables: 'SOURCE_RELEASE=8.6;TARGET_RELEASE=9.0;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;RHUI=aws;LEAPPDATA_BRANCH=upstream'
+ variables: 'SOURCE_RELEASE=8.10;TARGET_RELEASE=9.4;RHSM_REPOS=rhel-8-for-x86_64-appstream-eus-rpms,rhel-8-for-x86_64-baseos-eus-rpms;RHUI=aws;LEAPPDATA_BRANCH=upstream'
if: |
github.event.issue.pull_request
&& ! startsWith(github.event.comment.body, '/rerun-sst')
diff --git a/.packit.yaml b/.packit.yaml
index 36a6e16..6f41db1 100644
--- a/.packit.yaml
+++ b/.packit.yaml
@@ -12,7 +12,6 @@ jobs:
owner: "@oamg"
project: leapp
targets:
- - epel-7-x86_64
- epel-8-x86_64
- epel-9-x86_64
- fedora-all-aarch64
@@ -31,7 +30,6 @@ jobs:
owner: "@oamg"
project: leapp
targets:
- - epel-7-x86_64
- epel-8-x86_64
- epel-9-x86_64
- fedora-all-aarch64
@@ -51,341 +49,64 @@ jobs:
# >7tox path https://gitlab.cee.redhat.com/oamg/leapp-tests/-/blob/main/config.yaml
# Available only to RH Employees.
+
# ###################################################################### #
-# ############################### 7 TO 8 ############################### #
+# ############################## 8 TO 9 ################################ #
# ###################################################################### #
# ###################################################################### #
# ### Abstract job definitions to make individual tests/jobs smaller ### #
# ###################################################################### #
-- &sanity-abstract-7to8
+
+#NOTE(pstodulk) putting default values in abstract jobs as from 8.10, as this
+# is the last RHEL 8 release and all new future tests will start from this
+# one release.
+
+# This job is never triggered - we define abstract anchor that are reused in jobs that 'inherit'
+# and have actionable triggers
+- &sanity-abstract-8to9
job: tests
trigger: ignore
fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
- fmf_ref: "rhel7"
+ fmf_ref: "main"
use_internal_tf: True
labels:
- sanity
targets:
- epel-7-x86_64:
- distros: [RHEL-7.9-ZStream]
- identifier: sanity-abstract-7to8
- tmt_plan: ""
-
-- &sanity-abstract-7to8-aws
- <<: *sanity-abstract-7to8
- labels:
- - sanity
- - aws
- targets:
- epel-7-x86_64:
- distros: [RHEL-7.9-rhui]
- identifier: sanity-abstract-7to8-aws
-
-# On-demand minimal beaker tests
-- &beaker-minimal-7to8-abstract-ondemand
- <<: *sanity-abstract-7to8
- manual_trigger: True
- labels:
- - beaker-minimal
- identifier: beaker-minimal-7to8-abstract-ondemand
-
-# On-demand kernel-rt tests
-- &kernel-rt-abstract-7to8-ondemand
- <<: *beaker-minimal-7to8-abstract-ondemand
- labels:
- - kernel-rt
- identifier: sanity-7to8-kernel-rt-abstract-ondemand
-
-# ###################################################################### #
-# ######################### Individual tests ########################### #
-# ###################################################################### #
-
-# Tests: 7.9 -> 8.8
-- &sanity-79to88-aws
- <<: *sanity-abstract-7to8-aws
- trigger: pull_request
- identifier: sanity-7.9to8.8-aws
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:upgrade_happy_path & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.8"
- settings:
- provisioning:
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.8"
- RHUI: "aws"
- LEAPPDATA_BRANCH: "upstream"
- LEAPP_NO_RHSM: "1"
- USE_CUSTOM_REPOS: rhui
-
-- &sanity-79to88
- <<: *sanity-abstract-7to8
- trigger: pull_request
- identifier: sanity-7.9to8.8
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:sanity & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.8"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.8"
-
-- &beaker-minimal-79to88
- <<: *beaker-minimal-7to8-abstract-ondemand
- trigger: pull_request
- labels:
- - beaker-minimal
- - beaker-minimal-7.9to8.8
- - 7.9to8.8
- identifier: sanity-7.9to8.8-beaker-minimal-ondemand
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:partitioning & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.8"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.8"
-
-- &kernel-rt-79to88
- <<: *kernel-rt-abstract-7to8-ondemand
- trigger: pull_request
- labels:
- - kernel-rt
- - kernel-rt-7.9to8.8
- - 7.9to8.8
- identifier: sanity-7.9to8.8-kernel-rt-ondemand
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:kernel-rt & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.8"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.8"
-
-# Tests: 7.9 -> 8.10
-- &sanity-79to810
- <<: *sanity-abstract-7to8
- trigger: pull_request
- identifier: sanity-7.9to8.10
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:sanity & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.10"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.10"
-
-- &sanity-79to810-aws
- <<: *sanity-abstract-7to8-aws
- trigger: pull_request
- identifier: sanity-7.9to8.10-aws
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:upgrade_happy_path & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.10"
- settings:
- provisioning:
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.10"
- RHUI: "aws"
- LEAPPDATA_BRANCH: "upstream"
- LEAPP_NO_RHSM: "1"
- USE_CUSTOM_REPOS: rhui
-
-- &beaker-minimal-79to810
- <<: *beaker-minimal-7to8-abstract-ondemand
- trigger: pull_request
- labels:
- - beaker-minimal
- - beaker-minimal-7.9to8.10
- - 7.9to8.10
- identifier: sanity-7.9to8.10-beaker-minimal-ondemand
+ epel-8-x86_64:
+ distros: [RHEL-8.10.0-Nightly]
+ identifier: sanity-abstract-8to9
tf_extra_params:
test:
tmt:
- plan_filter: 'tag:7to8 & tag:partitioning & enabled:true'
+ plan_filter: 'tag:8to9'
environments:
- - artifacts:
+ - artifacts: &artifacts-for-rhel8
- type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
+ id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
packages:
- leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
+ - python3-leapp
+ - leapp-upgrade-el8toel9-deps
order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.10"
+ - &tmt-env-settings-810to94
+ tmt:
+ context: &tmt-context-810to94
+ distro: "rhel-8.10"
+ distro_target: "rhel-9.4"
settings:
provisioning:
tags:
BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.10"
-
-- &kernel-rt-79to810
- <<: *kernel-rt-abstract-7to8-ondemand
- trigger: pull_request
- labels:
- - kernel-rt
- - kernel-rt-7.9to8.10
- - 7.9to8.10
- identifier: sanity-7.9to8.10-kernel-rt-ondemand
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:7to8 & tag:kernel-rt & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-7-x86_64/"
- packages:
- - leapp-repository
- - python2-leapp
- - leapp-upgrade-el7toel8-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-7.9"
- distro_target: "rhel-8.10"
+ - &tmt-env-settings-810to96
+ tmt:
+ context: &tmt-context-810to96
+ distro: "rhel-8.10"
+ distro_target: "rhel-9.6"
settings:
provisioning:
tags:
BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "7.9"
- TARGET_RELEASE: "8.10"
-
-
-# ###################################################################### #
-# ############################## 8 TO 9 ################################ #
-# ###################################################################### #
-
-# ###################################################################### #
-# ### Abstract job definitions to make individual tests/jobs smaller ### #
-# ###################################################################### #
-
-#NOTE(pstodulk) putting default values in abstract jobs as from 8.10, as this
-# is the last RHEL 8 release and all new future tests will start from this
-# one release.
-
-- &sanity-abstract-8to9
- job: tests
- trigger: ignore
- fmf_url: "https://gitlab.cee.redhat.com/oamg/leapp-tests"
- fmf_ref: "main"
- use_internal_tf: True
- labels:
- - sanity
- targets:
- epel-8-x86_64:
- distros: [RHEL-8.10.0-Nightly]
- identifier: sanity-abstract-8to9
- &sanity-abstract-8to9-aws
<<: *sanity-abstract-8to9
@@ -414,154 +135,9 @@ jobs:
identifier: sanity-8to9-kernel-rt-abstract-ondemand
# ###################################################################### #
-# ######################### Individual tests ########################### #
+# ############################# 8.10 > 9.4 ############################# #
# ###################################################################### #
-# Tests: 8.8 -> 9.2
-- &sanity-88to92
- <<: *sanity-abstract-8to9
- trigger: pull_request
- targets:
- epel-8-x86_64:
- distros: [RHEL-8.8.0-Nightly]
- identifier: sanity-8.8to9.2
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:8to9 & tag:tier0 & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- tmt:
- context:
- distro: "rhel-8.8"
- distro_target: "rhel-9.2"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "8.8"
- TARGET_RELEASE: "9.2"
- RHSM_REPOS_EUS: "eus"
-
-- &sanity-88to92-aws
- <<: *sanity-abstract-8to9-aws
- trigger: pull_request
- targets:
- epel-8-x86_64:
- distros: [RHEL-8.8-rhui]
- identifier: sanity-8.8to9.2-aws
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:8to9 & tag:rhui-tier[0] & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- tmt:
- context:
- distro: "rhel-8.8"
- distro_target: "rhel-9.2"
- settings:
- provisioning:
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "8.8"
- TARGET_RELEASE: "9.2"
- RHUI_HYPERSCALER: aws
-
-- &beaker-minimal-88to92
- <<: *beaker-minimal-8to9-abstract-ondemand
- trigger: pull_request
- labels:
- - beaker-minimal
- - beaker-minimal-8.8to9.2
- - 8.8to9.2
- targets:
- epel-8-x86_64:
- distros: [RHEL-8.8.0-Nightly]
- identifier: sanity-8.8to9.2-beaker-minimal-ondemand
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:8to9 &tag:partitioning & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- tmt:
- context:
- distro: "rhel-8.8"
- distro_target: "rhel-9.2"
- settings:
- provisioning:
- post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "8.8"
- TARGET_RELEASE: "9.2"
- RHSM_REPOS_EUS: "eus"
-
-- &kernel-rt-88to92
- <<: *kernel-rt-abstract-8to9-ondemand
- trigger: pull_request
- labels:
- - kernel-rt
- - kernel-rt-8.8to9.2
- - 8.8to9.2
- identifier: sanity-8.8to9.2-kernel-rt-ondemand
- targets:
- epel-8-x86_64:
- distros: [RHEL-8.8.0-Nightly]
- tf_extra_params:
- test:
- tmt:
- plan_filter: 'tag:8to9 & tag:kernel-rt & enabled:true'
- environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- tmt:
- context:
- distro: "rhel-8.8"
- distro_target: "rhel-9.2"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
- SOURCE_RELEASE: "8.8"
- TARGET_RELEASE: "9.2"
- RHSM_REPOS_EUS: "eus"
-
-
-# Tests: 8.10 -> 9.4
- &sanity-810to94
<<: *sanity-abstract-8to9
trigger: pull_request
@@ -571,27 +147,12 @@ jobs:
tmt:
plan_filter: 'tag:8to9 & tag:tier0 & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.4"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to94
+ env: &env-810to94
SOURCE_RELEASE: "8.10"
TARGET_RELEASE: "9.4"
-# On-demand minimal beaker tests
- &beaker-minimal-810to94
<<: *beaker-minimal-8to9-abstract-ondemand
trigger: pull_request
@@ -605,27 +166,11 @@ jobs:
tmt:
plan_filter: 'tag:8to9 & tag:partitioning & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.4"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to94
env:
- SOURCE_RELEASE: "8.10"
- TARGET_RELEASE: "9.4"
+ <<: *env-810to94
-# On-demand kernel-rt tests
- &kernel-rt-810to94
<<: *kernel-rt-abstract-8to9-ondemand
trigger: pull_request
@@ -639,56 +184,54 @@ jobs:
tmt:
plan_filter: 'tag:8to9 & tag:kernel-rt & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to94
+ env:
+ <<: *env-810to94
+
+- &sanity-810to94-aws
+ <<: *sanity-abstract-8to9-aws
+ trigger: pull_request
+ targets:
+ epel-8-x86_64:
+ distros: [RHEL-8.10-rhui]
+ identifier: sanity-8.10to9.4-aws
+ tf_extra_params:
+ test:
+ tmt:
+ plan_filter: 'tag:8to9 & tag:rhui-tier[0] & enabled:true'
+ environments:
+ - artifacts: *artifacts-for-rhel8
- tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.4"
+ context: *tmt-context-810to94
settings:
provisioning:
+ post_install_script: "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"
tags:
BusinessUnit: sst_upgrades@leapp_upstream_test
env:
- SOURCE_RELEASE: "8.10"
- TARGET_RELEASE: "9.4"
+ <<: *env-810to94
+ RHUI_HYPERSCALER: aws
-# Tests: 8.10 -> 9.5
-- &sanity-810to95
+# ###################################################################### #
+# ############################# 8.10 > 9.6 ############################# #
+# ###################################################################### #
+
+- &sanity-810to96
<<: *sanity-abstract-8to9
trigger: pull_request
- identifier: sanity-8.10to9.5
+ identifier: sanity-8.10to9.6
tf_extra_params:
test:
tmt:
plan_filter: 'tag:8to9 & tag:tier0 & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.5"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
- env:
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to96
+ env: &env-810to96
SOURCE_RELEASE: "8.10"
- TARGET_RELEASE: "9.5"
+ TARGET_RELEASE: "9.6"
# On-demand minimal beaker tests
- &beaker-minimal-810to95
@@ -696,64 +239,34 @@ jobs:
trigger: pull_request
labels:
- beaker-minimal
- - beaker-minimal-8.10to9.5
- - 8.10to9.5
- identifier: sanity-8.10to9.5-beaker-minimal-ondemand
+ - beaker-minimal-8.10to9.6
+ - 8.10to9.6
+ identifier: sanity-8.10to9.6-beaker-minimal-ondemand
tf_extra_params:
test:
tmt:
plan_filter: 'tag:8to9 & tag:partitioning & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.5"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to96
env:
- SOURCE_RELEASE: "8.10"
- TARGET_RELEASE: "9.5"
+ <<: *env-810to96
# On-demand kernel-rt tests
-- &kernel-rt-810to95
+- &kernel-rt-810to96
<<: *kernel-rt-abstract-8to9-ondemand
trigger: pull_request
labels:
- kernel-rt
- - kernel-rt-8.10to9.5
- - 8.10to9.5
- identifier: sanity-8.10to9.5-kernel-rt-ondemand
+ - kernel-rt-8.10to9.6
+ - 8.10to9.6
+ identifier: sanity-8.10to9.6-kernel-rt-ondemand
tf_extra_params:
test:
tmt:
plan_filter: 'tag:8to9 & tag:kernel-rt & enabled:true'
environments:
- - artifacts:
- - type: "repository"
- id: "https://download.copr.fedorainfracloud.org/results/@oamg/leapp/epel-8-x86_64/"
- packages:
- - leapp-repository
- - python3-leapp
- - leapp-upgrade-el8toel9-deps
- order: 40
- - tmt:
- context:
- distro: "rhel-8.10"
- distro_target: "rhel-9.5"
- settings:
- provisioning:
- tags:
- BusinessUnit: sst_upgrades@leapp_upstream_test
+ - artifacts: *artifacts-for-rhel8
+ - *tmt-env-settings-810to96
env:
- SOURCE_RELEASE: "8.10"
- TARGET_RELEASE: "9.5"
+ <<: *env-810to96
--
2.49.0

View File

@ -0,0 +1,30 @@
From 4ddbae04c8d012ef48e9cef198050e96fad8c402 Mon Sep 17 00:00:00 2001
From: MichalHe <michal.sk.com@gmail.com>
Date: Tue, 18 Mar 2025 10:33:11 +0100
Subject: [PATCH 2/7] configs: recognize only the .yaml file extension
Leapp recognized two file extensions for its configuration files:
.yaml and .yml. This patch removes the recognition of .yml to
avoid user confusion, e.g., creating configuration files with
the same name but different extensions. This patch also enforces
our documentation to use only one extension.
---
leapp/actors/config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/leapp/actors/config.py b/leapp/actors/config.py
index 160c159..55775d5 100644
--- a/leapp/actors/config.py
+++ b/leapp/actors/config.py
@@ -146,7 +146,7 @@ def _get_config(config_dir='/etc/leapp/actor_conf.d'):
# We do not do a recursive walk to maintain Python2 compatibility, but we do
# not expect rich config hierarchies, so no harm done.
config_files = glob.glob(os.path.join(config_dir, '*'))
- config_files = [f for f in config_files if f.endswith('.yml') or f.endswith('.yaml')]
+ config_files = [f for f in config_files if f.endswith('.yaml')]
config_files.sort()
configuration = {}
--
2.49.0

View File

@ -0,0 +1,30 @@
From 4c805dd449c39c1ff00cea4563cc8227ff23a5ec Mon Sep 17 00:00:00 2001
From: karolinku <kkula@redhat.com>
Date: Tue, 1 Apr 2025 16:01:08 +0200
Subject: [PATCH 3/7] Handle case when db directory is missing
When directory is missing, this change will introduce creation of
missing path and allow proceeding with execution.
JIRA: RHEL-54382
---
leapp/utils/audit/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/leapp/utils/audit/__init__.py b/leapp/utils/audit/__init__.py
index 8511179..d5ebb73 100644
--- a/leapp/utils/audit/__init__.py
+++ b/leapp/utils/audit/__init__.py
@@ -57,6 +57,9 @@ def create_connection(path):
:param path: Path to the database
:return: Connection object
"""
+ db_dir_path = os.path.dirname(path)
+ if not os.path.exists(db_dir_path):
+ os.mkdir(db_dir_path, mode=0o700)
with _umask(0o177):
return _initialize_database(sqlite3.connect(path))
--
2.49.0

View File

@ -0,0 +1,66 @@
From 372ac6894d206eb9adab704dd12a901d824f4b39 Mon Sep 17 00:00:00 2001
From: Petr Stodulka <pstodulk@redhat.com>
Date: Sun, 6 Apr 2025 20:06:03 +0200
Subject: [PATCH 4/7] Fix CLI: allow to set falsy values as default
When specifying an option for a leapp CLI command using @add_option
decorator, it has not been possible to specify a "falsy" value
(or let's say empty) as `default` e.g. empty string, empty list, etc.
Start to check NoneType for the `default` parameter properly to
allow it to set this.
Bump leapp-framework to 6.1.
Note:
The similar problem is for `choices` and `metavar` parameters.
In case of `metavar` it's however ok to ignore empty string.
In case of empty `choices` it would lead to the same evaluation as
in case of NoneType (any input is ok). So I that the `default` is the
only parameter that needs to be checked properly.
JIRA: RHEL-86206
---
leapp/utils/clicmd.py | 6 +++---
packaging/leapp.spec | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/leapp/utils/clicmd.py b/leapp/utils/clicmd.py
index eef6834..89d3e27 100644
--- a/leapp/utils/clicmd.py
+++ b/leapp/utils/clicmd.py
@@ -228,8 +228,8 @@ class Command(object):
:type metavar: str
:param choices: range of values that the argument is allowed to take
:type choices: list
- :param choices: default value of the argument if nothing is specified
- :type choices: str
+ :param default: default value of the argument if nothing is specified
+ :type default: any
:return: self
"""
name = name.lstrip('-')
@@ -250,7 +250,7 @@ class Command(object):
kwargs['metavar'] = metavar
if choices:
kwargs['choices'] = choices
- if default:
+ if default is not None:
kwargs['default'] = default
self._add_opt(*names, help=help, # noqa; pylint: disable=redefined-builtin
action=action, internal={'wrapped': wrapped, 'inherit': inherit}, **kwargs)
diff --git a/packaging/leapp.spec b/packaging/leapp.spec
index b942112..19d49e1 100644
--- a/packaging/leapp.spec
+++ b/packaging/leapp.spec
@@ -13,7 +13,7 @@
# This is kind of help for more flexible development of leapp repository,
# so people do not have to wait for new official release of leapp to ensure
# it is installed/used the compatible one.
-%global framework_version 6.0
+%global framework_version 6.1
# IMPORTANT: everytime the requirements are changed, increment number by one
# - same for Provides in deps subpackage
--
2.49.0

View File

@ -0,0 +1,40 @@
From 53f22282347011801fa709ba6b558f87fec26bc1 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 7 Apr 2025 13:01:51 +0000
Subject: [PATCH 5/7] chore(deps): update sclorg/testing-farm-as-github-action
action to v4
---
.github/workflows/reuse-tests-7to8.yml | 2 +-
.github/workflows/reuse-tests-8to9.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/reuse-tests-7to8.yml b/.github/workflows/reuse-tests-7to8.yml
index 65621b5..7f7ce35 100644
--- a/.github/workflows/reuse-tests-7to8.yml
+++ b/.github/workflows/reuse-tests-7to8.yml
@@ -46,7 +46,7 @@ jobs:
steps:
- name: Schedule regression testing for 7to8
id: run_test_7to8
- uses: sclorg/testing-farm-as-github-action@v3.1.2
+ uses: sclorg/testing-farm-as-github-action@v4.0.0
with:
# required
api_url: ${{ secrets.TF_ENDPOINT }}
diff --git a/.github/workflows/reuse-tests-8to9.yml b/.github/workflows/reuse-tests-8to9.yml
index 12e69c7..811fd8e 100644
--- a/.github/workflows/reuse-tests-8to9.yml
+++ b/.github/workflows/reuse-tests-8to9.yml
@@ -47,7 +47,7 @@ jobs:
steps:
- name: Schedule regression testing for 8to9
id: run_test_8to9
- uses: sclorg/testing-farm-as-github-action@v3.1.2
+ uses: sclorg/testing-farm-as-github-action@v4.0.0
with:
# required
api_url: ${{ secrets.TF_ENDPOINT }}
--
2.49.0

View File

@ -0,0 +1,180 @@
From cfdce5f3fc6fce6d9e253c153ec94aad9ceb0609 Mon Sep 17 00:00:00 2001
From: Tomas Fratrik <tomasfratrik8@gmail.com>
Date: Wed, 23 Apr 2025 13:11:32 +0200
Subject: [PATCH 6/7] Remove 7to8 CI tests
Removing 7to8 CI tests because the upgrade path from RHEL-7 to RHEL-8 is no longer supported.
Jira: RHELMISC-11004
---
.github/workflows/reuse-tests-7to8.yml | 69 --------------------------
.github/workflows/tmt-tests.yml | 59 ----------------------
.github/workflows/unit-tests.yml | 6 ---
3 files changed, 134 deletions(-)
delete mode 100644 .github/workflows/reuse-tests-7to8.yml
diff --git a/.github/workflows/reuse-tests-7to8.yml b/.github/workflows/reuse-tests-7to8.yml
deleted file mode 100644
index 7f7ce35..0000000
--- a/.github/workflows/reuse-tests-7to8.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-name: reuse-tests-7to8@TF
-
-on:
- workflow_call:
- secrets:
- TF_ENDPOINT:
- required: True
- TF_API_KEY:
- required: True
- inputs:
- copr_artifacts:
- required: True
- type: string
- tmt_plan_regex:
- type: string
- default: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)"
- environment_settings:
- type: string
- default: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys"}}'
- arch:
- type: string
- default: 'x86_64'
- pull_request_status_name:
- type: string
- default: '7to8'
- copr:
- type: string
- default: 'epel-7-x86_64'
- tmt_context:
- type: string
- default: 'distro=rhel-7.9'
- compose:
- type: string
- default: 'RHEL-7.9-ZStream'
- variables:
- type: string
- default: ''
- update_pull_request_status:
- type: string
- default: 'true'
-
-jobs:
- reusable_workflow_job:
- name: Schedule regression tests on Testing Farm
- runs-on: ubuntu-24.04
- steps:
- - name: Schedule regression testing for 7to8
- id: run_test_7to8
- uses: sclorg/testing-farm-as-github-action@v4.0.0
- with:
- # required
- api_url: ${{ secrets.TF_ENDPOINT }}
- api_key: ${{ secrets.TF_API_KEY }}
- git_url: 'https://gitlab.cee.redhat.com/oamg/tmt-plans'
- github_token: ${{ secrets.GITHUB_TOKEN }}
- # optional
- tf_scope: 'private'
- create_issue_comment: 'true'
- update_pull_request_status: ${{ inputs.update_pull_request_status }}
- tmt_plan_regex: ${{ inputs.tmt_plan_regex }}
- compose: ${{ inputs.compose }}
- arch: ${{ inputs.arch }}
- copr: ${{ inputs.copr }}
- copr_artifacts: ${{ inputs.copr_artifacts }}
- debug: ${{ secrets.ACTIONS_STEP_DEBUG }}
- tmt_context: ${{ inputs.tmt_context }}
- pull_request_status_name: ${{ inputs.pull_request_status_name }}
- environment_settings: ${{ inputs.environment_settings }}
- variables: ${{ inputs.variables }}
diff --git a/.github/workflows/tmt-tests.yml b/.github/workflows/tmt-tests.yml
index d047cb3..d4671c4 100644
--- a/.github/workflows/tmt-tests.yml
+++ b/.github/workflows/tmt-tests.yml
@@ -10,65 +10,6 @@ jobs:
uses: ./.github/workflows/reuse-copr-build.yml
secrets: inherit
- call_workflow_tests_79to88_integration:
- needs: call_workflow_copr_build
- uses: ./.github/workflows/reuse-tests-7to8.yml
- secrets: inherit
- with:
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*max_sst)"
- pull_request_status_name: "7.9to8.8"
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
- if: |
- github.event.issue.pull_request
- && ! startsWith(github.event.comment.body, '/rerun-sst')
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
-
- call_workflow_tests_79to86_integration:
- needs: call_workflow_copr_build
- uses: ./.github/workflows/reuse-tests-7to8.yml
- secrets: inherit
- with:
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(?!.*max_sst)"
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;LEAPPDATA_BRANCH=upstream'
- pull_request_status_name: "7.9to8.6"
- if: |
- github.event.issue.pull_request
- && ! startsWith(github.event.comment.body, '/rerun-sst')
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
-
- call_workflow_tests_79to88_sst:
- needs: call_workflow_copr_build
- uses: ./.github/workflows/reuse-tests-7to8.yml
- secrets: inherit
- with:
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
- tmt_plan_regex: "^(?!.*tier[2-3].*)(.*max_sst.*)"
- pull_request_status_name: "7.9to8.8-sst"
- update_pull_request_status: 'false'
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.8;LEAPPDATA_BRANCH=upstream'
- if: |
- github.event.issue.pull_request
- && startsWith(github.event.comment.body, '/rerun-sst')
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
-
- call_workflow_tests_7to8_aws:
- needs: call_workflow_copr_build
- uses: ./.github/workflows/reuse-tests-7to8.yml
- secrets: inherit
- with:
- copr_artifacts: ${{ needs.call_workflow_copr_build.outputs.artifacts }}
- tmt_plan_regex: "^(?!.*upgrade_plugin)(?!.*tier[2-3].*)(?!.*rhsm)(?!.*c2r)(?!.*sap)(?!.*8to9)(.*e2e)"
- compose: "RHEL-7.9-rhui"
- environment_settings: '{"provisioning": {"post_install_script": "#!/bin/sh\nsudo sed -i s/.*ssh-rsa/ssh-rsa/ /root/.ssh/authorized_keys; echo 42; yum-config-manager --enable rhel-7-server-rhui-optional-rpms"}}'
- pull_request_status_name: "7to8-aws-e2e"
- variables: 'SOURCE_RELEASE=7.9;TARGET_RELEASE=8.6;RHUI=aws;LEAPPDATA_BRANCH=upstream'
- if: |
- github.event.issue.pull_request
- && ! startsWith(github.event.comment.body, '/rerun-sst')
- && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
-
call_workflow_tests_810to94_integration:
needs: call_workflow_copr_build
uses: ./.github/workflows/reuse-tests-8to9.yml
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index d994b27..2702e93 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -33,12 +33,6 @@ jobs:
- name: Run python linters with python 3.6 on el8
python: python3.6
container: ubi8-lint
- - name: Run unit tests with python2.7 on el7
- python: python2.7
- container: ubi7
- - name: Run python linters with python2.7 on el7
- python: python2.7
- container: ubi7-lint
steps:
- name: Checkout code
--
2.49.0

View File

@ -0,0 +1,35 @@
From 3981f12bd9c8d71539f2ccd8b1877d203a292efd Mon Sep 17 00:00:00 2001
From: Michal Macura <mmacura@redhat.com>
Date: Tue, 6 May 2025 17:26:30 +0200
Subject: [PATCH 7/7] Update .packit.yaml to fix failing rhui job
This commit updates the tag and env for the sanity-810to94-aws job to
make it run correctly.
---
.packit.yaml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.packit.yaml b/.packit.yaml
index 6f41db1..67e0b28 100644
--- a/.packit.yaml
+++ b/.packit.yaml
@@ -199,7 +199,7 @@ jobs:
tf_extra_params:
test:
tmt:
- plan_filter: 'tag:8to9 & tag:rhui-tier[0] & enabled:true'
+ plan_filter: 'tag:8to9 & tag:rhui-aws-tier0 & enabled:true'
environments:
- artifacts: *artifacts-for-rhel8
- tmt:
@@ -211,7 +211,6 @@ jobs:
BusinessUnit: sst_upgrades@leapp_upstream_test
env:
<<: *env-810to94
- RHUI_HYPERSCALER: aws
# ###################################################################### #
--
2.49.0

View File

@ -1,120 +0,0 @@
From e62e4e144670de9337c8a406ff8d532b9c1033d4 Mon Sep 17 00:00:00 2001
From: Matej Matuska <mmatuska@redhat.com>
Date: Fri, 19 Sep 2025 11:39:11 +0200
Subject: [PATCH 1/3] cli: Add possibility to specify aliases for CLI option
The existing 'name' and 'short_name' parameters are kept as is for
backwards compatibility.
Also a dest parameter is added for specifying the name of the attribute
to be added to the parsed args object.
The change is backwards compatible, bump framework-version from 6.1 to
6.2.
Jira: RHEL-110563 (related)
---
leapp/utils/clicmd.py | 53 +++++++++++++++++++++++++++++++++++++------
packaging/leapp.spec | 2 +-
2 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/leapp/utils/clicmd.py b/leapp/utils/clicmd.py
index 89d3e27..7f819ea 100644
--- a/leapp/utils/clicmd.py
+++ b/leapp/utils/clicmd.py
@@ -202,9 +202,22 @@ class Command(object):
internal = kwargs.pop('internal', {})
self._options.append((args, kwargs, internal))
- def add_option(self, name, short_name='', help='', # noqa; pylint: disable=redefined-builtin
- is_flag=False, inherit=False, value_type=str, wrapped=None, action=None, metavar=None,
- choices=None, default=None):
+ def add_option( # noqa; pylint: disable=redefined-builtin, too-many-arguments
+ self,
+ name,
+ short_name="",
+ help="",
+ is_flag=False,
+ inherit=False,
+ value_type=str,
+ wrapped=None,
+ action=None,
+ metavar=None,
+ choices=None,
+ default=None,
+ aliases=None,
+ dest=None,
+ ):
"""
Add an option
@@ -230,16 +243,39 @@ class Command(object):
:type choices: list
:param default: default value of the argument if nothing is specified
:type default: any
+ :param aliases: Aliases for the option, appended after short_name and name in help output
+ :type aliases: list[str]
+ :param dest: The name of the attribute to be added to the parsed args object
+ :type dest: str
:return: self
"""
name = name.lstrip('-')
names = ['--' + name]
kwargs = {}
if short_name:
- short_name = short_name.lstrip('-')
- if len(short_name) != 1:
- raise CommandDefinitionError("Short name should be one letter only")
- names.insert(0, '-' + short_name)
+ stripped = short_name.lstrip('-')
+ if len(stripped) != 1:
+ msg = "Short name option should be one letter only (excluding '-'), but received: {}"
+ raise CommandDefinitionError(msg.format(short_name))
+ names.insert(0, '-' + stripped)
+
+ aliases = aliases or []
+ for alias in aliases:
+ if alias.startswith('--'):
+ names.append('--' + alias.strip('-'))
+ elif alias.startswith('-'):
+ stripped = alias.strip('-')
+ if len(stripped) != 1:
+ msg = "Short name option should be one letter only (excluding '-'), but received: {}"
+ raise CommandDefinitionError(msg.format(alias))
+ names.append('-' + stripped)
+ else:
+ # no way to distinguish whether it's a short or long option if no leading dashes,
+ # decide based on length
+ if len(alias) == 1:
+ names.append('-' + alias)
+ else:
+ names.append('--' + alias)
if not action:
action = 'store'
if is_flag:
@@ -252,6 +288,9 @@ class Command(object):
kwargs['choices'] = choices
if default is not None:
kwargs['default'] = default
+ if dest:
+ kwargs['dest'] = dest
+
self._add_opt(*names, help=help, # noqa; pylint: disable=redefined-builtin
action=action, internal={'wrapped': wrapped, 'inherit': inherit}, **kwargs)
return self
diff --git a/packaging/leapp.spec b/packaging/leapp.spec
index bdf5a79..22a2085 100644
--- a/packaging/leapp.spec
+++ b/packaging/leapp.spec
@@ -13,7 +13,7 @@
# This is kind of help for more flexible development of leapp repository,
# so people do not have to wait for new official release of leapp to ensure
# it is installed/used the compatible one.
-%global framework_version 6.1
+%global framework_version 6.2
# IMPORTANT: everytime the requirements are changed, increment number by one
# - same for Provides in deps subpackage
--
2.51.1

View File

@ -1,70 +0,0 @@
From 723b17561251a1b5fa01518966483c573142ac8e Mon Sep 17 00:00:00 2001
From: Tomas Fratrik <tfratrik@redhat.com>
Date: Tue, 19 Aug 2025 14:31:51 +0200
Subject: [PATCH 2/3] Update build container up to f42
* Add installation of python3-setuptools
* Drop fedora versions 35-40
Jira: RHELMISC-13271
---
Makefile | 8 ++++----
res/container-builds/Containerfile.fedora_generic | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 1dc9a29..a68b8fe 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ help:
@echo " build create the RPM"
@echo " build_container create the RPM in container"
@echo " - set BUILD_CONTAINER to select the container"
- @echo " - available containers are:" el{8..9} f{35..40} rawhide
+ @echo " - available containers are:" el{8..9} f{41..42} rawhide
@echo " - this can't be used to build in parallel,"
@echo " as build containers operate on the same files"
@echo " clean_containers clean container images used for building"
@@ -154,7 +154,7 @@ build_container:
el[8-9]) \
_CONT_FILE="Containerfile.ubi"$${BUILD_CONTAINER: -1}; \
;; \
- f3[5-9]|f40|rawhide) \
+ f4[1-2]|rawhide) \
[ $$BUILD_CONTAINER = rawhide ] && VERSION=latest || VERSION=$${BUILD_CONTAINER: -2}; \
_CONT_FILE=".Containerfile.$${BUILD_CONTAINER}"; \
cp res/container-builds/Containerfile.fedora_generic res/container-builds/$$_CONT_FILE && \
@@ -165,7 +165,7 @@ build_container:
exit 1; \
;; \
*) \
- echo "Available containers are: el{8..9} f{35..40} rawhide"; \
+ echo "Available containers are: el{8..9} f{41..42} rawhide"; \
exit 1; \
;; \
esac && \
@@ -234,7 +234,7 @@ test_container_all:
done
clean_containers:
- @for i in "leapp-build-"{el8,el9,f35,f36,rawhide} "leapp-tests-rhel"{8..10}; do \
+ @for i in leapp-build-el{8,9} leapp-build-f{41..42} leapp-build-rawhide leapp-tests-rhel{8..10}; do \
[ -z $$($(_CONTAINER_TOOL) images -q "$$i") ] || \
$(_CONTAINER_TOOL) rmi "$$i" > /dev/null 2>&1 || :; \
done
diff --git a/res/container-builds/Containerfile.fedora_generic b/res/container-builds/Containerfile.fedora_generic
index c0af2b7..bd67876 100644
--- a/res/container-builds/Containerfile.fedora_generic
+++ b/res/container-builds/Containerfile.fedora_generic
@@ -5,7 +5,7 @@ VOLUME /payload
ENV DIST_VERSION 8
RUN dnf update -y && \
- dnf install -y python3 make git rpm-build python3-devel
+ dnf install -y python3 make git rpm-build python3-devel python3-setuptools
#yum install -y python3-pip && \ python3 -m pip install --upgrade pip==20.3.4
WORKDIR /payload
--
2.51.1

View File

@ -1,48 +0,0 @@
From 32cd2e7649236a3aa30f7763e1634cc26381afa7 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 9 Oct 2025 15:02:13 +0000
Subject: [PATCH 3/3] chore(deps): update actions/checkout action to v5
---
.github/workflows/reuse-copr-build.yml | 4 ++--
.github/workflows/unit-tests.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/reuse-copr-build.yml b/.github/workflows/reuse-copr-build.yml
index dc3af98..c2fb51c 100644
--- a/.github/workflows/reuse-copr-build.yml
+++ b/.github/workflows/reuse-copr-build.yml
@@ -49,7 +49,7 @@ jobs:
# TODO: The correct way to checkout would be to use simmilar approach as in get_commit_by_timestamp function of
# the github gluetool module (i.e. do not use HEAD but the last commit before comment).
id: checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
ref: "refs/pull/${{ steps.pr_nr.outputs.pr_nr }}/head"
@@ -121,7 +121,7 @@ jobs:
- name: Checkout leapp-repository
id: checkout_leapp_repository
if: ${{ steps.leapp_repository_pr_regex_match.outputs.match != '' }}
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
repository: "oamg/leapp-repository"
ref: "refs/pull/${{ steps.leapp_repository_pr.outputs.leapp_repository_pr }}/head"
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 2702e93..70d624d 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -36,7 +36,7 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: '0'
- name: Set main to origin/main
--
2.51.1

View File

@ -1,538 +0,0 @@
# IMPORTANT: this is for the leapp-framework capability (it's not the real
# version of the leapp). The capability reflects changes in api and whatever
# functionality important from the point of repository. In case of
# incompatible changes, bump the major number and zero minor one. Otherwise
# bump the minor one.
# NOTE: we do not use this capability in the RHEL official rpms. But we provide
# it. In case of upstream, dependencies are set differently, but YUM is not
# capable enough to deal with them correctly all the time; we continue to use
# simplified deps in RHEL to ensure that YUM can deal with it.
%global framework_version 6.2
# IMPORTANT: everytime the requirements are changed, increment number by one
# - same for Provides in deps subpackage
%global framework_dependencies 6
# Do not build bindings for python3 for RHEL == 7
# # Currently Py2 is dead on Fedora and we don't have to support it. As well,
# # our current packaging is not prepared for Py2 & Py3 packages in the same
# # time. Instead of that, make Py2 and Py3 exclusive. Possibly rename macros..
%if 0%{?rhel} == 7
%define leapp_python 2
%define leapp_python_sitelib %{python2_sitelib}
%define leapp_python_name python2
%define leapp_py_build %{py2_build}
%define leapp_py_install %{py2_install}
%else
%define leapp_python 3
%define leapp_python_sitelib %{python3_sitelib}
%define leapp_python_name python3
%define leapp_py_build %{py3_build}
%define leapp_py_install %{py3_install}
# we have to drop the dependency on python(abi) completely on el8+ because
# of IPU (python abi is different between systems)
%global __requires_exclude ^python\\(abi\\) = 3\\..+|/usr/libexec/platform-python|/usr/bin/python.*
%endif
Name: leapp
Version: 0.20.0
Release: 2%{?dist}
Summary: OS & Application modernization framework
License: ASL 2.0
URL: https://oamg.github.io/leapp/
Source0: https://github.com/oamg/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# NOTE: Our packages must be noarch. Do no drop this in any way.
BuildArch: noarch
Requires: %{leapp_python_name}-%{name} = %{version}-%{release}
%{?python_disable_dependency_generator}
%if 0%{?rhel} == 7
# The leapp tool doesn't require the leapp-repository anymore. However for the
# compatibility purposes, we keep it here for RHEL 7 at least for a while.
# The dependency on leapp is expected to be set by packages providing the
# final functionality (e.g. conversion of system, in-place upgrade).
# IOW, people should look for rpms like leapp-convert or leapp-upgrade
# in future.
# Just ensure the leapp repository will be installed as well. Compatibility
# should be specified by the leapp-repository itself
Requires: leapp-repository
%endif # !fedora
# PATCHES HERE
# Patch0001: filename.patch
Patch0001: 0001-cli-Add-possibility-to-specify-aliases-for-CLI-optio.patch
Patch0002: 0002-Update-build-container-up-to-f42.patch
Patch0003: 0003-chore-deps-update-actions-checkout-action-to-v5.patch
%description
Leapp utility provides the possibility to use the Leapp framework via CLI.
The utility itself does not define any subcommands but "help". All leapp
subcommands are expected to be provided by other packages under a specific
directory. See the man page for more details.
##################################################
# snactor package
##################################################
%package -n snactor
Summary: %{summary}
Requires: %{leapp_python_name}-%{name} = %{version}-%{release}
%{?python_disable_dependency_generator}
%description -n snactor
Leapp's snactor tool - actor development environment utility for creating and
managing actor projects.
##################################################
# the library package (the framework itself)
##################################################
%package -n %{leapp_python_name}-%{name}
Summary: %{summary}
%{?python_provide:%python_provide %{leapp_python_name}-%{name}}
%if %{leapp_python} == 2
# RHEL 7 only
BuildRequires: python-devel
BuildRequires: python-setuptools
Conflicts: python3-%{name}
%else
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Conflicts: python2-%{name}
%{?python_disable_dependency_generator}
%define __provides_exclude_from ^.*$
%endif
Provides: leapp-framework = %{framework_version}
Requires: leapp-framework-dependencies = %{framework_dependencies}
%description -n %{leapp_python_name}-%{name}
Python %{leapp_python} leapp framework libraries.
##################################################
# DEPS package for external dependencies
##################################################
%package deps
Summary: Meta-package with system dependencies of %{name} package
# IMPORTANT: everytime the requirements are changed, increment number by one
# same for requirements in main package above
Provides: leapp-framework-dependencies = %{framework_dependencies}
##################################################
# Real requirements for the leapp HERE
##################################################
%if 0%{?rhel} && 0%{?rhel} == 7
Requires: python-six
Requires: python-setuptools
Requires: python-requests
Requires: PyYAML
%else # <> rhel 7
# for Fedora & RHEL 8+ deliver just python3 stuff
# NOTE: requirement on python3 refers to the general version of Python
# for the particular system (3.6 on RHEL 8, 3.9 on RHEL 9, ...)
# Do not use python(abi) deps, as on RHEL 8 it's provided by platform-python
# which is not helpful for us
Requires: python3
Requires: python3-six
Requires: python3-setuptools
Requires: python3-requests
Requires: python3-PyYAML
%endif
Requires: findutils
##################################################
# end requirements here
##################################################
%description deps
%{summary}
##################################################
# Prep
##################################################
%prep
%setup -n %{name}-%{version}
# APPLY REGISTERED PATCHES HERE
# %%patch -P 0001 -p1
%patch -P 0001 -p1
%patch -P 0002 -p1
%patch -P 0003 -p1
##################################################
# Build
##################################################
%build
%{leapp_py_build}
##################################################
# Install
##################################################
%install
install -m 0755 -d %{buildroot}%{_mandir}/man1
install -m 0644 -p man/snactor.1 %{buildroot}%{_mandir}/man1/
# This block of files was originally skipped for fedora. Adding now
install -m 0755 -d %{buildroot}%{_datadir}/leapp
install -m 0755 -d %{buildroot}%{_datadir}/leapp/report_schema
install -m 0644 -p report-schema-v110.json %{buildroot}%{_datadir}/leapp/report_schema/report-schema.json
install -m 0700 -d %{buildroot}%{_sharedstatedir}/leapp
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/actor_conf.d/
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/repos.d
install -m 0600 -d %{buildroot}%{_sysconfdir}/leapp/answers
# standard directory should have permission set to 0755, however this directory
# could contain sensitive data, hence permission for root only
install -m 0700 -d %{buildroot}%{_sysconfdir}/leapp/answers
# same for this dir; we need it for the frontend in cockpit
install -m 0700 -d %{buildroot}%{_localstatedir}/log/leapp
install -m 0644 etc/leapp/*.conf %{buildroot}%{_sysconfdir}/leapp
install -m 0644 -p man/leapp.1 %{buildroot}%{_mandir}/man1/
%{leapp_py_install}
##################################################
# leapp files
##################################################
%files
%doc README.md
%license COPYING
%{_mandir}/man1/leapp.1*
%config(noreplace) %{_sysconfdir}/leapp/leapp.conf
%config(noreplace) %{_sysconfdir}/leapp/logger.conf
%dir %{_sysconfdir}/leapp
%dir %{_sysconfdir}/leapp/actor_conf.d
%dir %{_sysconfdir}/leapp/answers
%dir %{_sysconfdir}/leapp/repos.d
%{_bindir}/leapp
%dir %{_sharedstatedir}/leapp
%dir %{_localstatedir}/log/leapp
%dir %{_datadir}/leapp/
%dir %{_datadir}/leapp/report_schema/
%{_datadir}/leapp/report_schema
%{leapp_python_sitelib}/leapp/cli
##################################################
# snactor files
##################################################
%files -n snactor
%license COPYING
%{leapp_python_sitelib}/leapp/snactor
%{_mandir}/man1/snactor.1*
%{_bindir}/snactor
##################################################
# python[23]-leapp files
##################################################
%files -n %{leapp_python_name}-%{name}
%license COPYING
%{leapp_python_sitelib}/*
# These are delivered in other subpackages
%exclude %{leapp_python_sitelib}/leapp/cli
%exclude %{leapp_python_sitelib}/leapp/snactor
%files deps
# no files here
%changelog
* Thu Nov 13 2025 Karolina Kula <kkula@redhat.com> - 0.20.0-2
- Bump leapp-framework to 6.2
- Add possibility to specify aliases for CLI option
- Resolves: RHEL-128270
* Thu Aug 14 2025 Karolina Kula <kkula@redhat.com> - 0.20.0-1
- Rebase to new upstream 0.20.0
- Resolves: RHEL-67625
* Wed May 14 2025 Petr Stodulka <pstodulk@redhat.com> - 0.19.0-3
- Rebuild
* Tue May 13 2025 Petr Stodulka <pstodulk@redhat.com> - 0.19.0-2
- Bump leapp-framework to 6.1
- Create the /var/lib/leapp directory automatically if missing
- Recognize configuration files with the .yaml suffix only
- Fix CLI: allow to set falsy values as default for leapp's command options
- Resolves: RHEL-86206, RHEL-54382
* Fri Feb 14 2025 Petr Stodulka <pstodulk@redhat.com> - 0.19.0-1
- Rebase to new upstream version 0.19.0
- Add possibility to use a specified execution context for snactor run in an existing leapp.db
- Increase limits on the number of opened file descriptors and maximum size
of manipulated files when running leapp
- Resolves: RHEL-67622, RHEL-79411
* Mon Nov 18 2024 Petr Stodulka <pstodulk@redhat.com> - 0.18.0-2
- Bump leapp-framework to 6.0
- Bump leapp-framework-dependencies to 6
- Require python3-PyYAML
- [Technical preview] Introduce configurability for leapp actors
- Resolves: RHEL-67622
* Fri Aug 16 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.18.0-1
- Rebase to new upstream version 0.18.0.
- Properly close file descriptors for executed shell commands.
- Resolves: RHEL-27848
* Wed Jul 24 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.17.0-3
- Fix broken leapp db queries on rerun
- Port all code to be Python-3.12 compatible.
- Resolves: RHEL-40363
* Mon May 13 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.17.0-2
- Minor improvement of the summary overview in the console output.
- Store metadata about the LEAPP plugins inside leapp audit db.
- Prevent leapp from starting if an instance is already runnning.
- Resolves: RHEL-27848, RHEL-25407
* Tue Feb 13 2024 Toshio Kuratomi <toshio@fedoraproject.org> - - 0.17.0-1
- Rebase to upstream version v0.17.0.
- Resolves: RHEL-21451
* Fri Jan 12 2024 Petr Stodulka <pstodulk@redhat.com> - 0.16.0-3
- Add external links to the text version of the generated report file
- Resolves: RHEL-21451
* Wed Aug 23 2023 Petr Stodulka <pstodulk@redhat.com> - 0.16.0-2
- Bump leapp-framework to 5.0
- Resolves: #2223312
* Wed Aug 23 2023 Petr Stodulka <pstodulk@redhat.com> - 0.16.0-1
- Rebase to v0.16.0
- Bump leapp-framework to 5.0
- Improve the report overview to include also information about errors
- Distinguish errors from valid reports in the generated txt report file
- Resolves: #2223312
* Mon Jul 17 2023 Petr Stodulka <pstodulk@redhat.com> - 0.15.1-2
- Bump leapp-framework to 4.0
- Improve the report summary output to make it more visible
- Fix processing data in remediation instructions with non-ascii characters
- Fix creation of Dialog for Component without choices
- Store tracebacks from actors in leapp.db
- Resolves: #2223312
* Tue Feb 21 2023 Petr Stodulka <pstodulk@redhat.com> - 0.15.1-1
- Rebase to v0.15.1
- Change DAC for /var/lib/leapp to 0700 to make it accessible for root only
- Propagate error messages from leapp actors to the main leapp process
- Prevent unicode errors when printing error messages
- Resolves: rhbz#2162710
* Thu Sep 08 2022 Petr Stodulka <pstodulk@redhat.com> - 0.15.0-2
- Fix the check of missing required answers
- Resolves: rhbz#2124332
* Wed Aug 24 2022 Petr Stodulka <pstodulk@redhat.com> - 0.15.0-1
- Rebase to v0.15.0
- Bump leapp-framework to 3.1
- Deprecate `reporting.(Tags|Flags)` replaced by `reporting.Groups`
- Fix crashes when processing invalid FQDNs
- Fix the error msg when a leapp CLI command does not exist
- Introduce new report JSON schema v1.2.0 (default: 1.1.0)
- Resolves: rhbz#2090992, rhbz#2106065
* Mon Mar 14 2022 Petr Stodulka <pstodulk@redhat.com> - 0.14.0-1
- Rebase to v0.14.0
- Bump leapp-framework to 2.2
- Bump leapp-framework-dependencies to 5
- Add depency on python3 (distribution python)
- Added possibility to specify the report format version
- Check the answerfile upon loading and prevent creation of invalid answerfile
- Dialogs: print the reason field for question in the answerfile
- Fix the JSON serialization in Dialogs on Python3
- Introduced new functions in the leapp standard library
- Updated man page
- Resolves: rhbz#1997075
* Thu Sep 30 2021 Petr Stodulka <pstodulk@redhat.com> - 0.13.0-10
- Rebase to v0.13.0
- Bump the provided leapp-framework capability to 2.0
- The commands for the leapp tool (e.g. preupgrade, upgrade) are now
defined in the leapp-repository component
- The leapp tool scans the available CLI commands dynamically
- First build for the IPU 8 -> 9
- Resolves: #1997075
* Fri Apr 23 2021 Petr Stodulka <pstodulk@redhat.com> - 0.12.1-1
- Rebase to v0.12.1
- Added rerun command for experimental purposes to be able to re-run manually
the last phase when needed (experimental)
- Resolves: #1952885
* Thu Feb 04 2021 Dominik Rehak <drehak@redhat.com> - 0.12.0-1
- Rebase to v0.12.0
- Bump leapp-framework capability to 1.4
- Add JSON schema of leapp reports for validation
- Add a stable report identifier for each generated report
- Resolves: #1915508
* Wed Oct 21 2020 Dominik Rehak <drehak@redhat.com> - 0.11.1-1
- Rebase to v0.11.1
- Fix conversion of deprecation messages to reports
- Fix various issues regarding suppressing of deprecation
- Remove pytest residuals in spec file
- Update documentation and manpages
- Resolves: #1887913
* Tue Aug 18 2020 Michal Bocek <mbocek@redhat.com> - 0.11.0-1
- Rebase to v0.11.0
- Bump leapp-framework capability to 1.3
- Preserve verbose/debug options during the whole upgrade workflow
- Print the informative error block to the STDOUT instead of STDERR
- Add new reporting tags: `PUBLIC_CLOUD` and `RHUI`
- Add the possibility to skip actor discovery to improve performance of tests when an actor context is injected directly
- Introduce the `deprecated` and `suppress_deprecation` decorators to support the deprecation process
- Store dialog answers in the leapp.db
- Update and improve man pages
- Raising a missing exception with tests failing under py3
- Adde the --actor-config option to `snactor run` to specify a workflow configuration model that should be consumed by actors
- The `call` function has been improved to be working on MacOS
- Known issue: the `suppress_deprecation` decorator causes a traceback in certain cases
* Thu Jul 30 2020 Michal Bocek <mbocek@redhat.com> - 0.10.0-3
- A temporary build to run TPS tests against
- Relates: #1860373
* Mon Apr 20 2020 Michal Bocek <mbocek@redhat.com> - 0.10.0-2
- Make debug/verbose setting persistent across the upgrade
- Relates: #1821712
* Thu Apr 16 2020 Petr Stodulka <pstodulk@redhat.com> - 0.10.0-1
- Rebase to v0.10.0
- Add the --enablerepo option for Leapp to use an existing custom yum/dnf
repository during the upgrade
- Add the --no-rhsm option for Leapp for use without subscription-manager
(#622)
- Add `leapp answer` to answer Dialog questions in CLI (#592)
- Add `stdin` and `encoding` parameters in the run function (#583, #595)
- Add new dependency on python-requests
- Add the DESKTOP tag for the leapp report (#612)
- Display a warning when leapp is used in an unsupported (devel/testing) mode
(#577)
- Drop dependency on python-jinja2
- Error messages are now part of the preupgrade report
- Fix json export capabilities using serialization (#598)
- Introduce DialogModel that could be processed by actors to add related
information into the report (#589)
- Introduce Workflow API (#618)
- Move all leapp and snactor files into related rpms instead of python2-leapp
(#591)
- Print errors on stdout in pretty format (#593)
- Report inhibitors separately from errors on stdout (#620)
- Show progress in non-verbose executions (#621)
- The verbosity options (--verbose | --debug) are available for leapp commands
as well
- Resolves: #1821712
* Thu Oct 24 2019 Petr Stodulka <pstodulk@redhat.com> - 0.9.0-1
- Rebase to v0.9.0
- Add sanity-check command for snactor
- Add the /var/log/leapp directory to the leapp RPM
- Handle string types in compatible way
- Introduce answerfile generation & usage
- Introduce report composability, remove renders (#543)
- Show help message for proper subcommand of leapp
- Stop adding 'process-end' audit entry (#538)
- Various fixes in displaying of generated reports
- Resolves: #1753583
* Wed Jul 24 2019 Petr Stodulka <pstodulk@redhat.com> - 0.8.1-1
- Rebase to v0.8.1
Relates: #1723113
- Fix issue undefined ReportReference
* Mon Jul 15 2019 Petr Stodulka <pstodulk@redhat.com> - 0.8.0-1
- Rebase to v0.8.0
Relates: #1723113
- add the preupgrade subcommand to be able check system and generate report for
upgrade without run of the upgrade itself
- add checks of arguments for cmdline parameters
- log output of commands to logfile (#520)
- avoid spurious output about missing logger
- exit non-zero on unhandled exceptions and errors
- fix actor library loading, so libraries do not have to be imported in
lexicographical order
- log on the ERROR level by default instead of DEBUG
- create a dynamic configuration phase that allows creation of configuration
for repository workflow
- add JSON report generation
- stdlib: add option to `run()` to ignore exit code
* Sun Jun 23 2019 Vojtech Sokol <vsokol@redhat.com> - 0.7.0-3
- Rebuild
Resolves: #1723113
* Mon Apr 29 2019 Petr Stodulka <pstodulk@redhat.com> - 0.7.0-2
- load checkpoints ordered by 'id' instead of timestamp
Relates: #1636478
* Wed Apr 17 2019 Vojtech Sokol <vsokol@redhat.com> - 0.7.0-1
- Rebase to v0.7.0
Relates: #1636478
- add the ability to stop and resume workflow in any phase
- fix incompatibilities with Python3
- store logs in one place and support archiving of previous logs
- fix handling of Unicode in the run function of leapp stdlib
* Mon Apr 08 2019 Vojtech Sokol <vsokol@redhat.com> - 0.6.0-2
- Fix specfile
Relates: #1636478
* Mon Apr 08 2019 Vojtech Sokol <vsokol@redhat.com> - 0.6.0-1
- Rebase to v0.6.0
Relates: #1636478
- snactor
- `repo new` subcommand: display message if directory with same name exists
- `discover subcommand`: fix wrong path
- `workflow run` subcommand: introduce `--save-output` parameter
- fix cryptic message without user repo config
- show global repos in repo list
- fix trace on topic creation
- stdlib
- make api directly available in stdlib
- external program exec function - audit data generation and storage
- models
- introduction of the JSON field type
- new debug and verbose modes
- new reporting capabilities
- change default loglevel to ERROR
* Thu Jan 24 2019 Petr Stodulka <pstodulk@redhat.com> - 0.5.0-1
- Rebase to v0.5.0
Relates: #1636478
- Models has been refactored to be more comprehensible and reliable
- Introduced standard library
- Introduced the actor convenience api for actors and repository libraries
- Added localization support
- Extended serialization support
- Added exception to be able to stop actor execution
- Packaging: Move system dependencies into the metapackage
* Fri Nov 23 2018 Petr Stodulka <pstodulk@redhat.com> - 0.4.0-1
- Rebase to v0.4.0
Relates: #1636478
* Wed Nov 07 2018 Petr Stodulka <pstodulk@redhat.com> - 0.3.1-1
- Rebase to v0.3.1
Relates: #1636478
* Wed Nov 07 2018 Petr Stodulka <pstodulk@redhat.com> - 0.3-1
- Initial rpm
Resolves: #1636478

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

292
leapp.spec Normal file
View File

@ -0,0 +1,292 @@
# IMPORTANT: this is for the leapp-framework capability (it's not the real
# version of the leapp). The capability reflects changes in api and whatever
# functionality important from the point of repository. In case of
# incompatible changes, bump the major number and zero minor one. Otherwise
# bump the minor one.
# NOTE: we do not use this capability in the RHEL official rpms. But we provide
# it. In case of upstream, dependencies are set differently, but YUM is not
# capable enough to deal with them correctly all the time; we continue to use
# simplified deps in RHEL to ensure that YUM can deal with it.
%global framework_version 6.1
# IMPORTANT: everytime the requirements are changed, increment number by one
# - same for Provides in deps subpackage
%global framework_dependencies 6
# Do not build bindings for python3 for RHEL == 7
# # Currently Py2 is dead on Fedora and we don't have to support it. As well,
# # our current packaging is not prepared for Py2 & Py3 packages in the same
# # time. Instead of that, make Py2 and Py3 exclusive. Possibly rename macros..
%if 0%{?rhel} == 7
%define leapp_python 2
%define leapp_python_sitelib %{python2_sitelib}
%define leapp_python_name python2
%define leapp_py_build %{py2_build}
%define leapp_py_install %{py2_install}
%else
%define leapp_python 3
%define leapp_python_sitelib %{python3_sitelib}
%define leapp_python_name python3
%define leapp_py_build %{py3_build}
%define leapp_py_install %{py3_install}
# we have to drop the dependency on python(abi) completely on el8+ because
# of IPU (python abi is different between systems)
%global __requires_exclude ^python\\(abi\\) = 3\\..+|/usr/libexec/platform-python|/usr/bin/python.*
%endif
Name: leapp
Version: 0.19.0
Release: 2%{?dist}
Summary: OS & Application modernization framework
License: ASL 2.0
URL: https://oamg.github.io/leapp/
Source0: https://github.com/oamg/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# NOTE: Our packages must be noarch. Do no drop this in any way.
BuildArch: noarch
Requires: %{leapp_python_name}-%{name} = %{version}-%{release}
%{?python_disable_dependency_generator}
%if 0%{?rhel} == 7
# The leapp tool doesn't require the leapp-repository anymore. However for the
# compatibility purposes, we keep it here for RHEL 7 at least for a while.
# The dependency on leapp is expected to be set by packages providing the
# final functionality (e.g. conversion of system, in-place upgrade).
# IOW, people should look for rpms like leapp-convert or leapp-upgrade
# in future.
# Just ensure the leapp repository will be installed as well. Compatibility
# should be specified by the leapp-repository itself
Requires: leapp-repository
%endif # !fedora
# PATCHES HERE
# Patch0001: filename.patch
Patch0001: 0001-CI-packit-update-e2e-tests-to-reflect-current-IPU-pa.patch
Patch0002: 0002-configs-recognize-only-the-.yaml-file-extension.patch
Patch0003: 0003-Handle-case-when-db-directory-is-missing.patch
Patch0004: 0004-Fix-CLI-allow-to-set-falsy-values-as-default.patch
Patch0005: 0005-chore-deps-update-sclorg-testing-farm-as-github-acti.patch
Patch0006: 0006-Remove-7to8-CI-tests.patch
Patch0007: 0007-Update-.packit.yaml-to-fix-failing-rhui-job.patch
%description
Leapp utility provides the possibility to use the Leapp framework via CLI.
The utility itself does not define any subcommands but "help". All leapp
subcommands are expected to be provided by other packages under a specific
directory. See the man page for more details.
##################################################
# snactor package
##################################################
%package -n snactor
Summary: %{summary}
Requires: %{leapp_python_name}-%{name} = %{version}-%{release}
%{?python_disable_dependency_generator}
%description -n snactor
Leapp's snactor tool - actor development environment utility for creating and
managing actor projects.
##################################################
# the library package (the framework itself)
##################################################
%package -n %{leapp_python_name}-%{name}
Summary: %{summary}
%{?python_provide:%python_provide %{leapp_python_name}-%{name}}
%if %{leapp_python} == 2
# RHEL 7 only
BuildRequires: python-devel
BuildRequires: python-setuptools
Conflicts: python3-%{name}
%else
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Conflicts: python2-%{name}
%{?python_disable_dependency_generator}
%define __provides_exclude_from ^.*$
%endif
Provides: leapp-framework = %{framework_version}
Requires: leapp-framework-dependencies = %{framework_dependencies}
%description -n %{leapp_python_name}-%{name}
Python %{leapp_python} leapp framework libraries.
##################################################
# DEPS package for external dependencies
##################################################
%package deps
Summary: Meta-package with system dependencies of %{name} package
# IMPORTANT: everytime the requirements are changed, increment number by one
# same for requirements in main package above
Provides: leapp-framework-dependencies = %{framework_dependencies}
##################################################
# Real requirements for the leapp HERE
##################################################
%if 0%{?rhel} && 0%{?rhel} == 7
Requires: python-six
Requires: python-setuptools
Requires: python-requests
Requires: PyYAML
%else # <> rhel 7
# for Fedora & RHEL 8+ deliver just python3 stuff
# NOTE: requirement on python3 refers to the general version of Python
# for the particular system (3.6 on RHEL 8, 3.9 on RHEL 9, ...)
# Do not use python(abi) deps, as on RHEL 8 it's provided by platform-python
# which is not helpful for us
Requires: python3
Requires: python3-six
Requires: python3-setuptools
Requires: python3-requests
Requires: python3-PyYAML
%endif
Requires: findutils
##################################################
# end requirements here
##################################################
%description deps
%{summary}
##################################################
# Prep
##################################################
%prep
%setup -n %{name}-%{version}
# APPLY REGISTERED PATCHES HERE
# %%patch -P 0001 -p1
%patch -P 0001 -p1
%patch -P 0002 -p1
%patch -P 0003 -p1
%patch -P 0004 -p1
%patch -P 0005 -p1
%patch -P 0006 -p1
%patch -P 0007 -p1
##################################################
# Build
##################################################
%build
%{leapp_py_build}
##################################################
# Install
##################################################
%install
install -m 0755 -d %{buildroot}%{_mandir}/man1
install -m 0644 -p man/snactor.1 %{buildroot}%{_mandir}/man1/
# This block of files was originally skipped for fedora. Adding now
install -m 0755 -d %{buildroot}%{_datadir}/leapp
install -m 0755 -d %{buildroot}%{_datadir}/leapp/report_schema
install -m 0644 -p report-schema-v110.json %{buildroot}%{_datadir}/leapp/report_schema/report-schema.json
install -m 0700 -d %{buildroot}%{_sharedstatedir}/leapp
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/actor_conf.d/
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/repos.d
install -m 0600 -d %{buildroot}%{_sysconfdir}/leapp/answers
# standard directory should have permission set to 0755, however this directory
# could contain sensitive data, hence permission for root only
install -m 0700 -d %{buildroot}%{_sysconfdir}/leapp/answers
# same for this dir; we need it for the frontend in cockpit
install -m 0700 -d %{buildroot}%{_localstatedir}/log/leapp
install -m 0644 etc/leapp/*.conf %{buildroot}%{_sysconfdir}/leapp
install -m 0644 -p man/leapp.1 %{buildroot}%{_mandir}/man1/
%{leapp_py_install}
##################################################
# leapp files
##################################################
%files
%doc README.md
%license COPYING
%{_mandir}/man1/leapp.1*
%config(noreplace) %{_sysconfdir}/leapp/leapp.conf
%config(noreplace) %{_sysconfdir}/leapp/logger.conf
%dir %{_sysconfdir}/leapp
%dir %{_sysconfdir}/leapp/actor_conf.d
%dir %{_sysconfdir}/leapp/answers
%dir %{_sysconfdir}/leapp/repos.d
%{_bindir}/leapp
%dir %{_sharedstatedir}/leapp
%dir %{_localstatedir}/log/leapp
%dir %{_datadir}/leapp/
%dir %{_datadir}/leapp/report_schema/
%{_datadir}/leapp/report_schema
%{leapp_python_sitelib}/leapp/cli
##################################################
# snactor files
##################################################
%files -n snactor
%license COPYING
%{leapp_python_sitelib}/leapp/snactor
%{_mandir}/man1/snactor.1*
%{_bindir}/snactor
##################################################
# python[23]-leapp files
##################################################
%files -n %{leapp_python_name}-%{name}
%license COPYING
%{leapp_python_sitelib}/*
# These are delivered in other subpackages
%exclude %{leapp_python_sitelib}/leapp/cli
%exclude %{leapp_python_sitelib}/leapp/snactor
%files deps
# no files here
%changelog
* Tue May 13 2025 Petr Stodulka <pstodulk@redhat.com> - 0.19.0-2
- Bump leapp-framework to 6.1
- Create the /var/lib/leapp directory automatically if missing
- Recognize configuration files with the .yaml suffix only
- Fix CLI: allow to set falsy values as default for leapp's command options
- Resolves: RHEL-86225
* Fri Feb 14 2025 Petr Stodulka <pstodulk@redhat.com> - 0.19.0-1
- Rebase to new upstream version 0.19.0
- Add possibility to use a specified execution context for snactor run in an existing leapp.db
- Increase limits on the number of opened file descriptors and maximum size
of manipulated files when running leapp
- Resolves: RHEL-57042
* Mon Nov 18 2024 Matej Matuska <mmatuska@redhat.com> - 0.18.0-4
- Bump leapp-framework to 6.0
- Bump leapp-framework-dependencies to 6
- Require python3-PyYAML
- [Technical preview] Introduce configurability for leapp actors
- Resolves: RHEL-57042
* Thu Sep 19 2024 Petr Stodulka <pstodulk@redhat.com> - 0.18.0-3
- Rebuild to apply changes for gating
- Resolves: RHEL-57042
* Thu Sep 12 2024 Petr Stodulka <pstodulk@redhat.com> - 0.18.0-2
- Initial build for el9
- Resolves: RHEL-57042

66
plans/tier0.fmf Normal file
View File

@ -0,0 +1,66 @@
# These test plans were created manually based on information taken from
# https://gitlab.cee.redhat.com/oamg/leapp-tests/-/blob/main/config.yaml. The tmt definitions can be simplified, once
# https://github.com/teemtee/tmt/issues/1770 is implemented.
summary: Internal Tier0 tests
environment:
SOURCE_RELEASE: '9.7'
TARGET_RELEASE: '10.1'
context:
distro: rhel-9.7
distro_target: rhel-10.1
adjust:
enabled: false
when: distro == centos-stream-9
/customrepos_upgrade_happy_path:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/destructive/customrepos/basic_upgrade/upgrade_happy_path
ref: main
/oamg3661_two_reboots:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/destructive/customrepos/oamg/oamg3661_two_reboots
ref: main
/oamg9299_devtmpfs_in_fstab:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/destructive/customrepos/oamg/oamg9299_devtmpfs_in_fstab
ref: main
/rhsm_upgrade_happy_path:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/destructive/rhsm/upgrade_happy_path
ref: main
/customrepos_tier0only:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/nondestructive/customrepos/tier0only
ref: main
/none_tier0only:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/nondestructive/none/tier0only
ref: main
/rhsm_tier0only:
plan:
import:
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
name: /plans/nondestructive/rhsm/tier0only
ref: main

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (leapp-0.19.0.tar.gz) = 849ba031c5093aeaefda8e89aa756b07e5cc508dc9c9d9e88a745396fe136f23fde244aef7157364d1008a20c5916c2a5078a4e2ef44a20650e79178331ad9b1