Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- run: |
sudo apt-get update
sudo apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libcap-dev libseccomp-dev libyajl-dev go-md2man libtool autoconf python3 automake libprotobuf-c-dev
sudo apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libcap-dev libseccomp-dev go-md2man libtool autoconf python3 automake libprotobuf-c-dev
./autogen.sh
./configure
make -j $(nproc)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- run: sudo apt-get update

- run: sudo apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libcap-dev libseccomp-dev libyajl-dev go-md2man libtool autoconf python3 automake libprotobuf-c-dev
- run: sudo apt-get install -y make git gcc build-essential pkgconf libtool libsystemd-dev libcap-dev libseccomp-dev go-md2man libtool autoconf python3 automake libprotobuf-c-dev

- run: |
set -ex
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

install: |
apt-get update -y
apt-get install -y automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libyajl-dev libprotobuf-c-dev clang mawk
apt-get install -y automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libprotobuf-c-dev clang mawk

run: |
find $(pwd) -name '.git' -exec bash -c 'git config --global --add safe.directory ${0%/.git}' {} \;
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

sudo add-apt-repository -y ppa:criu/ppa
# add-apt-repository runs apt-get update so we don't have to.
sudo apt-get install -q -y criu automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget libsystemd-dev gperf clang-format libyajl-dev containerd runc libasan6 libprotobuf-c-dev mawk
sudo apt-get install -q -y criu automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget libsystemd-dev gperf clang-format containerd runc libasan6 libprotobuf-c-dev mawk
# Fedora (used by maintainers as well as for packaging) has newer
# md2man than in Ubuntu, so we have to install it from source.
GOBIN=~/.local/bin go install github.com/cpuguy83/go-md2man/v2@latest
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libyajl-dev libprotobuf-c-dev mawk
sudo apt-get install -q -y automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libprotobuf-c-dev mawk
- uses: lumaxis/shellcheck-problem-matchers@v2
- name: shellcheck
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libocispec"]
path = libocispec
url = https://github.com/containers/libocispec.git
url = https://github.com/giuseppe/libocispec.git
54 changes: 27 additions & 27 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -75,48 +75,48 @@ libcrun_SOURCES = src/libcrun/utils.c \
src/libcrun/net_device.c \
src/libcrun/terminal.c

if HAVE_EMBEDDED_YAJL
maybe_libyajl.la = libocispec/yajl/libyajl.la
if HAVE_EMBEDDED_YYJSON
maybe_libyyjson =
else
maybe_libyajl.la =
maybe_libyyjson = $(YYJSON_LIBS)
endif

libocispec/libocispec.la:
$(MAKE) $(AM_MAKEFLAGS) -C libocispec libocispec.la

libcrun_la_SOURCES = $(libcrun_SOURCES)
libcrun_la_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -fvisibility=hidden
libcrun_la_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -fvisibility=hidden
if ENABLE_COVERAGE
libcrun_la_CFLAGS += $(COVERAGE_CFLAGS)
libcrun_la_LDFLAGS = -Wl,--version-script=$(abs_top_srcdir)/libcrun.lds $(COVERAGE_LDFLAGS)
else
libcrun_la_LDFLAGS = -Wl,--version-script=$(abs_top_srcdir)/libcrun.lds
endif
libcrun_la_LIBADD = libocispec/libocispec.la $(FOUND_LIBS) $(maybe_libyajl.la)
libcrun_la_LIBADD = libocispec/libocispec.la $(FOUND_LIBS) $(maybe_libyyjson)

# build a version with all the symbols visible for testing
if BUILD_TESTS
libcrun_testing_la_SOURCES = $(libcrun_SOURCES)
libcrun_testing_la_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -fvisibility=default
libcrun_testing_la_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -fvisibility=default
if ENABLE_COVERAGE
libcrun_testing_la_CFLAGS += $(COVERAGE_CFLAGS)
libcrun_testing_la_LDFLAGS = $(COVERAGE_LDFLAGS)
endif
libcrun_testing_la_LIBADD = libocispec/libocispec.la $(maybe_libyajl.la)
libcrun_testing_la_LIBADD = libocispec/libocispec.la $(maybe_libyyjson)
endif

if PYTHON_BINDINGS
pyexec_LTLIBRARIES = python_crun.la
python_crun_la_SOURCES = python/crun_python.c
python_crun_la_CFLAGS = -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/libocispec/src -I $(abs_top_builddir)/src $(PYTHON_CFLAGS)
python_crun_la_CFLAGS = -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src $(PYTHON_CFLAGS)
python_crun_la_LDFLAGS = -avoid-version -module $(PYTHON_LDFLAGS)
python_crun_la_LIBADD = libcrun.la $(PYTHON_LIBS) $(FOUND_LIBS) $(maybe_libyajl.la)
python_crun_la_LIBADD = libcrun.la $(PYTHON_LIBS) $(FOUND_LIBS) $(maybe_libyyjson)
endif

if LUA_BINDINGS
luaexec_LTLIBRARIES = luacrun.la
luacrun_la_SOURCES = lua/lua_crun.c
luacrun_la_CFLAGS = -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/libocispec/src -I $(abs_top_builddir)/src $(LUA_INCLUDE)
luacrun_la_CFLAGS = -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src $(LUA_INCLUDE)
luacrun_la_LDFLAGS = -avoid-version -module
luacrun_la_LIBADD = libcrun.la $(LUA_LIB) $(FOUND_LIBS)

Expand Down Expand Up @@ -145,7 +145,7 @@ dist-luarock: $(LUACRUN_ROCK)

endif

crun_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -D CRUN_LIBDIR="\"$(CRUN_LIBDIR)\""
crun_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -D CRUN_LIBDIR="\"$(CRUN_LIBDIR)\""
if ENABLE_COVERAGE
crun_CFLAGS += $(COVERAGE_CFLAGS)
endif
Expand All @@ -160,7 +160,7 @@ else
crun_LDFLAGS = -Wl,--unresolved-symbols=ignore-all $(CRUN_LDFLAGS)
endif
else
crun_LDADD = libcrun.la $(FOUND_LIBS) $(maybe_libyajl.la)
crun_LDADD = libcrun.la $(FOUND_LIBS) $(maybe_libyyjson)
if ENABLE_COVERAGE
crun_LDFLAGS = $(CRUN_LDFLAGS) $(COVERAGE_LDFLAGS)
else
Expand Down Expand Up @@ -203,74 +203,74 @@ endif
if BUILD_TESTS
check_PROGRAMS = tests/init $(UNIT_TESTS) tests/tests_libcrun_fuzzer

TESTS_LDADD = libcrun_testing.la $(FOUND_LIBS) $(maybe_libyajl.la)
TESTS_LDADD = libcrun_testing.la $(FOUND_LIBS) $(maybe_libyyjson)

tests_init_LDADD =
tests_init_LDFLAGS = -static-libgcc -all-static
tests_init_CFLAGS = -g -O2
tests_init_SOURCES = tests/init.c

tests_tests_libcrun_utils_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_utils_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_utils_SOURCES = tests/tests_libcrun_utils.c
tests_tests_libcrun_utils_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_utils_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_ring_buffer_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_ring_buffer_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_ring_buffer_SOURCES = tests/tests_libcrun_ring_buffer.c
tests_tests_libcrun_ring_buffer_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_ring_buffer_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_intelrdt_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_intelrdt_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_intelrdt_SOURCES = tests/tests_libcrun_intelrdt.c
tests_tests_libcrun_intelrdt_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_intelrdt_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_fuzzer_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_fuzzer_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_fuzzer_SOURCES = tests/tests_libcrun_fuzzer.c
tests_tests_libcrun_fuzzer_LDADD = $(TESTS_LDADD) libocispec/libocispec.la $(maybe_libyajl.la)
tests_tests_libcrun_fuzzer_LDADD = $(TESTS_LDADD) libocispec/libocispec.la $(maybe_libyyjson)
tests_tests_libcrun_fuzzer_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_errors_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_errors_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_errors_SOURCES = tests/tests_libcrun_errors.c
tests_tests_libcrun_errors_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_errors_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_terminal_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_terminal_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_terminal_SOURCES = tests/tests_libcrun_terminal.c
tests_tests_libcrun_terminal_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_terminal_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_custom_handler_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_custom_handler_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_custom_handler_SOURCES = tests/tests_libcrun_custom_handler.c
tests_tests_libcrun_custom_handler_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_custom_handler_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_linux_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_linux_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_linux_SOURCES = tests/tests_libcrun_linux.c
tests_tests_libcrun_linux_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_linux_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_signals_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_signals_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_signals_SOURCES = tests/tests_libcrun_signals.c
tests_tests_libcrun_signals_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_signals_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_mount_flags_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_mount_flags_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_mount_flags_SOURCES = tests/tests_libcrun_mount_flags.c
tests_tests_libcrun_mount_flags_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_mount_flags_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_chroot_realpath_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_chroot_realpath_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_chroot_realpath_SOURCES = tests/tests_libcrun_chroot_realpath.c
tests_tests_libcrun_chroot_realpath_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_chroot_realpath_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_seccomp_notify_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_seccomp_notify_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_seccomp_notify_SOURCES = tests/tests_libcrun_seccomp_notify.c
tests_tests_libcrun_seccomp_notify_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_seccomp_notify_LDFLAGS = $(crun_LDFLAGS)

tests_tests_libcrun_cgroup_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_cgroup_CFLAGS = -I $(abs_top_builddir)/libocispec/src -I $(abs_top_srcdir)/libocispec/src -I $(abs_top_srcdir)/libocispec/yyjson/src -I $(abs_top_builddir)/src -I $(abs_top_srcdir)/src
tests_tests_libcrun_cgroup_SOURCES = tests/tests_libcrun_cgroup.c
tests_tests_libcrun_cgroup_LDADD = $(TESTS_LDADD)
tests_tests_libcrun_cgroup_LDFLAGS = $(crun_LDFLAGS)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ These dependencies are required for the build:
$ sudo dnf install -y \
autoconf automake gcc git-core glibc-static go-md2man \
libcap-devel libseccomp-devel libtool make pkg-config \
python python-libmount systemd-devel yajl-devel
python python-libmount systemd-devel yyjson-devel
```

### RHEL/CentOS Stream 9
Expand All @@ -69,7 +69,7 @@ $ sudo dnf config-manager --set-enabled crb
$ sudo dnf install -y \
autoconf automake gcc git-core glibc-static go-md2man \
libcap-devel libseccomp-devel libtool make pkg-config \
python python-libmount systemd-devel yajl-devel
python python-libmount systemd-devel yyjson-devel
```

### RHEL/CentOS Stream 10
Expand All @@ -82,28 +82,28 @@ $ sudo dnf install -y \
python python-libmount systemd-devel
```

NOTE that you need to add `--enable-embedded-yajl` to `./configure` flags below.
NOTE that you need to add `--enable-embedded-yyjson` to `./configure` flags below.

### Ubuntu

```console
$ sudo apt-get install -y make git gcc build-essential pkgconf libtool \
libsystemd-dev libprotobuf-c-dev libcap-dev libseccomp-dev libyajl-dev \
libsystemd-dev libprotobuf-c-dev libcap-dev libseccomp-dev libyyjson-dev \
go-md2man autoconf python3 automake
```

### Alpine

```console
# apk add gcc automake autoconf libtool gettext pkgconf git make musl-dev \
python3 libcap-dev libseccomp-dev yajl-dev argp-standalone go-md2man
python3 libcap-dev libseccomp-dev yyjson-dev argp-standalone go-md2man
```

### Tumbleweed

```console
# zypper install make automake autoconf gettext libtool gcc libcap-devel \
systemd-devel libyajl-devel libseccomp-devel python3 go-md2man \
systemd-devel libyyjson-devel libseccomp-devel python3 go-md2man \
glibc-static;
```

Expand Down
28 changes: 17 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ esac
[enable_libcrun=true])
AM_CONDITIONAL([ENABLE_LIBCRUN], [test "x${enable_libcrun}" = xtrue])

dnl embedded yajl
AC_ARG_ENABLE(embedded-yajl,
AS_HELP_STRING([--enable-embedded-yajl], [Statically link a modified yajl version]),
dnl embedded yyjson
AC_ARG_ENABLE(embedded-yyjson,
AS_HELP_STRING([--enable-embedded-yyjson], [Statically link the embedded yyjson version]),
[
case "${enableval}" in
yes) embedded_yajl=true ;;
no) embedded_yajl=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-embedded-yajl) ;;
esac],[embedded_yajl=false])
yes) embedded_yyjson=true ;;
no) embedded_yyjson=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-embedded-yyjson) ;;
esac],[embedded_yyjson=auto])

AC_ARG_ENABLE(dynload-libcrun,
AS_HELP_STRING([--enable-dynload-libcrun], [Dynamically load libcrun]),
Expand All @@ -87,11 +87,17 @@ case "${enableval}" in
esac],[dynload_libcrun=false])
AM_CONDITIONAL([DYNLOAD_LIBCRUN], [test x"$dynload_libcrun" = xtrue])

AM_CONDITIONAL([HAVE_EMBEDDED_YAJL], [test x"$embedded_yajl" = xtrue])
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])
if test x"$embedded_yyjson" != xtrue; then
PKG_CHECK_MODULES([YYJSON], [yyjson >= 0.8.0], [embedded_yyjson=false], [
if test x"$embedded_yyjson" = xauto; then
AC_MSG_NOTICE([yyjson not found on the system, using the embedded version])
embedded_yyjson=true
else
AC_MSG_ERROR([yyjson >= 0.8.0 not found and embedded yyjson is disabled])
fi
])
fi
AM_CONDITIONAL([HAVE_EMBEDDED_YYJSON], [test x"$embedded_yyjson" = xtrue])

dnl libcap
AC_ARG_ENABLE([caps],
Expand Down
2 changes: 1 addition & 1 deletion contrib/honggfuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

test -e rootfs || mkdir rootfs

./configure --enable-embedded-yajl CC=hfuzz-clang CPPFLAGS='-D FUZZER' CFLAGS="-ggdb3"
./configure --enable-embedded-yyjson CC=hfuzz-clang CPPFLAGS='-D FUZZER' CFLAGS="-ggdb3"

make

Expand Down
5 changes: 1 addition & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@
'';
});
staticLibseccomp = static pkgs.libseccomp;
staticYajl = pkgs.yajl.overrideAttrs (x: {
cmakeFlags = (x.cmakeFlags or []) ++ [ "-DBUILD_SHARED_LIBS=OFF" ];
});
staticSystemd = (static pkgs.systemdMinimal).overrideAttrs (x: {
outputs = [ "out" "dev" ];
mesonFlags = x.mesonFlags ++ [
Expand Down Expand Up @@ -116,7 +113,7 @@
inherit enableCriu enableSystemd;
libcap = staticLibcap;
libseccomp = staticLibseccomp;
yajl = staticYajl;
yyjson = pkgs.yyjson;
libsystemd = staticSystemd;
criu = staticCriu;
};
Expand Down
Loading
Loading