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

Re: keep timestamp of files installed by rpm



Circa 2003-03-10 17:08:29 -0500 dixit William Au:

: Is there anyway to make rpm preserve the original timestamp of files
: it installs?  It looks to me that the files installed by rpm all have
: timestamps of the time the rpm package was created.

That's not up to RPM.  It's up to what you do in the %install section
of your specfile.  Most %install sections do something similar to:

  make install DESTDIR="${RPM_BUILD_ROOT}"

which goes on to do something like:

  mkdir -p "${RPM_BUILD_ROOT}/blah/blah/bin"
  install -c -m 0755 blah "${RPM_BUILD_ROOT}/blah/blah/bin"

etc.  Note how a new directory is created, and how a file is copied to
the directory with 'install'.

Now, usually, what you're installing in the %install section are
binaries or other files that were just created in the %build section.
So the difference between the "original" timestamp of the file (the
date when, for example, 'gcc -o blah blah.o haha.o heehee.o -lm' was
done) is very close to the time that 'install -c' was done.

In short, it's your responsibility to preserve modification timestamps
in your specfile if they're important.

-- 
jim knoble  |  jmknoble@pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
Stop the War on Freedom ... Start the War on Poverty!

Attachment: pgp00008.pgp
Description: PGP signature


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