Power Global

 View Only
  • 1.  dnf createrepo and reposync

    Posted Wed January 26, 2022 10:17 AM
    Hello
    I started to use dnf on our NIM server (no yum before).
    We plan to sync the aixtoolbox repo to this LPAR and all other will use the NIM as a repo server.

    I manually downloaded the repo and it worked but to have it more recent I would like to sync the repo from IBM regularly.
    As far I know this will be done with createrepo and "dnf reposync" but this is not available.
    DNF version: 4.2.17

    Is there another way of doing it or will this functions be available in the near future?
    Thanks

    ------------------------------
    Stefan Koller
    ------------------------------


  • 2.  RE: dnf createrepo and reposync

    Posted Wed January 26, 2022 12:31 PM
    Hi Stefan,

    we don't use dnf yet, but "reposync" seems to be a standalone binary which can be find by "which" and is installed by yum-utils in our case.

    root@aixserver0001 /root/ # which reposync
    /usr/bin/reposync
    root@aixserver0001 /root/ # rpm -q --whatprovides /usr/bin/reposync
    yum-utils-1.1.31-2.noarch
    root@aixserver0001 /root/ # yum --version | head -n1
    3.4.3

    Best regards

    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------



  • 3.  RE: dnf createrepo and reposync

    Posted Thu January 27, 2022 02:33 PM

    Hi Stefan,

    correct, you have to install yum-utils and createrepo in addition.

    Install:
    dnf install yum-utils
    dnf install createrepo

    reposync:
    example.
    reposync -p /export/Repo_V2.2/ -r AIX_Toolbox -a ppc
    reposync -p /export/Repo_V2.2/ -r AIX_Toolbox_72 -a ppc
    reposync -p /export/Repo_V2.2/ -r AIX_Toolbox_noarch

    createrepo:
    example.
    createrepo /export/Repo_V2.2/AIX_Toolbox
    createrepo /export/Repo_V2.2/AIX_Toolbox_72
    createrepo /export/Repo_V2.2/AIX_Toolbox_noarch

    My recommendation is not to use your nim server for dnf. Create you own dedicated LPAR. And if possible one for prod and one for development.

    CHers Patrick



    ------------------------------
    Patrick Hügli
    ------------------------------



  • 4.  RE: dnf createrepo and reposync

    IBM Champion
    Posted Fri January 28, 2022 03:07 PM
    Hello Stefan,

    reposync is now a plugin in dnf. So you need to install these these rpm as well... python3-dnf-plugin-migrate-4.0.16-32_1.noarch and python3-dnf-plugins-core-4.0.16-32_1.noarch


    regards,
    Joerg

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 5.  RE: dnf createrepo and reposync

    Posted Tue February 01, 2022 05:22 PM
    Hello Joerg and Patrick 

    Thanks for your input. I got it running. Short summary for everybody.

    I had to install the mentioned rpm "python3-dnf-plugins-core-4.0.16-32_1.noarch" to get the reposync plugin.
    It is not on the Toolbox-Repos but in the dnf_bundle_aix_71_72.tar on ezinstall.

    If you run the install_dnf.sh this fileset is explicitly excluded if you choose to install dnf only (without yum installed already).

    After installing the rpm the reposync and other plugins are available.

    If you would install the yum-utils it would also install yum and python2 rpms. This seems to be obsolete.
    Thanks to all 


    ------------------------------
    Stefan Koller
    ------------------------------



  • 6.  RE: dnf createrepo and reposync

    Posted Thu June 16, 2022 09:24 AM
    Hi Stefan, 
    You are right. One should not install yum-utils and other yum utilities if they are using dnf. 
    One yum is obsolete and other it will create issues when on updates the packages with conflict of yum3 and yum4.
    Now AIX Toolbox repo is also updated with all the dnf plugins, createrepo_c, dnf_utils and other tools needed to maintain local repo.

    ------------------------------
    SANKET RATHI
    ------------------------------