[SCM] PostGIS branch stable-3.4 updated. 3.4.6-79-gad11b27e2

git at osgeo.org git at osgeo.org
Sun Jul 19 23:40:19 PDT 2026


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, stable-3.4 has been updated
       via  ad11b27e2021d48eae913a9d5b09ac95f8a8cd8d (commit)
       via  d2dd53910bc2a343086d149e1d0fda650184f6d2 (commit)
       via  3943e8a618ffdb585390555c2137178f9c4cf7d0 (commit)
      from  919621591ffa25603d939c36f30e4828fe29eb5a (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 ad11b27e2021d48eae913a9d5b09ac95f8a8cd8d
Merge: 919621591 d2dd53910
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Sun Jul 19 23:40:18 2026 -0700

    Merge pull request 'doc: avoid overlong GraphicsMagick draw options on stable 3.4' (!463) from Komzpa/postgis:fix/stable-3.4-doc-generator-gm-drawfile into stable-3.4
    
    Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/463


commit d2dd53910bc2a343086d149e1d0fda650184f6d2
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Mon Jul 20 09:47:07 2026 +0400

    ci: skip deprecated upgrade shims in locking view

diff --git a/regress/hooks/use-all-functions.sql b/regress/hooks/use-all-functions.sql
index 74e5f2517..e7e2a5781 100644
--- a/regress/hooks/use-all-functions.sql
+++ b/regress/hooks/use-all-functions.sql
@@ -31,6 +31,9 @@ BEGIN
 		-- We only consider normal and window functions
 		-- ( not aggregates or procedures )
 		AND prokind in ('f','w')
+		-- Skip upgrade shim functions that are intentionally removed or
+		-- replaced during extension upgrade.
+		AND proname !~ '_deprecated_by_postgis_[0-9]+$'
 		-- Skip function known to be problematic
 		AND proname NOT IN (
 			'st_approxquantile' -- https://trac.osgeo.org/postgis/ticket/5498

commit 3943e8a618ffdb585390555c2137178f9c4cf7d0
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Mon Jul 20 08:33:21 2026 +0400

    doc: avoid overlong GraphicsMagick draw options
    
    (cherry picked from commit b18f041323f41fcc9b1a5be6bd36ef1525d24bfa)

diff --git a/doc/html/images/generator.c b/doc/html/images/generator.c
index 0ada4e581..8a3f6a773 100644
--- a/doc/html/images/generator.c
+++ b/doc/html/images/generator.c
@@ -98,6 +98,8 @@ typedef struct generator_job {
 	const char *converter_cli;
 	LAYERSTYLE *styles;
 	stringbuffer_t command;
+	const char *tmpdir;
+	unsigned int draw_num;
 } generator_job;
 
 static void
@@ -107,6 +109,8 @@ generator_job_init(generator_job *job, const generator_options *options)
 	job->converter_cli = NULL;
 	job->styles = NULL;
 	stringbuffer_init(&job->command);
+	job->tmpdir = NULL;
+	job->draw_num = 0;
 }
 
 static void
@@ -123,6 +127,8 @@ generator_job_reset(generator_job *job)
 
 typedef struct draw_context_t {
 	LAYERSTYLE *style;
+	const char *tmpdir;
+	unsigned int *draw_num;
 } GEOMETRY_DRAW_CONTEXT;
 
 static GEOMETRY_DRAW_CONTEXT
@@ -130,6 +136,8 @@ geometry_draw_context_init(void)
 {
 	GEOMETRY_DRAW_CONTEXT ctx;
 	ctx.style = NULL;
+	ctx.tmpdir = NULL;
+	ctx.draw_num = NULL;
 	return ctx;
 }
 
@@ -160,6 +168,20 @@ checked_system(const char *cmd)
 	}
 }
 
+static void
+cleanup_temp_dir(const char *dir)
+{
+	stringbuffer_t command;
+
+	if (!dir)
+		return;
+
+	stringbuffer_init(&command);
+	stringbuffer_aprintf(&command, "rm -rf %s", dir);
+	checked_system(stringbuffer_getstring(&command));
+	stringbuffer_release(&command);
+}
+
 /*
  * Locate executables in PATH using liblwgeom's stringbuffer helpers so the
  * probing logic can be promoted to the raster tooling if it ever needs the
@@ -354,6 +376,39 @@ pointarrayToBuffer(stringbuffer_t *output, POINTARRAY *pa)
 	}
 }
 
+static int
+append_draw_file(stringbuffer_t *output, GEOMETRY_DRAW_CONTEXT *ctx, const char *draw_command)
+{
+	stringbuffer_t draw_path;
+	FILE *draw_file;
+
+	if (!ctx->tmpdir || !ctx->draw_num)
+	{
+		lwerror("Temporary draw-file context is not initialized");
+		return -1;
+	}
+
+	stringbuffer_init(&draw_path);
+	stringbuffer_aprintf(&draw_path, "%s/draw%u", ctx->tmpdir, (*ctx->draw_num)++);
+
+	draw_file = fopen(stringbuffer_getstring(&draw_path), "w");
+	if (!draw_file)
+	{
+		perror(stringbuffer_getstring(&draw_path));
+		stringbuffer_release(&draw_path);
+		return -1;
+	}
+
+	fputs(draw_command, draw_file);
+	fclose(draw_file);
+
+	stringbuffer_append(output, "-draw '@");
+	stringbuffer_append(output, stringbuffer_getstring(&draw_path));
+	stringbuffer_append(output, "' ");
+	stringbuffer_release(&draw_path);
+	return 0;
+}
+
 /**
  * Draws a point in a POINTARRAY to a char* using GraphicsMagick SVG for styling.
 
@@ -483,9 +538,11 @@ drawLineString(stringbuffer_t *output, LWLINE *lwl, GEOMETRY_DRAW_CONTEXT *ctx)
 	pointarrayToBuffer(&path, lwl->points);
 	stringbuffer_append(&path, "'");
 
-	stringbuffer_append(output, "-draw \"");
-	stringbuffer_append(output, stringbuffer_getstring(&path));
-	stringbuffer_append(output, "\" ");
+	if (append_draw_file(output, ctx, stringbuffer_getstring(&path)) < 0)
+	{
+		stringbuffer_release(&path);
+		return;
+	}
 
 	stringbuffer_release(&path);
 
@@ -530,9 +587,11 @@ drawPolygon(stringbuffer_t *output, LWPOLY *lwp, GEOMETRY_DRAW_CONTEXT *ctx)
 	}
 	stringbuffer_append(&path, "'");
 
-	stringbuffer_append(output, "-draw \"");
-	stringbuffer_append(output, stringbuffer_getstring(&path));
-	stringbuffer_append(output, "\" ");
+	if (append_draw_file(output, ctx, stringbuffer_getstring(&path)) < 0)
+	{
+		stringbuffer_release(&path);
+		return;
+	}
 
 	stringbuffer_release(&path);
 }
@@ -666,6 +725,8 @@ append_layers(generator_job *job, FILE *source)
 		LWDEBUGF(4, "geom = %s", lwgeom_to_ewkt(lwgeom));
 
 		ctx.style = getStyle(job->styles, style_name);
+		ctx.tmpdir = job->tmpdir;
+		ctx.draw_num = &job->draw_num;
 		if (!ctx.style)
 		{
 			lwgeom_free(lwgeom);
@@ -740,6 +801,7 @@ generator_render(const generator_options *options, const char *source_path, cons
 	char *target_path = NULL;
 	int rc = -1;
 	const char *converter_cli;
+	char tempdir_template[] = "generator-temp-XXXXXX";
 
 	generator_job_init(&job, options);
 
@@ -751,6 +813,12 @@ generator_render(const generator_options *options, const char *source_path, cons
 		goto cleanup;
 	}
 	job.converter_cli = converter_cli;
+	job.tmpdir = mkdtemp(tempdir_template);
+	if (!job.tmpdir)
+	{
+		perror("generator-temp");
+		goto cleanup;
+	}
 
 	source = fopen(source_path, "r");
 	if (!source)
@@ -800,6 +868,7 @@ cleanup:
 		lwfree(styles_path);
 	if (target_path)
 		lwfree(target_path);
+	cleanup_temp_dir(job.tmpdir);
 	generator_job_reset(&job);
 	return rc;
 }

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

Summary of changes:
 doc/html/images/generator.c         | 81 ++++++++++++++++++++++++++++++++++---
 regress/hooks/use-all-functions.sql |  3 ++
 2 files changed, 78 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list