From b633f89d68b49e8d974c64b29e7e9d75fd346c5b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 7 May 2024 12:00:10 +0200 Subject: [PATCH 1/3] Makefile.am: distribute the src/yajl symlink Signed-off-by: Giuseppe Scrivano --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 9646507e..cb73891b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -256,7 +256,8 @@ EXTRA_DIST = autogen.sh \ runtime-spec \ image-spec \ src/ocispec/json_common.h \ - src/ocispec/json_common.c + src/ocispec/json_common.c \ + src/yajl sync: (cd image-spec; git pull https://github.com/opencontainers/image-spec) From bed19adbdaa65920648dbe6d74794719dcba569e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 7 May 2024 13:17:33 +0200 Subject: [PATCH 2/3] configure.ac: --enable-embedded-yajl skips check for yajl Signed-off-by: Giuseppe Scrivano --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 390c0ba9..6125dcbe 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,10 @@ case "${enableval}" in esac],[embedded_yajl=false]) AM_CONDITIONAL([HAVE_EMBEDDED_YAJL], [test x"$embedded_yajl" = xtrue]) -AM_COND_IF([HAVE_EMBEDDED_YAJL], [], [PKG_CHECK_MODULES([YAJL], [yajl >= 2.1.0])]) +AM_COND_IF([HAVE_EMBEDDED_YAJL], [], [ +AC_SEARCH_LIBS(yajl_tree_get, [yajl], [AC_DEFINE([HAVE_YAJL], 1, [Define if libyajl is available])], [AC_MSG_ERROR([*** libyajl headers not found])]) +PKG_CHECK_MODULES([YAJL], [yajl >= 2.0.0]) +]) # Optionally install the library. AC_ARG_ENABLE(libocispec-install, From 2236d50a24489597af144261a2279bb6da2ae7e2 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 7 May 2024 12:08:10 +0200 Subject: [PATCH 3/3] github: test with the embedded yajl library Signed-off-by: Giuseppe Scrivano --- .github/workflows/test.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b21d6c53..8bed8dd9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,21 +38,17 @@ jobs: install: | apt-get update -q -y - apt-get install -q -y python3 automake libtool autotools-dev git make cmake pkg-config gcc wget libyajl-dev + apt-get install -q -y python3 automake libtool autotools-dev git make cmake pkg-config gcc wget xz-utils run: | find $(pwd) -name '.git' -exec bash -c 'git config --global --add safe.directory ${0%/.git}' {} \; - ./autogen.sh - ./configure CFLAGS='-Wall -Wextra -Werror' - make -j $(nproc) distcheck - # check that the working dir is clean - git describe --broken --dirty --all | grep -qv dirty - - make clean + ./autogen.sh --enable-embedded-yajl ./configure --enable-embedded-yajl CFLAGS='-Wall -Wextra -Werror' - make -j $(nproc) distcheck + make -j $(nproc) distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-embedded-yajl" # check that the working dir is clean git describe --broken --dirty --all | grep -qv dirty + make clean + test_and_build_rust_bindings: name: test and build rust bindings runs-on: ubuntu-latest