From 4b1a20fc6e820d8ff6e3b5568f6945587216b483 Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Wed, 5 Jan 2022 12:06:14 +0100 Subject: [PATCH] spec: debian: monitoring: build jsonnet from source to use 0.18.0 As this new version is recently released it's still not in every distro we use. We now build jsonnet from source so that we can use this new version of jsonnet. This commit could be reverted later on when the new version would be available everywhere. Signed-off-by: Arthur Outhenin-Chalandre (cherry picked from commit ecaf9070aed955c5a7ec7818cd9e2c45ddacc545) --- ceph.spec.in | 2 -- debian/control | 1 - monitoring/ceph-mixin/CMakeLists.txt | 11 +++++++++++ monitoring/ceph-mixin/README.md | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index fba77950cf422..e18c881783bef 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -345,7 +345,6 @@ BuildRequires: lz4-devel >= 1.7 BuildRequires: golang %if 0%{?fedora} || 0%{?rhel} BuildRequires: golang-github-prometheus -BuildRequires: jsonnet BuildRequires: libtool-ltdl-devel BuildRequires: ninja-build BuildRequires: xmlsec1 @@ -364,7 +363,6 @@ BuildRequires: python%{python3_pkgversion}-pyOpenSSL %endif %if 0%{?suse_version} BuildRequires: golang-github-prometheus-prometheus -BuildRequires: jsonnet BuildRequires: libxmlsec1-1 BuildRequires: libxmlsec1-nss1 BuildRequires: libxmlsec1-openssl1 diff --git a/debian/control b/debian/control index 8eb011c006b14..a49e44f96d88d 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,6 @@ Build-Depends: automake, hostname , javahelper, jq , - jsonnet , junit4, libaio-dev, libbabeltrace-ctf-dev, diff --git a/monitoring/ceph-mixin/CMakeLists.txt b/monitoring/ceph-mixin/CMakeLists.txt index 8621c26734250..26b05e2659b76 100644 --- a/monitoring/ceph-mixin/CMakeLists.txt +++ b/monitoring/ceph-mixin/CMakeLists.txt @@ -17,6 +17,17 @@ if(WITH_GRAFANA) BUILD_IN_SOURCE 1 INSTALL_COMMAND cp /_output/jb ) + ExternalProject_Add(jsonnet + GIT_REPOSITORY "https://github.com/google/go-jsonnet.git" + GIT_TAG "v0.18.0" + GIT_SHALLOW TRUE + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/src + CONFIGURE_COMMAND "" + DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/src + BUILD_COMMAND make build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND cp /_output/jsonnet ) + set(CEPH_BUILD_VIRTUALENV $ENV{TMPDIR}) if(NOT CEPH_BUILD_VIRTUALENV) include(AddCephTest) diff --git a/monitoring/ceph-mixin/README.md b/monitoring/ceph-mixin/README.md index 164b73b881c66..7c0cd064c67a0 100644 --- a/monitoring/ceph-mixin/README.md +++ b/monitoring/ceph-mixin/README.md @@ -40,7 +40,7 @@ file, developers should include any necessary changes to the MIB. ### Building from Jsonnet -- Install [jsonnet](https://jsonnet.org/) +- Install [jsonnet](https://jsonnet.org/) (at least v0.18.0) - By installing the package `jsonnet` in most of the distro and `golang-github-google-jsonnet` in fedora - Install [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler) -- 2.39.5