-
Notifications
You must be signed in to change notification settings - Fork 20
/
meson.build
164 lines (139 loc) · 4.43 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
curldep = dependency('libcurl')
pg_tde_version = '1.0.0-beta2'
conf_data = configuration_data()
conf_data.set_quoted('PACKAGE_NAME', 'pg_tde')
conf_data.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/percona/pg_tde/issues')
conf_data.set_quoted('PACKAGE_VERSION', pg_tde_version)
conf_data.set_quoted('PACKAGE_STRING', 'pg_tde ' + pg_tde_version)
conf_data.set_quoted('PACKAGE_TARNAME', 'pg_tde')
configure_file(output : 'config.h',
configuration : conf_data)
pg_version = meson.project_version().substring(0,2)
src_version = 'src' + pg_version
pg_tde_sources = files(
'src/pg_tde.c',
'src/transam/pg_tde_xact_handler.c',
'src/access/pg_tde_tdemap.c',
'src/access/pg_tde_slot.c',
src_version / 'access/pg_tdeam.c',
src_version / 'access/pg_tdeam_handler.c',
src_version / 'access/pg_tdeam_visibility.c',
src_version / 'access/pg_tdetoast.c',
src_version / 'access/pg_tde_io.c',
src_version / 'access/pg_tde_prune.c',
src_version / 'access/pg_tde_rewrite.c',
src_version / 'access/pg_tde_vacuumlazy.c',
src_version / 'access/pg_tde_visibilitymap.c',
'src/access/pg_tde_ddl.c',
'src/access/pg_tde_xlog.c',
'src/access/pg_tde_xlog_encrypt.c',
'src/encryption/enc_tde.c',
'src/encryption/enc_aes.c',
'src/keyring/keyring_curl.c',
'src/keyring/keyring_file.c',
'src/keyring/keyring_vault.c',
'src/keyring/keyring_kmip.c',
'src/keyring/keyring_kmip_ereport.c',
'src/keyring/keyring_api.c',
'src/smgr/pg_tde_smgr.c',
'src/catalog/tde_global_space.c',
'src/catalog/tde_keyring.c',
'src/catalog/tde_keyring_parse_opts.c',
'src/catalog/tde_principal_key.c',
'src/common/pg_tde_shmem.c',
'src/common/pg_tde_utils.c',
'src/pg_tde_defs.c',
'src/pg_tde.c',
'src/pg_tde_event_capture.c',
'src/libkmip/libkmip/src/kmip.c',
'src/libkmip/libkmip/src/kmip_bio.c',
'src/libkmip/libkmip/src/kmip_locate.c',
'src/libkmip/libkmip/src/kmip_memset.c',
)
incdir = include_directories(src_version / 'include', 'src/include', '.', 'src/libkmip/libkmip/include/')
deps_update = {'dependencies': contrib_mod_args.get('dependencies') + [curldep]}
mod_args = contrib_mod_args + deps_update
pg_tde = shared_module('pg_tde',
pg_tde_sources,
c_pch: pch_postgres_h,
kwargs: mod_args,
include_directories: incdir,
)
contrib_targets += pg_tde
ldflags = []
if host_system == 'darwin'
# On MacOS Shared Libraries and Loadable Modules are different things,
# so we need to pass an extra flag to the linker.
ldflags += '-bundle'
endif
install_data(
'pg_tde.control',
'pg_tde--1.0.sql',
kwargs: contrib_data_args,
)
sql_tests = [
'toast_decrypt_basic',
'toast_extended_storage_basic',
'move_large_tuples_basic',
'non_sorted_off_compact_basic',
'update_compare_indexes_basic',
'pg_tde_is_encrypted_basic',
'test_issue_153_fix_basic',
'multi_insert_basic',
'keyprovider_dependency_basic',
'trigger_on_view_basic',
'change_access_method_basic',
'insert_update_delete_basic',
'tablespace_basic',
'vault_v2_test_basic',
'kmip_test_basic',
'alter_index_basic',
'merge_join_basic',
]
tap_tests = [
't/001_basic.pl',
't/002_rotate_key.pl',
't/003_remote_config.pl',
't/004_file_config.pl',
't/005_multiple_extensions.pl',
't/006_remote_vault_config.pl',
't/007_access_control.pl',
't/009_key_rotate_tablespace.pl',
]
if get_variable('percona_ext', false)
sql_tests += [
'toast_decrypt',
'toast_extended_storage',
'move_large_tuples',
'non_sorted_off_compact',
'update_compare_indexes',
'update',
'pg_tde_is_encrypted',
'test_issue_153_fix',
'multi_insert',
'keyprovider_dependency',
'trigger_on_view',
'change_access_method',
'insert_update_delete',
'tablespace',
'vault_v2_test',
'kmip_test',
'alter_index',
'merge_join',
]
tap_tests += [
't/008_tde_heap.pl',
]
endif
tests += {
'name': 'pg_tde',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': sql_tests,
'regress_args': ['--temp-config', files('pg_tde.conf')],
'runningcheck': false,
},
'tap': {
'tests': tap_tests },
}