Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   RPM Package Manager (http://www.linux-archive.org/rpm-package-manager/)
-   -   rpm --verify, timestamp differences (http://www.linux-archive.org/rpm-package-manager/106473-rpm-verify-timestamp-differences.html)

Robin Bowes 06-14-2008 12:54 AM

rpm --verify, timestamp differences
 
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?

R.

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

Jeff Johnson 06-14-2008 04:34 PM

rpm --verify, timestamp differences
 
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}
]'

--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

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

Robin Bowes 06-14-2008 08:05 PM

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}
]'

--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.

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list

Robin Bowes 06-16-2008 04:52 PM

rpm --verify, timestamp differences
 
Robin Bowes wrote:

Jeff,

Thanks - I'll give that a shot.


OK, so I the popt macro.

Mixed results - some packages worked OK, others didn't. Example:

# rpm --verify device-mapper
.......T /sbin/dmeventd
.......T /sbin/dmsetup
.......T /sbin/dmsetup.static
.......T /usr/include/libdevmapper-event.h
.......T /usr/include/libdevmapper.h
.......T d /usr/share/man/man8/dmsetup.8.gz

# rpm --setmtimes device-mapper

# rpm --verify device-mapper
.......T /sbin/dmeventd
.......T /sbin/dmsetup
.......T /sbin/dmsetup.static
.......T /usr/include/libdevmapper-event.h
.......T /usr/include/libdevmapper.h
.......T d /usr/share/man/man8/dmsetup.8.gz


Also, there problems other than mtime, e.g:

# rpm --verify setup
S.5..... c /etc/securetty



Any ideas what's still wrong?

R.

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list


All times are GMT. The time now is 09:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.