Giter Site home page Giter Site logo

Comments (3)

andrewlukoshko avatar andrewlukoshko commented on August 24, 2024 1

@anderbubble original Leapp doesn't support CentOS.
You can try ELevate project based on Leapp but with necessary patches to support non-RHEL OS
https://wiki.almalinux.org/elevate/

from leapp-repository.

anderbubble avatar anderbubble commented on August 24, 2024

Here's the patch I was working on as an experiment, in case it's useful information.

diff --git a/commands/command_utils.py b/commands/command_utils.py
index 338978d..5606cd8 100644
--- a/commands/command_utils.py
+++ b/commands/command_utils.py
@@ -65,6 +65,13 @@ def get_upgrade_flavour():
     return LEAPP_UPGRADE_FLAVOUR_DEFAULT
 
 
+def get_source_version():
+    if 'LEAPP_SOURCE_VERSION' in os.environ:
+        return os.environ['LEAPP_SOURCE_VERSION']
+    else:
+        return get_os_release_version_id('/etc/os-release')
+
+
 def get_os_release_version_id(filepath):
     """
     Retrieve data about System OS release from provided file.
@@ -101,13 +108,13 @@ def get_supported_target_versions(flavour=get_upgrade_flavour()):
     The default value for `flavour` is `default`.
     """
 
-    current_version_id = get_os_release_version_id('/etc/os-release')
-    target_versions = get_target_versions_from_config(current_version_id, flavour)
+    source_version = get_source_version()
+    target_versions = get_target_versions_from_config(source_version, flavour)
     if not target_versions:
         # If we cannot find a particular major.minor version in the map,
         # we fallback to pick a target version just based on a major version.
         # This can happen for example when testing not yet released versions
-        major_version = get_major_version(current_version_id)
+        major_version = get_major_version(source_version)
         target_versions = get_target_versions_from_config(major_version, flavour)
 
     return target_versions
diff --git a/commands/upgrade/util.py b/commands/upgrade/util.py
index b52da25..3871d1a 100644
--- a/commands/upgrade/util.py
+++ b/commands/upgrade/util.py
@@ -221,9 +221,9 @@ def prepare_configuration(args):
     os.environ['LEAPP_UPGRADE_PATH_TARGET_RELEASE'] = target_version
     os.environ['LEAPP_UPGRADE_PATH_FLAVOUR'] = flavor
 
-    current_version = command_utils.get_os_release_version_id('/etc/os-release')
+    source_version = command_utils.get_source_version()
     os.environ['LEAPP_IPU_IN_PROGRESS'] = '{source}to{target}'.format(
-        source=command_utils.get_major_version(current_version),
+        source=command_utils.get_major_version(source_version),
         target=command_utils.get_major_version(target_version)
     )
 

from leapp-repository.

fernflower avatar fernflower commented on August 24, 2024

@anderbubble As Andrew has stated above, leapp does not support CentOS and there are no plans to change that. Please look into ELevate if you need CentOS upgrades.

from leapp-repository.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.