Date: Thursday, October 13, 2022 @ 17:24:46
Author: anatolik
Revision: 1328022
archrelease: copy trunk to community-x86_64
Added:
osquery/repos/community-x86_64/PKGBUILD
(from rev 1328021, osquery/trunk/PKGBUILD)
osquery/repos/community-x86_64/ebpf-common.patch
(from rev 1328021, osquery/trunk/ebpf-common.patch)
osquery/repos/community-x86_64/fixes.patch
(from rev 1328021, osquery/trunk/fixes.patch)
osquery/repos/community-x86_64/libaudit.patch
(from rev 1328021, osquery/trunk/libaudit.patch)
osquery/repos/community-x86_64/rocksdb.patch
(from rev 1328021, osquery/trunk/rocksdb.patch)
Deleted:
osquery/repos/community-x86_64/PKGBUILD
osquery/repos/community-x86_64/ebpf-common.patch
osquery/repos/community-x86_64/fixes.patch
osquery/repos/community-x86_64/libaudit.patch
osquery/repos/community-x86_64/rocksdb.patch
-------------------+
PKGBUILD | 114 ++++----
ebpf-common.patch | 72 ++---
fixes.patch | 666 ++++++++++++++++++++++++++--------------------------
libaudit.patch | 24 -
rocksdb.patch | 234 +++++++++---------
5 files changed, 555 insertions(+), 555 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-10-13 17:24:13 UTC (rev 1328021)
+++ PKGBUILD 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -1,57 +0,0 @@
-# Maintainer: Anatol Pomozov
-
-pkgname=osquery
-pkgver=5.5.1
-pkgrel=1
-pkgdesc='SQL powered operating system instrumentation, monitoring, and
analytics'
-arch=(x86_64)
-url='https://osquery.io'
-license=(Apache GPL2)
-makedepends=(cmake ninja clang python gcc-libs git libunwind)
-source=(git+https://github.com/osquery/osquery.git#tag=$pkgver
- fixes.patch
- rocksdb.patch
- ebpf-common.patch
- libaudit.patch)
-sha256sums=('SKIP'
- '012fbeb4b3cdf16e4cc7d6e035b09a6dcd49e7184bd6c6a75c58d00ddef39eaa'
- 'd00f92037708c7e90fcb2b0d81170d2e89d7972d8e2aee4369027501b5dd7d45'
- '88cba2eebd12079bf3a4a8c5ba4ed34b1b5ccd9f9ac3fa518f1591396176666d'
- '96218ef5b7d6d6deb3a7b4b3dfed8068b7e4d10acd5b19372b9882f89d4478a8')
-
-prepare() {
- cd osquery
-
- # the patches come from https://github.com/anatol/osquery
- patch -p1 < ../fixes.patch
- patch -p1 < ../rocksdb.patch
- # git does not pick .gitmodules changes for some reason. add the submodule
explicitly.
- #mkdir libraries/cmake/source/snappy/src
- git submodule add https://github.com/google/snappy
libraries/cmake/source/snappy/src
-
- git submodule update --init --recursive
-
- (cd $srcdir/osquery/libraries/cmake/source/libaudit/src && patch -p1 <
$srcdir/libaudit.patch)
- (cd $srcdir/osquery/libraries/cmake/source/ebpfpub/src/ && git submodule
update --init && cd libraries/ebpf-common/src/ && patch -p1 <
$srcdir/ebpf-common.patch)
-}
-
-build() {
- cd osquery
-
- CC=clang CXX=clang++ cmake \
- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
-DOSQUERY_VERSION=$pkgver \
- -G Ninja -S . -B build
-
- ninja -C build
-}
-
-package() {
- cd osquery
-
- DESTDIR="${pkgdir}" ninja -C build install
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm644 tools/deployment/osquery.example.conf
"$pkgdir/etc/osquery/osquery.conf"
- install -Dm644 tools/deployment/linux_packaging/osqueryd.sysconfig
"$pkgdir/etc/sysconfig/osqueryd"
- install -Dm644 tools/deployment/linux_packaging/rpm/osqueryd.service
"$pkgdir/usr/lib/systemd/system/osqueryd.service"
- rm -r $pkgdir/control
-}
Copied: osquery/repos/community-x86_64/PKGBUILD (from rev 1328021,
osquery/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -0,0 +1,57 @@
+# Maintainer: Anatol Pomozov
+
+pkgname=osquery
+pkgver=5.6.0
+pkgrel=1
+pkgdesc='SQL powered operating system instrumentation, monitoring, and
analytics'
+arch=(x86_64)
+url='https://osquery.io'
+license=(Apache GPL2)
+makedepends=(cmake ninja clang python gcc-libs git libunwind)
+source=(git+https://github.com/osquery/osquery.git#tag=$pkgver
+ fixes.patch
+ rocksdb.patch
+ ebpf-common.patch
+ libaudit.patch)
+sha256sums=('SKIP'
+ 'b8a570a39a397e05237eeee950adba9fc67ff20b268b25818bbdfd6e6b616e64'
+ 'f68fea00796db328edca1bc5e7a437522779220414f40c03708dc2ff9201cc8e'
+ '88cba2eebd12079bf3a4a8c5ba4ed34b1b5ccd9f9ac3fa518f1591396176666d'
+ '96218ef5b7d6d6deb3a7b4b3dfed8068b7e4d10acd5b19372b9882f89d4478a8')
+
+prepare() {
+ cd osquery
+
+ # the patches come from https://github.com/anatol/osquery
+ patch -p1 < ../fixes.patch
+ patch -p1 < ../rocksdb.patch
+ # git does not pick .gitmodules changes for some reason. add the submodule
explicitly.
+ #mkdir libraries/cmake/source/snappy/src
+ git submodule add https://github.com/google/snappy
libraries/cmake/source/snappy/src
+
+ git submodule update --init --recursive
+
+ (cd $srcdir/osquery/libraries/cmake/source/libaudit/src && patch -p1 <
$srcdir/libaudit.patch)
+ (cd $srcdir/osquery/libraries/cmake/source/ebpfpub/src/ && git submodule
update --init && cd libraries/ebpf-common/src/ && patch -p1 <
$srcdir/ebpf-common.patch)
+}
+
+build() {
+ cd osquery
+
+ CC=clang CXX=clang++ cmake \
+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
-DOSQUERY_VERSION=$pkgver \
+ -G Ninja -S . -B build
+
+ ninja -C build
+}
+
+package() {
+ cd osquery
+
+ DESTDIR="${pkgdir}" ninja -C build install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 tools/deployment/osquery.example.conf
"$pkgdir/etc/osquery/osquery.conf"
+ install -Dm644 tools/deployment/linux_packaging/osqueryd.sysconfig
"$pkgdir/etc/sysconfig/osqueryd"
+ install -Dm644 tools/deployment/linux_packaging/rpm/osqueryd.service
"$pkgdir/usr/lib/systemd/system/osqueryd.service"
+ rm -r $pkgdir/control
+}
Deleted: ebpf-common.patch
===================================================================
--- ebpf-common.patch 2022-10-13 17:24:13 UTC (rev 1328021)
+++ ebpf-common.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -1,36 +0,0 @@
-diff --git a/ebpf/src/tracepointdescriptor.cpp
b/ebpf/src/tracepointdescriptor.cpp
-index 29c3219..2758cc5 100644
---- a/ebpf/src/tracepointdescriptor.cpp
-+++ b/ebpf/src/tracepointdescriptor.cpp
-@@ -7,6 +7,7 @@
- */
-
- #include <algorithm>
-+#include <array>
- #include <cassert>
- #include <fstream>
- #include <iostream>
-diff --git a/error/include/tob/error/erroror.h
b/error/include/tob/error/erroror.h
-index 1d5a13d..f627a09 100644
---- a/error/include/tob/error/erroror.h
-+++ b/error/include/tob/error/erroror.h
-@@ -10,6 +10,7 @@
-
- #include <stdexcept>
- #include <variant>
-+#include <utility>
-
- namespace tob {
- template <typename ValueType, typename ErrorType> class ErrorOr final {
-diff --git a/error/include/tob/error/successor.h
b/error/include/tob/error/successor.h
-index 6d8260e..4f19845 100644
---- a/error/include/tob/error/successor.h
-+++ b/error/include/tob/error/successor.h
-@@ -10,6 +10,7 @@
-
- #include <optional>
- #include <stdexcept>
-+#include <utility>
-
- namespace tob {
- template <typename ErrorType> class SuccessOr final {
Copied: osquery/repos/community-x86_64/ebpf-common.patch (from rev 1328021,
osquery/trunk/ebpf-common.patch)
===================================================================
--- ebpf-common.patch (rev 0)
+++ ebpf-common.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -0,0 +1,36 @@
+diff --git a/ebpf/src/tracepointdescriptor.cpp
b/ebpf/src/tracepointdescriptor.cpp
+index 29c3219..2758cc5 100644
+--- a/ebpf/src/tracepointdescriptor.cpp
++++ b/ebpf/src/tracepointdescriptor.cpp
+@@ -7,6 +7,7 @@
+ */
+
+ #include <algorithm>
++#include <array>
+ #include <cassert>
+ #include <fstream>
+ #include <iostream>
+diff --git a/error/include/tob/error/erroror.h
b/error/include/tob/error/erroror.h
+index 1d5a13d..f627a09 100644
+--- a/error/include/tob/error/erroror.h
++++ b/error/include/tob/error/erroror.h
+@@ -10,6 +10,7 @@
+
+ #include <stdexcept>
+ #include <variant>
++#include <utility>
+
+ namespace tob {
+ template <typename ValueType, typename ErrorType> class ErrorOr final {
+diff --git a/error/include/tob/error/successor.h
b/error/include/tob/error/successor.h
+index 6d8260e..4f19845 100644
+--- a/error/include/tob/error/successor.h
++++ b/error/include/tob/error/successor.h
+@@ -10,6 +10,7 @@
+
+ #include <optional>
+ #include <stdexcept>
++#include <utility>
+
+ namespace tob {
+ template <typename ErrorType> class SuccessOr final {
Deleted: fixes.patch
===================================================================
--- fixes.patch 2022-10-13 17:24:13 UTC (rev 1328021)
+++ fixes.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -1,333 +0,0 @@
-commit 64081e3051680b28549a1c4479b7feed63ed22ad
-Author: Anatol Pomozov <[email protected]>
-Date: Tue Sep 21 09:46:53 2021 -0700
-
- Arch Linux specific fixes
-
-diff --git a/cmake/flags.cmake b/cmake/flags.cmake
-index aad71a397..6dcb6d44c 100644
---- a/cmake/flags.cmake
-+++ b/cmake/flags.cmake
-@@ -84,11 +84,9 @@ function(setupBuildFlags)
- -Woverloaded-virtual
- -Wnon-virtual-dtor
- -Weffc++
-- -stdlib=libc++
- )
-
- set(posix_cxx_link_options
-- -stdlib=libc++
- -ldl
- )
-
-@@ -179,7 +177,6 @@ function(setupBuildFlags)
- )
-
- set(linux_cxx_link_libraries
-- c++abi
- rt
- dl
- )
-@@ -228,7 +225,6 @@ function(setupBuildFlags)
- )
-
- set(macos_cxx_link_options
-- -stdlib=libc++
- -lresolv
- )
-
-@@ -237,7 +233,6 @@ function(setupBuildFlags)
- cups
- bsm
- xar
-- c++abi
- "-framework AppKit"
- "-framework Foundation"
- "-framework CoreServices"
-diff --git
a/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
b/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
-index 1c69ad5d1..3623cd58a 100644
---- a/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
-+++ b/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
-@@ -914,9 +914,6 @@
- /* Define to 1 if you have the <ws2tcpip.h> header file. */
- /* #undef HAVE_WS2TCPIP_H */
-
--/* Define to 1 if you have the <xlocale.h> header file. */
--#define HAVE_XLOCALE_H 1
--
- /* Define to 1 if the system has the type `_Bool'. */
- #define HAVE__BOOL 1
-
-diff --git
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
-index 1c69ad5d1..3623cd58a 100644
----
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
-+++
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
-@@ -914,9 +914,6 @@
- /* Define to 1 if you have the <ws2tcpip.h> header file. */
- /* #undef HAVE_WS2TCPIP_H */
-
--/* Define to 1 if you have the <xlocale.h> header file. */
--#define HAVE_XLOCALE_H 1
--
- /* Define to 1 if the system has the type `_Bool'. */
- #define HAVE__BOOL 1
-
-diff --git
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
-index 4f9baece2..0230ce625 100644
---- a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
-+++ b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
-@@ -48,11 +48,6 @@
- /* NetBSD 5.0 mis-defines NULL. */
- #include <stddef.h>
-
--/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
--#if 1
--# include <xlocale.h>
--#endif
--
- /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
- /* C++ compatible function declaration macros.
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
-diff --git a/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
b/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
-index ec8a7c01e..52465a38f 100644
---- a/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
-+++ b/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
-@@ -361,7 +361,7 @@ typedef uint64_t uintmax_t;
- /* #undef HAVE_ACL_SET_FILE */
-
- /* Define to 1 if you have the `arc4random_buf' function. */
--/* #undef HAVE_ARC4RANDOM_BUF */
-+#define HAVE_ARC4RANDOM_BUF 1
-
- /* Define to 1 if you have the <attr/xattr.h> header file. */
- /* #undef HAVE_ATTR_XATTR_H */
-diff --git a/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
b/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
-index ec8a7c01e..52465a38f 100644
---- a/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
-+++ b/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
-@@ -361,7 +361,7 @@ typedef uint64_t uintmax_t;
- /* #undef HAVE_ACL_SET_FILE */
-
- /* Define to 1 if you have the `arc4random_buf' function. */
--/* #undef HAVE_ARC4RANDOM_BUF */
-+#define HAVE_ARC4RANDOM_BUF 1
-
- /* Define to 1 if you have the <attr/xattr.h> header file. */
- /* #undef HAVE_ATTR_XATTR_H */
-diff --git a/libraries/cmake/source/libdpkg/config/x86_64/config.h
b/libraries/cmake/source/libdpkg/config/x86_64/config.h
-index eafef658b..51c4e6a91 100644
---- a/libraries/cmake/source/libdpkg/config/x86_64/config.h
-+++ b/libraries/cmake/source/libdpkg/config/x86_64/config.h
-@@ -296,9 +296,6 @@
- /* Define to 1 if 'WCOREDUMP' is declared in <sys/wait.h> */
- #define HAVE_WCOREDUMP 1
-
--/* Define to 1 if you have the <xlocale.h> header file. */
--#define HAVE_XLOCALE_H 1
--
- /* Define to 1 if you have the `__cxa_pure_virtual' function. */
- /* #undef HAVE___CXA_PURE_VIRTUAL */
-
-diff --git a/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
b/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
-index 759ba47d2..4f8fbe63c 100644
---- a/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
-+++ b/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
-@@ -249,9 +249,6 @@
- /* Define to 1 if `vfork' works. */
- #define HAVE_WORKING_VFORK 1
-
--/* Define to 1 if you have the <xlocale.h> header file. */
--#define HAVE_XLOCALE_H 1
--
- /* Define to 1 if you have the <zlib.h> header file. */
- #define HAVE_ZLIB_H 1
-
-diff --git a/libraries/cmake/source/thrift/CMakeLists.txt
b/libraries/cmake/source/thrift/CMakeLists.txt
-index 0b224a159..6f0d824dd 100644
---- a/libraries/cmake/source/thrift/CMakeLists.txt
-+++ b/libraries/cmake/source/thrift/CMakeLists.txt
-@@ -83,13 +83,6 @@ function(thriftMain)
- "${library_root}/src/thrift/transport/TWebSocketServer.h"
- )
-
-- if(PLATFORM_POSIX)
-- set(tsocket_pool_compile_options "-include;random_shuffle.h")
--
-- elseif(PLATFORM_WINDOWS)
-- set(tsocket_pool_compile_options "/FIrandom_shuffle.h")
-- endif()
--
-
set_source_files_properties("${library_root}/src/thrift/transport/TSocketPool.cpp"
PROPERTIES
- COMPILE_OPTIONS
- "${tsocket_pool_compile_options}"
-diff --git a/osquery/core/shutdown.cpp b/osquery/core/shutdown.cpp
-index 522bde887..9812ebf44 100644
---- a/osquery/core/shutdown.cpp
-+++ b/osquery/core/shutdown.cpp
-@@ -11,6 +11,7 @@
- #include <osquery/logger/data_logger.h>
-
- #include <atomic>
-+#include <condition_variable>
- #include <mutex>
- #include <string>
-
-diff --git a/osquery/logger/logger.cpp b/osquery/logger/logger.cpp
-index ed8391f48..9702f203c 100644
---- a/osquery/logger/logger.cpp
-+++ b/osquery/logger/logger.cpp
-@@ -13,6 +13,7 @@
-
- #include <algorithm>
- #include <future>
-+#include <iomanip>
- #include <optional>
- #include <queue>
- #include <thread>
-diff --git a/osquery/tables/networking/CMakeLists.txt
b/osquery/tables/networking/CMakeLists.txt
-index 0f0ef1fc1..fb06352fc 100644
---- a/osquery/tables/networking/CMakeLists.txt
-+++ b/osquery/tables/networking/CMakeLists.txt
-@@ -30,6 +30,10 @@ function(generateOsqueryTablesNetworking)
- posix/interfaces.cpp
- posix/utils.cpp
- )
-+
-+ list(APPEND platform_deps
-+ resolv
-+ )
- endif()
-
- if(DEFINED PLATFORM_LINUX)
-diff --git a/osquery/tables/system/linux/sysctl_utils.cpp
b/osquery/tables/system/linux/sysctl_utils.cpp
-index 1ff3e0b00..b66ecc79e 100644
---- a/osquery/tables/system/linux/sysctl_utils.cpp
-+++ b/osquery/tables/system/linux/sysctl_utils.cpp
-@@ -7,8 +7,6 @@
- * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
- */
-
--#include <sys/sysctl.h>
--
- #include <boost/algorithm/string/trim.hpp>
-
- #include <osquery/core/tables.h>
-@@ -73,10 +71,8 @@ void genControlInfo(int* oid,
- // Get control size
- size_t response_size = CTL_MAX_VALUE;
- char response[CTL_MAX_VALUE + 1] = {0};
-- if (sysctl(oid, oid_size, response, &response_size, 0, 0) != 0) {
-- // Cannot request MIB data.
-- return;
-- }
-+ // Cannot request MIB data.
-+ return;
-
- // Data is output, but no way to determine type (long, int, string, struct).
- Row r;
-diff --git a/osquery/tables/system/posix/augeas.cpp
b/osquery/tables/system/posix/augeas.cpp
-index fb09411d8..615f7adea 100644
---- a/osquery/tables/system/posix/augeas.cpp
-+++ b/osquery/tables/system/posix/augeas.cpp
-@@ -35,7 +35,7 @@ FLAG(string,
- #else
- FLAG(string,
- augeas_lenses,
-- "/opt/osquery/share/osquery/lenses",
-+ "/usr/share/osquery/lenses",
- "Directory that contains augeas lenses files");
- #endif
-
-diff --git a/osquery/tables/system/posix/openssl_utils.cpp
b/osquery/tables/system/posix/openssl_utils.cpp
-index 9d4734c3c..37bb4857f 100644
---- a/osquery/tables/system/posix/openssl_utils.cpp
-+++ b/osquery/tables/system/posix/openssl_utils.cpp
-@@ -12,7 +12,9 @@
- #include <array>
- #include <ctime>
- #include <iomanip>
-+#include <memory>
- #include <sstream>
-+#include <cstring>
- #include <string>
-
- #include <osquery/core/core.h>
-diff --git a/osquery/tables/system/posix/sysctl_utils.h
b/osquery/tables/system/posix/sysctl_utils.h
-index e119f8a9e..0d4a399e4 100644
---- a/osquery/tables/system/posix/sysctl_utils.h
-+++ b/osquery/tables/system/posix/sysctl_utils.h
-@@ -9,8 +9,6 @@
-
- #pragma once
-
--#include <sys/sysctl.h>
--
- #include <osquery/core/tables.h>
-
- namespace osquery {
-@@ -18,6 +16,8 @@ namespace tables {
-
- #define CTL_MAX_VALUE 128
-
-+#define CTL_MAXNAME 12
-+
- #ifndef CTL_DEBUG_MAXID
- #define CTL_DEBUG_MAXID (CTL_MAXNAME * 2)
- #endif
-diff --git a/osquery/utils/config/default_paths.h
b/osquery/utils/config/default_paths.h
-index cda34298e..1c45718f3 100644
---- a/osquery/utils/config/default_paths.h
-+++ b/osquery/utils/config/default_paths.h
-@@ -26,7 +26,7 @@
- #define OSQUERY_SOCKET OSQUERY_DB_HOME
- #define OSQUERY_PIDFILE "/var/run/"
- #define OSQUERY_LOG_HOME "/var/log/osquery/"
--#define OSQUERY_CERTS_HOME "/opt/osquery/share/osquery/certs/"
-+#define OSQUERY_CERTS_HOME "/usr/share/osquery/certs/"
- #elif defined(WIN32)
- #define OSQUERY_HOME "\\Program Files\\osquery\\"
- #define OSQUERY_DB_HOME OSQUERY_HOME
-diff --git a/tools/deployment/linux_packaging/rpm/osqueryd.service
b/tools/deployment/linux_packaging/rpm/osqueryd.service
-index 6aa42752f..7bb3b3dc9 100644
---- a/tools/deployment/linux_packaging/rpm/osqueryd.service
-+++ b/tools/deployment/linux_packaging/rpm/osqueryd.service
-@@ -7,7 +7,7 @@ TimeoutStartSec=0
- EnvironmentFile=/etc/sysconfig/osqueryd
- ExecStartPre=/bin/sh -c "if [ ! -f $FLAG_FILE ]; then touch $FLAG_FILE; fi"
- ExecStartPre=/bin/sh -c "if [ -f $LOCAL_PIDFILE ]; then mv $LOCAL_PIDFILE
$PIDFILE; fi"
--ExecStart=/opt/osquery/bin/osqueryd \
-+ExecStart=/usr/bin/osqueryd \
- --flagfile $FLAG_FILE \
- --config_path $CONFIG_FILE
- Restart=on-failure
-diff --git a/tools/deployment/osquery.example.conf
b/tools/deployment/osquery.example.conf
-index 6fd3594ea..1b2b888ca 100644
---- a/tools/deployment/osquery.example.conf
-+++ b/tools/deployment/osquery.example.conf
-@@ -41,19 +41,19 @@
- // There are several 'default' packs installed via
- // packages and/or Homebrew.
- //
-- // Linux: /opt/osquery/share/osquery/packs
-+ // Linux: /usr/share/osquery/packs
- // OS X: /var/osquery/packs
- // Homebrew: /usr/local/share/osquery/packs
- // make install: {PREFIX}/share/osquery/packs
- //
- "packs": {
-- // "osquery-monitoring":
"/opt/osquery/share/osquery/packs/osquery-monitoring.conf",
-- // "incident-response":
"/opt/osquery/share/osquery/packs/incident-response.conf",
-- // "it-compliance": "/opt/osquery/share/osquery/packs/it-compliance.conf",
-+ // "osquery-monitoring":
"/usr/share/osquery/packs/osquery-monitoring.conf",
-+ // "incident-response": "/usr/share/osquery/packs/incident-response.conf",
-+ // "it-compliance": "/usr/share/osquery/packs/it-compliance.conf",
- // "osx-attacks": "/var/osquery/packs/osx-attacks.conf",
-- // "vuln-management":
"/opt/osquery/share/osquery/packs/vuln-management.conf",
-- // "hardware-monitoring":
"/opt/osquery/share/osquery/packs/hardware-monitoring.conf",
-- // "ossec-rootkit": "/opt/osquery/share/osquery/packs/ossec-rootkit.conf",
-+ // "vuln-management": "/usr/share/osquery/packs/vuln-management.conf",
-+ // "hardware-monitoring":
"/usr/share/osquery/packs/hardware-monitoring.conf",
-+ // "ossec-rootkit": "/usr/share/osquery/packs/ossec-rootkit.conf",
- // "windows-hardening": "C:\\Program
Files\\osquery\\packs\\windows-hardening.conf",
- // "windows-attacks": "C:\\Program
Files\\osquery\\packs\\windows-attacks.conf"
- },
Copied: osquery/repos/community-x86_64/fixes.patch (from rev 1328021,
osquery/trunk/fixes.patch)
===================================================================
--- fixes.patch (rev 0)
+++ fixes.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -0,0 +1,333 @@
+commit cbb5568c62304fe0b9818dea18dcb1e8f4572866
+Author: Anatol Pomozov <[email protected]>
+Date: Tue Sep 21 09:46:53 2021 -0700
+
+ Arch Linux specific fixes
+
+diff --git a/cmake/flags.cmake b/cmake/flags.cmake
+index aad71a397..6dcb6d44c 100644
+--- a/cmake/flags.cmake
++++ b/cmake/flags.cmake
+@@ -84,11 +84,9 @@ function(setupBuildFlags)
+ -Woverloaded-virtual
+ -Wnon-virtual-dtor
+ -Weffc++
+- -stdlib=libc++
+ )
+
+ set(posix_cxx_link_options
+- -stdlib=libc++
+ -ldl
+ )
+
+@@ -179,7 +177,6 @@ function(setupBuildFlags)
+ )
+
+ set(linux_cxx_link_libraries
+- c++abi
+ rt
+ dl
+ )
+@@ -228,7 +225,6 @@ function(setupBuildFlags)
+ )
+
+ set(macos_cxx_link_options
+- -stdlib=libc++
+ -lresolv
+ )
+
+@@ -237,7 +233,6 @@ function(setupBuildFlags)
+ cups
+ bsm
+ xar
+- c++abi
+ "-framework AppKit"
+ "-framework Foundation"
+ "-framework CoreServices"
+diff --git
a/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
b/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
+index 1c69ad5d1..3623cd58a 100644
+--- a/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
++++ b/libraries/cmake/source/augeas/generated/linux/x86_64/config/config.h
+@@ -914,9 +914,6 @@
+ /* Define to 1 if you have the <ws2tcpip.h> header file. */
+ /* #undef HAVE_WS2TCPIP_H */
+
+-/* Define to 1 if you have the <xlocale.h> header file. */
+-#define HAVE_XLOCALE_H 1
+-
+ /* Define to 1 if the system has the type `_Bool'. */
+ #define HAVE__BOOL 1
+
+diff --git
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
+index 1c69ad5d1..3623cd58a 100644
+---
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
++++
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/config/config.h
+@@ -914,9 +914,6 @@
+ /* Define to 1 if you have the <ws2tcpip.h> header file. */
+ /* #undef HAVE_WS2TCPIP_H */
+
+-/* Define to 1 if you have the <xlocale.h> header file. */
+-#define HAVE_XLOCALE_H 1
+-
+ /* Define to 1 if the system has the type `_Bool'. */
+ #define HAVE__BOOL 1
+
+diff --git
a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
+index 4f9baece2..0230ce625 100644
+--- a/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
++++ b/libraries/cmake/source/augeas/gnulib/generated/linux/x86_64/lib/locale.h
+@@ -48,11 +48,6 @@
+ /* NetBSD 5.0 mis-defines NULL. */
+ #include <stddef.h>
+
+-/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
+-#if 1
+-# include <xlocale.h>
+-#endif
+-
+ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+ /* C++ compatible function declaration macros.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+diff --git a/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
b/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
+index ec8a7c01e..52465a38f 100644
+--- a/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
++++ b/libraries/cmake/source/libarchive/config/linux/aarch64/config.h
+@@ -361,7 +361,7 @@ typedef uint64_t uintmax_t;
+ /* #undef HAVE_ACL_SET_FILE */
+
+ /* Define to 1 if you have the `arc4random_buf' function. */
+-/* #undef HAVE_ARC4RANDOM_BUF */
++#define HAVE_ARC4RANDOM_BUF 1
+
+ /* Define to 1 if you have the <attr/xattr.h> header file. */
+ /* #undef HAVE_ATTR_XATTR_H */
+diff --git a/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
b/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
+index ec8a7c01e..52465a38f 100644
+--- a/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
++++ b/libraries/cmake/source/libarchive/config/linux/x86_64/config.h
+@@ -361,7 +361,7 @@ typedef uint64_t uintmax_t;
+ /* #undef HAVE_ACL_SET_FILE */
+
+ /* Define to 1 if you have the `arc4random_buf' function. */
+-/* #undef HAVE_ARC4RANDOM_BUF */
++#define HAVE_ARC4RANDOM_BUF 1
+
+ /* Define to 1 if you have the <attr/xattr.h> header file. */
+ /* #undef HAVE_ATTR_XATTR_H */
+diff --git a/libraries/cmake/source/libdpkg/config/x86_64/config.h
b/libraries/cmake/source/libdpkg/config/x86_64/config.h
+index eafef658b..51c4e6a91 100644
+--- a/libraries/cmake/source/libdpkg/config/x86_64/config.h
++++ b/libraries/cmake/source/libdpkg/config/x86_64/config.h
+@@ -296,9 +296,6 @@
+ /* Define to 1 if 'WCOREDUMP' is declared in <sys/wait.h> */
+ #define HAVE_WCOREDUMP 1
+
+-/* Define to 1 if you have the <xlocale.h> header file. */
+-#define HAVE_XLOCALE_H 1
+-
+ /* Define to 1 if you have the `__cxa_pure_virtual' function. */
+ /* #undef HAVE___CXA_PURE_VIRTUAL */
+
+diff --git a/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
b/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
+index 759ba47d2..4f8fbe63c 100644
+--- a/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
++++ b/libraries/cmake/source/libmagic/config/linux/x86_64/config.h
+@@ -249,9 +249,6 @@
+ /* Define to 1 if `vfork' works. */
+ #define HAVE_WORKING_VFORK 1
+
+-/* Define to 1 if you have the <xlocale.h> header file. */
+-#define HAVE_XLOCALE_H 1
+-
+ /* Define to 1 if you have the <zlib.h> header file. */
+ #define HAVE_ZLIB_H 1
+
+diff --git a/libraries/cmake/source/thrift/CMakeLists.txt
b/libraries/cmake/source/thrift/CMakeLists.txt
+index 0b224a159..6f0d824dd 100644
+--- a/libraries/cmake/source/thrift/CMakeLists.txt
++++ b/libraries/cmake/source/thrift/CMakeLists.txt
+@@ -83,13 +83,6 @@ function(thriftMain)
+ "${library_root}/src/thrift/transport/TWebSocketServer.h"
+ )
+
+- if(PLATFORM_POSIX)
+- set(tsocket_pool_compile_options "-include;random_shuffle.h")
+-
+- elseif(PLATFORM_WINDOWS)
+- set(tsocket_pool_compile_options "/FIrandom_shuffle.h")
+- endif()
+-
+
set_source_files_properties("${library_root}/src/thrift/transport/TSocketPool.cpp"
PROPERTIES
+ COMPILE_OPTIONS
+ "${tsocket_pool_compile_options}"
+diff --git a/osquery/core/shutdown.cpp b/osquery/core/shutdown.cpp
+index 522bde887..9812ebf44 100644
+--- a/osquery/core/shutdown.cpp
++++ b/osquery/core/shutdown.cpp
+@@ -11,6 +11,7 @@
+ #include <osquery/logger/data_logger.h>
+
+ #include <atomic>
++#include <condition_variable>
+ #include <mutex>
+ #include <string>
+
+diff --git a/osquery/logger/logger.cpp b/osquery/logger/logger.cpp
+index ed8391f48..9702f203c 100644
+--- a/osquery/logger/logger.cpp
++++ b/osquery/logger/logger.cpp
+@@ -13,6 +13,7 @@
+
+ #include <algorithm>
+ #include <future>
++#include <iomanip>
+ #include <optional>
+ #include <queue>
+ #include <thread>
+diff --git a/osquery/tables/networking/CMakeLists.txt
b/osquery/tables/networking/CMakeLists.txt
+index 9f7f64578..35b44accb 100644
+--- a/osquery/tables/networking/CMakeLists.txt
++++ b/osquery/tables/networking/CMakeLists.txt
+@@ -30,6 +30,10 @@ function(generateOsqueryTablesNetworking)
+ posix/interfaces.cpp
+ posix/utils.cpp
+ )
++
++ list(APPEND platform_deps
++ resolv
++ )
+ endif()
+
+ if(DEFINED PLATFORM_LINUX)
+diff --git a/osquery/tables/system/linux/sysctl_utils.cpp
b/osquery/tables/system/linux/sysctl_utils.cpp
+index 1ff3e0b00..b66ecc79e 100644
+--- a/osquery/tables/system/linux/sysctl_utils.cpp
++++ b/osquery/tables/system/linux/sysctl_utils.cpp
+@@ -7,8 +7,6 @@
+ * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
+ */
+
+-#include <sys/sysctl.h>
+-
+ #include <boost/algorithm/string/trim.hpp>
+
+ #include <osquery/core/tables.h>
+@@ -73,10 +71,8 @@ void genControlInfo(int* oid,
+ // Get control size
+ size_t response_size = CTL_MAX_VALUE;
+ char response[CTL_MAX_VALUE + 1] = {0};
+- if (sysctl(oid, oid_size, response, &response_size, 0, 0) != 0) {
+- // Cannot request MIB data.
+- return;
+- }
++ // Cannot request MIB data.
++ return;
+
+ // Data is output, but no way to determine type (long, int, string, struct).
+ Row r;
+diff --git a/osquery/tables/system/posix/augeas.cpp
b/osquery/tables/system/posix/augeas.cpp
+index fb09411d8..615f7adea 100644
+--- a/osquery/tables/system/posix/augeas.cpp
++++ b/osquery/tables/system/posix/augeas.cpp
+@@ -35,7 +35,7 @@ FLAG(string,
+ #else
+ FLAG(string,
+ augeas_lenses,
+- "/opt/osquery/share/osquery/lenses",
++ "/usr/share/osquery/lenses",
+ "Directory that contains augeas lenses files");
+ #endif
+
+diff --git a/osquery/tables/system/posix/openssl_utils.cpp
b/osquery/tables/system/posix/openssl_utils.cpp
+index 9d4734c3c..37bb4857f 100644
+--- a/osquery/tables/system/posix/openssl_utils.cpp
++++ b/osquery/tables/system/posix/openssl_utils.cpp
+@@ -12,7 +12,9 @@
+ #include <array>
+ #include <ctime>
+ #include <iomanip>
++#include <memory>
+ #include <sstream>
++#include <cstring>
+ #include <string>
+
+ #include <osquery/core/core.h>
+diff --git a/osquery/tables/system/posix/sysctl_utils.h
b/osquery/tables/system/posix/sysctl_utils.h
+index e119f8a9e..0d4a399e4 100644
+--- a/osquery/tables/system/posix/sysctl_utils.h
++++ b/osquery/tables/system/posix/sysctl_utils.h
+@@ -9,8 +9,6 @@
+
+ #pragma once
+
+-#include <sys/sysctl.h>
+-
+ #include <osquery/core/tables.h>
+
+ namespace osquery {
+@@ -18,6 +16,8 @@ namespace tables {
+
+ #define CTL_MAX_VALUE 128
+
++#define CTL_MAXNAME 12
++
+ #ifndef CTL_DEBUG_MAXID
+ #define CTL_DEBUG_MAXID (CTL_MAXNAME * 2)
+ #endif
+diff --git a/osquery/utils/config/default_paths.h
b/osquery/utils/config/default_paths.h
+index cda34298e..1c45718f3 100644
+--- a/osquery/utils/config/default_paths.h
++++ b/osquery/utils/config/default_paths.h
+@@ -26,7 +26,7 @@
+ #define OSQUERY_SOCKET OSQUERY_DB_HOME
+ #define OSQUERY_PIDFILE "/var/run/"
+ #define OSQUERY_LOG_HOME "/var/log/osquery/"
+-#define OSQUERY_CERTS_HOME "/opt/osquery/share/osquery/certs/"
++#define OSQUERY_CERTS_HOME "/usr/share/osquery/certs/"
+ #elif defined(WIN32)
+ #define OSQUERY_HOME "\\Program Files\\osquery\\"
+ #define OSQUERY_DB_HOME OSQUERY_HOME
+diff --git a/tools/deployment/linux_packaging/rpm/osqueryd.service
b/tools/deployment/linux_packaging/rpm/osqueryd.service
+index 6aa42752f..7bb3b3dc9 100644
+--- a/tools/deployment/linux_packaging/rpm/osqueryd.service
++++ b/tools/deployment/linux_packaging/rpm/osqueryd.service
+@@ -7,7 +7,7 @@ TimeoutStartSec=0
+ EnvironmentFile=/etc/sysconfig/osqueryd
+ ExecStartPre=/bin/sh -c "if [ ! -f $FLAG_FILE ]; then touch $FLAG_FILE; fi"
+ ExecStartPre=/bin/sh -c "if [ -f $LOCAL_PIDFILE ]; then mv $LOCAL_PIDFILE
$PIDFILE; fi"
+-ExecStart=/opt/osquery/bin/osqueryd \
++ExecStart=/usr/bin/osqueryd \
+ --flagfile $FLAG_FILE \
+ --config_path $CONFIG_FILE
+ Restart=on-failure
+diff --git a/tools/deployment/osquery.example.conf
b/tools/deployment/osquery.example.conf
+index 6fd3594ea..1b2b888ca 100644
+--- a/tools/deployment/osquery.example.conf
++++ b/tools/deployment/osquery.example.conf
+@@ -41,19 +41,19 @@
+ // There are several 'default' packs installed via
+ // packages and/or Homebrew.
+ //
+- // Linux: /opt/osquery/share/osquery/packs
++ // Linux: /usr/share/osquery/packs
+ // OS X: /var/osquery/packs
+ // Homebrew: /usr/local/share/osquery/packs
+ // make install: {PREFIX}/share/osquery/packs
+ //
+ "packs": {
+- // "osquery-monitoring":
"/opt/osquery/share/osquery/packs/osquery-monitoring.conf",
+- // "incident-response":
"/opt/osquery/share/osquery/packs/incident-response.conf",
+- // "it-compliance": "/opt/osquery/share/osquery/packs/it-compliance.conf",
++ // "osquery-monitoring":
"/usr/share/osquery/packs/osquery-monitoring.conf",
++ // "incident-response": "/usr/share/osquery/packs/incident-response.conf",
++ // "it-compliance": "/usr/share/osquery/packs/it-compliance.conf",
+ // "osx-attacks": "/var/osquery/packs/osx-attacks.conf",
+- // "vuln-management":
"/opt/osquery/share/osquery/packs/vuln-management.conf",
+- // "hardware-monitoring":
"/opt/osquery/share/osquery/packs/hardware-monitoring.conf",
+- // "ossec-rootkit": "/opt/osquery/share/osquery/packs/ossec-rootkit.conf",
++ // "vuln-management": "/usr/share/osquery/packs/vuln-management.conf",
++ // "hardware-monitoring":
"/usr/share/osquery/packs/hardware-monitoring.conf",
++ // "ossec-rootkit": "/usr/share/osquery/packs/ossec-rootkit.conf",
+ // "windows-hardening": "C:\\Program
Files\\osquery\\packs\\windows-hardening.conf",
+ // "windows-attacks": "C:\\Program
Files\\osquery\\packs\\windows-attacks.conf"
+ },
Deleted: libaudit.patch
===================================================================
--- libaudit.patch 2022-10-13 17:24:13 UTC (rev 1328021)
+++ libaudit.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -1,12 +0,0 @@
-diff --git a/lib/libaudit.h b/lib/libaudit.h
-index 05ee91e..2ee3842 100644
---- a/lib/libaudit.h
-+++ b/lib/libaudit.h
-@@ -260,7 +260,6 @@ extern "C" {
- #define AUDIT_KEY_SEPARATOR 0x01
-
- /* These are used in filter control */
--#define AUDIT_FILTER_EXCLUDE AUDIT_FILTER_TYPE
- #define AUDIT_FILTER_MASK 0x07 /* Mask to get actual filter */
- #define AUDIT_FILTER_UNSET 0x80 /* This value means filter is unset */
-
Copied: osquery/repos/community-x86_64/libaudit.patch (from rev 1328021,
osquery/trunk/libaudit.patch)
===================================================================
--- libaudit.patch (rev 0)
+++ libaudit.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -0,0 +1,12 @@
+diff --git a/lib/libaudit.h b/lib/libaudit.h
+index 05ee91e..2ee3842 100644
+--- a/lib/libaudit.h
++++ b/lib/libaudit.h
+@@ -260,7 +260,6 @@ extern "C" {
+ #define AUDIT_KEY_SEPARATOR 0x01
+
+ /* These are used in filter control */
+-#define AUDIT_FILTER_EXCLUDE AUDIT_FILTER_TYPE
+ #define AUDIT_FILTER_MASK 0x07 /* Mask to get actual filter */
+ #define AUDIT_FILTER_UNSET 0x80 /* This value means filter is unset */
+
Deleted: rocksdb.patch
===================================================================
--- rocksdb.patch 2022-10-13 17:24:13 UTC (rev 1328021)
+++ rocksdb.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -1,117 +0,0 @@
-commit 7b8b1b01e558fae598fe63938f3f0b9d0a7f8f2a
-Author: Martin Pöhlmann <[email protected]>
-Date: Sat Oct 2 11:11:23 2021 +0200
-
- Compile RocksDB with snappy 1.1.9 support enabled
-
- This allows us to load existing osquery db files created on Arch Linux.
- See: https://bugs.archlinux.org/task/72251
-
-diff --git a/.gitmodules b/.gitmodules
-index a1e1de71b..cfcaee966 100644
---- a/.gitmodules
-+++ b/.gitmodules
-@@ -151,3 +151,6 @@
- [submodule "libraries/cmake/source/aws-sdk-cpp/src/aws-sdk-cpp"]
- path = libraries/cmake/source/aws-sdk-cpp/src/aws-sdk-cpp
- url = https://github.com/aws/aws-sdk-cpp
-+[submodule "libraries/cmake/source/snappy/src"]
-+ path = libraries/cmake/source/snappy/src
-+ url = https://github.com/google/snappy
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 225397101..a53c8c744 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -109,6 +109,7 @@ function(importLibraries)
- "Linux,Darwin:popt"
- "Linux,Darwin,Windows:rapidjson"
- "Linux,Darwin,Windows:rocksdb"
-+ "Linux,Darwin,Windows:snappy"
- "Linux,Darwin,Windows:sleuthkit"
- "Linux,Darwin,Windows:sqlite"
- "Linux,Darwin,Windows:thrift"
-diff --git a/libraries/cmake/source/modules/Findsnappy.cmake
b/libraries/cmake/source/modules/Findsnappy.cmake
-new file mode 100644
-index 000000000..32c9f911e
---- /dev/null
-+++ b/libraries/cmake/source/modules/Findsnappy.cmake
-@@ -0,0 +1,15 @@
-+# Copyright (c) 2014-present, The osquery authors
-+#
-+# This source code is licensed as defined by the LICENSE file found in the
-+# root directory of this source tree.
-+#
-+# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
-+
-+include("${CMAKE_CURRENT_LIST_DIR}/utils.cmake")
-+
-+importSourceSubmodule(
-+ NAME "snappy"
-+
-+ SHALLOW_SUBMODULES
-+ "src"
-+)
-diff --git a/libraries/cmake/source/rocksdb/CMakeLists.txt
b/libraries/cmake/source/rocksdb/CMakeLists.txt
-index 72caacbb1..1a5045889 100644
---- a/libraries/cmake/source/rocksdb/CMakeLists.txt
-+++ b/libraries/cmake/source/rocksdb/CMakeLists.txt
-@@ -370,6 +370,7 @@ function(rocksdbMain)
- ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
- ROCKSDB_RANGESYNC_PRESENT
- ROCKSDB_SCHED_GETCPU_PRESENT
-+ SNAPPY
- )
-
- elseif(TARGET_PROCESSOR STREQUAL "aarch64")
-@@ -444,6 +445,7 @@ function(rocksdbMain)
- target_link_libraries(thirdparty_rocksdb
- PRIVATE
- thirdparty_cxx_settings
-+ thirdparty_snappy
-
- PUBLIC
- ${library_list}
-diff --git a/libraries/cmake/source/snappy/CMakeLists.txt
b/libraries/cmake/source/snappy/CMakeLists.txt
-new file mode 100644
-index 000000000..47eeb853f
---- /dev/null
-+++ b/libraries/cmake/source/snappy/CMakeLists.txt
-@@ -0,0 +1,38 @@
-+# 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.
-+
-+function(snappyMain)
-+ set(library_root "${CMAKE_CURRENT_SOURCE_DIR}/src")
-+
-+ set(HAVE_SYS_UIO_H_01 1)
-+ configure_file(
-+ "${library_root}/snappy-stubs-public.h.in"
-+ "${library_root}/snappy-stubs-public.h")
-+
-+ add_library(thirdparty_snappy
-+ "${library_root}/snappy-internal.h"
-+ "${library_root}/snappy-stubs-internal.h"
-+ "${library_root}/snappy-stubs-public.h"
-+ "${library_root}/snappy-c.cc"
-+ "${library_root}/snappy-sinksource.cc"
-+ "${library_root}/snappy-stubs-internal.cc"
-+ "${library_root}/snappy.cc"
-+ )
-+
-+ target_link_libraries(thirdparty_snappy PRIVATE
-+ thirdparty_c_settings
-+ )
-+
-+ target_include_directories(thirdparty_snappy PRIVATE
-+ "${library_root}"
-+ )
-+
-+ target_include_directories(thirdparty_snappy SYSTEM INTERFACE
-+ "${library_root}"
-+ )
-+endfunction()
-+
-+snappyMain()
Copied: osquery/repos/community-x86_64/rocksdb.patch (from rev 1328021,
osquery/trunk/rocksdb.patch)
===================================================================
--- rocksdb.patch (rev 0)
+++ rocksdb.patch 2022-10-13 17:24:46 UTC (rev 1328022)
@@ -0,0 +1,117 @@
+commit 5c151f702a5622aaabb1f1bb5ff4cf9532c1cf92
+Author: Martin Pöhlmann <[email protected]>
+Date: Sat Oct 2 11:11:23 2021 +0200
+
+ Compile RocksDB with snappy 1.1.9 support enabled
+
+ This allows us to load existing osquery db files created on Arch Linux.
+ See: https://bugs.archlinux.org/task/72251
+
+diff --git a/.gitmodules b/.gitmodules
+index 236ffd86b..408fdceb7 100644
+--- a/.gitmodules
++++ b/.gitmodules
+@@ -148,3 +148,6 @@
+ [submodule "libraries/cmake/source/aws-sdk-cpp/src/aws-sdk-cpp"]
+ path = libraries/cmake/source/aws-sdk-cpp/src/aws-sdk-cpp
+ url = https://github.com/aws/aws-sdk-cpp
++[submodule "libraries/cmake/source/snappy/src"]
++ path = libraries/cmake/source/snappy/src
++ url = https://github.com/google/snappy
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 225397101..a53c8c744 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,6 +109,7 @@ function(importLibraries)
+ "Linux,Darwin:popt"
+ "Linux,Darwin,Windows:rapidjson"
+ "Linux,Darwin,Windows:rocksdb"
++ "Linux,Darwin,Windows:snappy"
+ "Linux,Darwin,Windows:sleuthkit"
+ "Linux,Darwin,Windows:sqlite"
+ "Linux,Darwin,Windows:thrift"
+diff --git a/libraries/cmake/source/modules/Findsnappy.cmake
b/libraries/cmake/source/modules/Findsnappy.cmake
+new file mode 100644
+index 000000000..32c9f911e
+--- /dev/null
++++ b/libraries/cmake/source/modules/Findsnappy.cmake
+@@ -0,0 +1,15 @@
++# Copyright (c) 2014-present, The osquery authors
++#
++# This source code is licensed as defined by the LICENSE file found in the
++# root directory of this source tree.
++#
++# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
++
++include("${CMAKE_CURRENT_LIST_DIR}/utils.cmake")
++
++importSourceSubmodule(
++ NAME "snappy"
++
++ SHALLOW_SUBMODULES
++ "src"
++)
+diff --git a/libraries/cmake/source/rocksdb/CMakeLists.txt
b/libraries/cmake/source/rocksdb/CMakeLists.txt
+index 72caacbb1..1a5045889 100644
+--- a/libraries/cmake/source/rocksdb/CMakeLists.txt
++++ b/libraries/cmake/source/rocksdb/CMakeLists.txt
+@@ -370,6 +370,7 @@ function(rocksdbMain)
+ ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
+ ROCKSDB_RANGESYNC_PRESENT
+ ROCKSDB_SCHED_GETCPU_PRESENT
++ SNAPPY
+ )
+
+ elseif(TARGET_PROCESSOR STREQUAL "aarch64")
+@@ -444,6 +445,7 @@ function(rocksdbMain)
+ target_link_libraries(thirdparty_rocksdb
+ PRIVATE
+ thirdparty_cxx_settings
++ thirdparty_snappy
+
+ PUBLIC
+ ${library_list}
+diff --git a/libraries/cmake/source/snappy/CMakeLists.txt
b/libraries/cmake/source/snappy/CMakeLists.txt
+new file mode 100644
+index 000000000..47eeb853f
+--- /dev/null
++++ b/libraries/cmake/source/snappy/CMakeLists.txt
+@@ -0,0 +1,38 @@
++# 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.
++
++function(snappyMain)
++ set(library_root "${CMAKE_CURRENT_SOURCE_DIR}/src")
++
++ set(HAVE_SYS_UIO_H_01 1)
++ configure_file(
++ "${library_root}/snappy-stubs-public.h.in"
++ "${library_root}/snappy-stubs-public.h")
++
++ add_library(thirdparty_snappy
++ "${library_root}/snappy-internal.h"
++ "${library_root}/snappy-stubs-internal.h"
++ "${library_root}/snappy-stubs-public.h"
++ "${library_root}/snappy-c.cc"
++ "${library_root}/snappy-sinksource.cc"
++ "${library_root}/snappy-stubs-internal.cc"
++ "${library_root}/snappy.cc"
++ )
++
++ target_link_libraries(thirdparty_snappy PRIVATE
++ thirdparty_c_settings
++ )
++
++ target_include_directories(thirdparty_snappy PRIVATE
++ "${library_root}"
++ )
++
++ target_include_directories(thirdparty_snappy SYSTEM INTERFACE
++ "${library_root}"
++ )
++endfunction()
++
++snappyMain()