[sles-beta] SLES11-SP3 RC1 aligning postfix configuration when upgrading from SLES11-SP2 not working in postfix.rpm SPEC

Marcus Meissner meissner at suse.de
Mon Apr 29 14:21:47 MDT 2013


On Mon, Apr 29, 2013 at 03:55:52PM +0000, urs.frey at post.ch wrote:
> Hi
> When upgrading from SLES11SP2 to SLES11-SP3 RC1 I see constantly this message when postfix gets upgraded
> 
> Additional rpm output:
> warning: /etc/postfix/main.cf created as /etc/postfix/main.cf.rpmnew
> warning: /etc/postfix/master.cf created as /etc/postfix/master.cf.rpmnew
> Align deprecated postfix configuration files.
> Your configuration could not be checked for deprecated postfix parameters.
> Please remove program_directory from your /etc/postfix/main.cf if exists.
> Please rename fallback_relay to smtp_fallback_relay in your /etc/postfix/main.cf if exists.
> 
> So I digged deeper into the RPM SPEC scripts:
> 
> postinstall scriptlet (using /bin/sh):
> # We never have to run suseconfig for postfix after update
> # We only start postfix's own upgrade-configuration
> if [ ${1:-0} -gt 1 ]; then
>         echo "Align deprecated postfix configuration files."
>         TD=/tmp/postfixEZo0gV
> 
> Question is, why should there be a directory named /tmp/postfixEZo0gV.
> I will never have such a directory, as with every reboot the /tmp will be erased completely. SuSEconfig option.
> So in the above script I will never make it into the then part, where sed removes the obsolete parameter program_directory etc.
> It is correct doing this job only upon upgrades [ $1 -gt 1 ] , but the directory is not there as requested.
> A quite simple approach would be grepping for the occurrence of program_directory in main.cf and sed if true.
> 
> I consider this as not yet OK and it should be reviewed please.

This is a bug and a quite severe one :)

The packager added
        TD=%( mktemp -d /tmp/postfixXXXXXX )

to the rpm spec file, which executes this during build, while it should probably
be more like
        TD=$( mktemp -d /tmp/postfixXXXXXX )
which will be executed during rumtime.

Ciao, Marcus


More information about the sles-beta mailing list