Commit ca9112a4 authored by Tom Lane's avatar Tom Lane

Stamp HEAD as 10devel.

This is a good bit more complicated than the average new-version stamping
commit, because it includes various adjustments in pursuit of changing
from three-part to two-part version numbers.  It's likely some further
work will be needed around that change; but this is enough to get through
the regression tests, at least in Unix builds.

Peter Eisentraut and Tom Lane
parent b5bce6c1
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6beta4. # Generated by GNU Autoconf 2.69 for PostgreSQL 10devel.
# #
# Report bugs to <pgsql-bugs@postgresql.org>. # Report bugs to <pgsql-bugs@postgresql.org>.
# #
...@@ -582,8 +582,8 @@ MAKEFLAGS= ...@@ -582,8 +582,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='PostgreSQL' PACKAGE_NAME='PostgreSQL'
PACKAGE_TARNAME='postgresql' PACKAGE_TARNAME='postgresql'
PACKAGE_VERSION='9.6beta4' PACKAGE_VERSION='10devel'
PACKAGE_STRING='PostgreSQL 9.6beta4' PACKAGE_STRING='PostgreSQL 10devel'
PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org' PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
PACKAGE_URL='' PACKAGE_URL=''
...@@ -1398,7 +1398,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1398,7 +1398,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures PostgreSQL 9.6beta4 to adapt to many kinds of systems. \`configure' configures PostgreSQL 10devel to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1463,7 +1463,7 @@ fi ...@@ -1463,7 +1463,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of PostgreSQL 9.6beta4:";; short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1615,7 +1615,7 @@ fi ...@@ -1615,7 +1615,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
PostgreSQL configure 9.6beta4 PostgreSQL configure 10devel
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
...@@ -2326,7 +2326,7 @@ cat >config.log <<_ACEOF ...@@ -2326,7 +2326,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by PostgreSQL $as_me 9.6beta4, which was It was created by PostgreSQL $as_me 10devel, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2711,7 +2711,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ...@@ -2711,7 +2711,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
configure_args=$ac_configure_args configure_args=$ac_configure_args
PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'` PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -16433,7 +16433,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ...@@ -16433,7 +16433,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by PostgreSQL $as_me 9.6beta4, which was This file was extended by PostgreSQL $as_me 10devel, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -16503,7 +16503,7 @@ _ACEOF ...@@ -16503,7 +16503,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
PostgreSQL config.status 9.6beta4 PostgreSQL config.status 10devel
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
......
...@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details. ...@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
dnl dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
AC_INIT([PostgreSQL], [9.6beta4], [pgsql-bugs@postgresql.org]) AC_INIT([PostgreSQL], [10devel], [pgsql-bugs@postgresql.org])
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not Untested combinations of 'autoconf' and PostgreSQL versions are not
...@@ -29,7 +29,7 @@ AC_CONFIG_AUX_DIR(config) ...@@ -29,7 +29,7 @@ AC_CONFIG_AUX_DIR(config)
AC_PREFIX_DEFAULT(/usr/local/pgsql) AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_SUBST(configure_args, [$ac_configure_args]) AC_SUBST(configure_args, [$ac_configure_args])
[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`] [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
AC_SUBST(PG_MAJORVERSION) AC_SUBST(PG_MAJORVERSION)
AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major version as a string]) AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major version as a string])
......
...@@ -27,7 +27,7 @@ System Configuration: ...@@ -27,7 +27,7 @@ System Configuration:
Operating System (example: Linux 2.4.18) : Operating System (example: Linux 2.4.18) :
PostgreSQL version (example: PostgreSQL 9.6beta4): PostgreSQL 9.6beta4 PostgreSQL version (example: PostgreSQL 10devel): PostgreSQL 10devel
Compiler used (example: gcc 3.3.5) : Compiler used (example: gcc 3.3.5) :
......
...@@ -1601,17 +1601,26 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput ...@@ -1601,17 +1601,26 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
</para> </para>
<para> <para>
<productname>PostgreSQL</> major versions are represented by the Current <productname>PostgreSQL</productname> version numbers consist of a
first two digit groups of the version number, e.g., 8.4. major and a minor version number. For example, in the version number 10.1,
<productname>PostgreSQL</> minor versions are represented by the the 10 is the major version number and the 1 is the minor version number,
third group of version digits, e.g., 8.4.2 is the second minor meaning this would be the first minor release of the major release 10. For
release of 8.4. Minor releases never change the internal storage releases before <productname>PostgreSQL</productname> version 10.0, version
format and are always compatible with earlier and later minor numbers consist of three numbers, for example, 9.5.3. In those cases, the
releases of the same major version number, e.g., 8.4.2 is compatible major version consists of the first two digit groups of the version number,
with 8.4, 8.4.1 and 8.4.6. To update between compatible versions, e.g., 9.5, and the minor version is the third number, e.g., 3, meaning this
you simply replace the executables while the server is down and would be the third minor release of the major release 9.5.
restart the server. The data directory remains unchanged &mdash; </para>
minor upgrades are that simple.
<para>
Minor releases never change the internal storage format and are always
compatible with earlier and later minor releases of the same major version
number. For example, version 10.1 is compatible with version 10.0 and
version 10.6. Similarly, for example, 9.5.3 is compatible with 9.5.0,
9.5.1, and 9.5.6. To update between compatible versions, you simply
replace the executables while the server is down and restart the server.
The data directory remains unchanged &mdash; minor upgrades are that
simple.
</para> </para>
<para> <para>
......
...@@ -43,8 +43,8 @@ while (@ARGV) ...@@ -43,8 +43,8 @@ while (@ARGV)
elsif ($arg =~ /^--set-version=(.*)$/) elsif ($arg =~ /^--set-version=(.*)$/)
{ {
$major_version = $1; $major_version = $1;
die "Version must be in format nn.nn.\n" die "Invalid version string.\n"
if !($major_version =~ /^\d+\.\d+$/); if !($major_version =~ /^\d+$/);
} }
else else
{ {
......
...@@ -1334,16 +1334,13 @@ ValidatePgVersion(const char *path) ...@@ -1334,16 +1334,13 @@ ValidatePgVersion(const char *path)
char full_path[MAXPGPATH]; char full_path[MAXPGPATH];
FILE *file; FILE *file;
int ret; int ret;
long file_major, long file_major;
file_minor; long my_major;
long my_major = 0,
my_minor = 0;
char *endptr; char *endptr;
const char *version_string = PG_VERSION; char file_version_string[64];
const char *my_version_string = PG_VERSION;
my_major = strtol(version_string, &endptr, 10); my_major = strtol(my_version_string, &endptr, 10);
if (*endptr == '.')
my_minor = strtol(endptr + 1, NULL, 10);
snprintf(full_path, sizeof(full_path), "%s/PG_VERSION", path); snprintf(full_path, sizeof(full_path), "%s/PG_VERSION", path);
...@@ -1362,8 +1359,11 @@ ValidatePgVersion(const char *path) ...@@ -1362,8 +1359,11 @@ ValidatePgVersion(const char *path)
errmsg("could not open file \"%s\": %m", full_path))); errmsg("could not open file \"%s\": %m", full_path)));
} }
ret = fscanf(file, "%ld.%ld", &file_major, &file_minor); file_version_string[0] = '\0';
if (ret != 2) ret = fscanf(file, "%63s", file_version_string);
file_major = strtol(file_version_string, &endptr, 10);
if (ret != 1 || endptr == file_version_string)
ereport(FATAL, ereport(FATAL,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("\"%s\" is not a valid data directory", errmsg("\"%s\" is not a valid data directory",
...@@ -1374,13 +1374,13 @@ ValidatePgVersion(const char *path) ...@@ -1374,13 +1374,13 @@ ValidatePgVersion(const char *path)
FreeFile(file); FreeFile(file);
if (my_major != file_major || my_minor != file_minor) if (my_major != file_major)
ereport(FATAL, ereport(FATAL,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("database files are incompatible with server"), errmsg("database files are incompatible with server"),
errdetail("The data directory was initialized by PostgreSQL version %ld.%ld, " errdetail("The data directory was initialized by PostgreSQL version %s, "
"which is not compatible with this version %s.", "which is not compatible with this version %s.",
file_major, file_minor, version_string))); file_version_string, my_version_string)));
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
......
...@@ -1082,8 +1082,8 @@ get_bin_version(ClusterInfo *cluster) ...@@ -1082,8 +1082,8 @@ get_bin_version(ClusterInfo *cluster)
char cmd[MAXPGPATH], char cmd[MAXPGPATH],
cmd_output[MAX_STRING]; cmd_output[MAX_STRING];
FILE *output; FILE *output;
int pre_dot, int pre_dot = 0,
post_dot; post_dot = 0;
snprintf(cmd, sizeof(cmd), "\"%s/pg_ctl\" --version", cluster->bindir); snprintf(cmd, sizeof(cmd), "\"%s/pg_ctl\" --version", cluster->bindir);
...@@ -1098,7 +1098,7 @@ get_bin_version(ClusterInfo *cluster) ...@@ -1098,7 +1098,7 @@ get_bin_version(ClusterInfo *cluster)
if (strchr(cmd_output, '\n') != NULL) if (strchr(cmd_output, '\n') != NULL)
*strchr(cmd_output, '\n') = '\0'; *strchr(cmd_output, '\n') = '\0';
if (sscanf(cmd_output, "%*s %*s %d.%d", &pre_dot, &post_dot) != 2) if (sscanf(cmd_output, "%*s %*s %d.%d", &pre_dot, &post_dot) < 1)
pg_fatal("could not get version from %s\n", cmd); pg_fatal("could not get version from %s\n", cmd);
cluster->bin_version = (pre_dot * 100 + post_dot) * 100; cluster->bin_version = (pre_dot * 100 + post_dot) * 100;
......
...@@ -166,7 +166,7 @@ get_major_server_version(ClusterInfo *cluster) ...@@ -166,7 +166,7 @@ get_major_server_version(ClusterInfo *cluster)
if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 || if (fscanf(version_fd, "%63s", cluster->major_version_str) == 0 ||
sscanf(cluster->major_version_str, "%d.%d", &integer_version, sscanf(cluster->major_version_str, "%d.%d", &integer_version,
&fractional_version) != 2) &fractional_version) < 1)
pg_fatal("could not get version from %s\n", cluster->pgdata); pg_fatal("could not get version from %s\n", cluster->pgdata);
fclose(version_fd); fclose(version_fd);
......
...@@ -554,10 +554,10 @@ ...@@ -554,10 +554,10 @@
#define PACKAGE_NAME "PostgreSQL" #define PACKAGE_NAME "PostgreSQL"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "PostgreSQL 9.6beta4" #define PACKAGE_STRING "PostgreSQL 10devel"
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "9.6beta4" #define PACKAGE_VERSION "10devel"
/* Define to the name of a signed 128-bit integer type. */ /* Define to the name of a signed 128-bit integer type. */
#undef PG_INT128_TYPE #undef PG_INT128_TYPE
...@@ -566,10 +566,10 @@ ...@@ -566,10 +566,10 @@
#define PG_INT64_TYPE long long int #define PG_INT64_TYPE long long int
/* PostgreSQL version as a string */ /* PostgreSQL version as a string */
#define PG_VERSION "9.6beta4" #define PG_VERSION "10devel"
/* PostgreSQL version as a number */ /* PostgreSQL version as a number */
#define PG_VERSION_NUM 90600 #define PG_VERSION_NUM 100000
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "postgresql" #define PACKAGE_TARNAME "postgresql"
......
#include <winver.h> #include <winver.h>
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 9,6,0,0 FILEVERSION 10,0,0,0
PRODUCTVERSION 9,6,0,0 PRODUCTVERSION 10,0,0,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
FILEFLAGS 0 FILEFLAGS 0
FILEOS VOS__WINDOWS32 FILEOS VOS__WINDOWS32
...@@ -15,13 +15,13 @@ BEGIN ...@@ -15,13 +15,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "\0" VALUE "CompanyName", "\0"
VALUE "FileDescription", "PostgreSQL Access Library\0" VALUE "FileDescription", "PostgreSQL Access Library\0"
VALUE "FileVersion", "9.6.0\0" VALUE "FileVersion", "10.0\0"
VALUE "InternalName", "libpq\0" VALUE "InternalName", "libpq\0"
VALUE "LegalCopyright", "Copyright (C) 2016\0" VALUE "LegalCopyright", "Copyright (C) 2016\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "libpq.dll\0" VALUE "OriginalFilename", "libpq.dll\0"
VALUE "ProductName", "PostgreSQL\0" VALUE "ProductName", "PostgreSQL\0"
VALUE "ProductVersion", "9.6.0\0" VALUE "ProductVersion", "10.0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#include "pg_config.h" #include "pg_config.h"
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 9,6,0,0 FILEVERSION 10,0,0,0
PRODUCTVERSION 9,6,0,0 PRODUCTVERSION 10,0,0,0
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
FILEFLAGS 0x0L FILEFLAGS 0x0L
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
......
...@@ -131,12 +131,12 @@ sub GenerateFiles ...@@ -131,12 +131,12 @@ sub GenerateFiles
if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/) if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/)
{ {
$self->{strver} = $1; $self->{strver} = $1;
if ($self->{strver} !~ /^(\d+)\.(\d+)(?:\.(\d+))?/) if ($self->{strver} !~ /^(\d+)(?:\.(\d+))?/)
{ {
confess "Bad format of version: $self->{strver}\n"; confess "Bad format of version: $self->{strver}\n";
} }
$self->{numver} = sprintf("%d%02d%02d", $1, $2, $3 ? $3 : 0); $self->{numver} = sprintf("%d%04d", $1, $2 ? $2 : 0);
$self->{majorver} = sprintf("%d.%d", $1, $2); $self->{majorver} = sprintf("%d", $1);
} }
} }
close(C); close(C);
......
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
# Major version is hard-wired into the script. We update it when we branch # Major version is hard-wired into the script. We update it when we branch
# a new development version. # a new development version.
$major1 = 9; $majorversion = 10;
$major2 = 6;
# Validate argument and compute derived variables # Validate argument and compute derived variables
$minor = shift; $minor = shift;
...@@ -60,7 +59,6 @@ else ...@@ -60,7 +59,6 @@ else
} }
# Create various required forms of the version number # Create various required forms of the version number
$majorversion = $major1 . "." . $major2;
if ($dotneeded) if ($dotneeded)
{ {
$fullversion = $majorversion . "." . $minor; $fullversion = $majorversion . "." . $minor;
...@@ -70,7 +68,7 @@ else ...@@ -70,7 +68,7 @@ else
$fullversion = $majorversion . $minor; $fullversion = $majorversion . $minor;
} }
$numericversion = $majorversion . "." . $numericminor; $numericversion = $majorversion . "." . $numericminor;
$padnumericversion = sprintf("%d%02d%02d", $major1, $major2, $numericminor); $padnumericversion = sprintf("%d%04d", $majorversion, $numericminor);
# Get the autoconf version number for eventual nag message # Get the autoconf version number for eventual nag message
# (this also ensures we're in the right directory) # (this also ensures we're in the right directory)
...@@ -110,15 +108,15 @@ sed_file("src/include/pg_config.h.win32", ...@@ -110,15 +108,15 @@ sed_file("src/include/pg_config.h.win32",
); );
sed_file("src/interfaces/libpq/libpq.rc.in", sed_file("src/interfaces/libpq/libpq.rc.in",
"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $major1,$major2,$numericminor,0/' " "-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' "
. "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $major1,$major2,$numericminor,0/' " . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/' "
. "-e 's/VALUE \"FileVersion\", \"[0-9.]*/VALUE \"FileVersion\", \"$numericversion/' " . "-e 's/VALUE \"FileVersion\", \"[0-9.]*/VALUE \"FileVersion\", \"$numericversion/' "
. "-e 's/VALUE \"ProductVersion\", \"[0-9.]*/VALUE \"ProductVersion\", \"$numericversion/'" . "-e 's/VALUE \"ProductVersion\", \"[0-9.]*/VALUE \"ProductVersion\", \"$numericversion/'"
); );
sed_file("src/port/win32ver.rc", sed_file("src/port/win32ver.rc",
"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $major1,$major2,$numericminor,0/' " "-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' "
. "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $major1,$major2,$numericminor,0/'" . "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/'"
); );
print "Stamped these files with version number $fullversion:\n$fixedfiles"; print "Stamped these files with version number $fullversion:\n$fixedfiles";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment