Skip to content

Commit 4027065

Browse files
committed
ppg:devel:19: switch pg_tde source to percona/pg_tde main, add build fixes
Track the upstream percona/pg_tde repository's main branch (moving versionformat) instead of the pinned jeltz/pg_tde pg19 fork branch. Add the cmake BuildRequires/Build-Depends now needed to build the libkmip cmake subproject against that source. Port the two C++ KMIP client build fixes already applied in devel:18: - SUSE: pull gcc-c++ into the chroot. Without it meson falls back to clang++ (from the llvmjit BuildRequires) for the C++ link while C is compiled by gcc with -flto=auto, and ld.bfd cannot combine the mixed LTO objects ("plugin needed to handle lto object", "archive has no index"). - Debian 11: quilt patch meson-cpp-std-c2a rewrites cpp_std=c++20 to the equivalent c++2a spelling, since bullseye's meson 0.56.2 predates the c++20 option name (added in meson 0.57). Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
1 parent cdf2804 commit 4027065

7 files changed

Lines changed: 39 additions & 3 deletions

File tree

root/ppg/devel/19/percona-pg_tde/debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Maintainer: Percona Development Team <info@percona.com>
55
Build-Depends:
66
mawk,
77
meson,
8+
cmake,
89
ninja-build,
910
pkg-config,
1011
debhelper (>= 9),

root/ppg/devel/19/percona-pg_tde/debian/control.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Maintainer: Percona Development Team <info@percona.com>
55
Build-Depends:
66
mawk,
77
meson,
8+
cmake,
89
ninja-build,
910
pkg-config,
1011
debhelper (>= 9),

root/ppg/devel/19/percona-pg_tde/debian/debian.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Build-Depends:
1919
libzstd-dev,
2020
mawk,
2121
meson,
22+
cmake,
2223
ninja-build,
2324
pkg-config,
2425
percona-postgresql-server-dev-all (>= 153~),
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Use the pre-ratification spelling "c++2a" of the C++20 standard so that
2+
meson 0.56.2 on Debian 11 accepts the cpp_std value ("c++20" was only
3+
added to meson's cpp_std choices in 0.57). gcc and clang treat -std=c++2a
4+
and -std=c++20 identically, and g++ 10 on bullseye compiles the C++ KMIP
5+
client fine. The libkmip cmake subproject needs no change: cmake itself
6+
emits -std=c++2a for CMAKE_CXX_STANDARD 20 on gcc 10.
7+
--- a/meson.build
8+
+++ b/meson.build
9+
@@ -139,7 +139,7 @@ shared_module('pg_tde',
10+
'src/pg_tde_guc.c',
11+
'src/smgr/pg_tde_smgr.c',
12+
),
13+
- override_options: ['cpp_std=c++20'],
14+
+ override_options: ['cpp_std=c++2a'],
15+
include_directories: incdirs,
16+
install: true,
17+
install_dir: pkglibdir,
18+
@@ -168,7 +168,7 @@ pg_tde_frontend = static_library('pg_tde_frontend',
19+
),
20+
c_args: ['-DFRONTEND'],
21+
cpp_args: ['-DFRONTEND'],
22+
- override_options: ['cpp_std=c++20'],
23+
+ override_options: ['cpp_std=c++2a'],
24+
dependencies: [pgfeutils, pgcommon, pgport, curl, crypto, ssl, kmipclient, kmipcore],
25+
include_directories: incdirs,
26+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
meson-cpp-std-c2a

root/ppg/devel/19/percona-pg_tde/obs/_service

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<services>
22
<service name="obs_scm">
3-
<param name="url">https://github.com/jeltz/pg_tde.git</param>
3+
<param name="url">https://github.com/percona/pg_tde.git</param>
44
<param name="scm">git</param>
5-
<param name="revision">pg19</param>
6-
<param name="version">2.2.2.dev</param>
5+
<param name="revision">main</param>
6+
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
77
<param name="submodules">enable</param>
88
<param name="filename">percona-pg_tde%!{PG_MAJOR_VERSION}</param>
99
</service>

root/ppg/devel/19/percona-pg_tde/rpm/pg_tde.spec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ URL: https://github.com/%{sname}/%{sname}/
2828
Source0: %{name}-%{version}.tar.gz
2929

3030
BuildRequires: meson
31+
BuildRequires: cmake
3132
BuildRequires: percona-postgresql%{pgmajorversion}-devel chrpath openssl-devel libcurl-devel zlib-devel libxml2-devel libxslt-devel libselinux-devel pam-devel krb5-devel readline-devel
3233
BuildRequires: percona-postgresql%{pgmajorversion}-static
3334
%if 0%{?gts_version}
@@ -38,6 +39,11 @@ BuildRequires: json-c-devel lz4-devel libzstd-devel numactl-devel
3839
%endif
3940
%if 0%{?suse_version}
4041
BuildRequires: libjson-c-devel liblz4-devel libzstd-devel >= 1.4.0 libnuma-devel
42+
# The C++ KMIP client needs a C++ compiler. Without gcc-c++ in the chroot
43+
# meson falls back to clang++ (pulled in via the llvmjit BuildRequires) while
44+
# C is compiled by gcc; with SUSE's default -flto=auto the mixed toolchain
45+
# produces archives/objects the linker cannot combine.
46+
BuildRequires: gcc-c++
4147
%endif
4248
Requires: postgresql%{pgmajorversion}-server curl openssl
4349

0 commit comments

Comments
 (0)