[packages/postgis] - updated to 3.6.3 (fixes CVE-2022-2625, requires running topology.FixCorruptTopoGeometryColumn on D
qboosh
qboosh at pld-linux.org
Sun May 17 09:23:18 CEST 2026
commit 0b3ef43578fba22358b8c1b28afa01e535e73db5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 17 09:22:57 2026 +0200
- updated to 3.6.3 (fixes CVE-2022-2625, requires running topology.FixCorruptTopoGeometryColumn on DB)
- package actual HTML docs in -doc subpackage instead of partial docs sources in base package
- added SFCGAL support
postgis-parallel.patch | 17 ++++++++
postgis.spec | 107 ++++++++++++++++++++++++++++++++-----------------
2 files changed, 87 insertions(+), 37 deletions(-)
---
diff --git a/postgis.spec b/postgis.spec
index 5581667..e2e34e0 100644
--- a/postgis.spec
+++ b/postgis.spec
@@ -1,54 +1,59 @@
-# TODO: sfcgal support (sfcgal-config, >= 1.3.1)
-# xml2pot for translations
+# TODO: xml2pot, po2xml (poxml) for documentation translations
%define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
#
# Conditional build:
-%bcond_without raster # disable raster support
+%bcond_without raster # raster support via GDAL
+%bcond_without sfcgal # SFCGAL support
%bcond_without doc # HTML documentation
%bcond_without gui # data import GUI
#
Summary: Geographic Information Systems Extensions to PostgreSQL
Summary(pl.UTF-8): Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
Name: postgis
-Version: 3.5.0
-Release: 5
+Version: 3.6.3
+Release: 1
License: GPL v2+
Group: Applications/Databases
Source0: https://download.osgeo.org/postgis/source/%{name}-%{version}.tar.gz
-# Source0-md5: 330fdb385e558c7cbd855b267c26ba11
+# Source0-md5: 5b4b93c7cba86cd2f687890390ee2729
Patch0: install-lwgeom.patch
+Patch1: %{name}-parallel.patch
URL: http://postgis.refractions.net/
+%{?with_sfcgal:BuildRequires: SFCGAL-devel >= 1.3.1}
BuildRequires: bison
BuildRequires: clang
BuildRequires: flex
%{?with_raster:BuildRequires: gdal-devel >= 2.0.0}
-BuildRequires: geos-devel >= 3.6.0
+BuildRequires: geos-devel >= 3.8.0
+BuildRequires: gettext-tools
+%if %{with gui}
+BuildRequires: gtk+2-devel >= 2:2.8.0
+%endif
BuildRequires: json-c-devel
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libxml2-devel >= 2.0
BuildRequires: pcre2-8-devel
BuildRequires: perl-base
BuildRequires: pkgconfig
-BuildRequires: postgresql-backend-devel >= 11
-BuildRequires: postgresql-devel >= 11
-BuildRequires: proj-devel >= 4.9.0
+BuildRequires: postgresql-backend-devel >= 12
+BuildRequires: postgresql-devel >= 12
+BuildRequires: proj-devel >= 6.1.0
BuildRequires: protobuf-c-devel >= 1.1.0
%if %{with doc}
BuildRequires: ImageMagick
+BuildRequires: ImageMagick-coder-png
+BuildRequires: docbook-dtd50-xml
BuildRequires: docbook-style-xsl
BuildRequires: libxml2-progs
BuildRequires: libxslt-progs
-# TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
-%endif
-%if %{with gui}
-BuildRequires: gtk+2-devel >= 2:2.8.0
-BuildRequires: pkgconfig
%endif
%{?with_raster:Requires: gdal >= 2.0.0}
Requires: liblwgeom = %{version}-%{release}
Requires: postgresql >= %{pg_version}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define abiver 3.6
+
%define specflags_x86_64 -fPIC
# clang can't parse this
@@ -72,6 +77,7 @@ Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGI
Group: X11/Applications
Requires: %{name} = %{version}-%{release}
Requires: gtk+2 >= 2:2.8.0
+Requires: hicolor-icon-theme >= 0.17-3
%description gui
Data import GUI for PostGIS.
@@ -79,12 +85,24 @@ Data import GUI for PostGIS.
%description gui -l pl.UTF-8
Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
+%package doc
+Summary: PostGIS documentation in HTML format
+Summary(pl.UTF-8): Dokumentacja do PostGIS-a w formacie HTML
+Group: Documentation
+
+%description doc
+PostGIS documentation in HTML format.
+
+%description doc -l pl.UTF-8
+Dokumentacja do PostGIS-a w formacie HTML.
+
%package -n liblwgeom
Summary: lwgeom library (a part of PostGIS project)
Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS)
Group: Libraries
-Requires: geos >= 3.6.0
-Requires: proj >= 4.9.0
+%{?with_sfcgal:Requires: SFCGAL >= 1.3.1}
+Requires: geos >= 3.8.0
+Requires: proj >= 6.1.0
Conflicts: postgis < 2.0.0-2
%description -n liblwgeom
@@ -97,9 +115,10 @@ Biblioteka lwgeom (część projektu PostGIS).
Summary: Header file for lwgeom library
Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom
Group: Development/Libraries
-Requires: geos-devel >= 3.6.0
+%{?with_sfcgal:Requires: SFCGAL-devel >= 1.3.1}
+Requires: geos-devel >= 3.8.0
Requires: liblwgeom = %{version}-%{release}
-Requires: proj-devel >= 4.9.0
+Requires: proj-devel >= 6.1.0
%description -n liblwgeom-devel
Header file for lwgeom library.
@@ -121,18 +140,24 @@ Statyczna biblioteka lwgeom.
%prep
%setup -q
-%patch -P 0 -p1
+%patch -P0 -p1
+%patch -P1 -p1
-%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
- utils/postgis_restore.pl.in
+%{__sed} -E -i -e '1s,/usr/bin/env perl$,%{__perl},' \
+ utils/postgis_restore.pl.in
%build
%configure \
%{?with_gui:--with-gui} \
- %{!?with_raster:--without-raster}
+ %{!?with_raster:--without-raster} \
+ %{!?with_sfcgal:--without-sfcgal}
%{__make}
+%if %{with doc}
+%{__make} -C doc html images
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -142,11 +167,10 @@ rm -rf $RPM_BUILD_ROOT
%{__sed} -e '/#include .*/d' postgis_config.h > $RPM_BUILD_ROOT%{_includedir}/postgis_config.h
%{__sed} -i -e 's/#include.*postgis_config.*/#include "postgis_config.h"/' $RPM_BUILD_ROOT%{_includedir}/liblwgeom.h
-# Fix icons and desktop file locations
-#%{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
-#%{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
-
-%{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40
+%if %{with doc}
+%{__make} -C doc html-install html-assets-install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -156,24 +180,27 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
+%doc CREDITS ChangeLog LICENSE.TXT NEWS README.postgis SECURITY.md TODO
%attr(755,root,root) %{_bindir}/pgsql2shp
%attr(755,root,root) %{_bindir}/pgtopo_export
%attr(755,root,root) %{_bindir}/pgtopo_import
%attr(755,root,root) %{_bindir}/postgis
%attr(755,root,root) %{_bindir}/postgis_restore
%attr(755,root,root) %{_bindir}/shp2pgsql
-%attr(755,root,root) %{_libdir}/postgresql/address_standardizer-3.so
-%attr(755,root,root) %{_libdir}/postgresql/postgis-3.so
-%attr(755,root,root) %{_libdir}/postgresql/postgis_topology-3.so
-%{_datadir}/postgresql/contrib/postgis-3.5
+%{_libdir}/postgresql/address_standardizer-3.so
+%{_libdir}/postgresql/postgis-3.so
+%{_libdir}/postgresql/postgis_topology-3.so
+%{_datadir}/postgresql/contrib/postgis-%{abiver}
%{_datadir}/postgresql/extension/address_standardizer*.sql
%{_datadir}/postgresql/extension/address_standardizer*.control
%{_datadir}/postgresql/extension/postgis*.control
%{_datadir}/postgresql/extension/postgis*.sql
%if %{with raster}
%attr(755,root,root) %{_bindir}/raster2pgsql
-%attr(755,root,root) %{_libdir}/postgresql/postgis_raster-3.so
+%{_libdir}/postgresql/postgis_raster-3.so
+%endif
+%if %{with sfcgal}
+%{_libdir}/postgresql/postgis_sfcgal-3.so
%endif
%{_mandir}/man1/pgsql2shp.1*
%{_mandir}/man1/pgtopo_export.1*
@@ -190,14 +217,20 @@ rm -rf $RPM_BUILD_ROOT
%{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
%endif
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%{_docdir}/postgis
+%endif
+
%files -n liblwgeom
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/liblwgeom-3.5.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblwgeom-3.5.so.0
+%{_libdir}/liblwgeom-%{abiver}.so.*.*.*
+%ghost %{_libdir}/liblwgeom-%{abiver}.so.0
%files -n liblwgeom-devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/liblwgeom.so
+%{_libdir}/liblwgeom.so
%{_libdir}/liblwgeom.la
%{_includedir}/liblwgeom.h
%{_includedir}/lwinline.h
diff --git a/postgis-parallel.patch b/postgis-parallel.patch
new file mode 100644
index 0000000..7a5d1dc
--- /dev/null
+++ b/postgis-parallel.patch
@@ -0,0 +1,17 @@
+--- postgis-3.6.3/raster/rt_pg/Makefile.in.orig 2026-04-14 21:13:01.000000000 +0200
++++ postgis-3.6.3/raster/rt_pg/Makefile.in 2026-05-17 07:21:39.919485685 +0200
+@@ -129,10 +129,10 @@ endif
+ # in the extension/ folder
+ #
+ %.sql: %.sql.in
+- $(SQLPP) -I at top_builddir@/postgis/ $< > $@.tmp
+- grep -v '^#' $@.tmp | \
+- $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@
+- rm -f $@.tmp
++ $(SQLPP) -I at top_builddir@/postgis/ $< > $@.tmp.$$$$ && \
++ grep -v '^#' $@.tmp.$$$$ | \
++ $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@ && \
++ rm -f $@.tmp.$$$$
+
+ ../../liblwgeom/.libs/liblwgeom.a:
+ $(MAKE) -C ../../liblwgeom
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/postgis.git/commitdiff/0b3ef43578fba22358b8c1b28afa01e535e73db5
More information about the pld-cvs-commit
mailing list