Skip to content

Commit

Permalink
spec: debian: monitoring: build jsonnet from source to use 0.18.0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MrFreezeex committed Feb 3, 2022
1 parent 98236e3 commit ecaf907
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 0 additions & 2 deletions ceph.spec.in
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion debian/control
Expand Up @@ -24,7 +24,6 @@ Build-Depends: automake,
hostname <pkg.ceph.check>,
javahelper,
jq <pkg.ceph.check>,
jsonnet <pkg.ceph.check>,
junit4,
libaio-dev,
libbabeltrace-ctf-dev,
Expand Down
11 changes: 11 additions & 0 deletions monitoring/ceph-mixin/CMakeLists.txt
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion monitoring/ceph-mixin/README.md
Expand Up @@ -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)
Expand Down

0 comments on commit ecaf907

Please sign in to comment.