AIX Open Source

 View Only
  • 1.  dnf not working anymore

    Posted Fri July 26, 2024 01:47 AM

    Hello Team

    on some of our AIX LPARs dnf with any subcommand isn't working anymore, probabably since the update to 7200-05-07-2346, but I'm not sure.

    A short search didn't help about this.

    root@aixhost: /tmp # dnf repolist
    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'
    root@aixhost: /tmp #
    root@aixhost: /tmp # oslevel -s
    7200-05-07-2346
    root@aixhost: /tmp # rpm -qa|grep -i python
    python-devel-2.7.18-3.ppc
    rpm-python3-4.15.1-32_1.ppc
    python3-dateutil-2.8.0-1.noarch
    python3-gpg-1.13.1-100.ppc
    python3-libdnf-0.39.1-32_50.ppc
    python3-dnf-4.2.17-32_50.ppc
    python3-dnf-plugins-core-4.0.16-32_50.ppc
    python3-3.7.15-2.ppc
    python3-libdnf-0.39.1-32_51.ppc
    python3-librepo-1.11.0-101.ppc
    python-devel-2.7.18-4.ppc
    python3.9-3.9.19-1.ppc
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    python-pycurl-7.43.0-1.ppc
    python-2.7.18-3.ppc
    python-tools-2.7.18-3.ppc
    python3-six-1.13.0-1.noarch
    python3-3.7.15-1.ppc
    python3-hawkey-0.39.1-32_50.ppc
    python3-dnf-plugin-migrate-4.0.16-32_50.ppc
    python3-librepo-1.11.0-100.ppc
    python-2.7.18-4.ppc
    python3-hawkey-0.39.1-32_51.ppc
    python-pycurl-7.43.0.5-1.ppc
    python-tools-2.7.18-4.ppc
    python3.9-libcomps-0.1.15-101.ppc
    python3-libcomps-0.1.15-101.ppc

    Could you please help?

    Thank you very much in advance!



    ------------------------------
    Hans-Peter G.
    ------------------------------


  • 2.  RE: dnf not working anymore

    Posted Mon August 05, 2024 10:00 AM

    Hi Hans, 

    Sorry for delay in response. But can you please tell us some history.

    Was everything working before? And since when it is not working? 
    Also is it not working on all the systems or on a specific LPAR?

    Can you also share rpm -qa output? 



    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: dnf not working anymore

    Posted Mon August 05, 2024 10:08 AM
    Edited by SANGAMESH MALLAYYA Mon August 05, 2024 10:08 AM

    Seems to be related to the some of the discussion happened here

    https://community.ibm.com/community/user/power/discussion/migrating-to-python39-for-aix-toolbox-python3-ecosystem#bm04d0df5e-25b8-4a29-9ad9-0189025e7cf3

    Please check the discussion number 44 & 45.

    Here it seems the default python3 is still python-3.7.15.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 4.  RE: dnf not working anymore

    Posted Fri August 16, 2024 06:21 AM
    Edited by Hans-Peter G. Fri August 16, 2024 06:23 AM

    Hello folks,
     
    sorry for the delay, I was out of office for a couple of days.
     
    As I mentioned I'm not sure when this began. We've got some LPARs where dnf is working and some where it doesn't work.
     
    I think we're quite current with rpm.rte:
     
     root@aixhost: / # lslpp -l |grep rpm
      rpm.rte                4.15.1.1011  COMMITTED  RPM Package Manager
      rpm.rte                4.15.1.1011  COMMITTED  RPM Package Manager

    Some more information:

    root@aixhost: / # oslevel -s
    7200-05-07-2346
    root@aixhost: / #

    root@aixhost: / # rpm -qa
    yum-metadata-parser-1.1.4-2.ppc
    bzip2-1.0.8-2.ppc
    cups-2.2.3-3.ppc
    libgcc-8-1.ppc
    libgomp-8-1.ppc
    zlib-1.2.12-1.ppc
    libgomp8-8.3.0-6.ppc
    cyrus-sasl-2.1.28-1.ppc
    python-devel-2.7.18-3.ppc
    pcre-8.44-2.ppc
    python3-dateutil-2.8.0-1.noarch
    libtextstyle-0.21-2.ppc
    libiconv-1.17-1.ppc
    libgpg-error-1.45-1.ppc
    libssh2-1.10.0-1.ppc
    check-0.13.0-1.ppc
    gdbm-1.23-1.ppc
    libsmbclient-4.16.5-1.ppc
    samba-libs-4.16.5-1.ppc
    samba-winbind-clients-4.16.5-1.ppc
    samba-client-4.16.5-1.ppc
    npth-1.5-1.ppc
    gpgme-1.13.1-100.ppc
    python3-gpg-1.13.1-100.ppc
    libmodulemd-1.5.2-100.ppc
    python3-dnf-4.2.17-32_50.ppc
    python3-dnf-plugins-core-4.0.16-32_50.ppc
    dnf-automatic-4.2.17-32_50.ppc
    libgcc10-10.3.0-6.ppc
    zlib-1.2.13-1.ppc
    libstdc++-10-2.ppc
    libgomp-10-2.ppc
    python3-librepo-1.11.0-101.ppc
    python-devel-2.7.18-4.ppc
    apr-1.7.4-1.ppc
    AIX-rpm-7.2.5.205-21.ppc
    libffi-3.4.4-2.ppc
    libxml2-2.10.4-1.ppc
    libtasn1-4.19.0-1.ppc
    p11-kit-0.24.1-1.ppc
    libgcrypt-1.10.2-1.ppc
    libksba-1.6.3-1.ppc
    p11-kit-tools-0.24.1-1.ppc
    libcomps-0.1.15-101.ppc
    libnghttp2-1.58.0-1.ppc
    krb5-libs-1.21.2-1.ppc
    zchunk-libs-1.1.4-103.ppc
    bash-5.2.15-1.ppc
    readline-8.2-1.ppc
    python3.9-3.9.19-1.ppc
    nettle-3.9.1-1.ppc
    gnupg2-2.4.3-1.ppc
    coreutils-9.3-1.ppc
    tar-1.35-1.ppc
    libsolv-0.7.9-32_53.ppc
    ncat-7.94-1.ppc
    sudo-1.9.14p3-1.ppc
    popt-1.19-1.ppc
    libsmartcols-2.34-101.ppc
    dbus-1.14.8-1.ppc
    librepo-1.11.0-32_2.ppc
    libdnf-0.39.1-32_3.ppc
    python3-3.9.16-0.ppc
    expat-2.6.2-1.ppc
    dnf-data-4.2.17-32_4.noarch
    httpd-2.4.61-1.ppc
    python3-libdnf-0.39.1-32_3.ppc
    python3.9-librepo-1.11.0-32_2.ppc
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    libconfuse-3.2.2-2.ppc
    unzip-6.0-3.ppc
    python-pycurl-7.43.0-1.ppc
    zip-3.0-4.ppc
    pysqlite-2.8.3-2.ppc
    cups-libs-2.2.3-3.ppc
    libstdc++-8-1.ppc
    db-5.3.28-1.ppc
    libgcc8-8.3.0-6.ppc
    libstdc++8-8.3.0-6.ppc
    libsodium-1.0.18-1.ppc
    python-2.7.18-3.ppc
    python-tools-2.7.18-3.ppc
    python3-six-1.13.0-1.noarch
    gettext-0.21-2.ppc
    pinentry-1.0.0-1.ppc
    libpcap-1.10.1-1.ppc
    samba-devel-4.16.5-1.ppc
    samba-winbind-4.16.5-1.ppc
    samba-common-4.16.5-1.ppc
    libyaml-0.2.5-1.ppc
    dnf-4.2.17-32_50.ppc
    python3-dnf-plugin-migrate-4.0.16-32_50.ppc
    python3-librepo-1.11.0-100.ppc
    gzip-1.12-3.ppc
    samba-4.16.5-1.ppc
    findutils-4.9.0-1.ppc
    less-598-1.ppc
    libgcc-10-2.ppc
    libstdc++10-10.3.0-6.ppc
    python-2.7.18-4.ppc
    libssh2-1.10.0-2.ppc
    libgomp10-10.3.0-6.ppc
    python-pycurl-7.43.0.5-1.ppc
    python-tools-2.7.18-4.ppc
    rsync-3.2.7-1.ppc
    grep-3.7-2.ppc
    bvq-aix-agent-2023.H1.2-1.ppc
    openldap-2.5.16-1.ppc
    ncurses-6.4-1.ppc
    xz-libs-5.4.3-1.ppc
    libzstd-1.5.2-3.ppc
    gmp-6.3.0-1.ppc
    lua-5.4.6-1.ppc
    pcre2-10.40-1.ppc
    nmap-7.94-1.ppc
    ca-certificates-2023.2.60-2.ppc
    vim-common-9.1.0035-1.ppc
    libassuan-2.5.6-1.ppc
    curl-8.6.0-1.ppc
    info-7.0.2-1.ppc
    sqlite-3.41.2-1.ppc
    python3.9-libcomps-0.1.15-101.ppc
    gnutls-3.8.2-1.ppc
    python3-libcomps-0.1.15-101.ppc
    libunistring-1.1-1.ppc
    wget-1.21.4-1.ppc
    vim-enhanced-9.1.0035-1.ppc
    glib2-2.76.3-2.ppc
    postgresql-libs-11.21-1.ppc
    lz4-1.9.4-1.ppc
    json-c-0.17-1.ppc
    apr-util-1.6.3-2.ppc
    swiagent-2024.2.1.2092-4d63c59.ppc
    rpm-python3.9-4.15.1-32_2.ppc
    python3.9-libdnf-0.39.1-32_3.ppc
    python3.9-hawkey-0.39.1-32_3.ppc
    python3.9-gpg-1.13.1-32_3.ppc
    python3.9-dnf-4.2.17-32_4.noarch
    python3-hawkey-0.39.1-32_3.ppc
    rpm-python3-4.15.1-32_2.ppc

    Thank you! 



    ------------------------------
    Hans-Peter G.
    ------------------------------



  • 5.  RE: dnf not working anymore

    Posted Fri August 16, 2024 01:48 PM

    Hi Hans,

    Some of the DNF related packages are not in sync with latest version.

    I think the better option is to remove the DNF related packages and run the dnf_aixtoolbox.sh script again.

    Here is the list of packages you can try removing with "rpm -e gpgme python3-gpg python3.9-gpg libmodulemd librepo python3-librepo python3.9-librepo python3-librepo libdnf  python3-libdnf python3.9-libdnf python3.9-hawkey python3-hawkey dnf dnf-data python3.9-dnf python3-dnf dnf-automatic rpm-python3.9 rpm-python3"



    ------------------------------
    SANGAMESH
    ------------------------------



  • 6.  RE: dnf not working anymore

    Posted Mon August 19, 2024 08:17 AM

    Hello Sangamesh,

    thank you. That pointed me to the solution.

    I removed the necessary packages with this command:

    rpm -qa|grep -E "python|dnf|libcomps|gpgme|libmodulemd|librepo"| while read package;do rpm -e $package  --allmatches --nodeps;done

    After that I executed "./install_dnf.sh -d" from the downloaded dnf_bundle_aix_71_72.tar, recovered the old dnf.conf  and finally a "dnf update" did it.

    Thanks again!



    ------------------------------
    Hans-Peter G.
    ------------------------------