Bug 1373587

Summary: modifyrepo produces floating point timestamps, causes error with RHEL7 yum
Product: Red Hat Enterprise Linux 6 Reporter: Pat Riehecky <riehecky>
Component: createrepoAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: ajb, csieh, james.antill, misterbonnie, toracat
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 10:33:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pat Riehecky 2016-09-06 16:13:27 UTC
Description of problem:
The timestamp field in RHEL7 does not accept floating point numbers, whereas RHEL6 will generate them.

Version-Release number of selected component (if applicable):createrepo-0.9.9-22.el6


How reproducible:


Steps to Reproduce:
1. modifyrepo filename repodata where filename will produce a float for stat_mtime
2.
3.

Actual results:
<data type="updateinfo">
  <checksum type="sha256">f82d07b2163b11f50b2d0b6f08282e7d852357eda815fb0b699275d2045e8a61</checksum>
  <open-checksum type="sha256">8c1194826261ed589d4fc4e9a2f07a4b6dcb90886f2ebd82d2c14232c7ef1992</open-checksum>
  <location href="repodata/updateinfo.xml.bz2"/>
  <timestamp>1472837835.89</timestamp>
  <size>83999</size>
</data>

Expected results:
<data type="updateinfo">
  <checksum type="sha256">f82d07b2163b11f50b2d0b6f08282e7d852357eda815fb0b699275d2045e8a61</checksum>
  <open-checksum type="sha256">8c1194826261ed589d4fc4e9a2f07a4b6dcb90886f2ebd82d2c14232c7ef1992</open-checksum>
  <location href="repodata/updateinfo.xml.bz2"/>
  <timestamp>1472837835</timestamp>
  <size>83999</size>
</data>

Additional info:
RHEL7 uses this code in modifyrepo.py

        new_rd.timestamp = str(int(os.stat(destmd).st_mtime))

whereas RHEL6 uses

        new_rd.timestamp = str(os.stat(destmd).st_mtime)

Comment 4 Pat Riehecky 2017-03-28 20:49:20 UTC
createrepo-0.9.9-26.el6 still contains this behavior

Comment 5 Jan Kurik 2017-12-06 10:33:39 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/