Bug 1307066

Summary: [Patch] Timestamps for configuration files are not kept (causes warnings after Postfix update)
Product: Red Hat Enterprise Linux 6 Reporter: Robert Scheck <redhat-bugzilla>
Component: postfixAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Andrej Dzilský <adzilsky>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: adzilsky, cww, olysonek, psklenar, robert.scheck, rupatel, thozza
Target Milestone: rcKeywords: EasyFix, FastFix, Reopened
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: postfix-2.6.6-8.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1307064 Environment:
Last Closed: 2017-03-21 11:30:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1269194, 1359261    
Attachments:
Description Flags
postfix-2.6.6-timestamp.patch
none
patch none

Description Robert Scheck 2016-02-12 15:42:11 UTC
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
this:

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):
postfix-3.0.3-5.fc24

How reproducible:
Everytime, see above.

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

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

Comment 1 Robert Scheck 2016-02-12 15:44:38 UTC
Affected version is indeed postfix-2.6.6-6.el6_7.1.x86_64, not .fc24 ;-)


Cross-filed case 01582767 on the Red Hat customer portal.

Comment 3 Robert Scheck 2016-02-13 12:45:14 UTC
Created attachment 1123774 [details]
postfix-2.6.6-timestamp.patch

Comment 4 Jaroslav Škarvada 2016-07-27 22:33:13 UTC
Thanks for the patch.

Comment 5 Jaroslav Škarvada 2016-08-29 15:08:51 UTC
When Red Hat shipped 6.8 on May 10, 2016 RHEL 6 entered Production Phase 2.
https://access.redhat.com/support/policy/updates/errata#Production_2_Phase
That means only "Critical and Important Security errata advisories (RHSAs) and
Urgent Priority Bug Fix errata advisories (RHBAs) may be released.

Moreover the proposed patch was rejected/reverted upstream:
http://marc.info/?l=postfix-users&m=147234137331669&w=2

Maybe that upstream will come with different solution later - we may fix the problem in RHEL-7.

Comment 6 Jaroslav Škarvada 2016-08-29 15:12:49 UTC
RHEL-7 bug 1307081.

Comment 7 Robert Scheck 2016-08-29 16:29:21 UTC
(In reply to Jaroslav Škarvada from comment #5)
> When Red Hat shipped 6.8 on May 10, 2016 RHEL 6 entered Production Phase 2.
> https://access.redhat.com/support/policy/updates/errata#Production_2_Phase
> That means only "Critical and Important Security errata advisories (RHSAs)
> and Urgent Priority Bug Fix errata advisories (RHBAs) may be released.

Well, waiting with this RHBZ until RHEL 6 enters Production Phase 2 is also
a nifty idea :-( I will follow up this part in the GSS ticket.

> Moreover the proposed patch was rejected/reverted upstream:
> http://marc.info/?l=postfix-users&m=147234137331669&w=2

That URL only returns "No such message." for me. Aside of that, I am not that
sure that upstream got the intention of this patch, because it doesn't break
anything there and is usually only relevant for downstreams which are patching
Postfix rather constantly rebasing, such as Red Hat with RHEL.

Comment 8 Jaroslav Škarvada 2016-08-29 17:09:22 UTC
(In reply to Robert Scheck from comment #7)
> (In reply to Jaroslav Škarvada from comment #5)
> > When Red Hat shipped 6.8 on May 10, 2016 RHEL 6 entered Production Phase 2.
> > https://access.redhat.com/support/policy/updates/errata#Production_2_Phase
> > That means only "Critical and Important Security errata advisories (RHSAs)
> > and Urgent Priority Bug Fix errata advisories (RHBAs) may be released.
> 
> Well, waiting with this RHBZ until RHEL 6 enters Production Phase 2 is also
> a nifty idea :-( I will follow up this part in the GSS ticket.
> 
This wasn't intentional.

> > Moreover the proposed patch was rejected/reverted upstream:
> > http://marc.info/?l=postfix-users&m=147234137331669&w=2
> 
> That URL only returns "No such message." for me. 
It seems like some problem with the marc, and it's not reproducible for everybody (it works for me), there is the following last post:

> Unfortunately, I have to roll back this change, because it may
> install files with non-root ownership.
> 
> Those who built postfix-3.2-2060827 should do "postfix set-permissions"
> or install postfix-3.2-2060828 which I will upload in a few minutes
> time to ftp.porcupine.org.

> Aside of that, I am not that
> sure that upstream got the intention of this patch, because it doesn't break
> anything there and is usually only relevant for downstreams which are
> patching
> Postfix rather constantly rebasing, such as Red Hat with RHEL.

I can't understand why it's show stopper for RHEL-6 in product phase 2 - there will be probably not much updates if any.

Comment 13 Ondřej Lysoněk 2016-10-31 08:32:05 UTC
Created attachment 1215716 [details]
patch

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.

Comment 14 Jaroslav Škarvada 2016-10-31 17:16:34 UTC
(In reply to Ondřej Lysoněk from comment #13)
> Created attachment 1215716 [details]
> patch
> 
> 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.

Thanks for the patch.

Comment 18 errata-xmlrpc 2017-03-21 11:30:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0752.html