Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33839 - [postfix] configs aren't migrated on upgrade

Attached to Project: Arch Linux
Opened by Florian Pritz (bluewind) - Wednesday, 13 February 2013, 12:47 GMT
Last edited by Gaetan Bisson (vesath) - Thursday, 14 February 2013, 23:39 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Postfix upstream sometimes makes incomptible config changes, but the postfix install script provides an upgrade/update function which migrates the old config file so it will still work as it did before.

This upgrade script is executed by running make upgrade from an extrace and configure source tarball.

The script is not run if a users installs postfix via pacman so any incompatible upstream changes will break the installation even though upstream (tries to) provides a clean upgrade path.


Example:
http://www.postfix.org/announcements/postfix-2.10.0.html

postfix 2.10.0 added smtpd_relay_restrictions which defaults to preventing relaying, but existing installations already do that by setting smtp_recipient_restriction. The upgrade script would have fixed the config to work as it did before (most likely by setting the new option to an empty value as suggested in man postconf).


I haven't checked if the upgrade script can be run or packaged without a source tarball and I'm not sure if we would even want to run it, but I think this issue should be resolved one way or another. Maybe we need to ask upstream to provide a better upgrade path for distro packages.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Thursday, 14 February 2013, 23:39 GMT
Reason for closing:  Implemented
Additional comments about closing:  postfix-2.10.0-2 in [testing]
Comment by Gaetan Bisson (vesath) - Wednesday, 13 February 2013, 13:14 GMT
This script you mention is `postfix-install -non-interactive`: it calls postconf to merge certain values from the current main.cf with the new defaults. However I am not sure if this will ever be robust enough to be automatically ran from post_install.
Comment by Gaetan Bisson (vesath) - Wednesday, 13 February 2013, 13:41 GMT
This new install file might just solve our problems: http://dark-code.bulix.org/b7nxp2-83017?raw
Please give it some testing if you feel so inclined. I won't have time to make sure it does exactly what we want until a few days.
Comment by Florian Pritz (bluewind) - Wednesday, 13 February 2013, 15:47 GMT
I have to call it like this so it can find the manpages and postfix-files:
/usr/lib/postfix/post-install daemon_directory=/usr/lib/postfix manpage_directory=/usr/share/man upgrade-package

Edit: Ok only have to do that because my main.cf didn't contain those paths. Might still be worth adding.
Comment by Gaetan Bisson (vesath) - Thursday, 14 February 2013, 00:21 GMT
We should not hardcode these paths: they are in the default configuration.

However, one thing I did not realize is: if we use post-install to set permissions properly after each upgrade, we might as well have it merge configuration files after each upgrade too...
Comment by Gaetan Bisson (vesath) - Thursday, 14 February 2013, 00:29 GMT
Hum, you were right: post-install cannot find daemon_directory (even when it is defined in main.cf and it could just ask postconf for it)...
Comment by Gaetan Bisson (vesath) - Thursday, 14 February 2013, 00:34 GMT
Alright, I've pushed postfix-2.10.0-2 to [testing]; see if you like it.
Comment by Florian Pritz (bluewind) - Thursday, 14 February 2013, 19:50 GMT
Works for me.

Loading...