AIX Open Source

 View Only
Expand all | Collapse all

Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

  • 1.  Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted Thu May 30, 2024 06:57 PM

    this is mostly a thank you to the opensource community for helping. I'm new to opensource but been with AIX for some time. Trying to upgrade ClamAV from 102 to 103 I wind up tussling with yum and its repository file setup.

    Running AIX7.2. yum3 wants to go to dnf using dnf_toolbox.sh. So I downloaded a lot of toolbox files, including dnf_bundle_aix_71_72.tar and untarred some into a local gpfs FS /gpfs/software/ClamAV --  because these lpars have no internet access. execute dnf_toolbox.sh says it cant download the dnf_bundle_aix_71_72.tar file but its in the dir. so I thought maybe yum wants to see it so I create - after some wandering - a repository with all the files for clam and dnf. still ./dnf_aixtoolbox.sh fails looking for dnf_bundle_aix_71_72. looking at the script it seems that oslevel 7.2.0. is not included.

    the script is a bundle of if else elif whatif  whatelse ... I had to modify the script to copy the downloaded tar file to the tmp file it created to put the bundle file it wanted to copy from off the intnet, and also mod the final if to look at the temp file it created and NOT fail out and go on to do installsh. it worked and updayed yum to dnf and noted that yum is soft link to dnf and dnf will use the yum repositories.
      still failing install of ClamAV though - the clamav103 repository has a bad file somehow. couldnt read file:// file ... repodata - i dont even have that!

    well at least I got dnf running on AIX7.2.5.3!

    Thanks

    Brendan



    ------------------------------
    Brendan Walsh
    ------------------------------


  • 2.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 28 days ago

    Hi Brendan,

    Sorry for the delay in response.

    If you want to use toolbox rpm packages using DNF for the lpars which don not have internet then you need to use any one of the method.

    1. https://developer.ibm.com/tutorials/awb-configuring-dnf-create-local-repos-ibm-aix/
    2.  https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/09/creating-local-repo-with-dnf-and-aix-toolbox-media?CommunityKey=10c1d831-47ee-4d92-a138-b03f7896f7c9

    How you were using toolbox rpm packages with yum3 ?



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



  • 3.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 28 days ago

    Hi Sangamesh,

      thanks for replying.

    I initially had trouble going from yum3 to dnf - mostly due to inexperience. i was not initially able to find dnf_bundle_aix_71+72.tar on the server. 

    finally found it on https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/ and had to drag it to the isolated server.

    then dnf_aixtoolbox.sh didn't see it because it was trying to download it so I thought it would have top be put in a yum repository. but finally realized - duh-oh ... its trying to either ssh or ftp out - so i had to modify dnf_aixtoolbox.sh then it was fine. and now i can use dnf to install ClamAV

      thats how this whole thing started - we have to go from clamav-102 to clamav-103 but yum put up a fight and refused to saying to use dnf. 

    so now that we have dnf running and using yums repositories dnf says 

        error:
          Problem: Conflicting requests
            -nothing provides curl >= 8.4 ... libiconv  ... ncurses   etc

    but i do have these rpms ib the dir with clamav rpm.

    I thought that I could put rpms in the repository that was used by yum - but dnf doesn't seem to either see them or they are not the droids its looking for ?

    I can probably upgrade curl and the rest  but according to what I read the repos should hold rpms that will resolve dependencies during the install - like IBM installp.

    My question is - how do repositories work? what are they for and do I have to sort of re-read the files there - again like IBMs installp uses a .toc file?

    thanks 

    -Brendan



    ------------------------------
    Brendan Walsh
    ------------------------------



  • 4.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 28 days ago

    dnf seems to be working but it wont install or upgrade anything. I ran dnf update curl-8.5.0.1aix.ppc.rpm 

    it listed 7 more packages  - curl-8.5 and libssh2-1.9 

     ran dnf upgrade curl-8.5 

       dependencies resolved.
          Problem: cannot install the best update candidate for curl-7
            nothing provides libler ... needed by curl 
                                       libssh2   '' ''

            then tried to update/install  liblber..."
                    more nothing 
       but libssh - it would install

    am I supposed to get these binaries from IBM?

    I am beginning to think ClamAV-103 is not installable!

    -Brendan



    ------------------------------
    Brendan Walsh
    ------------------------------



  • 5.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 23 days ago

    Hi Brendan,

    Can you please list the repositories you have enabled "dnf repolist" and the output of "dnf list openldap" ?



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



  • 6.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 17 days ago

    Hi Sangamesh,

     I put the response from dnf repolist at the end. I cant get clamav installed in the past 2 months so its getting to the point where i have to think its not installable.

    part of my problem is that this site has no access so everything has to be trucked in/out, missing rpms etc and every single rpm that i try has 7 other dependencies that have to be dragged in. there is no list of requirements for ClamAV -  leaving me to just fumble and stumble around like a blind bumble bee collecting pollen.

    The other part is that I am unused to both Opensource and linux. I can see that dnf install looks in the current directory for the object file but it doesn't see the curl file (for ex)?  so it says 'nothing provides curl. Which is why I am trying to create a repository so dnf will see and install these files it needs. I guess that's what is meant by 'nothing provides' but not sure. There is a repository from clamav-102 called 'cloudinit'. I tried adding a few of the listed dependency files to it but it didnt seem to help so I thought that I would have to create a separate repository for calmav103. I tried to follow 'Creating local repo with DNF and AIX Toolbox Media Image' but dont have the image.

    ------------------------------------------------------------------------------------------------------------------------------------------------

    /ClamAV># dnf -v repolist all
    Loaded plugins: changelog, config-manager, debug, generate_completion_cache, migrate, repoclosure, repodiff, repograph, repomanage, reposync
    DNF version: 4.2.17
    cachedir: /var/cache/dnf
    os-release file not found
    os-release: falling back to basic User-Agent: missing NAME or VERSION_ID
    repo: using cache for: cloudinit
    cloudinit: using metadata from Wed Mar 20 14:31:26 EDT 2019.
    Last metadata expiration check: 0:09:32 ago on Mon Jun 17 11:04:54 EDT 2024.
    No module defaults found
    Completion plugin: Generating completion cache...

    Repo-id            : AIX_Toolbox_72
    Repo-name          : AIX 7.2 specific repository
    Repo-status        : disabled
    Repo-baseurl       : anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/
    Repo-expire        : 172,800 second(s) (last: unknown)
    Repo-filename      : /opt/freeware/etc/dnf/dnf.conf

    Repo-id            : AIX_Toolbox_73
    Repo-name          : AIX 7.3 specific repository
    Repo-status        : disabled
    Repo-baseurl       : file:///usr/local/install/AIX_Toolbox_73/
    Repo-expire        : 172,800 second(s) (last: unknown)
    Repo-filename      : /opt/freeware/etc/dnf/dnf.conf

    Repo-id            : cloudinit
    Repo-name          : cloudinit repository
    Repo-status        : enabled
    Repo-revision      : 1553106682
    Repo-updated       : Wed Mar 20 14:31:26 EDT 2019
    Repo-pkgs          : 28
    Repo-available-pkgs: 28
    Repo-size          : 57 M
    Repo-baseurl       : file:///usr/local/install/cloudinit/
    Repo-expire        : 172,800 second(s) (last: Mon Jun 17 11:04:54 EDT 2024)
    Repo-filename      : /opt/freeware/etc/dnf/dnf.conf
    Total packages: 28
    /ClamAV># 

    /ClamAV># dnf list open ldap
    Last metadata expiration check: 0:09:50 ago on Mon Jun 17 11:04:54 EDT 2024.
    Error: No matching Packages to list
    /ClamAV># 

      -thanks

    Brendan



    ------------------------------
    Brendan Walsh
    ------------------------------



  • 7.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 17 days ago
    Hi Brendan

    I installed clamav last week using the DNF repo and its available on both versions of AIX. It's more than likely a repo issue on your end and from what I can see it's because you only setup the AIX 7.2 and AIX 7.3 repo and not AIX_TOOLBOX and AIX_TOOLBOX_NOARCH repos.
    See below:
    image.png





  • 8.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 16 days ago
      |   view attached

    Hi -

    hope I am not over explaining - I do have a question at the end - tried to upgrade clamav but its failed.

    I ran into a problem trying to do that. I am working in a sandbox, actually 2 sort of identical sandboxes, other users have free access but don't always communicate.

    Sandbox 1,  I created a dir 'clamav-103', copied ClamAV rpms to it, and then added a stanza for that in dnf.conf with enabled=0. dnf repolist showed it ok as not enabled. Then i ran dnf with it activated and for some reason /opt/freeware got trashed. some files were deleted and some were zeroed.

    I copied over files from a sister lpar - Sandbox2 but its not working well. It has yum 4-2-17 but now refuses to install dnf because its already installed.
    /clamav ># dnf  gets   not found
    I didn't know there was a 'createrepo' function. anyway I tried to reinstall dnf but its not working

    On Sandbox2 I reran dnf_aixtoolbox.sh - moded for no access - it ran ok - install_dnf.sh is good.
    Except that it doesnt have a createrepo?
      /ClamAV># dnf info createrepo
      no matching packages to list.

    so ClamAV has turned into a giant headache for me. That's just trying to get dnf installed so I can  get ClamAV installed!

    ------------------------------
    On my Sandbox2   
      The dir /ClamAV has the Toolbox ClamAV rpms but dnf upgrade of existing clamav102 to 103 doesnt work 

       /ClamAV># dnf upgrade ./clamav-0.103.11-1.aix7.1.ppc.rpm
       'skipping packages with broken dependencies' - but I didn't specify that -

    i attached a copy of the run and a list of rpms.

    ----------------
    My Question - should I copy the ClamAV rpms to an existing repo file - cloudinit?
     



    ------------------------------
    Brendan Walsh
    ------------------------------

    Attachment(s)



  • 9.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 15 days ago

    Hi Brendan

    You are trying to install clamav rpm package by downloading all the dependency packages without being present in the repository you have enabled.

    If the dependency packages are not present in the repository then dnf won't be knowing from to pick the dependency rpm packages.

    So, to install clamav downloaded rpm package using dnf you also need to manually provide dependency packages in the same command.

    For example 

    dnf upgrade ./clamav-0.103.11-1.aix7.1.ppc.rpm ./curl-8.7.1-1.aix7.1.ppc.rpm ./libiconv-1.17-1.aix7.1.ppc.rpm ......


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



  • 10.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 14 days ago

    I hope I am not posting too much - I can edit it down if it is.

    I don't get the last 2 lines about "pre-existing rpmdb problem(s),"

    and its asking for files that i added to repo - do I need to do a refresh? 

    Still fails after I moved the rpms to the cloudinit repo directory:
    /ClamAV># yum update clamav-0.103.11-1.aix7.1.ppc.rpm 
    Setting up Update Process
    Examining clamav-0.103.11-1.aix7.1.ppc.rpm: 1:clamav-0.103.11-1.ppc
    Marking clamav-0.103.11-1.aix7.1.ppc.rpm as an update to clamav-0.102.2-1.ppc
    Resolving Dependencies
    --> Running transaction check
    ---> Package clamav.ppc 0:0.102.2-1 will be updated
    ---> Package clamav.ppc 1:0.103.11-1 will be an update
    --> Processing Dependency: curl >= 8.4.0 for package: 1:clamav-0.103.11-1.ppc
    --> Processing Dependency: libiconv >= 1.17 for package: 1:clamav-0.103.11-1.ppc
    --> Processing Dependency: libtool-ltdl >= 2.4.7 for package: 1:clamav-0.103.11-1.ppc
    --> Processing Dependency: libxml2 >= 2.10.4 for package: 1:clamav-0.103.11-1.ppc
    --> Processing Dependency: ncurses >= 6.4 for package: 1:clamav-0.103.11-1.ppc
    --> Processing Dependency: xz-libs >= 5.4.3 for package: 1:clamav-0.103.11-1.ppc
    --> Finished Dependency Resolution
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: ncurses >= 6.4
               Installed: ncurses-6.2-2.ppc (installed)
                   ncurses = 6.2-2
               Available: ncurses-6.1-2.ppc (cloudinit)
                   ncurses = 6.1-2
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: libiconv >= 1.17
               Installed: libiconv-1.16-1.ppc (installed)
                   libiconv = 1.16-1
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: libtool-ltdl >= 2.4.7
               Installed: libtool-ltdl-2.4.6-2.ppc (installed)
                   libtool-ltdl = 2.4.6-2
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: libxml2 >= 2.10.4
               Installed: libxml2-2.9.10-1.ppc (installed)
                   libxml2 = 2.9.10-1
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: curl >= 8.4.0
               Installed: curl-7.76.1-1.ppc (installed)
                   curl = 7.76.1-1
    Error: Package: 1:clamav-0.103.11-1.ppc (/clamav-0.103.11-1.aix7.1.ppc)
               Requires: xz-libs >= 5.4.3
               Installed: xz-libs-5.2.5-1.ppc (installed)
                   xz-libs = 5.2.5-1
     You could try using --skip-broken to work around the problem
    ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
    python3-dnf-plugin-migrate-4.0.16-32_2.noarch has installed conflicts python3-dnf-plugin-migrate < ('0', '4.0.16', '64_1'): python3-dnf-plugin-migrate-4.0.16-32_2.noarch
    python3-dnf-plugins-core-4.0.16-32_2.noarch has installed conflicts python3-dnf-plugins-core < ('0', '4.0.16', '64_1'): python3-dnf-plugins-core-4.0.16-32_2.noarch
    /ClamAV># 



    ------------------------------
    Brendan Walsh
    ------------------------------



  • 11.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 14 days ago

    Hi Brendan,

    Why can't you try with the command I have give in my previous post ?

    packages which you have added in your repo are not correct. 

    Check this error

               Requires: ncurses >= 6.4
               Installed: ncurses-6.2-2.ppc (installed)
                   ncurses = 6.2-2
               Available: ncurses-6.1-2.ppc (cloudinit)
                   ncurses = 6.1-2

    You have added nurses-6.1-2 but the required one is ncurses-6.4

    And the other required packages are not available in your repo.

               Requires: libiconv >= 1.17
               Installed: libiconv-1.16-1.ppc (installed)
                   libiconv = 1.16-1

    You can verify what are all the packages you have added in your repo with "dnf list available"



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



  • 12.  RE: Upgrade ClamAV from 102 to 103 on AIX 7.2 -- and yum3 to yum4 -> dnf

    Posted 13 days ago

    i tried the command you gave but it did not work any better - just a nicer list of broken dependencies.

    'dnf list available' did not have any useable output - just a single line:  'last metedata expiration date check ...'

    i dont understand why adding those files to the repo 'cloudinit' didnt work?  for example I have ncurses-6.4-1.aix7.1.ppc.rpm in the ./ directory.

    and ncurses-6.1 in the repo clioudint. so i added the ncurses-6.4- to cloudinit

    createrepo <dir name> should create an enabled reopository named asthe name of the file and dnf should use it - right?

    i am getting to the end of possibilities - this does not seem to be working.

    i attached a copy of my attempts to upgrade clamav from 102 to 103.

    the first file has the command you gave me - dnf upgrade ./clamav-0.103.11-1.aix7.1.ppc.rpm ./curl-8.7.1-1.aix7.1.ppc.rpm ./libiconv-1.17-1.aix7.1.ppc.rpm ./libtool-ltdl-2.4.7-1.aix7.1.ppc.rpm ./ncurses-6.4-1.aix7.1.ppc.rpm ./xz-libs-5.4.3-1.aix7.1.ppc.rpm ./zlib-1.2.13-1.aix7.1.ppc.rpm

    the second file is just dnf upgrade ./curl-8.5.0-1.aix7.1.ppc.rpm which does not see the files either in the invoked dir - /ClamAV/* or in the repo cloudinit.

    I am clearly missing some key part - just what is not so clear.

    -thanks

    Brendan



    ------------------------------
    Brendan Walsh
    ------------------------------