forked from rpms/leapp
Compare commits
No commits in common. "c10s" and "c8" have entirely different histories.
@ -1 +0,0 @@
|
||||
1
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/leapp-0.18.0.tar.gz
|
||||
SOURCES/leapp-0.20.0.tar.gz
|
||||
|
||||
1
.leapp.metadata
Normal file
1
.leapp.metadata
Normal file
@ -0,0 +1 @@
|
||||
a9b310b4ba20d6ce8f3e4e261035f5f0fcf553d7 SOURCES/leapp-0.20.0.tar.gz
|
||||
@ -0,0 +1,120 @@
|
||||
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
|
||||
|
||||
70
SOURCES/0002-Update-build-container-up-to-f42.patch
Normal file
70
SOURCES/0002-Update-build-container-up-to-f42.patch
Normal file
@ -0,0 +1,70 @@
|
||||
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
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
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
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
# 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 5.0
|
||||
%global framework_version 6.2
|
||||
|
||||
# IMPORTANT: everytime the requirements are changed, increment number by one
|
||||
# - same for Provides in deps subpackage
|
||||
%global framework_dependencies 5
|
||||
%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,
|
||||
@ -36,8 +36,8 @@
|
||||
%endif
|
||||
|
||||
Name: leapp
|
||||
Version: 0.18.0
|
||||
Release: 1%{?dist}
|
||||
Version: 0.20.0
|
||||
Release: 2%{?dist}
|
||||
Summary: OS & Application modernization framework
|
||||
|
||||
License: ASL 2.0
|
||||
@ -65,6 +65,9 @@ Requires: leapp-repository
|
||||
|
||||
# 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.
|
||||
@ -130,6 +133,7 @@ Provides: leapp-framework-dependencies = %{framework_dependencies}
|
||||
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
|
||||
@ -140,6 +144,7 @@ Requires: python3
|
||||
Requires: python3-six
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-requests
|
||||
Requires: python3-PyYAML
|
||||
%endif
|
||||
Requires: findutils
|
||||
##################################################
|
||||
@ -158,7 +163,10 @@ Requires: findutils
|
||||
|
||||
|
||||
# APPLY REGISTERED PATCHES HERE
|
||||
|
||||
# %%patch -P 0001 -p1
|
||||
%patch -P 0001 -p1
|
||||
%patch -P 0002 -p1
|
||||
%patch -P 0003 -p1
|
||||
|
||||
##################################################
|
||||
# Build
|
||||
@ -181,6 +189,7 @@ 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
|
||||
@ -205,6 +214,7 @@ install -m 0644 -p man/leapp.1 %{buildroot}%{_mandir}/man1/
|
||||
%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
|
||||
@ -241,6 +251,39 @@ install -m 0644 -p man/leapp.1 %{buildroot}%{_mandir}/man1/
|
||||
# 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.
|
||||
@ -1,7 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
# 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: '8.10'
|
||||
TARGET_RELEASE: '9.5'
|
||||
|
||||
context:
|
||||
distro: rhel-8.10
|
||||
distro_target: rhel-9.5
|
||||
|
||||
adjust:
|
||||
enabled: false
|
||||
when: distro == centos-stream-8
|
||||
|
||||
/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
|
||||
|
||||
/oamg9094_datainrpm_predownload_then_install:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.cee.redhat.com/oamg/leapp-tests
|
||||
name: /plans/destructive/customrepos/oamg/oamg9094_datainrpm_predownload_then_install
|
||||
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
|
||||
Loading…
Reference in New Issue
Block a user