AIX Open Source

 View Only
Expand all | Collapse all

yum4 and dnf

  • 1.  yum4 and dnf

    Posted Wed July 10, 2024 06:42 PM

    I am trying to upgrade clamav102 to clamav103 on a closed AIX box running AIX7.2.5.3. yum is/was at 3.4.3. New to opensource, and having picked this up in the middle, I muddled around for a while an probably scrambled some of the filesets trying to create a repository for the rpms. I think to upgrade clamav I have to use dnf. but when  dnf_aixtoolbox.sh runs and calls install_dnf.sh it lists all the rpms and says 'already installed.'. when i check yum its looks half right -
    yum --version says
      3.4.3
         Installed: yum-4.2.17....noarch   at 2024-05-30
        Built       : none at 2023-06-29
       Committed: Sangamesh Mallayya ....

    dnf says not found  - but i somehow have the 'createrepo' util? on another supposedly identical box I have dnf but 'createrepo' is not found? - looking at  'which dnf' shows /opt/freeware/bin/dnf which cats as some python script. python3 help is not clear but it looks broken there too.

    SO I want to clear out yum and dnf but i can seem to get that to work due to inter dependent utils.

    rpm -evh dnf... yum   python-dnf  

    I get yum is needed by dnf or dnf is needed by yum.

    I think its best to remove all yum and dnf thats installed . 

    How do I clean out the dnf and yum files?

    -- Brendan Walsh



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


  • 2.  RE: yum4 and dnf

    Posted Thu July 11, 2024 09:39 AM

    I am not thinking you need to cleanup.

    You might want to check you PATH to ensure you have /opt/freeware/bin/, that is where dnf and yum get installed. Do a which yum to see what path it is using.

    As for the repository the clamav.ppc is in the AIX_Toolbox.  what do you have from /opt/freeware/bin/dnf repolist or just yum repolist



    ------------------------------
    Ronald Schwartz
    ------------------------------



  • 3.  RE: yum4 and dnf

    Posted Thu July 11, 2024 12:55 PM

    I looked at that. it seems ok on the functioning box but does not exist on the not functioning box.

    I have 2 AIX sandbox's SB1 and SB2:
    SB1 - 
      yum and createrepo are good - dnf is not found,
      on our boxes, open source rpms are sym link  in /usr/bin -> /opt/freeware/bin
       yum and createrepo are in /opt/freeware/bin but dnf does not appear there.

    trying to install dnf - - running dnf_aixtoolbox.sh shows everything as 'already installed' with this message
     "dnf and all its dependencies are already installed. but dnf gets 'not found'
      yum runs ok -- however 'yum --version' shows a sort of split;
        yum --version:
        3.4.3
        Installed: yum-4.2.17-32_4.noarch 2024-05-30
        Built      : None at 2023-06-29
       Committed: Sangamesh Mallayya ...    

    On SB2:

      dnf - good
      createrepo - not found.

    trying to install createrepo with rpm creates a huge dependency list.

    I do not believe that there can be so large a difference in these 2 boxes.

    i really just want to upgrade clamav fron 102 to 103.



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



  • 4.  RE: yum4 and dnf

    Posted Thu July 11, 2024 02:18 PM

    I missed your comment about being on a closed aix.  So if you do not have access to the internet from the server itself than you would have to do as you said get all the dependencies and build a repo or just put up them all into one directory and do the rpm install /path-to-rpms/*.rpm

    Not sure you are needing yum or dnf if you are not able to leverage the dependency check/resolve feature of the commands.

    Also note both yum and dnf are just links to dnf-3, you could manually create the link if it did not get created during install.

    /opt/freeware/bin/yum -> dnf-3

    /opt/freeware/bin/dnf -> dnf-3



    ------------------------------
    Ronald Schwartz
    ------------------------------



  • 5.  RE: yum4 and dnf

    Posted Thu July 11, 2024 07:10 PM

    its not the link - there is no dnf there. its just a matter of  uninstalling then reinstalling the existing dnf rpms.

    i am new to open source and yum but i know there is a db they maintain like python so its handy to have the repo directory rather than creating a giant rpm 'list' - which is what the install.sh does - rpm -uvh $giant_compiled_list

    i just realized that upgrading to dnf seems to kill the util createrepo - it happened on a second sandbox i have-

     had to upgrade rpm.rte first then dnf installed but then createrepo fails -  something about import ...genpkmkdata.py  ... site-packages ..  not clear ...

    its a lot of pain trying to upgrade clamav



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



  • 6.  RE: yum4 and dnf

    Posted Fri July 12, 2024 10:00 AM

    Im not clear on what you are looking to get done.  If your objective is to install clamav on a server which 

    1. Does not have access to the internet or you have a special package to install, then you have to collect the rpm dependencies an create a local to the server only repository with the createrepo
    2. Has access to the internet than just use yum install clamav

    If you are for sure the issue is when you did the dnf_aixtoolbox.sh -y

    1. lppchk -v -m3  # Check if aix has any packages with issues to be resolved

    2.  lslpp -la |grep rpm.rte # Check the version of RPM installed

    3. /usr/sbin/updtvpkg # Update the virtual package RPM

    4. Re-run dnf_aixtoolbox.sh -y
    5. Try running yum update

    Yes yum and dnf, same command, checks the database of each repository and works out the dependencies.  The dependencies are in the repo database.  Yum and dnf has a database of the repositories it has defined/used.



    ------------------------------
    Ronald Schwartz
    ------------------------------



  • 7.  RE: yum4 and dnf

    Posted Fri July 12, 2024 12:44 PM

    Sorry about the confusion. I took over this project - update of clamav from 102 to 103 after the original implementer left. initially, I considered it a small project. Many weeks later I see it should have been just that. Long story short -  I fumbled around for a while. I am long time AIX admin, familiar with IBM ways, not so much open source. 
      Our environment is very closed, NO internet access. ALL rpms, from IBM open source only, have to be copied over to the AIX environment. Not all that tedious but it is restrictive. The environment is pretty much identical with some lpars(VMs) having specialized code. The sandbox I started with is AIX7.2.5.3. it had yum3.4.3 down level rpm.rte and openssl. I finally realized that i was supposed to use yum to upgrade clamav102 - not smitty installp. at some point I realized that i should use a repository, but fumbled that - it somehow trashed /opt/freeware/bin rpms related to yum, dnf and createrepo. I had a difficult time and copied most of the rpms from a sister lpar - essentially identical use. re-ran the install rpms without repository and sort of recovered the functionality but it is too muddled to work as an example. install dnf via dnf_aixtoolbox.sh and install_dnf.sh run and claim all rpms are installed but dnf is 'not found' - no presence in /opt/freeware/bin and yum is confused 
    yum --version
    3.4.3
      Installed: yum-4.2.17-32_4noarch at 2024-05-30 
      Built      : None at 2023-06-29 
      Committed: Sangamesh Mallayya 

    end of SandBox1(SB1)

    So I switched to another identical sandbox - SandBox2(SB2). fumbled around some more, managed to create a decent repository. I did manage to install dnf by modifying the dnf_aixtoolbox.sh to work in the closed environment with an already downloaded dnf-bundle_aix_71_72.tar and rpm.rte. but it has somehow deleted createrepo. so SB2 has dnf  and yum but createrepo is 'not found'

    so on to SB3 which i was able to install both dnf and yum with createrepo but create re4po doesnt work -
    something about genpkgetmetadata ?

    So this is where is am SB1 and SB2 are essentially sidelined with SB3 now almost functioning as expected.
       SB3 has good dnf but doing dnf update ./clamav-0-103.11-1.aix7.1.ppc.rpm ./[rpmlist of all called out as needed]
    runs to completion but does not install clamav103 (when it gets to zlib it prints a slew of "uname: invalid option --w ; try uname --help ")

    it shows a few rpms that are not in the AIX Toolbox for Open Source Software - such as librpmio - still cant find after looking in some of the other IBM SW pages like  https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/.

    I am confident that clamav can be upgraded to 103 - just not sure what the next step is.

    I would like to be able to get createrepo working - is it a  plugin? - and dump a bunch of rpms in a gpfs dir.

    Sorry about the longish dialog. 

    thanks

    Brendan



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



  • 8.  RE: yum4 and dnf

    Posted Fri July 12, 2024 01:24 PM