Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions root/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ environment variables:
exactly like the official binaries. No `PGHOST`, no `/run/postgresql`.
- **Zero-env PL languages.** `plperl.so`/`pltcl.so`/`plpython3.so` carry
RUNPATHs pointing at from-source `/opt`-prefixed runtimes built in
`ppg:common:deps:tarballs` (`root/ppg/common/deps/tarballs/`): `percona-perl`,
`ppg:common:deps:tarballs` (`root/ppg/common/deps/tarballs/`): `percona-perl526`
(EL8) / `percona-perl532` (EL9),
`percona-tcl` (8.6.10) and `percona-python3` (3.12.13).
Every path (`@INC`, `TCL_LIBRARY`, `sys.prefix`) is compiled into those
runtimes, so all three PLs work even under a bare `postgres -D` start from
Expand All @@ -326,7 +327,8 @@ environment variables:
not NEED `libreadline`; `bin/psql` must be the non-ELF wrapper with
byte-clean stdout (no bare `cd -`).
- **Lean GDAL/PROJ.** PostGIS's `libgdal`/`libproj` come from the
`percona-gdal` / `percona-proj` packages in `ppg:common:deps` — from-source,
`percona-gdal38`/`percona-gdal313` and `percona-proj96`/`percona-proj98`
packages (one per EL base) in `ppg:common:deps:tarballs` — from-source,
`/opt`-prefixed, built with the option set PostGIS actually needs. EPEL's
fully-optioned `gdal-libs` dragged ~70 surplus shared objects into the
artifact, among them `libflexiblas`, whose ELF constructor `abort()`s when
Expand Down
21 changes: 0 additions & 21 deletions root/ppg/common/deps/tarballs/percona-gdal/obs/_service

This file was deleted.

11 changes: 11 additions & 0 deletions root/ppg/common/deps/tarballs/percona-gdal313/obs/_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<services>
<!-- PERCONA: GDAL %!{GIS_GDAL_VERSION} for the RHEL 9 tarball base (libgdal.so.39, like
gdal313); the other base is built by percona-gdal38. Version from
root/macros.yaml. download.osgeo.org is upstream's own release archive. -->
<service name="download_url">
<param name="host">download.osgeo.org</param>
<param name="protocol">https</param>
<param name="path">/gdal/%!{GIS_GDAL_VERSION}/gdal-%!{GIS_GDAL_VERSION}.tar.xz</param>
<param name="filename">gdal-%!{GIS_GDAL_VERSION}.tar.xz</param>
</service>
</services>
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ description: |
libgdal inside the binary tarball only — the shipped PostGIS RPMs keep
resolving to gdal38-libs/gdal313-libs on user systems.

RockyLinux_8, RockyLinux_9.6 and RockyLinux_9 only: these are the
tarball build bases (ssl1.1 / ssl3 / ssl3.5).
This package is the RHEL 9 build (RockyLinux_9.6 / RockyLinux_9,
tarballs ssl3 / ssl3.5); percona-gdal38 is the RHEL 8 one.

# Builds on every repo of ppg:common:deps:tarballs (one per tarball EL
# base: RockyLinux_8=ssl1.1, RockyLinux_9.6=ssl3, RockyLinux_9=ssl3.5).
build:
RockyLinux_8: false
312 changes: 312 additions & 0 deletions root/ppg/common/deps/tarballs/percona-gdal313/rpm/percona-gdal313.spec

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions root/ppg/common/deps/tarballs/percona-gdal38/obs/_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<services>
<!-- PERCONA: GDAL %!{GIS_GDAL_EL8_VERSION} for the RHEL 8 tarball base (libgdal.so.34, like
gdal38); the other base is built by percona-gdal313. Version from
root/macros.yaml. download.osgeo.org is upstream's own release archive. -->
<service name="download_url">
<param name="host">download.osgeo.org</param>
<param name="protocol">https</param>
<param name="path">/gdal/%!{GIS_GDAL_EL8_VERSION}/gdal-%!{GIS_GDAL_EL8_VERSION}.tar.xz</param>
<param name="filename">gdal-%!{GIS_GDAL_EL8_VERSION}.tar.xz</param>
</service>
</services>
28 changes: 28 additions & 0 deletions root/ppg/common/deps/tarballs/percona-gdal38/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
title: /opt-prefixed lean GDAL runtime for the PPG binary tarball
description: |
GDAL built from upstream source with the install prefix
/opt/percona-gdal and only the driver set the official Percona
PostgreSQL tarball's libgdal links, so the binary tarball carries a
handful of shared objects instead of the ~70 that EPEL's
fully-optioned gdal-libs drags in (armadillo/FlexiBLAS — whose ELF
constructor abort()s on Rocky hosts — poppler, hdf4/hdf5, netcdf,
OPeNDAP, xerces, libkml, unixODBC, mariadb, cfitsio, ogdi, ...). The
GDAL data directory is compiled to /opt/percona-gdal/share/gdal and
PROJ comes from percona-proj, so both resolve their resource files
with zero environment variables. Built with CMake: GDAL's bundled
libgeotiff, no libspatialite, GEOS from geos315
(ppg:common:deps:postgis).

Version follows the PGDG-mirrored GDAL that the shipped PostGIS RPMs
link (ppg:common:deps:postgis): RHEL 8 -> GDAL 3.8.5 like gdal38
(libgdal.so.34), RHEL 9 -> GDAL 3.13.3 like gdal313 (libgdal.so.39).
That makes it a drop-in replacement for gdal38-libs/gdal313-libs'
libgdal inside the binary tarball only — the shipped PostGIS RPMs keep
resolving to gdal38-libs/gdal313-libs on user systems.

This package is the RHEL 8 build (RockyLinux_8, tarball ssl1.1);
percona-gdal313 is the RHEL 9 one.

build:
RockyLinux_9: false
RockyLinux_9.6: false
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,10 @@
# not enable LTO, so this is a no-op there.)
%global _lto_cflags %{nil}

# PERCONA: base-specific upstream version + which Source to unpack.
%if 0%{?rhel} == 8
# PERCONA: one package per tarball base (percona-gdal38: RHEL 8,
# percona-gdal313: RHEL 9), each with a single upstream version.
%global gdal_version %!{GIS_GDAL_EL8_VERSION}
%global gdal_srcidx 0
%global gdal_soname 34
%else
%global gdal_version %!{GIS_GDAL_VERSION}
%global gdal_srcidx 1
%global gdal_soname 39
%endif
# GDAL's CMake build installs the resource files to, and compiles INST_DATA
# as, <prefix>/<CMAKE_INSTALL_DATADIR>/gdal (gdal.cmake sets
# GDAL_RESOURCE_PATH itself, so it cannot be overridden from the command
Expand All @@ -76,16 +70,13 @@
# geos315 from ppg:common:deps:postgis, the GEOS PostGIS links.
%global geos_prefix /usr/geos315

Name: percona-gdal
Name: percona-gdal%!{GIS_GDAL_EL8_MAJOR}
Version: %{gdal_version}
Release: 1%{?dist}
Summary: GDAL runtime under /opt/percona-gdal for the Percona PostgreSQL binary tarball
License: MIT
URL: https://gdal.org/
# PERCONA: both tarballs are always fetched by the _service; %%prep
# unpacks only the one that matches the base being built.
Source0: gdal-%!{GIS_GDAL_EL8_VERSION}.tar.xz
Source1: gdal-%!{GIS_GDAL_VERSION}.tar.xz

# PERCONA: an EXPLICIT dependency on our own PROJ, not just the automatic
# libproj.so.NN()(64bit) ELF requires. That auto-requires is ambiguous:
Expand All @@ -95,15 +86,15 @@ Source1: gdal-%!{GIS_GDAL_VERSION}.tar.xz
# /opt/percona-proj/lib absent, libgdal's rpath dead and the whole
# compiled-in-data-path mechanism broken. The point of this package is
# *our* libproj, not any libproj with a matching SONAME.
Requires: percona-proj
Requires: percona-proj%!{GIS_PROJ_EL8_MAJOR}

BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: cmake >= 3.16
# PERCONA: our own /opt PROJ — same SONAME as the libproj PostGIS linked,
# with the data path compiled to /opt/percona-proj/share/proj.
BuildRequires: percona-proj
BuildRequires: percona-proj%!{GIS_PROJ_EL8_MAJOR}
# The driver set, one BuildRequires per NEEDED entry of the official
# tarball's libgdal (see the header comment). libgeotiff is GDAL's bundled
# copy (GDAL_USE_GEOTIFF_INTERNAL) and libspatialite is not used, so
Expand All @@ -125,15 +116,10 @@ BuildRequires: expat-devel
# CMake config, so GDAL's FindGEOS finds it through CMAKE_PREFIX_PATH.
BuildRequires: geos315-devel
BuildRequires: json-c-devel
%if 0%{?rhel} == 8
# PCRE1, not PCRE2, on EL8: the GDAL 3.0.4 this replaces had no PCRE2
# support, so its libgdal linked libpcre.so.1 (and no liblz4); keep the
# same library set.
BuildRequires: pcre-devel
%else
BuildRequires: pcre2-devel
BuildRequires: lz4-devel
%endif

%description
GDAL %{version} built from the upstream source with the prefix
Expand All @@ -142,16 +128,14 @@ tarball's libgdal links, so the binary tarball carries a handful of
shared objects instead of the ~70 that EPEL's fully-optioned gdal-libs
drags in. The GDAL data directory is compiled to
/opt/percona-gdal/share/gdal and PROJ comes from percona-proj, so both
resolve their resource files without any environment variables. The
upstream version is picked per base so the SONAME matches the libgdal
that the shipped PostGIS RPMs linked against (RHEL 8: 3.8.5 /
libgdal.so.34 like gdal38, RHEL 9: 3.13.3 / libgdal.so.39 like gdal313),
making this a drop-in replacement inside the tarball. Consumed by the
resolve their resource files without any environment variables. This is the
RHEL 8 build: its SONAME (libgdal.so.34) matches the libgdal
of gdal38 that the shipped PostGIS RPMs link, making it a drop-in
replacement inside the tarball. Consumed by the
tarball build; not intended for standalone installation.

%prep
# PERCONA: -T -b %%{gdal_srcidx} — unpack only the base-matching tarball.
%setup -q -T -b %{gdal_srcidx} -n gdal-%{version}
%setup -q -n gdal-%{version}

%build
# PERCONA: plain cmake, not %%cmake — the distro macro forces /usr + lib64
Expand Down Expand Up @@ -247,14 +231,9 @@ cmake .. \
-DGDAL_USE_JSONC=ON \
-DGDAL_USE_GEOS=ON \
-DGDAL_USE_ICONV=ON \
%if 0%{?rhel} == 8
-DGDAL_USE_PCRE2=OFF \
-DGDAL_USE_PCRE=ON \
-DGDAL_USE_LZ4=OFF \
%else
-DGDAL_USE_PCRE2=ON \
-DGDAL_USE_LZ4=ON \
%endif
-DGDAL_USE_SPATIALITE=OFF \
-DGDAL_USE_POSTGRESQL=OFF

Expand All @@ -268,8 +247,8 @@ make -C build install DESTDIR=%{buildroot}
# 1. SONAME parity. The package is only useful as a drop-in for the libgdal
# the shipped PostGIS RPMs linked against, so assert the SONAME we
# promised for this base actually came out. Without this, a source-URL
# bump — or this spec being built on an unexpected %%{?rhel} where the
# %%if picks the wrong branch — would silently produce a library that is
# bump — or this package being built on the wrong base — would silently
# produce a library that is
# no longer ABI-compatible with postgis_raster.
test -e %{buildroot}%{gdal_prefix}/lib/libgdal.so.%{gdal_soname}
# 2. The compiled-in data path. The resource files must actually BE in the
Expand Down Expand Up @@ -308,6 +287,11 @@ readelf -d %{buildroot}%{gdal_prefix}/lib/libgdal.so.%{gdal_soname} | grep -E '\
%{gdal_prefix}

%changelog
* Tue Oct 20 2026 Percona Development <info@percona.com> - %{version}-%{release}
- Split percona-gdal into one package per tarball base so each OBS
package builds a single version: percona-gdal38 (RHEL 8, GDAL 3.8.5)
and percona-gdal313 (RHEL 9, GDAL 3.13.3). Install prefix unchanged.

* Sun Oct 18 2026 Percona Development <info@percona.com> - %{version}-%{release}
- Follow the PGDG-mirrored GDAL that PostGIS now links: 3.8.5 on RHEL 8
(gdal38, libgdal.so.34) and 3.13.3 on RHEL 9 (gdal313,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ Provides: libgeotiff17 = %!{GIS_LIBGEOTIFF_VERSION}

# The real runtimes this shim stands in for, plus the real geos315 that the
# tarball bundles as-is.
Requires: percona-gdal
Requires: percona-proj
%if 0%{?rhel} == 8
Requires: percona-gdal%!{GIS_GDAL_EL8_MAJOR}
Requires: percona-proj%!{GIS_PROJ_EL8_MAJOR}
%else
Requires: percona-gdal%!{GIS_GDAL_MAJOR}
Requires: percona-proj%!{GIS_PROJ_MAJOR}
%endif
Requires: geos%!{GIS_GEOS_MAJOR}

%description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<services>
<!-- PERCONA: Perl 5.26.3, the distro perl of the RHEL 8 tarball base;
the other base is built by percona-perl532. -->
<service name="download_url">
<param name="host">www.cpan.org</param>
<param name="protocol">https</param>
<param name="path">/src/5.0/perl-5.26.3.tar.gz</param>
<param name="filename">perl-5.26.3.tar.gz</param>
</service>
<service name="download_url">
<param name="host">www.cpan.org</param>
<param name="protocol">https</param>
<param name="path">/src/5.0/perl-5.32.1.tar.gz</param>
<param name="filename">perl-5.32.1.tar.gz</param>
</service>
</services>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ description: |
the distro perl of each build base (5.26.3 on EL8, 5.32.1 on EL9):
plperl.so is ABI-tied to the libperl it was compiled against
(DT_NEEDED libperl.so.5.26 / libperl.so.5.32). Installs only under
/opt/percona-perl — nothing shadows system packages. RockyLinux_8,
RockyLinux_9 and RockyLinux_9.6 only — the tarball build bases
(ssl1.1 on EL8, ssl3 on the 9.6 vault).
/opt/percona-perl — nothing shadows system packages. This package
is the RHEL 8 build (RockyLinux_8, tarball ssl1.1);
percona-perl532 is the RHEL 9 one.

# Builds on every repo of ppg:common:deps:tarballs (one per tarball EL
# base: RockyLinux_8=ssl1.1, RockyLinux_9.6=ssl3, RockyLinux_9=ssl3.5).
build:
RockyLinux_9: false
RockyLinux_9.6: false
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@

%global perl_prefix /opt/percona-perl

# PERCONA: version MUST track the distro perl of each build base (see the
# PERCONA: version MUST track the distro perl of its build base (see the
# ABI constraint above). The SONAME must equal plperl.so's DT_NEEDED.
%if 0%{?rhel} == 8
# One package per base: percona-perl526 (RHEL 8), percona-perl532 (RHEL 9).
%global perl_version 5.26.3
%global perl_soname libperl.so.5.26
%else
%global perl_version 5.32.1
%global perl_soname libperl.so.5.32
%endif

# PERCONA: this is a self-contained /opt runtime. Do not leak perl(...)
# provides (they would satisfy other packages' perl-module deps in the
Expand All @@ -73,15 +69,13 @@
# PERCONA: keep our /opt/percona-perl/bin/perl shebangs untouched.
%undefine __brp_mangle_shebangs

Name: percona-perl
Name: percona-perl526
Version: %{perl_version}
Release: 1%{?dist}
Summary: Perl runtime under /opt/percona-perl for the Percona PostgreSQL binary tarball
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://www.perl.org/
# PERCONA: both distro-matched versions ship as sources; %%{?rhel} picks.
Source0: perl-5.26.3.tar.gz
Source1: perl-5.32.1.tar.gz
# PERCONA: 5.26-only — build against libxcrypt's crypt.h (no
# current_saltbits member); upstream dropped the code in 5.28.
Patch0: perl-5.26.3-crypt-libxcrypt.patch
Expand All @@ -104,12 +98,8 @@ environment variables. Consumed by the Percona PostgreSQL binary tarball
build; not intended for standalone installation.

%prep
%if 0%{?rhel} == 8
%setup -q -n perl-%{perl_version}
%patch0 -p1
%else
%setup -q -T -b 1 -n perl-%{perl_version}
%endif

%build
./Configure -des \
Expand Down Expand Up @@ -179,6 +169,12 @@ ln -sf %{perl_soname} %{buildroot}%{perl_prefix}/lib/%{perl_version}/CORE/libper
%{perl_prefix}

%changelog
* Tue Oct 20 2026 Percona Development <info@percona.com> - %{version}-%{release}
- Split percona-perl into one package per tarball base so each OBS
package builds a single version: percona-perl526 (RHEL 8, Perl
5.26.3) and percona-perl532 (RHEL 9, Perl 5.32.1). Install prefix
unchanged.

* Tue Jul 28 2026 Percona Build/Release Team <eng-build@percona.com> - 5.26.3-1
- Initial /opt/percona-perl runtime for the Percona PostgreSQL binary
tarball: distro-matched Perl (5.26.3 on EL8, 5.32.1 on EL9) built from
Expand Down
10 changes: 10 additions & 0 deletions root/ppg/common/deps/tarballs/percona-perl532/obs/_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<services>
<!-- PERCONA: Perl 5.32.1, the distro perl of the RHEL 9 tarball base;
the other base is built by percona-perl526. -->
<service name="download_url">
<param name="host">www.cpan.org</param>
<param name="protocol">https</param>
<param name="path">/src/5.0/perl-5.32.1.tar.gz</param>
<param name="filename">perl-5.32.1.tar.gz</param>
</service>
</services>
15 changes: 15 additions & 0 deletions root/ppg/common/deps/tarballs/percona-perl532/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: /opt-prefixed Perl runtime for the PPG binary tarball
description: |
Perl built from upstream source with every install path compiled to
/opt/percona-perl, so the RPM-built plperl.so bundled into the Percona
PostgreSQL binary tarball resolves libperl and its @INC (strict.pm,
POSIX.pm, ...) with zero environment variables. The version MUST match
the distro perl of each build base (5.26.3 on EL8, 5.32.1 on EL9):
plperl.so is ABI-tied to the libperl it was compiled against
(DT_NEEDED libperl.so.5.26 / libperl.so.5.32). Installs only under
/opt/percona-perl — nothing shadows system packages. This package
is the RHEL 9 build (RockyLinux_9.6 / RockyLinux_9, tarballs ssl3 /
ssl3.5); percona-perl526 is the RHEL 8 one.

build:
RockyLinux_8: false
Loading
Loading