]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20140626
authorWietse Venema <wietse@porcupine.org>
Thu, 26 Jun 2014 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Fri, 27 Jun 2014 02:54:27 +0000 (22:54 -0400)
postfix/HISTORY
postfix/INSTALL
postfix/Makefile.in
postfix/README_FILES/INSTALL
postfix/conf/postfix-script [changed mode: 0644->0755]
postfix/html/INSTALL.html
postfix/makedefs
postfix/postfix-install
postfix/proto/INSTALL.html
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h

index 5e88964fd0a02a2286dc1fa4d889250c59aeee7d..97e8a92b5ab15a4cd36081d391020f58e4a382eb 100644 (file)
@@ -20023,3 +20023,20 @@ Apologies for any names omitted.
 
        Cleanup: don't leak build directory information via SHLIB_ENV
        in makedefs.out.  Files: Makefile.in, conf/postfix-files.
+
+20140626
+
+       Cleanup: construction debris. Files: Makefile.in,
+       conf/postfix-script.
+
+       Cleanup: replace expanded MAIL_VERSION with $mail_version
+       in main.cf installation parameter settings, to permit safe
+       upgrade of a running mail system. File: postfix-install.
+
+       Cleanup: replace expanded MAIL_VERSION with $mail_version
+       in built-in default installation parameter settings, for
+       consistency with main.cf. File: makedefs, postfix-install,
+       conf/post-install.
+
+       Cleanup: removed $mail_version from the default shlib_directory
+       value. Files: global/mail_params.h, proto/INSTALL.html.
index 4a935cb59557b3fca37938d1d1beb56b7f1491c3..9dd024ddc9c58b4dbb8d5fa5bb4c6dd5cd504d90 100644 (file)
@@ -185,15 +185,15 @@ shared-library support.
 (Specify "make makefiles shared=no" to explicitly disable Postfix shared-
 library support).
 
-This installs shared libraries in $shlib_directory, typically, /usr/lib/
-postfix/version or /usr/local/lib/postfix/version, with names like libpostfix-
-name.so, where the name is a source-code directory name such as "util" or
-"global", and the version is the Postfix release version: x.y.z for stable
-releases, x.y-date for snapshot (development) releases, or x.y-date-nonprod for
-non-production releases.
+This installs shared libraries in $shlib_directory, typically /usr/lib/postfix
+or /usr/local/lib/postfix, with file names libpostfix-name.so, where the name
+is a source-code directory name such as "util" or "global", and the version is
+the Postfix release version: x.y.z for stable releases, x.y-date for snapshot
+(development) releases, or x.y-date-nonprod for non-production releases.
 
 See section 4.3.3 "Customizing Postfix shared libraries and database plugins"
-below for how to customize the Postfix shared-library location and version.
+below for how to customize the Postfix shared-library location and version,
+including support to upgrade a running mail system.
 
 4.3.2 Turning on Postfix database-plugin support
 
@@ -249,8 +249,8 @@ plugins specify, for example:
 
 If you intend to upgrade Postfix without stopping the mail system, then you
 should append the Postfix release version to the shlib_directory pathname, to
-eliminate the possibility that programs from the old Postfix version will link
-with files from the new Postfix version. For example:
+eliminate the possibility that programs will link with shared libraries or
+database plugins from the wrong Postfix version. For example:
 
     $ make makefiles shared=yes \
        shlib_directory=/usr/local/lib/postfix/MAIL_VERSION ...
index ee0a68ee2c89d0422c5a14e1c9817b9b52b68689..34a98c7aac80c5090fecdc3a714ff8bd61c9a14c 100644 (file)
@@ -59,10 +59,10 @@ meta/makedefs.out: conf/makedefs.out
 
 meta/postfix-files: conf/postfix-files conf/makedefs.out Makefile
        rm -f $@
-       (if [ "${SHLIB_DIR_OVERRIDE}" = "no" -o "${SHLIB_DIR}" = "" ]; then \
+       (if [ "${SHLIB_DIR}" = "no" -o "${SHLIB_DIR}" = "" ]; then \
            sed -e '/^\$$shlib_directory/d' \
                -e '/dynamicmaps.cf/d' conf/postfix-files; \
-       elif [ "${PLUGIN_LD}" = "" ]; then \
+       elif [ "${PLUGIN_LD}" = ":" -o "${PLUGIN_LD}" = "" ]; then \
            sed -e '/dynamicmaps.cf/d' \
                -e '/^\$$shlib_directory\/\$${LIB_PREFIX}/d' \
                conf/postfix-files | $(EXPAND); \
index d195d015ff36ead6ded8618a09517464cb81d78f..cba343f4138c035dac979c70b8869585043a9c67 100644 (file)
@@ -185,15 +185,15 @@ shared-library support.
 (Specify "make makefiles shared=no" to explicitly disable Postfix shared-
 library support).
 
-This installs shared libraries in $shlib_directory, typically, /usr/lib/
-postfix/version or /usr/local/lib/postfix/version, with names like libpostfix-
-name.so, where the name is a source-code directory name such as "util" or
-"global", and the version is the Postfix release version: x.y.z for stable
-releases, x.y-date for snapshot (development) releases, or x.y-date-nonprod for
-non-production releases.
+This installs shared libraries in $shlib_directory, typically /usr/lib/postfix
+or /usr/local/lib/postfix, with file names libpostfix-name.so, where the name
+is a source-code directory name such as "util" or "global", and the version is
+the Postfix release version: x.y.z for stable releases, x.y-date for snapshot
+(development) releases, or x.y-date-nonprod for non-production releases.
 
 See section 4.3.3 "Customizing Postfix shared libraries and database plugins"
-below for how to customize the Postfix shared-library location and version.
+below for how to customize the Postfix shared-library location and version,
+including support to upgrade a running mail system.
 
 4\b4.\b.3\b3.\b.2\b2 T\bTu\bur\brn\bni\bin\bng\bg o\bon\bn P\bPo\bos\bst\btf\bfi\bix\bx d\bda\bat\bta\bab\bba\bas\bse\be-\b-p\bpl\blu\bug\bgi\bin\bn s\bsu\bup\bpp\bpo\bor\brt\bt
 
@@ -249,8 +249,8 @@ plugins specify, for example:
 
 If you intend to upgrade Postfix without stopping the mail system, then you
 should append the Postfix release version to the shlib_directory pathname, to
-eliminate the possibility that programs from the old Postfix version will link
-with files from the new Postfix version. For example:
+eliminate the possibility that programs will link with shared libraries or
+database plugins from the wrong Postfix version. For example:
 
     $ make makefiles shared=yes \
         shlib_directory=/usr/local/lib/postfix/MAIL_VERSION ...
old mode 100644 (file)
new mode 100755 (executable)
index be21876..de29c18
@@ -258,8 +258,9 @@ check-warn)
                test "$shlib_directory" = "no" || todo="$shlib_directory $todo"
                todo="$meta_directory $todo"
        }
+       todo=`echo "$todo" | tr ' ' '\12' | sort -u`
 
-       for dir in `echo "$todo" | tr ' ' '\12' | sort -u`
+       for dir in $todo
        do
                ls -lLd $dir | (grep " root " >/dev/null ||
                    $WARN not owned by root: $dir)
@@ -273,17 +274,22 @@ check-warn)
        test -n "$check_shared_files" && {
                todo="$daemon_directory/* $todo"
                test "$shlib_directory" = "no" || 
-                   todo="$shlib_directory/libpostfix* $todo"
+                   todo="$shlib_directory/* $todo"
+               todo="$meta_directory/* $todo"
        }
+       todo=`echo "$todo" | tr ' ' '\12' | sort -u`
 
        find $todo ! -user root \
                -exec $WARN not owned by root: {} \;
 
        todo="$config_directory/."
-       test -n "$check_shared_files" && todo="$daemon_directory/. $todo"
-       # FIXME don't scan non-Postfix files under /usr/local/lib.
-       test "$shlib_directory" = "no" || 
-           todo="$shlib_directory/libpostfix* $shlib_directory/postfix* $todo"
+       test -n "$check_shared_files" && {
+               todo="$daemon_directory/. $todo"
+               test "$shlib_directory" = "no" || 
+                   todo="$shlib_directory/. $todo"
+               todo="$meta_directory/. $todo"
+       }
+       todo=`echo "$todo" | tr ' ' '\12' | sort -u`
 
        find $todo \
                \( -perm -020 -o -perm -002 \) -type f \
index 5c35d03679eed3927bb264701792f67246a2d675..104f43dc603ed4c1b0e1502ebb43c21479514c48 100644 (file)
@@ -283,18 +283,18 @@ $ make
 <p> (Specify "make makefiles shared=no" to explicitly disable Postfix
 shared-library support). </p>
 
-<p> This installs shared libraries in $<a href="postconf.5.html#shlib_directory">shlib_directory</a>, typically,
-/usr/lib/postfix/<i>version</i> or /usr/local/lib/postfix/<i>version</i>,
-with names like libpostfix-<i>name</i>.so, where the <i>name</i>
-is a source-code directory name such as "util" or "global", and the
-<i>version</i> is the Postfix release version: <i>x.y.z</i> for
-stable releases, <i>x.y</i>-<i>date</i> for snapshot (development)
-releases, or <i>x.y</i>-<i>date</i>-nonprod for non-production
-releases.  </p>
+<p> This installs shared libraries in $<a href="postconf.5.html#shlib_directory">shlib_directory</a>, typically
+/usr/lib/postfix or /usr/local/lib/postfix, with file names
+libpostfix-<i>name</i>.so, where the <i>name</i> is a source-code
+directory name such as "util" or "global", and the <i>version</i>
+is the Postfix release version: <i>x.y.z</i> for stable releases,
+<i>x.y</i>-<i>date</i> for snapshot (development) releases, or
+<i>x.y</i>-<i>date</i>-nonprod for non-production releases.  </p>
 
 <p> See section 4.3.3 "Customizing Postfix shared libraries and
 database plugins" below for how to customize the Postfix shared-library
-location and version.
+location and version, including support to upgrade a running mail
+system. </p>
 
 <h4><a name="dynamicmaps_enable"> 4.3.2 Turning on Postfix
 database-plugin support </a></h4>
@@ -371,8 +371,8 @@ $ make makefiles shared=yes <a href="postconf.5.html#shlib_directory">shlib_dire
 <p> If you intend to upgrade Postfix without stopping the mail
 system, then you should append the Postfix release version to the
 <a href="postconf.5.html#shlib_directory">shlib_directory</a> pathname, to eliminate the possibility that programs
-from the old Postfix version will link with files from the new
-Postfix version. For example: </p>
+will link with shared libraries or database plugins from the wrong
+Postfix version.  For example: </p>
 
 <blockquote>
 <pre>
index c93af8fb2d8af4fecc6af82cf705e6f36127998e..94687094f5cc05df5d135484a6ae1b32fa7cb0a5 100644 (file)
@@ -720,26 +720,14 @@ CCARGS="-I. -I../../include $CCARGS"
 # command-line arguments. In the specific example above, gmake would
 # eat up the "$" and "m" before it even invokes makedefs, and it
 # ould replace "'${mail_version}'" and "'$(mail_version)'" with
-# nothing. 
+# nothing.
 #
-# We could work around this by documenting that $$ must be used (and
-# fix $$ in the case that people use traditional make).  But this
-# would be non-intuitive and bad from a usability point of view.
-#
-# We could work around this by documenting that people must pass
-# name=value via the environment instead of the command line, as in
-# "shlib_directory=/some/where/'$mail_version' make makefiles", or
-# that they issue "export" or "setenv" commands depending on their
-# interactive shell. That would be non-intuitive and bad usability.
-#
-# Even if we did any of the above, we would not want to pass the
-# unexpanded $mail_version via CCARGS, because that requires extra
-# quoting with `echo "$parm_val" | sed 's/[$]/\\\\$$/'` which is
-# just too ugly to be portable.
-#
-# The upshot of all this is that we will expand MAIL_VERSION in the
-# "make makefiles parameter=value" command line, and that we pass
-# the expanded text via CCARGS. This is clumsier but cleaner.
+# Requiring people to specify $$ is not a good option. Instead we
+# replace the string MAIL_VERSION in "make makefiles name=value"
+# parameter values with a form that depends on usage context: the
+# actual release version in actual pathnames, the unexpanded
+# $mail_version in main.cf parameter values and built-in default
+# parameter settings.
 
 # Helper function to determine DEF_MAIL_VERSION.
 
@@ -793,6 +781,22 @@ expand_mail_version()
        s/\$mail_version/$mail_version/g
     "
 }
+
+# Helper to invoke the above. global: parm_name, parm_val, cparm_val, CCARGS.
+
+process_input_parameter()
+{
+    case "$parm_val" in
+    *MAIL_VERSION*)
+       cparm_val=`echo "$parm_val"|sed 's/MAIL_VERSION/\\\\$$mail_version/g'`||
+           exit 1
+       parm_val=`expand_MAIL_VERSION "$parm_val"` || exit 1
+       eval ${parm_name}=\""\$parm_val"\";;
+     *) cparm_val="$parm_val";;
+    esac
+    CCARGS="$CCARGS -D$parm_macro=\\\"$cparm_val\\\""
+}
+
 # Optionally override installation-parameter default settings.
 
 command_directory_macro=DEF_COMMAND_DIR
@@ -817,12 +821,7 @@ do
     eval parm_macro=\"\$${parm_name}_macro\"
     case "$parm_val" in
     "") ;;
-    /*) case "$parm_val" in
-       *MAIL_VERSION*)
-           parm_val=`expand_MAIL_VERSION "$parm_val"` || exit 1
-           eval ${parm_name}=\""\$parm_val"\";;
-       esac
-       CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+    /*) process_input_parameter;;
      *) error "$parm_name must specify an absolute path name";;
     esac
 done
@@ -837,12 +836,7 @@ do
     eval parm_macro=\"\$${parm_name}_macro\"
     case "$parm_val" in
     "") ;;
- /*|no) case "$parm_val" in
-       *MAIL_VERSION*)
-           parm_val=`expand_MAIL_VERSION "$parm_val"` || exit 1
-           eval ${parm_name}=\""\$parm_val"\";;
-       esac
-       CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+ /*|no) process_input_parameter;;
      *) error "$parm_name must specify \"no\" or an absolute path name";;
     esac
 done
@@ -855,12 +849,7 @@ do
     eval parm_macro=\"\$${parm_name}_macro\"
     case "$parm_val" in
     "") ;;
-     *) case "$parm_val" in
-       *MAIL_VERSION*)
-           parm_val=`expand_MAIL_VERSION "$parm_val"` || exit 1
-           eval ${parm_name}=\""\$parm_val"\";;
-       esac
-       CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+     *) process_input_parameter;;
     esac
 done
 
index 076fbb22be8305778ee0be84548a6319b2366265..e4bb6f942994de1c3dd15c528ca896e18eab08e2 100644 (file)
@@ -493,7 +493,7 @@ test -f $CONFIG_DIRECTORY/main.cf && {
        case "$junk" in
        "") eval unset $name;;
        esac
-       eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} ||
+       eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} ||
            exit 1
     done
 }
@@ -506,7 +506,7 @@ do
     case "$junk" in
     "") eval unset $name;;
     esac
-    eval : \${$name=\`bin/postconf -c conf -d -h $name\`} || exit 1
+    eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1
 done
 
 # Override settings manually.
@@ -800,6 +800,23 @@ do
 # Postfix releases, and software should not suddenly be installed in
 # the wrong place when Postfix is being upgraded.
 
+case "$mail_version" in
+"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
+esac
+
+# Undo MAIL_VERSION expansion. If someone really wants the expanded
+# mail version in main.cf, we're sorry.
+
+for name in $CONFIG_PARAMS sample_directory
+do
+    eval junk=\$$name
+    case "$junk" in
+    *"$mail_version"*) 
+       val=`echo "$junk" | sed "s/$mail_version/"'$mail_version/g'` || exit 1
+       eval ${name}='"$val"'
+    esac
+done
+
 bin/postconf -c $CONFIG_DIRECTORY -e \
     "daemon_directory = $daemon_directory" \
     "data_directory = $data_directory" \
index 695bba4fd7eec7ea4010fc8896f0e18c7f91873d..f1e3672bc47bbe730b5026151c68568b8092ee11 100644 (file)
@@ -283,18 +283,18 @@ $ make
 <p> (Specify "make makefiles shared=no" to explicitly disable Postfix
 shared-library support). </p>
 
-<p> This installs shared libraries in $shlib_directory, typically,
-/usr/lib/postfix/<i>version</i> or /usr/local/lib/postfix/<i>version</i>,
-with names like libpostfix-<i>name</i>.so, where the <i>name</i>
-is a source-code directory name such as "util" or "global", and the
-<i>version</i> is the Postfix release version: <i>x.y.z</i> for
-stable releases, <i>x.y</i>-<i>date</i> for snapshot (development)
-releases, or <i>x.y</i>-<i>date</i>-nonprod for non-production
-releases.  </p>
+<p> This installs shared libraries in $shlib_directory, typically
+/usr/lib/postfix or /usr/local/lib/postfix, with file names
+libpostfix-<i>name</i>.so, where the <i>name</i> is a source-code
+directory name such as "util" or "global", and the <i>version</i>
+is the Postfix release version: <i>x.y.z</i> for stable releases,
+<i>x.y</i>-<i>date</i> for snapshot (development) releases, or
+<i>x.y</i>-<i>date</i>-nonprod for non-production releases.  </p>
 
 <p> See section 4.3.3 "Customizing Postfix shared libraries and
 database plugins" below for how to customize the Postfix shared-library
-location and version.
+location, including support to upgrade a running mail system safely.
+</p>
 
 <h4><a name="dynamicmaps_enable"> 4.3.2 Turning on Postfix
 database-plugin support </a></h4>
@@ -371,8 +371,8 @@ $ make makefiles shared=yes shlib_directory=/usr/local/lib/postfix ...
 <p> If you intend to upgrade Postfix without stopping the mail
 system, then you should append the Postfix release version to the
 shlib_directory pathname, to eliminate the possibility that programs
-from the old Postfix version will link with files from the new
-Postfix version. For example: </p>
+will link with shared libraries or database plugins from the wrong
+Postfix version.  For example: </p>
 
 <blockquote>
 <pre>
index 8eddb1cabf6755fd5ed82d3e11e10807a4d73102..9e345d80a5c7c36cb0c6bd436bcbc261f7a59fdd 100644 (file)
@@ -3794,7 +3794,7 @@ extern char *var_local_dsn_filter;
   */
 #define VAR_SHLIB_DIR  "shlib_directory"
 #ifndef DEF_SHLIB_DIR
-#define DEF_SHLIB_DIR  "/usr/lib/postfix/$mail_version"
+#define DEF_SHLIB_DIR  "/usr/lib/postfix"
 #endif
 extern char *var_shlib_dir;
 
index 977bb88e74f92d1688057114c88aead89f19168b..48a909033a7614621fbc80bd2b3b94f952f20dc8 100644 (file)
@@ -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      "20140625"
+#define MAIL_RELEASE_DATE      "20140626"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT