Bug 1307081 - [Patch] Timestamps for configuration files are not kept (causes warnings after Postfix update)
[Patch] Timestamps for configuration files are not kept (causes warnings afte...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: postfix (Show other bugs)
All All
low Severity medium
: rc
: ---
Assigned To: Jaroslav Škarvada
: EasyFix, FastFix, Patch
: 1365015 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2016-02-12 11:17 EST by Robert Scheck
Modified: 2018-03-20 21:42 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1307064
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
postfix-2.6.6-timestamp.patch (934 bytes, patch)
2016-02-13 08:02 EST, Robert Scheck
no flags Details | Diff
patch (1.50 KB, patch)
2016-10-31 04:09 EDT, Ondřej Lysoněk
no flags Details | Diff

  None (edit)
Description Robert Scheck 2016-02-12 11:17:34 EST
Description of problem:
By default all timestamps of /etc/postfix/* are the timestamps of "make
install" when the RPM package is built. While this is not an issue in general,
this may cause warnings after a postfix update in a common scenario like

Have /etc/postfix/virtual empty (like the default), but reference it within 
main.cf. This needs a "postmap /etc/postfix/virtual" indeed. Everything fine
so far. Then a postfix update happens, /etc/postfix/virtual gets replaced by
the newer file from the RPM package - which leads to a newer timestamp. This 
however makes postfix complaining in logs: "postfix/smtpd[11483]: warning: 
database /etc/postfix/virtual.db is older than source file /etc/postfix/
virtual". The main point here, is that the content of virtual nor virtual.db
changed, just the timestamp of the "source" file.

This issue could be avoided if "install -p" rather "install" is used or if
there is a "touch -c -r <reference>" within the spec file. If there is any
upstream change of one of these files, the newer filestamp would indeed be
applied and thus causes a *.rpmnew (if the original file was touched) - as
it's expected further on.

Version-Release number of selected component (if applicable):

How reproducible:
Everytime, see above.

Actual results:
Timestamps for configuration files are not kept (causes warnings after Postfix 

Expected results:
Timestamps for configuration files should be kept (thus no Postfix warnings).

Additional info:
Cross-filed case 01582767 on the Red Hat customer portal.
Comment 2 Robert Scheck 2016-02-13 08:02 EST
Created attachment 1123776 [details]
Comment 3 Ondřej Lysoněk 2016-08-29 10:36:44 EDT
*** Bug 1365015 has been marked as a duplicate of this bug. ***
Comment 4 Robert Scheck 2016-08-29 12:32:35 EDT
As mentioned in bug #1307066 comment #7 the situation and the patch might
not be suitable for upstream, but relevant for downstreams which are not
constantly rebasing Postfix, but patching it like Red Hat does with RHEL;
the situation outlined in the initial description IS real life with RHEL.
Comment 6 Ondřej Lysoněk 2016-10-31 04:09 EDT
Created attachment 1215701 [details]

I'm attaching a new upstream patch. The new '-keep-new-mtime' option will have to be added to the invocation of the 'postfix-install' script in the %install phase of the spec file.

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