diff --git a/leapp-0003-add-disablerepo-option-to-upgrade-kernel-to-RHCK.patch b/leapp-0003-add-disablerepo-option-to-upgrade-kernel-to-RHCK.patch new file mode 100644 index 0000000000000000000000000000000000000000..0b72fb1e061c73ddb41e913d2abaefedf320cc6e --- /dev/null +++ b/leapp-0003-add-disablerepo-option-to-upgrade-kernel-to-RHCK.patch @@ -0,0 +1,43 @@ +From 5f100bef27b052e2626cbf3fd923bcf8dcc72fe4 Mon Sep 17 00:00:00 2001 +From: mgb01105731 +Date: Fri, 9 Sep 2022 17:44:50 +0800 +Subject: [PATCH] add --disablerepo option to upgrade kernel to RHCK + +--- + leapp/cli/upgrade/__init__.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/leapp/cli/upgrade/__init__.py b/leapp/cli/upgrade/__init__.py +index d338b8b..af8cfe4 100644 +--- a/leapp/cli/upgrade/__init__.py ++++ b/leapp/cli/upgrade/__init__.py +@@ -171,6 +171,8 @@ def prepare_configuration(args): + os.environ['LEAPP_NO_RHSM'] = os.getenv('LEAPP_DEVEL_SKIP_RHSM', '0') + if args.enablerepo: + os.environ['LEAPP_ENABLE_REPOS'] = ','.join(args.enablerepo) ++ if args.disablerepo: ++ os.environ['LEAPP_DISABLE_REPOS'] = ','.join(args.disablerepo) + configuration = { + 'debug': os.getenv('LEAPP_DEBUG', '0'), + 'verbose': os.getenv('LEAPP_VERBOSE', '0'), +@@ -204,6 +206,8 @@ def process_whitelist_experimental(repositories, workflow, configuration, logger + @command_opt('removeactor',action='append',metavar='ActorName',help='Remove specified actor') + @command_opt('enablerepo', action='append', metavar='', + help='Enable specified repository. Can be used multiple times.') ++@command_opt('disablerepo', action='append', metavar='', ++ help='Disable repository.') + def upgrade(args): + skip_phases_until = None + context = str(uuid.uuid4()) +@@ -278,6 +282,8 @@ def upgrade(args): + @command_opt('removeactor',action='append',metavar='ActorName',help='Remove specified actor') + @command_opt('enablerepo', action='append', metavar='', + help='Enable specified repository. Can be used multiple times.') ++@command_opt('disablerepo', action='append', metavar='', ++ help='Disable repository.') + def preupgrade(args): + context = str(uuid.uuid4()) + cfg = get_config() +-- +2.19.2 + diff --git a/leapp-install.sh b/leapp-install.sh index 9cba9cb317d326be349368586fca0eb69b6b7756..08c4483a76bf2a164f63c973b37bd07b4810c3e6 100644 --- a/leapp-install.sh +++ b/leapp-install.sh @@ -1,6 +1,6 @@ #! /bin/bash -deps_list=(python-six python-setuptools python-requests findutils) +deps_list=(python-six python-setuptools python-requests findutils patch) for dep in ${deps_list[@]} do rpm -q $dep > /dev/null diff --git a/leapp.spec b/leapp.spec index ca4226135a082d9f5b3056f7e988f196345e4e0e..3659fcbce8c17b9e848466d37b072cea46038f40 100644 --- a/leapp.spec +++ b/leapp.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 # 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 @@ -38,6 +38,7 @@ BuildArch: noarch Patch0001: leapp-0001-add-remove-actor-parament.patch Patch0002: leapp-0002-add-command-no-rhsm_skip.patch +Patch0003: leapp-0003-add-disablerepo-option-to-upgrade-kernel-to-RHCK.patch %if !0%{?fedora} %if %{with python3} @@ -158,6 +159,7 @@ Python 3 leapp framework libraries. %setup -n %{name}-%{version} %patch0001 -p1 %patch0002 -p1 +%patch0003 -p1 ################################################## # Build @@ -278,6 +280,9 @@ rm -f %{buildroot}/%{_bindir}/leapp # no files here %changelog +* Tue Sep 13 2022 mgb01105731 - 0.12.0-1.0.2 +- patch: add disablerepo option to upgrade kernel to RHCK + * Tue Jun 14 2022 Weitao Zhou - 0.12.0-1.0.1 - patch: add parament remove-actor (yuki1109) - patch: add command no rhsm_skip (FrankCui713)