From 52f310a5a8a29e689303630dd2a25738ffe0496b Mon Sep 17 00:00:00 2001 From: Stefano Bonicatti Date: Thu, 9 Apr 2020 01:56:21 +0200 Subject: [PATCH] First steps to remove the Buck build system (#6361) * First steps to remove the Buck build system * Azure Pipelines: Rename jobs for consistency --- .github/PULL_REQUEST_TEMPLATE.md | 1 - .gitignore | 7 - azure-pipelines.yml | 169 +--- docs/wiki/development/building.md | 112 +-- libraries/buck/todo | 0 mode/freebsd-x86_64/debug | 8 - mode/freebsd-x86_64/release | 8 - mode/linux-x86_64/debug | 8 - mode/linux-x86_64/release | 8 - mode/macos-x86_64/debug | 6 - mode/macos-x86_64/release | 6 - mode/system.py | 132 --- mode/windows-x86_64/debug | 8 - mode/windows-x86_64/release | 8 - osquery/BUCK | 48 - osquery/carver/BUCK | 46 - osquery/carver/tests/BUCK | 31 - osquery/config/BUCK | 33 - osquery/config/tests/BUCK | 81 -- osquery/core/BUCK | 97 -- osquery/core/plugins/BUCK | 21 - osquery/core/sql/BUCK | 22 - osquery/core/tests/BUCK | 160 ---- osquery/database/BUCK | 32 - osquery/database/tests/BUCK | 54 -- osquery/devtools/BUCK | 41 - osquery/devtools/tests/BUCK | 29 - osquery/dispatcher/BUCK | 39 - osquery/dispatcher/tests/BUCK | 50 - osquery/distributed/BUCK | 25 - osquery/distributed/tests/BUCK | 45 - osquery/ev2/BUCK | 50 - osquery/events/BUCK | 144 --- osquery/events/tests/BUCK | 218 ----- osquery/experimental/events_stream/BUCK | 45 - osquery/experimental/tracing/BUCK | 48 - osquery/experimental/tracing/linux/BUCK | 52 -- osquery/experimental/tracing/linux/tests/BUCK | 30 - osquery/extensions/BUCK | 71 -- osquery/extensions/tests/BUCK | 20 - osquery/extensions/thrift/BUCK | 38 - osquery/filesystem/BUCK | 140 --- osquery/hashing/BUCK | 27 - osquery/logger/BUCK | 43 - osquery/logger/tests/BUCK | 31 - osquery/main/BUCK | 101 -- osquery/numeric_monitoring/BUCK | 33 - osquery/numeric_monitoring/tests/BUCK | 51 - osquery/process/BUCK | 49 - osquery/profiler/BUCK | 30 - osquery/registry/BUCK | 29 - osquery/registry/tests/BUCK | 28 - osquery/remote/BUCK | 80 -- osquery/remote/enroll/BUCK | 66 -- osquery/remote/serializers/BUCK | 34 - osquery/remote/tests/BUCK | 55 -- osquery/remote/transports/BUCK | 64 -- osquery/sdk/BUCK | 51 - osquery/sdk/tests/BUCK | 20 - osquery/sql/BUCK | 83 -- osquery/sql/tests/BUCK | 109 --- osquery/system/network/BUCK | 28 - osquery/system/network/tests/BUCK | 35 - osquery/tables/BUCK | 52 -- osquery/tables/applications/BUCK | 75 -- osquery/tables/applications/posix/tests/BUCK | 36 - osquery/tables/cloud/BUCK | 27 - osquery/tables/events/BUCK | 98 -- osquery/tables/events/tests/BUCK | 69 -- osquery/tables/forensic/BUCK | 28 - osquery/tables/lldpd/BUCK | 31 - osquery/tables/networking/BUCK | 125 --- osquery/tables/networking/tests/BUCK | 103 --- osquery/tables/sleuthkit/BUCK | 33 - osquery/tables/smart/BUCK | 53 -- osquery/tables/smart/tests/BUCK | 41 - osquery/tables/system/BUCK | 337 ------- osquery/tables/system/tests/BUCK | 162 ---- osquery/tables/utility/BUCK | 29 - osquery/tables/yara/BUCK | 60 -- osquery/tables/yara/tests/BUCK | 48 - osquery/utils/BUCK | 100 -- osquery/utils/aws/BUCK | 31 - osquery/utils/aws/tests/BUCK | 35 - osquery/utils/azure/BUCK | 29 - osquery/utils/caches/BUCK | 21 - osquery/utils/caches/tests/BUCK | 19 - osquery/utils/config/BUCK | 19 - osquery/utils/conversions/BUCK | 121 --- osquery/utils/debug/BUCK | 32 - osquery/utils/error/BUCK | 33 - osquery/utils/expected/BUCK | 35 - osquery/utils/info/BUCK | 33 - osquery/utils/json/BUCK | 43 - osquery/utils/macros/BUCK | 16 - osquery/utils/schemer/BUCK | 20 - osquery/utils/schemer/json/BUCK | 29 - osquery/utils/schemer/json/tests/BUCK | 19 - osquery/utils/schemer/tests/BUCK | 20 - osquery/utils/status/BUCK | 36 - osquery/utils/system/BUCK | 254 ----- osquery/utils/system/linux/ebpf/BUCK | 52 -- osquery/utils/system/linux/ebpf/tests/BUCK | 31 - osquery/utils/system/linux/perf_event/BUCK | 39 - osquery/utils/system/linux/proc/BUCK | 38 - osquery/utils/system/linux/proc/tests/BUCK | 28 - osquery/utils/system/linux/tracing/BUCK | 43 - osquery/utils/system/linux/tracing/tests/BUCK | 28 - osquery/utils/versioning/BUCK | 28 - osquery/utils/versioning/tests/BUCK | 19 - plugins/config/BUCK | 57 -- plugins/config/parsers/BUCK | 54 -- plugins/config/parsers/tests/BUCK | 161 ---- plugins/config/tests/BUCK | 40 - plugins/database/BUCK | 93 -- plugins/database/tests/BUCK | 73 -- plugins/distributed/BUCK | 24 - plugins/logger/BUCK | 329 ------- plugins/logger/tests/BUCK | 198 ---- plugins/numeric_monitoring/BUCK | 28 - plugins/numeric_monitoring/tests/BUCK | 27 - plugins/remote/enroll/BUCK | 27 - plugins/remote/enroll/tests/BUCK | 36 - specs/BUCK | 875 ------------------ tests/BUCK | 35 - tests/integration/tables/BUCK | 320 ------- third-party/augeas/BUCK | 44 - third-party/augeas/osquery.library | 11 - third-party/aws-sdk-cpp/BUCK | 61 -- third-party/aws-sdk-cpp/osquery.library | 12 - third-party/berkeley-db/BUCK | 46 - third-party/berkeley-db/osquery.library | 13 - third-party/boost/BUCK | 65 -- third-party/boost/osquery.library | 12 - third-party/bzip2/BUCK | 42 - third-party/bzip2/osquery.library | 11 - third-party/gflags/BUCK | 49 - third-party/gflags/osquery.library | 12 - third-party/glibc/BUCK | 50 - third-party/glog/BUCK | 47 - third-party/glog/osquery.library | 13 - third-party/googletest/BUCK | 152 --- third-party/jinja2/BUCK | 25 - third-party/libarchive/BUCK | 47 - third-party/libarchive/osquery.library | 12 - third-party/libaudit/BUCK | 37 - third-party/libaudit/osquery.library | 10 - third-party/libcryptsetup/BUCK | 37 - third-party/libcryptsetup/osquery.library | 11 - third-party/libdevmapper/BUCK | 40 - third-party/libdevmapper/osquery.library | 10 - third-party/libdpkg/BUCK | 37 - third-party/libdpkg/osquery.library | 10 - third-party/libelfin/BUCK | 54 -- third-party/libelfin/osquery.library | 14 - third-party/libgcrypt/BUCK | 37 - third-party/libgcrypt/osquery.library | 11 - third-party/libgpg-error/BUCK | 37 - third-party/libgpg-error/osquery.library | 10 - third-party/libiptables/BUCK | 39 - third-party/libiptables/osquery.library | 10 - third-party/libmagic/BUCK | 42 - third-party/libmagic/osquery.library | 12 - third-party/librdkafka/BUCK | 44 - third-party/librdkafka/osquery.library | 11 - third-party/librpm/BUCK | 46 - third-party/librpm/osquery.library | 17 - third-party/libudev/BUCK | 37 - third-party/libudev/osquery.library | 10 - third-party/libxml2/BUCK | 42 - third-party/libxml2/osquery.library | 11 - third-party/linenoise-ng/BUCK | 47 - third-party/linenoise-ng/osquery.library | 12 - third-party/lldpd/BUCK | 42 - third-party/lldpd/osquery.library | 11 - third-party/lzma/BUCK | 23 - third-party/markupsafe/BUCK | 31 - third-party/openssl/BUCK | 66 -- third-party/openssl/osquery.library | 16 - third-party/popt/BUCK | 42 - third-party/popt/osquery.library | 11 - third-party/rapidjson/BUCK | 47 - third-party/rapidjson/osquery.library | 12 - third-party/rocksdb/BUCK | 50 - third-party/rocksdb/osquery.library | 13 - third-party/sleuthkit/BUCK | 42 - third-party/sleuthkit/osquery.library | 11 - third-party/smartmontools/BUCK | 50 - third-party/smartmontools/osquery.library | 14 - third-party/sqlite/BUCK | 98 -- third-party/ssdeep-cpp/BUCK | 42 - third-party/ssdeep-cpp/osquery.library | 11 - third-party/thrift/BUCK | 51 - third-party/thrift/osquery.library | 13 - third-party/util-linux/BUCK | 41 - third-party/util-linux/osquery.library | 10 - third-party/yara/BUCK | 42 - third-party/yara/osquery.library | 12 - third-party/zlib/BUCK | 47 - third-party/zlib/osquery.library | 12 - third-party/zstd/BUCK | 47 - third-party/zstd/osquery.library | 12 - tools/buckconfigs/base.bcfg | 34 - tools/buckconfigs/freebsd-x86_64/base.bcfg | 83 -- .../toolchain/freebsd-11.2-clang.bcfg | 25 - .../freebsd-x86_64/type/debug.bcfg | 17 - .../freebsd-x86_64/type/release.bcfg | 17 - tools/buckconfigs/linux-x86_64/base.bcfg | 89 -- .../toolchain/ubuntu-18.04-clang.bcfg | 19 - .../buckconfigs/linux-x86_64/type/debug.bcfg | 17 - .../linux-x86_64/type/release.bcfg | 17 - tools/buckconfigs/macos-x86_64/base.bcfg | 110 --- .../buckconfigs/macos-x86_64/type/debug.bcfg | 17 - .../macos-x86_64/type/release.bcfg | 17 - tools/buckconfigs/windows-x86_64/base.bcfg | 62 -- .../windows-x86_64/type/debug.bcfg | 25 - .../windows-x86_64/type/release.bcfg | 17 - tools/build_defs/oss/osquery/codegen.bzl | 200 ---- tools/build_defs/oss/osquery/cxx.bzl | 165 ---- tools/build_defs/oss/osquery/defaults.bzl | 15 - tools/build_defs/oss/osquery/globs.bzl | 101 -- tools/build_defs/oss/osquery/native.bzl | 48 - .../oss/osquery/native_functions.bzl | 21 - tools/build_defs/oss/osquery/platforms.bzl | 14 - tools/build_defs/oss/osquery/python.bzl | 15 - tools/build_defs/oss/osquery/third_party.bzl | 366 -------- .../oss/osquery/third_party_archive.bzl | 123 --- tools/codegen/BUCK | 98 -- tools/codegen/genapi.py | 2 +- tools/deployment/make_windows_package.ps1 | 7 +- tools/generate_buck_config.ps1 | 290 ------ tools/tests/BUCK | 25 - tools/tests/configs/BUCK | 48 - 233 files changed, 23 insertions(+), 12732 deletions(-) delete mode 100644 libraries/buck/todo delete mode 100644 mode/freebsd-x86_64/debug delete mode 100644 mode/freebsd-x86_64/release delete mode 100644 mode/linux-x86_64/debug delete mode 100644 mode/linux-x86_64/release delete mode 100644 mode/macos-x86_64/debug delete mode 100644 mode/macos-x86_64/release delete mode 100755 mode/system.py delete mode 100644 mode/windows-x86_64/debug delete mode 100644 mode/windows-x86_64/release delete mode 100644 osquery/BUCK delete mode 100644 osquery/carver/BUCK delete mode 100644 osquery/carver/tests/BUCK delete mode 100644 osquery/config/BUCK delete mode 100644 osquery/config/tests/BUCK delete mode 100644 osquery/core/BUCK delete mode 100644 osquery/core/plugins/BUCK delete mode 100644 osquery/core/sql/BUCK delete mode 100644 osquery/core/tests/BUCK delete mode 100644 osquery/database/BUCK delete mode 100644 osquery/database/tests/BUCK delete mode 100644 osquery/devtools/BUCK delete mode 100644 osquery/devtools/tests/BUCK delete mode 100644 osquery/dispatcher/BUCK delete mode 100644 osquery/dispatcher/tests/BUCK delete mode 100644 osquery/distributed/BUCK delete mode 100644 osquery/distributed/tests/BUCK delete mode 100644 osquery/ev2/BUCK delete mode 100644 osquery/events/BUCK delete mode 100644 osquery/events/tests/BUCK delete mode 100644 osquery/experimental/events_stream/BUCK delete mode 100644 osquery/experimental/tracing/BUCK delete mode 100644 osquery/experimental/tracing/linux/BUCK delete mode 100644 osquery/experimental/tracing/linux/tests/BUCK delete mode 100644 osquery/extensions/BUCK delete mode 100644 osquery/extensions/tests/BUCK delete mode 100644 osquery/extensions/thrift/BUCK delete mode 100644 osquery/filesystem/BUCK delete mode 100644 osquery/hashing/BUCK delete mode 100644 osquery/logger/BUCK delete mode 100644 osquery/logger/tests/BUCK delete mode 100644 osquery/main/BUCK delete mode 100644 osquery/numeric_monitoring/BUCK delete mode 100644 osquery/numeric_monitoring/tests/BUCK delete mode 100644 osquery/process/BUCK delete mode 100644 osquery/profiler/BUCK delete mode 100644 osquery/registry/BUCK delete mode 100644 osquery/registry/tests/BUCK delete mode 100644 osquery/remote/BUCK delete mode 100644 osquery/remote/enroll/BUCK delete mode 100644 osquery/remote/serializers/BUCK delete mode 100644 osquery/remote/tests/BUCK delete mode 100644 osquery/remote/transports/BUCK delete mode 100644 osquery/sdk/BUCK delete mode 100644 osquery/sdk/tests/BUCK delete mode 100644 osquery/sql/BUCK delete mode 100644 osquery/sql/tests/BUCK delete mode 100644 osquery/system/network/BUCK delete mode 100644 osquery/system/network/tests/BUCK delete mode 100644 osquery/tables/BUCK delete mode 100644 osquery/tables/applications/BUCK delete mode 100644 osquery/tables/applications/posix/tests/BUCK delete mode 100644 osquery/tables/cloud/BUCK delete mode 100644 osquery/tables/events/BUCK delete mode 100644 osquery/tables/events/tests/BUCK delete mode 100644 osquery/tables/forensic/BUCK delete mode 100644 osquery/tables/lldpd/BUCK delete mode 100644 osquery/tables/networking/BUCK delete mode 100644 osquery/tables/networking/tests/BUCK delete mode 100644 osquery/tables/sleuthkit/BUCK delete mode 100644 osquery/tables/smart/BUCK delete mode 100644 osquery/tables/smart/tests/BUCK delete mode 100644 osquery/tables/system/BUCK delete mode 100644 osquery/tables/system/tests/BUCK delete mode 100644 osquery/tables/utility/BUCK delete mode 100644 osquery/tables/yara/BUCK delete mode 100644 osquery/tables/yara/tests/BUCK delete mode 100644 osquery/utils/BUCK delete mode 100644 osquery/utils/aws/BUCK delete mode 100644 osquery/utils/aws/tests/BUCK delete mode 100644 osquery/utils/azure/BUCK delete mode 100644 osquery/utils/caches/BUCK delete mode 100644 osquery/utils/caches/tests/BUCK delete mode 100644 osquery/utils/config/BUCK delete mode 100644 osquery/utils/conversions/BUCK delete mode 100644 osquery/utils/debug/BUCK delete mode 100644 osquery/utils/error/BUCK delete mode 100644 osquery/utils/expected/BUCK delete mode 100644 osquery/utils/info/BUCK delete mode 100644 osquery/utils/json/BUCK delete mode 100644 osquery/utils/macros/BUCK delete mode 100644 osquery/utils/schemer/BUCK delete mode 100644 osquery/utils/schemer/json/BUCK delete mode 100644 osquery/utils/schemer/json/tests/BUCK delete mode 100644 osquery/utils/schemer/tests/BUCK delete mode 100644 osquery/utils/status/BUCK delete mode 100644 osquery/utils/system/BUCK delete mode 100644 osquery/utils/system/linux/ebpf/BUCK delete mode 100644 osquery/utils/system/linux/ebpf/tests/BUCK delete mode 100644 osquery/utils/system/linux/perf_event/BUCK delete mode 100644 osquery/utils/system/linux/proc/BUCK delete mode 100644 osquery/utils/system/linux/proc/tests/BUCK delete mode 100644 osquery/utils/system/linux/tracing/BUCK delete mode 100644 osquery/utils/system/linux/tracing/tests/BUCK delete mode 100644 osquery/utils/versioning/BUCK delete mode 100644 osquery/utils/versioning/tests/BUCK delete mode 100644 plugins/config/BUCK delete mode 100644 plugins/config/parsers/BUCK delete mode 100644 plugins/config/parsers/tests/BUCK delete mode 100644 plugins/config/tests/BUCK delete mode 100644 plugins/database/BUCK delete mode 100644 plugins/database/tests/BUCK delete mode 100644 plugins/distributed/BUCK delete mode 100644 plugins/logger/BUCK delete mode 100644 plugins/logger/tests/BUCK delete mode 100644 plugins/numeric_monitoring/BUCK delete mode 100644 plugins/numeric_monitoring/tests/BUCK delete mode 100644 plugins/remote/enroll/BUCK delete mode 100644 plugins/remote/enroll/tests/BUCK delete mode 100644 specs/BUCK delete mode 100644 tests/BUCK delete mode 100644 tests/integration/tables/BUCK delete mode 100644 third-party/augeas/BUCK delete mode 100644 third-party/augeas/osquery.library delete mode 100644 third-party/aws-sdk-cpp/BUCK delete mode 100644 third-party/aws-sdk-cpp/osquery.library delete mode 100644 third-party/berkeley-db/BUCK delete mode 100644 third-party/berkeley-db/osquery.library delete mode 100644 third-party/boost/BUCK delete mode 100644 third-party/boost/osquery.library delete mode 100644 third-party/bzip2/BUCK delete mode 100644 third-party/bzip2/osquery.library delete mode 100644 third-party/gflags/BUCK delete mode 100644 third-party/gflags/osquery.library delete mode 100644 third-party/glibc/BUCK delete mode 100644 third-party/glog/BUCK delete mode 100644 third-party/glog/osquery.library delete mode 100644 third-party/googletest/BUCK delete mode 100644 third-party/jinja2/BUCK delete mode 100644 third-party/libarchive/BUCK delete mode 100644 third-party/libarchive/osquery.library delete mode 100644 third-party/libaudit/BUCK delete mode 100644 third-party/libaudit/osquery.library delete mode 100644 third-party/libcryptsetup/BUCK delete mode 100644 third-party/libcryptsetup/osquery.library delete mode 100644 third-party/libdevmapper/BUCK delete mode 100644 third-party/libdevmapper/osquery.library delete mode 100644 third-party/libdpkg/BUCK delete mode 100644 third-party/libdpkg/osquery.library delete mode 100644 third-party/libelfin/BUCK delete mode 100644 third-party/libelfin/osquery.library delete mode 100644 third-party/libgcrypt/BUCK delete mode 100644 third-party/libgcrypt/osquery.library delete mode 100644 third-party/libgpg-error/BUCK delete mode 100644 third-party/libgpg-error/osquery.library delete mode 100644 third-party/libiptables/BUCK delete mode 100644 third-party/libiptables/osquery.library delete mode 100644 third-party/libmagic/BUCK delete mode 100644 third-party/libmagic/osquery.library delete mode 100644 third-party/librdkafka/BUCK delete mode 100644 third-party/librdkafka/osquery.library delete mode 100644 third-party/librpm/BUCK delete mode 100644 third-party/librpm/osquery.library delete mode 100644 third-party/libudev/BUCK delete mode 100644 third-party/libudev/osquery.library delete mode 100644 third-party/libxml2/BUCK delete mode 100644 third-party/libxml2/osquery.library delete mode 100644 third-party/linenoise-ng/BUCK delete mode 100644 third-party/linenoise-ng/osquery.library delete mode 100644 third-party/lldpd/BUCK delete mode 100644 third-party/lldpd/osquery.library delete mode 100644 third-party/lzma/BUCK delete mode 100644 third-party/markupsafe/BUCK delete mode 100644 third-party/openssl/BUCK delete mode 100644 third-party/openssl/osquery.library delete mode 100644 third-party/popt/BUCK delete mode 100644 third-party/popt/osquery.library delete mode 100644 third-party/rapidjson/BUCK delete mode 100644 third-party/rapidjson/osquery.library delete mode 100644 third-party/rocksdb/BUCK delete mode 100644 third-party/rocksdb/osquery.library delete mode 100644 third-party/sleuthkit/BUCK delete mode 100644 third-party/sleuthkit/osquery.library delete mode 100644 third-party/smartmontools/BUCK delete mode 100644 third-party/smartmontools/osquery.library delete mode 100644 third-party/sqlite/BUCK delete mode 100644 third-party/ssdeep-cpp/BUCK delete mode 100644 third-party/ssdeep-cpp/osquery.library delete mode 100644 third-party/thrift/BUCK delete mode 100644 third-party/thrift/osquery.library delete mode 100644 third-party/util-linux/BUCK delete mode 100644 third-party/util-linux/osquery.library delete mode 100644 third-party/yara/BUCK delete mode 100644 third-party/yara/osquery.library delete mode 100644 third-party/zlib/BUCK delete mode 100644 third-party/zlib/osquery.library delete mode 100644 third-party/zstd/BUCK delete mode 100644 third-party/zstd/osquery.library delete mode 100644 tools/buckconfigs/base.bcfg delete mode 100644 tools/buckconfigs/freebsd-x86_64/base.bcfg delete mode 100644 tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg delete mode 100644 tools/buckconfigs/freebsd-x86_64/type/debug.bcfg delete mode 100644 tools/buckconfigs/freebsd-x86_64/type/release.bcfg delete mode 100644 tools/buckconfigs/linux-x86_64/base.bcfg delete mode 100644 tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg delete mode 100644 tools/buckconfigs/linux-x86_64/type/debug.bcfg delete mode 100644 tools/buckconfigs/linux-x86_64/type/release.bcfg delete mode 100644 tools/buckconfigs/macos-x86_64/base.bcfg delete mode 100644 tools/buckconfigs/macos-x86_64/type/debug.bcfg delete mode 100644 tools/buckconfigs/macos-x86_64/type/release.bcfg delete mode 100644 tools/buckconfigs/windows-x86_64/base.bcfg delete mode 100644 tools/buckconfigs/windows-x86_64/type/debug.bcfg delete mode 100644 tools/buckconfigs/windows-x86_64/type/release.bcfg delete mode 100644 tools/build_defs/oss/osquery/codegen.bzl delete mode 100644 tools/build_defs/oss/osquery/cxx.bzl delete mode 100644 tools/build_defs/oss/osquery/defaults.bzl delete mode 100644 tools/build_defs/oss/osquery/globs.bzl delete mode 100644 tools/build_defs/oss/osquery/native.bzl delete mode 100644 tools/build_defs/oss/osquery/native_functions.bzl delete mode 100644 tools/build_defs/oss/osquery/platforms.bzl delete mode 100644 tools/build_defs/oss/osquery/python.bzl delete mode 100644 tools/build_defs/oss/osquery/third_party.bzl delete mode 100644 tools/build_defs/oss/osquery/third_party_archive.bzl delete mode 100644 tools/codegen/BUCK delete mode 100644 tools/generate_buck_config.ps1 delete mode 100644 tools/tests/BUCK delete mode 100644 tools/tests/configs/BUCK diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 69c2a7c58eb..0c085187b08 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,6 @@ Here are some common things we look for: - The minimal amount of includes are used, only include what you use. - Comments for methods, structures, and classes follow our common patterns. - `Status` and `LOG(N)` messages do not use punctuation or contractions. -- Support for both CMake and BUCK (we are happy to help). - The code mostly looks and feels similar to the existing codebase. --> diff --git a/.gitignore b/.gitignore index 4657f0cff8d..454797cf73d 100644 --- a/.gitignore +++ b/.gitignore @@ -70,10 +70,3 @@ cscope.out /external/* !/external/cmake/cmakelibs.cmake !/external/CMakeLists.txt - -# Buck -.buckd/ -buck-out/ - -# Windows system specific toolchain paths -tools/buckconfigs/windows-x86_64/toolchain/vs2017_15.5.bcfg diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 94bf99fcef7..4a4781b033c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,7 +5,8 @@ jobs: # LINUX - - job: LinuxCMake + - job: LinuxBuild + displayName: "Linux" strategy: matrix: @@ -118,40 +119,6 @@ jobs: displayName: "Reclaim disk space" - - job: LinuxBuck - displayName: "LinuxBuck Release" - - pool: - vmImage: 'Ubuntu-16.04' - - container: - image: trailofbits/osql-experimental:ubuntu-18.04 - options: --privileged - - steps: - - script: | - wget https://github.com/facebook/buck/releases/download/v2019.06.17.01/buck.2019.06.17.01_all.deb - sudo apt update - sudo apt install -q -y --no-install-recommends ./buck.2019.06.17.01_all.deb openjdk-8-jre python3-distutils - workingDirectory: $(Build.BinariesDirectory) - - - script: | - export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" - buck build @mode/linux-x86_64/release osquery:osqueryd - displayName: "Build osquery" - - - script: | - # Buck compiles these tests in Debug mode, exhausting disk space. - # Until we find a solution, we'll disable the tests. - #export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" - #buck test @mode/linux-x86_64/release osquery/... tests/... plugins/... - displayName: "Run tests (DISABLED)" - - - script: | - echo "##vso[task.setvariable variable=Status;isOutput=true]1" - name: JobResult - - - job: Linux pool: @@ -160,21 +127,17 @@ jobs: condition: succeededOrFailed() dependsOn: - - LinuxCMake - - LinuxBuck + - LinuxBuild variables: - LinuxCMakeReleaseStatus: $[ dependencies.LinuxCMake.outputs['Release.JobResult.Status'] ] - LinuxCMakeDebugStatus: $[ dependencies.LinuxCMake.outputs['Debug.JobResult.Status'] ] - LinuxBuckReleaseStatus: $[ dependencies.LinuxBuck.outputs['JobResult.Status'] ] + LinuxReleaseStatus: $[ dependencies.LinuxBuild.outputs['Release.JobResult.Status'] ] + LinuxDebugStatus: $[ dependencies.LinuxBuild.outputs['Debug.JobResult.Status'] ] steps: - checkout: none - script: | - if [ -z "$(LinuxCMakeReleaseStatus)" ] || [ -z "$(LinuxCMakeDebugStatus)" ] || \ - [ -z "$(LinuxBuckReleaseStatus)" ] - then + if [ -z "$(LinuxReleaseStatus)" ] || [ -z "$(LinuxDebugStatus)" ]; then exit 1 fi displayName: "Detect Linux jobs build statuses" @@ -183,7 +146,8 @@ jobs: # MACOS - - job: macOSCMake + - job: macOSBuild + displayName: "macOS" strategy: matrix: @@ -267,38 +231,6 @@ jobs: displayName: "Reclaim disk space" - - job: macOSBuck - displayName: "macOSBuck Release" - - pool: - vmImage: macos-10.14 - - steps: - - script: | - brew update - brew tap facebook/fb - brew upgrade - brew cask install adoptopenjdk - brew install buck watchman - sudo xcode-select -s /Applications/Xcode_10.3.app/Contents/Developer - displayName: "Install Homebrew and prerequisites" - timeoutInMinutes: 20 - - - script: | - export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" - buck build @mode/macos-x86_64/release osquery:osqueryd - displayName: "Build osquery" - - - script: | - export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" - buck test @mode/macos-x86_64/release osquery/... tests/... plugins/... - displayName: "Run tests" - - - script: | - echo "##vso[task.setvariable variable=Status;isOutput=true]1" - name: JobResult - - - job: macOS pool: @@ -307,21 +239,17 @@ jobs: condition: succeededOrFailed() dependsOn: - - macOSCMake - - macOSBuck + - macOSBuild variables: - macOSCMakeReleaseStatus: $[ dependencies.macOSCMake.outputs['Release.JobResult.Status'] ] - macOSCMakeDebugStatus: $[ dependencies.macOSCMake.outputs['Debug.JobResult.Status'] ] - macOSBuckReleaseStatus: $[ dependencies.macOSBuck.outputs['JobResult.Status'] ] + macOSReleaseStatus: $[ dependencies.macOSBuild.outputs['Release.JobResult.Status'] ] + macOSDebugStatus: $[ dependencies.macOSBuild.outputs['Debug.JobResult.Status'] ] steps: - checkout: none - script: | - if [ -z "$(macOSCMakeReleaseStatus)" ] || [ -z "$(macOSCMakeDebugStatus)" ] || \ - [ -z "$(macOSBuckReleaseStatus)" ] - then + if [ -z "$(macOSReleaseStatus)" ] || [ -z "$(macOSDebugStatus)" ]; then exit 1 fi displayName: "Detect macOS jobs build statuses" @@ -330,8 +258,8 @@ jobs: # WINDOWS - - job: WindowsCMake - displayName: "WindowsCMake Release" + - job: WindowsBuild + displayName: "Windows Release" pool: vmImage: vs2017-win2016 @@ -442,64 +370,6 @@ jobs: rm -r -Force $(Build.BinariesDirectory)/build displayName: "Reclaim disk space" - - - job: WindowsBuck - displayName: "WindowsBuck Release" - - pool: - vmImage: vs2017-win2016 - - steps: - - powershell: | - git config --global core.autocrlf false - - - checkout: self - - - powershell: | - choco uninstall mingw -y - (New-Object System.Net.WebClient).DownloadFile("https://github.com/facebook/buck/releases/download/v2019.06.17.01/buck.2019.06.17.01.nupkg", ` - "buck.2019.06.17.01.nupkg") - Install-Package buck -Source . -SkipDependencies - displayName: "Prepare Buck environment" - workingDirectory: $(Build.BinariesDirectory) - - - powershell: | - $python2_path = ((Get-Item C:\hostedtoolcache\windows\Python\2*\x64) | Sort-Object -Descending)[0].FullName - $python3_path = ((Get-Item C:\hostedtoolcache\windows\Python\3*\x64) | Sort-Object -Descending)[0].FullName - - echo "##vso[task.setvariable variable=python2]$python2_path" - echo "##vso[task.setvariable variable=python3]$python3_path" - - displayName: "Detect python 2 and 3 installation folders" - - - script: | - mklink /J $(Build.BinariesDirectory)\vsinstall "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" - - - powershell: | - $vcvers = cat $(Build.BinariesDirectory)\vsinstall\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt - .\tools\generate_buck_config.ps1 -VsInstall '$(Build.BinariesDirectory)\vsinstall' ` - -VcToolsVersion "$vcvers" ` - -SdkInstall '' ` - -SdkVersion '' ` - -Python3Path '$(python3)\python.exe' ` - -BuckConfigRoot .\tools\buckconfigs\ - displayName: "Generate Buck config" - - - script: | - set PATH=$(python2);%PATH% - $(python2)\python.exe "C:\Program Files\PackageManagement\NuGet\Packages\buck.2019.06.17.01\tools\buck.pex" build @mode/windows-x86_64/release osquery:osqueryd - displayName: "Build osquery" - - - script: | - set PATH=$(python2);%PATH% - $(python2)\python.exe "C:\Program Files\PackageManagement\NuGet\Packages\buck.2019.06.17.01\tools\buck.pex" test @mode/windows-x86_64/release osquery/... tests/... plugins/... - displayName: "Run tests" - - - powershell: | - echo "##vso[task.setvariable variable=Status;isOutput=true]1" - name: JobResult - - - job: Windows pool: @@ -508,20 +378,17 @@ jobs: condition: succeededOrFailed() dependsOn: - - WindowsCMake - - WindowsBuck + - WindowsBuild variables: - WindowsCMakeReleaseStatus: $[ dependencies.WindowsCMake.outputs['JobResult.Status'] ] - WindowsBuckReleaseStatus: $[ dependencies.WindowsBuck.outputs['JobResult.Status'] ] + WindowsReleaseStatus: $[ dependencies.WindowsBuild.outputs['JobResult.Status'] ] steps: - checkout: none - script: | - if [ -z "$(WindowsCMakeReleaseStatus)" ] || [ -z "$(WindowsBuckReleaseStatus)" ]; then + if [ -z "$(WindowsReleaseStatus)" ]; then exit 1 fi - displayName: "Detect Windows CMake and Buck build status" - + displayName: "Detect Windows build status" # WINDOWS diff --git a/docs/wiki/development/building.md b/docs/wiki/development/building.md index b5410ff462a..b682ff1dac7 100644 --- a/docs/wiki/development/building.md +++ b/docs/wiki/development/building.md @@ -1,10 +1,10 @@ -osquery supports many flavors of Linux, FreeBSD, macOS, and Windows. +osquery supports many flavors of Linux, macOS, and Windows. While osquery runs on a large number of operating systems, we only provide build instructions for a select few. -The supported compilers are: the osquery toolchain (LLVM/Clang 8.0.1) on Linux, MSVC v141 on Windows, and AppleClang from Xcode Command Line Tools 10.2.1. +The supported compilers are: the osquery toolchain (LLVM/Clang 9.0.1) on Linux, MSVC v141 on Windows, and AppleClang from Xcode Command Line Tools 10.2.1. -# Building with CMake +# Prerequisites Git (>= 2.14.0), CMake (>= 3.14.6), Python 3 are required to build. The rest of the dependencies are downloaded by CMake. @@ -230,112 +230,6 @@ By default, the following checks are enabled: 6. modernize-* 7. bugprone-* -# Building with Buck - -Building and testing is the same on all platforms. Each platform section below describes how to install the required tools and dependencies. - -## Linux (Buck) - -Install required tools on Ubuntu 18.04 or Ubuntu 18.10: - -```bash -sudo apt install openjdk-8-jre clang libc++1 libc++-dev libc++abi1 libc++abi-dev python python3 python3-distutils -``` - -Install library dependencies: - -```bash -sudo apt install liblzma-dev -``` - -Install `buck`: - -```bash -wget 'https://github.com/facebook/buck/releases/download/v2018.10.29.01/buck.2018.10.29.01_all.deb' -sudo apt install ./buck.2018.10.29.01_all.deb -``` - -## macOS (Buck) - -Install required tools using Homebrew: - -```bash -xcode-select --install - -brew tap caskroom/cask -brew tap caskroom/versions -brew cask install java8 -``` - -Install `buck` and `watchman`. Watchman isn't mandatory, but will make builds faster. - -```bash -brew tap facebook/fb -brew install buck watchman -``` - -## FreeBSD (Buck) - -Install required tools on FreeBSD 11.2: - -```bash -sudo pkg install openjdk8 python3 python2 clang35 -``` - -Install `buck`: - -```bash -sudo curl --output /usr/local/bin/buck 'https://jitpack.io/com/github/facebook/buck/v2018.10.29.01/buck-v2018.10.29.01.pex' -sudo chmod +x /usr/local/bin/buck -``` - -Install library dependencies: - -```bash -sudo pkg install glog thrift thrift-cpp boost-libs magic rocksdb-lite rapidjson zstd linenoise-ng augeas ssdeep sleuthkit yara aws-sdk-cpp lldpd libxml++-2 smartmontools lldpd -``` - -## Windows 10 (Buck) - -You'll need to have the following software installed before you can build osquery on Windows: - -- Buck, this also requires the JRE 8 version -- Visual Studio 2017 or greater -- The Windows 10 SDK -- Python3 - -Once you've installed the above requirements, run `.\tools\generate_buck_config.ps1 -VsInstall '' -VcToolsVersion '' -SdkInstall '' -SdkVersion '' -Python3Path '' -BuckConfigRoot .\tools\buckconfigs\` to generate the buckconfig for building. - -## Building and Testing - -To build simply run the following command replacing `` and `` -appropriately: - -```bash -buck build @mode// //osquery:osqueryd -``` - -When buck finishes find the binary at `buck-out//gen/osquery/osqueryd`. - -Similarly to run tests just run: - -```bash -buck test @mode// //... -``` - -This will run all tests, you can replace `//...` with a specific target to run specific tests only. - -Supported platforms: - -- `linux-x86_64` -- `macos-x86_64` -- `windows-x86_64` -- `freebsd-x86_64` - -Supported modes: - -- `release` -- `debug` # Using Vagrant diff --git a/libraries/buck/todo b/libraries/buck/todo deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/mode/freebsd-x86_64/debug b/mode/freebsd-x86_64/debug deleted file mode 100644 index 1e33cf737bb..00000000000 --- a/mode/freebsd-x86_64/debug +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -//tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg ---config-file -//tools/buckconfigs/freebsd-x86_64/type/debug.bcfg ---config-file -//tools/buckconfigs/freebsd-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/freebsd-x86_64/release b/mode/freebsd-x86_64/release deleted file mode 100644 index 154d7c7fefc..00000000000 --- a/mode/freebsd-x86_64/release +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -//tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg ---config-file -//tools/buckconfigs/freebsd-x86_64/type/release.bcfg ---config-file -//tools/buckconfigs/freebsd-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/linux-x86_64/debug b/mode/linux-x86_64/debug deleted file mode 100644 index 8b6d9fc34fe..00000000000 --- a/mode/linux-x86_64/debug +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -//tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg ---config-file -//tools/buckconfigs/linux-x86_64/type/debug.bcfg ---config-file -//tools/buckconfigs/linux-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/linux-x86_64/release b/mode/linux-x86_64/release deleted file mode 100644 index e796242a5c6..00000000000 --- a/mode/linux-x86_64/release +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -//tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg ---config-file -//tools/buckconfigs/linux-x86_64/type/release.bcfg ---config-file -//tools/buckconfigs/linux-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/macos-x86_64/debug b/mode/macos-x86_64/debug deleted file mode 100644 index adf849d45d6..00000000000 --- a/mode/macos-x86_64/debug +++ /dev/null @@ -1,6 +0,0 @@ ---config-file -//tools/buckconfigs/macos-x86_64/type/debug.bcfg ---config-file -//tools/buckconfigs/macos-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/macos-x86_64/release b/mode/macos-x86_64/release deleted file mode 100644 index be85cd63463..00000000000 --- a/mode/macos-x86_64/release +++ /dev/null @@ -1,6 +0,0 @@ ---config-file -//tools/buckconfigs/macos-x86_64/type/release.bcfg ---config-file -//tools/buckconfigs/macos-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/mode/system.py b/mode/system.py deleted file mode 100755 index a710159c3b1..00000000000 --- a/mode/system.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved - -import sys -import argparse -import platform - - -class Platform: - LINUX_X86_64 = "linux-x86_64" - MACOS_X86_64 = "macos-x86_64" - FREEBSD_X86_64 = "freebsd-x86_64" - WINDOWS_X86_64 = "windows-x86_64" - - -class BuildType: - RELEASE = "release" - DEBUG = "debug" - - -BCFG_BASE_PATH = "//tools" - - -PLATFORM_TOOLCHAIN = { - Platform.LINUX_X86_64: "ubuntu-18.04-clang", - Platform.MACOS_X86_64: None, - Platform.FREEBSD_X86_64: "freebsd-11.2-clang", - Platform.WINDOWS_X86_64: "vsToolchainFlags", -} - - -def generate_config_file_flag(bcfg): - return "--config-file\n" + bcfg if bcfg else "" - - -def generate_toolchain(build_platform, build_type): - toolchain = PLATFORM_TOOLCHAIN[build_platform] - - if toolchain is not None: - bcfg = "{}/buckconfigs/{}/toolchain/{}.bcfg".format( - BCFG_BASE_PATH, build_platform, toolchain - ) - else: - bcfg = None - - return generate_config_file_flag(bcfg) - - -def generate_type(build_platform, build_type): - bcfg = "{}/buckconfigs/{}/type/{}.bcfg".format( - BCFG_BASE_PATH, build_platform, build_type - ) - - return generate_config_file_flag(bcfg) - - -def generate_platform_base(build_platform): - bcfg = "{}/buckconfigs/{}/base.bcfg".format(BCFG_BASE_PATH, build_platform) - - return generate_config_file_flag(bcfg) - - -def generate_base(): - bcfg = "{}/buckconfigs/base.bcfg".format(BCFG_BASE_PATH) - - return generate_config_file_flag(bcfg) - - -# Buck does not allow this script to fail, so lets pass an invalid flag ---- to -# make buck fail and print a message inside --- || || ----. This is bad but at -# least we're printing something to the user. -def fail(message): - print("---- || {} || ----".format(message)) - sys.exit(1) - - -def get_platform(): - os = platform.system().lower() - arch = platform.machine().lower() - - if os == "linux" and arch == "x86_64": - return Platform.LINUX_X86_64 - elif os == "darwin" and arch == "x86_64": - return Platform.MACOS_X86_64 - elif os == "freebsd" and arch == "x86_64": - return Platform.FREEBSD_X86_64 - elif os == "windows" and arch == "x86_64": - return Platform.WINDOWS_X86_64 - else: - fail("Unsupported platform {} {}".format(os, arch)) - - -def get_build_type(build_type): - if build_type == "release": - return BuildType.RELEASE - elif build_type == "debug": - return BuildType.DEBUG - else: - fail("Unsupported build type {}".format(build_type)) - -class CustomArgumentParser(argparse.ArgumentParser): - def error(self, message): - fail(message) - -if __name__ == "__main__": - - - parser = CustomArgumentParser( - description="Automatically set the proper config files for buck. This is selected based on the platform" - ) - parser.add_argument( - "--flavors", - dest="flavors", - action="store", - type=str, - help="comma seperated list of flavors. Currently supported: release and debug", - choices=[BuildType.RELEASE, BuildType.DEBUG], - default=BuildType.RELEASE, - ) - - args = parser.parse_args() - - build_platform = get_platform() - build_type = get_build_type(args.flavors) - - configs = [ - generate_toolchain(build_platform, build_type), - generate_type(build_platform, build_type), - generate_platform_base(build_platform), - generate_base(), - ] - print("\n".join(configs)) diff --git a/mode/windows-x86_64/debug b/mode/windows-x86_64/debug deleted file mode 100644 index 762774441e9..00000000000 --- a/mode/windows-x86_64/debug +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -tools/buckconfigs/windows-x86_64/toolchain/vs2017_15.5.bcfg ---config-file -tools/buckconfigs/windows-x86_64/type/debug.bcfg ---config-file -tools/buckconfigs/windows-x86_64/base.bcfg ---config-file -tools/buckconfigs/base.bcfg diff --git a/mode/windows-x86_64/release b/mode/windows-x86_64/release deleted file mode 100644 index 93fda72f4fe..00000000000 --- a/mode/windows-x86_64/release +++ /dev/null @@ -1,8 +0,0 @@ ---config-file -//tools/buckconfigs/windows-x86_64/toolchain/vs2017_15.5.bcfg ---config-file -//tools/buckconfigs/windows-x86_64/type/release.bcfg ---config-file -//tools/buckconfigs/windows-x86_64/base.bcfg ---config-file -//tools/buckconfigs/base.bcfg diff --git a/osquery/BUCK b/osquery/BUCK deleted file mode 100644 index c2a11b6f58f..00000000000 --- a/osquery/BUCK +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_binary", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:globs.bzl", "osquery_subdir_glob") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "headers", - header_namespace = "osquery", - exported_headers = osquery_subdir_glob( - [ - ("include/osquery", "*.h"), - ], - ), - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/macros:macros"), - osquery_target("osquery/utils/system:system_utils"), - osquery_tp_target("gflags"), - osquery_tp_target("sqlite"), - ], -) - -osquery_cxx_binary( - name = "osqueryd", - # Xcode ignore targets without source files :( - srcs = ["empty.cpp"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/main:main"), - ], -) diff --git a/osquery/carver/BUCK b/osquery/carver/BUCK deleted file mode 100644 index f775ff78534..00000000000 --- a/osquery/carver/BUCK +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "carver", - srcs = [ - "carver.cpp", - ], - header_namespace = "osquery/carver", - exported_headers = [ - "carver.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - ], - ), - ], - tests = [ - osquery_target("osquery/carver/tests:carver_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/remote:utility"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("boost"), - osquery_tp_target("gflags"), - ], -) diff --git a/osquery/carver/tests/BUCK b/osquery/carver/tests/BUCK deleted file mode 100644 index ff5b40b930c..00000000000 --- a/osquery/carver/tests/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "carver_tests", - srcs = [ - "carver_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/carver:carver"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/config/BUCK b/osquery/config/BUCK deleted file mode 100644 index 31e71348762..00000000000 --- a/osquery/config/BUCK +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "config", - srcs = [ - "config.cpp", - "packs.cpp", - ], - header_namespace = "osquery/config", - exported_headers = [ - "config.h", - ], - link_whole = True, - tests = [ - osquery_target("osquery/config/tests:config_tests"), - osquery_target("osquery/config/tests:packs"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/system:time"), - ], -) diff --git a/osquery/config/tests/BUCK b/osquery/config/tests/BUCK deleted file mode 100644 index c6299ee8956..00000000000 --- a/osquery/config/tests/BUCK +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "config_tests", - srcs = [ - "config_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:mock_file_structure"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ":test_utils", - ], -) - -osquery_cxx_test( - name = "packs", - srcs = [ - "packs.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:mock_file_structure"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ":test_utils", - ], -) - -osquery_cxx_library( - name = "test_utils", - srcs = [ - "test_utils.cpp", - ], - header_namespace = "osquery/config/tests", - exported_headers = [ - "test_utils.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/system:env"), - ], -) diff --git a/osquery/core/BUCK b/osquery/core/BUCK deleted file mode 100644 index 43a233b5654..00000000000 --- a/osquery/core/BUCK +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "core", - srcs = [ - "flags.cpp", - "init.cpp", - "query.cpp", - "system.cpp", - "tables.cpp", - "watcher.cpp", - ], - header_namespace = "osquery/core", - exported_headers = [ - "watcher.h", - ], - exported_platform_headers = [ - ( - WINDOWS, - [ - "windows/handle.h", - "windows/ntapi.h", - "windows/wmi.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lcrypto", - "-lgflags", - "-lglog", - ], - ), - ], - platform_deps = [ - ( - LINUX, - [ - osquery_tp_target("util-linux"), - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/initializer.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/handle.cpp", - "windows/initializer.cpp", - "windows/wmi.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/core/tests:flags_tests"), - osquery_target("osquery/core/tests:system_tests"), - osquery_target("osquery/core/tests:tables_tests"), - osquery_target("osquery/core/tests:watcher_permissions_tests"), - osquery_target("osquery/core/tests:query_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:env"), - osquery_target("osquery/utils/system:system_utils"), - osquery_target("osquery/utils/system:time"), - osquery_target("osquery/logger:logger"), - osquery_tp_target("gflags"), - osquery_tp_target("glog"), - osquery_tp_target("openssl", "crypto"), - osquery_tp_target("glibc", "pthread"), - ], -) diff --git a/osquery/core/plugins/BUCK b/osquery/core/plugins/BUCK deleted file mode 100644 index b3263216732..00000000000 --- a/osquery/core/plugins/BUCK +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "plugins", - srcs = glob(["*.cpp"]), - header_namespace = "osquery/plugins", - exported_headers = glob(["*.h"]), - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/status:status"), - ], -) diff --git a/osquery/core/sql/BUCK b/osquery/core/sql/BUCK deleted file mode 100644 index 89ffd44f55a..00000000000 --- a/osquery/core/sql/BUCK +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "core_sql", - srcs = glob(["*.cpp"]), - header_namespace = "osquery/core/sql", - exported_headers = glob(["*.h"]), - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/status:status"), - osquery_tp_target("sqlite"), - ], -) diff --git a/osquery/core/tests/BUCK b/osquery/core/tests/BUCK deleted file mode 100644 index 779ddbdf14e..00000000000 --- a/osquery/core/tests/BUCK +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX", "WINDOWS") - -osquery_cxx_test( - name = "flags_tests", - srcs = [ - "flags_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "system_tests", - srcs = [ - "system_test.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "tables_tests", - srcs = [ - "tables_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "watcher_permissions_tests", - srcs = [ - "watcher_tests.cpp", - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/permissions_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/process:process"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "query_tests", - srcs = [ - "query_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "wmi_tests", - platform_srcs = [ - ( - WINDOWS, - [ - "windows/wmi_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("osquery/utils/info:info"), - osquery_target("tests:helper"), - ], -) diff --git a/osquery/database/BUCK b/osquery/database/BUCK deleted file mode 100644 index d5610a335ec..00000000000 --- a/osquery/database/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "database", - srcs = [ - "database.cpp", - ], - header_namespace = "osquery/database", - exported_headers = [ - ], - tests = [ - osquery_target("osquery/database/tests:database_tests"), - osquery_target("osquery/database/tests:results"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_tp_target("boost"), - ], - exported_deps = [ - ], -) diff --git a/osquery/database/tests/BUCK b/osquery/database/tests/BUCK deleted file mode 100644 index 790deb5923a..00000000000 --- a/osquery/database/tests/BUCK +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "database_tests", - srcs = [ - "database.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "results", - srcs = [ - "results.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/devtools/BUCK b/osquery/devtools/BUCK deleted file mode 100644 index 72431e902c7..00000000000 --- a/osquery/devtools/BUCK +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "devtools", - srcs = glob(["*.cpp"]), - header_namespace = "osquery/devtools", - exported_headers = glob(["*.h"]), - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-llinenoise", - ], - ), - ], - tests = [ - osquery_target("osquery/devtools/tests:printer_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/core:core"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/process:process"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/system:env"), - osquery_tp_target("googletest", "gtest_headers"), - osquery_tp_target("linenoise-ng"), - ], -) diff --git a/osquery/devtools/tests/BUCK b/osquery/devtools/tests/BUCK deleted file mode 100644 index b33168128b4..00000000000 --- a/osquery/devtools/tests/BUCK +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "printer_tests", - srcs = [ - "printer_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/devtools:devtools"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/dispatcher/BUCK b/osquery/dispatcher/BUCK deleted file mode 100644 index d4798760ad6..00000000000 --- a/osquery/dispatcher/BUCK +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "dispatcher", - srcs = [ - "dispatcher.cpp", - "distributed_runner.cpp", - "scheduler.cpp", - ], - header_namespace = "osquery/dispatcher", - exported_headers = [ - "distributed_runner.h", - "scheduler.h", - ], - tests = [ - osquery_target("osquery/dispatcher/tests:dispatcher_tests"), - osquery_target("osquery/dispatcher/tests:scheduler"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/process:process"), - osquery_target("osquery/profiler:profiler"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/config/parsers:parsers"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) diff --git a/osquery/dispatcher/tests/BUCK b/osquery/dispatcher/tests/BUCK deleted file mode 100644 index 3151020ec5e..00000000000 --- a/osquery/dispatcher/tests/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "dispatcher_tests", - srcs = [ - "dispatcher.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "scheduler", - srcs = [ - "scheduler.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/distributed/BUCK b/osquery/distributed/BUCK deleted file mode 100644 index c4f99d33eac..00000000000 --- a/osquery/distributed/BUCK +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "distributed", - srcs = ["distributed.cpp"], - tests = [ - osquery_target("osquery/distributed/tests:distributed_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/database:database"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/system:time"), - ], -) diff --git a/osquery/distributed/tests/BUCK b/osquery/distributed/tests/BUCK deleted file mode 100644 index 21970922389..00000000000 --- a/osquery/distributed/tests/BUCK +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_test( - name = "distributed_tests", - srcs = [ - "distributed_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/distributed:tls_distributed"), - osquery_target("plugins/remote/enroll:tls_enroll_plugin"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/ev2/BUCK b/osquery/ev2/BUCK deleted file mode 100644 index ec75ba033c8..00000000000 --- a/osquery/ev2/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2018-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "ev2", - srcs = [ - "manager.cpp", - "publisher.cpp", - "subscription.cpp", - ], - header_namespace = "osquery/ev2", - exported_headers = [ - "buffered_subscription.h", - "manager.h", - "publisher.h", - "simple_publisher.h", - "subscription.h", - ], - tests = [ - ":ev2_tests", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/expected:expected"), - ], -) - -osquery_cxx_test( - name = "ev2_tests", - srcs = [ - "tests/buffered_subscription.cpp", - "tests/manager.cpp", - "tests/simple_publisher.cpp", - "tests/utils.cpp", - ], - headers = [ - "tests/utils.h", - ], - header_namespace = "osquery/ev2", - visibility = ["PUBLIC"], - deps = [ - ":ev2", - ], -) diff --git a/osquery/events/BUCK b/osquery/events/BUCK deleted file mode 100644 index de8956a049c..00000000000 --- a/osquery/events/BUCK +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "events", - header_namespace = "osquery/events", - exported_headers = [ - "pathset.h", - ], - exported_platform_headers = [ - ( - LINUX, - [ - "linux/auditdnetlink.h", - "linux/auditeventpublisher.h", - "linux/inotify.h", - "linux/process_events.h", - "linux/process_file_events.h", - "linux/selinux_events.h", - "linux/socket_events.h", - "linux/syslog.h", - "linux/udev.h", - ], - ), - ( - MACOSX, - [ - "darwin/diskarbitration.h", - "darwin/event_taps.h", - "darwin/fsevents.h", - "darwin/iokit.h", - "darwin/openbsm.h", - "darwin/scnetwork.h", - ], - ), - ( - WINDOWS, - [ - "windows/windows_event_log.h", - "windows/usn_journal_reader.h", - "windows/ntfs_event_publisher.h", - ], - ), - ], - link_whole = True, - platform_deps = [ - ( - LINUX, - [ - osquery_tp_target("libaudit"), - osquery_tp_target("libudev"), - osquery_tp_target("util-linux"), - ], - ), - ( - WINDOWS, - [ - osquery_target("osquery/utils/system:errno"), - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "audit_flags.cpp", - "linux/auditdnetlink.cpp", - "linux/auditeventpublisher.cpp", - "linux/inotify.cpp", - "linux/syslog.cpp", - "linux/udev.cpp", - ], - ), - ( - MACOSX, - [ - "audit_flags.cpp", - "darwin/diskarbitration.cpp", - "darwin/event_taps.cpp", - "darwin/fsevents.cpp", - "darwin/iokit.cpp", - "darwin/openbsm.cpp", - "darwin/scnetwork.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/windows_event_log.cpp", - "windows/usn_journal_reader.cpp", - "windows/ntfs_event_publisher.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/events/tests:events_tests"), - osquery_target("osquery/events/tests:syslog_tests"), - osquery_target("osquery/events/tests:audit_tests"), - osquery_target("osquery/events/tests:events_database_tests"), - osquery_target("osquery/events/tests:fsevents_tests"), - osquery_target("osquery/events/tests:inotify_tests"), - osquery_target("osquery/events/tests:usn_journal_reader_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - ":events_registry", - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/config:config"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/system:time"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_library( - name = "events_registry", - srcs = [ - "events.cpp", - ], - header_namespace = "osquery/events", - link_whole = True, - tests = [ - osquery_target("osquery/events/tests:events_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery:headers"), - ], -) diff --git a/osquery/events/tests/BUCK b/osquery/events/tests/BUCK deleted file mode 100644 index 70ebe714b2d..00000000000 --- a/osquery/events/tests/BUCK +++ /dev/null @@ -1,218 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "WINDOWS") - -osquery_cxx_test( - name = "events_tests", - srcs = [ - "events_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "events_database_tests", - srcs = [ - "events_database_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "syslog_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/syslog_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "audit_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/audit_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "process_file_events_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/process_file_events_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "inotify_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/inotify_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "fsevents_tests", - platform_srcs = [ - ( - MACOSX, - [ - "darwin/fsevents_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "usn_journal_reader_tests", - platform_srcs = [ - ( - WINDOWS, - [ - "windows/usn_journal_reader_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/core:core"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/database:database"), - osquery_target("plugins/database:ephemeral"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/experimental/events_stream/BUCK b/osquery/experimental/events_stream/BUCK deleted file mode 100644 index 78681c20acc..00000000000 --- a/osquery/experimental/events_stream/BUCK +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "events_stream_registry", - srcs = [ - "events_stream_registry.cpp", - ], - header_namespace = "osquery/experimental/events_stream", - exported_headers = [ - "events_stream_registry.h", - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_library( - name = "events_stream", - srcs = [ - "events_stream.cpp", - ], - header_namespace = "osquery/experimental/events_stream", - exported_headers = [ - "events_stream.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/experimental/events_stream:events_stream_registry"), - osquery_target("osquery/core:core"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/experimental/tracing/BUCK b/osquery/experimental/tracing/BUCK deleted file mode 100644 index a71ab1e46ba..00000000000 --- a/osquery/experimental/tracing/BUCK +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_library( - name = "syscalls_tracing", - srcs = [ - "syscalls_tracing.cpp", - ], - header_namespace = "osquery/experimental/tracing", - exported_headers = [ - "syscalls_tracing.h", - ], - platform_headers = [ - ( - LINUX, - [ - "syscalls_tracing_impl.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "syscalls_tracing_impl.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/experimental/tracing/linux:probes_events"), - osquery_target("osquery/experimental/events_stream:events_stream"), - osquery_target("osquery/utils/caches:lru"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/system/linux/proc:proc"), - osquery_target("osquery/utils/system:time"), - ], -) diff --git a/osquery/experimental/tracing/linux/BUCK b/osquery/experimental/tracing/linux/BUCK deleted file mode 100644 index da1023a7ab5..00000000000 --- a/osquery/experimental/tracing/linux/BUCK +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "probes_events", - header_namespace = "osquery/experimental/tracing/linux", - exported_platform_headers = [ - ( - LINUX, - [ - "ebpf_tracepoint.h", - "probes.h", - "syscall_event.h", - "syscalls_programs.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "ebpf_tracepoint.cpp", - "probes.cpp", - "syscall_event.cpp", - "syscalls_programs.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/experimental/tracing/linux/tests:ebpf_tracepoint_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/system/linux/ebpf:ebpf"), - osquery_target("osquery/utils/system/linux/tracing:tracing"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/experimental/tracing/linux/tests/BUCK b/osquery/experimental/tracing/linux/tests/BUCK deleted file mode 100644 index 3797d472e22..00000000000 --- a/osquery/experimental/tracing/linux/tests/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_test( - name = "ebpf_tracepoint_tests", - srcs = [ - "empty.cpp", - ], - platform_srcs = [ - ( - LINUX, - [ - "syscall_event.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/experimental/tracing/linux:probes_events"), - ], -) diff --git a/osquery/extensions/BUCK b/osquery/extensions/BUCK deleted file mode 100644 index cde1f30bb23..00000000000 --- a/osquery/extensions/BUCK +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") - -osquery_cxx_library( - name = "extensions", - srcs = [ - "extensions.cpp", - ], - header_namespace = "osquery/extensions", - link_whole = True, - tests = [ - osquery_target("osquery/extensions/tests:extensions_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - ":extensions_interface", - osquery_target("osquery/core:core"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - ], -) - -osquery_cxx_library( - name = "impl_thrift", - srcs = [ - "impl_thrift.cpp", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lthrift", - ], - ), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - ":extensions_interface", - osquery_target("osquery/core:core"), - osquery_target("osquery/extensions/thrift:osquery-cpp2"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - ], -) - -osquery_cxx_library( - name = "extensions_interface", - srcs = [ - "interface.cpp", - ], - header_namespace = "osquery/extensions", - exported_headers = [ - "interface.h", - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/filesystem:osquery_filesystem"), - ], -) diff --git a/osquery/extensions/tests/BUCK b/osquery/extensions/tests/BUCK deleted file mode 100644 index c64c5ab66c6..00000000000 --- a/osquery/extensions/tests/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "extensions_tests", - srcs = [ - "extensions.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/sdk:plugin_sdk"), - ], -) diff --git a/osquery/extensions/thrift/BUCK b/osquery/extensions/thrift/BUCK deleted file mode 100644 index 52be03dd7b0..00000000000 --- a/osquery/extensions/thrift/BUCK +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_filegroup") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "osquery-cpp2", - srcs = [ - "gen/Extension.cpp", - "gen/ExtensionManager.cpp", - "gen/osquery_constants.cpp", - "gen/osquery_types.cpp", - ], - header_namespace = "", - exported_headers = { - "Extension.h": "gen/Extension.h", - "ExtensionManager.h": "gen/ExtensionManager.h", - "osquery_constants.h": "gen/osquery_constants.h", - "osquery_types.h": "gen/osquery_types.h", - }, - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("thrift"), - ], -) - -osquery_filegroup( - name = "thrift_file", - srcs = [ - "osquery.thrift", - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/filesystem/BUCK b/osquery/filesystem/BUCK deleted file mode 100644 index 089657fdf1e..00000000000 --- a/osquery/filesystem/BUCK +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "osquery_filesystem", - srcs = [ - "file_compression.cpp", - "filesystem.cpp", - ], - header_namespace = "osquery/filesystem", - exported_headers = [ - "fileops.h", - "filesystem.h", - ], - exported_platform_headers = [ - ( - LINUX, - [ - "linux/proc.h", - "linux/mounts.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-larchive", - "-lzstd", - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/fileops.cpp", - ], - ), - ( - MACOSX, - [ - "darwin/bsd_file_flags.cpp", - ], - ), - ( - LINUX, - [ - "linux/mem.cpp", - "linux/proc.cpp", - "linux/mounts.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/fileops.cpp", - ], - ), - ], - tests = [ - ":filesystem_tests", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/status:status"), - osquery_target("osquery/utils/system:env"), - osquery_target("osquery/utils/system:filepath"), - osquery_tp_target("boost"), - osquery_tp_target("libarchive"), - osquery_tp_target("zstd"), - ], -) - -osquery_cxx_library( - name = "mock_file_structure", - srcs = [ - "mock_file_structure.cpp", - ], - header_namespace = "osquery/filesystem", - exported_headers = [ - "mock_file_structure.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("boost"), - ":osquery_filesystem", - ], -) - -osquery_cxx_test( - name = "filesystem_tests", - srcs = [ - "tests/fileops.cpp", - "tests/filesystem.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:plist_files"), - ), - }, - platform_srcs = [ - ( - MACOSX, - [ - "tests/darwin/plist_tests.cpp", - "tests/darwin/bsd_file_flags_tests.cpp" - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/process:process"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("specs:tables"), - ":mock_file_structure", - ":osquery_filesystem", - ], -) diff --git a/osquery/hashing/BUCK b/osquery/hashing/BUCK deleted file mode 100644 index 1aa37ecec5a..00000000000 --- a/osquery/hashing/BUCK +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "hashing", - srcs = [ - "hashing.cpp", - ], - header_namespace = "osquery/hashing", - exported_headers = [ - "hashing.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/info:info"), - osquery_tp_target("openssl", "ssl"), - ], -) diff --git a/osquery/logger/BUCK b/osquery/logger/BUCK deleted file mode 100644 index 9193e7bfc97..00000000000 --- a/osquery/logger/BUCK +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "data_logger", - srcs = ["logger.cpp"], - header_namespace = "osquery/logger", - tests = [ - osquery_target("osquery/logger/tests:logger_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - ":logger", - ], -) - -osquery_cxx_library( - name = "logger", - header_namespace = "osquery", - exported_headers = [ - "logger.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("glog"), - ], -) diff --git a/osquery/logger/tests/BUCK b/osquery/logger/tests/BUCK deleted file mode 100644 index 687d7a3b759..00000000000 --- a/osquery/logger/tests/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "logger_tests", - srcs = [ - "logger.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/main/BUCK b/osquery/main/BUCK deleted file mode 100644 index b10d62ad1c2..00000000000 --- a/osquery/main/BUCK +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "main", - srcs = [ - "main.cpp", - ], - header_namespace = "osquery/main", - exported_headers = [ - "main.h", - ], - platform_deps = [ - ( - LINUX, - [ - osquery_target("plugins/logger:aws_firehose"), - osquery_target("plugins/logger:aws_kinesis"), - osquery_target("plugins/logger:aws_log_forwarder"), - osquery_target("plugins/logger:kafka_producer"), - ], - ), - ( - MACOSX, - [ - osquery_target("plugins/logger:aws_firehose"), - osquery_target("plugins/logger:aws_kinesis"), - osquery_target("plugins/logger:aws_log_forwarder"), - osquery_target("plugins/logger:kafka_producer"), - ], - ), - ( - WINDOWS, - [ - osquery_target("plugins/logger:aws_firehose"), - osquery_target("plugins/logger:aws_kinesis"), - osquery_target("plugins/logger:aws_log_forwarder"), - osquery_target("plugins/logger:windows_event_log"), - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/main.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/main.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/devtools:devtools"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/experimental/events_stream:events_stream_registry"), - osquery_target("osquery/experimental/tracing:syscalls_tracing"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/process:process"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("plugins/config:filesystem_config"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/config:update_config_plugin"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/database:rocksdb_plugin"), - osquery_target("plugins/database:sqlite_plugin"), - osquery_target("plugins/distributed:tls_distributed"), - osquery_target("plugins/logger:buffered"), - osquery_target("plugins/logger:filesystem_logger"), - osquery_target("plugins/logger:stdout"), - osquery_target("plugins/logger:syslog"), - osquery_target("plugins/logger:tls_logger"), - osquery_target("plugins/numeric_monitoring:numeric_monitoring_filesystem"), - osquery_target("plugins/remote/enroll:tls_enroll_plugin"), - osquery_target("specs:tables"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/numeric_monitoring/BUCK b/osquery/numeric_monitoring/BUCK deleted file mode 100644 index 2ffc377a31a..00000000000 --- a/osquery/numeric_monitoring/BUCK +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "numeric_monitoring", - srcs = [ - "numeric_monitoring.cpp", - "plugin_interface.cpp", - "pre_aggregation_cache.cpp", - ], - header_namespace = "osquery/numeric_monitoring", - exported_headers = [ - "plugin_interface.h", - "pre_aggregation_cache.h", - ], - tests = [ - osquery_target("osquery/numeric_monitoring/tests:numeric_monitoring_tests"), - osquery_target("osquery/numeric_monitoring/tests:pre_aggregation_cache"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/numeric_monitoring/tests/BUCK b/osquery/numeric_monitoring/tests/BUCK deleted file mode 100644 index 2d41b9d804b..00000000000 --- a/osquery/numeric_monitoring/tests/BUCK +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "numeric_monitoring_tests", - srcs = [ - "numeric_monitoring.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "pre_aggregation_cache", - srcs = [ - "pre_aggregation_cache.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/process/BUCK b/osquery/process/BUCK deleted file mode 100644 index 5ead3b68f55..00000000000 --- a/osquery/process/BUCK +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "process", - header_namespace = "osquery/process", - exported_headers = [ - "process.h", - ], - exported_platform_headers = [ - ( - WINDOWS, - [ - "windows/process_ops.h", - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/process.cpp", - "posix/process_ops.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/process.cpp", - "windows/process_ops.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/utils/system:env"), - osquery_tp_target("boost"), - osquery_tp_target("glibc", "dl"), - ], -) diff --git a/osquery/profiler/BUCK b/osquery/profiler/BUCK deleted file mode 100644 index 2b2bbc2dbe8..00000000000 --- a/osquery/profiler/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX", "WINDOWS") - -osquery_cxx_library( - name = "profiler", - headers = glob(["*.h"]), - header_namespace = "osquery/profiler", - exported_headers = glob(["*.h"]), - platform_srcs = [ - ( - POSIX, - ["posix/code_profiler.cpp"], - ), - ( - WINDOWS, - ["windows/code_profiler.cpp"], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - ], -) diff --git a/osquery/registry/BUCK b/osquery/registry/BUCK deleted file mode 100644 index 8f626c3afab..00000000000 --- a/osquery/registry/BUCK +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "registry", - srcs = [ - "registry_factory.cpp", - "registry_interface.cpp", - ], - tests = [ - osquery_target("osquery/registry/tests:registry_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/system:env"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/registry/tests/BUCK b/osquery/registry/tests/BUCK deleted file mode 100644 index 8f83542c86f..00000000000 --- a/osquery/registry/tests/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "registry_tests", - srcs = [ - "registry.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/remote/BUCK b/osquery/remote/BUCK deleted file mode 100644 index 91cd113c2db..00000000000 --- a/osquery/remote/BUCK +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "requests", - srcs = ["requests.cpp"], - header_namespace = "osquery/remote", - exported_headers = ["requests.h"], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lssl", - "-lz", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/utils/status:status"), - osquery_target("osquery/logger:logger"), - osquery_tp_target("boost"), - osquery_tp_target("openssl", "ssl"), - osquery_tp_target("zlib"), - ], -) - -osquery_cxx_library( - name = "http_client", - srcs = [ - "http_client.cpp", - "uri.cpp", - ], - header_namespace = "osquery/remote", - exported_headers = [ - "http_client.h", - "uri.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lssl", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/utils/status:status"), - osquery_tp_target("boost"), - osquery_tp_target("openssl", "ssl"), - ], -) - -osquery_cxx_library( - name = "utility", - header_namespace = "osquery/remote", - exported_headers = ["utility.h"], - tests = [ - osquery_target("osquery/remote/tests:requests_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/process:process"), - osquery_target("osquery/remote/transports:transports_tls"), - osquery_target("plugins/remote/enroll:tls_enroll_plugin"), - ":http_client", - ":requests", - ], -) diff --git a/osquery/remote/enroll/BUCK b/osquery/remote/enroll/BUCK deleted file mode 100644 index 18d7c1e06b1..00000000000 --- a/osquery/remote/enroll/BUCK +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "MACOSX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_library( - name = "tls_enroll", - srcs = [ - "enroll.cpp", - ], - link_whole = True, - tests = [ - ":remote_enroll_tests" - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/process:process"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote:requests"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/remote/transports:transports_tls"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/system:time"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "remote_enroll_tests", - srcs = [ - "tests/enroll_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/process:process"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("tests:helper"), - ], -) diff --git a/osquery/remote/serializers/BUCK b/osquery/remote/serializers/BUCK deleted file mode 100644 index 255af1c6aa8..00000000000 --- a/osquery/remote/serializers/BUCK +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "serializer_json", - srcs = ["json.cpp"], - header_namespace = "osquery/remote/serializers", - exported_headers = ["json.h"], - tests = [":remote_json_serializers_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/remote:requests"), - osquery_target("osquery/utils/json:json"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "remote_json_serializers_tests", - srcs = [ - "tests/json_serializers_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/remote/serializers:serializer_json"), - ], -) diff --git a/osquery/remote/tests/BUCK b/osquery/remote/tests/BUCK deleted file mode 100644 index 8f719cbcbb4..00000000000 --- a/osquery/remote/tests/BUCK +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "remote_test_utils", - srcs = [ - "test_utils.cpp", - ], - header_namespace = "osquery/remote/tests", - exported_headers = [ - "test_utils.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("tests:helper"), - ], -) - -osquery_cxx_test( - name = "requests_tests", - srcs = [ - "requests_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("tests:helper"), - ], -) diff --git a/osquery/remote/transports/BUCK b/osquery/remote/transports/BUCK deleted file mode 100644 index f0a53f05f9c..00000000000 --- a/osquery/remote/transports/BUCK +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_library( - name = "transports_tls", - srcs = ["tls.cpp"], - header_namespace = "osquery/remote/transports", - exported_headers = ["tls.h"], - tests = [":remote_transports_tls_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote:requests"), - osquery_target("osquery/utils/json:json"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "remote_transports_tls_tests", - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - platform_srcs = [ - ( - POSIX, - [ - "tests/tls_transports_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("tests:helper"), - ], -) diff --git a/osquery/sdk/BUCK b/osquery/sdk/BUCK deleted file mode 100644 index 7fe23758dfa..00000000000 --- a/osquery/sdk/BUCK +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "plugin_sdk", - srcs = [ - "empty_register_foreign_tables.cpp", - ], - header_namespace = "osquery/sdk", - exported_headers = [ - "plugin_sdk.h", - "sdk.h", - ], - link_whole = True, - tests = [ - osquery_target("osquery/sdk/tests:plugin_sdk_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events_registry"), - osquery_target("osquery/experimental/events_stream:events_stream_registry"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/debug:debug"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/macros:macros"), - osquery_target("osquery/utils/status:status"), - osquery_target("osquery/utils/system:env"), - osquery_target("osquery/utils/system:errno"), - osquery_target("osquery/utils/system:filepath"), - osquery_target("osquery/utils/system:system_utils"), - osquery_target("osquery/utils/system:time"), - osquery_target("osquery/utils/system:uptime"), - osquery_target("osquery/utils:attribute"), - osquery_target("osquery/utils:utils"), - osquery_target("plugins/database:ephemeral"), - ], -) diff --git a/osquery/sdk/tests/BUCK b/osquery/sdk/tests/BUCK deleted file mode 100644 index 7889b3468bf..00000000000 --- a/osquery/sdk/tests/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "plugin_sdk_tests", - srcs = [ - "registry_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/sdk:plugin_sdk"), - ], -) diff --git a/osquery/sql/BUCK b/osquery/sql/BUCK deleted file mode 100644 index 66c2c01babc..00000000000 --- a/osquery/sql/BUCK +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "sql", - srcs = [ - "dynamic_table_row.cpp", - "sql.cpp", - "sqlite_encoding.cpp", - "sqlite_filesystem.cpp", - "sqlite_hashing.cpp", - "sqlite_math.cpp", - "sqlite_operations.cpp", - "sqlite_util.cpp", - "virtual_sqlite_table.cpp", - "virtual_table.cpp", - ], - header_namespace = "osquery/sql", - exported_headers = [ - "dynamic_table_row.h", - "sqlite_util.h", - "virtual_table.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lfuzzy", - "-lgflags", - "-lsqlite3", - ], - ), - ], - link_whole = True, - platform_srcs = [ - ( - LINUX, - [ - "sqlite_string.cpp", - ], - ), - ( - MACOSX, - [ - "sqlite_string.cpp", - ], - ), - ( - WINDOWS, - [ - "sqlite_string.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/sql/tests:sql_tests"), - osquery_target("osquery/sql/tests:virtual_table_tests"), - osquery_target("osquery/sql/tests:sqlite_util_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/carver:carver"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/system:errno"), - osquery_tp_target("boost"), - osquery_tp_target("gflags"), - osquery_tp_target("googletest", "gtest_headers"), - osquery_tp_target("sqlite"), - osquery_tp_target("ssdeep-cpp"), - ], -) diff --git a/osquery/sql/tests/BUCK b/osquery/sql/tests/BUCK deleted file mode 100644 index 689029e6de6..00000000000 --- a/osquery/sql/tests/BUCK +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "sql_tests", - srcs = [ - "sql.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("plugins/config:tls_config"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "virtual_table_tests", - srcs = [ - "virtual_table.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "sqlite_util_tests", - srcs = [ - "sqlite_util_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("plugins/config:tls_config"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "sqlite_hashing_tests", - srcs = [ - "sqlite_hashing_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/sql/tests:sql_test_utils"), - ], -) - -osquery_cxx_library( - name = "sql_test_utils", - srcs = [ - "sql_test_utils.cpp", - ], - header_namespace = "osquery/sql/tests", - exported_headers = [ - "sql_test_utils.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/system/network/BUCK b/osquery/system/network/BUCK deleted file mode 100644 index 72bc7a6d2ef..00000000000 --- a/osquery/system/network/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "hostname", - srcs = [ - "hostname.cpp", - ], - header_namespace = "osquery/system/network", - exported_headers = [ - "hostname.h", - ], - tests = [ - osquery_target("osquery/system/network/tests:hostname_host_identity_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/utils/schemer:schemer"), - osquery_target("osquery/utils/status:status"), - ], -) diff --git a/osquery/system/network/tests/BUCK b/osquery/system/network/tests/BUCK deleted file mode 100644 index b151d3af44a..00000000000 --- a/osquery/system/network/tests/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_test( - name = "hostname_host_identity_tests", - srcs = [ - "host_identity.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/system/network:hostname"), - osquery_tp_target("boost"), - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("tests:helper"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/tables/BUCK b/osquery/tables/BUCK deleted file mode 100644 index 03fab5b8e97..00000000000 --- a/osquery/tables/BUCK +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX", "WINDOWS") - -osquery_cxx_library( - name = "table_implementations", - platform_deps = [ - ( - POSIX, - [ - osquery_target("osquery/tables/sleuthkit:sleuthkit_table"), - osquery_target("osquery/tables/yara:yara_table"), - osquery_target("osquery/tables/lldpd:lldpd_table"), - ], - ), - ( - LINUX, - [ - osquery_target("osquery/tables/cloud:cloud"), - osquery_target("osquery/tables/smart:smart"), - ], - ), - ( - MACOSX, - [ - osquery_target("osquery/tables/cloud:cloud"), - osquery_target("osquery/tables/smart:smart"), - ], - ), - ( - WINDOWS, - [ - osquery_target("osquery/tables/cloud:cloud"), - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/tables/applications:applications"), - osquery_target("osquery/tables/events:events_table"), - osquery_target("osquery/tables/forensic:forensic"), - osquery_target("osquery/tables/networking:networking"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/tables/utility:utility_table"), - ], -) diff --git a/osquery/tables/applications/BUCK b/osquery/tables/applications/BUCK deleted file mode 100644 index 91d0c39c035..00000000000 --- a/osquery/tables/applications/BUCK +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "applications", - srcs = [ - "browser_chrome.cpp", - "browser_utils.cpp", - "browser_firefox.cpp", - ], - header_namespace = "osquery/tables/applications", - exported_headers = [ - "browser_utils.h", - ], - exported_platform_headers = [ - ( - POSIX, - [ - "posix/prometheus_metrics.h", - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/browser_opera.cpp", - "posix/carbon_black.cpp", - "posix/docker.cpp", - "posix/prometheus_metrics.cpp", - ], - ), - ( - MACOSX, - [ - "atom_packages.cpp", - "darwin/browser_plugins.cpp", - ], - ), - ( - LINUX, - [ - "atom_packages.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/carbon_black.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/applications/posix/tests:prometheus_metrics_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config/parsers:parsers"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/applications/posix/tests/BUCK b/osquery/tables/applications/posix/tests/BUCK deleted file mode 100644 index 7b8b1491345..00000000000 --- a/osquery/tables/applications/posix/tests/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX") - -osquery_cxx_test( - name = "prometheus_metrics_tests", - platform_srcs = [ - ( - POSIX, - [ - "prometheus_metrics_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/sql/tests:sql_test_utils"), - osquery_target("osquery/tables/applications:applications"), - osquery_target("plugins/config:tls_config"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/tables/cloud/BUCK b/osquery/tables/cloud/BUCK deleted file mode 100644 index 11b3e2fd35b..00000000000 --- a/osquery/tables/cloud/BUCK +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "cloud", - srcs = [ - "aws/ec2_instance_metadata.cpp", - "aws/ec2_instance_tags.cpp", - "azure/azure_instance_metadata.cpp", - "azure/azure_instance_tags.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/aws:aws"), - osquery_target("osquery/utils/azure:azure"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/events/BUCK b/osquery/tables/events/BUCK deleted file mode 100644 index ea404835d51..00000000000 --- a/osquery/tables/events/BUCK +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "events_table", - srcs = [ - "event_utils.cpp", - ], - header_namespace = "osquery/tables/events", - exported_headers = [ - "event_utils.h", - ], - exported_platform_headers = [ - ( - LINUX, - [ - "linux/process_events.h", - "linux/process_file_events.h", - "linux/selinux_events.h", - "linux/socket_events.h", - ], - ), - ( - WINDOWS, - [ - "windows/ntfs_journal_events.h", - ], - ), - ], - link_whole = True, - platform_linker_flags = [ - ( - MACOSX, - [ - "-lbsm", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "linux/file_events.cpp", - "linux/hardware_events.cpp", - "linux/process_events.cpp", - "linux/process_file_events.cpp", - "linux/selinux_events.cpp", - "linux/socket_events.cpp", - "linux/syslog_events.cpp", - "linux/user_events.cpp", - ], - ), - ( - MACOSX, - [ - "darwin/disk_events.cpp", - "darwin/file_events.cpp", - "darwin/hardware_events.cpp", - "darwin/socket_events.cpp", - "darwin/openbsm_events.cpp", - "darwin/user_interaction_events.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/powershell_events.cpp", - "windows/windows_events.cpp", - "windows/ntfs_journal_events.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/events/tests:file_events_tests"), - osquery_target("osquery/tables/events/tests:selinux_events_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/core:core"), - osquery_target("osquery/events:events"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils/system:uptime"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("osquery/utils/json:json"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/events/tests/BUCK b/osquery/tables/events/tests/BUCK deleted file mode 100644 index 993aced3e33..00000000000 --- a/osquery/tables/events/tests/BUCK +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_test( - name = "file_events_tests", - srcs = [ - "file_events_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/tables/events:events_table"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "selinux_events_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/selinux_events_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/config:config"), - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/tables/events:events_table"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/tables/forensic/BUCK b/osquery/tables/forensic/BUCK deleted file mode 100644 index 516ab3bcda7..00000000000 --- a/osquery/tables/forensic/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "forensic", - srcs = [ - "carves.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/carver:carver"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/json:json"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/lldpd/BUCK b/osquery/tables/lldpd/BUCK deleted file mode 100644 index 93710a0c78e..00000000000 --- a/osquery/tables/lldpd/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "lldpd_table", - srcs = [ - "lldp_neighbors.cpp", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-llldpctl", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/logger:logger"), - osquery_tp_target("lldpd"), - ], -) diff --git a/osquery/tables/networking/BUCK b/osquery/tables/networking/BUCK deleted file mode 100644 index f6b66d8090a..00000000000 --- a/osquery/tables/networking/BUCK +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "networking", - srcs = [ - "curl.cpp", - "curl_certificate.cpp", - "etc_hosts.cpp", - "etc_protocols.cpp", - "etc_services.cpp", - "listening_ports.cpp", - ], - header_namespace = "osquery/tables/networking", - exported_platform_headers = [ - ( - POSIX, - [ - "posix/interfaces.h", - "posix/utils.h", - ], - ), - ( - LINUX, - [ - "linux/inet_diag.h", - "linux/iptc_proxy.h", - ], - ), - ( - MACOSX, - [ - "darwin/wifi_utils.h", - ], - ), - ( - WINDOWS, - [ - "windows/interfaces.h", - ], - ), - ], - platform_deps = [ - ( - LINUX, - [ - osquery_tp_target("libiptables"), - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/dns_resolvers.cpp", - "posix/interfaces.cpp", - "posix/utils.cpp", - ], - ), - ( - LINUX, - [ - "linux/arp_cache.cpp", - "linux/interface_ip.cpp", - "linux/iptables.cpp", - "linux/iptc_proxy.c", - "linux/process_open_sockets.cpp", - "linux/routes.cpp", - ], - ), - ( - MACOSX, - [ - "darwin/interface_ip.cpp", - "darwin/routes.cpp", - "darwin/wifi.mm", - "darwin/wifi_status.mm", - "darwin/wifi_survey.mm", - "darwin/wifi_utils.mm", - ], - ), - ( - FREEBSD, - [ - "freebsd/interface_ip.cpp", - "freebsd/process_open_sockets.cpp", - "freebsd/routes.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/arp_cache.cpp", - "windows/connectivity.cpp", - "windows/interfaces.cpp", - "windows/process_open_sockets.cpp", - "windows/routes.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/networking/tests:networking_tables_tests"), - osquery_target("osquery/tables/networking/tests:wifi_tests"), - osquery_target("osquery/tables/networking/tests:iptables_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/tables/system:system_table"), - osquery_tp_target("boost"), - osquery_tp_target("glibc", "resolv"), - ], -) diff --git a/osquery/tables/networking/tests/BUCK b/osquery/tables/networking/tests/BUCK deleted file mode 100644 index 60b56e24375..00000000000 --- a/osquery/tables/networking/tests/BUCK +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_test( - name = "networking_tables_tests", - srcs = [ - "networking_tables_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/tables/networking:networking"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "wifi_tests", - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:plist_files"), - ), - }, - platform_srcs = [ - ( - MACOSX, - [ - "darwin/wifi_tests.mm", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/tables/networking:networking"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "iptables_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/iptables_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/networking:networking"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/sleuthkit/BUCK b/osquery/tables/sleuthkit/BUCK deleted file mode 100644 index 0bd8e497b48..00000000000 --- a/osquery/tables/sleuthkit/BUCK +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "sleuthkit_table", - srcs = [ - "sleuthkit.cpp", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-ltsk", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_tp_target("sleuthkit"), - ], -) diff --git a/osquery/tables/smart/BUCK b/osquery/tables/smart/BUCK deleted file mode 100644 index 39d56148d8b..00000000000 --- a/osquery/tables/smart/BUCK +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "smart", - header_namespace = "osquery/tables/smart", - exported_platform_headers = [ - ( - LINUX, - [ - "smart_drives.h", - ], - ), - ( - MACOSX, - [ - "smart_drives.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "smart_drives.cpp", - ], - ), - ( - MACOSX, - [ - "smart_drives.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/smart/tests:smart_drives_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/sql:sql"), - osquery_tp_target("smartmontools", "libsmartctl"), - ], -) diff --git a/osquery/tables/smart/tests/BUCK b/osquery/tables/smart/tests/BUCK deleted file mode 100644 index f93b1163941..00000000000 --- a/osquery/tables/smart/tests/BUCK +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_test( - name = "smart_drives_tests", - platform_srcs = [ - ( - POSIX, - [ - "smart_drives_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/config:config"), - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/database:database"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/tables/events:events_table"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - osquery_tp_target("smartmontools", "libsmartctl"), - ], -) diff --git a/osquery/tables/system/BUCK b/osquery/tables/system/BUCK deleted file mode 100644 index a691e5f4fc9..00000000000 --- a/osquery/tables/system/BUCK +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "system_table", - srcs = [ - "cpuid.cpp", - "hash.cpp", - "python_packages.cpp", - "ssh_configs.cpp", - "ssh_keys.cpp", - "system_utils.cpp", - "uptime.cpp", - ], - header_namespace = "osquery/tables/system", - exported_headers = [ - "efi_misc.h", - "intel_me.hpp", - "smbios_utils.h", - "system_utils.h", - "user_groups.h", - ], - exported_platform_headers = [ - ( - POSIX, - [ - "posix/apt_sources.h", - "posix/known_hosts.h", - "posix/shell_history.h", - "posix/sudoers.h", - "posix/sysctl_utils.h", - "posix/last.h", - ], - ), - ( - LINUX, - [ - "linux/md_tables.h", - "linux/pci_devices.h", - "linux/smbios_utils.h", - ], - ), - ( - MACOSX, - [ - "darwin/asl_utils.h", - "darwin/firewall.h", - "darwin/keychain.h", - "darwin/packages.h", - "darwin/smbios_utils.h", - ], - ), - ( - FREEBSD, - [ - "freebsd/procstat.h", - ], - ), - ( - WINDOWS, - [ - "windows/registry.h", - "windows/certificates.h", - "windows/users.h", - "windows/userassist.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-laugeas", - "-lmagic", - ], - ), - ], - platform_compiler_flags = [ - ( - MACOSX, - [ - "-Wno-c99-extensions", - "-Wno-undeclared-selector", - ], - ), - ], - platform_deps = [ - ( - LINUX, - [ - osquery_tp_target("libdevmapper"), - osquery_tp_target("libdpkg"), - osquery_tp_target("libelfin", "elf"), - osquery_tp_target("libcryptsetup"), - osquery_tp_target("librpm"), - osquery_tp_target("popt"), - ], - ), - ( - MACOSX, - [ - osquery_tp_target("openssl", "crypto"), - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/apt_sources.cpp", - "posix/augeas.cpp", - "posix/authorized_keys.cpp", - "posix/crontab.cpp", - "posix/known_hosts.cpp", - "posix/last.cpp", - "posix/load_average.cpp", - "posix/logged_in_users.cpp", - "posix/magic.cpp", - "posix/shell_history.cpp", - "posix/smbios_utils.cpp", - "posix/sudoers.cpp", - "posix/suid_bin.cpp", - "posix/system_controls.cpp", - "posix/ulimit_info.cpp", - "posix/yum_sources.cpp", - ], - ), - ( - LINUX, - [ - "freenux/cpu_time.cpp", - "linux/acpi_tables.cpp", - "linux/apparmor_profiles.cpp", - "linux/block_devices.cpp", - "linux/deb_packages.cpp", - "linux/disk_encryption.cpp", - "linux/elf_info.cpp", - "linux/groups.cpp", - "linux/intel_me.cpp", - "linux/kernel_info.cpp", - "linux/kernel_modules.cpp", - "linux/md_tables.cpp", - "linux/memory_info.cpp", - "linux/memory_map.cpp", - "linux/model_specific_register.cpp", - "linux/mounts.cpp", - "linux/npm_packages.cpp", - "linux/os_version.cpp", - "linux/pci_devices.cpp", - "linux/portage.cpp", - "linux/process_open_files.cpp", - "linux/processes.cpp", - "linux/rpm_packages.cpp", - "linux/selinux_settings.cpp", - "linux/shadow.cpp", - "linux/shared_memory.cpp", - "linux/smbios_tables.cpp", - "linux/sysctl_utils.cpp", - "linux/system_info.cpp", - "linux/usb_devices.cpp", - "linux/user_groups.cpp", - "linux/users.cpp", - ], - ), - ( - MACOSX, - [ - "darwin/account_policy_data.mm", - "darwin/acpi_tables.cpp", - "darwin/ad_config.cpp", - "darwin/apps.mm", - "darwin/asl.cpp", - "darwin/asl_utils.cpp", - "darwin/authorizations.mm", - "darwin/battery.mm", - "darwin/block_devices.cpp", - "darwin/certificates.mm", - "darwin/cpu_time.cpp", - "darwin/crashes.cpp", - "darwin/cups_destinations.cpp", - "darwin/cups_jobs.cpp", - "darwin/disk_encryption.mm", - "darwin/event_taps.mm", - "darwin/extended_attributes.cpp", - "darwin/firewall.cpp", - "darwin/gatekeeper.cpp", - "darwin/homebrew_packages.cpp", - "darwin/ibridge.cpp", - "darwin/iokit_registry.cpp", - "darwin/kernel_extensions.cpp", - "darwin/kernel_info.cpp", - "darwin/kernel_panics.cpp", - "darwin/keychain_acl.cpp", - "darwin/keychain_items.cpp", - "darwin/keychain_utils.cpp", - "darwin/launchd.cpp", - "darwin/managed_policies.cpp", - "darwin/mdfind.mm", - "darwin/mounts.cpp", - "darwin/nfs_shares.cpp", - "darwin/nvram.cpp", - "darwin/os_version.cpp", - "darwin/packages.mm", - "darwin/pci_devices.cpp", - "darwin/preferences.cpp", - "darwin/process_open_descriptors.cpp", - "darwin/processes.cpp", - "darwin/quicklook_cache.cpp", - "darwin/running_apps.mm", - "darwin/sandboxes.cpp", - "darwin/screenlock.mm", - "darwin/shared_folders.mm", - "darwin/sharing_preferences.cpp", - "darwin/signature.mm", - "darwin/sip_config.cpp", - "darwin/smbios_tables.cpp", - "darwin/smc_keys.cpp", - "darwin/startup_items.cpp", - "darwin/sysctl_utils.cpp", - "darwin/system_info.cpp", - "darwin/time_machine.cpp", - "darwin/usb_devices.cpp", - "darwin/user_groups.mm", - "darwin/virtual_memory_info.cpp", - "darwin/xprotect.cpp", - ], - ), - ( - FREEBSD, - [ - "freebsd/fbsd_kmods.cpp", - "freebsd/groups.cpp", - "freebsd/mounts.cpp", - "freebsd/os_version.cpp", - "freebsd/pkg_packages.cpp", - "freebsd/process_open_files.cpp", - "freebsd/processes.cpp", - "freebsd/procstat.cpp", - "freebsd/sysctl_utils.cpp", - "freebsd/users.cpp", - "freenux/cpu_time.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/appcompat_shims.cpp", - "windows/authenticode.cpp", - "windows/autoexec.cpp", - "windows/bitlocker_info.cpp", - "windows/certificates.cpp", - "windows/chocolatey_packages.cpp", - "windows/cpu_info.cpp", - "windows/default_environment.cpp", - "windows/disk_info.cpp", - "windows/drivers.cpp", - "windows/groups.cpp", - "windows/hvci_status.cpp", - "windows/ie_extensions.cpp", - "windows/intel_me.cpp", - "windows/kernel_info.cpp", - "windows/kva_speculative_info.cpp", - "windows/logged_in_users.cpp", - "windows/logical_drives.cpp", - "windows/logon_sessions.cpp", - "windows/ntdomains.cpp", - "windows/ntfs_acl_permissions.cpp", - "windows/objects.cpp", - "windows/os_version.cpp", - "windows/patches.cpp", - "windows/physical_disk_performance.cpp", - "windows/pipes.cpp", - "windows/processes.cpp", - "windows/programs.cpp", - "windows/registry.cpp", - "windows/scheduled_tasks.cpp", - "windows/services.cpp", - "windows/shared_resources.cpp", - "windows/smbios_tables.cpp", - "windows/startup_items.cpp", - "windows/system_info.cpp", - "windows/userassist.cpp", - "windows/user_groups.cpp", - "windows/users.cpp", - "windows/video_info.cpp", - "windows/windows_crashes.cpp", - "windows/windows_optional_features.cpp", - "windows/wmi_bios_info.cpp", - "windows/wmi_cli_event_consumers.cpp", - "windows/wmi_event_filters.cpp", - "windows/wmi_filter_consumer_binding.cpp", - "windows/wmi_script_event_consumers.cpp", - "windows/windows_security_products.cpp", - "windows/windows_security_center.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/system/tests:linux_tests"), - osquery_target("osquery/tables/system/tests:posix_tests"), - osquery_target("osquery/tables/system/tests:system_tables_tests"), - osquery_target("osquery/tables/system/tests:darwin_tests"), - osquery_target("osquery/tables/system/tests:windows_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/core:core"), - osquery_target("osquery/events:events"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/hashing:hashing"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/process:process"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/system:env"), - osquery_target("osquery/utils/system:filepath"), - osquery_target("osquery/utils/system:system_utils"), - osquery_target("osquery/utils/system:time"), - osquery_target("osquery/utils/system:uptime"), - osquery_target("specs:tables_processes_row"), - osquery_tp_target("augeas"), - osquery_tp_target("boost"), - osquery_tp_target("libmagic"), - osquery_tp_target("libxml2"), - ], -) diff --git a/osquery/tables/system/tests/BUCK b/osquery/tables/system/tests/BUCK deleted file mode 100644 index c3ce94105b9..00000000000 --- a/osquery/tables/system/tests/BUCK +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX", "WINDOWS") - -osquery_cxx_test( - name = "linux_tests", - platform_srcs = [ - ( - LINUX, - [ - "linux/md_tables_tests.cpp", - "linux/pci_devices_tests.cpp", - "linux/pcidb_tests.cpp", - "linux/portage_tests.cpp", - "linux/selinux_settings_tests.cpp" - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - ], -) - -osquery_cxx_test( - name = "posix_tests", - platform_srcs = [ - ( - POSIX, - [ - "posix/apt_sources_tests.cpp", - "posix/known_hosts_tests.cpp", - "posix/shell_history_tests.cpp", - "posix/sudoers_tests.cpp", - "posix/yum_sources_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - ], -) - -osquery_cxx_test( - name = "system_tables_tests", - srcs = ["system_tables_tests.cpp"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - ], -) - -osquery_cxx_test( - name = "darwin_tests", - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - }, - platform_srcs = [ - ( - MACOSX, - [ - "darwin/apps_tests.cpp", - "darwin/asl_tests.cpp", - "darwin/certificates_tests.cpp", - "darwin/extended_attributes_tests.cpp", - "darwin/firewall_tests.cpp", - "darwin/launchd_tests.cpp", - "darwin/mdfind_tests.cpp", - "darwin/processes_tests.cpp", - "darwin/smc_tests.cpp", - "darwin/startup_items_tests.cpp", - "darwin/signature_tests.mm", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - ], -) - -osquery_cxx_test( - name = "windows_tests", - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - }, - platform_srcs = [ - ( - WINDOWS, - [ - "windows/certificates_tests.cpp", - "windows/registry_tests.cpp", - "windows/windows_optional_features_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/core/sql:core_sql"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - ], -) - - - diff --git a/osquery/tables/utility/BUCK b/osquery/tables/utility/BUCK deleted file mode 100644 index 9e386888123..00000000000 --- a/osquery/tables/utility/BUCK +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "utility_table", - srcs = [ - "file.cpp", - "osquery.cpp", - "time.cpp", - ], - header_namespace = "osquery/tables/utility", - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/core:core"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/process:process"), - osquery_target("osquery/utils/macros:macros"), - osquery_target("osquery/utils/system:system_utils"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/tables/yara/BUCK b/osquery/tables/yara/BUCK deleted file mode 100644 index 18c0af0bebc..00000000000 --- a/osquery/tables/yara/BUCK +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "yara_table", - srcs = [ - "yara.cpp", - "yara_utils.cpp", - ], - header_namespace = "osquery/tables/yara", - exported_headers = [ - "yara_utils.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lyara", - ], - ), - ], - link_whole = True, - platform_srcs = [ - ( - LINUX, - [ - "yara_events.cpp", - ], - ), - ( - MACOSX, - [ - "yara_events.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/tables/yara/tests:yara_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils/config:utils_config"), - osquery_tp_target("boost"), - osquery_tp_target("yara"), - ], -) diff --git a/osquery/tables/yara/tests/BUCK b/osquery/tables/yara/tests/BUCK deleted file mode 100644 index c70b7a818f4..00000000000 --- a/osquery/tables/yara/tests/BUCK +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_test( - name = "yara_tests", - platform_deps = [ - ( - POSIX, - [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/tables/yara:yara_table"), - osquery_target("osquery/tables/system:system_table"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("plugins/database:ephemeral"), - osquery_tp_target("boost"), - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "yara_tests.cpp", - ], - ), - ( - WINDOWS, - [ - "yara_tests_win_empty.cpp", - ], - ), - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/BUCK b/osquery/utils/BUCK deleted file mode 100644 index e5cd05b0c4c..00000000000 --- a/osquery/utils/BUCK +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "MACOSX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "utils", - srcs = [ - "base64.cpp", - "chars.cpp", - "only_movable.cpp", - ], - header_namespace = "osquery/utils", - exported_headers = [ - "attribute.h", - "base64.h", - "chars.h", - "enum_class_hash.h", - "map_take.h", - "mutex.h", - "only_movable.h", - "scope_guard.h", - ], - exported_platform_headers = [ - ( - MACOSX, - [ - "darwin/plist.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lglog", - ], - ), - ], - platform_srcs = [ - ( - MACOSX, - [ - "darwin/plist.mm", - ], - ), - ], - tests = [":utils_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("glog"), - osquery_tp_target("boost"), - ], - exported_deps = [ - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/config:utils_config"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/status:status"), - ], -) - -osquery_cxx_test( - name = "utils_tests", - srcs = [ - "tests/base64.cpp", - "tests/chars.cpp", - "tests/map_take.cpp", - "tests/scope_guard.cpp", - ], - platform_srcs = [ - ( - WINDOWS, - [ - "tests/windows/env.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/system:env"), - ], -) - -osquery_cxx_library( - name = "attribute", - header_namespace = "osquery/utils", - exported_headers = [ - "attribute.h", - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/aws/BUCK b/osquery/utils/aws/BUCK deleted file mode 100644 index 414823b0864..00000000000 --- a/osquery/utils/aws/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "aws", - srcs = [ - "aws_util.cpp", - ], - header_namespace = "osquery/utils/aws", - exported_headers = [ - "aws_util.h", - ], - tests = [ - osquery_target("osquery/utils/aws/tests:aws_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/transports:transports_tls"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/status:status"), - osquery_tp_target("aws-sdk-cpp"), - ], -) diff --git a/osquery/utils/aws/tests/BUCK b/osquery/utils/aws/tests/BUCK deleted file mode 100644 index ce1addaaff9..00000000000 --- a/osquery/utils/aws/tests/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "aws_tests", - srcs = [ - "aws_util_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:aws_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/process:process"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/aws:aws"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/osquery/utils/azure/BUCK b/osquery/utils/azure/BUCK deleted file mode 100644 index d85cf18894a..00000000000 --- a/osquery/utils/azure/BUCK +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "azure", - srcs = [ - "azure_util.cpp", - ], - header_namespace = "osquery/utils/azure", - exported_headers = [ - "azure_util.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/remote:http_client"), - osquery_target("osquery/remote/transports:transports_tls"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/status:status"), - ], -) diff --git a/osquery/utils/caches/BUCK b/osquery/utils/caches/BUCK deleted file mode 100644 index 741ca5250c3..00000000000 --- a/osquery/utils/caches/BUCK +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "lru", - header_namespace = "osquery/utils/caches", - exported_headers = [ - "lru.h", - "lru-impl.h", - ], - tests = [ - osquery_target("osquery/utils/caches/tests:lru_tests"), - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/caches/tests/BUCK b/osquery/utils/caches/tests/BUCK deleted file mode 100644 index 0df08caf5b0..00000000000 --- a/osquery/utils/caches/tests/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "lru_tests", - srcs = [ - "lru.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/caches:lru"), - ], -) diff --git a/osquery/utils/config/BUCK b/osquery/utils/config/BUCK deleted file mode 100644 index 8de1ac589ee..00000000000 --- a/osquery/utils/config/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") - -osquery_cxx_library( - name = "utils_config", - srcs = [ - "default_paths.cpp", - ], - header_namespace = "osquery/utils/config", - exported_headers = [ - "default_paths.h", - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/conversions/BUCK b/osquery/utils/conversions/BUCK deleted file mode 100644 index a20703a42b0..00000000000 --- a/osquery/utils/conversions/BUCK +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "MACOSX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "conversions", - srcs = [ - "split.cpp", - "tryto.cpp", - ], - header_namespace = "osquery/utils/conversions", - exported_headers = [ - "castvariant.h", - "join.h", - "split.h", - "tryto.h", - ], - exported_platform_headers = [ - ( - MACOSX, - [ - "darwin/cfdata.h", - "darwin/cfnumber.h", - "darwin/cfstring.h", - "darwin/cftime.h", - "darwin/iokit.h", - ], - ), - ( - WINDOWS, - [ - "windows/strings.h", - ], - ), - ], - platform_srcs = [ - ( - MACOSX, - [ - "darwin/cfdata.cpp", - "darwin/cfnumber.cpp", - "darwin/cfstring.cpp", - "darwin/cftime.cpp", - "darwin/iokit.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/strings.cpp", - ], - ), - ], - tests = [":conversions_tests"], - visibility = ["PUBLIC"], - deps = [ - ":to", - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/expected:expected"), - osquery_tp_target("boost"), - osquery_tp_target("glog"), - ], -) - -osquery_cxx_library( - name = "to", - header_namespace = "osquery/utils/conversions", - exported_headers = [ - "to.h", - ], - tests = [":conversions_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "conversions_tests", - srcs = [ - "tests/join.cpp", - "tests/split.cpp", - "tests/tryto.cpp", - ], - platform_srcs = [ - ( - MACOSX, - [ - "darwin/tests/cfstring.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/tests/strings.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - ":conversions", - ], -) - -osquery_cxx_test( - name = "to_tests", - srcs = [ - "tests/to.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":to", - ], -) diff --git a/osquery/utils/debug/BUCK b/osquery/utils/debug/BUCK deleted file mode 100644 index f937a066587..00000000000 --- a/osquery/utils/debug/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "debug", - header_namespace = "osquery/utils/debug", - exported_headers = [ - "debug_only.h", - ], - tests = [":debug_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "debug_tests", - srcs = [ - "tests/debug_only.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":debug", - ], -) diff --git a/osquery/utils/error/BUCK b/osquery/utils/error/BUCK deleted file mode 100644 index 9b67bb18bae..00000000000 --- a/osquery/utils/error/BUCK +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "error", - header_namespace = "osquery/utils/error", - exported_headers = [ - "error.h", - ], - tests = [":error_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:to"), - osquery_target("osquery/utils:attribute"), - ], -) - -osquery_cxx_test( - name = "error_tests", - srcs = [ - "tests/error.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":error", - ], -) diff --git a/osquery/utils/expected/BUCK b/osquery/utils/expected/BUCK deleted file mode 100644 index 7b7a0b9efce..00000000000 --- a/osquery/utils/expected/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "expected", - header_namespace = "osquery/utils/expected", - exported_headers = [ - "expected.h", - ], - tests = [":expected_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/debug:debug"), - osquery_target("osquery/utils/error:error"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "expected_tests", - srcs = [ - "tests/expected.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":expected", - ], -) diff --git a/osquery/utils/info/BUCK b/osquery/utils/info/BUCK deleted file mode 100644 index a43de5d54f8..00000000000 --- a/osquery/utils/info/BUCK +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target", "osquery_version") - -osquery_cxx_library( - name = "info", - srcs = [ - "platform_type.cpp", - "tool_type.cpp", - "version.cpp", - ], - header_namespace = "osquery/utils/info", - exported_headers = [ - "platform_type.h", - "tool_type.h", - "version.h", - ], - exported_preprocessor_flags = [ - "-DOSQUERY_VERSION={}".format(osquery_version()), - "-DOSQUERY_BUILD_VERSION={}".format(osquery_version()), - "-DOSQUERY_BUILD_SDK_VERSION={}".format(osquery_version()), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/macros:macros"), - ], -) diff --git a/osquery/utils/json/BUCK b/osquery/utils/json/BUCK deleted file mode 100644 index 59adbe87a4e..00000000000 --- a/osquery/utils/json/BUCK +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "json", - srcs = [ - "json.cpp", - ], - header_namespace = "osquery/utils/json", - exported_headers = [ - "json.h", - ], - exported_preprocessor_flags = [ - "-DRAPIDJSON_HAS_STDSTRING=1", - ], - tests = [":json_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/status:status"), - osquery_target("osquery/utils/system:system_utils"), - osquery_tp_target("rapidjson"), - ], -) - -osquery_cxx_test( - name = "json_tests", - srcs = [ - "tests/json.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":json", - ], -) diff --git a/osquery/utils/macros/BUCK b/osquery/utils/macros/BUCK deleted file mode 100644 index 94df9c25ac9..00000000000 --- a/osquery/utils/macros/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") - -osquery_cxx_library( - name = "macros", - header_namespace = "osquery/utils/macros", - exported_headers = [ - "macros.h", - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/schemer/BUCK b/osquery/utils/schemer/BUCK deleted file mode 100644 index 700a8fca424..00000000000 --- a/osquery/utils/schemer/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "schemer", - header_namespace = "osquery/utils/schemer", - exported_headers = [ - "schemer.h", - ], - tests = [ - osquery_target("osquery/utils/schemer/tests:schemer_tests"), - ], - visibility = ["PUBLIC"], -) diff --git a/osquery/utils/schemer/json/BUCK b/osquery/utils/schemer/json/BUCK deleted file mode 100644 index 2cb5a0d0ca6..00000000000 --- a/osquery/utils/schemer/json/BUCK +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "schemer_json", - header_namespace = "osquery/utils/schemer/json", - exported_headers = [ - "schemer_json.h", - "schemer_json_error.h", - "schemer_json_impl.h", - ], - tests = [ - osquery_target("osquery/utils/schemer/json/tests:schemer_json_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/schemer:schemer"), - osquery_tp_target("rapidjson"), - ], -) diff --git a/osquery/utils/schemer/json/tests/BUCK b/osquery/utils/schemer/json/tests/BUCK deleted file mode 100644 index 1d91ea0f44f..00000000000 --- a/osquery/utils/schemer/json/tests/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "schemer_json_tests", - srcs = [ - "schemer_json.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/schemer/json:schemer_json"), - ], -) diff --git a/osquery/utils/schemer/tests/BUCK b/osquery/utils/schemer/tests/BUCK deleted file mode 100644 index 783fc07537c..00000000000 --- a/osquery/utils/schemer/tests/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "schemer_tests", - srcs = [ - "schemer.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:to"), - osquery_target("osquery/utils/schemer:schemer"), - ], -) diff --git a/osquery/utils/status/BUCK b/osquery/utils/status/BUCK deleted file mode 100644 index 82c2ec06176..00000000000 --- a/osquery/utils/status/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "status", - srcs = [ - "status.cpp", - ], - header_namespace = "osquery/utils/status", - exported_headers = [ - "status.h", - ], - tests = [":status_tests"], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/error:error"), - osquery_target("osquery/utils/expected:expected"), - ], -) - -osquery_cxx_test( - name = "status_tests", - srcs = [ - "tests/status.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":status", - ], -) diff --git a/osquery/utils/system/BUCK b/osquery/utils/system/BUCK deleted file mode 100644 index a2d3d24a305..00000000000 --- a/osquery/utils/system/BUCK +++ /dev/null @@ -1,254 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "env", - header_namespace = "osquery/utils/system", - exported_headers = [ - "env.h", - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/env.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/env.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:conversions"), - osquery_tp_target("boost"), - osquery_target("osquery/utils/conversions:conversions"), - ":errno", - ], -) - -osquery_cxx_library( - name = "filepath", - header_namespace = "osquery/utils/system", - exported_headers = [ - "filepath.h", - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/filepath.cpp", - ], - ), - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "errno", - header_namespace = "osquery/utils/system", - exported_headers = [ - "errno.h", - ], - exported_platform_headers = [ - ( - POSIX, - [ - "posix/errno.h", - ], - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/errno.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/errno.cpp", - ], - ), - ], - deps = [ - osquery_target("osquery/logger:logger"), - osquery_target("osquery/utils/status:status"), - ], - tests = [ - ":errno_tests", - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_test( - name = "errno_tests", - srcs = [ - "tests/errno.cpp", - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/tests/errno.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - ":errno", - ], -) - -osquery_cxx_library( - name = "cpu_topology", - header_namespace = "osquery/utils/system", - exported_platform_headers = [ - ( - LINUX, - [ - "linux/cpu.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "linux/cpu.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_test( - name = "cpu_topology_tests", - srcs = [ - "tests/cpu.cpp", - ], - platform_srcs = [ - ( - LINUX, - [ - "linux/tests/cpu.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - ":cpu_topology", - ], -) - -osquery_cxx_library( - name = "time", - srcs = [ - "time.cpp", - ], - header_namespace = "osquery/utils/system", - exported_headers = [ - "time.h", - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/time.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/time.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/status:status"), - osquery_tp_target("boost"), - ], -) - -osquery_cxx_library( - name = "system_utils", - header_namespace = "osquery/utils/system", - exported_platform_headers = [ - ( - POSIX, - { - "system.h": "posix/system.h", - }, - ), - ( - WINDOWS, - { - "system.h": "windows/system.h", - }, - ), - ], - platform_srcs = [ - ( - POSIX, - [ - "posix/system.cpp", - ], - ), - ( - WINDOWS, - [ - "windows/system.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/info:info"), - osquery_tp_target("boost"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) - -osquery_cxx_test( - name = "time_tests", - srcs = [ - "tests/time.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - ":time", - ], -) - -osquery_cxx_library( - name = "uptime", - srcs = [ - "uptime.cpp", - ], - header_namespace = "osquery/utils/system", - exported_headers = [ - "uptime.h", - ], - visibility = ["PUBLIC"], - deps = [ - ":system_utils", - ], -) diff --git a/osquery/utils/system/linux/ebpf/BUCK b/osquery/utils/system/linux/ebpf/BUCK deleted file mode 100644 index 00c8013d1f6..00000000000 --- a/osquery/utils/system/linux/ebpf/BUCK +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "ebpf", - header_namespace = "osquery/utils/system/linux/ebpf", - exported_platform_headers = [ - ( - LINUX, - [ - "ebpf.h", - "map.h", - "perf_output.h", - "perf_output_impl.h", - "program.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "ebpf.cpp", - "map.cpp", - "program.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/utils/system/linux/ebpf/tests:ebpf_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/system/linux/perf_event:perf_event"), - osquery_target("osquery/utils/system:cpu_topology"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/versioning:semantic"), - osquery_target("osquery/utils/system:errno"), - osquery_target("osquery/logger:logger"), - osquery_tp_target("boost"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) diff --git a/osquery/utils/system/linux/ebpf/tests/BUCK b/osquery/utils/system/linux/ebpf/tests/BUCK deleted file mode 100644 index dbba4a636eb..00000000000 --- a/osquery/utils/system/linux/ebpf/tests/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_test( - name = "ebpf_tests", - srcs = [ - "empty.cpp", - ], - platform_srcs = [ - ( - LINUX, - [ - "ebpf.cpp", - "map.cpp", - "perf_output.cpp", - "program.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/system/linux/ebpf:ebpf"), - ], -) diff --git a/osquery/utils/system/linux/perf_event/BUCK b/osquery/utils/system/linux/perf_event/BUCK deleted file mode 100644 index c39b5906140..00000000000 --- a/osquery/utils/system/linux/perf_event/BUCK +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "perf_event", - header_namespace = "osquery/utils/system/linux/perf_event", - exported_platform_headers = [ - ( - LINUX, - [ - "perf_event.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "perf_event.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/utils/system:errno"), - osquery_tp_target("boost"), - ], -) diff --git a/osquery/utils/system/linux/proc/BUCK b/osquery/utils/system/linux/proc/BUCK deleted file mode 100644 index 6798217cf73..00000000000 --- a/osquery/utils/system/linux/proc/BUCK +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "proc", - header_namespace = "osquery/utils/system/linux/proc", - exported_platform_headers = [ - ( - LINUX, - [ - "proc.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "proc.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/utils/system/linux/proc/tests:proc_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("boost"), - ], -) diff --git a/osquery/utils/system/linux/proc/tests/BUCK b/osquery/utils/system/linux/proc/tests/BUCK deleted file mode 100644 index f5711d06c49..00000000000 --- a/osquery/utils/system/linux/proc/tests/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_test( - name = "proc_tests", - srcs = [ - "empty.cpp", - ], - platform_srcs = [ - ( - LINUX, - [ - "proc.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/system/linux/proc:proc"), - ], -) diff --git a/osquery/utils/system/linux/tracing/BUCK b/osquery/utils/system/linux/tracing/BUCK deleted file mode 100644 index 129c679d297..00000000000 --- a/osquery/utils/system/linux/tracing/BUCK +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "tracing", - header_namespace = "osquery/utils/system/linux/tracing", - exported_platform_headers = [ - ( - LINUX, - [ - "native_event.h", - "types.h", - ], - ), - ], - platform_srcs = [ - ( - LINUX, - [ - "native_event.cpp", - ], - ), - ], - tests = [ - osquery_target("osquery/utils/system/linux/tracing/tests:tracing_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/expected:expected"), - osquery_target("osquery/logger:logger"), - osquery_tp_target("boost"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) diff --git a/osquery/utils/system/linux/tracing/tests/BUCK b/osquery/utils/system/linux/tracing/tests/BUCK deleted file mode 100644 index 69697a76434..00000000000 --- a/osquery/utils/system/linux/tracing/tests/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_test( - name = "tracing_tests", - srcs = [ - "empty.cpp", - ], - platform_srcs = [ - ( - LINUX, - [ - "native_event.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/system/linux/tracing:tracing"), - ], -) diff --git a/osquery/utils/versioning/BUCK b/osquery/utils/versioning/BUCK deleted file mode 100644 index 547db63592f..00000000000 --- a/osquery/utils/versioning/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "semantic", - srcs = [ - "semantic.cpp", - ], - header_namespace = "osquery/utils/versioning", - exported_headers = [ - "semantic.h", - ], - tests = [ - osquery_target("osquery/utils/versioning/tests:semantic_version_test"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_tp_target("boost"), - osquery_target("osquery/utils/conversions:conversions"), - ], -) diff --git a/osquery/utils/versioning/tests/BUCK b/osquery/utils/versioning/tests/BUCK deleted file mode 100644 index 409c1bcdbd9..00000000000 --- a/osquery/utils/versioning/tests/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "semantic_version_test", - srcs = [ - "semantic.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/versioning:semantic"), - ], -) diff --git a/plugins/config/BUCK b/plugins/config/BUCK deleted file mode 100644 index b1ade3a771b..00000000000 --- a/plugins/config/BUCK +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "filesystem_config", - srcs = [ - "filesystem_config.cpp", - ], - header_namespace = "plugins/config", - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/utils/config:utils_config"), - ], -) - -osquery_cxx_library( - name = "tls_config", - srcs = [ - "tls_config.cpp", - ], - header_namespace = "plugins/config", - exported_headers = [ - "tls_config.h", - ], - tests = [ - osquery_target("plugins/config/tests:tls_config_tests"), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/remote:requests"), - osquery_target("osquery/remote:utility"), - osquery_target("osquery/remote/serializers:serializer_json"), - ], -) - -osquery_cxx_library( - name = "update_config_plugin", - srcs = [ - "update.cpp", - ], - header_namespace = "plugins/config", - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - ], -) diff --git a/plugins/config/parsers/BUCK b/plugins/config/parsers/BUCK deleted file mode 100644 index ac2b84958ae..00000000000 --- a/plugins/config/parsers/BUCK +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "parsers", - srcs = [ - "auto_constructed_tables.cpp", - "decorators.cpp", - "events_parser.cpp", - "feature_vectors.cpp", - "file_paths.cpp", - "kafka_topics.cpp", - "logger.cpp", - "options.cpp", - "prometheus_targets.cpp", - "views.cpp", - ], - header_namespace = "plugins/config/parsers", - exported_headers = [ - "auto_constructed_tables.h", - "decorators.h", - "feature_vectors.h", - "kafka_topics.h", - "logger.h", - "prometheus_targets.h", - ], - link_whole = True, - tests = [ - osquery_target("plugins/config/parsers/tests:decorators_tests"), - osquery_target("plugins/config/parsers/tests:events_parser_tests"), - osquery_target("plugins/config/parsers/tests:file_paths_tests"), - osquery_target("plugins/config/parsers/tests:options_tests"), - osquery_target("plugins/config/parsers/tests:views_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/config:config"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/json:json"), - ], -) diff --git a/plugins/config/parsers/tests/BUCK b/plugins/config/parsers/tests/BUCK deleted file mode 100644 index 6f47bb0be14..00000000000 --- a/plugins/config/parsers/tests/BUCK +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "decorators_tests", - srcs = [ - "decorators_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "events_parser_tests", - srcs = [ - "events_parser_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "file_paths_tests", - srcs = [ - "file_paths_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "options_tests", - srcs = [ - "options_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "views_tests", - srcs = [ - "views_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:conf_files"), - ), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config/tests:test_utils"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/config/parsers:parsers"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ], -) diff --git a/plugins/config/tests/BUCK b/plugins/config/tests/BUCK deleted file mode 100644 index f85fba25991..00000000000 --- a/plugins/config/tests/BUCK +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_test( - name = "tls_config_tests", - srcs = [ - "tls_config_tests.cpp" - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery:headers"), - osquery_target("osquery/remote:requests"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/remote/transports:transports_tls"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - ], -) \ No newline at end of file diff --git a/plugins/database/BUCK b/plugins/database/BUCK deleted file mode 100644 index 5b72c409e0e..00000000000 --- a/plugins/database/BUCK +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "ephemeral", - srcs = [ - "ephemeral.cpp", - ], - header_namespace = "plugins/database", - exported_headers = [ - "ephemeral.h", - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils:utils"), - ], -) - -osquery_cxx_library( - name = "rocksdb_plugin", - srcs = [ - "rocksdb.cpp", - ], - header_namespace = "plugins/database", - exported_headers = [ - "rocksdb.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lrocksdb-lite", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/database/tests:rocksdb_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("googletest", "gtest_headers"), - osquery_tp_target("rocksdb"), - ], -) - -osquery_cxx_library( - name = "sqlite_plugin", - srcs = [ - "sqlite.cpp", - ], - header_namespace = "plugins/database", - exported_headers = [ - "sqlite.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lsqlite3", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/database/tests:sqlite_plugin_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/utils:utils"), - osquery_tp_target("sqlite"), - ], -) diff --git a/plugins/database/tests/BUCK b/plugins/database/tests/BUCK deleted file mode 100644 index 9fe667eb116..00000000000 --- a/plugins/database/tests/BUCK +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_test( - name = "sqlite_plugin_tests", - srcs = [ - "sqlite.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/database:sqlite_plugin"), - osquery_target("specs:tables"), - ":database_test_utils", - ], -) - -osquery_cxx_test( - name = "rocksdb_tests", - srcs = [ - "rocksdb.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/database:database"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/json:json"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/database:rocksdb_plugin"), - osquery_target("specs:tables"), - ":database_test_utils", - ], -) - -osquery_cxx_library( - name = "database_test_utils", - srcs = [ - "utils.cpp", - ], - header_namespace = "plugins/database/tests", - exported_headers = [ - "utils.h", - ], - deps = [ - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils/json:json"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) diff --git a/plugins/distributed/BUCK b/plugins/distributed/BUCK deleted file mode 100644 index dc4a8e526fe..00000000000 --- a/plugins/distributed/BUCK +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "tls_distributed", - srcs = ["tls_distributed.cpp"], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/database:database"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/remote:utility"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/utils/json:json"), - ], -) diff --git a/plugins/logger/BUCK b/plugins/logger/BUCK deleted file mode 100644 index d45f10c07ee..00000000000 --- a/plugins/logger/BUCK +++ /dev/null @@ -1,329 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -common_deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/database:database"), - osquery_target("osquery/logger:logger"), - osquery_target("osquery/registry:registry"), - osquery_tp_target("glog"), - osquery_tp_target("gflags"), -] - -osquery_cxx_library( - name = "aws_firehose", - srcs = [ - "aws_firehose.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "aws_firehose.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/dispatcher:dispatcher"), - ":aws_log_forwarder", - ], -) - -osquery_cxx_library( - name = "aws_kinesis", - srcs = [ - "aws_kinesis.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "aws_kinesis.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/logger/tests:aws_kinesis_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery:headers"), - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/process:process"), - osquery_target("osquery/registry:registry"), - ":aws_log_forwarder", - ], -) - -osquery_cxx_library( - name = "aws_log_forwarder", - header_namespace = "plugins/logger", - exported_headers = [ - "aws_log_forwarder.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/utils/aws:aws"), - ":buffered", - ], -) - -osquery_cxx_library( - name = "buffered", - srcs = [ - "buffered.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "buffered.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/logger/tests:buffered_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = common_deps + [ - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/json:json"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config/parsers:parsers"), - ], -) - -osquery_cxx_library( - name = "filesystem_logger", - srcs = [ - "filesystem_logger.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "filesystem_logger.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/logger/tests:filesystem_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = common_deps + [ - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/utils/config:utils_config"), - ], -) - -osquery_cxx_library( - name = "kafka_producer", - header_namespace = "plugins/logger", - exported_platform_headers = [ - ( - LINUX, - [ - "kafka_producer.h", - ], - ), - ( - MACOSX, - [ - "kafka_producer.h", - ], - ), - ], - link_whole = True, - platform_srcs = [ - ( - LINUX, - [ - "kafka_producer.cpp", - ], - ), - ( - MACOSX, - [ - "kafka_producer.cpp", - ], - ), - ], - tests = [ - osquery_target("plugins/logger/tests:kafka_producer_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = common_deps + [ - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/utils/config:utils_config"), - osquery_tp_target("librdkafka"), - ], -) - -osquery_cxx_library( - name = "stdout", - srcs = [ - "stdout.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "stdout.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = common_deps, -) - -osquery_cxx_library( - name = "syslog", - header_namespace = "plugins/logger", - exported_platform_headers = [ - ( - POSIX, - [ - "syslog_logger.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - platform_srcs = [ - ( - POSIX, - [ - "syslog_logger.cpp", - ], - ), - ], - tests = [ - osquery_target("plugins/logger/tests:syslog_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = common_deps, -) - -osquery_cxx_library( - name = "tls_logger", - srcs = [ - "tls_logger.cpp", - ], - header_namespace = "plugins/logger", - exported_headers = [ - "tls_logger.h", - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - tests = [ - osquery_target("plugins/logger/tests:tls_logger_tests"), - ], - visibility = ["PUBLIC"], - deps = common_deps + [ - ":buffered", - osquery_target("osquery/dispatcher:dispatcher"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/remote:utility"), - osquery_target("plugins/config/parsers:parsers"), - ], -) - -osquery_cxx_library( - name = "windows_event_log", - header_namespace = "plugins/logger", - exported_platform_headers = [ - ( - WINDOWS, - [ - "generated_wel.h", - "windows_event_log.h", - ], - ), - ], - exported_post_platform_linker_flags = [ - ( - FREEBSD, - [ - "-lgflags", - "-lglog", - ], - ), - ], - link_whole = True, - platform_srcs = [ - ( - WINDOWS, - [ - "windows_event_log.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = common_deps, -) diff --git a/plugins/logger/tests/BUCK b/plugins/logger/tests/BUCK deleted file mode 100644 index 19e6effd9bb..00000000000 --- a/plugins/logger/tests/BUCK +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_test( - name = "filesystem_logger_tests", - srcs = [ - "filesystem_logger.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:filesystem_logger"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "buffered_logger_tests", - srcs = [ - "buffered_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:buffered"), - osquery_target("specs:tables"), - ], -) - -osquery_cxx_test( - name = "kafka_producer_logger_tests", - platform_srcs = [ - ( - LINUX, - [ - "kafka_producer_tests.cpp", - ], - ), - ( - MACOSX, - [ - "kafka_producer_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:kafka_producer"), - osquery_target("specs:tables"), - osquery_tp_target("gflags"), - ], -) - -osquery_cxx_test( - name = "aws_kinesis_logger_tests", - srcs = [ - "aws_kinesis_logger_tests.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/logger:aws_kinesis"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:buffered"), - osquery_target("specs:tables"), - osquery_tp_target("gflags"), - ], -) - -osquery_cxx_test( - name = "tls_logger_tests", - srcs = [ - "tls_logger_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:tls_logger"), - osquery_target("specs:tables"), - osquery_tp_target("gflags"), - osquery_target("osquery/remote/tests:remote_test_utils"), - ], -) - -osquery_cxx_test( - name = "syslog_logger_tests", - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - }, - platform_srcs = [ - ( - POSIX, - [ - "syslog_logger_tests.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/core/plugins:plugins"), - osquery_target("osquery/distributed:distributed"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/logger:data_logger"), - osquery_target("osquery/registry:registry"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/logger:syslog"), - osquery_target("specs:tables"), - osquery_tp_target("gflags"), - ], -) diff --git a/plugins/numeric_monitoring/BUCK b/plugins/numeric_monitoring/BUCK deleted file mode 100644 index 489bb0e9d50..00000000000 --- a/plugins/numeric_monitoring/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "numeric_monitoring_filesystem", - srcs = [ - "filesystem.cpp", - ], - header_namespace = "plugins/numeric_monitoring", - exported_headers = [ - "filesystem.h", - ], - link_whole = True, - tests = [ - osquery_target("plugins/numeric_monitoring/tests:numeric_monitoring_filesystem_tests"), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - ], -) diff --git a/plugins/numeric_monitoring/tests/BUCK b/plugins/numeric_monitoring/tests/BUCK deleted file mode 100644 index c46dfd5e96c..00000000000 --- a/plugins/numeric_monitoring/tests/BUCK +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_test( - name = "numeric_monitoring_filesystem_tests", - srcs = [ - "filesystem.cpp", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/numeric_monitoring:numeric_monitoring"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("plugins/numeric_monitoring:numeric_monitoring_filesystem"), - osquery_target("specs:tables"), - ], -) diff --git a/plugins/remote/enroll/BUCK b/plugins/remote/enroll/BUCK deleted file mode 100644 index f574ce3b2b5..00000000000 --- a/plugins/remote/enroll/BUCK +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") - -osquery_cxx_library( - name = "tls_enroll_plugin", - srcs = [ - "tls_enroll.cpp", - ], - header_namespace = "plugins/remote/enroll", - exported_headers = [ - "tls_enroll.h", - ], - tests = [ - osquery_target("plugins/remote/enroll/tests:tls_enroll_tests"), - ], - link_whole = True, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/remote/enroll:tls_enroll"), - ], -) diff --git a/plugins/remote/enroll/tests/BUCK b/plugins/remote/enroll/tests/BUCK deleted file mode 100644 index 39e6627a5bc..00000000000 --- a/plugins/remote/enroll/tests/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_read_config") - -osquery_cxx_test( - name = "tls_enroll_tests", - srcs = [ - "tls_enroll_tests.cpp", - ], - env = { - "TEST_CONF_FILES_DIR": "$(location {})".format( - osquery_target("tools/tests/configs:test_files"), - ), - "TEST_HELPER_SCRIPTS_DIR": "$(location {})".format( - osquery_target("tools/tests:python_script_files"), - ), - "OSQUERY_PYTHON_INTERPRETER_PATH": osquery_read_config("python#py3", "interpreter"), - }, - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/config:config"), - osquery_target("osquery/database:database"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery:headers"), - osquery_target("osquery/remote/tests:remote_test_utils"), - osquery_target("plugins/remote/enroll:tls_enroll_plugin"), - osquery_tp_target("gflags"), - ], -) \ No newline at end of file diff --git a/specs/BUCK b/specs/BUCK deleted file mode 100644 index 7e96a10ff5f..00000000000 --- a/specs/BUCK +++ /dev/null @@ -1,875 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:codegen.bzl", "osquery_gentable_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_filegroup", "osquery_target") - -osquery_filegroup( - name = "specs", - srcs = glob( - [ - "**/*.table", - ], - ), -) - -osquery_gentable_cxx_library( - name = "tables", - link_whole = True, - platform_spec_files = [ - ( - "arp_cache.table", - "linux,macos,windows", - ), - ( - "atom_packages.table", - "linux,macos", - ), - ( - "darwin/account_policy_data.table", - "macos", - ), - ( - "darwin/ad_config.table", - "macos", - ), - ( - "darwin/alf.table", - "macos", - ), - ( - "darwin/alf_exceptions.table", - "macos", - ), - ( - "darwin/alf_explicit_auths.table", - "macos", - ), - ( - "darwin/app_schemes.table", - "macos", - ), - ( - "darwin/apps.table", - "macos", - ), - ( - "darwin/asl.table", - "macos", - ), - ( - "darwin/authorization_mechanisms.table", - "macos", - ), - ( - "darwin/authorizations.table", - "macos", - ), - ( - "darwin/battery.table", - "macos", - ), - ( - "darwin/browser_plugins.table", - "macos", - ), - ( - "darwin/crashes.table", - "macos", - ), - ( - "darwin/cups_destinations.table", - "macos", - ), - ( - "darwin/cups_jobs.table", - "macos", - ), - ( - "darwin/device_firmware.table", - "macos", - ), - ( - "darwin/disk_events.table", - "macos", - ), - ( - "darwin/event_taps.table", - "macos", - ), - ( - "darwin/extended_attributes.table", - "macos", - ), - ( - "darwin/fan_speed_sensors.table", - "macos", - ), - ( - "darwin/gatekeeper.table", - "macos", - ), - ( - "darwin/gatekeeper_approved_apps.table", - "macos", - ), - ( - "darwin/homebrew_packages.table", - "macos", - ), - ( - "darwin/ibridge_info.table", - "macos", - ), - ( - "darwin/iokit_devicetree.table", - "macos", - ), - ( - "darwin/iokit_registry.table", - "macos", - ), - ( - "darwin/kernel_extensions.table", - "macos", - ), - ( - "darwin/kernel_panics.table", - "macos", - ), - ( - "darwin/keychain_acls.table", - "macos", - ), - ( - "darwin/keychain_items.table", - "macos", - ), - ( - "darwin/launchd.table", - "macos", - ), - ( - "darwin/launchd_overrides.table", - "macos", - ), - ( - "darwin/managed_policies.table", - "macos", - ), - ( - "darwin/mdfind.table", - "macos", - ), - ( - "darwin/nfs_shares.table", - "macos", - ), - ( - "darwin/nvram.table", - "macos", - ), - ( - "darwin/package_bom.table", - "macos", - ), - ( - "darwin/package_install_history.table", - "macos", - ), - ( - "darwin/package_receipts.table", - "macos", - ), - ( - "darwin/plist.table", - "macos", - ), - ( - "darwin/power_sensors.table", - "macos", - ), - ( - "darwin/preferences.table", - "macos", - ), - ( - "darwin/quicklook_cache.table", - "macos", - ), - ( - "darwin/running_apps.table", - "macos", - ), - ( - "darwin/safari_extensions.table", - "macos", - ), - ( - "darwin/sandboxes.table", - "macos", - ), - ( - "darwin/screenlock.table", - "macos", - ), - ( - "darwin/shared_folders.table", - "macos", - ), - ( - "darwin/sharing_preferences.table", - "macos", - ), - ( - "darwin/signature.table", - "macos", - ), - ( - "darwin/sip_config.table", - "macos", - ), - ( - "darwin/smc_keys.table", - "macos", - ), - ( - "darwin/temperature_sensors.table", - "macos", - ), - ( - "darwin/time_machine_backups.table", - "macos", - ), - ( - "darwin/time_machine_destinations.table", - "macos", - ), - ( - "darwin/user_interaction_events.table", - "macos", - ), - ( - "darwin/virtual_memory_info.table", - "macos", - ), - ( - "darwin/wifi_networks.table", - "macos", - ), - ( - "darwin/wifi_scan.table", - "macos", - ), - ( - "darwin/wifi_status.table", - "macos", - ), - ( - "darwin/xprotect_entries.table", - "macos", - ), - ( - "darwin/xprotect_meta.table", - "macos", - ), - ( - "darwin/xprotect_reports.table", - "macos", - ), - ( - "freebsd/fbsd_kmods.table", - "freebsd", - ), - ( - "freebsd/pkg_packages.table", - "freebsd", - ), - ( - "linux/selinux_events.table", - "linux", - ), - ( - "linux/elf_symbols.table", - "linux", - ), - ( - "linux/portage_use.table", - "linux", - ), - ( - "linux/rpm_package_files.table", - "linux", - ), - ( - "linux/shared_memory.table", - "linux", - ), - ( - "linux/iptables.table", - "linux", - ), - ( - "linux/portage_keywords.table", - "linux", - ), - ( - "linux/elf_segments.table", - "linux", - ), - ( - "linux/md_devices.table", - "linux", - ), - ( - "linux/process_namespaces.table", - "linux", - ), - ( - "linux/syslog_events.table", - "linux", - ), - ( - "linux/rpm_packages.table", - "linux", - ), - ( - "linux/portage_packages.table", - "linux", - ), - ( - "linux/process_file_events.table", - "linux", - ), - ( - "linux/md_drives.table", - "linux", - ), - ( - "linux/ec2_instance_tags.table", - "linux", - ), - ( - "linux/npm_packages.table", - "linux", - ), - ( - "linux/elf_info.table", - "linux", - ), - ( - "linux/md_personalities.table", - "linux", - ), - ( - "linux/kernel_modules.table", - "linux", - ), - ( - "linux/shadow.table", - "linux", - ), - ( - "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/ec2_instance_metadata.table", - "linux", - ), - ( - "linux/elf_sections.table", - "linux", - ), - ( - "linwin/intel_me_info.table", - "linux,windows", - ), - ( - "lldpd/lldp_neighbors.table", - "linux,macos,freebsd", - ), - ( - "kernel_info.table", - "linux,macos,windows", - ), - ( - "macwin/certificates.table", - "macos,windows", - ), - ( - "macwin/startup_items.table", - "macos,windows", - ), - ( - "posix/acpi_tables.table", - "linux,macos", - ), - ( - "posix/apt_sources.table", - "linux,macos,freebsd", - ), - ( - "posix/augeas.table", - "linux,macos,freebsd", - ), - ( - "posix/authorized_keys.table", - "linux,macos,freebsd", - ), - ( - "posix/block_devices.table", - "linux,macos", - ), - ( - "posix/cpu_time.table", - "linux,macos,freebsd", - ), - ( - "posix/crontab.table", - "linux,macos,freebsd", - ), - ( - "posix/disk_encryption.table", - "linux,macos", - ), - ( - "posix/dns_resolvers.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_labels.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_mounts.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_networks.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_ports.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_processes.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_container_stats.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_containers.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_image_labels.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_images.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_info.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_network_labels.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_networks.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_version.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_volume_labels.table", - "linux,macos,freebsd", - ), - ( - "posix/docker_volumes.table", - "linux,macos,freebsd", - ), - ( - "posix/file_events.table", - "linux,macos", - ), - ( - "posix/hardware_events.table", - "linux,macos", - ), - ( - "posix/interface_ipv6.table", - "linux,macos,freebsd", - ), - ( - "posix/known_hosts.table", - "linux,macos,freebsd", - ), - ( - "posix/last.table", - "linux,macos,freebsd", - ), - ( - "posix/load_average.table", - "linux,macos,freebsd", - ), - ( - "posix/magic.table", - "linux,macos,freebsd", - ), - ( - "posix/memory_array_mapped_addresses.table", - "linux,macos", - ), - ( - "posix/memory_arrays.table", - "linux,macos", - ), - ( - "posix/memory_device_mapped_addresses.table", - "linux,macos", - ), - ( - "posix/memory_devices.table", - "linux,macos", - ), - ( - "posix/memory_error_info.table", - "linux,macos", - ), - ( - "posix/mounts.table", - "linux,macos,freebsd", - ), - ( - "posix/oem_strings.table", - "linux,macos", - ), - ( - "posix/opera_extensions.table", - "linux,macos,freebsd", - ), - ( - "posix/pci_devices.table", - "linux,macos", - ), - ( - "posix/process_envs.table", - "linux,macos,freebsd", - ), - ( - "posix/process_events.table", - "linux,macos,freebsd", - ), - ( - "posix/process_open_files.table", - "linux,macos,freebsd", - ), - ( - "posix/prometheus_metrics.table", - "linux,macos,freebsd", - ), - ( - "posix/shell_history.table", - "linux,macos,freebsd", - ), - ( - "posix/smbios_tables.table", - "linux,macos", - ), - ( - "posix/socket_events.table", - "Linux,macos", - ), - ( - "posix/sudoers.table", - "linux,macos,freebsd", - ), - ( - "posix/suid_bin.table", - "linux,macos,freebsd", - ), - ( - "posix/system_controls.table", - "linux,macos,freebsd", - ), - ( - "posix/ulimit_info.table", - "linux,macos,freebsd", - ), - ( - "posix/usb_devices.table", - "linux,macos", - ), - ( - "posix/user_events.table", - "linux,macos,freebsd", - ), - ( - "posix/yum_sources.table", - "linux,macos,freebsd", - ), - ( - "sleuthkit/device_file.table", - "linux,macos,freebsd", - ), - ( - "sleuthkit/device_hash.table", - "linux,macos,freebsd", - ), - ( - "sleuthkit/device_partitions.table", - "linux,macos,freebsd", - ), - ( - "smart/smart_drive_info.table", - "linux,macos", - ), - ( - "user_groups.table", - "linux,macos,windows", - ), - ( - "windows/bitlocker_info.table", - "windows", - ), - ( - "windows/logon_sessions.table", - "windows", - ), - ( - "windows/ntfs_acl_permissions.table", - "windows", - ), - ( - "windows/scheduled_tasks.table", - "windows", - ), - ( - "windows/windows_crashes.table", - "windows", - ), - ( - "windows/services.table", - "windows", - ), - ( - "windows/kva_speculative_info.table", - "windows", - ), - ( - "windows/patches.table", - "windows", - ), - ( - "windows/ie_extensions.table", - "windows", - ), - ( - "windows/shared_resources.table", - "windows", - ), - ( - "windows/wmi_cli_event_consumers.table", - "windows", - ), - ( - "windows/video_info.table", - "windows", - ), - ( - "windows/registry.table", - "windows", - ), - ( - "windows/drivers.table", - "windows", - ), - ( - "windows/disk_info.table", - "windows", - ), - ( - "windows/chocolatey_packages.table", - "windows", - ), - ( - "windows/connectivity.table", - "windows", - ), - ( - "windows/logical_drives.table", - "windows", - ), - ( - "windows/ntdomains.table", - "windows", - ), - ( - "windows/authenticode.table", - "windows", - ), - ( - "windows/hvci_status.table", - "windows", - ), - ( - "windows/pipes.table", - "windows", - ), - ( - "windows/wmi_filter_consumer_binding.table", - "windows", - ), - ( - "windows/wmi_event_filters.table", - "windows", - ), - ( - "windows/windows_events.table", - "windows", - ), - ( - "windows/appcompat_shims.table", - "windows", - ), - ( - "windows/ntfs_journal_events.table", - "windows", - ), - ( - "windows/powershell_events.table", - "windows", - ), - ( - "windows/winbaseobj.table", - "windows", - ), - ( - "windows/cpu_info.table", - "windows", - ), - ( - "windows/wmi_bios_info.table", - "windows", - ), - ( - "windows/programs.table", - "windows", - ), - ( - "windows/wmi_script_event_consumers.table", - "windows", - ), - ( - "windows/physical_disk_performance.table", - "windows", - ), - ( - "windows/autoexec.table", - "windows", - ), - ( - "windows/default_environment.table", - "windows", - ), - ( - "windows/userassist.table", - "windows", - ), - ( - "yara/yara_events.table", - "linux,macos", - ), - ( - "yara/yara.table", - "linux,macos,freebsd", - ), - ( - "windows/windows_security_products.table", - "windows", - ), - ( - "windows/windows_security_center.table", - "windows", - ), - ( - "windows/windows_optional_features.table", - "windows", - ), - ], - spec_files = [ - "azure_instance_metadata.table", - "azure_instance_tags.table", - "carbon_black_info.table", - "carves.table", - "chrome_extensions.table", - "chrome_extension_content_scripts.table", - "cpuid.table", - "curl.table", - "curl_certificate.table", - "etc_hosts.table", - "etc_protocols.table", - "etc_services.table", - "firefox_addons.table", - "groups.table", - "hash.table", - "interface_addresses.table", - "interface_details.table", - "listening_ports.table", - "logged_in_users.table", - "os_version.table", - "platform_info.table", - "process_memory_map.table", - "process_open_sockets.table", - "processes.table", - "python_packages.table", - "routes.table", - "ssh_configs.table", - "system_info.table", - "uptime.table", - "user_ssh_keys.table", - "users.table", - "utility/file.table", - "utility/osquery_events.table", - "utility/osquery_extensions.table", - "utility/osquery_flags.table", - "utility/osquery_info.table", - "utility/osquery_packs.table", - "utility/osquery_registry.table", - "utility/osquery_schedule.table", - "utility/time.table", - ], - spec_location = "$(location {})".format(osquery_target("specs:specs")), - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/tables:table_implementations"), - ], -) diff --git a/tests/BUCK b/tests/BUCK deleted file mode 100644 index 75e5b4d47f7..00000000000 --- a/tests/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "helper", - srcs = [ - "test_util.cpp", - ], - header_namespace = "osquery/tests/", - exported_headers = [ - "test_util.h", - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/core:core"), - osquery_target("osquery/filesystem:osquery_filesystem"), - osquery_target("osquery/process:process"), - osquery_target("osquery/remote/serializers:serializer_json"), - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/system:time"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - osquery_tp_target("boost"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) diff --git a/tests/integration/tables/BUCK b/tests/integration/tables/BUCK deleted file mode 100644 index 1b31b4b8004..00000000000 --- a/tests/integration/tables/BUCK +++ /dev/null @@ -1,320 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target") -load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "LINUX", "MACOSX", "POSIX", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "integration_tests_helper", - srcs = [ - "helper.cpp", - ], - header_namespace = "osquery/tests/integration/tables", - exported_headers = [ - "helper.h", - ], - deps = [ - osquery_target("osquery/sql:sql"), - osquery_target("osquery/utils:utils"), - osquery_target("plugins/database:ephemeral"), - osquery_tp_target("boost"), - osquery_tp_target("googletest", "gtest_headers"), - ], -) - -osquery_cxx_test( - name = "tests", - srcs = [ - "carbon_black_info.cpp", - "carves.cpp", - "chrome_extensions.cpp", - "cpuid.cpp", - "curl.cpp", - "curl_certificate.cpp", - "etc_hosts.cpp", - "etc_protocols.cpp", - "etc_services.cpp", - "file.cpp", - "firefox_addons.cpp", - "groups.cpp", - "hash.cpp", - "interface_addresses.cpp", - "interface_details.cpp", - "listening_ports.cpp", - "logged_in_users.cpp", - "os_version.cpp", - "osquery_events.cpp", - "osquery_extensions.cpp", - "osquery_flags.cpp", - "osquery_info.cpp", - "osquery_packs.cpp", - "osquery_registry.cpp", - "osquery_schedule.cpp", - "platform_info.cpp", - "process_memory_map.cpp", - "process_open_sockets.cpp", - "processes.cpp", - "python_packages.cpp", - "routes.cpp", - "ssh_configs.cpp", - "system_info.cpp", - "time.cpp", - "uptime.cpp", - "user_groups.cpp", - "users.cpp", - "user_ssh_keys.cpp", - - ], - platform_srcs = [ - ( - LINUX, - [ - "arp_cache.cpp", - "atom_packages.cpp", - "deb_packages.cpp", - "ec2_instance_metadata.cpp", - "ec2_instance_tags.cpp", - "elf_dynamic.cpp", - "elf_info.cpp", - "elf_sections.cpp", - "elf_segments.cpp", - "elf_symbols.cpp", - "intel_me_info.cpp", - "iptables.cpp", - "kernel_info.cpp", - "kernel_modules.cpp", - "md_devices.cpp", - "md_drives.cpp", - "md_personalities.cpp", - "memory_info.cpp", - "memory_map.cpp", - "msr.cpp", - "npm_packages.cpp", - "portage_keywords.cpp", - "portage_packages.cpp", - "portage_use.cpp", - "process_file_events.cpp", - "process_namespaces.cpp", - "rpm_package_files.cpp", - "rpm_packages.cpp", - "selinux_events.cpp", - "shadow.cpp", - "shared_memory.cpp", - "smart_drive_info.cpp", - "socket_events.cpp", - "syslog_events.cpp", - "yara_events.cpp", - ], - ), - ( - FREEBSD, - [ - "fbsd_kmods.cpp", - "pkg_packages.cpp", - ], - ), - ( - POSIX, - [ - "acpi_tables.cpp", - "apt_sources.cpp", - "augeas.cpp", - "authorized_keys.cpp", - "block_devices.cpp", - "cpu_time.cpp", - "crontab.cpp", - "device_file.cpp", - "device_hash.cpp", - "device_partitions.cpp", - "disk_encryption.cpp", - "dns_resolvers.cpp", - "docker_container_labels.cpp", - "docker_container_mounts.cpp", - "docker_container_networks.cpp", - "docker_container_ports.cpp", - "docker_container_processes.cpp", - "docker_container_stats.cpp", - "docker_containers.cpp", - "docker_image_labels.cpp", - "docker_images.cpp", - "docker_info.cpp", - "docker_network_labels.cpp", - "docker_networks.cpp", - "docker_version.cpp", - "docker_volume_labels.cpp", - "docker_volumes.cpp", - "file_events.cpp", - "hardware_events.cpp", - "interface_ipv6.cpp", - "known_hosts.cpp", - "last.cpp", - "lldp_neighbors.cpp", - "load_average.cpp", - "magic.cpp", - "memory_array_mapped_addresses.cpp", - "memory_arrays.cpp", - "memory_device_mapped_addresses.cpp", - "memory_devices.cpp", - "memory_error_info.cpp", - "mounts.cpp", - "oem_strings.cpp", - "opera_extensions.cpp", - "pci_devices.cpp", - "process_envs.cpp", - "process_events.cpp", - "process_open_files.cpp", - "prometheus_metrics.cpp", - "shell_history.cpp", - "smbios_tables.cpp", - "sudoers.cpp", - "suid_bin.cpp", - "system_controls.cpp", - "ulimit_info.cpp", - "usb_devices.cpp", - "user_events.cpp", - "yara.cpp", - "yum_sources.cpp", - ], - ), - ( - MACOSX, - [ - "account_policy_data.cpp", - "ad_config.cpp", - "alf.cpp", - "alf_exceptions.cpp", - "alf_explicit_auths.cpp", - "alf_services.cpp", - "app_schemes.cpp", - "apps.cpp", - "arp_cache.cpp", - "asl.cpp", - "atom_packages.cpp", - "authorization_mechanisms.cpp", - "authorizations.cpp", - "battery.cpp", - "browser_plugins.cpp", - "certificates.cpp", - "crashes.cpp", - "cups_destinations.cpp", - "cups_jobs.cpp", - "device_firmware.cpp", - "disk_events.cpp", - "event_taps.cpp", - "extended_attributes.cpp", - "fan_speed_sensors.cpp", - "gatekeeper.cpp", - "gatekeeper_approved_apps.cpp", - "homebrew_packages.cpp", - "ibridge.cpp", - "iokit_devicetree.cpp", - "iokit_registry.cpp", - "kernel_extensions.cpp", - "kernel_info.cpp", - "kernel_panics.cpp", - "keychain_acls.cpp", - "keychain_items.cpp", - "launchd.cpp", - "launchd_overrides.cpp", - "managed_policies.cpp", - "mdfind.cpp", - "nfs_shares.cpp", - "nvram.cpp", - "package_bom.cpp", - "package_install_history.cpp", - "package_receipts.cpp", - "plist.cpp", - "power_sensors.cpp", - "preferences.cpp", - "quicklook_cache.cpp", - "running_apps.cpp", - "safari_extensions.cpp", - "sandboxes.cpp", - "shared_folders.cpp", - "sharing_preferences.cpp", - "signature.cpp", - "sip_config.cpp", - "smart_drive_info.cpp", - "smc_keys.cpp", - "startup_items.cpp", - "temperature_sensors.cpp", - "time_machine_backups.cpp", - "time_machine_destinations.cpp", - "user_interaction_events.cpp", - "virtual_memory_info.cpp", - "wifi_networks.cpp", - "wifi_status.cpp", - "wifi_survey.cpp", - "xprotect_entries.cpp", - "xprotect_meta.cpp", - "xprotect_reports.cpp", - "yara_events.cpp", - ], - ), - ( - WINDOWS, - [ - "appcompat_shims.cpp", - "arp_cache.cpp", - "authenticode.cpp", - "autoexec.cpp", - "bitlocker_info.cpp", - "certificates.cpp", - "chocolatey_packages.cpp", - "connectivity.cpp", - "cpu_info.cpp", - "default_environment.cpp", - "disk_info.cpp", - "drivers.cpp", - "ie_extensions.cpp", - "intel_me_info.cpp", - "kernel_info.cpp", - "kva_speculative_info.cpp", - "logical_drives.cpp", - "logon_sessions.cpp", - "ntdomains.cpp", - "ntfs_acl_permissions.cpp", - "patches.cpp", - "physical_disk_performance.cpp", - "pipes.cpp", - "powershell_events.cpp", - "programs.cpp", - "registry.cpp", - "scheduled_tasks.cpp", - "services.cpp", - "shared_resources.cpp", - "startup_items.cpp", - "userassist.cpp", - "video_info.cpp", - "winbaseobj.cpp", - "windows_crashes.cpp", - "windows_events.cpp", - "wmi_bios_info.cpp", - "wmi_cli_event_consumers.cpp", - "wmi_event_filters.cpp", - "wmi_filter_consumer_binding.cpp", - "wmi_script_event_consumers.cpp", - "windows_security_products.cpp", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - osquery_target("osquery/database:database"), - osquery_target("osquery/events:events"), - osquery_target("osquery/extensions:extensions"), - osquery_target("osquery/extensions:impl_thrift"), - osquery_target("osquery/remote/enroll:tls_enroll"), - osquery_target("osquery/utils/conversions:conversions"), - osquery_target("osquery/utils/info:info"), - osquery_target("plugins/config:tls_config"), - osquery_target("plugins/database:ephemeral"), - osquery_target("specs:tables"), - ":integration_tests_helper", - ], -) diff --git a/third-party/augeas/BUCK b/third-party/augeas/BUCK deleted file mode 100644 index fc87dd41330..00000000000 --- a/third-party/augeas/BUCK +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "augeas", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "ff21a672ec7d6ae313eabe32a458d2d4528ad086559a24e9d70638da10983b37", - "macos-x86_64": "7330e0fcfbcea6f58d199916238c47078f3ea2ba85ac4ed2fa74fcb63e034b1c", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libaugeas.a", - "lib/libfa.a", - ], - "macos-x86_64": [ - "lib/libaugeas.a", - "lib/libfa.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.9.0", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/augeas/osquery.library b/third-party/augeas/osquery.library deleted file mode 100644 index f29ba2f05e8..00000000000 --- a/third-party/augeas/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "augeas", - version = "1.9.0", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/aws-sdk-cpp/BUCK b/third-party/aws-sdk-cpp/BUCK deleted file mode 100644 index 9c6be15e936..00000000000 --- a/third-party/aws-sdk-cpp/BUCK +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "aws-sdk-cpp", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "38d8ab7feccc25ba89adb49ffbcbe8c9b274191f2eb9172371c94f2ceb5a1159", - "macos-x86_64": "1d1974a6bb22dbe40ebd98547e775364357e65e81cda52b6fb2485250fdd15ba", - "windows-x86_64": "71b575fc0ade0ae22239c4bdb2ba2f09a90d67c44425196aaffc96a14cb9a4fc", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libaws-cpp-sdk-core.a", - "lib/libaws-cpp-sdk-ec2.a", - "lib/libaws-cpp-sdk-firehose.a", - "lib/libaws-cpp-sdk-kinesis.a", - "lib/libaws-cpp-sdk-sts.a", - "lib/libtesting-resources.a", - ], - "macos-x86_64": [ - "lib/libaws-cpp-sdk-core.a", - "lib/libaws-cpp-sdk-ec2.a", - "lib/libaws-cpp-sdk-firehose.a", - "lib/libaws-cpp-sdk-kinesis.a", - "lib/libaws-cpp-sdk-sts.a", - "lib/libtesting-resources.a", - ], - "windows-x86_64": [ - "lib/aws-cpp-sdk-core.lib", - "lib/aws-cpp-sdk-ec2.lib", - "lib/aws-cpp-sdk-firehose.lib", - "lib/aws-cpp-sdk-kinesis.lib", - "lib/aws-cpp-sdk-sts.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.4.55", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/aws-sdk-cpp/osquery.library b/third-party/aws-sdk-cpp/osquery.library deleted file mode 100644 index 02c72f2b083..00000000000 --- a/third-party/aws-sdk-cpp/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "aws-sdk-cpp", - version = "1.4.55", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/berkeley-db/BUCK b/third-party/berkeley-db/BUCK deleted file mode 100644 index 02ccccd1344..00000000000 --- a/third-party/berkeley-db/BUCK +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "db", - exported_deps = [ - ":berkeley-db", - ], - visibility = ["PUBLIC"], -) - -osquery_tp_prebuilt_cxx_library( - name = "berkeley-db", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "793ab1515833c680ef3054f6a16781fa766699395ffbb6810635d36f2e8f6cb0", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libdb.a", - "lib/libdb_cxx.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "5.3.28", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/berkeley-db/osquery.library b/third-party/berkeley-db/osquery.library deleted file mode 100644 index 6491e7e69ac..00000000000 --- a/third-party/berkeley-db/osquery.library +++ /dev/null @@ -1,13 +0,0 @@ -library( - name = "berkeley-db", - version = "5.3.28", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], - alias = [ - "db", - ], -) diff --git a/third-party/boost/BUCK b/third-party/boost/BUCK deleted file mode 100644 index e0d28663ae4..00000000000 --- a/third-party/boost/BUCK +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "boost", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "3a24d65730beb3a718ee443eaedac40033d349582eeb83664ea2529080c812ba", - "macos-x86_64": "69c884d27838a11f9a45b78e03eb12a425d554dac4ad8c6ef19f91e63e945286", - "windows-x86_64": "5530174b75b67c3c8e59f2ae62c3e18fea1b5e55c795ff19b40fb75cf93dfb51", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libboost_chrono-mt.a", - "lib/libboost_context-mt.a", - "lib/libboost_coroutine-mt.a", - "lib/libboost_filesystem-mt.a", - "lib/libboost_regex-mt.a", - "lib/libboost_system-mt.a", - "lib/libboost_thread-mt.a", - ], - "macos-x86_64": [ - "lib/libboost_chrono-mt.a", - "lib/libboost_context-mt.a", - "lib/libboost_coroutine-mt.a", - "lib/libboost_filesystem-mt.a", - "lib/libboost_regex-mt.a", - "lib/libboost_system-mt.a", - "lib/libboost_thread-mt.a", - ], - "windows-x86_64": [ - "lib/libboost_chrono-mt-s.lib", - "lib/libboost_context-mt-s.lib", - "lib/libboost_coroutine-mt-s.lib", - "lib/libboost_filesystem-mt-s.lib", - "lib/libboost_regex-mt-s.lib", - "lib/libboost_system-mt-s.lib", - "lib/libboost_thread-mt-s.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.66.0", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/boost/osquery.library b/third-party/boost/osquery.library deleted file mode 100644 index c258bff4ab9..00000000000 --- a/third-party/boost/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "boost", - version = "1.66.0", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/bzip2/BUCK b/third-party/bzip2/BUCK deleted file mode 100644 index b842dfcc8fc..00000000000 --- a/third-party/bzip2/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "bzip2", - platforms = [ - "linux-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "1cc3eaf8fe78f19fcae9f71065b04bd2dedb4862081f1d1c96e0668f3df864c8", - "windows-x86_64": "11001b5e353bc255a755284b9ed8baed01b6d9fe2a63e5e325124e8b998d48c2", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libbz2.a", - ], - "windows-x86_64": [ - "lib/libbz2.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.0.6", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/bzip2/osquery.library b/third-party/bzip2/osquery.library deleted file mode 100644 index 57eca071fb6..00000000000 --- a/third-party/bzip2/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "bzip2", - version = "1.0.6", - build = 0, - platforms = [ - "linux-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/gflags/BUCK b/third-party/gflags/BUCK deleted file mode 100644 index a439feb0789..00000000000 --- a/third-party/gflags/BUCK +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "gflags", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "5e0813ea29d5ba739c089ae21dccf5b7d4ec6f7a7d9550da0834476fade2b60c", - "macos-x86_64": "217fd2573443981bc8e521fcf4d8201ba4d3c29cace1b9a537f94be08df7ebb6", - "windows-x86_64": "a7bb0676d7ac0338cfa71f48f5e0d83332470e1fcd0223aa697f1a0fd2e0789a", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libgflags.a", - "lib/libgflags_nothreads.a", - ], - "macos-x86_64": [ - "lib/libgflags.a", - "lib/libgflags_nothreads.a", - ], - "windows-x86_64": [ - "lib/gflags_static.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.2.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/gflags/osquery.library b/third-party/gflags/osquery.library deleted file mode 100644 index 296abc5a8f9..00000000000 --- a/third-party/gflags/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "gflags", - version = "2.2.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/glibc/BUCK b/third-party/glibc/BUCK deleted file mode 100644 index 7e6fc8af409..00000000000 --- a/third-party/glibc/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX") - -osquery_cxx_library( - name = "dl", - exported_platform_linker_flags = [ - ( - POSIX, - [ - "-ldl", - ], - ), - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "pthread", - exported_platform_linker_flags = [ - ( - LINUX, - ["-pthread"], - ), - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "resolv", - exported_platform_linker_flags = [ - ( - LINUX, - ["-lresolv"], - ), - ( - MACOSX, - ["-lresolv"], - ), - ], - external = True, - visibility = ["PUBLIC"], -) diff --git a/third-party/glog/BUCK b/third-party/glog/BUCK deleted file mode 100644 index 61c097530f2..00000000000 --- a/third-party/glog/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "glog", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "1291104355f4373f22294d86eeb2e612d03ea1adbf7cbaef2083ca730e9df60c", - "macos-x86_64": "91ccd947175a029da61447cc2f871798dc3756bc3adfc178cc782e4714e5a712", - "windows-x86_64": "7c25024502db7e5ffaa0d7e851450946b9193fb093b815692763b619b4d55723", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libglog.a", - ], - "macos-x86_64": [ - "lib/libglog.a", - ], - "windows-x86_64": [ - "lib/glog.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("gflags", "gflags"), - ], - version = "0.3.5", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/glog/osquery.library b/third-party/glog/osquery.library deleted file mode 100644 index be80dadf6bc..00000000000 --- a/third-party/glog/osquery.library +++ /dev/null @@ -1,13 +0,0 @@ -library( - name = "glog", - version = "0.3.5", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - "gflags:gflags", - ], -) diff --git a/third-party/googletest/BUCK b/third-party/googletest/BUCK deleted file mode 100644 index 13b791ffacd..00000000000 --- a/third-party/googletest/BUCK +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_genrule", "osquery_http_archive") -load("//tools/build_defs/oss/osquery:platforms.bzl", "WINDOWS") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_http_archive( - name = "archive", - sha256 = "9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c", - type = "tar.gz", - urls = [ - "https://s3.amazonaws.com/osquery-packages/third-party/src/gtest-1.8.1.tar.gz", - ], -) - -osquery_genrule( - name = "gtest_src_dir", - out = "gtest", - cmd = ( - "mkdir ${OUT} " + - "&& ln -sf $(location :archive)/googletest-release-1.8.1/googletest/src ${OUT}/src" - ), - cmd_exe = ( - "mkdir %OUT% " + - "&& mklink /D %OUT%\src $(location :archive)\googletest-release-1.8.1\googletest\src" - ), -) - -osquery_prebuilt_cxx_library( - name = "gtest_src", - header_namespace = "", - header_dirs = [ - ":gtest_src_dir", - ], - header_only = True, -) - -osquery_genrule( - name = "gtest_include_dir", - out = "include", - cmd = "ln -sf $(location :archive)/googletest-release-1.8.1/googletest/include $OUT", - cmd_exe = "mklink /D %OUT% $(location :archive)\googletest-release-1.8.1\googletest\include", -) - -osquery_prebuilt_cxx_library( - name = "gtest_headers", - header_namespace = "gtest", - header_dirs = [ - ":gtest_include_dir", - ], - header_only = True, - visibility = ["PUBLIC"], -) - -osquery_genrule( - name = "gtest-all", - out = "gtest-all.cc", - cmd = "ln -s $(location :archive)/googletest-release-1.8.1/googletest/src/gtest-all.cc ${OUT}", - cmd_exe = "mklink %OUT% $(location :archive)\googletest-release-1.8.1\googletest\src\gtest-all.cc", -) - -osquery_genrule( - name = "gtest_main", - out = "gtest_main.cc", - cmd = "ln -s $(location :archive)/googletest-release-1.8.1/googletest/src/gtest_main.cc ${OUT}", - cmd_exe = "mklink %OUT% $(location :archive)\googletest-release-1.8.1\googletest\src\gtest_main.cc", -) - -osquery_genrule( - name = "gmock_src_dir", - out = "src", - cmd = ( - "mkdir ${OUT} " + - "&& ln -sf $(location :archive)/googletest-release-1.8.1/googlemock/src ${OUT}/src" - ), - cmd_exe = ( - "mkdir %OUT% " + - "&& mklink /D %OUT%\src $(location :archive)\googletest-release-1.8.1\googlemock\src" - ), -) - -osquery_prebuilt_cxx_library( - name = "gmock_src", - header_namespace = "", - header_dirs = [ - ":gmock_src_dir", - ], - header_only = True, -) - -osquery_genrule( - name = "gmock_include_dir", - out = "include", - cmd = "ln -sf $(location :archive)/googletest-release-1.8.1/googlemock/include $OUT", - cmd_exe = "mklink /D %OUT% $(location :archive)\googletest-release-1.8.1\googlemock\include", -) - -osquery_prebuilt_cxx_library( - name = "gmock_headers", - header_namespace = "gmock", - header_dirs = [ - ":gmock_include_dir", - ], - header_only = True, - visibility = ["PUBLIC"], -) - -osquery_genrule( - name = "gmock-all", - out = "gmock-all.cc", - cmd = "ln -s $(location :archive)/googletest-release-1.8.1/googlemock/src/gmock-all.cc ${OUT}", - cmd_exe = "mklink %OUT% $(location :archive)\googletest-release-1.8.1\googlemock\src\gmock-all.cc", -) - -osquery_cxx_library( - name = "gtest", - srcs = [ - ":gmock-all", - ":gtest-all", - ":gtest_main", - ], - exported_preprocessor_flags = [ - "-DGTEST_USE_OWN_TR1_TUPLE=0", - "-DGTEST_HAS_TR1_TUPLE=0", - ], - external = True, - platform_compiler_flags = [ - ( - WINDOWS, - [ - "/EHsc", - ], - ), - ], - visibility = ["PUBLIC"], - deps = [ - ":gmock_src", - ":gtest_src", - osquery_tp_target("glibc", "pthread"), - ], - exported_deps = [ - ":gmock_headers", - ":gtest_headers", - ], -) diff --git a/third-party/jinja2/BUCK b/third-party/jinja2/BUCK deleted file mode 100644 index 3dd248b32ad..00000000000 --- a/third-party/jinja2/BUCK +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_python_library", "osquery_tp_target") - -osquery_tp_prebuilt_python_library( - name = "jinja2", - filenames = { - "none": "Jinja2-2.10-py2.py3-none-any.whl", - }, - platforms = [ - "none", - ], - sha1sums = { - "none": "f14bb3e5021b2b0605dcd4865ac539cde04fe856", - }, - deps = [ - osquery_tp_target("markupsafe"), - ], -) diff --git a/third-party/libarchive/BUCK b/third-party/libarchive/BUCK deleted file mode 100644 index 3a92ece0333..00000000000 --- a/third-party/libarchive/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libarchive", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "6818c2d6c8067918365cb81992f7853b100ef3244b8767bf2d182a1974f225a3", - "macos-x86_64": "a3ec7af1618116fca2008838ef18d2028148b34e215c748da3f25e4053bfe6e8", - "windows-x86_64": "cb1fc7e7ed1c652d7c322f629145749a60586eb8ec033a76025a04f4a42117a5", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libarchive.a", - ], - "macos-x86_64": [ - "lib/libarchive.a", - ], - "windows-x86_64": [ - "lib/archive_static.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "3.3.2", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libarchive/osquery.library b/third-party/libarchive/osquery.library deleted file mode 100644 index c3d3680d627..00000000000 --- a/third-party/libarchive/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "libarchive", - version = "3.3.2", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libaudit/BUCK b/third-party/libaudit/BUCK deleted file mode 100644 index bc625f9eb38..00000000000 --- a/third-party/libaudit/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libaudit", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "4e87a234f68eb8686ab3fa9096ffd664a899efc8e7839c767abd60ac956f6688", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libaudit.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.4.2", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libaudit/osquery.library b/third-party/libaudit/osquery.library deleted file mode 100644 index 63603c931b0..00000000000 --- a/third-party/libaudit/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libaudit", - version = "2.4.2", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libcryptsetup/BUCK b/third-party/libcryptsetup/BUCK deleted file mode 100644 index 7622809b974..00000000000 --- a/third-party/libcryptsetup/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libcryptsetup", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "ebb53650592212d67ea8c0e49b48891eec64ef370743678881985490c09adeac", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libcryptsetup.a", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("libgcrypt", "libgcrypt"), - ], - version = "1.7.5", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libcryptsetup/osquery.library b/third-party/libcryptsetup/osquery.library deleted file mode 100644 index a96878278a1..00000000000 --- a/third-party/libcryptsetup/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "libcryptsetup", - version = "1.7.5", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - "libgcrypt:libgcrypt", - ], -) diff --git a/third-party/libdevmapper/BUCK b/third-party/libdevmapper/BUCK deleted file mode 100644 index 853cece82d9..00000000000 --- a/third-party/libdevmapper/BUCK +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libdevmapper", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "54fc7a991f42e3693fa3aa9cafe39f0b65a6fe29620f3146fd05f1a1f1bf1eae", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libdaemonclient.a", - "lib/libdevmapper.a", - "lib/liblvm-internal.a", - "lib/liblvm2app.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.2.02.173", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libdevmapper/osquery.library b/third-party/libdevmapper/osquery.library deleted file mode 100644 index 71bcbcf0693..00000000000 --- a/third-party/libdevmapper/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libdevmapper", - version = "2.2.02.173", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libdpkg/BUCK b/third-party/libdpkg/BUCK deleted file mode 100644 index dc959d7d37e..00000000000 --- a/third-party/libdpkg/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libdpkg", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "9bd06978cf7caaa68bd607ac817c2fd0f436659a9620f6e8bf0281c4f3106799", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libdpkg.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.19.0.5", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libdpkg/osquery.library b/third-party/libdpkg/osquery.library deleted file mode 100644 index c8915118457..00000000000 --- a/third-party/libdpkg/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libdpkg", - version = "1.19.0.5", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libelfin/BUCK b/third-party/libelfin/BUCK deleted file mode 100644 index 68afa530bd9..00000000000 --- a/third-party/libelfin/BUCK +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "dwarf", - exported_deps = [ - ":libelfin", - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "elf", - exported_deps = [ - ":libelfin", - ], - visibility = ["PUBLIC"], -) - -osquery_tp_prebuilt_cxx_library( - name = "libelfin", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "d3f6611493558a38796072a5464e0c261e6651b5630b51459d9d98dec7d052c9", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libdwarf++.a", - "lib/libelf++.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "0.3", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libelfin/osquery.library b/third-party/libelfin/osquery.library deleted file mode 100644 index 218e68a4ae3..00000000000 --- a/third-party/libelfin/osquery.library +++ /dev/null @@ -1,14 +0,0 @@ -library( - name = "libelfin", - version = "0.3", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], - alias = [ - "dwarf", - "elf", - ], -) diff --git a/third-party/libgcrypt/BUCK b/third-party/libgcrypt/BUCK deleted file mode 100644 index d19c8da0a05..00000000000 --- a/third-party/libgcrypt/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libgcrypt", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "338bb77bac1565319f69a210db5b50e0410046628b05f9c5ed3521607cbbf711", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libgcrypt.a", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("libgpg-error", "libgpg-error"), - ], - version = "1.8.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libgcrypt/osquery.library b/third-party/libgcrypt/osquery.library deleted file mode 100644 index 46f922fb1b1..00000000000 --- a/third-party/libgcrypt/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "libgcrypt", - version = "1.8.1", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - "libgpg-error:libgpg-error", - ], -) diff --git a/third-party/libgpg-error/BUCK b/third-party/libgpg-error/BUCK deleted file mode 100644 index 3955be2e0d4..00000000000 --- a/third-party/libgpg-error/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libgpg-error", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "6976db62b22844015e934f7225b236c8c4851c515815efa9967575eadd6dabf5", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libgpg-error.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.27", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libgpg-error/osquery.library b/third-party/libgpg-error/osquery.library deleted file mode 100644 index de09d889bc4..00000000000 --- a/third-party/libgpg-error/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libgpg-error", - version = "1.27", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libiptables/BUCK b/third-party/libiptables/BUCK deleted file mode 100644 index 1e0f0ee9ae4..00000000000 --- a/third-party/libiptables/BUCK +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libiptables", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "f32841cca13b8273f767d859b6c98f6fe7fea05cfc835ff192c794a5d417ba26", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libip4tc.a", - "lib/libip6tc.a", - "lib/libiptc.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.8.0", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libiptables/osquery.library b/third-party/libiptables/osquery.library deleted file mode 100644 index 26b11bbe2e6..00000000000 --- a/third-party/libiptables/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libiptables", - version = "1.8.0", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libmagic/BUCK b/third-party/libmagic/BUCK deleted file mode 100644 index a0d80d098e8..00000000000 --- a/third-party/libmagic/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libmagic", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "e6c7144360b29d672db7a98cdfe55dc80812c2100b4a111d65f98e78404835aa", - "macos-x86_64": "66efdaf945b8d04751aa337ef0529ded53fcd7e3b85fb8dfd9e4c40a562ffa6d", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libmagic.a", - ], - "macos-x86_64": [ - "lib/libmagic.a", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("zlib", "zlib"), - ], - version = "5.32", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libmagic/osquery.library b/third-party/libmagic/osquery.library deleted file mode 100644 index bcd881027ee..00000000000 --- a/third-party/libmagic/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "libmagic", - version = "5.32", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - "zlib:zlib", - ], -) diff --git a/third-party/librdkafka/BUCK b/third-party/librdkafka/BUCK deleted file mode 100644 index 3c6d8ca1317..00000000000 --- a/third-party/librdkafka/BUCK +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "librdkafka", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "a8cece2c04522243ee53fd85130c4c6e2874ba27261bef554e74afed7425641b", - "macos-x86_64": "61790b76923d0005734db6209d99cd2c262cf2227500261244c208918e8b79b7", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/librdkafka++.a", - "lib/librdkafka.a", - ], - "macos-x86_64": [ - "lib/librdkafka++.a", - "lib/librdkafka.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "0.11.3", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/librdkafka/osquery.library b/third-party/librdkafka/osquery.library deleted file mode 100644 index b4503017d42..00000000000 --- a/third-party/librdkafka/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "librdkafka", - version = "0.11.3", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/librpm/BUCK b/third-party/librpm/BUCK deleted file mode 100644 index f5929d5fd15..00000000000 --- a/third-party/librpm/BUCK +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "librpm", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "5aca71879ab793c1029684dfa59baec462584ba3f4e3f6444c374b160b5afde8", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/librpm.a", - "lib/librpmbuild.a", - "lib/librpmio.a", - "lib/librpmsign.a", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("berkeley-db", "db"), - osquery_tp_target("bzip2", "bzip2"), - osquery_tp_target("lzma", "lzma"), - osquery_tp_target("openssl", "crypto"), - osquery_tp_target("openssl", "ssl"), - osquery_tp_target("popt", "popt"), - osquery_tp_target("zlib", "zlib"), - ], - version = "4.14.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/librpm/osquery.library b/third-party/librpm/osquery.library deleted file mode 100644 index 08d873c88b7..00000000000 --- a/third-party/librpm/osquery.library +++ /dev/null @@ -1,17 +0,0 @@ -library( - name = "librpm", - version = "4.14.1", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - "berkeley-db:db", - "bzip2:bzip2", - "lzma:lzma", - "openssl:crypto", - "openssl:ssl", - "popt:popt", - "zlib:zlib", - ], -) diff --git a/third-party/libudev/BUCK b/third-party/libudev/BUCK deleted file mode 100644 index e1618759af3..00000000000 --- a/third-party/libudev/BUCK +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libudev", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "fc1483fa27cb92876661e453bceef0c5752e4dbe83074a1653928ce44078aa34", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libudev.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "173", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libudev/osquery.library b/third-party/libudev/osquery.library deleted file mode 100644 index c767944d344..00000000000 --- a/third-party/libudev/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "libudev", - version = "173", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/libxml2/BUCK b/third-party/libxml2/BUCK deleted file mode 100644 index 44444cc1b4d..00000000000 --- a/third-party/libxml2/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "libxml2", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "40f341caf6442347a130e614f7d1be3193656b7c5ad86a644a87f3b15282f7bf", - "macos-x86_64": "15c240f914a430036847d19f18be54b86d0c78d54eff601f9b036b63481b420e", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libxml2.a", - ], - "macos-x86_64": [ - "lib/libxml2.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.9.7", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/libxml2/osquery.library b/third-party/libxml2/osquery.library deleted file mode 100644 index 0fcc7b25633..00000000000 --- a/third-party/libxml2/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "libxml2", - version = "2.9.7", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/linenoise-ng/BUCK b/third-party/linenoise-ng/BUCK deleted file mode 100644 index f1edecaff53..00000000000 --- a/third-party/linenoise-ng/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "linenoise-ng", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "604e50db04ab61ef592bcb96941bb30b67e976ac5487f904eab6927d96b9f5e9", - "macos-x86_64": "78030ddb7041e86cfdd8db60bf446a147fb4c82959319597b09dcf0877337cf9", - "windows-x86_64": "6dbc0acd2c2c02a93136c5a673f87463e3f619ee07fa6b20c5806a2d5bef7c05", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/liblinenoise.a", - ], - "macos-x86_64": [ - "lib/liblinenoise.a", - ], - "windows-x86_64": [ - "lib/linenoise.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.0.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/linenoise-ng/osquery.library b/third-party/linenoise-ng/osquery.library deleted file mode 100644 index f3993810f45..00000000000 --- a/third-party/linenoise-ng/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "linenoise-ng", - version = "1.0.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/lldpd/BUCK b/third-party/lldpd/BUCK deleted file mode 100644 index 80dcac608f8..00000000000 --- a/third-party/lldpd/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "lldpd", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "27c0b6e6faf1863db025b95e8217e715cffc51b960b1d09e8fe9235b5ef203d8", - "macos-x86_64": "f9d5d5c0c2514e7d51914ffc747a068b8a82602ca62e44b65f02857f015e0d3f", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/liblldpctl.a", - ], - "macos-x86_64": [ - "lib/liblldpctl.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "0.9.6", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/lldpd/osquery.library b/third-party/lldpd/osquery.library deleted file mode 100644 index c2a8a9734b3..00000000000 --- a/third-party/lldpd/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "lldpd", - version = "0.9.6", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/lzma/BUCK b/third-party/lzma/BUCK deleted file mode 100644 index 8bb0cd52f02..00000000000 --- a/third-party/lzma/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX") - -osquery_cxx_library( - name = "lzma", - exported_platform_linker_flags = [ - ( - LINUX, - [ - "-llzma", - ], - ), - ], - visibility = ["PUBLIC"], -) diff --git a/third-party/markupsafe/BUCK b/third-party/markupsafe/BUCK deleted file mode 100644 index 555f61c8f81..00000000000 --- a/third-party/markupsafe/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_python_library") - -osquery_tp_prebuilt_python_library( - name = "markupsafe", - filenames = { - "freebsd-x86_64": "py36-MarkupSafe-1.0.zip", - "linux-x86_64": "MarkupSafe-1.1.0-cp37-cp37m-manylinux1_x86_64.whl", - "macos-x86_64": "MarkupSafe-1.1.0-cp37-cp37m-macosx_10_6_intel.whl", - "windows-x86_64": "MarkupSafe-1.1.0-cp36-cp36m-win_amd64.whl", - }, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "freebsd-x86_64", - "windows-x86_64", - ], - sha1sums = { - "freebsd-x86_64": "925a0b34f901f99aeadd4d91a1dd676b3eed494f", - "linux-x86_64": "17ad72c7ce71a33144455048af1a5a3538ca1750", - "macos-x86_64": "eb3e78cf203e2cd0eaa406ccf157cb613f9f28d8", - "windows-x86_64": "0bbf7dc728394c47e375cb62e6690ab8cc5fa396", - }, -) diff --git a/third-party/openssl/BUCK b/third-party/openssl/BUCK deleted file mode 100644 index db7d23b1a38..00000000000 --- a/third-party/openssl/BUCK +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "ssl", - exported_deps = [ - ":openssl", - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "crypto", - exported_deps = [ - ":openssl", - ], - visibility = ["PUBLIC"], -) - -osquery_tp_prebuilt_cxx_library( - name = "openssl", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "73472b9cf2d050b3cdda404144d28244b52d89b538b82de95acaaa98e282a1ea", - "macos-x86_64": "39c59c34a497b365af0895de2b3e65e89c03f14c846084902ad3a77f943c3457", - "windows-x86_64": "71144e5754cb19c32bad2ba298a3cf24e3fde4a012334c622c84e9a8cdc91ef8", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libcrypto.a", - "lib/libssl.a", - ], - "macos-x86_64": [ - "lib/libcrypto.a", - "lib/libssl.a", - ], - "windows-x86_64": [ - "lib/libeay32.lib", - "lib/ssleay32.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.0.2o", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/openssl/osquery.library b/third-party/openssl/osquery.library deleted file mode 100644 index a704c54664d..00000000000 --- a/third-party/openssl/osquery.library +++ /dev/null @@ -1,16 +0,0 @@ -library( - name = "openssl", - version = "1.0.2o", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], - alias = [ - "ssl", - "crypto", - ], -) diff --git a/third-party/popt/BUCK b/third-party/popt/BUCK deleted file mode 100644 index 59cc331d66e..00000000000 --- a/third-party/popt/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "popt", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "3a328038dc908d8912983100b675333207780f6239a10433a78e365f80e8d3bf", - "macos-x86_64": "09ef8458657814af24d60968af57800af7f2896175a235c9b2776772be9171e9", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libpopt.a", - ], - "macos-x86_64": [ - "lib/libpopt.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.16", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/popt/osquery.library b/third-party/popt/osquery.library deleted file mode 100644 index 82bc0775d54..00000000000 --- a/third-party/popt/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "popt", - version = "1.16", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/rapidjson/BUCK b/third-party/rapidjson/BUCK deleted file mode 100644 index 58606d98a3d..00000000000 --- a/third-party/rapidjson/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "rapidjson", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "2839b377339dd99612dd91025e96657fc5ba2792cd037251bb37df2d977622b0", - "macos-x86_64": "b217f95eb2518f5c4ee683eb03e1d3c027f9bf94e99f0853a4da738d6612e261", - "windows-x86_64": "05dfb37b661b72d6f26a2295471343b8d5797ecedd795480ddc9a977791b5319", - }, - platform_static_libs = { - "linux-x86_64": [ - - ], - "macos-x86_64": [ - - ], - "windows-x86_64": [ - - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.1.0-1a825d24", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/rapidjson/osquery.library b/third-party/rapidjson/osquery.library deleted file mode 100644 index 9e9ae8871bf..00000000000 --- a/third-party/rapidjson/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "rapidjson", - version = "1.1.0-1a825d24", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/rocksdb/BUCK b/third-party/rocksdb/BUCK deleted file mode 100644 index fcf34c189d9..00000000000 --- a/third-party/rocksdb/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "rocksdb", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "12c8abadd96ae8ac38327e8b30c195c18f30001025f400efcac82053057d9834", - "macos-x86_64": "95b161e7d3def2d4f9241c57061ea1cab4f64e51f0015db490ef99eff890354d", - "windows-x86_64": "2c6d47cbc32063e420965c4949832d1c5f253da282949f81d9de4d1faeb00fa8", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/librocksdb_lite.a", - ], - "macos-x86_64": [ - "lib/librocksdb_lite.a", - ], - "windows-x86_64": [ - "lib/rocksdb.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("bzip2", "bzip2"), - ], - version = "5.7.2", - build = "0", - visibility = ["PUBLIC"], - exported_preprocessor_flags = [ - "-DROCKSDB_LITE=1", - ], -) diff --git a/third-party/rocksdb/osquery.library b/third-party/rocksdb/osquery.library deleted file mode 100644 index cf625412b08..00000000000 --- a/third-party/rocksdb/osquery.library +++ /dev/null @@ -1,13 +0,0 @@ -library( - name = "rocksdb", - version = "5.7.2", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - "bzip2:bzip2", - ], -) diff --git a/third-party/sleuthkit/BUCK b/third-party/sleuthkit/BUCK deleted file mode 100644 index 24878ef3fec..00000000000 --- a/third-party/sleuthkit/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "sleuthkit", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "e9d63528b0b0e868453e1d9a26e29137b222e6b682e53415fccaa41783ea2e24", - "macos-x86_64": "a841486e4972f262baf195d1e5ec91e9800d6f3934689407b270efc8ba465e51", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libtsk.a", - ], - "macos-x86_64": [ - "lib/libtsk.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "4.6.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/sleuthkit/osquery.library b/third-party/sleuthkit/osquery.library deleted file mode 100644 index 80107e40b7f..00000000000 --- a/third-party/sleuthkit/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "sleuthkit", - version = "4.6.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/smartmontools/BUCK b/third-party/smartmontools/BUCK deleted file mode 100644 index 5b4716b875c..00000000000 --- a/third-party/smartmontools/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_cxx_library( - name = "libsmartctl", - exported_deps = [ - ":smartmontools", - ], - visibility = ["PUBLIC"], -) - -osquery_tp_prebuilt_cxx_library( - name = "smartmontools", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "a63ecfbd80eb715c1278770c9be72d45578bd9650fc31196956d3a87dd3b2a66", - "macos-x86_64": "2ad496686cef94cf46bbf040d6a1d9aa8e051d2281246bfc7517329fc4695e67", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libsmartctl.a", - ], - "macos-x86_64": [ - "lib/libsmartctl.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "0.3.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/smartmontools/osquery.library b/third-party/smartmontools/osquery.library deleted file mode 100644 index 68a8c218557..00000000000 --- a/third-party/smartmontools/osquery.library +++ /dev/null @@ -1,14 +0,0 @@ -library( - name = "smartmontools", - version = "0.3.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], - alias = [ - "libsmartctl", - ], -) diff --git a/third-party/sqlite/BUCK b/third-party/sqlite/BUCK deleted file mode 100644 index 2fc2a72e008..00000000000 --- a/third-party/sqlite/BUCK +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_genrule", "osquery_http_archive") -load("//tools/build_defs/oss/osquery:platforms.bzl", "POSIX", "WINDOWS") - -osquery_http_archive( - name = "archive", - sha256 = "a1ecb747d33d9ffae110c3e836f0094f0b172190807cb1d76568bb167b84b641", - type = "tar.gz", - urls = [ - "https://s3.amazonaws.com/osquery-packages/third-party/src/sqlite-amalgamation-3260000.tar.gz", - ], -) - -osquery_genrule( - name = "sqlite_include_dir", - out = "include", - cmd = "ln -sf $(location :archive)/sqlite-amalgamation-3260000/include ${OUT}", - cmd_exe = "mklink /D %OUT% $(location :archive)\sqlite-amalgamation-3260000\include", -) - -osquery_genrule( - name = "sqlite3", - out = "sqlite3.c", - cmd = "ln -s $(location :archive)/sqlite-amalgamation-3260000/sqlite3.c ${OUT}", - cmd_exe = "mklink %OUT% $(location :archive)\sqlite-amalgamation-3260000\sqlite3.c", -) - -osquery_prebuilt_cxx_library( - name = "sqlite_exported_headers", - header_namespace = "", - header_dirs = [ - ":sqlite_include_dir", - ], - header_only = True, -) - -osquery_cxx_library( - name = "sqlite", - srcs = [ - ":sqlite3", - ], - exported_platform_linker_flags = [ - ( - POSIX, - [ - "-ldl", - ], - ), - ], - external = True, - platform_compiler_flags = [ - ( - POSIX, - [ - "-Wno-array-bounds", - "-Wno-error", - "-Wno-missing-braces", - "-Wno-overlength-strings", - "-Wno-parentheses-equality", - "-Wno-unused-value", - ], - ), - ( - WINDOWS, - [ - "/EHsc", - ], - ), - ], - preprocessor_flags = [ - "-DSQLITE_ENABLE_COLUMN_METADATA=1", - "-DSQLITE_MAX_VARIABLE_NUMBER=250000", - "-DSQLITE_ENABLE_RTREE=1", - "-DSQLITE_ENABLE_FTS3=1", - "-DSQLITE_ENABLE_FTS3_PARENTHESIS=1", - "-DSQLITE_ENABLE_FTS5=1", - "-DSQLITE_SECURE_DELETE=1", - "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1", - "-DSQLITE_ENABLE_DBSTAT_VTAB=1", - "-DSQLITE_ENABLE_JSON1=1", - "-DSQLITE_ENABLE_PREUPDATE_HOOK=1", - "-DSQLITE_ENABLE_SESSION=1", - "-DSQLITE_SOUNDEX", - '-DSQLITE_VERSION="3.26.0"', - ], - visibility = ["PUBLIC"], - exported_deps = [ - ":sqlite_exported_headers", - ], -) diff --git a/third-party/ssdeep-cpp/BUCK b/third-party/ssdeep-cpp/BUCK deleted file mode 100644 index f033f6dd080..00000000000 --- a/third-party/ssdeep-cpp/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "ssdeep-cpp", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "d8248655050987524dc383d55d7b148803b18331cdbcb8bfd2a8198ca210298b", - "macos-x86_64": "93f11f81eab1cc06bf11fd28bc42d7b9d02972e3705f864a9f8ef0f5ca90abcc", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libfuzzy.a", - ], - "macos-x86_64": [ - "lib/libfuzzy.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.14.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/ssdeep-cpp/osquery.library b/third-party/ssdeep-cpp/osquery.library deleted file mode 100644 index 9777769c4be..00000000000 --- a/third-party/ssdeep-cpp/osquery.library +++ /dev/null @@ -1,11 +0,0 @@ -library( - name = "ssdeep-cpp", - version = "2.14.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/thrift/BUCK b/third-party/thrift/BUCK deleted file mode 100644 index ea6a4e87753..00000000000 --- a/third-party/thrift/BUCK +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "thrift", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "32d0a6c2220114272fe6819a30b5ddfe000d9bed03f0d1fc3b6b68d438b5cc1e", - "macos-x86_64": "11a4f8565728e73a54808bf55517014cc69597ef965c3b2b7ebeb52f6dd43c26", - "windows-x86_64": "8b115b46d7fbae38eafbd50c4fabca1dd7e14a86ad52bda601ec374b44dc5373", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libthrift.a", - "lib/libthriftz.a", - ], - "macos-x86_64": [ - "lib/libthrift.a", - "lib/libthriftz.a", - ], - "windows-x86_64": [ - "lib/parse.lib", - "lib/thriftmt.lib", - "lib/thriftzmt.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("boost", "boost"), - ], - version = "0.11.0", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/thrift/osquery.library b/third-party/thrift/osquery.library deleted file mode 100644 index 1cf330e9d83..00000000000 --- a/third-party/thrift/osquery.library +++ /dev/null @@ -1,13 +0,0 @@ -library( - name = "thrift", - version = "0.11.0", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - "boost:boost", - ], -) diff --git a/third-party/util-linux/BUCK b/third-party/util-linux/BUCK deleted file mode 100644 index 9f35d4fa72d..00000000000 --- a/third-party/util-linux/BUCK +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "util-linux", - platforms = [ - "linux-x86_64", - ], - sha256sums = { - "linux-x86_64": "2c2e64f8364afeddc4804716ae835c674d48592c163e59903356de9c3b31da5d", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libblkid.a", - "lib/libfdisk.a", - "lib/libmount.a", - "lib/libsmartcols.a", - "lib/libuuid.a", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.27.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/util-linux/osquery.library b/third-party/util-linux/osquery.library deleted file mode 100644 index 30d1a9e1fa1..00000000000 --- a/third-party/util-linux/osquery.library +++ /dev/null @@ -1,10 +0,0 @@ -library( - name = "util-linux", - version = "2.27.1", - build = 0, - platforms = [ - "linux-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/yara/BUCK b/third-party/yara/BUCK deleted file mode 100644 index 852d5f46bd1..00000000000 --- a/third-party/yara/BUCK +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "yara", - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - sha256sums = { - "linux-x86_64": "4706e8312c531c436b03be4ea429a94dbd06e2cd392764febc9e259777c8fc98", - "macos-x86_64": "8cf4dfeb1e5f93fda206a200c1bce070c11bd486c1c335ede570980cdd196b0b", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libyara.a", - ], - "macos-x86_64": [ - "lib/libyara.a", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("openssl", "ssl"), - ], - version = "3.7.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/yara/osquery.library b/third-party/yara/osquery.library deleted file mode 100644 index c55002161de..00000000000 --- a/third-party/yara/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "yara", - version = "3.7.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - ], - deps = [ - "openssl:ssl", - ], -) diff --git a/third-party/zlib/BUCK b/third-party/zlib/BUCK deleted file mode 100644 index e0d2eb73d34..00000000000 --- a/third-party/zlib/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "zlib", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "c6dfd85ce6c440fbaead6d4a3246d7771ed2b9b9f9e8c43257f57e0881d390e9", - "macos-x86_64": "7f9b44ca67eadb2c6dcf6b86688cb759b77b772858dae2a2380c032c7c1d9edd", - "windows-x86_64": "1685157a99c419e5150cc5f44a61ad1a1f5ddf414bf1a451ed9b6c7faf26d4bc", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libz.a", - ], - "macos-x86_64": [ - "lib/libz.a", - ], - "windows-x86_64": [ - "lib/zlibstatic.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.2.11", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/zlib/osquery.library b/third-party/zlib/osquery.library deleted file mode 100644 index cb71e6e6d4f..00000000000 --- a/third-party/zlib/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "zlib", - version = "1.2.11", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party/zstd/BUCK b/third-party/zstd/BUCK deleted file mode 100644 index 4929fae977b..00000000000 --- a/third-party/zstd/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "zstd", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "f9397aeea5816a7cabd0e7040be86e569d2ffd84832a2e3c4e4bda224d6e42a5", - "macos-x86_64": "4cd66f8c05f735ccf6c1457116ddb4cb2b1b0260458bb3c1476475721c9d70d9", - "windows-x86_64": "c214705dfd057b2e9b9e613c88131ccfde22c2f43787af37828ccf3f9bec918d", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libzstd.a", - ], - "macos-x86_64": [ - "lib/libzstd.a", - ], - "windows-x86_64": [ - "lib/libzstd.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "1.2.0", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party/zstd/osquery.library b/third-party/zstd/osquery.library deleted file mode 100644 index 2310172712e..00000000000 --- a/third-party/zstd/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "zstd", - version = "1.2.0", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/tools/buckconfigs/base.bcfg b/tools/buckconfigs/base.bcfg deleted file mode 100644 index 40545f2992b..00000000000 --- a/tools/buckconfigs/base.bcfg +++ /dev/null @@ -1,34 +0,0 @@ -[build] - osquery = oss - -[alias] - osqueryd = //osquery:osqueryd - -[cxx] - should_remap_host_platform = true - gtest_dep = //third-party/googletest:gtest - - cppflags = \ - $(config cxx_toolchain.cppflags) \ - $(config cxx_base.cppflags) \ - $(config cxx_type.cppflags) - - cflags = \ - $(config cxx_toolchain.cflags) \ - $(config cxx_base.cflags) \ - $(config cxx_type.cflags) - - cxxppflags = \ - $(config cxx_toolchain.cxxppflags) \ - $(config cxx_base.cxxppflags) \ - $(config cxx_type.cxxppflags) - - cxxflags = \ - $(config cxx_toolchain.cxxflags) \ - $(config cxx_base.cxxflags) \ - $(config cxx_type.cxxflags) - - ldflags = \ - $(config cxx_toolchain.ldflags) \ - $(config cxx_base.ldflags) \ - $(config cxx_type.ldflags) diff --git a/tools/buckconfigs/freebsd-x86_64/base.bcfg b/tools/buckconfigs/freebsd-x86_64/base.bcfg deleted file mode 100644 index 94bbb548463..00000000000 --- a/tools/buckconfigs/freebsd-x86_64/base.bcfg +++ /dev/null @@ -1,83 +0,0 @@ -[cxx] - default_platform=freebsd-x86_64 - -[cxx_base] - cppflags = \ - -I /usr/local/include/libxml2 - - cflags = \ - -std=gnu11 \ - -Wall \ - -Wextra \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wno-c99-extensions \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -g - - cxxppflags = \ - -I /usr/local/include/libxml2 - - cxxflags = \ - -std=gnu++14 \ - -Wall \ - -Wextra \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -g - - ldflags = \ - -lboost_system \ - -lboost_filesystem \ - -lboost_thread \ - -lboost_context \ - -lboost_regex \ - -lrt \ - -lc \ - -lpthread \ - -lprocstat diff --git a/tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg b/tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg deleted file mode 100644 index e5d462eb9bc..00000000000 --- a/tools/buckconfigs/freebsd-x86_64/toolchain/freebsd-11.2-clang.bcfg +++ /dev/null @@ -1,25 +0,0 @@ -[cxx] - cpp = /usr/bin/clang - cc = /usr/bin/clang - cxxpp = /usr/bin/clang++ - cxx = /usr/bin/clang++ - as = /usr/local/bin/as - ld = /usr/bin/clang++ - ar = /usr/local/bin/ar - -[cxx_toolchain] - cppflags = \ - -I /usr/include \ - -I /usr/local/include - - cflags = - - cxxppflags = \ - -I /usr/include \ - -I /usr/local/include - - cxxflags = - - ldflags = \ - -L /usr/local/lib \ - -L /usr/lib diff --git a/tools/buckconfigs/freebsd-x86_64/type/debug.bcfg b/tools/buckconfigs/freebsd-x86_64/type/debug.bcfg deleted file mode 100644 index a3085f6a0b1..00000000000 --- a/tools/buckconfigs/freebsd-x86_64/type/debug.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/debug - -[cxx_type] - cppflags = \ - -UNDEBUG - - cflags = \ - -O0 - - cxxppflags = \ - -UNDEBUG - - cxxflags = \ - -O0 - - ldflags = diff --git a/tools/buckconfigs/freebsd-x86_64/type/release.bcfg b/tools/buckconfigs/freebsd-x86_64/type/release.bcfg deleted file mode 100644 index 54e7496ee80..00000000000 --- a/tools/buckconfigs/freebsd-x86_64/type/release.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/release - -[cxx_type] - cppflags = \ - -DNDEBUG - - cflags = \ - -Os - - cxxppflags = \ - -DNDEBUG - - cxxflags = \ - -Os - - ldflags = diff --git a/tools/buckconfigs/linux-x86_64/base.bcfg b/tools/buckconfigs/linux-x86_64/base.bcfg deleted file mode 100644 index d1dfbd59145..00000000000 --- a/tools/buckconfigs/linux-x86_64/base.bcfg +++ /dev/null @@ -1,89 +0,0 @@ -[cxx] - default_platform = linux-x86_64 - -[cxx_base] - cppflags = - - cflags = \ - -std=gnu11 \ - -Qunused-arguments \ - -Wno-shadow-field \ - -Wall \ - -Wextra \ - -Wno-unused-local-typedef \ - -Wno-deprecated-register \ - -Wno-unknown-warning-option \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wuseless-cast \ - -Wno-c99-extensions \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fno-limit-debug-info \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -g - - cxxppflags = - - cxxflags = \ - -std=gnu++14 \ - -stdlib=libc++ \ - -Qunused-arguments \ - -Wno-shadow-field \ - -Wall \ - -Wextra \ - -Wno-unused-local-typedef \ - -Wno-deprecated-register \ - -Wno-unknown-warning-option \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wuseless-cast \ - -Wno-c++11-extensions \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fno-limit-debug-info \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -g - - ldflags = \ - -stdlib=libc++ diff --git a/tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg b/tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg deleted file mode 100644 index 7b99c560539..00000000000 --- a/tools/buckconfigs/linux-x86_64/toolchain/ubuntu-18.04-clang.bcfg +++ /dev/null @@ -1,19 +0,0 @@ -[cxx] - cpp = /usr/bin/clang - cc = /usr/bin/clang - cxxpp = /usr/bin/clang++ - cxx = /usr/bin/clang++ - as = /usr/bin/as - ld = /usr/bin/clang++ - ar = /usr/bin/ar - -[cxx_toolchain] - cppflags = - - cflags = - - cxxppflags = - - cxxflags = - - ldflags = diff --git a/tools/buckconfigs/linux-x86_64/type/debug.bcfg b/tools/buckconfigs/linux-x86_64/type/debug.bcfg deleted file mode 100644 index a3085f6a0b1..00000000000 --- a/tools/buckconfigs/linux-x86_64/type/debug.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/debug - -[cxx_type] - cppflags = \ - -UNDEBUG - - cflags = \ - -O0 - - cxxppflags = \ - -UNDEBUG - - cxxflags = \ - -O0 - - ldflags = diff --git a/tools/buckconfigs/linux-x86_64/type/release.bcfg b/tools/buckconfigs/linux-x86_64/type/release.bcfg deleted file mode 100644 index c62f5b26942..00000000000 --- a/tools/buckconfigs/linux-x86_64/type/release.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/release - -[cxx_type] - cppflags = \ - -DNDEBUG - - cflags = \ - -Oz - - cxxppflags = \ - -DNDEBUG - - cxxflags = \ - -Oz - - ldflags = diff --git a/tools/buckconfigs/macos-x86_64/base.bcfg b/tools/buckconfigs/macos-x86_64/base.bcfg deleted file mode 100644 index b4d6cbd0eb4..00000000000 --- a/tools/buckconfigs/macos-x86_64/base.bcfg +++ /dev/null @@ -1,110 +0,0 @@ -[cxx] - default_platform = macosx-x86_64 - -[cxx_base] - cppflags = - - cflags = \ - -std=gnu11 \ - -Qunused-arguments \ - -Wno-shadow-field \ - -Wall \ - -Wextra \ - -Wabi-tag \ - -Wno-unused-local-typedef \ - -Wno-deprecated-register \ - -Wno-unknown-warning-option \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wuseless-cast \ - -Wno-c99-extensions \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fno-limit-debug-info \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -g - - cxxppflags = - - cxxflags = \ - -std=gnu++14 \ - -Qunused-arguments \ - -Wno-shadow-field \ - -Wall \ - -Wextra \ - -Wabi-tag \ - -Wno-unused-local-typedef \ - -Wno-deprecated-register \ - -Wno-unknown-warning-option \ - -Wstrict-aliasing \ - -Wno-missing-field-initializers \ - -Wnon-virtual-dtor \ - -Wchar-subscripts \ - -Wpointer-arith \ - -Woverloaded-virtual \ - -Wformat \ - -Wformat-security \ - -Werror=format-security \ - -Wuseless-cast \ - -Wno-c++11-extensions \ - -Wno-zero-length-array \ - -Wno-unused-parameter \ - -Wno-gnu-case-range \ - -Weffc++ \ - -fpermissive \ - -fstack-protector-all \ - -fdata-sections \ - -ffunction-sections \ - -fvisibility=hidden \ - -fvisibility-inlines-hidden \ - -fno-limit-debug-info \ - -fPIE \ - -fpie \ - -fPIC \ - -fpic \ - -pipe \ - -pedantic \ - -x objective-c++ \ - -fobjc-arc \ - -g - - ldflags = \ - -liconv \ - -llzma \ - -lbz2 \ - -lcups \ - -lbsm \ - -lxar \ - -lresolv \ - -framework AppKit \ - -framework Foundation \ - -framework CoreServices \ - -framework CoreFoundation \ - -framework CoreWLAN \ - -framework CoreGraphics \ - -framework DiskArbitration \ - -framework IOKit \ - -framework OpenDirectory \ - -framework Security \ - -framework ServiceManagement \ - -framework SystemConfiguration diff --git a/tools/buckconfigs/macos-x86_64/type/debug.bcfg b/tools/buckconfigs/macos-x86_64/type/debug.bcfg deleted file mode 100644 index a3085f6a0b1..00000000000 --- a/tools/buckconfigs/macos-x86_64/type/debug.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/debug - -[cxx_type] - cppflags = \ - -UNDEBUG - - cflags = \ - -O0 - - cxxppflags = \ - -UNDEBUG - - cxxflags = \ - -O0 - - ldflags = diff --git a/tools/buckconfigs/macos-x86_64/type/release.bcfg b/tools/buckconfigs/macos-x86_64/type/release.bcfg deleted file mode 100644 index c62f5b26942..00000000000 --- a/tools/buckconfigs/macos-x86_64/type/release.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/release - -[cxx_type] - cppflags = \ - -DNDEBUG - - cflags = \ - -Oz - - cxxppflags = \ - -DNDEBUG - - cxxflags = \ - -Oz - - ldflags = diff --git a/tools/buckconfigs/windows-x86_64/base.bcfg b/tools/buckconfigs/windows-x86_64/base.bcfg deleted file mode 100644 index 07b8c15641a..00000000000 --- a/tools/buckconfigs/windows-x86_64/base.bcfg +++ /dev/null @@ -1,62 +0,0 @@ -[build] - depfiles = disabled - -[cxx#windows-x86_64] - preprocess_mode = combined - sandbox_sources = true - use_arg_file = true - filepath_length_limited = true - -[cxx_base] - cppflags = \ - /DBOOST_ALL_NO_LIB \ - /DBOOST_ALL_STATIC_LINK - - cflags = \ - /std:c11 \ - /MT \ - /EHs \ - /W3 \ - /guard:cf \ - /bigobj - - cxxppflags = \ - /DBOOST_ALL_NO_LIB \ - /DBOOST_ALL_STATIC_LINK - - cxxflags = \ - /std:c++14 \ - /MT \ - /EHs \ - /W3 \ - /guard:cf \ - /bigobj - - ldflags = \ - /SUBSYSTEM:CONSOLE \ - /LTCG \ - ntdll.lib \ - ole32.lib \ - oleaut32.lib \ - ws2_32.lib \ - iphlpapi.lib \ - netapi32.lib \ - rpcrt4.lib \ - shlwapi.lib \ - version.lib \ - wtsapi32.lib \ - wbemuuid.lib \ - secur32.lib \ - taskschd.lib \ - dbghelp.lib \ - dbgeng.lib \ - bcrypt.lib \ - crypt32.lib \ - wintrust.lib \ - setupapi.lib \ - advapi32.lib \ - userenv.lib \ - wevtapi.lib \ - shell32.lib \ - gdi32.lib \ - user32.lib diff --git a/tools/buckconfigs/windows-x86_64/type/debug.bcfg b/tools/buckconfigs/windows-x86_64/type/debug.bcfg deleted file mode 100644 index 59c1ef346d3..00000000000 --- a/tools/buckconfigs/windows-x86_64/type/debug.bcfg +++ /dev/null @@ -1,25 +0,0 @@ -[project] - buck_out = buck-out/debug - -[cxx_type] - cppflags = \ - /UNDEBUG - - cflags = \ - /Z7 \ - /Od \ - /Gs \ - /GS \ - /guard:cf - - cxxppflags = \ - /UNDEBUG - - cxxflags = \ - /Z7 \ - /Od \ - /Gs \ - /GS \ - /guard:cf - - ldflags = diff --git a/tools/buckconfigs/windows-x86_64/type/release.bcfg b/tools/buckconfigs/windows-x86_64/type/release.bcfg deleted file mode 100644 index e13ec38bbbd..00000000000 --- a/tools/buckconfigs/windows-x86_64/type/release.bcfg +++ /dev/null @@ -1,17 +0,0 @@ -[project] - buck_out = buck-out/release - -[cxx_type] - cppflags = \ - /DNDEBUG - - cflags = \ - /Ot - - cxxppflags = \ - /DNDEBUG - - cxxflags = \ - /Ot - - ldflags = diff --git a/tools/build_defs/oss/osquery/codegen.bzl b/tools/build_defs/oss/osquery/codegen.bzl deleted file mode 100644 index 1141b31996c..00000000000 --- a/tools/build_defs/oss/osquery/codegen.bzl +++ /dev/null @@ -1,200 +0,0 @@ -"""Implementation of osquery code generation targets""" -"""Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved""" - -load( - "//tools/build_defs/oss/osquery:cxx.bzl", - "osquery_cxx_library", -) -load( - "//tools/build_defs/oss/osquery:native.bzl", - "osquery_genrule", - "osquery_target", -) -load( - "//tools/build_defs/oss/osquery:native_functions.bzl", - _osquery_read_config = "osquery_read_config", -) - -def _impl_gen_cxx_from_spec(name, spec_file, is_foreign = False): - table_root_name = spec_file.rsplit("/", 1)[-1].rsplit(".", 1)[0] - table_target_name = "{}_{}.table".format(name, table_root_name) - row_genrule_name = "{}_{}.row_genrule".format(name, table_root_name) - row_target_name = "{}_{}_row".format(name, table_root_name) - row_header_name = "{}.h".format(table_root_name) - - cmd = "$(exe {})".format(osquery_target("tools/codegen:gentable")) - foreign = "--foreign" if is_foreign else "" - templates = "$(location {})/templates".format(osquery_target("tools/codegen:templates")) - spec_file = spec_file - output = "$OUT" - - osquery_genrule( - name = table_target_name, - out = "{}.cpp".format(table_root_name), - cmd = ( - "{cmd} {foreign} --templates {templates} {spec_file} {output}" - ).format( - cmd = cmd, - foreign = foreign, - templates = templates, - spec_file = spec_file, - output = output, - ), - ) - - osquery_genrule( - name = row_genrule_name, - out = "{}.h".format(table_root_name), - cmd = ( - "{cmd} --header --templates {templates} {spec_file} {output}" - ).format( - cmd = cmd, - templates = templates, - spec_file = spec_file, - output = output, - ), - ) - - osquery_cxx_library( - name = row_target_name, - exported_headers = { - row_header_name: ":" + row_genrule_name, - }, - header_namespace = "osquery/rows", - visibility = [ - osquery_target("osquery/tables/..."), - ], - ) - - return [table_target_name, row_genrule_name] - -def _impl_gen_amalgamation(name, cxx_targets, is_foreign = False): - category = "foreign" if is_foreign else "native" - target_name = "{}_{}_amalgamation".format(name, category) - out_cpp = "{}_amalgamation.cpp".format(category) - - osquery_genrule( - name = target_name, - srcs = [ - ":{}".format(cxx_target) - for cxx_target in cxx_targets - ], - out = out_cpp, - cmd = ( - "{cmd} {foreign} --templates {templates} --category {category} --sources {sources} --output {output}" - ).format( - cmd = "$(exe {})".format(osquery_target("tools/codegen:amalgamate")), - foreign = "--foreign" if is_foreign else "", - templates = "$(location {})/templates".format(osquery_target("tools/codegen:templates")), - category = category, - sources = "$SRCDIR", - output = "$OUT", - ), - ) - - return target_name - -def _impl_gen_library(name, targets, deps, **kwargs): - if deps == None: - deps = [] - - headers = osquery_target("osquery:headers") - if headers not in deps: - deps += [ - headers, - ] - - osquery_cxx_library( - name = name, - srcs = [ - ":{}".format(target) - for target in targets - ], - deps = deps, - **kwargs - ) - -def _is_spec_ignored(spec): - if _osquery_read_config("osquery", "disable_ignore_lists", False): - return False - ignore_list = _osquery_read_config("osquery", "spec_ignore_list", []) - return spec in ignore_list - -def _impl_is_foreign(platform_def): - return not ( - host_info().os.is_linux and "linux" in platform_def or - host_info().os.is_macos and "macos" in platform_def or - host_info().os.is_windows and "windows" in platform_def or - host_info().os.is_freebsd and "freebsd" in platform_def or - host_info().os.is_unknown - ) - -def osquery_gentable_cxx_library(name, spec_location, spec_files = None, platform_spec_files = None, deps = None, **kwargs): - """ - Code generation target for osquery tables - - Args: - name (str): The target name. - spec_files (list or None): List spec files for tables available on all platforms. - platform_spec_files (list or None): List spec files for platform specific tables and associated platforms, specified as a tuple where the first item is the spec file and the second a coma separated list of platforms (e.g. "linux,windows" or "macos,freebsd,linux"). - deps (list): List of dependencies. - """ - native_cxx_targets = [] - if not spec_location.endswith("/"): - spec_location += "/" - native_specs = [] - foreign_specs = [] - - if spec_files: - for spec_file in spec_files: - if _is_spec_ignored(spec_file): - foreign_specs.append(spec_file) - else: - native_specs.append(spec_file) - - foreign_cxx_targets = [] - if platform_spec_files: - for spec_file, platform_def in platform_spec_files: - if _impl_is_foreign(platform_def) or _is_spec_ignored(spec_file): - foreign_specs.append(spec_file) - else: - native_specs.append(spec_file) - - for spec_file in native_specs: - native_cxx_targets.extend( - _impl_gen_cxx_from_spec( - name, - spec_location + spec_file, - is_foreign = False, - ), - ) - - for spec_file in foreign_specs: - foreign_cxx_targets.extend( - _impl_gen_cxx_from_spec( - name, - spec_location + spec_file, - is_foreign = True, - ), - ) - - native_amalgamation_target = _impl_gen_amalgamation( - name, - native_cxx_targets, - ) - - foreign_amalgamation_target = _impl_gen_amalgamation( - name, - foreign_cxx_targets, - is_foreign = True, - ) - - _impl_gen_library( - name, - [ - native_amalgamation_target, - foreign_amalgamation_target, - ], - deps, - **kwargs - ) diff --git a/tools/build_defs/oss/osquery/cxx.bzl b/tools/build_defs/oss/osquery/cxx.bzl deleted file mode 100644 index a11718ddff1..00000000000 --- a/tools/build_defs/oss/osquery/cxx.bzl +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load( - "//tools/build_defs/oss/osquery:native_functions.bzl", - _osquery_custom_set_generic_kwargs = "osquery_custom_set_generic_kwargs", - _osquery_cxx_binary = "osquery_cxx_binary", - _osquery_cxx_library = "osquery_cxx_library", - _osquery_cxx_test = "osquery_cxx_test", - _osquery_native = "osquery_native", - _osquery_prebuilt_cxx_library = "osquery_prebuilt_cxx_library", - _osquery_prebuilt_cxx_library_group = "osquery_prebuilt_cxx_library_group", - _osquery_read_config = "osquery_read_config", -) -load( - "//tools/build_defs/oss/osquery:platforms.bzl", - _FREEBSD = "FREEBSD", - _LINUX = "LINUX", - _MACOSX = "MACOSX", - _WINDOWS = "WINDOWS", -) -load( - ":defaults.bzl", - _LABELS = "OSQUERY_LABELS", -) - -# for osquery targets only -_OSQUERY_PLATFORM_PREPROCESSOR_FLAGS = [ - ( - _LINUX, - [ - "-DLINUX=1", - "-DPOSIX=1", - "-DOSQUERY_LINUX=1", - "-DOSQUERY_POSIX=1", - "-DOSQUERY_BUILD_PLATFORM=linux", - "-DOSQUERY_BUILD_DISTRO=centos7", - ], - ), - ( - _MACOSX, - [ - "-DAPPLE=1", - "-DDARWIN=1", - "-DBSD=1", - "-DPOSIX=1", - "-DOSQUERY_POSIX=1", - "-DOSQUERY_BUILD_PLATFORM=darwin", - "-DOSQUERY_BUILD_DISTRO=10.12", - ], - ), - ( - _FREEBSD, - [ - "-DFREEBSD=1", - "-DBSD=1", - "-DPOSIX=1", - "-DOSQUERY_POSIX=1", - "-DOSQUERY_FREEBSD=1", - "-DOSQUERY_BUILD_PLATFORM=freebsd", - "-DOSQUERY_BUILD_DISTRO=11.2", - ], - ), - ( - _WINDOWS, - [ - "-DWIN32=1", - "-DWINDOWS=1", - "-DOSQUERY_WINDOWS=1", - "-DOSQUERY_BUILD_PLATFORM=windows", - "-DOSQUERY_BUILD_DISTRO=10", - ], - ), -] - -# for all targets in osquery build, including third party -_GLOBAL_PLATFORM_PREPROCESSOR_FLAGS = [ - ( - _WINDOWS, - [ - "/D_WIN32_WINNT=_WIN32_WINNT_WIN7", - "/DNTDDI_VERSION=NTDDI_WIN7", - ], - ), -] - -def _osquery_set_generic_kwargs(kwargs): - _osquery_custom_set_generic_kwargs(kwargs) - kwargs.setdefault("labels", []) - kwargs["labels"] += _LABELS - -def _osquery_set_preprocessor_kwargs(kwargs, external): - kwargs.setdefault("preprocessor_flags", []) - kwargs.setdefault("platform_preprocessor_flags", []) - kwargs["platform_preprocessor_flags"] += _GLOBAL_PLATFORM_PREPROCESSOR_FLAGS - if not external: - kwargs["platform_preprocessor_flags"] += _OSQUERY_PLATFORM_PREPROCESSOR_FLAGS - -def _is_target_ignored(target): - if _osquery_read_config("osquery", "disable_ignore_lists", False): - return False - ignore_list = _osquery_read_config("osquery", "target_ignore_list", []) - return target in ignore_list - -def osquery_cxx_library(external = False, **kwargs): - if _is_target_ignored(kwargs["name"]): - _osquery_cxx_library(name = kwargs["name"], visibility = kwargs.get("visibility", [])) - else: - _osquery_set_generic_kwargs(kwargs) - _osquery_set_preprocessor_kwargs(kwargs, external) - - #TODO remove after T39415423 is done - # platform_deps is ignored in xcode project generation - # so we need to move osx platform_deps to regular deps - if _osquery_read_config("osquery", "xcode", False): - platform_deps = kwargs.get("platform_deps", []) - deps = kwargs.get("deps", []) - for (platform, new_deps) in platform_deps: - if "macos" in platform: - deps += new_deps - kwargs["deps"] = deps - _osquery_cxx_library(**kwargs) - -def osquery_prebuilt_cxx_library(**kwargs): - _osquery_set_generic_kwargs(kwargs) - _osquery_prebuilt_cxx_library(**kwargs) - -def osquery_prebuilt_cxx_library_group(**kwargs): - kwargs.setdefault("labels", []) - kwargs["labels"] += _LABELS - _osquery_prebuilt_cxx_library_group(**kwargs) - -def osquery_cxx_binary(external = False, **kwargs): - _ignore = [external] - _osquery_set_generic_kwargs(kwargs) - _osquery_set_preprocessor_kwargs(kwargs, external) - if host_info().os.is_macos: - not_supported_key = "platforms" - if not_supported_key in kwargs: - kwargs.pop(not_supported_key) - _osquery_native.apple_binary(**kwargs) - else: - _osquery_cxx_binary(**kwargs) - -def osquery_cxx_test(external = False, **kwargs): - _ignore = [external] - _osquery_set_generic_kwargs(kwargs) - _osquery_set_preprocessor_kwargs(kwargs, external) - - kwargs.setdefault("platform_preprocessor_flags", []) - kwargs["platform_preprocessor_flags"].append( - ( - _MACOSX, - [ - # osquery tests have lots of ASSERT_/EXPECT_ to compare signed - # const with unsigned value. It requires some effort to fix it - # with small value, because it is just tests. - "-Wno-sign-compare", - ], - ), - ) - - _osquery_cxx_test(**kwargs) diff --git a/tools/build_defs/oss/osquery/defaults.bzl b/tools/build_defs/oss/osquery/defaults.bzl deleted file mode 100644 index a5498bb2788..00000000000 --- a/tools/build_defs/oss/osquery/defaults.bzl +++ /dev/null @@ -1,15 +0,0 @@ -"""osquery build defaults""" -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -OSQUERY_THIRD_PARTY_PATH = "third-party" - -OSQUERY_LABELS = [ - "osquery", -] - -OSQUERY_ROOT_TARGET_PATH = "//" - -OSQUERY_CELL_NAME = "//" diff --git a/tools/build_defs/oss/osquery/globs.bzl b/tools/build_defs/oss/osquery/globs.bzl deleted file mode 100644 index c03b9dfc656..00000000000 --- a/tools/build_defs/oss/osquery/globs.bzl +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -def _paths_join(path, *others): - """Joins one or more path components intelligently. - - This function mimics the behavior of Python's `os.path.join` function on POSIX - platform. It returns the concatenation of `path` and any members of `others`, - inserting directory separators before each component except the first. The - separator is not inserted if the path up until that point is either empty or - already ends in a separator. - - If any component is an absolute path, all previous components are discarded. - - Args: - path: A path segment. - *others: Additional path segments. - - Returns: - A string containing the joined paths. - """ - result = path - - for p in others: - if p.startswith("/"): # absolute path - result = p - elif not result or result.endswith("/"): - result += p - else: - result += "/" + p - - return result - -def _merge_maps(*file_maps): - result = {} - for file_map in file_maps: - for key in file_map: - if key in result and result[key] != file_map[key]: - fail( - "Conflicting files in file search paths. " + - "\"%s\" maps to both \"%s\" and \"%s\"." % - (key, result[key], file_map[key]), - ) - - result[key] = file_map[key] - - return result - -def _single_subdir_glob(dirpath, glob_pattern, exclude = None, prefix = None): - if exclude == None: - exclude = [] - results = {} - files = native.glob([_paths_join(dirpath, glob_pattern)], exclude = exclude) - for f in files: - if dirpath: - key = f[len(dirpath) + 1:] - else: - key = f - if prefix: - key = _paths_join(prefix, key) - results[key] = f - - return results - -def osquery_subdir_glob(glob_specs, exclude = None, prefix = ""): - """Returns a dict of sub-directory relative paths to full paths. - - The subdir_glob() function is useful for defining header maps for C/C++ - libraries which should be relative the given sub-directory. - Given a list of tuples, the form of (relative-sub-directory, glob-pattern), - it returns a dict of sub-directory relative paths to full paths. - - Please refer to native.glob() for explanations and examples of the pattern. - - Args: - glob_specs: The array of tuples in form of - (relative-sub-directory, glob-pattern inside relative-sub-directory). - type: List[Tuple[str, str]] - exclude: A list of patterns to identify files that should be removed - from the set specified by the first argument. Defaults to []. - type: Optional[List[str]] - prefix: If is not None, prepends it to each key in the dictionary. - Defaults to None. - type: Optional[str] - - Returns: - A dict of sub-directory relative paths to full paths. - """ - if exclude == None: - exclude = [] - - results = [] - - for dirpath, glob_pattern in glob_specs: - results.append( - _single_subdir_glob(dirpath, glob_pattern, exclude, prefix), - ) - - return _merge_maps(*results) diff --git a/tools/build_defs/oss/osquery/native.bzl b/tools/build_defs/oss/osquery/native.bzl deleted file mode 100644 index e8a5c574be4..00000000000 --- a/tools/build_defs/oss/osquery/native.bzl +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load( - "//tools/build_defs/oss/osquery:defaults.bzl", - _OSQUERY_ROOT_TARGET_PATH = "OSQUERY_ROOT_TARGET_PATH", -) -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_native") - -with allow_unsafe_import(): - import os - -def osquery_version(): - proc = os.popen("git describe --tags --always --dirty") - return proc.readline().strip() - -def osquery_get_os(): - if native.host_info().os.is_linux: - return "linux" - elif native.host_info().os.is_macos: - return "macos" - elif native.host_info().os.is_freebsd: - return "freebsd" - elif native.host_info().os.is_windows: - return "windows" - return "unknown" - -def osquery_get_arch(): - if native.host_info().arch.is_x86_64: - return "x86_64" - return "unknown" - -def osquery_get_current_platform(): - return "{}-{}".format(osquery_get_os(), osquery_get_arch()) - -def osquery_target(target): - return "{}{}".format(_OSQUERY_ROOT_TARGET_PATH, target) - -def osquery_genrule(**kwargs): - osquery_native.genrule(**kwargs) - -def osquery_filegroup(**kwargs): - osquery_native.filegroup(**kwargs) - -def osquery_http_archive(**kwargs): - osquery_native.http_archive(**kwargs) diff --git a/tools/build_defs/oss/osquery/native_functions.bzl b/tools/build_defs/oss/osquery/native_functions.bzl deleted file mode 100644 index 7d592b5ebaa..00000000000 --- a/tools/build_defs/oss/osquery/native_functions.bzl +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -osquery_native = native - -osquery_read_config = osquery_native.read_config - -osquery_cxx_library = osquery_native.cxx_library - -osquery_prebuilt_cxx_library = osquery_native.prebuilt_cxx_library - -osquery_prebuilt_cxx_library_group = osquery_native.prebuilt_cxx_library_group - -osquery_cxx_binary = osquery_native.cxx_binary - -osquery_cxx_test = osquery_native.cxx_test - -def osquery_custom_set_generic_kwargs(_): - pass diff --git a/tools/build_defs/oss/osquery/platforms.bzl b/tools/build_defs/oss/osquery/platforms.bzl deleted file mode 100644 index 4cee2f8c40e..00000000000 --- a/tools/build_defs/oss/osquery/platforms.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -LINUX = "linux-x86_64" - -MACOSX = "macosx-x86_64" - -WINDOWS = "windows-x86_64" - -FREEBSD = "freebsd-x86_64" - -POSIX = "({})|({})|({})".format(MACOSX, LINUX, FREEBSD) diff --git a/tools/build_defs/oss/osquery/python.bzl b/tools/build_defs/oss/osquery/python.bzl deleted file mode 100644 index 0e24b508d7f..00000000000 --- a/tools/build_defs/oss/osquery/python.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load("//tools/build_defs/oss/osquery:native_functions.bzl", "osquery_native") - -def osquery_python_library(**kwargs): - osquery_native.python_library(**kwargs) - -def osquery_python_binary(**kwargs): - osquery_native.python_binary(**kwargs) - -def osquery_prebuilt_python_library(**kwargs): - osquery_native.prebuilt_python_library(**kwargs) diff --git a/tools/build_defs/oss/osquery/third_party.bzl b/tools/build_defs/oss/osquery/third_party.bzl deleted file mode 100644 index b0db7364574..00000000000 --- a/tools/build_defs/oss/osquery/third_party.bzl +++ /dev/null @@ -1,366 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -load( - "//tools/build_defs/oss/osquery:cxx.bzl", - _osquery_cxx_library = "osquery_cxx_library", - _osquery_prebuilt_cxx_library = "osquery_prebuilt_cxx_library", - _osquery_prebuilt_cxx_library_group = "osquery_prebuilt_cxx_library_group", -) -load( - "//tools/build_defs/oss/osquery:defaults.bzl", - _OSQUERY_CELL_NAME = "OSQUERY_CELL_NAME", - _OSQUERY_THIRD_PARTY_PATH = "OSQUERY_THIRD_PARTY_PATH", -) -load( - "//tools/build_defs/oss/osquery:native.bzl", - _osquery_genrule = "osquery_genrule", - _osquery_get_current_platform = "osquery_get_current_platform", -) -load( - "//tools/build_defs/oss/osquery:platforms.bzl", - _LINUX = "LINUX", - _MACOSX = "MACOSX", - _WINDOWS = "WINDOWS", -) -load( - "//tools/build_defs/oss/osquery:python.bzl", - _osquery_prebuilt_python_library = "osquery_prebuilt_python_library", - _osquery_python_library = "osquery_python_library", -) -load( - "//tools/build_defs/oss/osquery:third_party_archive.bzl", - _osquery_tp_prebuilt_cxx_archive = "osquery_tp_prebuilt_cxx_archive", - _osquery_tp_prebuilt_python_archive = "osquery_tp_prebuilt_python_archive", -) - -_PLATFORM_MAP = { - "linux-x86_64": [ - _LINUX, - ], - "macos-x86_64": [ - _MACOSX, - ], - "windows-x86_64": [ - _WINDOWS, - ], -} - -_CXX_ARCHIVE_TYPE = "tar.gz" - -def _static_lib_file( - name, - version, - platform, - archive_target, - static_lib): - target_name = "{}_{}_{}_{}_static_lib_file".format( - name, - version, - platform, - static_lib, - ) - - if platform == "windows-x86_64": - static_lib = static_lib.replace("/", "\\") - - _osquery_genrule( - name = target_name, - out = static_lib, - cmd = ( - "mkdir -p \$(dirname $OUT) " + - "&& cp $(location :{})/{}/{}/{} $OUT" - ).format( - archive_target, - name, - version, - static_lib, - ), - cmd_exe = ( - "mkdir %OUT%\.. " + - "&& mklink %OUT% $(location :{})\{}\{}\{}" - ).format( - archive_target, - name, - version, - static_lib, - ), - ) - - return target_name - -def _static_lib( - name, - version, - platform, - archive_target, - static_lib, - linker_flags, - deps): - static_lib_file_target = _static_lib_file( - name, - version, - platform, - archive_target, - static_lib, - ) - - target_name = "{}_{}_{}_{}_static_lib".format( - name, - version, - platform, - static_lib, - ) - - _osquery_prebuilt_cxx_library( - name = target_name, - exported_linker_flags = linker_flags, - static_lib = ":{}".format(static_lib_file_target), - exported_deps = deps, - ) - - return target_name - -def _static_lib_group( - name, - version, - platform, - archive_target, - static_libs, - linker_flags, - deps): - target_name = "{}_{}_{}_static_lib_group".format( - name, - version, - platform, - ) - - static_lib_targets = [] - for static_lib in static_libs: - static_lib_targets.append( - _static_lib_file( - name, - version, - platform, - archive_target, - static_lib, - ), - ) - _osquery_prebuilt_cxx_library_group( - name = target_name, - static_libs = [ - ":{}".format(target) - for target in static_lib_targets - ], - static_link = [ - "-Wl,--start-group", - ] + [ - "$(lib {})".format(i) - for i in range(len(static_lib_targets)) - ] + [ - "-Wl,--end-group", - ] + linker_flags, - exported_deps = deps, - ) - - return target_name - -def _header_dir( - name, - version, - platform, - archive_target): - target_name = "{}_{}_{}_header_dir".format( - name, - version, - platform, - ) - - _osquery_genrule( - name = target_name, - out = "include", - cmd = ( - "ln -s -f $(location :{})/{}/{}/include $OUT" - ).format( - archive_target, - name, - version, - ), - cmd_exe = ( - "mklink /D %OUT% $(location :{})\{}\{}\include" - ).format( - archive_target, - name, - version, - ), - ) - - return target_name - -def _prebuilt_library( - name, - version, - platform, - header_dirs_targets, - static_lib_targets): - target_name = "{}_{}_{}_prebuilt_library".format( - name, - version, - platform, - ) - - _osquery_prebuilt_cxx_library( - name = target_name, - header_namespace = "", - header_dirs = [ - ":{}".format(target) - for target in header_dirs_targets - ], - header_only = True, - exported_deps = [ - ":{}".format(target) - for target in static_lib_targets - ], - ) - - return target_name - -def osquery_tp_prebuilt_cxx_library( - name, - version, - build, - platforms, - sha256sums, - static_libs = None, - platform_static_libs = None, - linker_flags = None, - deps = None, - **kwargs): - for platform in platforms: - archive_target = _osquery_tp_prebuilt_cxx_archive( - name = name, - archive_type = _CXX_ARCHIVE_TYPE, - platform = platform, - sha256sum = sha256sums[platform], - version = version, - build = build, - ) - - header_dir_targets = [ - _header_dir( - name, - version, - platform, - archive_target, - ), - ] - - effective_static_libs = [] - if static_libs: - effective_static_libs += static_libs - if platform_static_libs and platform in platform_static_libs: - effective_static_libs += platform_static_libs[platform] - - # Linux supports --start-group linker flag so use a library_group - # This fixes dependency problems within pre-built libraries - static_lib_targets = [] - if platform.startswith("linux"): - static_lib_targets.append( - _static_lib_group( - name, - version, - platform, - archive_target, - effective_static_libs, - linker_flags or [], - deps or [], - ), - ) - elif effective_static_libs: - for static_lib in effective_static_libs: - static_lib_targets.append( - _static_lib( - name, - version, - platform, - archive_target, - static_lib, - linker_flags or [], - deps or [], - ), - ) - - prebuilt_library_target = _prebuilt_library( - name, - version, - platform, - header_dir_targets, - static_lib_targets, - ) - - if "platform_deps" not in kwargs: - kwargs["platform_deps"] = [] - - for effective_platform in _PLATFORM_MAP[platform]: - kwargs["platform_deps"].append(( - effective_platform, - [":{}".format(prebuilt_library_target)], - )) - - _osquery_cxx_library( - name = name, - external = True, - **kwargs - ) - -def osquery_tp_prebuilt_python_library( - name, - platforms, - filenames, - sha1sums, - deps = None): - platform = _osquery_get_current_platform() - - # If specifc platform isn't available fallback to none - if platform not in platforms: - platform = "none" - - if platform not in platforms: - # If platform or none not available then library isn't available for - # this platform. Create an empty python_library. - _osquery_python_library( - name = name, - visibility = ["PUBLIC"], - deps = deps or [], - ) - else: - # Otherwise plaform is available, create archive rule and make that the - # binary_src for the prebuilt library. - filename = filenames[platform] - sha1sum = sha1sums[platform] - - file_target = _osquery_tp_prebuilt_python_archive( - name, - filename, - platform, - sha1sum, - ) - - binary_src = ":{}".format(file_target) - - _osquery_prebuilt_python_library( - name = name, - binary_src = binary_src, - visibility = ["PUBLIC"], - deps = deps or [], - ) - -def osquery_tp_target(name, lib = None): - return "{}{}/{}:{}".format( - _OSQUERY_CELL_NAME, - _OSQUERY_THIRD_PARTY_PATH, - name, - lib or name, - ) diff --git a/tools/build_defs/oss/osquery/third_party_archive.bzl b/tools/build_defs/oss/osquery/third_party_archive.bzl deleted file mode 100644 index 13a8f986c8b..00000000000 --- a/tools/build_defs/oss/osquery/third_party_archive.bzl +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -_S3_BASE_URL = "https://s3.amazonaws.com/osquery-packages" - -_S3_BASE_DIR = "third-party" - -_S3_PREBUILT_DIR = _S3_BASE_DIR + "/lib" - -def osquery_tp_prebuilt_cxx_archive( - name, - version, - build, - platform, - archive_type, - sha256sum): - archive_name = "{}-{}-{}.{}".format( - name, - version, - build, - archive_type, - ) - - s3_path = "{}/{}/none/{}".format( - _S3_PREBUILT_DIR, - platform, - archive_name, - ) - - s3_url = "{}/{}".format( - _S3_BASE_URL, - s3_path, - ) - - target_name = "{}_{}_{}_pre_built_archive".format( - name, - version, - platform, - ) - - native.http_archive( - name = target_name, - sha256 = sha256sum, - type = archive_type, - urls = [ - s3_url, - ], - ) - - return target_name - -def osquery_tp_source_cxx_archive( - name, - version, - archive_type, - sha256sum): - archive_name = "{}-{}.{}".format( - name, - version, - archive_type, - ) - - s3_path = "{}/{}/{}".format( - _S3_SOURCe_DIR, - archive_name, - ) - - s3_url = "{}/{}".format( - _S3_BASE_URL, - s3_path, - ) - - target_name = "{}_{}_source_archive".format( - name, - version, - ) - - native.http_archive( - name = target_name, - sha256 = sha256sum, - type = archive_type, - urls = [ - s3_url, - ], - ) - - return target_name - -def osquery_tp_prebuilt_python_archive( - name, - filename, - platform, - sha1sum): - if platform == "none": - s3_path = "{}/{}/{}".format( - _S3_PREBUILT_DIR, - platform, - filename, - ) - else: - s3_path = "{}/{}/none/{}".format( - _S3_PREBUILT_DIR, - platform, - filename, - ) - - s3_url = "{}/{}".format( - _S3_BASE_URL, - s3_path, - ) - - target_name = "{}_{}_file".format(name, filename) - - native.remote_file( - name = target_name, - out = filename, - sha1 = sha1sum, - url = s3_url, - ) - - return target_name diff --git a/tools/codegen/BUCK b/tools/codegen/BUCK deleted file mode 100644 index 0db1ff95888..00000000000 --- a/tools/codegen/BUCK +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_filegroup", "osquery_target") -load("//tools/build_defs/oss/osquery:python.bzl", "osquery_python_binary", "osquery_python_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_filegroup( - name = "templates", - srcs = [ - "templates", - ], - visibility = ["PUBLIC"], -) - -osquery_python_library( - name = "lib_genapi", - srcs = [ - "genapi.py", - ], - base_module = "osquery.tools.codegen", -) - -osquery_python_binary( - name = "genapi", - main_module = "osquery.tools.codegen.genapi", - visibility = ["PUBLIC"], - deps = [ - ":lib_genapi", - ], -) - -osquery_python_library( - name = "lib_gentable", - srcs = [ - "gentable.py", - ], - base_module = "osquery.tools.codegen", - deps = [ - osquery_target("tools/tests:tools_test_utils"), - osquery_tp_target("jinja2"), - ], -) - -osquery_python_binary( - name = "gentable", - main_module = "osquery.tools.codegen.gentable", - platform = "py3", - visibility = ["PUBLIC"], - deps = [ - osquery_target("tools/tests:tools_test_utils"), - ":lib_gentable", - ], -) - -osquery_python_library( - name = "lib_amalgamate", - srcs = [ - "amalgamate.py", - ], - base_module = "osquery.tools.codegen", - deps = [ - osquery_target("tools/tests:tools_test_utils"), - osquery_tp_target("jinja2"), - ], -) - -osquery_python_binary( - name = "amalgamate", - main_module = "osquery.tools.codegen.amalgamate", - platform = "py3", - visibility = ["PUBLIC"], - deps = [ - osquery_target("tools/tests:tools_test_utils"), - ":lib_amalgamate", - ], -) - -osquery_python_library( - name = "lib_substitute", - srcs = [ - "substitute.py", - ], - base_module = "osquery.tools.codegen", -) - -osquery_python_binary( - name = "substitute", - main_module = "osquery.tools.codegen.substitute", - platform = "py3", - visibility = ["PUBLIC"], - deps = [ - ":lib_substitute", - ], -) diff --git a/tools/codegen/genapi.py b/tools/codegen/genapi.py index 97d93c13adb..44bffb2e139 100755 --- a/tools/codegen/genapi.py +++ b/tools/codegen/genapi.py @@ -190,7 +190,7 @@ def gen_api(tables_path, profile={}): if spec_file[0] == '.' or spec_file.find("example") == 0: continue # Exclude blacklist specific file - if spec_file == 'blacklist' or spec_file == 'CMakeLists.txt' or spec_file == 'BUCK': + if spec_file == 'blacklist' or spec_file == 'CMakeLists.txt': continue platform = os.path.basename(base) # Exclude kernel tables diff --git a/tools/deployment/make_windows_package.ps1 b/tools/deployment/make_windows_package.ps1 index af1d748fdfd..6a6e2d65c35 100644 --- a/tools/deployment/make_windows_package.ps1 +++ b/tools/deployment/make_windows_package.ps1 @@ -17,7 +17,7 @@ The script will help make both MSI and Chocolatey install packages for Windows. Allows you to specify either MSI or Chocolatety for output. Can be aliased with 'Type' .PARAMETER BuildPath -Allows you to specify a Buck or CMake build. The default is CMake output binaries. Can be aliased with 'Build' +Allows you to specify the output binaries path. The default is build\osquery\RelWithDebInfo. Can be aliased with 'Build' .PARAMETER ConfigFilePath Specify the path to find your osquery config file that you would like to include in the build. Can be aliased with 'ConfigFile' @@ -610,11 +610,6 @@ function Main() { if ($BuildPath -eq '') { # Check the default CMake build location $BuildPath = Join-Path "$PSScriptRoot\..\..\..\" 'build\osquery\RelWithDebInfo' - - # If that path doesn't exist, check the default Buck build location - if (-not (Test-Path $BuildPath)) { - $BuildPath = Join-Path $osqRoot 'buck-out\release\gen\osquery' - } } # Whether specified by the user or not, check that the BuildPath exists diff --git a/tools/generate_buck_config.ps1 b/tools/generate_buck_config.ps1 deleted file mode 100644 index dda1ffe1a6b..00000000000 --- a/tools/generate_buck_config.ps1 +++ /dev/null @@ -1,290 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - - -<# -.SYNOPSIS -This script generates the buck config used to build osquery - -.DESCRIPTION -This script generates a buck configuration file for building osquery. -On sandcastle hosts, the VS and SDK install locations are in C:\tools -so we default the configuration with these values for automation, however -on developer windows virtual machines, we expect that this script is invoked -by provision.ps1, which will already be aware of the SDK and VC install -locations. - -.PARAMETER VsInstall -Location of Visual Studio on the host, defaults to 'C:\tools\toolchains\vs2017_15.5\BuildTools' - -.PARAMETER VcToolsVersion -The version of Visual Studio installed you'd like to use for builds, defaults to `14.12.25827` - -.PARAMETER SdkInstall -The install location of the Windows SDK you'd like to build against, defaults to 'C:\tools\toolchains\vs2017_15.5\WindowsSdk\10.0.16299.91' - -.PARAMETER SdkVersion -The version of the Windows SDK you'd like to build against, defaults to '10.0.16299.0' - -.PARAMETER Python3Path -The path to ones Python3 interpreter - -.PARAMETER BuckConfigRoot -The root directory where you're buck configs are kept - -.EXAMPLE -.\provision\windows\New-VsToolChainBuckConfig.ps1 - -.EXAMPLE -.\provision\windows\New-VsToolChainBuckConfig.ps1 -help - -.EXAMPLE -.\provision\windows\New-VsToolChainBuckConfig.ps1 -VcInstall "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\" - -.NOTES -Last Updated: 05/17/2019 - -.LINK -https://osquery.io - -#> - - -#Requires -Version 3.0 - -# These parameters are global, as we wish to be able to invoke this script directly -param( - [string] $VsInstall = 'C:\tools\toolchains\vs2017_15.5\BuildTools\', - [string] $VcToolsVersion = '14.12.25827', - [string] $SdkInstall = 'C:\tools\toolchains\vs2017_15.5\WindowsSdk\10.0.16299.91', - [string] $SdkVersion = '10.0.16299.0', - [string] $Python3Path = 'C:\Python36\python.exe', - [string] $BuckConfigRoot = (Join-Path $PSScriptRoot "buckconfigs") -) - -function New-VsToolchainBuckConfig { - - Write-Host "[+] Generating buck configs. . . " -ForegroundColor Green - Write-Host " => Checking Visual Studio install" -ForegroundColor Cyan - $vsLocation = '' - - # If the VS Path is an argument or environment var, get it - if ($VsInstall -and (Test-Path $VsInstall)) { - $vsLocation = $VsInstall - } elseif (Test-Path env:VS_INSTALL_LOCATION) { - $vsLocation = $env:VS_INSTALL_LOCATION - } else { - # Otherwise we need to attempt a derivation of it's location with vswhere - $vswhere = (Get-Command 'vswhere').Source - $vsVerArgs = @{ - Command = "$vswhere -latest -legacy -property installationPath" - } - $vsLocation = Invoke-Expression @vsVerArgs - } - - if (-not $vsLocation) { - $msg = '[-] Failed to find Visual Studio, check your install and pass via -VsInstall' - Write-Host $msg -ForegroundColor Red - exit 1 - } - - # It's a bit easier to unify our paths with forward slashes as Windows doesn't mind - $vsLocation = $vsLocation -Replace '\\', '/' - - # We require the specific VS version as it's a part of the path - $vcToolsVer = '' - if ($VcToolsVersion) { - $vcToolsVer = $VcToolsVersion - } elseif (Test-Path env:VC_TOOLS_VERSION) { - $vcToolsVer = $env:VC_TOOLS_VERSION - } else { - $loc = Join-Path $vsLocation "VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt" - $vcToolsVer = Get-Content $loc - } - - $binPath = Join-Path $vsLocation "VC\Tools\MSVC\$vcToolsVer" - if (-not (Test-Path $binPath)) { - $msg = "[-] Failed to find VC tools at $binPath, check Visual Studio install and pass in with -VcToolsVersion" - Write-Host $msg -ForegroundColor Red - exit 1 - } - - Write-Host " => Checking Win10 SDK install" -ForegroundColor Cyan - - $osType = '' - $regPrefix = 'Microsoft' - $arch = (Get-WmiObject -Class Win32_ComputerSystem).SystemType - if ($arch -Match 'x64') { - $regPrefix = 'Wow6432Node' - $osType = 'x64' - } else { - $msg = 'x86 Windows systems are not supported for osquery builds' - Write-Host $msg -ForegroundColor Red - exit 1 - } - - $winSdkPath = '' - if ($SdkInstall -and (Test-Path $SdkInstall) -and $SdkVersion) { - $winSdkPath = $SdkInstall - $winSdkVer = $SdkVersion - } elseif ((Test-Path env:WINDOWS_SDK_INSTALL) -and (env:WINDOWS_SDK_VERSION-ne '')) { - $winSdkPath = env:WINDOWS_SDK_INSTALL - $winSdkVer = env:WINDOWS_SDK_VERSION - } else { - # If both SDK install location and version are not in env or provided, attempt to derive - $regEntry = "HKLM:\SOFTWARE\$regPrefix\Microsoft\Microsoft SDKs\Windows\" - $sdkRegPath = Get-ChildItem -Path $regEntry -Recurse -Name | - Sort-Object | - Select-Object -first 1 - $regEntry = "HKLM:\SOFTWARE\$regPrefix\Microsoft\Microsoft SDKs\Windows\$sdkRegPath" - $winSdkVer = (Get-ItemProperty -Path $regEntry -Name 'ProductVersion').ProductVersion - $winSdkVer += ".0" - $winSdkPath = (Get-ItemProperty -Path $regEntry -Name "InstallationFolder").InstallationFolder - } - - $sdkSPath = Join-Path $winSdkPath "Include\$winSdkVer" - if (-not (Test-Path $sdkSPath)) { - $msg = '[-] Failed to find WinSDK, check install and pass in with -SdkInstall and -SdkVersion' - Write-Host $msg -ForegroundColor Red - exit 1 - } - - # If the Python3 path doesn't exist, or isn't accurate, attempt to resolve it - $python3 = '' - if (-not $Python3Path -or (-not (Test-Path $Python3Path))) { - # First check to see if the python in the path is version 3+ - $pathPython = (Get-Command 'python').Source - $ver = Invoke-Expression "$pathPython --version" - if ('3' -Match $ver) { - $python3 = $pathPython - } else { - # If both SDK install location and version are not in env or provided, attempt to derive - $regEntry = "HKCU:\Software\Python\PythonCore\" - $pyVer = Get-ChildItem -Path $regEntry -Recurse -Name | Sort-Object | Select-Object -first 1 - $regEntry = "HKCU:\Software\Python\PythonCore\$pyVer\InstallPath" - $python3 = (Get-ItemProperty -Path $regEntry -Name 'ExecutablePath').ExecutablePath - } - } else { - $python3 = $Python3Path - } - if (-not $python3 -or (-not (Test-Path $python3))) { - Write-Host 'Failed to find python3, check install' -ForegroundColor Red - exit 1 - } - - $toolchain_template = @' -[cxx#windows-x86_64] - cpp = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/cl.exe" - cpp_type = windows - - cc = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/cl.exe" - cc_type = windows - - cxxpp = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/cl.exe" - cxxpp_type = windows - - cxx = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/cl.exe" - cxx_type = windows - - asmpp = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/ml64.exe" - asmpp_type = windows - - asm = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/ml64.exe" - asm_type = windows_ml64 - - ld = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/link.exe" - linker_platform = windows - - ar = "VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/bin/HostOS_TYPE/OS_TYPE/lib.exe" - archiver_platform = windows - -[cxx_toolchain] - cppflags = \ - /I"VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/include" \ - /I"VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/atlmfc/include" \ - /I"VS_INSTALL_LOCATION/VC/Auxiliary/VS/include" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/shared" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/ucrt" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/um" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/winrt" - - cflags = - - cxxppflags = \ - /I"VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/include" \ - /I"VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/atlmfc/include" \ - /I"VS_INSTALL_LOCATION/VC/Auxiliary/VS/include" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/shared" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/ucrt" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/um" \ - /I"WIN_SDK_INSTALL_LOCATION/Include/WIN_SDK_VERSION/winrt" - - cxxflags = - - ldflags = \ - /LIBPATH:"VS_INSTALL_LOCATION/VC/Tools/MSVC/VS_TOOLS_VERSION/lib/OS_TYPE" \ - /LIBPATH:"WIN_SDK_INSTALL_LOCATION/Lib/WIN_SDK_VERSION/ucrt/OS_TYPE" \ - /LIBPATH:"WIN_SDK_INSTALL_LOCATION/Lib/WIN_SDK_VERSION/um/OS_TYPE" - -[python#py3] - interpreter = PYTHON3_PATH -'@ - - Write-Host " => Generating Buck Config for Win10 builds" -ForegroundColor Cyan - - $vsLocation = $vsLocation -Replace '\\', '/' - $winSdkPath = $winSdkPath -Replace '\\', '/' - $python3 = $python3 -Replace '\\', '/' - - $toolchain_template = $toolchain_template -Replace 'VS_INSTALL_LOCATION', $vsLocation - $toolchain_template = $toolchain_template -Replace 'VS_TOOLS_VERSION', $vcToolsVer - - $toolchain_template = $toolchain_template -Replace 'OS_TYPE', $osType - $toolchain_template = $toolchain_template -Replace 'WIN_SDK_INSTALL_LOCATION', $winSdkPath - $toolchain_template = $toolchain_template -Replace 'WIN_SDK_VERSION', $winSdkVer - - $toolchain_template = $toolchain_template -Replace 'PYTHON3_PATH', $python3 - - $toolchain_template = $toolchain_template -Replace '//', '/' - - $cxx_cpp = "$vsLocation/VC/Tools/MSVC/$vcToolsVer/bin/Host$osType/$osType/" - $winSdkIncludePath = "$winSdkPath/Include/$winSdkVer/" - $winSdkLibPath = "$winSdkPath/Lib/$winSdkVer/um/$osType" - - if (-not (Test-Path $cxx_cpp)) { - $msg = "[-] Failed to find VC bin toolchain, check VS installation." - Write-Host $msg -ForegroundColor Red - exit 1 - } - if (-not (Test-Path $winSdkIncludePath)) { - $msg = "[-] Failed to find Win10 SDK Includes directory, check provisioning output." - Write-Host $msg -ForegroundColor Red - exit 1 - } - if (-not (Test-Path $winSdkLibPath)) { - $msg = "[-] Failed to find Win10 SDK Lib directory, check provisioning output." - Write-Host $msg -ForegroundColor Red - exit 1 - } - - # Only write out the file if all paths were able to be derived - $buck_root = Join-Path $BuckConfigRoot "windows-x86_64/toolchain" - if (-not (Test-Path $buck_root)) { - New-Item -ItemType Directory $buck_root - } - $bcfg = (Join-Path $buck_root "vs2017_15.5.bcfg") - $outArgs = @{ - FilePath = $bcfg - Encoding = "utf8" - InputObject = $toolchain_template - } - Out-File @outArgs - Write-Host "Buck config written to $bcfg" -ForegroundColor Green -} - -$null = New-VsToolchainBuckConfig diff --git a/tools/tests/BUCK b/tools/tests/BUCK deleted file mode 100644 index 38ef1415da9..00000000000 --- a/tools/tests/BUCK +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:python.bzl", "osquery_python_library") -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_filegroup") - -osquery_python_library( - name = "tools_test_utils", - srcs = [ - "utils.py", - ], - base_module = "osquery_tests.tools.tests", - visibility = ["PUBLIC"], -) - -osquery_filegroup( - name = "python_script_files", - srcs = glob([ - "*.py", - ]), - visibility = ["PUBLIC"], -) diff --git a/tools/tests/configs/BUCK b/tools/tests/configs/BUCK deleted file mode 100644 index a11942c50c7..00000000000 --- a/tools/tests/configs/BUCK +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed as defined on the LICENSE file found in the -# root directory of this source tree. - -load("//tools/build_defs/oss/osquery:native.bzl", "osquery_filegroup") - -osquery_filegroup( - name = "conf_files", - srcs = glob([ - "*.conf", - ]), - visibility = ["PUBLIC"], -) - -osquery_filegroup( - name = "config_files", - srcs = glob([ - "*.config", - ]), - visibility = ["PUBLIC"], -) - -osquery_filegroup( - name = "plist_files", - srcs = glob([ - "*.plist", - ]), - visibility = ["PUBLIC"], -) - -osquery_filegroup( - name = "test_files", - srcs = glob([ - "*", - ]), - visibility = ["PUBLIC"], -) - -osquery_filegroup( - name = "aws_files", - srcs = glob([ - "aws/*", - ]), - visibility = ["PUBLIC"], -) -