Commit Graph

56 Commits

Author SHA1 Message Date
Stefano Bonicatti
5a2ad2636d
Update OpenSSL to version 1.1.1f and fix build (#6359)
- Add fallback url to download the openssl tar.gz from the "old" archives
- Add URL_HASH to the openssl external project,
  to avoid to redownload the archive if it has been alredy downloaded
  and the integrity is verified
- Update curl_certificate table to use the newer openssl API,
  so that it builds.
2020-04-03 18:58:53 -04:00
Stefano Bonicatti
c22ab5c404
Simplify how third party libraries formula work (#6303)
Remove a level of indirection when configuring and building formulas.
This should simplify working with them and also remove some issues
encountered when trying to build on Windows.
2020-03-31 15:45:20 +02:00
Stefano Bonicatti
296c6d336e
Update openssl to 1.1.1d (#6302)
- Update libarchive to build from source on Windows and macOS

- Update yara to build from source on macOS

- Update librdkafka to build from source on macOS

- Build librdkafka with SSL and SASL_SCRAM support on Linux

- Update librpm to 4.15.1 to support the newer openssl

- Update libxml2 to build from source on Windows and macOS

- Update lzma to build from source on Windows and macOS

- Use ICU library not only for boost but libxml2 too

- Implement a workaround to have Buck builds still compile
  with the old openssl version
2020-03-27 17:11:43 +01:00
flappy-sh
d9faba2d9e
Build librdkafka on Windows (#6095) 2020-03-06 15:06:55 -05:00
Alessandro Gario
f3ca4f54db
libs: Update cmake/source/SQLite to version 3.31.1 (#6252) 2020-02-24 11:03:12 +01:00
Zachary Wasserman
c296693bd5
Add community_id_v1 hash function to SQLite (#6211)
Implements the Community ID hash that will allow correlating network connections detected by osquery with other tools that support the standard (Zeek, Suricata, etc.).
2020-02-08 11:16:30 -05:00
Stefano Bonicatti
9a99c6b4c0
Add sccache to the Windows job (#6231)
* Add sccache to the Windows job

Also fix debug symbols on googletest,
so that it doesn't try to create a separate pdb.

* Fix uploading the submodule cache

sccache needs its cache to be uploaded as normal files,
not with a tar, otherwise the cache when extracted
will contain extraneous files and folders (PaxHeader).
The Files mode though by default ignores the .git folder,
so we have to use the .artifactignore file to unignore it,
and we have to copy in the cached path for the cache task to see it.
2020-02-06 16:07:58 +01:00
Stefano Bonicatti
283d0ab631
Fix boost process and asio build on Windows (#6222)
When using Boost.Process on Windows with Boost.Asio for async_pipe,
the build fails because Asio requires BOOST_ASIO_WINDOWS define
to enable access to async_pipe.

This only partially solves the issue since it's necessary that
Asio users will also include the "sdkddkver.h" header
before the "boost/asio.hpp" header to properly define
_WIN32_WINNT_WIN7, used by osquery.
2020-02-05 15:25:31 +01:00
kumarak
79f755c161
CMake: Fix the Boost.org iostreams module (#6199) 2020-02-04 21:21:02 +01:00
Stefano Bonicatti
041d6e93be
thirdparty_boost_asio should depend on thirdparty_openssl (#6203)
Also added a way to programmatically specify a non Boost third-party dependency
to Boost header only libraries.
2020-01-29 13:35:39 +01:00
Stefano Bonicatti
2d3f612af0 Fix boost process basic_ipstream build (#6167)
The move assignment operator of boost::basic_ipstream is bugged.
It has been fixed on upstream in commit
ca994c1972
which is not on any stable build, so we will patch boost with that commit.
2020-01-12 01:38:54 -05:00
Stefano Bonicatti
ed03df0df8 Make Boost winapi available to all platforms (#6166) 2020-01-12 01:35:26 -05:00
Teddy Reed
80ed884273
build: Pin Linux builds to use libc++ (#6158) 2020-01-03 19:57:09 -05:00
Stefano Bonicatti
668a1d86e6 CMake: Future proof Python finding mechanism (#6120)
CMake 3.16 doesn't set Python3_EXECUTABLE as cache variable anymore,
it has changed to _Python3_EXECUTABLE which is for internal use.
The module returns Python3_EXECUTABLE as a local variable,
so we share that value through a new custom cache variable,
OSQUERY_PYTHON_EXECUTABLE.
2019-12-11 22:32:08 -05:00
Stefano Bonicatti
7922cd78aa Fix possible xxhash collision between zstd and rdkafka (#6101)
Both libraries use the xxhash library,
compiling its source files directly.
The version they use though it's different so to avoid the linker
resolve the collision by removing one of the two implementations,
we prefix the functions with the respective library name.

Moreover we make the xxhash API private, by declaring the static
so that any unused function is not included anymore in the binary
and only the used one are present.
2019-12-07 20:52:34 -05:00
Stefano Bonicatti
e7cef1a906 Prepare CMake and Python framework for Python tests
test_base.py received several fixes and now supports and requires
a custom folder where to find the config files that the tests need.
It has been also updated to use Python 3.

Fixed the gen_api function in genapi.py missing the path to the spec
file when evaluating blacklisted tables.

Co-Authored-By: SS <sahil.suneja@trailofbits.com>
2019-12-07 20:51:09 -05:00
Stefano Bonicatti
8e6fefb47a CMake: explicitly enable ASM_MASM language on Windows (#6065)
This is needed by some third party libraries and
when using Ninja on Windows.
CMake complains that it cannot find the internal variable
for CMAKE_ASM_MASM_COMPILE_OBJECT if it's not active for the whole
project.
2019-11-23 00:14:56 -05:00
Stefano Bonicatti
5315d4be8e CMake: Workaround Thrift symlink issue on Windows (#6060)
CMake doesn't support reading and therefore copying Windows symlinks.
A recent update to Thrift creates a symlink in its tutorial folder,
which makes the copy after patch process fail.
As a workaround we avoid copying the tutorial folder,
since we don't care about it anyway.
2019-11-19 12:52:23 -05:00
Daniel Zabari
0fa5751c60 added warning and turned off shallow for git version less than 2.14 (#6055)
added warning and turned off shallow for git version less than 2.14
2019-11-19 11:24:47 -05:00
Ted Reed
59dc17266b libraries: Add rocksdb to source_migration 2019-11-15 15:19:48 -05:00
Ted Reed
0dccb51087 libraries: Add ROCKSDB_LITE to public definitions 2019-11-15 15:19:48 -05:00
Ted Reed
c61c56f159 libraries: Reduce rocksdb sources
Several source files are not exporting any symbols.
2019-11-15 15:19:48 -05:00
Alessandro Gario
2e2e9032b8
Update SQLite from version 3.29.0-3 to 3.30.1-1 (#6020) 2019-11-12 18:33:01 +01:00
Ted Reed
76720bea2f libraries: Add thrift to source_migration
This commit adds scope_exit and typeof boost subprojects.
These are dependencies of Window's thrift library.
2019-11-12 08:15:53 -05:00
Teddy Reed
6486e6800e libraries: Add boost and icu to source_migration 2019-11-12 08:15:53 -05:00
Stefano Bonicatti
e571f1aa5a Don't always link to all AWS libraries (#6032)
While in the end the osqueryd binary will require almost all libraries
built and linked, having each intermediate library depend on the whole
set of AWS libraries might result in higher compiling time.
Especially since on some platforms not all libraries are used.

This should speed up the compilation speed on Windows.
2019-11-11 09:52:21 -05:00
Ted Reed
0d4372ed48 libraries: Add lzma and libxml2 to source_migration 2019-11-11 08:35:33 -05:00
Teddy Reed
5c2ecd2047 libraries: Add googletest to source_migration 2019-11-11 08:35:33 -05:00
Teddy Reed
15a2071eaa libraries: Add zstd to source_migration 2019-11-11 08:35:33 -05:00
Teddy Reed
40314421f5 libraries: Add bzip2 to source_migration 2019-11-11 08:35:33 -05:00
Teddy Reed
5b411d7a74 libraries: Add zlib to source_migration 2019-11-11 08:35:33 -05:00
Teddy Reed
58ea43f536
libraries: Add libmagic to source_migration (#6023) 2019-11-09 13:49:33 -05:00
Zachary Wasserman
3ece9e9ef7 Migrate glog and gflags to source build on macOS and Windows (#5902)
Note that glog and gflags must be migrated at the same time, otherwise
linker errors are generated on macOS.
2019-11-08 23:06:09 -05:00
Stefano Bonicatti
b857409cad Fix build with Ninja on Windows (#6007) 2019-11-06 19:07:04 -05:00
Alessandro Gario
7fee358178 CMake: Update the OpenSSL formula (#5976) 2019-11-01 21:25:14 -04:00
Zachary Wasserman
7e18771f16 Migrate glibc from "facebook" dependencies (#5900) 2019-10-31 19:08:09 -04:00
Stefano Bonicatti
d2e976168d
Restore correct commit of the RapidJSON submodule (#5961) 2019-10-29 02:15:42 +01:00
Nick Anderson
b9bdcf40ce
tests: enabling certificates table sanity checks (#5914) 2019-10-27 20:45:14 -07:00
Alessandro Gario
41fb4efba1
CMake: Migrate macOS and Windows to the OpenSSL formula (#5928) 2019-10-26 14:03:31 +02:00
Teddy Reed
43357d43a3
libraries: Update RapidJSON to master 1a825d24 (#5913) 2019-10-21 22:41:49 -04:00
Zachary Wasserman
0bf2245396 Migrate rapidjson to source build on macOS and Windows (#5899) 2019-10-18 20:05:22 -04:00
kumarak
9346926030 Restore extension SDK support to osquery 4.x (#5851)
CMake utility functions(generateOsqueryExtensionGroup,addOsqueryExtensioni{Ex},
addOsqueryModule) to add extensions.

Updates the boost library submodules needed for extensions build.

Use cache variable(OSQUERY_EXTENSION_GROUP_NAME) for the grouping of extensions
and fix the linkage with osquery interface library.
2019-10-18 18:45:20 -04:00
Stefano Bonicatti
3ad7f65a0d Support source and build directory to be on different filesystems (#5907)
Instead of moving a patched submodule from source to build directory,
we copy it and then hard reset the submodule to its original HEAD.

Minor message change when a library fails to be imported.
2019-10-18 18:25:05 -04:00
Zachary Wasserman
30a7507c95
Fix shallow clone support for libraries in recent git versions (#5897)
Enables the v2 protocol which allows the repositories to be shallow
cloned without error.
2019-10-17 21:19:24 -07:00
Zachary Wasserman
c0876408fc Migrate AWS SDK CPP dependency to source build on macOS and Windows (#5889) 2019-10-16 16:20:22 -04:00
Stefano Bonicatti
7d1d486c1e Fix git command not found after first configure (#5880)
During the first configuration, the git command is searched
when submodules are initialized and it's then saved into a cache variable.
If though we delete the build folder and run configure again,
the submodules won't be initialized again, so the git command
won't be cached and visible to CMake.
Therefore we need to search for it each time.

Cleanup dead/deprecated code.
2019-10-11 23:31:31 +02:00
Alessandro Gario
225bbaf992
Integrate cppcheck and clang-tidy within the CMake project (#5730) 2019-10-08 18:17:11 +02:00
adhamehab
657932cd2c Upgrade Python tools to Python3 (#5846) 2019-10-05 10:30:10 -04:00
Stefano Bonicatti
457150c94c CMake: Improve submodule patching system (#5850)
Keep patched source in the build directory instead of the source.

A new variable with the format OSQUERY_<submodule name>_ROOT_DIR
is set to the directory of where the submodule is, in case it's patched.

A new option PATCH has been added to importSourceModule
to let the patching system know that the submodule has to be patched
and which is the main submodule folder.
2019-10-01 17:47:10 -04:00
Zachary Wasserman
5cec1f4331
Upgrade SQLite to 3.29.0 on macOS and Windows (#5810)
Mitigates recent CVEs in SQLite. It was already this version on Linux.

Establish a pattern for migrating source dependency builds to macOS and Windows.
2019-09-18 15:49:27 -07:00