Move vendoring of Sentry to it’s own module and switch to using Git instead of the releases page. (#17358)
* Move vendoring of Sentry to it’s own module. Also, switch to pulling from the git repo instead of the release URL, as it’s more reliable, less prone to potential tampering, and also more consistent with all of our other vendoring. * Actually remove the Sentry vendoring code that was in the main file.
This commit is contained in:
parent
7b0a46b71c
commit
e834982560
|
@ -142,24 +142,6 @@ if(ENABLE_PLUGIN_GO)
|
|||
find_package(Go "${MIN_GO_VERSION}" REQUIRED)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SENTRY)
|
||||
include(FetchContent)
|
||||
|
||||
# ignore debhelper
|
||||
set(FETCHCONTENT_FULLY_DISCONNECTED Off)
|
||||
|
||||
set(SENTRY_VERSION 0.6.6)
|
||||
set(SENTRY_BACKEND "breakpad")
|
||||
set(SENTRY_BUILD_SHARED_LIBS OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
sentry
|
||||
URL https://github.com/getsentry/sentry-native/releases/download/${SENTRY_VERSION}/sentry-native.zip
|
||||
URL_HASH SHA256=7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c
|
||||
)
|
||||
FetchContent_MakeAvailable(sentry)
|
||||
endif()
|
||||
|
||||
if(ENABLE_WEBRTC)
|
||||
include(FetchContent)
|
||||
|
||||
|
@ -277,6 +259,10 @@ endif()
|
|||
include(NetdataJSONC)
|
||||
include(NetdataYAML)
|
||||
|
||||
if(ENABLE_SENTRY)
|
||||
include(NetdataSentry)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Checks from custom modules
|
||||
#
|
||||
|
@ -284,6 +270,10 @@ include(NetdataYAML)
|
|||
netdata_detect_jsonc()
|
||||
netdata_detect_libyaml()
|
||||
|
||||
if(ENABLE_SENTRY)
|
||||
netdata_bundle_sentry()
|
||||
endif()
|
||||
|
||||
#
|
||||
# check include files
|
||||
#
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# Functions and macros for handling of Sentry
|
||||
#
|
||||
# Copyright (c) 2024 Netdata Inc.
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Handle bundling of Sentry.
|
||||
#
|
||||
# This pulls it in as a sub-project using FetchContent functionality.
|
||||
#
|
||||
# This needs to be a function and not a macro for variable scoping
|
||||
# reasons. All the things we care about from the sub-project are exposed
|
||||
# as targets, which are globally scoped and not function scoped.
|
||||
function(netdata_bundle_sentry)
|
||||
include(FetchContent)
|
||||
|
||||
# ignore debhelper
|
||||
set(FETCHCONTENT_FULLY_DISCONNECTED Off)
|
||||
|
||||
set(SENTRY_VERSION 0.6.6)
|
||||
set(SENTRY_BACKEND "breakpad")
|
||||
set(SENTRY_BUILD_SHARED_LIBS OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
sentry
|
||||
GIT_REPOSITORY https://github.com/getsentry/sentry-native.git
|
||||
GIT_TAG c97bcc63fa89ae557cef9c9b6e3acb11a72ff97d # v0.6.6
|
||||
)
|
||||
FetchContent_MakeAvailable(sentry)
|
||||
endfunction()
|
Loading…
Reference in New Issue