Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  dnf reposync --remote-time results in current timestamp

    Posted Thu September 14, 2023 10:56 AM
    Edited by Yves-Sandro Foltys Fri September 15, 2023 05:31 AM

    Hi,

    I'm trying to make the AIX Toolbox locally available. To avoid issues with wrong timestamps, I specified the option --remote-time but that doesn't have any effect. I tried the same on Fedora and there the option seems to work as expected.

    AIX:

    /tmp # /opt/freeware/bin/dnf reposync --repoid AIX_Toolbox_noarch --remote-time -v --newest-only
    Loaded plugins: changelog, config-manager, debug, generate_completion_cache, migrate, repoclosure, repodiff, repograph, repomanage, reposync
    DNF version: 4.2.17
    cachedir: /var/cache/dnf
    os-release file not found
    os-release: falling back to basic User-Agent: missing NAME or VERSION_ID
    AIX noarch repository                                                                                                                                                                                                       6.3 kB/s | 2.7 kB     00:00    
    reviving: 'AIX_Toolbox_noarch' can be revived - repomd matches.
    AIX_Toolbox_noarch: using metadata from Thu Sep  7 12:26:42 MSZ 2023.
    No module defaults found
    Completion plugin: Generating completion cache...
    (1/297): autoconf-2.71-1.aix6.1.noarch.rpm                                                                                                                                                                                  587 kB/s | 965 kB     00:01    
    (2/297): autoconf213-2.13-1.aix5.1.noarch.rpm                                                                                                                                                                               838 kB/s | 230 kB     00:00    
    (3/297): automake-1.16.5-1.aix6.1.noarch.rpm                                                                                                                                                                                1.2 MB/s | 1.0 MB     00:00    
    (4/297): bash-completion-2.11-1.aix6.1.noarch.rpm                                                                                                                                                                           771 kB/s | 316 kB     00:00    
    ...
    /tmp # date 
    Thu Sep 14 15:55:47 MSZ 2023
    /tmp/AIX_Toolbox_noarch/automake # ls -l
    total 2040
    -rw-------    1 root     system      1042488 Sep 14 15:54 automake-1.16.5-1.aix6.1.noarch.rpm
    

    Looking at the repository https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/ the latest automake version has been uploaded "2022-05-06 06:02".

    Fedora:

    [root@fedora tmp]# dnf reposync --repoid google-chrome --remote-time -v
    ...
    [root@fedora google-chrome]# date
    Thu Sep 14 04:03:56 PM CEST 2023
    [root@fedora google-chrome]# ls -l
    total 310384
    -rw-r--r--. 1 root root 106167436 Sep 12 06:14 google-chrome-beta-118.0.5993.11-1.x86_64.rpm
    -rw-r--r--. 1 root root 105494000 Sep  9 02:33 google-chrome-stable-117.0.5938.62-1.x86_64.rpm
    -rw-r--r--. 1 root root 106166764 Sep 12 06:15 google-chrome-unstable-118.0.5993.11-1.x86_64.rpm
    

    I added the "AIX_Toolbox_noarch" repository on Fedora and downloaded it with the below command. Checking the timestamps afterwards, I see the correct timestamps taking from the repository:

    [root@fedora tmp]# dnf reposync --repoid AIX_Toolbox_noarch --remote-time --newest-only
    AIX noarch repository                                                                                              1.9 MB/s | 2.8 MB     00:01    
    Last metadata expiration check: 0:00:01 ago on Fri 15 Sep 2023 10:51:18 AM CEST.
    (1/297): ansible-core-2.14.2-1.aix7.1.noarch.rpm                                                                   2.9 MB/s | 3.5 MB     00:01    
    (2/297): autoconf213-2.13-1.aix5.1.noarch.rpm                                                                      2.7 MB/s | 230 kB     00:00    
    (3/297): automake-1.16.5-1.aix6.1.noarch.rpm                                                                       4.3 MB/s | 1.0 MB     00:00    
    (4/297): autoconf-2.71-1.aix6.1.noarch.rpm                                                                         618 kB/s | 965 kB     00:01    
    ...
    [root@fedora automake]# pwd
    /tmp/AIX_Toolbox_noarch/automake
    [root@fedora automake]# ls -l
    total 1020
    -rw-r--r--. 1 root root 1042488 May  6  2022 automake-1.16.5-1.aix6.1.noarch.rpm
    

    So this doesn't seem to be a repository issue. Hence went back to AIX and checked /var/log/dnf.librepo.log

    Using a JFS2 Filesystem as target I found the following:

    2023-09-15T08:26:03Z DEBUG Selecting mirror for: automake/automake-1.16.5-1.aix6.1.noarch.rpm
    2023-09-15T08:26:03Z INFO Downloading: anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm
    2023-09-15T08:26:03Z DEBUG prepare_next_transfer: Resume ignored, existing file was not originally being downloaded by Librepo
    2023-09-15T08:26:03Z DEBUG add_librepo_xattr: Cannot set xattr user.Librepo.DownloadInProgress (/tmp/AIX_Toolbox_noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm): The media is not formatted or the format is not correct.
    2023-09-15T08:26:03Z DEBUG lr_headercb: Server returned Content-Length: "1042488" (converted 1042488/1042488 expected)
    2023-09-15T08:26:04Z DEBUG Transfer finished: automake/automake-1.16.5-1.aix6.1.noarch.rpm (Effective url: anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm)">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm)
    2023-09-15T08:26:04Z DEBUG check_finished_transfer_checksum: Checksum (sha256) 8b47b298bfd8f137c0ebecebac6d645994ab21f4d95ae84ef2a0d79d3ec55d68 is OK

    So xattr seems to fail with "The media is not formatted or the format is not correct."

    Tried to use a JFS filesystems instead, but received the following messages in the log:

    2023-09-15T08:35:10Z DEBUG Selecting mirror for: automake/automake-1.16.5-1.aix6.1.noarch.rpm
    2023-09-15T08:35:10Z INFO Downloading: anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm
    2023-09-15T08:35:10Z DEBUG prepare_next_transfer: Resume ignored, existing file was not originally being downloaded by Librepo
    2023-09-15T08:35:10Z DEBUG add_librepo_xattr: Cannot set xattr user.Librepo.DownloadInProgress (/tmp/test/AIX_Toolbox_noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm): The system call does not exist on this system.
    2023-09-15T08:35:10Z DEBUG lr_headercb: Server returned Content-Length: "1042488" (converted 1042488/1042488 expected)
    2023-09-15T08:35:11Z DEBUG Transfer finished: automake/automake-1.16.5-1.aix6.1.noarch.rpm (Effective url: anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm)">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/automake/automake-1.16.5-1.aix6.1.noarch.rpm)
    2023-09-15T08:35:11Z DEBUG check_finished_transfer_checksum: Checksum (sha256) 8b47b298bfd8f137c0ebecebac6d645994ab21f4d95ae84ef2a0d79d3ec55d68 is OK

    "The system call does not exist on this system"

    To me it looks like the way reposync wants to set the file attributes isn't compatible with JFS2. 

    Is there a way to solve this?

    Any help would be highly appreciated.

    Thanks and regards,

    Yves



    ------------------------------
    Yves-Sandro Foltys
    ------------------------------


    #AIXOpenSource


  • 2.  RE: dnf reposync --remote-time results in current timestamp

    Posted Fri September 15, 2023 08:00 AM

    Hi Yves,

    Thanks for the detailed analysis.

    We will check this and let you know.



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



  • 3.  RE: dnf reposync --remote-time results in current timestamp

    Posted Wed October 04, 2023 09:05 AM

    Hi Sangamesh,

    did you have a chance to take a deeper look? 

    Regards,
    Yves



    ------------------------------
    Yves-Sandro Foltys
    ------------------------------



  • 4.  RE: dnf reposync --remote-time results in current timestamp

    Posted Fri October 06, 2023 08:20 AM

    Hi Foltys,

    Yes. We identified the problem with librepo extended attribute calls used.

    We are doing some testing with the changes.



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



  • 5.  RE: dnf reposync --remote-time results in current timestamp

    Posted Fri November 03, 2023 04:28 AM

    Hi,
    I found you uploaded librepo 1.11.0-103 to the Toolbox. Installed that version and tested again. This time it seems to work as expected.

    /tmp # /opt/freeware/bin/dnf reposync --repoid AIX_Toolbox_noarch --remote-time -v --newest-only
    Loaded plugins: changelog, config-manager, debug, generate_completion_cache, migrate, repoclosure, repodiff, repograph, repomanage, reposync
    DNF version: 4.2.17
    cachedir: /var/cache/dnf
    Unknown configuration option: fastestmirror_enabled = 0 in /opt/freeware/etc/yum/repos.d/ITCenter_AIX_RPM_repository.repo
    Unknown configuration option: fastestmirror_enabled = 0 in /opt/freeware/etc/yum/repos.d/ITCenter_AIX_RPM_repository.repo
    Unknown configuration option: fastestmirror_enabled = 0 in /opt/freeware/etc/yum/repos.d/ITCenter_AIX_RPM_repository.repo
    Unknown configuration option: fastestmirror_enabled = 0 in /opt/freeware/etc/yum/repos.d/ITCenter_AIX_RPM_repository.repo
    os-release file not found
    os-release: falling back to basic User-Agent: missing NAME or VERSION_ID
    AIX noarch repository                                                                                                                                                                                                       6.3 kB/s | 2.7 kB     00:00    
    reviving: 'AIX_Toolbox_noarch' can be revived - repomd matches.
    AIX_Toolbox_noarch: using metadata from Mon Oct  9 16:19:59 MSZ 2023.
    No module defaults found
    Completion plugin: Generating completion cache...
    (1/307): autoconf-2.71-1.aix6.1.noarch.rpm                                                                                                                                                                                  547 kB/s | 965 kB     00:01    
    (2/307): autoconf213-2.13-1.aix5.1.noarch.rpm                                                                                                                                                                               808 kB/s | 230 kB     00:00    
    (3/307): ansible-core-2.14.2-2.aix7.1.noarch.rpm                                                                                                                                                                            1.4 MB/s | 3.5 MB     00:02    
    (4/307): automake-1.16.5-1.aix6.1.noarch.rpm                                                                                                                                                                                2.4 MB/s | 1.0 MB     00:00    
    (5/307): bash-completion-2.11-1.aix6.1.noarch.rpm                                                                                                                                                                           1.0 MB/s | 316 kB     00:00    
    ...
    /tmp/AIX_Toolbox_noarch/automake # ls -l
    total 2040
    -rw-------    1 root     system      1042488 May 06 2022  automake-1.16.5-1.aix6.1.noarch.rpm
    

    That is the same timestamp as shown by the FTP server.

    So thank you very much for your work and the update to the package.



    ------------------------------
    Yves-Sandro Foltys
    ------------------------------