Cleanup: need to evaluate mail_version before evaluating
parameters that may contain $mail_version. File:
- global/mail_params.h
+ global/mail_params.c.
Cleanup: the postmulti command now exercises the postconf
"-x" option to expand $parameter_name in secondary-instance
Bugfix (introduced: 20140626) broken build and broken install
with default shlib_directory. Files: makedefs.
- Bugfix (introduced: 20140627) broken install with default
- shlib_directory. Files: conf/post-install.
+ Bugfix (introduced: 20140627) "make install" stopped with
+ a bogus error when there was no real "make install name=value"
+ parameter override. Files: conf/post-install.
+
+ Cleanup: support MAIL_VERSION magic (see INSTALL) only at
+ the end of a parameter value. Files: proto/INSTALL.html
+ makedefs, postfix-install, conf/postfix-files.
+
+ Cleanup: use ${mail_version} as the MAIL_VERSION-unexpanded
+ form. Viktor Dukhovni. Files: makedefs, postfix-install,
+ conf/postfix-files.
shlib_directory=/usr/local/lib/postfix/MAIL_VERSION ...
The command "make makefiles name=value..." will replace the string MAIL_VERSION
-in a configuration parameter value with the Postfix release version. Do not try
-to specify something like $mail_version on this command line. This produces
-inconsistent results with different versions of the make(1) command.
+at the end of a configuration parameter value with the Postfix release version.
+Do not try to specify something like $mail_version on this command line. This
+produces inconsistent results with different versions of the make(1) command.
You can change the shlib_directory setting after Postfix is built, with "make
install" or "make upgrade". However, you may have to run ldconfig if you change
Here is a tip if you want to make a pathname dependent on the Postfix release
version: the command "make makefiles name=value..." will replace the string
-MAIL_VERSION in a configuration parameter value with the Postfix release
-version. Do not try to specify something like $mail_version on this command
-line. This produces inconsistent results with different versions of the make(1)
-command.
+MAIL_VERSION at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $mail_version on this
+command line. This produces inconsistent results with different versions of the
+make(1) command.
You can override the meta_directory setting after Postfix is built, with "make
install" or "make upgrade".
# make install meta_directory=/usr/libexec/postfix ...
As with the command "make makefiles, the command "make install/upgrade
-name=value..." will replace the string MAIL_VERSION in a configuration
-parameter value with the Postfix release version. Do not try to specify
-something like $mail_version on this command line. This produces inconsistent
-results with different versions of the make(1) command.
+name=value..." will replace the string MAIL_VERSION at the end of a
+configuration parameter value with the Postfix release version. Do not try to
+specify something like $mail_version on this command line. This produces
+inconsistent results with different versions of the make(1) command.
4.4.4 Tips for distribution maintainers
$ make
The command "make makefiles name=value ..." will replace the string
-MAIL_VERSION in a configuration parameter value with the Postfix release
-version. Do not try to specify something like $mail_version on this command
-line. This produces inconsistent results with different versions of the make(1)
-command.
+MAIL_VERSION at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $mail_version on this
+command line. This produces inconsistent results with different versions of the
+make(1) command.
Parameters whose defaults can be specified in this way are listed below. See
the postconf(5) manpage for a description (command: "nroff -man man/man5/
settings or main.cf settings.
The command "make install/upgrade name=value ..." will replace the string
- MAIL_VERSION in a configuration parameter value with the Postfix release
- version. Do not try to specify something like $mail_version on this command
- line. This produces inconsistent results with different versions of the
- make(1) command.
+ MAIL_VERSION at the end of a configuration parameter value with the Postfix
+ release version. Do not try to specify something like $mail_version on this
+ command line. This produces inconsistent results with different versions of
+ the make(1) command.
6.4 - Configure Postfix
shlib_directory=/usr/local/lib/postfix/MAIL_VERSION ...
The command "make makefiles name=value..." will replace the string MAIL_VERSION
-in a configuration parameter value with the Postfix release version. Do not try
-to specify something like $mail_version on this command line. This produces
-inconsistent results with different versions of the make(1) command.
+at the end of a configuration parameter value with the Postfix release version.
+Do not try to specify something like $mail_version on this command line. This
+produces inconsistent results with different versions of the make(1) command.
You can change the shlib_directory setting after Postfix is built, with "make
install" or "make upgrade". However, you may have to run ldconfig if you change
Here is a tip if you want to make a pathname dependent on the Postfix release
version: the command "make makefiles name=value..." will replace the string
-MAIL_VERSION in a configuration parameter value with the Postfix release
-version. Do not try to specify something like $mail_version on this command
-line. This produces inconsistent results with different versions of the make(1)
-command.
+MAIL_VERSION at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $mail_version on this
+command line. This produces inconsistent results with different versions of the
+make(1) command.
You can override the meta_directory setting after Postfix is built, with "make
install" or "make upgrade".
# make install meta_directory=/usr/libexec/postfix ...
As with the command "make makefiles, the command "make install/upgrade
-name=value..." will replace the string MAIL_VERSION in a configuration
-parameter value with the Postfix release version. Do not try to specify
-something like $mail_version on this command line. This produces inconsistent
-results with different versions of the make(1) command.
+name=value..." will replace the string MAIL_VERSION at the end of a
+configuration parameter value with the Postfix release version. Do not try to
+specify something like $mail_version on this command line. This produces
+inconsistent results with different versions of the make(1) command.
4\b4.\b.4\b4.\b.4\b4 T\bTi\bip\bps\bs f\bfo\bor\br d\bdi\bis\bst\btr\bri\bib\bbu\but\bti\bio\bon\bn m\bma\bai\bin\bnt\bta\bai\bin\bne\ber\brs\bs
$ make
The command "make makefiles name=value ..." will replace the string
-MAIL_VERSION in a configuration parameter value with the Postfix release
-version. Do not try to specify something like $mail_version on this command
-line. This produces inconsistent results with different versions of the make(1)
-command.
+MAIL_VERSION at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $mail_version on this
+command line. This produces inconsistent results with different versions of the
+make(1) command.
Parameters whose defaults can be specified in this way are listed below. See
the postconf(5) manpage for a description (command: "nroff -man man/man5/
settings or main.cf settings.
The command "make install/upgrade name=value ..." will replace the string
- MAIL_VERSION in a configuration parameter value with the Postfix release
- version. Do not try to specify something like $mail_version on this command
- line. This produces inconsistent results with different versions of the
- make(1) command.
+ MAIL_VERSION at the end of a configuration parameter value with the Postfix
+ release version. Do not try to specify something like $mail_version on this
+ command line. This produces inconsistent results with different versions of
+ the make(1) command.
6\b6.\b.4\b4 -\b- C\bCo\bon\bnf\bfi\big\bgu\bur\bre\be P\bPo\bos\bst\btf\bfi\bix\bx
# Save settings, allowing command line/environment override.
-# Undo MAIL_VERSION expansion. If someone really wants the expanded
-# mail version in main.cf, we're sorry.
+# Undo MAIL_VERSION expansion at the end of a parameter value. If
+# someone really wants the expanded mail version in main.cf, then
+# we're sorry.
# Confine side effects from mail_version unexpansion within a subshell.
case "$pattern" in
"") pattern=`echo "$mail_version" | sed 's/\./\\\\./g'` || exit 1
esac
- val=`echo "$junk" | sed "s/$pattern/"'$mail_version/g'` || exit 1
+ val=`echo "$junk" | sed "s/$pattern"'$/${mail_version}/g'` || exit 1
eval ${name}='"$val"'
esac
done
</blockquote>
<p> The command "make makefiles name=value..." will replace the
-string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces inconsistent
+string MAIL_VERSION at the end of a configuration parameter value
+with the Postfix release version. Do not try to specify something
+like $<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces inconsistent
results with different versions of the make(1) command. </p>
<p> You can change the <a href="postconf.5.html#shlib_directory">shlib_directory</a> setting after Postfix is
<p> Here is a tip if you want to make a pathname dependent on the
Postfix release version: the command "make makefiles name=value..."
-will replace the string MAIL_VERSION in a configuration parameter
-value with the Postfix release version. Do not try to specify
-something like $<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces
-inconsistent results with different versions of the make(1) command.
-</p>
+will replace the string MAIL_VERSION at the end of a configuration
+parameter value with the Postfix release version. Do not try to
+specify something like $<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This
+produces inconsistent results with different versions of the make(1)
+command. </p>
<p> You can override the <a href="postconf.5.html#meta_directory">meta_directory</a> setting after Postfix is
built, with "make install" or "make upgrade". </p>
<p> As with the command "make makefiles, the command "make
install/upgrade name=value..." will replace the string MAIL_VERSION
-in a configuration parameter value with the Postfix release version.
-Do not try to specify something like $<a href="postconf.5.html#mail_version">mail_version</a> on this command
-line. This produces inconsistent results with different versions
-of the make(1) command. </p>
+at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $<a href="postconf.5.html#mail_version">mail_version</a>
+on this command line. This produces inconsistent results with
+different versions of the make(1) command. </p>
<h4><a name="shared_tips"> 4.4.4 Tips for distribution maintainers
</a></h4>
</blockquote>
<p> The command "make makefiles name=value ..." will replace the
-string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces inconsistent
+string MAIL_VERSION at the end of a configuration parameter value
+with the Postfix release version. Do not try to specify something
+like $<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces inconsistent
results with different versions of the make(1) command. </p>
<p> Parameters whose defaults can be specified in this way are
over compiled-in default settings or <a href="postconf.5.html">main.cf</a> settings. </p>
<p> The command "make install/upgrade name=value ..." will replace
-the string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces inconsistent
-results with different versions of the make(1) command. </p>
+the string MAIL_VERSION at the end of a configuration parameter
+value with the Postfix release version. Do not try to specify
+something like $<a href="postconf.5.html#mail_version">mail_version</a> on this command line. This produces
+inconsistent results with different versions of the make(1) command.
+</p>
</ul>
# command line). Use quotes if variables contain whitespace
# or shell meta characters.
#
-# The "make makefiles name=value..." command will replace the
-# string MAIL_VERSION in a parameter value with the Postfix
-# release version. Do not try to specify something like
-# $mail_version on this command line. This produces inconsistent
-# results with different versions of the make(1) command.
+# The command "make makefiles name=value..." will replace the
+# string MAIL_VERSION at the end of a parameter value with
+# the Postfix release version. Do not try to specify something
+# like $mail_version on this command line. This produces
+# inconsistent results with different versions of the make(1)
+# command.
# .IP \fBAUXLIBS=\fIobject_library...\fR
# Specifies one or more non-default object libraries. Postfix
# 2,12 and later specify some of their database library
# nothing.
#
# 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.
+# replace the string MAIL_VERSION at the end of parameter values in
+# "make makefiles name=value...". The replacement depends on usage
+# context: the expanded release version in actual pathnames, or the
+# unexpanded ${mail_version} in configuration parameter values (both
+# main.cf and and built-in defaults).
# Helper function to determine DEF_MAIL_VERSION.
rm -f makedefs.test makedefs.test.[co]
}
-# Helper function to expand MAIL_VERSION in command-line value.
+# Helper to expand MAIL_VERSION at the end of a command-line parameter value.
-expand_MAIL_VERSION()
-{
- case "$mail_version" in
- "") mail_version=`def_mail_version` || exit 1
- esac
- echo "$1" | sed "s/MAIL_VERSION/$mail_version/g"
-}
-
-
-# Helper function to expand $mail_version in parameter value.
-
-expand_mail_version()
-{
- case "$mail_version" in
- "") mail_version=`def_mail_version` || exit 1
- esac
- echo "$1" | sed "
- s/\$[{(]mail_version[)}]/$mail_version/g
- s/\$mail_version/$mail_version/g
- "
-}
-
-# Helper to invoke the above. global: parm_name, parm_val, cparm_val, CCARGS.
+# Note that MAIL_VERSION) does not anchor the match at the end.
process_input_parameter()
{
case "$parm_val" in
*MAIL_VERSION*)
- cparm_val=`echo "$parm_val"|sed 's/MAIL_VERSION/\\\\$$mail_version/g'`||
+ cparm_val=`echo "$parm_val" | \
+ sed 's/MAIL_VERSION$/\\\\$${mail_version}/g'`|| exit 1
+ case "$mail_version" in
+ "") mail_version=`def_mail_version` || exit 1
+ esac
+ parm_val=`echo "$parm_val" | sed 's/MAIL_VERSION$/'"$mail_version/g"` ||
exit 1
- parm_val=`expand_MAIL_VERSION "$parm_val"` || exit 1
+ case "$parm_val" in
+ *MAIL_VERSION*)
+ error "MAIL_VERSION not at end of parameter value: $parm_val"
+ esac
eval ${parm_name}=\""\$parm_val"\";;
*) cparm_val="$parm_val";;
esac
esac
# Determine the shared-library and plugin installation directory.
- # The shlib_directory parameter is special. If the DEF_SHLIB_DIR
- # C-language constant ends in "$mail_version" then the custom
- # code below expands this by peeking at the DEF_MAIL_VERSION
- # C-language constant.
- #
+
parm_name=shlib_directory
eval parm_val=\"\$$parm_name\"
eval parm_macro=\"\$${parm_name}_macro\"
# .IP "command line"
# Parameter settings can be given as name=value arguments on
# the postfix-install command line. This mode will replace
-# the string MAIL_VERSION in a configuration parameter value
-# with the Postfix release version (Postfix 2.12 and later).
+# the string MAIL_VERSION at the end of a configuration
+# parameter value with the Postfix release version (Postfix
+# 2.12 and later).
# .IP "process environment"
# Parameter settings can be given as name=value environment
# variables. Environment parameters can also be specified on
# the make(1) command line as "make install name=value ...".
-# This mode will replace the string MAIL_VERSION in a
-# configuration parameter value with the Postfix release
+# This mode will replace the string MAIL_VERSION at the end
+# of a configuration parameter value with the Postfix release
# version (Postfix 2.12 and later).
# .IP "installed configuration files"
# If a parameter is not specified via the command line or via the
queue_directory readme_directory sendmail_path setgid_group shlib_directory \
meta_directory"
-# Expand the string MAIL_VERSION in "make install" etc. name=value
-# command-line arguments (and consequently, in environment settings),
-# for consistency with "make makefiles".
+# Expand the string MAIL_VERSION at the end of "make install" etc.
+# name=value command-line arguments (and consequently, in environment
+# settings), for consistency with "make makefiles".
+
+# Note that MAIL_VERSION) does not anchor the match at the end.
for name in $CONFIG_PARAMS sample_directory install_root tempdir
do
case "$mail_version" in
"") mail_version="`bin/postconf -dhx mail_version`" || exit 1
esac
- eval ${name}=\"`echo "$junk" | sed "s/MAIL_VERSION/$mail_version/g"`\" ||
- exit 1;;
+ val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1
+ case "$val" in
+ *MAIL_VERSION*)
+ echo "MAIL_VERSION not at end of parameter value: $junk" 1>&2; exit 1
+ esac
+ eval ${name}='"$val"'
esac
done
"") 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.
+# Undo MAIL_VERSION expansion at the end of a parameter value. If
+# someone really wants the expanded mail version in main.cf, then
+# we're sorry.
for name in $CONFIG_PARAMS sample_directory
do
case "$pattern" in
"") pattern=`echo "$mail_version" | sed 's/\./\\\\./g'` || exit 1
esac
- val=`echo "$junk" | sed "s/$pattern/"'$mail_version/g'` || exit 1
+ val=`echo "$junk" | sed "s/$pattern"'$/${mail_version}/g'` || exit 1
eval ${name}='"$val"'
esac
done
</blockquote>
<p> The command "make makefiles name=value..." will replace the
-string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$mail_version on this command line. This produces inconsistent
+string MAIL_VERSION at the end of a configuration parameter value
+with the Postfix release version. Do not try to specify something
+like $mail_version on this command line. This produces inconsistent
results with different versions of the make(1) command. </p>
<p> You can change the shlib_directory setting after Postfix is
<p> Here is a tip if you want to make a pathname dependent on the
Postfix release version: the command "make makefiles name=value..."
-will replace the string MAIL_VERSION in a configuration parameter
-value with the Postfix release version. Do not try to specify
-something like $mail_version on this command line. This produces
-inconsistent results with different versions of the make(1) command.
-</p>
+will replace the string MAIL_VERSION at the end of a configuration
+parameter value with the Postfix release version. Do not try to
+specify something like $mail_version on this command line. This
+produces inconsistent results with different versions of the make(1)
+command. </p>
<p> You can override the meta_directory setting after Postfix is
built, with "make install" or "make upgrade". </p>
<p> As with the command "make makefiles, the command "make
install/upgrade name=value..." will replace the string MAIL_VERSION
-in a configuration parameter value with the Postfix release version.
-Do not try to specify something like $mail_version on this command
-line. This produces inconsistent results with different versions
-of the make(1) command. </p>
+at the end of a configuration parameter value with the Postfix
+release version. Do not try to specify something like $mail_version
+on this command line. This produces inconsistent results with
+different versions of the make(1) command. </p>
<h4><a name="shared_tips"> 4.4.4 Tips for distribution maintainers
</a></h4>
</blockquote>
<p> The command "make makefiles name=value ..." will replace the
-string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$mail_version on this command line. This produces inconsistent
+string MAIL_VERSION at the end of a configuration parameter value
+with the Postfix release version. Do not try to specify something
+like $mail_version on this command line. This produces inconsistent
results with different versions of the make(1) command. </p>
<p> Parameters whose defaults can be specified in this way are
over compiled-in default settings or main.cf settings. </p>
<p> The command "make install/upgrade name=value ..." will replace
-the string MAIL_VERSION in a configuration parameter value with the
-Postfix release version. Do not try to specify something like
-$mail_version on this command line. This produces inconsistent
-results with different versions of the make(1) command. </p>
+the string MAIL_VERSION at the end of a configuration parameter
+value with the Postfix release version. Do not try to specify
+something like $mail_version on this command line. This produces
+inconsistent results with different versions of the make(1) command.
+</p>
</ul>
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20140627"
+#define MAIL_RELEASE_DATE "20140629"
#define MAIL_VERSION_NUMBER "2.12"
#ifdef SNAPSHOT