From 61886400e32dbff60da88fe37a4e85d3820ef1a3 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Sat, 24 May 2014 00:00:00 -0500 Subject: [PATCH] postfix-2.12-20140524 --- postfix/HISTORY | 9 +++++++++ postfix/postfix-install | 20 ++++++++++++++++---- postfix/src/global/mail_version.h | 2 +- postfix/src/util/dict_db.c | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index f9b9ef621..fd79660d9 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -19730,3 +19730,12 @@ Apologies for any names omitted. Bugfix (introduced: 20140320): missing initialization. Viktor Dukhovni. File pipe/pipe.c. + +20140516 + + Cleanup: Berkeley DB6 support. File: util/dict_db.c. + +20140524 + + Cleanup: symlink handling in post-install, back-ported + from the non-production release. File: post-install. diff --git a/postfix/postfix-install b/postfix/postfix-install index 6b2a261a0..055fa080e 100644 --- a/postfix/postfix-install +++ b/postfix/postfix-install @@ -252,11 +252,16 @@ compare_or_replace() { } } +myreadlink() { + ls -l -- "$@" | awk ' + /->/ { print $NF; next } + { exit(1) } + ' +} + compare_or_symlink() { - (cmp $1 $2 >/dev/null 2>&1 && echo Skipping $2...) || { - echo Updating $2... - rm -f $tempdir/junk || exit 1 - dest=`echo $1 | sed ' + case $1 in + /*) dest=`echo $1 | sed ' s;^'$install_root';; s;/\./;/;g s;//*;/;g @@ -271,6 +276,13 @@ compare_or_symlink() { s;[^/]*/;../;g s;$;'$dest'; '` + ;; + *) link=$1 + ;; + esac + (test $link = "`myreadlink $2`" >/dev/null 2>&1 && echo Skipping $2...) || { + echo Updating $2... + rm -f $tempdir/junk || exit 1 ln -s $link $tempdir/junk || exit 1 mv -f $tempdir/junk $2 || { echo $0: Error: your mv command has trouble renaming symlinks. 1>&2 diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 1531aca66..ab05f8547 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20140516" +#define MAIL_RELEASE_DATE "20140524" #define MAIL_VERSION_NUMBER "2.12" #ifdef SNAPSHOT diff --git a/postfix/src/util/dict_db.c b/postfix/src/util/dict_db.c index 4a09939a5..ba0a54c8b 100644 --- a/postfix/src/util/dict_db.c +++ b/postfix/src/util/dict_db.c @@ -89,7 +89,7 @@ #define DONT_CLOBBER DB_NOOVERWRITE #endif -#if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR <= 6) +#if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 6) #define DICT_DB_CURSOR(db, curs) (db)->cursor((db), NULL, (curs)) #else #define DICT_DB_CURSOR(db, curs) (db)->cursor((db), NULL, (curs), 0)