From: Wietse Venema Date: Sat, 31 May 2014 05:00:00 +0000 (-0500) Subject: postfix-2.12-20140531 X-Git-Tag: v3.0.0-RC1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b957db9d819bce26a412f13b066e36ba684b7aa;p=thirdparty%2Fpostfix.git postfix-2.12-20140531 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index b06b38a50..87eaa0ec5 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -19859,3 +19859,19 @@ Apologies for any names omitted. automatically include files under the directory postfix-files.d. See INSTALL section "Building with Postfix shared libraries and database plugins". File: dynamicmaps.c. + +20140530 + + Cleanup: add shlib_directory and plugin_directory to the + postmulti-script list of shared parameters. Viktor Dukhovni. + File: postmulti-script. + + Cleanup: to avoid "postfix set-permission" errors, don't + create postfix-files entries for non-existent database + plugins. Problem reported by Viktor. File: Makefile.in. + + Bugfix: we can't use "mv" to replace a symlink-to-directory. + Instead we now create all symlinks in place. Unfortunately + the "ln -n" option is not universally implemented, so we + remove the old symlink first. Problem reported by Viktor. + File: postfix-install. diff --git a/postfix/Makefile.in b/postfix/Makefile.in index 0e84d8568..9ff608a98 100644 --- a/postfix/Makefile.in +++ b/postfix/Makefile.in @@ -61,10 +61,19 @@ libexec/postfix-files: conf/postfix-files conf/makedefs.out Makefile elif [ "${PLUGIN_DIR}" = "no" -o "${PLUGIN_DIR}" = "" ]; then \ sed -e '/^\$$plugin_directory/d' conf/postfix-files | $(EXPAND); \ else \ - $(EXPAND) conf/postfix-files; \ + $(EXPAND) conf/postfix-files | awk -F: ' \ + BEGIN { \ + count = split("'"$(DEFINED_MAP_TYPES)"'", names, " "); \ + for (n = 1; n <= count; n++) \ + have["$$plugin_directory/$(LIB_PREFIX)" names[n] \ + "$(LIB_SUFFIX)"] = 1; } \ + /^[$$]plugin_directory.dynamicmaps/ { \ + print; next } \ + /^[$$]plugin_directory.$(LIB_PREFIX)/ { \ + if (have[$$1]) print; next } \ + { print } \ + '; \ fi) | case "$(MAKE_FIX)" in \ - *cant-move-relative-symlink*) \ - sed 's;:l:dynamic;:h:$plugin_directory/dynamic;';; \ *) cat;; \ esac > $@ diff --git a/postfix/conf/postmulti-script b/postfix/conf/postmulti-script index 417a8718a..4d1a9feb4 100644 --- a/postfix/conf/postmulti-script +++ b/postfix/conf/postmulti-script @@ -156,6 +156,8 @@ create|import) manpage_directory sample_directory readme_directory + shlib_directory + plugin_directory " shift $# # Needed on SunOS where bare "set --" is NOP! diff --git a/postfix/makedefs b/postfix/makedefs index cd7bec925..c9b721945 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -534,7 +534,6 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix543 : ${CC=cc} CCARGS="$CCARGS" CCWARN='$(WARN)' - MAKE_FIX=cant-move-relative-symlink # Darwin > 1.3 uses awk and flat_namespace case $RELEASE in 1.[0-3]) AWK=gawk;; diff --git a/postfix/postfix-install b/postfix/postfix-install index 416bd0aa6..a60cf2af4 100644 --- a/postfix/postfix-install +++ b/postfix/postfix-install @@ -293,15 +293,12 @@ compare_or_symlink() { 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 - echo If you run Linux, upgrade to GNU fileutils-4.0 or better, 1>&2 - echo or choose a tempdir that is in the same file system as $2. 1>&2 - echo If you run FreeBSD, upgrade to version 5 or better. 1>&2 - exit 1 - } + # We create the symlink in place instead of using mv because: + # 1) some systems cannot move symlinks between file systems; + # 2) we cannot use mv to replace a symlink-to-directory; + # 3) "ln -n" is not in POSIX, therefore it's not portable. + # rm+ln is less atomic but this affects compatibility symlinks only. + rm -f $2 && ln -sf $link $2 || exit 1 } } @@ -707,9 +704,8 @@ do compare_or_replace $mode "$owner" "$group" lib/$file \ $SHLIB_DIRECTORY/$file || exit 1;; '$plugin_directory') - test ! -f plugins/$file || - compare_or_replace $mode "$owner" "$group" plugins/$file \ - $PLUGIN_DIRECTORY/$file || exit 1;; + compare_or_replace $mode "$owner" "$group" plugins/$file \ + $PLUGIN_DIRECTORY/$file || exit 1;; '$daemon_directory') compare_or_replace $mode "$owner" "$group" libexec/$file \ $DAEMON_DIRECTORY/$file || exit 1;; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index cfdf8b794..ab7894a61 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 "20140530" +#define MAIL_RELEASE_DATE "20140531" #define MAIL_VERSION_NUMBER "2.12" #ifdef SNAPSHOT