mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 01:25:20 +00:00
CMake: Add an option to disable building libdpkg tables and library (#6848)
This commit is contained in:
parent
6eb9392cb1
commit
2c0791276e
@ -117,7 +117,6 @@ function(importLibraries)
|
||||
"Linux:libaudit"
|
||||
"Linux:libcryptsetup"
|
||||
"Linux:libdevmapper"
|
||||
"Linux:libdpkg"
|
||||
"Linux:libelfin"
|
||||
"Linux:libgcrypt"
|
||||
"Linux:libgpg-error"
|
||||
@ -161,6 +160,12 @@ function(importLibraries)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(OSQUERY_BUILD_DPKG)
|
||||
list(APPEND library_descriptor_list
|
||||
"Linux:libdpkg"
|
||||
)
|
||||
endif()
|
||||
|
||||
foreach(library_descriptor ${library_descriptor_list})
|
||||
# Expand the library descriptor
|
||||
string(REPLACE ":" ";" library_descriptor "${library_descriptor}")
|
||||
|
@ -87,6 +87,7 @@ set(OSQUERY_CLANG_TIDY_CHECKS "-checks=cert-*,cppcoreguidelines-*,performance-*,
|
||||
|
||||
option(OSQUERY_BUILD_BPF "Whether to enable and build BPF support" ON)
|
||||
option(OSQUERY_BUILD_AWS "Whether to build the aws tables and library, to decrease memory usage and increase speed during build." ON)
|
||||
option(OSQUERY_BUILD_DPKG "Whether to build the dpkg tables" ON)
|
||||
|
||||
# This is a temporary option to ignore the version check if there's no intention to generate RPM packages
|
||||
option(OSQUERY_IGNORE_CMAKE_MAX_VERSION_CHECK "Ignore the maximum cmake version check introduced due to CPack generating incorrect RPM packages")
|
||||
|
@ -58,7 +58,6 @@ function(generateOsqueryTablesSystemSystemtable)
|
||||
linux/dbus/uniquedbusmessage.cpp
|
||||
linux/acpi_tables.cpp
|
||||
linux/block_devices.cpp
|
||||
linux/deb_packages.cpp
|
||||
linux/disk_encryption.cpp
|
||||
linux/elf_info.cpp
|
||||
linux/extended_attributes.cpp
|
||||
@ -93,6 +92,12 @@ function(generateOsqueryTablesSystemSystemtable)
|
||||
linux/systemd_units.cpp
|
||||
)
|
||||
|
||||
if(OSQUERY_BUILD_DPKG)
|
||||
list(APPEND source_files
|
||||
linux/deb_packages.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
elseif(DEFINED PLATFORM_MACOS)
|
||||
list(APPEND source_files
|
||||
darwin/account_policy_data.mm
|
||||
@ -266,7 +271,6 @@ function(generateOsqueryTablesSystemSystemtable)
|
||||
if(DEFINED PLATFORM_LINUX)
|
||||
target_link_libraries(osquery_tables_system_systemtable PUBLIC
|
||||
thirdparty_libdevmapper
|
||||
thirdparty_libdpkg
|
||||
thirdparty_libelfin
|
||||
thirdparty_libcryptsetup
|
||||
thirdparty_librpm
|
||||
@ -275,6 +279,12 @@ function(generateOsqueryTablesSystemSystemtable)
|
||||
thirdparty_libcap
|
||||
)
|
||||
|
||||
if(OSQUERY_BUILD_DPKG)
|
||||
target_link_libraries(osquery_tables_system_systemtable PUBLIC
|
||||
thirdparty_libdpkg
|
||||
)
|
||||
endif()
|
||||
|
||||
elseif(DEFINED PLATFORM_MACOS)
|
||||
target_link_libraries(osquery_tables_system_systemtable PUBLIC
|
||||
thirdparty_openssl
|
||||
|
@ -169,7 +169,6 @@ function(generateNativeTables)
|
||||
"linux/memory_info.table:linux"
|
||||
"linux/msr.table:linux"
|
||||
"linux/memory_map.table:linux"
|
||||
"linux/deb_packages.table:linux"
|
||||
"linux/elf_dynamic.table:linux"
|
||||
"linux/elf_sections.table:linux"
|
||||
"linux/selinux_settings.table:linux"
|
||||
@ -316,6 +315,12 @@ function(generateNativeTables)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(OSQUERY_BUILD_DPKG)
|
||||
list(APPEND platform_dependent_spec_files
|
||||
"linux/deb_packages.table:linux"
|
||||
)
|
||||
endif()
|
||||
|
||||
foreach(spec_descriptor ${platform_dependent_spec_files})
|
||||
string(REPLACE ":" ";" spec_descriptor "${spec_descriptor}")
|
||||
list(GET spec_descriptor 0 spec_file)
|
||||
|
@ -151,7 +151,6 @@ function(generateTestsIntegrationTablesTestsTest)
|
||||
set(platform_source_files
|
||||
arp_cache.cpp
|
||||
atom_packages.cpp
|
||||
deb_packages.cpp
|
||||
elf_dynamic.cpp
|
||||
elf_info.cpp
|
||||
elf_sections.cpp
|
||||
@ -188,6 +187,12 @@ function(generateTestsIntegrationTablesTestsTest)
|
||||
yara.cpp
|
||||
)
|
||||
|
||||
if(OSQUERY_BUILD_DPKG)
|
||||
list(APPEND platform_source_files
|
||||
deb_packages.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND source_files ${platform_source_files})
|
||||
elseif(DEFINED PLATFORM_MACOS)
|
||||
set(platform_source_files
|
||||
|
Loading…
Reference in New Issue
Block a user