Bug 604529

Summary: yum-plugin-verify reports small changes in mtime
Product: Red Hat Enterprise Linux 6 Reporter: Jan Hutař <jhutar>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: ksrot, slukasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: yum-utils-1.1.30-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: python time resolution is a float, but os.stat as saved by rpm is int Consequence: we compare (1.2 == 1) and fail, when we should succeed Fix: we turn the python timestamp into an int, and only check that Result: we "succeed" (files verify)
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:34:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 582655    
Attachments:
Description Flags
Seth's patch none

Description Jan Hutař 2010-06-16 07:52:15 UTC
Description of problem:
yum-plugin-verify (verify-rpm command) reports small (<1s) changes in mtime, that rpm -V do not report.


Version-Release number of selected component (if applicable):
yum-3.2.27-9.el6.noarch
yum-plugin-verify-1.1.26-9.el6.noarch
kernel-2.6.32-28.el6.i686
kernel-2.6.32-33.el6.i686


How reproducible:
always (tested on one i386 RHEL6 system)


Steps to Reproduce:
1. # rpm -V kernel-2.6.32-28.el6.i686
   <no output>
2. # yum verify-rpm kernel-2.6.32-28.el6.i686


Actual results:
# yum verify-rpm kernel-2.6.32-28.el6.i686
Loaded plugins: aliases, changelog, downloadonly, presto, protect-packages, refresh-packagekit, rhnplugin, security, tmprepo, verify,
              : versionlock
This system is not registered with RHN.
RHN support will be disabled.
==================== Installed Packages ====================
kernel.i686 : The Linux kernel
    File: /boot/config-2.6.32-28.el6.i686
        Problem:  mtime does not match
        Current:  Thu May 20 14:54:21 2010 (0:00:00.935743 later)
        Original: Thu May 20 14:54:21 2010
    File: /boot/vmlinuz-2.6.32-28.el6.i686
        Problem:  mtime does not match
        Current:  Thu May 20 14:54:21 2010 (0:00:00.329743 later)
        Original: Thu May 20 14:54:21 2010
verify-rpm done


Expected results:
`yum verify-rpm` should not report any issues here.

Comment 1 seth vidal 2010-06-17 18:25:06 UTC
if you could, apply this patch and test:
  http://fpaste.org/ueO3/

Comment 2 Šimon Lukašík 2010-06-21 09:43:30 UTC
Created attachment 425580 [details]
Seth's patch

I am reattaching Seth's patch as it's already expired in fpaste.org.

Comment 3 Šimon Lukašík 2010-06-21 10:14:43 UTC
From what I know: it's not 100% reproducible.

On 2010-06-16 I've seen this behaviour. With another machine that Jan had. 

Now I've tried 4+ machines with exactly same package set with no success.

Comment 4 Šimon Lukašík 2010-06-21 10:37:03 UTC
Great, I finally reproduced it. Patch works well for me.

Before patch:

# yum verify-rpm kernel-2.6.32-33.el6.i686
Loaded plugins: rhnplugin, verify
This system is not registered with RHN.
RHN support will be disabled.
==================== Installed Packages ====================
kernel.i686 : The Linux kernel
    File: /boot/.vmlinuz-2.6.32-33.el6.i686.hmac
        Problem:  mtime does not match
        Current:  Thu Jun  3 13:07:19 2010 (0:00:00.990208 later)
        Original: Thu Jun  3 13:07:19 2010
verify-rpm done


After applying patch:

# yum verify-rpm kernel-2.6.32-33.el6.i686
Loaded plugins: rhnplugin, verify
This system is not registered with RHN.
RHN support will be disabled.
verify-rpm done

# rpm -q yum yum-plugin-verify kernel
yum-3.2.27-9.el6.noarch
yum-plugin-verify-1.1.26-9.el6.noarch
kernel-2.6.32-33.el6.i686

Comment 5 Jan Hutař 2010-07-15 10:49:25 UTC
Thanks Simon.

Comment 6 Fedora Update System 2010-08-05 23:46:14 UTC
yum-3.2.28-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Šimon Lukašík 2011-01-25 17:44:46 UTC
Hello Karel,

Not much I can help here. If I remember correctly, this was not 100%
reproducible. I have tried about 10 fresh installed machines (certainly
not more) and problem appeared.

When I have had affected machine, I have applied Seth's patch manually
and behaviour was correct then.

Comment 12 James Antill 2011-05-05 19:25:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: python time resolution is a float, but os.stat as saved by rpm is int
Consequence: we compare (1.2 == 1) and fail, when we should succeed
Fix: we turn the python timestamp into an int, and only check that
Result: we "succeed" (files verify)

Comment 13 errata-xmlrpc 2011-05-19 13:34:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0603.html