Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b4e2ab4
Starting changes
sofia-tekdatum Jan 25, 2026
1616149
First attempt at adding new external encryption to meson.build
sofia-tekdatum Jan 27, 2026
ed7bd5c
Fixing typo
sofia-tekdatum Jan 27, 2026
6a03dfa
Fixing typo
sofia-tekdatum Jan 27, 2026
1352123
Fixing typo
sofia-tekdatum Jan 27, 2026
8831d0a
Adding dbps external project
sofia-tekdatum Jan 27, 2026
7244f0a
Fix path
sofia-tekdatum Jan 27, 2026
7541f16
Restructuring subproject
sofia-tekdatum Jan 27, 2026
9731bc5
Different dependency
sofia-tekdatum Jan 27, 2026
5ec1861
Another attempt
sofia-tekdatum Jan 27, 2026
75d248f
Correcting directory name
sofia-tekdatum Jan 27, 2026
57afcc8
Another attempt
sofia-tekdatum Jan 27, 2026
f36cf77
Removing absolute paths
sofia-tekdatum Jan 27, 2026
9d5eb7f
Removing absolute paths
sofia-tekdatum Jan 27, 2026
6b9f9ad
Removing absolute paths
sofia-tekdatum Jan 27, 2026
dc625e9
Removing absolute paths
sofia-tekdatum Jan 27, 2026
55d4ef4
Add missing dependencies to tcb and magic enum
sofia-tekdatum Jan 27, 2026
6f17f91
Changing dep download
sofia-tekdatum Jan 27, 2026
3b1a0cf
Linter and test dependencies
sofia-tekdatum Jan 27, 2026
ce4420e
typo
sofia-tekdatum Jan 27, 2026
c30afd4
Benchmark lib failing
sofia-tekdatum Jan 27, 2026
a145ab1
Last attempt today
sofia-tekdatum Jan 27, 2026
ea32cae
Last attempt today
sofia-tekdatum Jan 27, 2026
96e08cb
Linker errors
sofia-tekdatum Jan 27, 2026
432487f
Linker errors
sofia-tekdatum Jan 27, 2026
9f47a54
Linker errors
sofia-tekdatum Jan 27, 2026
ace5a89
Linker errors
sofia-tekdatum Jan 27, 2026
12ea2a4
Linker errors
sofia-tekdatum Jan 27, 2026
36dc7d4
Trying to fix cycle
sofia-tekdatum Jan 27, 2026
8f3ea2d
Patching DBPS build file
sofia-tekdatum Jan 27, 2026
6e90b0a
Patching DBPS build file
sofia-tekdatum Jan 27, 2026
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: 6 additions & 0 deletions cpp/meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ option(
description: 'Arbitrary string that identifies the kind of package (for informational purposes)',
)
option('parquet', type: 'feature', description: 'Build the Parquet libraries')
option(
'parquet_build_dbps_libs',
type: 'feature',
value: 'enabled',
description: 'Build DBPS external libraries',
)
option(
'parquet_build_executables',
type: 'feature',
Expand Down
82 changes: 78 additions & 4 deletions cpp/src/parquet/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,15 @@ if openssl_dep.found()
parquet_deps += openssl_dep

parquet_srcs += files(
'encryption/aes_encryption.cc',
'encryption/crypto_factory.cc',
'encryption/encryption_internal.cc',
'encryption/encoding_properties.cc',
'encryption/encryption_utils.cc',
'encryption/external/dbpa_enum_utils.cc',
'encryption/external/dbpa_executor.cc',
'encryption/external/dbpa_library_wrapper.cc',
'encryption/external/loadable_encryptor_utils.cc',
'encryption/external_dbpa_encryption.cc',
'encryption/file_key_unwrapper.cc',
'encryption/file_key_wrapper.cc',
'encryption/file_system_key_material_store.cc',
Expand All @@ -113,7 +120,65 @@ if openssl_dep.found()
'encryption/openssl_internal.cc',
)
else
parquet_srcs += files('encryption/encryption_internal_nossl.cc')
parquet_srcs += files('encryption/aes_encryption_nossl.cc')
endif

if needs_parquet_encryption or get_option('parquet_require_encryption').auto()
tcb_span_dep = dependency('tcb_span', fallback: ['tcb-span', 'tcb_span_dep'])
magic_enum_dep = dependency(
'magic_enum_header_only',
fallback: ['magic-enum', 'magic_enum_dep'],
)

cmake = import('cmake')
dbps_opts = cmake.subproject_options()

build_type = get_option('buildtype')
if build_type == 'plain'
build_type = 'Release'
elif build_type == 'debug'
build_type = 'Debug'
endif

build_output_dir = meson.current_build_dir()

dbps_opts.add_cmake_defines(
{
'CMAKE_BUILD_TYPE': build_type,
'BUILD_SHARED_LIBS': 'ON',
'BUILD_TESTS': 'OFF',
'BUILD_BENCHMARKS': 'OFF',
'GTEST_BUILD_TESTS': 'OFF',
'GTEST_BUILD_SAMPLES': 'OFF',
'BENCHMARK_ENABLE_TESTING': 'OFF',
'BENCHMARK_ENABLE_INSTALL': 'OFF',
# 'CMAKE_LIBRARY_OUTPUT_DIRECTORY': build_output_dir,
#'CMAKE_RUNTIME_OUTPUT_DIRECTORY': build_output_dir,
#'CMAKE_ARCHIVE_OUTPUT_DIRECTORY': build_output_dir,
#'CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG': build_output_dir,
#'CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE': build_output_dir,
#'CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG': build_output_dir,
#'CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE': build_output_dir,
#'CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG': build_output_dir,
#'CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE': build_output_dir,
#'CMAKE_BUILD_WITH_INSTALL_RPATH': 'ON',
#'CMAKE_INSTALL_RPATH': build_output_dir,
#'CMAKE_INSTALL_RPATH_USE_LINK_PATH': 'ON',
#'CMAKE_BUILD_RPATH_USE_ORIGIN': 'ON',
'CMAKE_BUILD_WITH_INSTALL_RPATH': 'ON',
'CMAKE_INSTALL_RPATH_USE_LINK_PATH': 'ON',
'CMAKE_BUILD_RPATH_USE_ORIGIN': 'ON',
},
)

dbps_proj = cmake.subproject('dbps_agent', options: dbps_opts)
dbps_interface_dep = declare_dependency(
include_directories: include_directories(
'../../subprojects/DataBatchProtectionService-6206fb0e27556a0df9160364caa3819e4af3fe0f/src/common',
),
)

parquet_deps += [dbps_interface_dep, tcb_span_dep, magic_enum_dep]
endif

parquet_lib = library(
Expand All @@ -123,7 +188,10 @@ parquet_lib = library(
gnu_symbol_visibility: 'inlineshidden',
)

parquet_dep = declare_dependency(link_with: parquet_lib)
parquet_dep = declare_dependency(
link_with: parquet_lib,
dependencies: parquet_deps,
)

subdir('api')
subdir('arrow')
Expand Down Expand Up @@ -216,6 +284,7 @@ parquet_tests = {
'writer-test': {
'sources': files(
'column_writer_test.cc',
'encryption/external/test_utils.cc',
'file_serialize_test.cc',
'stream_writer_test.cc',
),
Expand Down Expand Up @@ -248,7 +317,12 @@ if needs_parquet_encryption
parquet_tests += {
'encryption-test': {
'sources': files(
'encryption/encryption_internal_test.cc',
'encryption/aes_encryption_test.cc',
'encryption/crypto_factory_test.cc',
'encryption/encoding_properties_test.cc',
'encryption/external/test_utils.cc',
'encryption/external_dbpa_encryption_test.cc',
'encryption/per_column_encryption_test.cc',
'encryption/properties_test.cc',
'encryption/read_configurations_test.cc',
'encryption/test_encryption_util.cc',
Expand Down
23 changes: 23 additions & 0 deletions cpp/subprojects/dbps_agent.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[wrap-file]
directory = DataBatchProtectionService-6206fb0e27556a0df9160364caa3819e4af3fe0f
source_url = https://github.com/protegrity/DataBatchProtectionService/archive/6206fb0e27556a0df9160364caa3819e4af3fe0f.tar.gz
source_filename = dbps_agent-6206fb0e27556a0df9160364caa3819e4af3fe0f.tar.gz
source_hash = 9c95a1fec0c9851867a776c3241d3feb59b07bd7a50e653d6214e07a8ad62419
patch_directory = dbps_agent
26 changes: 26 additions & 0 deletions cpp/subprojects/magic-enum.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[wrap-file]
directory = magic_enum-0.9.7
source_url = https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.7.tar.gz
source_filename = magic_enum-0.9.7.tar.gz
source_hash = b403d3dad4ef542fdc3024fa37d3a6cedb4ad33c72e31b6d9bab89dcaf69edf7
patch_directory = magic-enum

[provide]
magic_enum_header_only = magic_enum_dep
45 changes: 45 additions & 0 deletions cpp/subprojects/packagefiles/dbps_agent/CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,8 +10,10 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Build options
option(BUILD_TESTS "Build test executables" ON)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# Enable CTest and GoogleTest integration
-enable_testing()
-include(CTest)
+if(BUILD_TESTS)
+ enable_testing()
+ include(CTest)
+endif()

# =============================================================================
# Dependencies
@@ -520,15 +520,19 @@ endif()

# All target (everything)
add_custom_target(all_targets
DEPENDS
libraries
executables
COMMENT "Building all targets"
)

# Add tests to all_targets if enabled
if(BUILD_TESTS)
- add_dependencies(all_targets tests)
+ # Only add test dependencies when tests target actually exists
+ # This prevents Meson from detecting cycles when BUILD_TESTS is OFF
+ if(TARGET tests)
+ add_dependencies(all_targets tests)
+ endif()
endif()

# Add client shared library to all_targets if enabled
if(BUILD_SHARED_LIBS)
- add_dependencies(all_targets shared_libraries)
+ # Only add shared library dependencies when shared_libraries target exists
+ if(TARGET shared_libraries)
+ add_dependencies(all_targets shared_libraries)
+ endif()
endif()
24 changes: 24 additions & 0 deletions cpp/subprojects/packagefiles/dbps_agent/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

project('dbps_agent', 'cpp')

dbps_interface_dep = declare_dependency(
include_directories: include_directories('src/common'),
)

meson.override_dependency('dbps_interface', dbps_interface_dep)
24 changes: 24 additions & 0 deletions cpp/subprojects/packagefiles/magic-enum/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

project('magic-enum', 'cpp')

magic_enum_dep = declare_dependency(
include_directories: include_directories('include'),
)

meson.override_dependency('magic_enum_header_only', magic_enum_dep)
24 changes: 24 additions & 0 deletions cpp/subprojects/packagefiles/tcb-span/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

project('tcb-span', 'cpp')

tcb_span_dep = declare_dependency(
include_directories: include_directories('include'),
)

meson.override_dependency('tcb_span', tcb_span_dep)
26 changes: 26 additions & 0 deletions cpp/subprojects/tcb-span.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[wrap-file]
directory = span-master
source_url = https://github.com/tcbrindle/span/archive/refs/heads/master.tar.gz
source_filename = span-master.tar.gz
source_hash = e57658bd9c5984cebd8bd0758f242cbf4fa7ed1bd5251a883f68420c3b17f818
patch_directory = tcb-span

[provide]
tcb_span = tcb_span_dep
Loading