diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 76296dd3..eb9522b7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,24 +38,14 @@ jobs: install: | apt-get update -q -y - apt-get install -q -y python3 automake libtool autotools-dev git make cmake pkg-config gcc wget xz-utils + apt-get install -q -y python3 automake libtool autotools-dev git make cmake pkg-config gcc wget xz-utils libjansson-dev run: | - # Install jansson - cd jansson; - autoreconf -fi; - ./configure; - make; - make install; - cd .. - # Configure and Run libocispec - export JANSSON_CFLAGS=-I/usr/local/include; - export JANSSON_LIBS=/usr/local/lib/libjansson.so find $(pwd) -name '.git' -exec bash -c 'git config --global --add safe.directory ${0%/.git}' {} \; - ./autogen.sh --enable-embedded-yajl - ./configure --enable-embedded-yajl CFLAGS='-Wall -Wextra -Werror' - make -j $(nproc) distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-embedded-yajl" AM_DISTCHECK_DVI_TARGET="" TESTS="" + ./autogen.sh + ./configure CFLAGS='-Wall -Wextra -Werror' + make -j $(nproc) distcheck AM_DISTCHECK_DVI_TARGET="" TESTS="" # check that the working dir is clean git describe --broken --dirty --all | grep -qv dirty make clean diff --git a/.gitmodules b/.gitmodules index 78677c15..c69ddcaf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,3 @@ [submodule "image-spec"] path = image-spec url = https://github.com/opencontainers/image-spec -[submodule "yajl"] - path = yajl - url = https://github.com/containers/yajl.git -[submodule "jansson"] - path = jansson - url = https://github.com/akheron/jansson diff --git a/Containerfile b/Containerfile index 886bf5b0..b249382e 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 RUN apt-get update && \ apt-get install -y \ @@ -7,17 +7,14 @@ RUN apt-get update && \ git \ libtool \ pkg-config \ - python3 + python3 \ + libjansson-dev COPY . libocispec -RUN cd libocispec/jansson && autoreconf -fi && ./configure && make && make install - RUN cd libocispec && \ - export JANSSON_CFLAGS=-I/usr/local/include && \ - export JANSSON_LIBS=/usr/local/lib/libjansson.so && \ - ./autogen.sh --enable-embedded-yajl && \ - ./configure --enable-embedded-yajl CFLAGS='-Wall -Wextra -Werror' && \ + ./autogen.sh && \ + ./configure CFLAGS='-Wall -Wextra -Werror' && \ make -j $(nproc) distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-embedded-yajl" AM_DISTCHECK_DVI_TARGET="" TESTS="" && \ make clean \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 52bea956..06a32158 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,16 +1,5 @@ -DIST_SUBDIRS = yajl jansson -SUBDIRS = yajl jansson - AM_CFLAGS = $(WARN_CFLAGS) -I$(top_srcdir)/src -I$(top_builddir)/src -if HAVE_EMBEDDED_YAJL -AM_CFLAGS += -I$(top_srcdir)/yajl/src/headers -endif HAVE_EMBEDDED_YAJL - -if HAVE_EMBEDDED_JANSSON -AM_CFLAGS += -I$(top_srcdir)/jansson/src -endif HAVE_EMBEDDED_JANSSON - CLEANFILES = $(man_MANS) src/runtime_spec_stamp src/image_spec_stamp src/image_manifest_stamp src/basic-test_stamp GITIGNOREFILES = build-aux/ gtk-doc.make config.h.in aclocal.m4 @@ -159,18 +148,6 @@ CLEANFILES += $(HEADER_FILES) $(SOURCE_FILES) $(TMP_H_FILES) $(TMP_C_FILES) TESTS_LDADD = libocispec.la $(SELINUX_LIBS) -if HAVE_EMBEDDED_YAJL -TESTS_LDADD += yajl/libyajl.la -else -TESTS_LDADD += $(YAJL_LIBS) -endif - -if HAVE_EMBEDDED_JANSSON -TESTS_LDADD += jansson/src/.libs/libjansson.la -else -TESTS_LDADD += $(JANSSON_LIBS) -endif - libocispec_a_SOURCES = libocispec.a: libocispec.la $(BUILT_SOURCES) src/runtime_spec_stamp src/image_spec_stamp src/image_manifest_stamp src/basic-test_stamp @@ -266,14 +243,11 @@ EXTRA_DIST = autogen.sh \ runtime-spec \ image-spec \ src/ocispec/json_common.h \ - src/ocispec/json_common.c \ - src/yajl + src/ocispec/json_common.c sync: (cd image-spec; git pull https://github.com/opencontainers/image-spec) (cd runtime-spec; git pull https://github.com/opencontainers/runtime-spec) - (cd yajl; git pull https://github.com/containers/yajl main) - (cd jansson; git pull https://github.com/akheron/jansson master) generate: src/runtime_spec_stamp src/image_spec_stamp src/image_manifest_stamp src/basic-test_stamp diff --git a/README.md b/README.md index dd3e8827..5e572907 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ from C, and generate json string from corresponding struct. The parser is generated directly from the JSON schema in the source repository. ## Installation -Expects [yajl](https://github.com/containers/yajl) and [jansson](https://github.com/akheron/jansson) to be installed and linkable. +Expects [jansson](https://github.com/akheron/jansson) to be installed and linkable. ```sh $ ./autogen.sh $ ./configure diff --git a/autogen.sh b/autogen.sh index de5c0463..7c25e77a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,5 @@ #!/bin/sh -(cd yajl; ./autogen.sh) - git submodule update --init --recursive test -n "$srcdir" || srcdir=`dirname "$0"` @@ -15,8 +13,6 @@ if ! (autoreconf --version >/dev/null 2>&1); then exit 1 fi -(cd ./jansson; autoreconf -i) - mkdir -p m4 autoreconf --force --install --verbose diff --git a/configure.ac b/configure.ac index 180d0b4d..999893ab 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.63]) -AC_INIT([libocispec], [0.3], [giuseppe@scrivano.org]) +AC_INIT([libocispec], [0.4], [giuseppe@scrivano.org]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) @@ -12,33 +12,6 @@ AM_INIT_AUTOMAKE([1.11 -Wno-portability foreign tar-ustar no-dist-gzip dist-xz s AM_MAINTAINER_MODE([enable]) AM_SILENT_RULES([yes]) -AM_EXTRA_RECURSIVE_TARGETS([yajl jansson]) -AC_CONFIG_SUBDIRS([yajl jansson]) - -AC_ARG_ENABLE(embedded-yajl, -AS_HELP_STRING([--enable-embedded-yajl], [Statically link a modified yajl 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]) - -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]) -]) - -AC_ARG_ENABLE(embedded-jansson, -AS_HELP_STRING([--enable-embedded-jansson], [Statically link a jansson version]), -[ -case "${enableval}" in - yes) embedded_jansson=true ;; - no) embedded_jansson=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-embedded-jansson) ;; -esac],[embedded_jansson=false]) - AM_CONDITIONAL([HAVE_EMBEDDED_JANSSON], [test x"$embedded_jansson" = xtrue]) AM_COND_IF([HAVE_EMBEDDED_JANSSON], [], [ AC_SEARCH_LIBS(json_object, [jansson], [AC_DEFINE([HAVE_JANSSON], 1, [Define if libjansson is available])], [AC_MSG_ERROR([*** libjansson headers not found])]) diff --git a/jansson b/jansson deleted file mode 160000 index 684e18c9..00000000 --- a/jansson +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 684e18c927e89615c2d501737e90018f4930d6c5 diff --git a/yajl b/yajl deleted file mode 160000 index 6bc52193..00000000 --- a/yajl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6bc5219389fd2752631682b0a8368e6d8218a8c5