[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpm --verify, timestamp differences



Jeff Johnson wrote:

On Jun 13, 2008, at 8:54 PM, Robin Bowes wrote:

Hi,

Can anyone tell me why, on a newly-installed (from kickstart) minimal CentOS system, some of the packages fail verification because of timestamp differences on some files?

For example:
# rpm --verify device-mapper
.......T   /usr/include/libdevmapper-event.h
.......T   /usr/include/libdevmapper.h
.......T d /usr/share/man/man8/dmsetup.8.gz

Now, it would be possibly understandable if the files that were changed were config files, but those listed above are a couple of headers and a man page.

Why would the timestamps be different than the metadata in the RPM database?


The issue is peculier to kickstart & anaconda, not rpm. I have personally
seen the rpm --verify complaints, but only immediately after kickstart/anaconda
installs/upgrades.

Meanwhile, its easier to just fix the mtimes than to try to understand Why ... ?

Here's a means to reestablish file mtimes whenever necessary using --setmtimes
popt alias wrapper to the necessary touch(1) command.

Disclaimer: I haven't tested this --setmtimes alias for over a year, its just some
litter that I happen to have lying around.

Add this popt alias for --setmtimes to /etc/popt:

rpm alias --setmtimes -q --qf '[\[ -L %{FILENAMES:shescape} \] || touch -m -c --date="%{FILEMTIMES:date}" %{FILENAMES:shescape}\n]' \
                --pipe "sh"
        --POPTdesc=$"set mtime of file(s) in a package"

Choose some package "foo" to test.

Type
     rpm --setmtimes foo
to verify functionality. Lather rinse repeat until you are confident
that --setmtimes does what its supposed to do.

(aside) I considered carrying --setmtimes as Yet Another option in rpm, but
the pain of adding --setmtimes to rpm does not justify the gain of
repairing (and concealing) kickstart/anaconda flaws imho.

YMMV, everyone's does.

hth

Jeff,

Thanks - I'll give that a shot.

R.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]