AIX Open Source

 View Only
Expand all | Collapse all

dnf to create local repository

  • 1.  dnf to create local repository

    IBM Champion
    Posted Thu June 10, 2021 07:52 AM
    Hello Team,

    I updated the yum version on our repository server to the dnf (yum-4) version. Unfortunately the createrepo command is not implemented in dnf and the createrepo from the AIX Toolbox does not support yum-4.

    svrsrepo-0:/root#createrepo /repo/COOP_RPMS_noarch
    Traceback (most recent call last):
    File "/opt/freeware/share/createrepo/genpkgmetadata.py", line 29, in <module>
    import createrepo
    File "/opt/freeware/lib/python2.7/site-packages/createrepo/__init__.py", line 21, in <module>
    import yumbased
    File "/opt/freeware/lib/python2.7/site-packages/createrepo/yumbased.py", line 27, in <module>
    from yum.packages import YumLocalPackage
    ImportError: No module named yum.packages

    Does that mean I need to stay on yum-3 for the repository server or am I wrong?
    It might become a problem because of our security guidelines with using python2...

    Will the createrepo be updated for using dnf?

    Thanks a lot in advance for your support.

    Best regards

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


  • 2.  RE: dnf to create local repository

    Posted Thu June 10, 2021 10:02 AM
    Hello Joerg,

    createrepo is dependent on yum and createrepo_c is the replacement to use in dnf environment.
    We have already started working on that and will make that available in coming quarter.
    Right now dnf to be use at client side not on repo server. 
    We are doing in stages this development and rollout. 


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



  • 3.  RE: dnf to create local repository

    IBM Champion
    Posted Thu June 10, 2021 10:13 AM

    Thanks Sanket.
    I already tried to install createrepo_c via pip, but unfortunately it ended up with this message:

    RuntimeError: Unsupported platform: aix. Please contact the scikit-build team.

    So I will wait... Thanks again. You and your Team do a great job.



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



  • 4.  RE: dnf to create local repository

    Posted Mon January 10, 2022 07:53 PM
    Is there any update to when createrepo will be available for dnf?  Unfortunately, I installed dnf on my repo server before I read the fine print.  At this point, I guess I will have to uninstall dnf and install yum in order for my local repository to work.  Thank you for any help and information you can give.

    ------------------------------
    Frederick Butler
    ------------------------------



  • 5.  RE: dnf to create local repository

    Posted Tue January 11, 2022 05:23 AM
    Hi Frederick,

    Sorry for the delay in making this available.
    It would be made available in a week.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 6.  RE: dnf to create local repository

    Posted Wed January 12, 2022 04:07 AM
    Edited by C- -T Wed January 12, 2022 10:46 AM
    as our nimserver is also our repo server, and nim needs aix 7.3 first, i am also pretty interested to get the createrepo tool for dnf.


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 7.  RE: dnf to create local repository

    Posted Wed January 19, 2022 02:08 AM
    the week is over, we are still waiting for createrepo_c....? slowly we are getting under pressure here...we need to upgrade our nim server to proceed with aix 7.3 rollouts.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 8.  RE: dnf to create local repository

    Posted Wed January 19, 2022 02:35 AM
    The package should be available in a day or two on AIX toolbox.

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



  • 9.  RE: dnf to create local repository

    Posted Fri January 21, 2022 03:30 AM
    createrepo_c has been uploaded to AIX Toolbox.
    Use YUM/DNF to install createrepo_c.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 10.  RE: dnf to create local repository

    IBM Champion
    Posted Wed March 02, 2022 05:18 AM
    Thanks for the update.

    ------------------------------
    Martin Boban
    ------------------------------



  • 11.  RE: dnf to create local repository

    Posted Thu March 03, 2022 01:19 PM
    createrepo seems to work.
    But unfortunately repodiff and reposync does not:

    ImportError: No module named yum

    Is there an additional yum-module to install with dnf? I could not find any in the Toolbox.
    Or are there any new scripts repodiff and reposync?

    ------------------------------
    Winfried Oesterle
    AIX Administrator
    ------------------------------



  • 12.  RE: dnf to create local repository

    Posted Mon March 07, 2022 12:46 PM
    use "dnf repodiff" and "dnf reposync"

    Fred Butler
    UNIX Systems Administrator - AIXArch
    Walgreens Co.
    (224) 542-5887
    frederick.butler@walgreens.com





  • 13.  RE: dnf to create local repository

    Posted Tue March 08, 2022 09:35 AM
    Hello Frederick,

    Great!
    "dnf repodiff" and "dnf reposync" work.
    Thanks a lot!


    ------------------------------
    Winfried Oesterle
    AIX Administrator
    ------------------------------



  • 14.  RE: dnf to create local repository

    Posted Fri April 08, 2022 01:21 PM
    Hi team! Our NIMmaster is also our repo server. We've upgraded our NIMmaster to aix 7.3 and migrated to dnf  and installed createrepo_c but reposync fails as follows:

    root@nimmaster:/opt/freeware/etc/dnf> reposync
    Traceback (most recent call last):
    File "/usr/bin/reposync", line 43, in <module>
    import yum
    ImportError: No module named yum

    createrepo fails as follows:

    root@nimmaster:/opt/freeware/etc/dnf> createrepo
    exec(): 0509-036 Cannot load program createrepo because of the following errors:
    0509-150 Dependent module /opt/freeware/lib/libcurl.a(libcurl.so.4) could not be loaded.
    0509-103 The module has an invalid magic number.


    and when we run dnf reposync, dnf repodiff they fail with this message:

    root@nimmaster:/opt/freeware/etc/dnf> dnf repoquery | grep -i dnf
    Last metadata expiration check: 0:01:19 ago on Fri Apr 8 14:08:21 -03 2022.
    root@nimmaster:/opt/freeware/etc/dnf> dnf repoquery | grep -i rep
    Last metadata expiration check: 0:01:25 ago on Fri Apr 8 14:08:21 -03 2022.

    What are we doing wrong?.

    Thank you.
    Regards.
    Pablo.




    ------------------------------
    Pablo Pereira
    ------------------------------



  • 15.  RE: dnf to create local repository

    Posted Tue April 12, 2022 08:44 AM
    Hi Pablo,

    What is the curl version is installed in your machine ?
    Can you try updating curl and check ?

    ------------------------------
    SANGAMESH
    ------------------------------



  • 16.  RE: dnf to create local repository

    Posted Tue April 12, 2022 09:40 AM
    Hi Sangamesh; this is the curl version:
    root@nimmaster:/opt/freeware/etc/dnf> rpm -qa | grep -i curl
    curl-7.52.1-1.ppc
    python-pycurl-7.43.0-1.ppc

    We've ran dnf update to update everything to latest level.

    root@nimmaster:/opt/freeware/etc/dnf> dnf update
    Last metadata expiration check: 0:00:08 ago on Tue Apr 12 10:38:00 -03 2022.
    Dependencies resolved.
    Nothing to do.
    Complete!

    Anything else that we could check?.

    Thank you.
    Regard.
    Pablo.


    ------------------------------
    Pablo Pereira
    ------------------------------



  • 17.  RE: dnf to create local repository

    Posted Tue April 12, 2022 11:38 AM
    Hi Pablo,

    You can try updating the curl to latest version with dnf update curl.

    What's is the output of "dnf list curl"

    ------------------------------
    SANGAMESH
    ------------------------------



  • 18.  RE: dnf to create local repository

    Posted Tue April 19, 2022 01:53 PM
    Hi Sangamesh; this is the output:

    root@nimmaster:/> dnf update curl
    AIX generic repository 1.5 kB/s | 2.7 kB 00:01
    AIX noarch repository 3.8 kB/s | 2.6 kB 00:00
    AIX 7.3 specific repository 3.6 kB/s | 2.5 kB 00:00
    No match for argument: curl
    Error: No packages marked for upgrade.
    root@nimmaster:/>

    root@nimmaster:/> dnf list curl
    Last metadata expiration check: 0:02:00 ago on Tue Apr 19 14:45:00 -03 2022.
    Error: No matching Packages to list
    root@nimmaster:/>

    Thank you.
    Regards.
    Pablo.


    ------------------------------
    Pablo Pereira
    ------------------------------



  • 19.  RE: dnf to create local repository

    Posted Fri April 22, 2022 01:54 AM
    Hi Pablo,

    The latest curl available in our repo is 7.79.1.

    # dnf list curl
    Last metadata expiration check: 19:20:04 ago on Thu Apr 21 05:33:07 CDT 2022.
    Installed Packages
    curl.ppc 7.79.1-1 @AIX_Toolbox

    Please verify your repository and make sure you have the latest versions.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 20.  RE: dnf to create local repository

    Posted Fri April 22, 2022 12:15 PM
    Hi Sanglamesh,
    We've been able to update curl.  This are our versions now:

    root@nimmaster:/opt/freeware/etc/dnf> dnf list curl
    Last metadata expiration check: 0:39:41 ago on Fri Apr 22 12:33:06 -03 2022.
    Installed Packages
    curl.ppc 7.79.1-1 @AIX_Toolbox
    root@nimmaster:/opt/freeware/etc/dnf> dnf list dnf
    Last metadata expiration check: 0:40:03 ago on Fri Apr 22 12:33:06 -03 2022.
    Installed Packages
    dnf.ppc 4.2.17-64_50 @AIX_Toolbox_73
    root@nimmaster:/opt/freeware/etc/dnf> dnf list createrepo_c
    Last metadata expiration check: 0:40:08 ago on Fri Apr 22 12:33:06 -03 2022.
    Installed Packages
    createrepo_c.ppc 0.16.0-64_1 @AIX_Toolbox_73

    But "dnf createrepo" and "dnf reposync" are not working:
    root@nimmaster:/opt/freeware/etc/dnf> dnf reposync
    No such command: reposync. Please use /opt/freeware/bin/dnf --help
    It could be a DNF plugin command, try: "dnf install 'dnf-command(reposync)'"
    root@nimmaster:/opt/freeware/etc/dnf> dnf createrepo
    No such command: createrepo. Please use /opt/freeware/bin/dnf --help
    It could be a DNF plugin command, try: "dnf install 'dnf-command(createrepo)'"
    root@nimmaster:/opt/freeware/etc/dnf>

    The options are not shown on the help page either.
    Do you see something else that we could check?.

    Thank you.
    Regards.
    Pablo.


    ------------------------------
    Pablo Pereira
    ------------------------------



  • 21.  RE: dnf to create local repository

    Posted Tue April 26, 2022 10:06 AM
    Hi Pablo, 

    The dnf utils that provides reposync is bundled in the dnf tar (that used to setup dnf on AIX using dnf script). 
    But dnf on the repo (the individual rpm packages) does not the dnf-utils. We are uploading dnf-utils as separate rpm in couple of days.
    Once dnf-utils is available on the repo and you install then hope everything will work. 
    Sorry for inconvenience.

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



  • 22.  RE: dnf to create local repository

    Posted Wed April 27, 2022 07:49 AM
    Hi Pablo,

    Now you can install dnf-utils which provides reposync command.
    Either you can use dnf reposync or directly /opt/freeware/bin/reposync

    createrepo command comes from the separate createrepo_c package not as dnf plugin.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 23.  RE: dnf to create local repository

    Posted Wed April 27, 2022 11:39 AM
    Hi Sangamesh, thank you for your response.
    I've ran a dnf update and it upgraded the following:

    Upgraded:
    dnf-4.2.17-64_51.ppc
    dnf-automatic-4.2.17-64_51.ppc
    dnf-data-4.2.17-64_51.ppc
    python3-dnf-4.2.17-64_51.ppc

    I'm still unable to run "dnf createrepo", "dnf_reposync" or "reposync":

    root@nimmaster:/> dnf createrepo
    No such command: createrepo. Please use /opt/freeware/bin/dnf --help
    It could be a DNF plugin command, try: "dnf install 'dnf-command(createrepo)'"
    root@nimmaster:/> dnf reposync
    No such command: reposync. Please use /opt/freeware/bin/dnf --help
    It could be a DNF plugin command, try: "dnf install 'dnf-command(reposync)'"
    root@nimmaster:/> reposync
    ksh: reposync: not found.
    root@nimmaster:/> ls -l /opt/freeware/bin/*repo*
    lrwxrwxrwx 1 root system 12 Apr 08 13:13 /opt/freeware/bin/createrepo -> createrepo_c
    -rwxr-xr-x 1 root system 172470 Jan 20 06:07 /opt/freeware/bin/createrepo_c
    lrwxrwxrwx 1 root system 11 Apr 08 13:13 /opt/freeware/bin/mergerepo -> mergerepo_c
    -rwxr-xr-x 1 root system 131701 Jan 20 06:07 /opt/freeware/bin/mergerepo_c
    lrwxrwxrwx 1 root system 12 Apr 08 13:13 /opt/freeware/bin/modifyrepo -> modifyrepo_c
    -rwxr-xr-x 1 root system 41054 Jan 20 06:07 /opt/freeware/bin/modifyrepo_c
    -rwxr-xr-x 1 root system 89820 Jan 20 06:07 /opt/freeware/bin/sqliterepo_c
    root@nimmaster:/> dnf list createrepo_c
    Last metadata expiration check: 0:11:33 ago on Wed Apr 27 12:19:20 -03 2022.
    Installed Packages
    createrepo_c.ppc 0.16.0-64_1 @AIX_Toolbox_73
    root@nimmaster:/>

    also createrepo command doesn't seem to be included on the createrepo_c package installed on this machine:
    root@nimmaster:/> rpm -ql createrepo_c-0.16.0-64_1.ppc
    /opt/freeware/bin/createrepo
    /opt/freeware/bin/createrepo_c
    /opt/freeware/bin/mergerepo
    /opt/freeware/bin/mergerepo_c
    /opt/freeware/bin/modifyrepo
    /opt/freeware/bin/modifyrepo_c
    /opt/freeware/bin/sqliterepo_c
    /opt/freeware/doc/createrepo_c-0.16.0
    /opt/freeware/doc/createrepo_c-0.16.0/README.md
    /opt/freeware/share/bash-completion/completions/createrepo_c
    /opt/freeware/share/bash-completion/completions/mergerepo_c
    /opt/freeware/share/bash-completion/completions/modifyrepo_c
    /opt/freeware/share/bash-completion/completions/sqliterepo_c
    root@nimmaster:/>

    Thank you.
    Regards.
    Pablo.

    ------------------------------
    Pablo Pereira
    ------------------------------



  • 24.  RE: dnf to create local repository

    Posted Wed April 27, 2022 12:19 PM
    Hi Pablo,

    You need to install dnf-utils package that provides reposync. Please install dnf-utils package and verify. 


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



  • 25.  RE: dnf to create local repository

    Posted Wed April 27, 2022 12:52 PM
    Thank you!, It worked!. dnf-utils was missing.  I've installed it and now the tools for the repository are working.

    Thank you all for the support!.

    Regards.
    Pablo.

    ------------------------------
    Pablo Pereira
    ------------------------------