Skip to content

Suggestions on Python processing of cloud.spec file in packaging directory #4513

Closed

Description

@saliven1970
ISSUE TYPE
  • Improvement Request
COMPONENT NAME

packaging

CLOUDSTACK VERSION

4.15

CONFIGURATION

N/A otherwise

OS / ENVIRONMENT

CentOS-8.2

SUMMARY

In the packaging\centos7 and packaging\centos8 directories, there are many problems about Python processing in the cloud.spec file.

  1. python2 is used in the current compilation environment, while python3 is used in some running environments, which causes confusion. It is suggested that package dependency of the running environment should not be handled in the compilation environment, and the basic environmental requirements should be explained in the installation document of the running environment. Considering the transitional period between two major versions of python, it is recommended to use python2 only when compiling and python3 as much as possible in the running environment.
  2. It is not recommended to download the package of python3 running environment and put it in RPM file at compile time, but to run “pip install " at install time, because these installation packages are updated frequently and should not be limited to a lower version by cloudstack. At the same time, because of the existence of mirror image, it is more appropriate for pip to download from the mirror image site faster.
  3. It is not recommended to add dependencies such as Requires: python36-libvirt, Requires: python, Requires: python3, and Requires: python3-pip to cloud.spec. At present, Python is used for compilation and installation, or tar package installation directly, instead of RPM installation. After I cancel these dependencies, I compile smoothly. If I add these, I have to install python2 and python3 at the same time using RPM, which is easy to cause conflicts.

In addition, it is suggested that, when the two major versions of python are used together, the commands previously used in python2 should be modified instead of python commands, so as to be clearly distinguished from python3.

Add the compilation environment python processing way:
Operating system: CentOS-8.2
Python2 installation uses yum install python2
Python3.7.9 is compiled with source code and installed in python3.7 under the home directory.

cloud.spec.zip

1606899306

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

Activity

  1. DaanHoogland commented on Dec 2, 2020

    @DaanHoogland
    Contributor

    @saliven1970 thanks for the input, we have several locations where transition from python2 to python3 is ongoing see #3195 if you have any experience on the transition in any area such as packaging input is welcome (are you preparing a pr, or do you have code changes to sugest?)
    I'll add a ref back to this in that easy querying.

  2. added this to the 4.16.0.0 milestone on Feb 1, 2021
  3. self-assigned this
    on Feb 1, 2021
  4. saliven1970 commented on Mar 2, 2021

    @saliven1970
    Author

    Marvin and tests and SystemVM scripts have all been migrated to python3,this issus can be closed

  5. DaanHoogland commented on Mar 2, 2021

    @DaanHoogland
    Contributor

    @saliven1970 I'm not sure I followed all your suggestions, and also component tests are not all passing yet, but the larger part is done.

  6. removed their assignment
    on Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions