Bug 604529 - yum-plugin-verify reports small changes in mtime
Summary: yum-plugin-verify reports small changes in mtime
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 582655
TreeView+ depends on / blocked
 
Reported: 2010-06-16 07:52 UTC by Jan Hutař
Modified: 2014-01-21 06:18 UTC (History)
2 users (show)

(edit)
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)
Clone Of:
(edit)
Last Closed: 2011-05-19 13:34:31 UTC


Attachments (Terms of Use)
Seth's patch (830 bytes, patch)
2010-06-21 09:43 UTC, Šimon Lukašík
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0603 normal SHIPPED_LIVE yum-utils bug fix and enhancement update 2011-05-18 17:56:32 UTC

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


Note You need to log in before you can comment on or make changes to this bug.