Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Dec 17, 2020
2 parents 753423a + e8de3de commit 7669595
Show file tree
Hide file tree
Showing 91 changed files with 1,178 additions and 980 deletions.
47 changes: 45 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ unix_env: &UNIX_ENV
# Linux EOL timelines: https://linuxlifecycle.com/
# Fedora (~13 months): https://fedoraproject.org/wiki/Fedora_Release_Life_Cycle

fedora33_task:
container:
# Fedora 33 EOL: Around November 2022
dockerfile: ci/fedora-33/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE
<< : *UNIX_ENV

fedora32_task:
container:
# Fedora 32 EOL: Around May 2021
Expand All @@ -38,6 +46,14 @@ fedora32_task:
<< : *CI_TEMPLATE
<< : *UNIX_ENV

centos8_task:
container:
# CentOS 8 EOL: May 31, 2029
dockerfile: ci/centos-8/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE
<< : *UNIX_ENV

centos7_task:
container:
# CentOS 7 EOL: June 30, 2024
Expand All @@ -46,6 +62,14 @@ centos7_task:
<< : *CI_TEMPLATE
<< : *UNIX_ENV

debian10_task:
container:
# Debian 10 EOL: June 2024
dockerfile: ci/debian-10/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE
<< : *UNIX_ENV

debian9_task:
container:
# Debian 9 EOL: June 2022
Expand All @@ -62,6 +86,14 @@ debian9_32bit_task:
<< : *CI_TEMPLATE
<< : *UNIX_ENV

ubuntu20_task:
container:
# Ubuntu 20.04 EOL: April 2025
dockerfile: ci/ubuntu-20.04/Dockerfile
<< : *RESOURCES_TEMPLATE
<< : *CI_TEMPLATE
<< : *UNIX_ENV

ubuntu18_task:
container:
# Ubuntu 18.04 EOL: April 2023
Expand Down Expand Up @@ -95,10 +127,21 @@ macos_task:
CIRRUS_WORKING_DIR: /tmp/broker

# FreeBSD EOL timelines: https://www.freebsd.org/security/security.html#sup
freebsd_task:
freebsd12_task:
freebsd_instance:
# FreeBSD 12 EOL: June 30, 2024
image_family: freebsd-12-1
image_family: freebsd-12-2
cpu: 8
# Not allowed to request less than 8GB for an 8 CPU FreeBSD VM.
memory: 8GB
prepare_script: ./ci/freebsd/prepare.sh
<< : *CI_TEMPLATE
<< : *UNIX_ENV

freebsd11_task:
freebsd_instance:
# FreeBSD 11 EOL: September 30, 2021
image_family: freebsd-11-4
cpu: 8
# Not allowed to request less than 8GB for an 8 CPU FreeBSD VM.
memory: 8GB
Expand Down
72 changes: 72 additions & 0 deletions .jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env groovy

@Library('caf-continuous-integration') _

// Configures the behavior of our stages.
config = [
// Version dependency for the caf-continuous-integration library.
ciLibVersion: 1.0,
// GitHub path to repository.
repository: 'zeek/broker',
// List of enabled checks for email notifications.
checks: [
'build',
'tests',
],
// Default CMake flags.
buildFlags: [
],
// Our build matrix. Keys are the operating system labels and values are build configurations.
buildMatrix: [
['Windows', [
numCores: 4,
builds: ['release'],
extraBuildFlags: [
'OPENSSL_ROOT_DIR:PATH=C:\\Program Files\\OpenSSL-Win64',
],
]],
],
]

// Declarative pipeline for triggering all stages.
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '50', artifactNumToKeepStr: '3'))
}
agent {
label 'master'
}
environment {
PrettyJobBaseName = env.JOB_BASE_NAME.replace('%2F', '/')
PrettyJobName = "Broker/$PrettyJobBaseName #${env.BUILD_NUMBER}"
}
stages {
stage('Checkout') {
steps {
getSources(config)
}
}
stage('Build') {
steps {
buildParallel(config)
}
}
stage('Notify') {
steps {
collectResults(config, PrettyJobName)
}
}
}
post {
failure {
emailext(
subject: "$PrettyJobName: " + config['checks'].collect{ "⛔️ ${it}" }.join(', '),
recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()],
attachLog: true,
compressLog: true,
body: "Check console output at ${env.BUILD_URL} or see attached log.\n",
)
notifyAllChecks(config, 'failure', 'Failed due to earlier error')
}
}
}
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 2 files
+11,894 −9,927 sqlite3.c
+760 −691 sqlite3.h
88 changes: 88 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,92 @@

2.1.0-dev | 2020-12-14 20:16:02 -0800

* Update NEWS for start of v2.1.0 development (Jon Siwek, Corelight)

1.5.0-dev.63 | 2020-12-14 10:38:14 -0800

* Update CAF submodule to fix handling of --libdir (Jon Siwek, Corelight)

1.5.0-dev.62 | 2020-12-12 18:28:25 -0800

* Change `configure --prefix` to not set CMAKE_INSTALL_LIBDIR (Jon Siwek, Corelight)

In places where that libdir option is used and not explicitly set
before, it will already correctly prepend CMAKE_INSTALL_PREFIX. Having
the configure script use the hardcoded 'lib' also prevented the
automatic use of 'lib64' on platforms that prefer it.

1.5.0-dev.61 | 2020-12-10 14:07:51 -0800

* Add Jenkinsfile for re-enabling Windows builds (Dominik Charousset, Corelight)

* Add Python context manager support (Dominik Charousset, Corelight)

For proper resource management/cleanup, the Python API now requires
using Endpoint, Subscriber, StatusSubscriber, and Store objects within a
`with` statement or alternatively doing an explicit call to the
``reset()`` method of subscriber/store objects before the associated
Endpoint's ``shutdown()`` method.

Co-authored-by: Jon Siwek <jsiwek@corelight.com>

* Disable Windows builds via Travis CI (Dominik Charousset, Corelight)

Remove the YAML file for Travis CI due to issues with getting Visual
Studio 2019 with support for `std::filesystem` working on Travis. This
is supposed to be a temporary measure until either finding a fix for the
setup or re-enabling Windows build through some other means.

* Fix handling of initial subscription set (Dominik Charousset, Corelight)

* Add missing to_string overloads (Dominik Charousset, Corelight)

* Make CMake scaffold more robust against re-runs (Dominik Charousset, Corelight)

* Clean up deprecation warnings for CAF 0.18 (Dominik Charousset, Corelight)

* Fix CAF paths for bundled CAF version (Dominik Charousset, Corelight)

* Migrate to CAF 0.18, update CAF submodule (Dominik Charousset, Corelight)

1.5.0-dev.43 | 2020-12-09 17:27:31 -0800

* Update SQLite to 3.34.0 (Jon Siwek, Corelight)

1.5.0-dev.42 | 2020-12-04 13:05:41 -0800

* Add FreeBSD 11.4 and 12.2 to CI (Jon Siwek, Corelight)

1.5.0-dev.40 | 2020-12-04 11:32:19 -0800

* Suppress interactive tzdata setup on Ubuntu (Dominik Charousset)

* Call update on Debian-based distros before install (Dominik Charousset)

* Update CI build matrix (Dominik Charousset)

* Update and streamline Docker files (Dominik Charousset)

1.5.0-dev.34 | 2020-12-02 11:05:55 -0800

* Update minimum required CMake to 3.5 (Jon Siwek, Corelight)

1.5.0-dev.32 | 2020-12-02 10:57:29 -0800

* Upgrade pybind11 to v2.6.1 and fix compatibility issues (Jon Siwek, Corelight)

1.5.0-dev.30 | 2020-11-26 18:12:38 +0000

* Update macOS CI to use system default Python 3 (Jon Siwek, Corelight)

* Remove Python 2 compatibility logic (Jon Siwek, Corelight)

* Update CMake logic to enforce Python >= 3.5 for Python Bindings (Jon Siwek, Corelight)

* Update Python Bindings docs for new Python >= 3.5 requirements (Jon Siwek, Corelight)

* Update cmake submodules with changes related to Python 2 EOL (Jon Siwek, Corelight)

1.5.0-dev.22 | 2020-10-21 15:37:57 -0700

* Move CI from Fedora 30 (EOL) to Fedora 32 (Jon Siwek, Corelight)
Expand Down
77 changes: 45 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -- Project Setup ------------------------------------------------------------

cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.5...3.18 FATAL_ERROR)
project(broker C CXX)
include(cmake/CommonCMakeConfig.cmake)
include(GNUInstallDirs)
Expand Down Expand Up @@ -194,39 +194,52 @@ if (NOT OPENSSL_LIBRARIES)
endif()
set(LINK_LIBS ${LINK_LIBS} ${OPENSSL_LIBRARIES})

if ( CAF_ROOT_DIR )
find_package(CAF COMPONENTS openssl test io core REQUIRED)
set(caf_dir "${CAF_LIBRARY_CORE}")
set(caf_config "${CAF_INCLUDE_DIR_CORE}/caf/config.hpp")
get_filename_component(caf_dir ${caf_dir} PATH)
set(CAF_VERSION_MIN_REQUIRED 0.18.0)

if (EXISTS "${caf_dir}/../libcaf_core")
get_filename_component(caf_dir ${caf_dir} PATH)
else ()
set(caf_dir "${CAF_INCLUDE_DIR_CORE}")
endif ()
if ( TARGET CAF::core )
message(STATUS "CAF version ${CAF_VERSION} passed in by parent project")
elseif ( CAF_ROOT )
# TODO: drop < 3.12 compatibility check when raising the minimum CMake version
if (CMAKE_VERSION VERSION_LESS 3.12)
find_package(CAF ${CAF_VERSION_MIN_REQUIRED} REQUIRED CONFIG
COMPONENTS openssl test io core
PATHS "${CAF_ROOT}")
else()
find_package(CAF ${CAF_VERSION_MIN_REQUIRED} REQUIRED CONFIG
COMPONENTS openssl test io core)
endif()
message(STATUS "Using system CAF version ${CAF_VERSION}")
# TODO: drop these legacy variables and simply use the targets consistently
set(CAF_LIBRARIES CAF::core CAF::io CAF::openssl CACHE INTERNAL "")
set(caf_dirs "")
foreach(caf_lib IN LISTS CAF_LIBRARIES ITEMS CAF::test)
get_target_property(dirs ${caf_lib} INTERFACE_INCLUDE_DIRECTORIES)
if ( dirs )
list(APPEND caf_dirs ${dirs})
endif ()
endforeach()
list(REMOVE_DUPLICATES caf_dirs)
list(GET caf_dirs 0 caf_dir)
set(CAF_INCLUDE_DIRS "${caf_dirs}" CACHE INTERNAL "")
else ()
if ( BROKER_ENABLE_DEBUG )
set(CAF_ENABLE_RUNTIME_CHECKS ON)
endif ()
set(CAF_NO_EXAMPLES ON)
set(CAF_NO_OPENCL ON)
set(CAF_NO_TOOLS ON)
set(CAF_NO_PYTHON ON)
set(CAF_NO_UNIT_TESTS ON)
if (ENABLE_STATIC)
set(CAF_BUILD_STATIC ON)
elseif (ENABLE_STATIC_ONLY)
set(CAF_BUILD_STATIC_ONLY ON)
set(CAF_ENABLE_EXAMPLES OFF CACHE INTERNAL "")
set(CAF_ENABLE_TESTING OFF CACHE INTERNAL "")
set(CAF_ENABLE_TOOLS OFF CACHE INTERNAL "")
if (ENABLE_STATIC_ONLY)
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
endif ()
message(STATUS "Using bundled CAF")
add_subdirectory(caf)
endif ()

set(CAF_VERSION_REQUIRED 0.17.5)

if (CAF_VERSION VERSION_LESS CAF_VERSION_REQUIRED)
message(FATAL_ERROR "Broker requires at least CAF version"
" ${CAF_VERSION_REQUIRED}, detected version: ${CAF_VERSION}")
set(caf_dir "${CMAKE_CURRENT_SOURCE_DIR}/caf")
set(CAF_LIBRARIES CAF::core CAF::io CAF::openssl CACHE INTERNAL "")
set(caf_dirs "")
foreach(comp core io openssl test)
list(APPEND caf_dirs
"${CMAKE_CURRENT_SOURCE_DIR}/caf/libcaf_${comp}"
"${CMAKE_CURRENT_BINARY_DIR}/caf/libcaf_${comp}")
endforeach()
set(CAF_INCLUDE_DIRS "${caf_dirs}" CACHE INTERNAL "")
set(CAF_FOUND TRUE CACHE INTERNAL "")
endif ()

include_directories(BEFORE ${CAF_INCLUDE_DIRS})
Expand Down Expand Up @@ -388,8 +401,8 @@ if (NOT DISABLE_PYTHON_BINDINGS)
set(PYTHONINTERP_FOUND false)
endif ()

if (${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} VERSION_LESS 2.7)
message(WARNING "Skipping Python bindings: Python 2.7 or Python 3 required")
if (${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} VERSION_LESS 3.5)
message(WARNING "Skipping Python bindings: Python 3.5 or greater required")
set(PYTHONINTERP_FOUND false)
endif ()

Expand Down
Loading

0 comments on commit 7669595

Please sign in to comment.