Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  Migrating to python3.12 for AIX Toolbox python3 ecosystem

    Posted 6 days ago
    Edited by PRAJWAL B MEHENDARKAR 6 days ago

    This post gives an information on what changes will be introduced and what steps users have to take when we upload packages built with python3.12 for which python3.12 will be the default python3.

    We are hoping to upload all python modules built with python3.12 soon.


    Introduction

    Currently on AIX Toolbox python3 based packages are built with python3.9.

    The end of support for Python 3.9 was on 31st October 2025. https://www.python.org/downloads/

    Hence it is necessary to move to supported python3 version for AIX Toolbox packages.

    The default python3

    The AIX Toolbox default python3 will be python3.12. Along with this we have python3.9 as well.

    Till now users who wants to use python3.12 needed to install it separately either with "dnf install python3.12" or by manually using rpm install command "rpm -ivh python3.12 …."

    Now when user will run "dnf update", python3.12 along with any other python3 modules (installed from AIX toolbox) or python3 based packages installed (dnf, ninja-build, git, gdb etc) will be updated to python3.12 based builds. It is recommended to run "dnf update" instead of updating individual packages.

    python3, python3-devel, python3-idle, python3-test, python3-tkinter rpms are now meta-packages that ships default binaries like python3, python3-config, pydoc3, etc. which are actually symlinks to python3.12, python3.12-config, pydoc3.12, etc. provided by python3.12 rpms.
    These meta packages have dependencies on actual python packages those supplies the binaries and libraries. Users are recommended to install meta-packages through dnf and implicitly main python3 packages will be installed.

    We have rebuilt all our python3 modules with python3.12.


    Common issues faced during dnf migration

    Issue-1:

    dnf update was being done with --nobest or --skip-broken without updating rpm.rte to

    latest version.

    bash-5.1# dnf update

    Traceback (most recent call last):

    File "/opt/freeware/bin/dnf", line 57, in <module>

    from dnf.cli import main

    File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 32, in <module>

    import dnf.base

    File "/opt/freeware/lib/python3.7/site-packages/dnf/base.py", line 31, in <module>

    from dnf.comps import CompsQuery

    File "/opt/freeware/lib/python3.7/site-packages/dnf/comps.py", line 313, in <module>

    class Package(Forwarder):

    File "/opt/freeware/lib/python3.7/site-packages/dnf/comps.py", line 317, in Package

    libcomps.PACKAGE_TYPE_CONDITIONAL : CONDITIONAL,

    AttributeError: module 'libcomps' has no attribute 'PACKAGE_TYPE_CONDITIONAL'

    Solution-1:

    Run the below steps.

    1. rpm -e dnf dnf-automcatic dnf-data libcomps python3-libcomps python3.9-libcomps libdnf python3-libdnf python3-hawkey python3.9-libdnf python3.9-hawkey libcomps python3.9-libcomps libmodulemd librepo python3-librepo python3.9-librepo libsolv

    2. run the dnf_aixtoolbox.sh script

    3. run dnf update to update the latest toolbox repo.

    Users action

    To get all of these latest changes users can run "dnf update".  Don't try to update the package individually. It is recommended to run DNF update.

    But before running any DNF commands one needs update rpm.rte to latest version.

    DNF bundle update

    DNF bundle will be updated to include rebuilt DNF python3 modules with python3.12 and an updated rpm.rte.

    So, when setting up the DNF using the install script, it tries to update to the latest rpm.rte first and then install the required rpm packages.

    AIX migration with dnf

    Users who want to migrate AIX with dnf installed please refer to this blog → https://community.ibm.com/community/user/blogs/sangamesh-mallayya1/2022/01/10/aix-migration-with-dnf

    Custom Python3 Modules

    If a user has built and installed python3 modules (with python3.9) on their own outside AIX toolbox then those modules will not be migrated to python3.12. User will have to reinstall them separately for python3.12.

    **Note**
    The below python packages are not actively maintained by the community. Henceforth we will not be building and uploading them to toolbox

    • python3.9-backports_abc

    • python3.9-exceptiongroup

    • python3.9-futures3       

    • python3.9-keyczar   

    • python3.9-linecache2

    • python3.9-netifaces   

    • python3.9-nose

    • python3.9-py    

    • python3.9-pyasn1            

    • python3.9-pycrypto

    • python3.9-traceback2

    Summary

    From a user perspective there is not much work to migrate to python3.12. One just need to install latest rpm.rte from AIX web download link mentioned above (if not already at latest) and run "dnf update" to get the latest python3.12 ecosystem. Or if you are setting up first time dnf environment then just install latest rpm.rte and then install dnf with the AIX toolbox dnf install script.


    ------------------------------
    PRAJWAL B MEHENDARKAR
    ------------------------------



  • 2.  RE: Migrating to python3.12 for AIX Toolbox python3 ecosystem

    Posted yesterday
    Edited by Jozef Riha yesterday

    > From a user perspective there is not much work to migrate to python3.12. One just need to install latest rpm.rte from AIX web download link mentioned above (if not already at latest) and run "dnf update" to get the latest python3.12 ecosystem.

    Sadly, this did not work on our test system.

    # dnf --refresh update dnf
    AIX generic repository                                                                                        94 kB/s | 3.0 kB     00:00
    AIX noarch repository                                                                                        105 kB/s | 3.0 kB     00:00
    AIX 7.3 specific repository                                                                                  107 kB/s | 3.0 kB     00:00
    Dependencies resolved.

     Problem: problem with installed package python3.9-dnf-plugins-core-4.0.16-64_52.ppc
      - package python3.9-dnf-plugins-core-4.0.16-64_52.ppc requires python3.9-dnf >= 4.2.17, but none of the providers can be installed
      - package python3.12-dnf-4.23.0-64_50.ppc obsoletes python3.9-dnf <= 4.2.17-64_60 provided by python3.9-dnf-4.2.17-64_55.ppc
      - package python3.12-dnf-4.23.0-64_50.ppc obsoletes python3.9-dnf <= 4.2.17-64_60 provided by python3.9-dnf-4.2.17-64_53.ppc
      - package python3.12-dnf-4.23.0-64_50.ppc obsoletes python3.9-dnf <= 4.2.17-64_60 provided by python3.9-dnf-4.2.17-64_54.ppc
      - package python3-dnf-4.23.0-64_50.ppc requires python3.12-dnf = 4.23.0-64_50, but none of the providers can be installed
      - package dnf-4.23.0-64_50.ppc requires python3-dnf = 4.23.0-64_50, but none of the providers can be installed
      - cannot install the best update candidate for package dnf-4.2.17-64_55.ppc
      - nothing provides python3.12-dateutil needed by python3.12-dnf-plugins-core-4.10.1-64_50.ppc
    =============================================================================================================================================
     Package                                       Architecture          Version                          Repository                        Size
    =============================================================================================================================================
    Skipping packages with broken dependencies:
     dnf                                           ppc                   4.23.0-64_50                     AIX_Toolbox_73                    13 k
     python3-dnf                                   ppc                   4.23.0-64_50                     AIX_Toolbox_73                   8.9 k
     python3.12-dnf-plugins-core                   ppc                   4.10.1-64_50                     AIX_Toolbox_73                    36 k

    Transaction Summary
    =============================================================================================================================================
    Skip  3 Packages

    Nothing to do.
    Complete!

    In order to proceed (and remove the unsupported python3.9 from the system) we followed these steps:

    dnf remove python3.9-dnf-plugins-core-4.0.16-64_52.ppc
    dnf --refresh update dnf
    dnf remove 'python3.9*'

    Edit:

    Turns out that `noarch` was not fully updated.