]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
spec: debian: monitoring: build jsonnet from source to use 0.18.0
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Wed, 5 Jan 2022 11:06:14 +0000 (12:06 +0100)
committerAashish Sharma <aasharma@redhat.com>
Tue, 26 Apr 2022 04:36:36 +0000 (10:06 +0530)
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 <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit ecaf9070aed955c5a7ec7818cd9e2c45ddacc545)

ceph.spec.in
debian/control
monitoring/ceph-mixin/CMakeLists.txt
monitoring/ceph-mixin/README.md

index eaac334fcaa6a22f64ea1fb409cc0f7824bf6568..29fcbec748ac774edb586d80481e3e7549a38c5d 100644 (file)
@@ -328,7 +328,6 @@ BuildRequires:      lz4-devel >= 1.7
 BuildRequires: golang
 %if 0%{?fedora} || 0%{?rhel}
 BuildRequires: golang-github-prometheus
-BuildRequires: jsonnet
 BuildRequires: libtool-ltdl-devel
 BuildRequires: xmlsec1
 BuildRequires: xmlsec1-devel
@@ -346,7 +345,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
index 82c2094082d8c25ac79f10d5338a14b48a8039c9..b5ef58f07b4a44eff0d4d5a15557ab555cdfe3d0 100644 (file)
@@ -24,7 +24,6 @@ Build-Depends: automake,
                g++ (>= 7),
                javahelper,
                jq <pkg.ceph.check>,
-               jsonnet <pkg.ceph.check>,
                junit4,
                libaio-dev,
                libbabeltrace-ctf-dev,
index 8621c267342506cad29b62b80470346df61421aa..26b05e2659b76f8f1dd54727bafa20322fee99ce 100644 (file)
@@ -17,6 +17,17 @@ if(WITH_GRAFANA)
       BUILD_IN_SOURCE 1
       INSTALL_COMMAND cp <SOURCE_DIR>/_output/jb <INSTALL_DIR>)
 
+    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 <SOURCE_DIR>/_output/jsonnet <INSTALL_DIR>)
+
     set(CEPH_BUILD_VIRTUALENV $ENV{TMPDIR})
     if(NOT CEPH_BUILD_VIRTUALENV)
       include(AddCephTest)
index 164b73b881c668bd26a34ad051b261dd57bac73b..7c0cd064c67a04e09ac0fe66f820b15f1669588d 100644 (file)
@@ -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)