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

    Well based on the network lockdown i dont think you need to do yum or dnf or createrepo.

    You can just download all the rpm files needed into a directory and just run the rpm -Uvh from there.  If anything is flagged as needed you will have to manually go get the missing rpm.

    Yum and dnf are helpful when you have access to a location with all the RPMS needed.  Since you have to manually stage the rpms i do not see an advantage to trying to get dnf and yum and createrepot working since your environment is locked down you have to do the manual staging anyway.

    You can still try doing the lppchk and updtvpgk to see if anything is flagged but really i dont think you need to go thru the hassle of getting dnf working if you wont be able to leverage its best feature.


    Sorry couldnt help more.



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



  • 9.  RE: yum4 and dnf

    Posted Fri July 12, 2024 02:19 PM
      |   view attached

    the repo is handy because the rpms have to be downloaded and using the command line is tedious to say the least.

    as I understand it the repo dir can contain irrelevant rpms and the upgrade wont try to install them. 

    yum upgrade clamav will look at the requirements for clamav then look in repodata for the required rpms and then look for dependencies and subdependencies 

    then try doing the install. as opposed to the command line list where yum will only look at the list and try to install anything there - even if its not related?

    I could be wrong about that. Using the command line and adding rpms that I think its looking for but the lists is running quite long and I am not sure which are needed. i tried to glob them with dnf upgrade ./clamav-0.103.11 ./*.rpm.

    it generated a lot of "cannot install the best update candidate for package 

    just fyi, I uploaded a txt file with that install. /ClamAV dir has all the rpms that are in aix toolbox - clamav-0.103.11-1.aix7.1.ppc.rpm.

    plus a few I downloaded from toolbox.

    P.S. lppchk had no return;   /usr/sbin/updtvpkg isn't there.

    Thanks for the effort.

    -Brendan



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

    Attachment(s)



  • 10.  RE: yum4 and dnf

    Posted Fri July 12, 2024 05:29 PM

    my last comment :-)

    Since you have downloaded all the files into /gpc/software/ClamAV you would then do creatrepo, which builds a database and index of those rpms.

    Alternatively you could just do cd /gpf/software/ClamAV; rpm -Uvh clamav-0.103.11-1.aix7.1.ppc.rpm *.rpm

    From the output you attached you have several problems with version of rpm you have and what is needed for the installation.  You would have to walk thru each of those problems and download the rpm that matches the need.

    Also you see in there problem 9 for instance says it cant install createrepo that the gettext package is not showing.

    So you need to get the gettext rpm and put that into the directory as well as all the other packages that are not included in the tar file.

    Have a good weekend



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



  • 11.  RE: yum4 and dnf

    Posted Tue July 16, 2024 01:39 PM
      |   view attached

    Thanks - hope your weekend was as pleasant as mine.

    I am making progress but with some odd results.

    Successful upgrade from yum3 to dnf results in a broken createrepo -  all the files are there but it gets an error.

    as far as I can tell a repository is needed to effectively install clamav103 - at least it seems so from my limited but painful experience with clamav.
    createrepo status SB1 2 3 
    SB1    yum4 good  --  dnf broken --  createrepo good
    SB2    yum4 good  --  dnf  good   --  createrepo not found
    SB3    yum4 good  --  dnf  good   --  createrepo broken     details in attached file 

    the method you suggest is one i used - yum & dnf install & upgrade ./clamav103 ./<name.rpm ...> & ./*rpm.

    each generated a long list - as you mentioned - with all the sub dependencies. but those rpms are there - i think.

    for example  --   #9 #9 #9   --  says it needs a file that is in the dir:
    - problem with installed package createrepo-0.10.3-3.noarch
    - nothing provides libgomp >= 8.3.0 needed by gettext-0.21-2.ppc

    ls -l *libgom*
    -rwxrwxrwx    1 root     system      1420421 Jun 26 17:08 libgomp8-8.3.0-6.aix7.2.ppc.rpm

    I attached a file with some details about the status.

     - Brendan 



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

    Attachment(s)