build: avoid autoreconf -fi in jq

In their readme, jq claims that you don't have
to do autoreconf -fi when downloading a released tarball.

However, they forgot to push the released makefiles
into their release tarbal.

For this reason, we have to mirror their release after
doing the configuration ourselves.

This is needed because many distros do not ship the right
version of autoreconf, making virtually impossible to build
Falco on them.

Here is how it was created:

git clone https://github.com/stedolan/jq.git
cd jq
git checkout tags/jq-1.6
git submodule update --init
autoreconf -fi

Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
This commit is contained in:
Lorenzo Fontana 2020-08-17 12:08:31 +02:00 committed by poiana
parent f388d95591
commit 59b2bdac9d
2 changed files with 17 additions and 4 deletions

View File

@ -26,11 +26,24 @@ else ()
set(JQ_LIB "${JQ_INSTALL_DIR}/lib/libjq.a")
set(ONIGURUMA_LIB "${JQ_INSTALL_DIR}/lib/libonig.a")
# Why we mirror jq here?
#
# In their readme, jq claims that you don't have
# to do autoreconf -fi when downloading a released tarball.
#
# However, they forgot to push the released makefiles
# into their release tarbal.
#
# For this reason, we have to mirror their release after
# doing the configuration ourselves.
#
# This is needed because many distros do not ship the right
# version of autoreconf, making virtually impossible to build Falco on them.
ExternalProject_Add(
jq
URL "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz"
URL_HASH "SHA256=5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72"
CONFIGURE_COMMAND autoreconf -fi && ./configure --disable-maintainer-mode --enable-all-static --disable-dependency-tracking --with-oniguruma=builtin --prefix=${JQ_INSTALL_DIR}
URL "https://fs.fntlnz.wtf/falco/jq-1.6.tar.gz" # todo: upload this to Falco bintray
URL_HASH "SHA256=787518068c35e244334cc79b8e56b60dbab352dff175b7f04a94f662b540bfd9"
CONFIGURE_COMMAND ./configure --disable-maintainer-mode --enable-all-static --disable-dependency-tracking --with-oniguruma=builtin --prefix=${JQ_INSTALL_DIR}
BUILD_COMMAND ${CMD_MAKE} LDFLAGS=-all-static
BUILD_IN_SOURCE 1
INSTALL_COMMAND ${CMD_MAKE} install)

View File

@ -28,7 +28,7 @@ file(MAKE_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})
# In case you want to test against another sysdig version just pass the variable - ie., `cmake -DSYSDIG_VERSION=dev ..`
if(NOT SYSDIG_VERSION)
set(SYSDIG_VERSION "build/jq-update") # todo(fntlnz): revert this before merging
set(SYSDIG_CHECKSUM "SHA256=be04af32ade8f4c77ae39c45cb8820975f023b46fdf45edcdd28be104d89110b")
set(SYSDIG_CHECKSUM "SHA256=7a775966ed72b239561707b73ac59e8b11a586aee4c5baa6a8c39fd9b8e38f8d")
endif()
set(PROBE_VERSION "${SYSDIG_VERSION}")