Skip to content

Commit

Permalink
PostGIS Build Fix [EL9] (#183)
Browse files Browse the repository at this point in the history
* Patch PostgreSQL 15.5 PGXS `Makefile.global` when present.

* Fix PostGIS test regressions from PostgreSQL 15.5.

* Fix difference in image prefixes between `docker compose` and `docker-compose`.

* Let's try and not resolve GDAL RPM dependencies.

* Revert #178 and only remove opaque pointers option.

* FML
  • Loading branch information
jbronn authored Nov 20, 2023
1 parent dc33071 commit 9f9d1dc
Show file tree
Hide file tree
Showing 7 changed files with 6,823 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile.el7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Conditional variables.
DOCKER ?= docker
DOCKER_COMPOSE ?= docker compose
DOCKER_COMPOSE ?= docker-compose
EL_VERSION ?= el7
CI ?= false
COMPOSE_FILE ?= docker-compose.$(EL_VERSION).yml
Expand Down Expand Up @@ -146,7 +146,7 @@ ifndef DOCKER_VERSION
$(error "command docker is not available, please install Docker")
endif
ifndef DOCKER_COMPOSE_VERSION
$(error "command docker compose is not available, please install the Docker Compose plugin")
$(error "command docker-compose is not available, please install docker-compose")
endif

all-rpms: $(RPMBUILD_RPMS)
Expand Down
4 changes: 2 additions & 2 deletions Makefile.el9
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Conditional variables.
DOCKER ?= docker
DOCKER_COMPOSE ?= docker compose
DOCKER_COMPOSE ?= docker-compose
EL_VERSION ?= el9
CI ?= false
COMPOSE_FILE ?= docker-compose.$(EL_VERSION).yml
Expand Down Expand Up @@ -133,7 +133,7 @@ ifndef DOCKER_VERSION
$(error "command docker is not available, please install Docker")
endif
ifndef DOCKER_COMPOSE_VERSION
$(error "command docker compose is not available, please install the Docker Compose plugin")
$(error "command docker-compose is not available, please install docker-compose")
endif

all-rpms: $(RPMBUILD_RPMS)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ You will need to have `~/.gnupg-geoint` populated using the `.gpg` file and prov
## Requirements

* Linux host and some basics:
* Python 3 for the [scripts](./scripts/).
* Python 3 for `docker-compose` and some of the [scripts](./scripts/).
* GNU `make` for [`Makefile.el7`](./Makefile.el7)/[`Makefile.el9`](./Makefile.el9).

* Docker

* [Docker Compose Plugin](https://docs.docker.com/compose/install/linux/)
* Docker Compose >= 1.27
* Supports compose format 3.7, for its [`init` option](https://docs.docker.com/compose/compose-file/compose-file-v3/#init).
6,788 changes: 6,788 additions & 0 deletions SOURCES/el9/postgis-disable-xml-tests.patch

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions SOURCES/el9/postgis-fix-regress-delaunaytriangles.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- ./regress/core/delaunaytriangles_expected 2023-08-16 02:06:05.000000000 +0000
+++ /tmp/pgis_reg/test_102_out 2023-11-17 19:21:19.006151522 +0000
@@ -1,9 +1,9 @@
-1|GEOMETRYCOLLECTION(POLYGON((5 5,6 0,7 9,5 5)))
-2|GEOMETRYCOLLECTION(POLYGON((5 5,6 0,8 9,5 5)),POLYGON((5 5,8 9,7 9,5 5)))
-3|GEOMETRYCOLLECTION(POLYGON((5 5,6 0,7 9,5 5)))
+1|GEOMETRYCOLLECTION(POLYGON((7 9,5 5,6 0,7 9)))
+2|GEOMETRYCOLLECTION(POLYGON((7 9,5 5,8 9,7 9)),POLYGON((8 9,5 5,6 0,8 9)))
+3|GEOMETRYCOLLECTION(POLYGON((7 9,5 5,6 0,7 9)))
4|MULTILINESTRING((5 5,7 9),(5 5,6 0),(6 0,7 9))
-5|TIN(((5 5,6 0,7 9,5 5)))
-6|TIN(((5 5,6 0,8 9,5 5)),((5 5,8 9,7 9,5 5)))
-7|TIN(((5 5,6 0,7 9,5 5)))
-10|GEOMETRYCOLLECTION Z (POLYGON Z ((5 5 3,6 0 2,7 9 1,5 5 3)))
-11|TIN Z (((5 5 1,6 0 2,7 9 3,5 5 1)))
+5|TIN(((7 9,5 5,6 0,7 9)))
+6|TIN(((7 9,5 5,8 9,7 9)),((8 9,5 5,6 0,8 9)))
+7|TIN(((7 9,5 5,6 0,7 9)))
+10|GEOMETRYCOLLECTION Z (POLYGON Z ((7 9 1,5 5 3,6 0 2,7 9 1)))
+11|TIN Z (((7 9 3,5 5 1,6 0 2,7 9 3)))
3 changes: 3 additions & 0 deletions SPECS/el9/postgis.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Source0: https://download.osgeo.org/%{name}/source/%{name}-%{version}%{?p
Source1: https://download.osgeo.org/%{name}/docs/%{name}-%{version}%{?prerelease}-en.pdf
Source2: postgis-filter-requires-perl-Pg.sh
Patch0: postgis-3.4-gdalfpic.patch
Patch1: postgis-fix-regress-delaunaytriangles.patch
# XXX: GML/KML test failures since PostgreSQL 15.5
Patch2: postgis-disable-xml-tests.patch

URL: http://www.postgis.net/

Expand Down
7 changes: 5 additions & 2 deletions docker/el9/Dockerfile.rpmbuild-geoint-pgdg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ RUN --mount=type=cache,target=/var/cache/dnf \
if [ -n "${gem_packages:-}" ] ; then gem install ${gem_packages}; fi && \
if [ -n "${python_packages:-}" ] ; then pip3 install --disable-pip-version-check --no-cache-dir ${python_packages}; fi

# Ensure proper permissions on PostgreSQL run directory (again).
RUN chown -R "${RPMBUILD_USER}:${RPMBUILD_GROUP}" /var/run/postgresql
# * Ensure proper permissions on PostgreSQL run directory (again).
# * XXX: Patch out use of clang with invalid options when building bitcode files,
# now necessary since PostgreSQL 15.5 development package.
RUN chown -R "${RPMBUILD_USER}:${RPMBUILD_GROUP}" /var/run/postgresql && \
if [ -f /usr/pgsql-15/lib/pgxs/src/Makefile.global ] ; then sed -i -e 's/-no-opaque-pointers //g' /usr/pgsql-15/lib/pgxs/src/Makefile.global; fi

# Switch back to RPM build user.
USER ${RPMBUILD_USER}

0 comments on commit 9f9d1dc

Please sign in to comment.