osquery: 3.2.8 -> 3.2.9 (#43690)

Latest bugfix release with the following notable changes:

* Memory leak resolve for dispatcher
(https://github.com/facebook/osquery/commit/06d48654456e2b56091f0d35f55c234cc054d378)

* Fix include path on status.h
(https://github.com/facebook/osquery/commit/5bd4984f2a5a38c4dd09e9271b162bbacff796ac)

Additionally the patch had to be rebased onto the 3.2.9 branch as it
added XCode support including some CLang flags (namely `-fno-limit-debug-info`)
which are unsupported on GCC.
(see https://github.com/facebook/osquery/commit/bccc28dd9851997b45b69c1dcb11a161763653f9)

authored by Maximilian Bosch and committed by xeji fbc009f2 b9c9a34d

+21 -13
+2 -2
pkgs/tools/system/osquery/default.nix
··· 20 20 21 21 stdenv.mkDerivation rec { 22 22 name = "osquery-${version}"; 23 - version = "3.2.8"; 23 + version = "3.2.9"; 24 24 25 25 # this is what `osquery --help` will show as the version. 26 26 OSQUERY_BUILD_VERSION = version; ··· 30 30 owner = "facebook"; 31 31 repo = "osquery"; 32 32 rev = version; 33 - sha256 = "1py5jizl7z1f9xzpg7pylbdnawvvifiyv9gpjwiim8ilgkmpaiv4"; 33 + sha256 = "1fac0yj1701469qhbsp38ab2fmavm3jw6x278bf78yvxdi99ivai"; 34 34 }; 35 35 36 36 patches = [ ./misc.patch ];
+19 -11
pkgs/tools/system/osquery/misc.patch
··· 1 1 diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 71921740..156ea6dc 100644 2 + index 0242fb71..5007aace 100644 3 3 --- a/CMakeLists.txt 4 4 +++ b/CMakeLists.txt 5 - @@ -456,12 +456,6 @@ elseif(CLANG AND DEPS AND NOT FREEBSD) 5 + @@ -304,7 +304,6 @@ else() 6 + # To be safe, only include them when building 'release' outputs. 7 + add_compile_options( 8 + -g 9 + - -fno-limit-debug-info 10 + -fPIE 11 + -fpie 12 + -fPIC 13 + @@ -449,12 +448,6 @@ elseif(CLANG AND DEPS AND NOT FREEBSD) 6 14 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto=thin") 7 15 endif() 8 16 ··· 15 23 # Make sure deps were built before compiling (else show warning). 16 24 execute_process( 17 25 COMMAND "${CMAKE_SOURCE_DIR}/tools/provision.sh" check "${CMAKE_BINARY_DIR}" 18 - @@ -528,6 +522,8 @@ endif() 26 + @@ -521,6 +514,8 @@ endif() 19 27 20 28 if(APPLE) 21 29 LOG_PLATFORM("OS X") ··· 24 32 elseif(OSQUERY_BUILD_PLATFORM STREQUAL "debian") 25 33 LOG_PLATFORM("Debian") 26 34 elseif(OSQUERY_BUILD_PLATFORM STREQUAL "ubuntu") 27 - @@ -577,7 +573,6 @@ if(POSIX AND DEPS) 35 + @@ -570,7 +565,6 @@ if(POSIX AND DEPS) 28 36 endif() 29 37 endif() 30 38 ··· 32 40 include_directories("${CMAKE_SOURCE_DIR}/include") 33 41 include_directories("${CMAKE_SOURCE_DIR}") 34 42 35 - @@ -668,18 +663,6 @@ if(FREEBSD OR "${HAVE_TR1_TUPLE}" STREQUAL "") 43 + @@ -661,18 +655,6 @@ if(FREEBSD OR "${HAVE_TR1_TUPLE}" STREQUAL "") 36 44 add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=0) 37 45 endif() 38 46 ··· 52 60 add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/linenoise-ng") 53 61 endif() 54 62 diff --git a/osquery/CMakeLists.txt b/osquery/CMakeLists.txt 55 - index c8cbac4e..a4382420 100644 63 + index e3842962..f405503d 100644 56 64 --- a/osquery/CMakeLists.txt 57 65 +++ b/osquery/CMakeLists.txt 58 - @@ -35,8 +35,6 @@ if(CLANG AND POSIX) 66 + @@ -33,8 +33,6 @@ if(CLANG AND POSIX) 59 67 -Wextra 60 68 -pedantic 61 69 -Wuseless-cast ··· 64 72 -Wno-unused-parameter 65 73 -Wno-gnu-case-range 66 74 -Weffc++ 67 - @@ -65,14 +63,7 @@ endif() 75 + @@ -63,14 +61,7 @@ endif() 68 76 69 77 # Construct a set of all object files, starting with third-party and all 70 78 # of the osquery core objects (sources from ADD_CORE_LIBRARY macros). ··· 80 88 81 89 # Add subdirectories 82 90 add_subdirectory(config) 83 - @@ -153,10 +144,11 @@ if(APPLE OR LINUX) 91 + @@ -151,10 +142,11 @@ if(APPLE OR LINUX) 84 92 ADD_OSQUERY_LINK_ADDITIONAL("rocksdb_lite") 85 93 elseif(FREEBSD) 86 94 ADD_OSQUERY_LINK_CORE("icuuc") ··· 93 101 if(POSIX) 94 102 ADD_OSQUERY_LINK_CORE("boost_system") 95 103 ADD_OSQUERY_LINK_CORE("boost_filesystem") 96 - @@ -174,10 +166,10 @@ endif() 104 + @@ -172,10 +164,10 @@ endif() 97 105 ADD_OSQUERY_LINK_CORE("glog${WO_KEY}") 98 106 99 107 if(POSIX) ··· 142 150 ADD_OSQUERY_TEST_ADDITIONAL(${OSQUERY_LOGGER_KAFKA_PLUGINS_TESTS}) 143 151 endif() 144 152 diff --git a/osquery/tables/CMakeLists.txt b/osquery/tables/CMakeLists.txt 145 - index dd78084f..158758e1 100644 153 + index 3ecbb711..af7220d3 100644 146 154 --- a/osquery/tables/CMakeLists.txt 147 155 +++ b/osquery/tables/CMakeLists.txt 148 156 @@ -68,7 +68,7 @@ if(LINUX)