AIX Open Source

 View Only
Expand all | Collapse all

Yum broken on new install

  • 1.  Yum broken on new install

    Posted Fri October 30, 2020 05:20 AM
    Hi,
    Got a very annoying issue,
    It all started when I tried to upgrade to 7100-05-06
    After making a new NIM lpp and spot and a making a new AIX install.
    Yum failed from a basic install.
    I now tried going back to 7100-05-05 it is the same problem.

    The funny thing is my all my running AIX 7100-05-05 works just fine.

    This is how I make a new lpp/spot
    loopmount -i /mnt1/AIX_ISO/AIX_7.1_Install_7100-05-05-1937_DVD_1_of_2_112019_LCD8149121.iso -m /mnt/dvd1 -o "-V cdrfs -o ro"
    loopmount -i /mnt1/AIX_ISO/AIX_v7.1_Install_7100-05-05-1937_DVD_2_of_2_112019_LCD8149221.iso -m /mnt/dvd2 -o "-V cdrfs -o ro"
    nim -o define -t lpp_source -a server=master -a source=/mnt/dvd1 -a location=/NIMdata/lpp_source/lpp_AIX7100-05-05 lpp_AIX7100-05-05
    nim -o update -a packages=all -a source=/mnt/dvd2 lpp_AIX7100-05-05

    # LPP
    nim -o update -a packages=all -a source=/mnt1/AIX_ISO/AIX_7.1_Expansion_Pack_052020_LK4T171216 lpp_AIX7100-05-05
    nim -o update -a packages=all -a source=/mnt1/AIX_ISO/AIX_7.1_Expansion_Pack_112019_LK4T171215 lpp_AIX7100-05-05
    nim -o update -a packages=all -a source=/mnt1/aix_fixpack/7100-05-05-1939 lpp_AIX7100-05-05
    # SPOT
    nim -o define -t spot -a server=master -a location=/NIMdata/spot/spot_AIX7100-05-05 -a installp_flags=-aQgY -a source=lpp_AIX7100-05-05 spot_AIX7100-05-05
    nim -Fo check spot_AIX7100-05-05
    nim -o lppchk -a show_progress=yes spot_AIX7100-05-05

    After install I just install ssh and rpm.rte/yum package
    mount NFSserver:/NIMdata/lpp_source/lpp_AIX7100-05-05 /mnt
    geninstall -Y -d /mnt/installp/ppc -f /usr/sys/inst.data/sys_bundles/openssh_server.bnd
    installp -agXYd /mnt1/packages/aix/yum rpm.rte
    This installs the latest yum_bundle_v5.tar
    rpm -ivh *rpm | tee -a $LOG
    /usr/sbin/updtvpkg
    /usr/opt/rpm/bin/recreate_opt_bin_lib_links
    I have no internet on these servers (military) so I setup an internal repo server, that is working just fine for all my old AIX.
    cp yum.conf_71 /opt/freeware/etc/yum/yum.conf
    Then I do
    updtvpkg
    /usr/opt/rpm/bin/recreate_opt_bin_lib_links

    This has worked for quite some time but now it stopped. (even for new installs)
    # yum clean all
    Cleaning repos: AIX_Toolbox AIX_Toolbox_71 AIX_Toolbox_noarch
    Cleaning up Everything
    # yum repolist
    AIX_Toolbox | 1.3 kB 00:00
    AIX_Toolbox/primary | 585 kB 00:00
    Traceback (most recent call last):
    File "/usr/bin/yum", line 32, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
    File "/opt/freeware/share/yum-cli/yummain.py", line 288, in user_main
    errcode = main(args)
    File "/opt/freeware/share/yum-cli/yummain.py", line 140, in main
    result, resultmsgs = base.doCommands()
    File "/opt/freeware/share/yum-cli/cli.py", line 440, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
    File "/opt/freeware/share/yum-cli/yumcommands.py", line 864, in doCommand
    base.repos.populateSack()
    File "/opt/freeware/lib/python2.7/site-packages/yum/repos.py", line 294, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
    File "/opt/freeware/lib/python2.7/site-packages/yum/yumRepo.py", line 186, in populate
    dobj = repo_cache_function(xml, csum)
    File "/opt/freeware/lib/python2.7/site-packages/sqlitecachec.py", line 46, in getPrimary
    self.repoid))
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found

    #


    This is my current versions
    # lslpp -l rpm.rte
    Fileset Level State Description
    ----------------------------------------------------------------------------
    Path: /usr/lib/objrepos
    rpm.rte 4.13.0.10 COMMITTED RPM Package Manager

    Path: /etc/objrepos
    rpm.rte 4.13.0.10 COMMITTED RPM Package Manager
    # lslpp -l '*openss*'
    Fileset Level State Description
    ----------------------------------------------------------------------------
    Path: /usr/lib/objrepos
    openssh.base.client 7.5.102.1801 COMMITTED Open Secure Shell Commands
    openssh.base.server 7.5.102.1801 COMMITTED Open Secure Shell Server
    openssh.man.en_US 7.5.102.1801 COMMITTED Open Secure Shell
    Documentation - U.S. English
    openssl.base 1.0.2.2002 COMMITTED Open Secure Socket Layer
    openssl.license 1.0.2.2002 COMMITTED Open Secure Socket License
    openssl.man.en_US 1.0.2.2002 COMMITTED Open Secure Socket Layer

    Path: /etc/objrepos
    openssh.base.client 7.5.102.1801 COMMITTED Open Secure Shell Commands
    openssh.base.server 7.5.102.1801 COMMITTED Open Secure Shell Server
    openssl.base 1.0.2.2002 COMMITTED Open Secure Socket Layer
    # rpm -qa
    tcl-8.4.7-3.ppc
    expect-5.42.1-3.ppc
    readline-6.1-2.ppc
    gettext-0.19.7-1.ppc
    yum-metadata-parser-1.1.4-2.ppc
    db-4.8.24-3.ppc
    pysqlite-1.1.7-2.ppc
    ca-certificates-2016.10.7-2.ppc
    python-pycurl-7.19.3-1.ppc
    yum-3.4.3-7.noarch
    python-tools-2.7.10-1.ppc
    tk-8.4.7-3.ppc
    sqlite-3.15.2-1.ppc
    glib2-2.14.6-2.ppc
    gdbm-1.8.3-5.ppc
    python-2.7.10-1.ppc
    python-iniparse-0.4-1.noarch
    curl-7.52.1-1.ppc
    python-urlgrabber-3.10.1-1.noarch
    python-devel-2.7.10-1.ppc
    AIX-rpm-7.1.5.30-3.ppc
    #

    I tried to upgrade rpm.rte to 4.13.0.11
    The yum package seems to be the latest version 5

    Whatever I do I get the same error.
    The obvious would be to update all the rpm packages but I cant as yum is broken.
    I even tried to rebuild my internal rpm repo.

    Roland

    ------------------------------
    Roland Soderstrom
    ------------------------------


  • 2.  RE: Yum broken on new install

    Posted Fri October 30, 2020 05:51 AM
    Looks like "/usr/opt/rpm/bin/recreate_opt_bin_lib_links" would have created some issue here. 
    Can you list the below output.

    cd /opt/freeware/lib
    ls -l | grep "\/usr\/opt\/rpm"


    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: Yum broken on new install

    Posted Fri October 30, 2020 07:41 AM
    # cd /opt/freeware/lib
    # ls -l | grep "\/usr\/opt\/rpm"
    lrwxrwxrwx 1 root system 25 Oct 28 15:36 libbz2.a -> /usr/opt/rpm/lib/libbz2.a
    lrwxrwxrwx 1 root system 29 Oct 28 15:36 libfreebl3.a -> /usr/opt/rpm/lib/libfreebl3.a
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 libfreebl3.so -> /usr/opt/rpm/lib/libfreebl3.so
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 liblua-5.1.so -> /usr/opt/rpm/lib/liblua-5.1.so
    lrwxrwxrwx 1 root system 25 Oct 28 15:36 liblua.a -> /usr/opt/rpm/lib/liblua.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libmagic.a -> /usr/opt/rpm/lib/libmagic.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libnspr4.a -> /usr/opt/rpm/lib/libnspr4.a
    lrwxrwxrwx 1 root system 28 Oct 28 15:36 libnspr4.so -> /usr/opt/rpm/lib/libnspr4.so
    lrwxrwxrwx 1 root system 26 Oct 28 15:36 libnss3.a -> /usr/opt/rpm/lib/libnss3.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libnss3.so -> /usr/opt/rpm/lib/libnss3.so
    lrwxrwxrwx 1 root system 29 Oct 28 15:36 libnssckbi.a -> /usr/opt/rpm/lib/libnssckbi.a
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 libnssckbi.so -> /usr/opt/rpm/lib/libnssckbi.so
    lrwxrwxrwx 1 root system 29 Oct 28 15:36 libnssdbm3.a -> /usr/opt/rpm/lib/libnssdbm3.a
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 libnssdbm3.so -> /usr/opt/rpm/lib/libnssdbm3.so
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 libnssutil3.a -> /usr/opt/rpm/lib/libnssutil3.a
    lrwxrwxrwx 1 root system 31 Oct 28 15:36 libnssutil3.so -> /usr/opt/rpm/lib/libnssutil3.so
    lrwxrwxrwx 1 root system 26 Oct 28 15:36 libplc4.a -> /usr/opt/rpm/lib/libplc4.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libplc4.so -> /usr/opt/rpm/lib/libplc4.so
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libplds4.a -> /usr/opt/rpm/lib/libplds4.a
    lrwxrwxrwx 1 root system 28 Oct 28 15:36 libplds4.so -> /usr/opt/rpm/lib/libplds4.so
    lrwxrwxrwx 1 root system 26 Oct 28 15:36 libpopt.a -> /usr/opt/rpm/lib/libpopt.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libpopt.so -> /usr/opt/rpm/lib/libpopt.so
    lrwxrwxrwx 1 root system 29 Oct 28 15:36 libpopt.so.0 -> /usr/opt/rpm/lib/libpopt.so.0
    lrwxrwxrwx 1 root system 33 Oct 28 15:36 libpopt.so.0.0.0 -> /usr/opt/rpm/lib/libpopt.so.0.0.0
    lrwxrwxrwx 1 root system 28 Oct 28 15:36 libsmime3.a -> /usr/opt/rpm/lib/libsmime3.a
    lrwxrwxrwx 1 root system 29 Oct 28 15:36 libsmime3.so -> /usr/opt/rpm/lib/libsmime3.so
    lrwxrwxrwx 1 root system 30 Oct 28 15:36 libsoftokn3.a -> /usr/opt/rpm/lib/libsoftokn3.a
    lrwxrwxrwx 1 root system 31 Oct 28 15:36 libsoftokn3.so -> /usr/opt/rpm/lib/libsoftokn3.so
    lrwxrwxrwx 1 root system 26 Oct 28 15:36 libssl3.a -> /usr/opt/rpm/lib/libssl3.a
    lrwxrwxrwx 1 root system 27 Oct 28 15:36 libssl3.so -> /usr/opt/rpm/lib/libssl3.so
    lrwxrwxrwx 1 root system 23 Oct 28 15:36 libz.a -> /usr/opt/rpm/lib/libz.a
    lrwxrwxrwx 1 root system 20 Oct 28 15:36 rpm -> /usr/opt/rpm/lib/rpm
    lrwxrwxrwx 1 root system 28 Oct 28 15:36 rpmpopt -> /usr/opt/rpm/lib/rpm/rpmpopt
    lrwxrwxrwx 1 root system 22 Oct 28 15:36 rpmrc -> /usr/opt/rpm/lib/rpmrc
    #

    ------------------------------
    Roland Soderstrom
    ------------------------------



  • 4.  RE: Yum broken on new install

    Posted Fri October 30, 2020 07:44 AM
    btw, I have reinstalled many times (with NIM), this is just a test-server I can do whatever I like.

    ------------------------------
    Roland Soderstrom
    ------------------------------



  • 5.  RE: Yum broken on new install

    Posted Fri October 30, 2020 08:53 AM
    Things are looking fine.
    Can you execute these and share it here ? 
    ls -l /usr/lib/libxml2.a
    sum /usr/lib/libxml2.a

    ------------------------------
    Ayappan P
    ------------------------------



  • 6.  RE: Yum broken on new install

    Posted Fri October 30, 2020 09:17 AM
    # ls -l /usr/lib/libxml2.a
    lrwxrwxrwx 1 bin bin 22 Oct 28 15:15 /usr/lib/libxml2.a -> /usr/ccs/lib/libxml2.a
    # sum /usr/lib/libxml2.a
    59637 21706 /usr/lib/libxml2.a
    #

    ------------------------------
    Roland Soderstrom
    ------------------------------



  • 7.  RE: Yum broken on new install

    Posted Fri October 30, 2020 10:13 AM
    Edited by Ayappan P Fri October 30, 2020 10:19 AM
    I think there seems to be some issue with your internal repodata.  
    Does it have only sqlite files or only xml files ? And do you have any preference (sqlite vs xml) set in yum.conf file ?

    ------------------------------
    Ayappan P
    ------------------------------



  • 8.  RE: Yum broken on new install

    Posted Fri October 30, 2020 11:44 AM

    I thought of that too
    But why is all my other LPARs working against the same repo?

    I have rebuilt my repo from scratch, same issue, and my old LPARS are still working fine
    To make my repo I followed this guide aix-yum-installation/
    As said it's working for all others but my new install.

    I use this to rebuild a specific repo, on the reposerver (sles 12.5)
    createrepo --checksum sha --update /srv/www/htdocs/aix/public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc

    On my new LPAR

    # cat /opt/freeware/etc/yum/yum.conf
    [main]
    cachedir=/var/cache/yum
    keepcache=1
    debuglevel=10
    logfile=/var/log/yum.log
    exactarch=1
    obsoletes=1
    plugins=1
    sslverify=0

    [AIX_Toolbox]
    name=AIX generic repository
    #baseurl=https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
    baseurl=https://myreposerver.domain.com/aix/public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
    sslverify=0
    enabled=1
    gpgcheck=0



    ------------------------------
    Roland Soderstrom
    ------------------------------



  • 9.  RE: Yum broken on new install

    Posted Mon November 02, 2020 01:17 AM
    Looks like your repodata doesn't have sqlite db files. createrepo would have been run without generating the sqlite db files. 
    The yum metadata parser prefers sqlite over xml. If sqlite db files are not there, it falls back to xml. 
    But the yum bundle uses AIX libxml2 which don't have compression support (zlib) , so it won't be able to read the compressed repodata xml files ( *.xml.gz).

    Once you update the rpms after a successful yum installation. it picks up the Toolbox libxml2 which has compression support so it will work with the compressed repodata xml files. 

    So i would suggest you to create the repo with sqlite db files.

    ------------------------------
    Ayappan P
    ------------------------------



  • 10.  RE: Yum broken on new install

    Posted Mon November 02, 2020 01:59 AM
    It is very strange that this setup could read XML files some months back.

    How do I create the repo with sqlite db files?
    Like this?
    Or are there more options needed?
    createrepo --createdb --checksum sha --update /srv/www/htdocs/aix/public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc

    - Roland

    ------------------------------
    Roland Soderstrom
    ------------------------------



  • 11.  RE: Yum broken on new install

    Posted Mon November 02, 2020 02:12 AM
    By default, it should create the sqlite db files. 

    createrepo --help (version 0.9.9) shows 

    -d, --database create sqlite database files: now default, see --no-database to disable

    Please check the version of createrepo installed. 



    ------------------------------
    Ayappan P
    ------------------------------



  • 12.  RE: Yum broken on new install

    Posted Mon November 02, 2020 02:27 AM
    I see SUSE linux has changed the default for some reason. 
    https://build.opensuse.org/package/view_file/OBS:Server:2.5/createrepo/createrepo-0.9.9-by_default_no_database.patch?expand=0

    ------------------------------
    Ayappan P
    ------------------------------



  • 13.  RE: Yum broken on new install

    Posted Mon November 02, 2020 08:27 AM
    Yes, thats it.
    It works fine now when I use createrepo -database

    Now I will try this on my original problem with an upgrade to 7100-05-06 and newer openssh/openssl

    Thanks a lot for your help
    - Roland

    ------------------------------
    Roland Soderstrom
    ------------------------------