[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-473-g2fca37fcd
git at osgeo.org
git at osgeo.org
Thu Feb 3 10:42:14 PST 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 2fca37fcdd2effe84595ec313fb0e378e7f48c4c (commit)
via 00085d0bcad221f4b8e6c0698ed3eca17e87960b (commit)
from 58a27e141d9d681ecb955860a179d32a1a274a38 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2fca37fcdd2effe84595ec313fb0e378e7f48c4c
Author: Sandro Santilli <strk at kbt.io>
Date: Thu Feb 3 19:41:56 2022 +0100
[dronie] Print also INFO from check_all_upgrades
diff --git a/ci/dronie/postgis_regress.sh b/ci/dronie/postgis_regress.sh
index f74054b94..cde58b38d 100644
--- a/ci/dronie/postgis_regress.sh
+++ b/ci/dronie/postgis_regress.sh
@@ -50,4 +50,4 @@ tee check.log < check.fifo &
${SRCDIR}/utils/check_all_upgrades.sh -s ${CURRENTVERSION}! > check.fifo
wait # for tee process to flush its buffers
echo "-- Summary of upgrade tests --"
-egrep '(PASS|FAIL|SKIP)' check.log
+egrep '(PASS|FAIL|SKIP|INFO)' check.log
commit 00085d0bcad221f4b8e6c0698ed3eca17e87960b
Author: Sandro Santilli <strk at kbt.io>
Date: Thu Feb 3 17:18:12 2022 +0100
check_all_upgrade improvements
Generalize labeling of SKIP messages
Generalize postgresql/postgis support matrix
diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh
index 905c7ceb8..20e96f8ee 100755
--- a/utils/check_all_upgrades.sh
+++ b/utils/check_all_upgrades.sh
@@ -1,6 +1,14 @@
#!/bin/sh
EXIT_ON_FIRST_FAILURE=0
+BUILDDIR=$PWD
+EXTDIR=`pg_config --sharedir`/extension/
+CTBDIR=`pg_config --sharedir`/contrib/
+TMPDIR=/tmp/check_all_upgrades-$$-tmp
+PGVER=`pg_config --version | awk '{print $2}'`
+PGVER_MAJOR=$(echo "${PGVER}" | sed 's/\.[^\.]*//')
+echo "INFO: PostgreSQL version: ${PGVER} [${PGVER_MAJOR}]"
+
if test "$1" = "-s"; then
EXIT_ON_FIRST_FAILURE=1
@@ -14,14 +22,13 @@ if test -z "$1"; then
exit 1
fi
-to_version_param="$1"
-to_version=$to_version_param
-if expr $to_version : ':auto' >/dev/null; then
- export PGDATABASE=template1
- to_version=`psql -XAtc "select default_version from pg_available_extensions where name = 'postgis'"` || exit 1
-elif expr $to_version : '.*!$' >/dev/null; then
- to_version=$(echo "${to_version}" | sed 's/\!$//')
-fi
+mkdir -p ${TMPDIR}
+cleanup()
+{
+ rm -rf ${TMPDIR}
+}
+
+trap 'cleanup' 0
# Return -1, 1 or 0 if the first version
@@ -53,27 +60,6 @@ semver_compare()
echo 0; return;
}
-
-BUILDDIR=$PWD
-EXTDIR=`pg_config --sharedir`/extension/
-CTBDIR=`pg_config --sharedir`/contrib/
-PGVER=`pg_config --version | awk '{print $2}'`
-
-echo "PostgreSQL version: ${PGVER}"
-
-cd $EXTDIR
-failures=0
-
-INSTALLED_EXTENSIONS=postgis
-if test -f postgis_topology--${to_version}.sql; then
- INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_topology"
-fi
-if test -f postgis_raster--${to_version}.sql; then
- INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_raster"
-fi
-
-echo "INFO: installed extensions: $INSTALLED_EXTENSIONS"
-
failed()
{
failures=$((failures+1))
@@ -82,9 +68,35 @@ failed()
fi
}
+minimum_postgis_version_for_postgresql_major_version()
+{
+ pgver=$1
+ supportfile=${TMPDIR}/minimum_supported_version_for_postgresql
+
+ if ! test -e ${supportfile}; then
+ # Source: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
+ cat > ${supportfile} <<EOF
+9.6:2.3
+10:2.4
+11:2.5
+12:2.5
+13:3.0
+14:3.1
+EOF
+ fi
+
+ # Drop patch-level number from PostgreSQL version
+ minsupported=`grep ^${pgver}: ${supportfile} | cut -d: -f2`
+ test -n "${minsupported}" || {
+ echo "Cannot detemine minimum supported PostGIS version for PostgreSQL major version ${pgver}" >&2
+ exit 1
+ }
+ echo "${minsupported}"
+}
+
compatible_upgrade()
{
- upgrade_path=$1
+ label=$1
from=$2
to=$3
@@ -92,24 +104,49 @@ compatible_upgrade()
#echo "XXXX compatible_upgrade: from=${from}"
#echo "XXXX compatible_upgrade: to=${to}"
- # only consider versions older than ${to_version_param}
+ # only consider versions older than ${to}
cmp=`semver_compare "${from}" "${to}"`
+ #echo "INFO: semver_compare ${from} ${to} returned $cmp"
if test $cmp -ge 0; then
- echo "SKIP: upgrade $upgrade_path ($to is not newer than $from)"
+ echo "SKIP: $label ($to is not newer than $from)"
return 1
fi
- cmp=`semver_compare "${PGVER}" "11"`
- if test $cmp -ge 0; then
- cmp=`semver_compare "3.0" "${from}"`
- if test $cmp -ge 0; then
- echo "SKIP: upgrade $UPGRADE_PATH ($from < 3.0 which is required to run in PostgreSQL ${PGVER})"
- return 1
- fi
+ cmp=`semver_compare "${PGIS_MIN_VERSION}" "${from}"`
+ if test $cmp -gt 0; then
+ echo "SKIP: $label ($from older than ${PGIS_MIN_VERSION}, which is required to run in PostgreSQL ${PGVER})"
+ return 1
fi
return 0
}
+to_version_param="$1"
+to_version=$to_version_param
+if expr $to_version : ':auto' >/dev/null; then
+ export PGDATABASE=template1
+ to_version=`psql -XAtc "select default_version from pg_available_extensions where name = 'postgis'"` || exit 1
+elif expr $to_version : '.*!$' >/dev/null; then
+ to_version=$(echo "${to_version}" | sed 's/\!$//')
+fi
+
+
+PGIS_MIN_VERSION=`minimum_postgis_version_for_postgresql_major_version "${PGVER_MAJOR}"`
+echo "INFO: minimum PostGIS version supporting PostgreSQL ${PGVER_MAJOR}: ${PGIS_MIN_VERSION}"
+
+
+cd $EXTDIR
+failures=0
+
+INSTALLED_EXTENSIONS=postgis
+if test -f postgis_topology--${to_version}.sql; then
+ INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_topology"
+fi
+if test -f postgis_raster--${to_version}.sql; then
+ INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_raster"
+fi
+
+echo "INFO: installed extensions: $INSTALLED_EXTENSIONS"
+
for EXT in ${INSTALLED_EXTENSIONS}; do
if test "${EXT}" = "postgis"; then
REGDIR=${BUILDDIR}/regress
@@ -128,45 +165,45 @@ for EXT in ${INSTALLED_EXTENSIONS}; do
for fname in $files; do
from_version="$fname"
UPGRADE_PATH="${from_version}--${to_version_param}"
+ test_label="${EXT} extension upgrade ${UPGRADE_PATH}"
+ if expr $to_version_param : ':auto' >/dev/null; then
+ test_label="${test_label} ($to_version)"
+ fi
+ compatible_upgrade "${test_label}" ${from_version} ${to_version} || continue
UPGRADE_FILE="${EXT}--${from_version}--${to_version}.sql"
- compatible_upgrade ${UPGRADE_PATH} ${from_version} ${to_version} || continue
- if test -e ${UPGRADE_FILE}; then
- if expr $to_version_param : ':auto' >/dev/null; then
- echo "Testing ${EXT} upgrade $UPGRADE_PATH ($to_version)"
- else
- echo "Testing ${EXT} upgrade $UPGRADE_PATH"
- fi
- RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
- make -C ${REGDIR} check && {
- echo "PASS: ${EXT} upgrade $UPGRADE_PATH"
- } || {
- echo "FAIL: ${EXT} upgrade $UPGRADE_PATH"
- failed
- }
- else
- echo "SKIP: ${EXT} upgrade $UPGRADE_FILE is missing"
+ if ! test -e ${UPGRADE_FILE}; then
+ echo "SKIP: ${test_label} ($UPGRADE_FILE is missing)"
+ continue
fi
+ echo "Testing ${test_label}"
+ RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
+ make -C ${REGDIR} check && {
+ echo "PASS: ${test_label}"
+ } || {
+ echo "FAIL: ${test_label}"
+ failed
+ }
done
# Check unpackaged->extension upgrades
for majmin in `'ls' -d ${CTBDIR}/postgis-* | sed 's/.*postgis-//'`; do
UPGRADE_PATH="unpackaged${majmin}--${to_version_param}"
+ test_label="${EXT} extension upgrade ${UPGRADE_PATH}"
+ if expr $to_version_param : ':auto' >/dev/null; then
+ test_label="${test_label} ($to_version)"
+ fi
+ compatible_upgrade "${test_label}" ${majmin} ${to_version} || continue
UPGRADE_FILE="${EXT}--unpackaged--${to_version}.sql"
if ! test -e ${UPGRADE_FILE}; then
- echo "SKIP: ${EXT} upgrade $UPGRADE_FILE is missing"
+ echo "SKIP: ${test_label} ($UPGRADE_FILE is missing)"
continue
fi
- compatible_upgrade ${UPGRADE_PATH} ${majmin} ${to_version} || continue
- if expr $to_version_param : ':auto' >/dev/null; then
- echo "Testing ${EXT} upgrade $UPGRADE_PATH ($to_version)"
- else
- echo "Testing ${EXT} upgrade $UPGRADE_PATH"
- fi
+ echo "Testing ${test_label}"
RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
make -C ${REGDIR} check && {
- echo "PASS: ${EXT} upgrade $UPGRADE_PATH"
+ echo "PASS: ${test_label}"
} || {
- echo "FAIL: ${EXT} upgrade $UPGRADE_PATH"
+ echo "FAIL: ${test_label}"
failed
}
done
-----------------------------------------------------------------------
Summary of changes:
ci/dronie/postgis_regress.sh | 2 +-
utils/check_all_upgrades.sh | 165 ++++++++++++++++++++++++++-----------------
2 files changed, 102 insertions(+), 65 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list