Bug 1960184 - An upgrade stomps on /etc/sysconfig/postgrey
Summary: An upgrade stomps on /etc/sysconfig/postgrey
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: postgrey
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabio Alessandro Locati
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-13 09:16 UTC by Nick
Modified: 2021-05-13 12:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-13 11:11:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nick 2021-05-13 09:16:09 UTC
Description of problem:
Upgrading postgrey stomps on an existing /etc/sysconfig/postgrey

Version-Release number of selected component (if applicable):
/etc/sysconfig/postgrey

How reproducible:
Always

Steps to Reproduce:
1.Install an older version of postgrey
2.Edit something in /etc/sysconfig/postgrey
3.Upgrade postgrey

Actual results:
You get a new /etc/sysconfig/postgrey

Expected results:
/etc/sysconfig/postgrey should not change

Proposed solution:
In the spec file %files section, change:
%{_sysconfdir}/sysconfig/postgrey

to:
%config(noreplace) %{_sysconfdir}/sysconfig/postgrey

Comment 1 Nick 2021-05-13 11:11:03 UTC
Hmm. It may be necessary as the file has changed. previously a simple:
POSTGREY_OPTS="--delay=300 --max-age=35"

was fine. Now it seems you have to set further options as the systemd unit file has changed or the start up options have. It would have been nicer to have a %config noreplace and a smart %post to add in the other parameters.

I'll mark the bug as invalid.

Comment 2 Nick 2021-05-13 12:58:26 UTC
From the mailing list:

In that case, shouldn't we change the line to
   %config %{_sysconfdir}/sysconfig/postgrey
so that the old file is saved at
   %{_sysconfdir}/sysconfig/postgrey.rpmsave
? 

I think that would be better so at least the old values could be recovered


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