AIX Open Source

 View Only

AIX migration with DNF

By SANGAMESH MALLAYYA posted Mon January 10, 2022 01:45 PM

  

This blog gives detailed information and guidelines to the users who wants to migrate AIX with DNF installed.

There are some scenarios where users need to run some steps before and after the AIX migration.

 

1. Migration from AIX 7.1 or 7.2 to AIX 7.3

   
    AIX 7.3 doesn’t support YUM, DNF install manager can be installed on AIX 7.3.

    AIX 7.3 by default ships 64-bit rpm and YUM works with only 32-bit rpm, hence YUM won’t work on AIX 7.3.
 

    If users migrate from AIX7.1 or 7.2 to AIX 7.3 then the existing installed DNF won’t work as-is.

    This is because DNF for AIX 7.1 and 7.2 is 32-bit due to the default 32-bit rpm.

 

    Run the below steps after migrating to AIX 7.3 to update 32-bit DNF to 64-bit and to make other necessary changes.

  • Run “updtvpkg” command to update AIX-rpm virtual package for AIX 7.3.

 

  • Run the dnf_aixtoolbox.sh to update 32-bit dnf rpm packages to 64-bit.

          If you have yum4 installed with previous install of DNF then run the script with “-y” option otherwise run with “-d” option.

          ./dnf_aixtoolbox.sh -y

          After this DNF should be able to run fine without any issues.

          Do not yet run any of the DNF transaction commands like install/update.

 

  • Verify DNF repositories.

           Once after update to 64-bit DNF, AIX 7.3 specific repository will be added.

           Also, it tries to disable AIX 7.1 or 7.2 specific repository.

           We have made changes to the DNF package to add 7.3 repository during update.

           Please verify if AIX 7.3 repository is being enabled along with AIX_Toolbox and AIX_Toolbox_noarch  repositories in /opt/freeware/etc/dnf/dnf.conf file.
           Also make sure AIX_Toolbox_72 or AIX_Toolbox_71 repositories are not enabled.

          # dnf repolist

             repo id                             repo name

             AIX_Toolbox                    AIX generic repository

             AIX_Toolbox_73              AIX 7.3 specific repository

             AIX_Toolbox_noarch       AIX noarch repository

             If there are some issues and repository is not updated properly then you can manually edit /opt/freeware/etc/dnf/dnf.conf file with AIX 7.3 repository as.

 

             [AIX_Toolbox_73]

             name=AIX 7.3 specific repository       
             baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.3/

             enabled=1

             gpgcheck=0

 

  • Run “dnf update” to update packages to the latest version.

          This updates toolbox packages to latest available version.

          "dnf update" may not update the gcc10 and it's meta packages to the 7.3 gcc as the default version(gcc10) is same in all AIX versions now.

 

  • Run “dnf check” to verify dependency errors.

          You might see error related to the default gcc10 packages.


          For example.

 # dnf check
gcc-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc-c++-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc-cpp-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-c++-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-cpp-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-devel-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++10-devel-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
Error: Check discovered 14 problem(s)

          These errors are expected as  gcc10 versions are same in all AIX versions and these won't be updated to 7.3 gcc by default.

     

  • Reinstall version specific gcc packages.
Note down all the gcc related packages which dnf check listed and reinstall  them.

dnf reinstall gcc-1:10-2 gcc-c++-1:10-2 gcc-cpp-1:10-2 gcc10-10.3.0-6 gcc10-c++-10.3.0-6 gcc10-cpp-10.3.0-6 libgcc-1:10-2 libgcc10-10.3.0-6 libgomp-1:10-2 libgomp10-10.3.0-6 libstdc++-1:10-2 libstdc++-devel-1:10-2 libstdc++10-10.3.0-6 libstdc++10-devel-10.3.0-6

Now dnf check would return without any errors and the gcc would be 7.3 gcc.

NOTE: Include both meta packages and gcc10 version specific packages in a single command otherwise the libgcc and libstdc++ libraries would be
             pointing to non-existence wrong version specific libraries.
            

2. Migration from AIX 7.1 to AIX 7.2


    Both AIX 7.1, 7.2 have 32-bit rpm as default, hence 32-bit DNF would be installed through the dnf_aixtoolbox.sh script.

    If you have migrated from AIX 7.1 to AIX 7.2 with DNF installed, then run the below steps to avoid errors related to AIX version specific packages like gcc.

 

  • Run updtvpkg to update AIX-rpm package with AIX version being migrated.

 

  • Check the dependency errors with dnf check command.

You might see error related to the default gcc10 packages as the default version(gcc10) is same in all AIX versions now.

         
# dnf check
gcc-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
gcc-c++-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
gcc-cpp-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
gcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
gcc10-c++-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
gcc10-cpp-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
libgcc-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
libgcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
libgomp-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
libgomp10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
libstdc++-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
libstdc++-devel-1:10-2.ppc has missing requires of AIX-rpm < 7.2.0.0
libstdc++10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
libstdc++10-devel-10.3.0-6.ppc has missing requires of AIX-rpm < 7.2.0.0
Error: Check discovered 14 problem(s)

 

  • Update /opt/freeware/etc/dnf/dnf.conf with entries for AIX 7.2 specific repository instead of AIX 7.1 repo.

 

           [AIX_Toolbox_72]

           name=AIX 7.2 specific repository

           baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/

           enabled=1

           gpgcheck=0

 

  • Reinstall version specific packages like gcc with one from AIX 7.2 repository.

  
Note down all the gcc related packages which dnf check listed and reinstall  them.

          dnf reinstall gcc-1:10-2 gcc-c++-1:10-2 gcc-cpp-1:10-2 gcc10-10.3.0-6 gcc10-c++-10.3.0-6 gcc10-cpp-10.3.0-6 libgcc-1:10-2 libgcc10-10.3.0-6
          libgomp- 1:10-2 libgomp10-10.3.0-6 libstdc++-1:10-2 libstdc++-devel-1:10-2 libstdc++10-10.3.0-6 libstdc++10-devel-10.3.0-6

 

          We need to run dnf reinstall as AIX 7.1 and AIX 7.2 gcc10 packages versions are same.

If AIX7.2 gcc had a higher version than AIX 7.1, running dnf update would update gcc packages to AIX 7.2 gcc.

NOTE: Include both meta packages and gcc10 version specific packages in a single command otherwise the libgcc and libstdc++ libraries would be
             pointing to non-existence wrong version specific libraries.

  • run dnf check again to verify if no more dependency errors.

3. Migration from YUM to DNF

    Users who have an YUM installed in AIX 7.1 or 7.2 and would like to migrate to DNF, then they have two options.

    1.  First migrate from AIX 7.1 or 7.2 to AIX 7.3 with YUM installed and then migrate to DNF.
    2.  First migrate to DNF and then migrate to AIX 7.3.

    Detailed steps are given for both the options below.

    3.1.  Migration from AIX 7.1 or 7.2 to AIX 7.3 with YUM installed.

        Once after migration to AIX 7.3 with YUM installed then run the below steps to setup 64-bit DNF.

  • Run updtvpkg to update AIX-rpm package with AIX version being migrated.
  • Run the dnf_aixtoolbox.sh to migrate from YUM to DNF.
Run the script with “-y” option

./dnf_aixtoolbox.sh -y

This should migrate from YUM to DNF with yumdb and history migrate to DNF.

Do not yet run any of the DNF transaction commands like install/update.

  • Verify DNF repositories.
Once after update to 64-bit DNF, AIX 7.3 specific repository will be added.

Also, it tries to disable AIX 7.1 or 7.2 specific repository.

We have made changes to the DNF package to add 7.3 repository during update.

Please verify if AIX 7.3 repository is being enabled along with AIX_Toolbox and AIX_Toolbox_noarch repositories in /opt/freeware/etc/dnf/dnf.conf file.
Also make sure AIX_Toolbox_72 or AIX_Toolbox_71 repositories are not enabled.

# dnf repolist
repo id                                repo name
AIX_Toolbox                     AIX generic repository
AIX_Toolbox_73             AIX 7.3 specific repository
AIX_Toolbox_noarch     AIX noarch repository

If there are some issues and repository is not updated properly then you can manually edit /opt/freeware/etc/dnf/dnf.conf file with AIX 7.3 repository as.

[AIX_Toolbox_73]
name=AIX 7.3 specific repository
baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.3/
enabled=1
gpgcheck=0

  • Run “dnf update” to update packages to the latest version.
  • Run “dnf check” to verify if any dependency errors with gcc packages
           You might see error related to the default gcc10 packages.

 For example.
 
# dnf check
gcc-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc-c++-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc-cpp-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-c++-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc10-cpp-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-devel-1:10-2.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++10-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++10-devel-10.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
Error: Check discovered 14 problem(s)

          These errors are expected as  gcc10 versions are same in all AIX versions and these won't be updated to 7.3 gcc by default.
  • Reinstall version specific packages like gcc with one from AIX 7.2 repository.

Note down all the gcc related packages which dnf check listed and reinstall  them.

          dnf reinstall gcc-1:10-2 gcc-c++-1:10-2 gcc-cpp-1:10-2 gcc10-10.3.0-6 gcc10-c++-10.3.0-6 gcc10-cpp-10.3.0-6 libgcc-1:10-2 libgcc10-10.3.0-6
          libgomp- 1:10-2 libgomp10-10.3.0-6 libstdc++-1:10-2 libstdc++-devel-1:10-2 libstdc++10-10.3.0-6 libstdc++10-devel-10.3.0-6



    3.2. Migrate from AIX 7.1 or 7.2 to 7.3 after YUM to DNF migration

If you have YUM installed in AIX 7.1 or 7.2 and would like migrate to DNF before migrating to AIX 7.3 then follow the below steps.

  • run dnf_aixtoolbox.sh script with "-y" option to migrate from YUM to DNF.
    For more details please refer the forum link posted in reference section "DNF is now available on AIX Toolbox"
  • Now follow this forum post procedure 1 "Migration from AIX 7.1 or 7.2 to AIX 7.3".

It's always better to migrate to DNF first and then migrate to AIX 7.3.

If some users who like to migrate from AIX 7.1 to 7.2 with YUM installed  and then migrate to DNF, then
the stpes mentioned in 3.1 are similar excpet some differences like 32-bit DNF,  AIX 7.2 repository and gcc version differences.
Otherwise, dnf_aixtoolbox.sh script takes care of installing proper 32-bit DNF, migrating from YUM to DNF, enabling AIX 7.2 repositories etc.

 

Useful References:

 

AIX 7.3 Release Notes - YUM and DNF

AIX 7.3 does not support YUM as RPM package manager from the AIX toolbox.
DNF (dandified yum, the next generation of the Yellowdog Updater) can be installed from AIX toolbox and must be used to manage RPM packages.

https://www.ibm.com/docs/en/aix/7.3?topic=notes-aix-73-release

 

DNF is now available on AIX Toolbox

https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2021/05/28/dnf-is-now-available-on-aix-toolbox

 

To setup and run dnf on AIX, one can use the dnf_aixtoolbox.sh script. https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/dnf_aixtoolbox.sh

 

7 comments
267 views

Permalink

Comments

Fri February 10, 2023 06:50 AM

I ended up manually updating those packages and now everything is working.

Fri February 10, 2023 03:23 AM

Hi Joshua,

The default gcc for all AIX releases now is gcc10.

If you do dnf update then gcc8 is not being updated to gcc10 ?

Thu February 09, 2023 08:24 AM

Having these issues below even after following the steps above:

(utaecegdi7300.hban.us:/opt/freeware/bin)#  /opt/freeware/bin/dnf check
gcc-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc-cpp-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
gcc8-cpp-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libgcc8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libgomp8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++-1:8-1.ppc has missing requires of AIX-rpm < 7.3.0.0
libstdc++8-8.3.0-6.ppc has missing requires of AIX-rpm < 7.3.0.0
Error: Check discovered 10 problem(s)

# Reinstall #

(utaecegdi7300.hban.us:/opt/freeware/bin)#  /opt/freeware/bin/dnf reinstall gcc-1:8-1 gcc-cpp-1:8-1 gcc8-8.3.0-6 gcc8-cpp-8.3.0-6 libgcc-1:8-1 libgcc8-8.3.0-6 libgomp-1:8-1 libgomp8-8.3.0-6 libstdc++-1:8-1 libstdc++8-8.3.0-6
Last metadata expiration check: 0:02:38 ago on Thu Feb  9 08:16:07 EST 2023.
Installed package libstdc++-1:8-1.ppc (from AIX_Toolbox_72) not available.
Error:
 Problem 1: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by gcc-1:8-1.ppc
 Problem 2: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by gcc-cpp-1:8-1.ppc
 Problem 3: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by gcc8-8.3.0-6.ppc
 Problem 4: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by gcc8-cpp-8.3.0-6.ppc
 Problem 5: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by libgcc-1:8-1.ppc
 Problem 6: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by libgcc8-8.3.0-6.ppc
 Problem 7: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by libgomp-1:8-1.ppc
 Problem 8: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by libgomp8-8.3.0-6.ppc
 Problem 9: conflicting requests
  - nothing provides AIX-rpm < 7.3.0.0 needed by libstdc++8-8.3.0-6.ppc

Trying to see what steps to follow in order to correct this.  Here is the output of my dnf.conf:

(utaecegdi7300.hban.us:/opt/freeware/bin)#  cat ../etc/dnf/dnf.conf
[main]
cachedir=/var/cache/dnf
keepcache=1
debuglevel=2
logfile=/var/log/dnf.log
exactarch=1
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True

plugins=1
sslverify=0

[AIX_PPC]
name=AIX Generic repo
baseurl=http://pdlrhssat8100.hban.us/pulp/content/Huntington/Library/custom/AIX_Toolbox/AIX_PPC/
enabled=1
gpgcheck=0

[AIX_NOARCH]
name=AIX Noarch contentitory
baseurl=http://pdlrhssat8100.hban.us/pulp/content/Huntington/Library/custom/AIX_Toolbox/AIX_NOARCH/
enabled=1
gpgcheck=0

[AIX_BETA]
name=AIX Beta contentitory
baseurl=http://pdlrhssat8100.hban.us/pulp/content/Huntington/Library/custom/AIX_Toolbox/AIX_BETA/
enabled=1
gpgcheck=0

[AIX_73]
name=AIX 7.3 specific repo
baseurl=http://pdlrhssat8100.hban.us/pulp/content/Huntington/Library/custom/AIX_Toolbox/AIX_73/
enabled=1
gpgcheck=0

Fri February 25, 2022 05:49 AM

After migrating from yum to dnf some yum rpms (plugins/utils) are still installed:

dnf list installed|grep yum
yum.noarch 4.2.17-32_1 @System
yum-metadata-parser.ppc 1.1.4-2 @System
yum-plugin-changelog.noarch 1.1.31-2 @AIX_Toolbox_noarch
yum-plugin-list-data.noarch 1.1.31-2 @AIX_Toolbox_noarch
yum-plugin-versionlock.noarch 1.1.31-2 @AIX_Toolbox_noarch
yum-utils.noarch 1.1.31-2 @System

yum versionlock list
No such command: versionlock. Please use /opt/freeware/bin/yum --help
It could be a YUM plugin command, try: "yum install 'dnf-command(versionlock)'"
not working anymore....

these dnf rpms are installed:
dnf list installed|grep dnf
dnf.noarch 4.2.17-32_1 @System
dnf-automatic.noarch 4.2.17-32_1 @System
dnf-data.noarch 4.2.17-32_1 @System
libdnf.ppc 0.39.1-32_1 @System
python3-dnf.noarch 4.2.17-32_1 @System
python3-dnf-plugin-migrate.noarch 4.0.16-32_1 @System
python3-dnf-plugins-core.noarch 4.0.16-32_1 @System
python3-libdnf.ppc 0.39.1-32_1 @System

dnf versionlock list
No such command: versionlock. Please use /opt/freeware/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(versionlock)'"

But the dnf plugins does not contain "versionlock" yet?

When will versionlock be available? 
can i remove the installed yum RPMs without problems?

Regards, Emiel

Tue February 08, 2022 01:03 PM

Perfect, thanks very much indeed.

Regards, Steve

Tue February 08, 2022 11:13 AM

Hi Steve,

This has been corrected.
Please use the latest uploaded dnf_aixtoolbox.sh script.

Tue February 08, 2022 04:16 AM

Could someone review dnf_aixtoolbox.sh please as the openssl "check" is stating I need to upgrade to 1.0.2.2001 when I'm already at 1.1.2.1200.

Please install openssl 1.0.2.2001 and higher version.
You can download and install latest openssl from AIX web download site
https://www-01.ibm.com/marketing/iwm/platform/mrs/assets?source=aixbp

# lslpp -Lc openssl.base
#Package Name:Fileset:Level:State:PTF Id:Fix State:Type:Description:Destination Dir.:Uninstaller:Message Catalog:Message Set:Message Number:Parent:Automatic:EFIX Locked:Install Path:Build Date
openssl.base:openssl.base:1.1.2.1200: : :C: :Open Secure Socket Layer: : : : : : :0:0:/:
# oslevel -s
7300-00-01-2148
#​