[SCM] PostGIS branch master updated. 3.5.0-246-gd6031ec0d

git at osgeo.org git at osgeo.org
Mon Apr 7 13:11:46 PDT 2025


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  d6031ec0d52dec2886989f6bedc52e35e332a59f (commit)
       via  94186341879a6c388c90a63aaf73c19001be0e7c (commit)
      from  9388d6fd79d5f9b4ea37b0c79d54957b9deb2741 (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 d6031ec0d52dec2886989f6bedc52e35e332a59f
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Apr 7 13:11:41 2025 -0700

    Apply Cirrus updates from loic.bartoletti at oslandia.com

diff --git a/.cirrus.yml b/.cirrus.yml
index c2490f510..d6eafbf66 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,95 +1,114 @@
 task:
-  only_if: $CIRRUS_BRANCH =~ 'pull/.*'
+  #  only_if: $CIRRUS_BRANCH =~ 'pull/.*'
   name: FreeBSD
   alias: test-freebsd
-  #env:
-    #MAKE_FLAGS: -j 8
-
-  install_script:
-    - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
-    - ASSUME_ALWAYS_YES=yes pkg bootstrap -f
-    - pkg install -y
-        autoconf
-        automake
-        bison
-        cunit
-        docbook
-        gdal
-        geos
-        gmake
-        iconv
-        json-c
-        libtool
-        libxml2
-        libxslt
-        pcre
-        pkgconf
-        postgresql13-contrib
-        postgresql13-server
-        proj
-        protobuf-c
-        sfcgal
-    - projsync --system-directory --source-id us_noaa
-    - projsync --system-directory --source-id ch_swisstopo
-
+  env:
+    CIRRUS_CLONE_DEPTH: 1
+    CCACHE_DIR: "/tmp/ccache_dir"
+    NCPU: 8
+    MAKEJOBS: "-j${NCPU}"
+    CC: "ccache clang"
+    CXX: "ccache clang++"
+    CCACHE_MAXSIZE: 1
+    CCACHE_COMPRESS: 1
+    CCACHE_STATIC_PREFIX: "/usr/local"
+    CCACHE_NOSTATS: 1
+    CCACHE_TEMPDIR: "/tmp"
+    BASEFS: "${CIRRUS_WORKING_DIR}/test_bulk"
+  freebsd_cache:
+    folder: ${CCACHE_DIR}
+  pkg_bootstrap_script:
+    - |
+      sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
+      ASSUME_ALWAYS_YES=yes pkg bootstrap -f
+  pkg_cache:
+    folder: /var/cache/pkg
+    populate_script:
+      pkg fetch -udy autoconf automake bison cunit docbook gdal geos gmake iconv json-c libtool libxml2 libxslt pcre2 pkgconf postgresql13-contrib postgresql13-server proj protobuf-c sfcgal
+  install_pkgs_script:
+    - |
+      env IGNORE_OSVERSION=yes pkg update -f
+      env IGNORE_OSVERSION=yes pkg install -y autoconf automake bison cunit docbook gdal geos gmake iconv json-c libtool libxml2 libxslt pcre2 pkgconf postgresql13-contrib postgresql13-server proj protobuf-c sfcgal
+      projsync --system-directory --source-id us_noaa
+      projsync --system-directory --source-id ch_swisstopo
+  ccache_setup_script:
+    - |
+      env IGNORE_OSVERSION=yes pkg install -y ccache-static
+      ccache --max-size=${CCACHE_MAXSIZE}
   patch_script:
-    # will be removed
-    - find . -name "*.pl" | xargs sed -i -r 's|/usr/bin/perl|/usr/bin/env perl|'
+    - |
+      find . -name "*.pl" | xargs sed -i -r 's|/usr/bin/perl|/usr/bin/env perl|'
   build_script:
-    - ./autogen.sh
-    - ./configure PKG_CONFIG=/usr/local/bin/pkgconf CFLAGS="-isystem /usr/local/include -Wall -fno-omit-frame-pointer -Werror" LDFLAGS="-L/usr/local/lib" --with-libiconv-prefix=/usr/local --without-gui --with-topology --without-raster  --with-sfcgal=/usr/local/bin/sfcgal-config --with-address-standardizer --with-protobuf
-    - service postgresql oneinitdb
-    - service postgresql onestart
-    - su postgres -c "createuser -s `whoami`"
-    - gmake || { service postgresql onestop; exit 1;}
-    - gmake check RUNTESTFLAGS="-v" || { service postgresql onestop; exit 1;}
-    - gmake install || { service postgresql onestop; exit 1;}
-    - gmake check RUNTESTFLAGS="-v --extension" || { service postgresql onestop; exit 1;}
-    - gmake check RUNTESTFLAGS="-v --extension --dumprestore" || { service postgresql onestop; exit 1;}
-    - service postgresql onestop
-
+    - |
+      ./autogen.sh
+      ./configure PKG_CONFIG=/usr/local/bin/pkgconf CFLAGS="-isystem /usr/local/include -Wall -fno-omit-frame-pointer -Werror" LDFLAGS="-L/usr/local/lib" --with-libiconv-prefix=/usr/local --without-gui --with-topology --without-raster --with-sfcgal=/usr/local/bin/sfcgal-config --with-address-standardizer --with-protobuf
+      service postgresql oneinitdb
+      service postgresql onestart
+      su postgres -c "createuser -s `whoami`"
+      gmake ${MAKEJOBS} || { service postgresql onestop; exit 1; }
+      gmake ${MAKEJOBS} install || { service postgresql onestop; exit 1; }
+      ccache -s
+  test_script:
+    - |
+      gmake ${MAKEJOBS} check RUNTESTFLAGS="-v --extension --dumprestore" || { service postgresql onestop; exit 1; }
+      service postgresql onestop
   freebsd_instance:
-    cpu: 8
-    memory: 24g
+    cpu: ${NCPU}
+    memory: 24G
   matrix:
-    # - name: 14-CURRENT
-    #   freebsd_instance:
-    #     image_family: freebsd-14-0-snap
-    - name: 13.2-RELEASE
+    - name: 14.2-RELEASE
       freebsd_instance:
-        image_family: freebsd-13-2
+        image_family: freebsd-14-2
 
 task:
   name: macOS
   alias: test-macos
-  test_script:
-    - brew update
-    - brew install
-        autoconf
-        automake
-        cunit
-        docbook
-        docbook-xsl
-        gdal
-        geos
-        gpp
-        json-c
-        libtool
-        pcre2
-        pkg-config
-        postgresql at 14
-        proj
-        sfcgal
-    - ./autogen.sh
-    - ./configure --without-gui --without-interrupt-tests --without-topology --without-raster  --with-sfcgal --with-address-standardizer --without-protobuf --with-pgconfig=/opt/homebrew/opt/postgresql at 14/bin/pg_config
-    - brew services start postgresql at 14
-    - postgres -V
-    - make -j8 || { brew services stop postgresql at 14; exit 1;}
-    - make -j8 check || { brew services stop postgresql at 14; exit 1;}
-    - brew services stop postgresql at 14
+  macos_instance:
+    image: ghcr.io/cirruslabs/macos-runner:sonoma
 
-  matrix:
-    macos_instance:
-      image: ghcr.io/cirruslabs/macos-ventura-base:latest
-  #  macos_instance:
-  #    image: ghcr.io/cirruslabs/macos-monterey-base:latest
+  env:
+    CC: "ccache clang"
+    CXX: "ccache clang++"
+    CCACHE_DIR: "$HOME/.ccache"
+    CCACHE_MAXSIZE: 1
+    PG: "17"
+    HOMEBREW_PREFIX: "/opt/homebrew"
+    PATH: "${HOMEBREW_PREFIX}/opt/postgresql@${PG}/bin:${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:${HOMEBREW_PREFIX}/opt/ccache/libexec:$PATH"
+
+  setup_script:
+    - |
+      brew update
+      brew install ccache autoconf automake libtool pkg-config gdal geos icu4c json-c libpq libxml2 pcre2 proj protobuf-c sfcgal cunit docbook docbook-xsl postgresql@${PG} gettext
+      brew link --force gettext
+      ccache --max-size=$CCACHE_MAXSIZE
+      sudo ln -sfn ${HOMEBREW_PREFIX}/opt/postgresql@${PG}/bin/postgres /usr/local/bin/postgres
+
+  test_script:
+    - |
+      export PGCONFIG="${HOMEBREW_PREFIX}/opt/postgresql@${PG}/bin/pg_config"
+      export CFLAGS="-I${HOMEBREW_PREFIX}/opt/gettext/include \
+                     -I${HOMEBREW_PREFIX}/opt/postgresql@${PG}/include \
+                     -I${HOMEBREW_PREFIX}/include -Wno-nullability-completeness"
+      export LDFLAGS="-L${HOMEBREW_PREFIX}/opt/gettext/lib \
+                      -L${HOMEBREW_PREFIX}/opt/postgresql@${PG}/lib"
+      export CXXFLAGS="-std=c++17"
+
+      ./autogen.sh
+      ./configure --without-gui \
+                  --without-interrupt-tests \
+                  --with-topology \
+                  --without-raster \
+                  --with-sfcgal \
+                  --with-address-standardizer \
+                  --with-protobuf \
+                  --with-pgconfig=${PGCONFIG}
+
+      brew services start postgresql@${PG}
+      make -j$(sysctl -n hw.logicalcpu) || { brew services stop postgresql@${PG}; exit 1; }
+      make -j$(sysctl -n hw.logicalcpu) check || { brew services stop postgresql@${PG}; exit 1; }
+      brew services stop postgresql@${PG}
+
+  macos_cache:
+    folders: ${CCACHE_DIR}
+
+  upload_caches: macos

commit 94186341879a6c388c90a63aaf73c19001be0e7c
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Apr 7 12:28:45 2025 -0700

    Fix ST_AddPoint with empty point argument
    References #5876

diff --git a/liblwgeom/lwgeom_api.c b/liblwgeom/lwgeom_api.c
index b51a65d75..c75bbb6ca 100644
--- a/liblwgeom/lwgeom_api.c
+++ b/liblwgeom/lwgeom_api.c
@@ -107,7 +107,8 @@ POINT4D
 getPoint4d(const POINTARRAY *pa, uint32_t n)
 {
 	POINT4D result;
-	getPoint4d_p(pa, n, &result);
+	if (getPoint4d_p(pa, n, &result) == 0)
+		lwerror("%s [%d] error returned by getPoint4d_p", __FILE__, __LINE__);
 	return result;
 }
 
@@ -134,7 +135,7 @@ getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *op)
 
 	if ( n>=pa->npoints )
 	{
-		LWDEBUGF(2, "%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
+		lwerror("%s [%d] called with n=%d and npoints=%d", __FILE__, __LINE__, n, pa->npoints);
 		return 0;
 	}
 
diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c
index 1f9348c1b..974fad631 100644
--- a/postgis/lwgeom_functions_basic.c
+++ b/postgis/lwgeom_functions_basic.c
@@ -2294,6 +2294,11 @@ Datum LWGEOM_addpoint(PG_FUNCTION_ARGS)
 		PG_RETURN_NULL();
 	}
 
+	if (gserialized_is_empty(pglwg2))
+	{
+		PG_RETURN_POINTER(pglwg1);
+	}
+
 	line = lwgeom_as_lwline(lwgeom_from_gserialized(pglwg1));
 
 	if (PG_NARGS() <= 2)
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index 913970d4b..9ac1f216b 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1575,3 +1575,7 @@ WHERE ST_DFullyWithin(
     extent,
     1700
 );
+
+SELECT '#5876', ST_AsText(ST_AddPoint(
+		'LINESTRING (1 1, 2 2)'::geometry,
+		'POINT EMPTY'::geometry), 2);
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 27d415dba..d18abe567 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -483,3 +483,4 @@ ERROR:  Geometry contains invalid coordinates
 #5686|0
 #5747|0
 #5855|Knosesmauet
+#5876|LINESTRING(1 1,2 2)

-----------------------------------------------------------------------

Summary of changes:
 .cirrus.yml                      | 181 +++++++++++++++++++++------------------
 liblwgeom/lwgeom_api.c           |   5 +-
 postgis/lwgeom_functions_basic.c |   5 ++
 regress/core/tickets.sql         |   4 +
 regress/core/tickets_expected    |   1 +
 5 files changed, 113 insertions(+), 83 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list