I have been creating Solaris packages for application deployment for some time, however recently I became aware that deployed files had the same timestamp of when the package was created. Looking through the various manpages (pkgproto, prototype, attributes, etc) I cant seem to find any option to instruct pkgproto/pkgmk to preserve file timestamps.
Anyone know how to ensure file timestamps are preserved within Solaris packages?
The timestamps of the files are specified in the pkgmap file within the package. Example:
The very last column is the timestamp that the file will get. When you create the package, pkgmk uses the timestamp of that file during its run. So, it does preserve the timestamp. If you are saying you want the file to have the timestamp of the time when the package was installed, you have to edit the pkgmap file and replace all timestamps with the current time: