Coder Social home page Coder Social logo

containers / libocispec Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 27.0 575 KB

a C library for accessing OCI runtime and image spec files

License: Other

Makefile 22.43% Shell 1.21% M4 0.60% Python 35.65% C 29.90% JavaScript 0.56% Rust 9.65%
c containers oci parser rust

libocispec's People

Contributors

0x0916 avatar bruceg avatar buermarc avatar cdoern avatar dawningrain avatar duguhaotian avatar ecordonnier avatar flouthoc avatar giuseppe avatar jingwoo avatar lifeng68 avatar marcin-koczwara-red avatar michaelforney avatar rhatdan avatar thesamesam avatar tomsweeneyredhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libocispec's Issues

Update LICENSE to specifically layout the multi-license arrangement

I see #59,
but if I were investigating this project the first thing I see is
Screenshot from 2021-03-15 07-50-05

If the LICENSE file isn't directly a copy from say OSI, then github won't match it as such in that space. Then folks can open the LICENSE file and see that they can still link against libocispec with bringing the copyleft license.

Boolean items with value of False, got "lost" in JSON file

As a part of the process I would like to load json.config, change some data, and save it to file. But it looks like if the json.config have fields that are boolean and their value is false they "*_present" is set to false also. I would assume that "name" would be false, and "name_present" would be true. This is not the case. Simmilar issue is when we have empty array, but for that I am not sure if this is bug or feature. I created test + 2 config.json that work with this test. For "bug.json" we can see that generated json is not exactly the same as source one, for "bug2.json" (which differs only with values of fields we can see that json generated is same as source.

Steps to reproduce:

  1. Unpack test3.tar.gz
  2. Make
  3. run "tests/test-3"
  4. We see here that terminal_present == 0 which is bug
  5. Change test-3.c line 29 to use "bug2.json" instead of "bug.json"
  6. Make
  7. run "tests/test-3"
  8. We see hare that terminal_present == 1 so it works properly if value is true

As mentioned above empty array missing can be checked with same steps using same code.
test3.tar.gz

Compilation Issue (possible race condition?)

During crun compilation, I occasionally see the following errors related to libocispec. Sometimes the issue doesn't occur but the issue is always related to unknown type names in libocispec during the libocispec compilation.

I suspect this is a race condtion somewhere in libocispec, since we run make with many threads, where for some reason it's attempting to compile libocispec in the wrong order, perhaps not waiting for the python generation to fully finish? Running make for a second time will always compile successfully.

Example of a failure. In this scenario, I am just attempting to build libocispec standalone (not the whole of crun) . When compared to a successful build, it's trying to compile the tests first.

NOTE: make -j 48
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=. --out=./src ./runtime-spec/schema ./image-spec/schema
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=./tests/test-spec --out=./src ./tests/test-spec/imageManifestItems
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=. --out=./src ./runtime-spec/schema ./image-spec/schema
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=./tests/test-spec --out=./src ./tests/test-spec/imageManifestItems
make  all-am
make[1]: Entering directory `work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0/git/libocispec'
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=. --out=./src ./runtime-spec/schema ./image-spec/schema
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/json_common.lo src/json_common.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/read-file.lo src/read-file.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/validate.o src/validate.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-1.o tests/test-1.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-2.o tests/test-2.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-3.o tests/test-3.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-4.o tests/test-4.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-5.o tests/test-5.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-6.o tests/test-6.c
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/json_common.c -o src/json_common.o
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-7.o tests/test-7.c
ERROR: oe_runmake failed
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=work/cortexa15t2hf-neon-rdk-linux-gnueabi/crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-8.o tests/test-8.c
In file included from ./src/runtime_spec_schema_config_schema.h:9:0,
                 from tests/test-1.c:23:
./src/runtime_spec_schema_config_linux.h:229:5: error: unknown type name 'runtime_spec_schema_defs_id_mapping'
     runtime_spec_schema_defs_id_mapping **uid_mappings;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_linux.h:232:5: error: unknown type name 'runtime_spec_schema_defs_id_mapping'
     runtime_spec_schema_defs_id_mapping **gid_mappings;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tests/test-1.c:23:0:
./src/runtime_spec_schema_config_schema.h:22:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **prestart;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_schema.h:25:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **create_runtime;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_schema.h:28:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **create_container;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_schema.h:31:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **start_container;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_schema.h:34:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **poststart;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/runtime_spec_schema_config_schema.h:37:5: error: unknown type name 'runtime_spec_schema_defs_hook'
     runtime_spec_schema_defs_hook **poststop;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from tests/test-1.c:23:0:
./src/runtime_spec_schema_config_schema.h:193:5: error: unknown type name 'runtime_spec_schema_defs_mount'
     runtime_spec_schema_defs_mount **mounts;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/test-1.c: In function 'main':
tests/test-1.c:60:35: error: request for member 'destination' in something not a structure or union
   if (strcmp (container->mounts[0]->destination, "/proc") && strcmp (container->mounts[0]->destination, container_gen->mounts[0]->destination))
                                   ^~
tests/test-1.c:60:90: error: request for member 'destination' in something not a structure or union
   if (strcmp (container->mounts[0]->destination, "/proc") && strcmp (container->mounts[0]->destination, container_gen->mounts[0]->destination))
                                                                                          ^~
tests/test-1.c:60:129: error: request for member 'destination' in something not a structure or union
   if (strcmp (container->mounts[0]->destination, "/proc") && strcmp (container->mounts[0]->destination, container_gen->mounts[0]->destination))
                                                                                                                                 ^~
make[1]: *** [tests/test-1.o] Error 1

Example successful compilation:

NOTE: make -j 48
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=. --out=./src ./runtime-spec/schema ./image-spec/schema
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=./tests/test-spec --out=./src ./tests/test-spec/imageManifestItems
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=. --out=./src ./runtime-spec/schema ./image-spec/schema
/usr/bin/python3 ./src/generate.py --gen-common --gen-ref --root=./tests/test-spec --out=./src ./tests/test-spec/imageManifestItems
make  all-am
make[1]: Entering directory `crun/0.14.1-r0/git/libocispec'
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_config_schema.lo src/image_spec_schema_config_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_content_descriptor.lo src/image_spec_schema_content_descriptor.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_defs.lo src/image_spec_schema_defs.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_defs_descriptor.lo src/image_spec_schema_defs_descriptor.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_image_index_schema.lo src/image_spec_schema_image_index_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_image_layout_schema.lo src/image_spec_schema_image_layout_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_spec_schema_image_manifest_schema.lo src/image_spec_schema_image_manifest_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_config_linux.lo src/runtime_spec_schema_config_linux.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_config_schema.lo src/runtime_spec_schema_config_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_config_solaris.lo src/runtime_spec_schema_config_solaris.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_config_vm.lo src/runtime_spec_schema_config_vm.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_config_windows.lo src/runtime_spec_schema_config_windows.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_defs.lo src/runtime_spec_schema_defs.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_defs_linux.lo src/runtime_spec_schema_defs_linux.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_defs_vm.lo src/runtime_spec_schema_defs_vm.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_defs_windows.lo src/runtime_spec_schema_defs_windows.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/runtime_spec_schema_state_schema.lo src/runtime_spec_schema_state_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/image_manifest_items_image_manifest_items_schema.lo src/image_manifest_items_image_manifest_items_schema.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/json_common.lo src/json_common.c
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=compile arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/read-file.lo src/read-file.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o src/validate.o src/validate.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-1.o tests/test-1.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-2.o tests/test-2.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-3.o tests/test-3.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-4.o tests/test-4.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-5.o tests/test-5.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-6.o tests/test-6.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-7.o tests/test-7.c
arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I.     -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=    -c -o tests/test-8.o tests/test-8.c
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_defs.c -o src/image_spec_schema_defs.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_image_layout_schema.c -o src/image_spec_schema_image_layout_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_config_solaris.c -o src/runtime_spec_schema_config_solaris.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_config_windows.c -o src/runtime_spec_schema_config_windows.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_config_vm.c -o src/runtime_spec_schema_config_vm.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_defs_windows.c -o src/runtime_spec_schema_defs_windows.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_defs.c -o src/runtime_spec_schema_defs.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_manifest_items_image_manifest_items_schema.c -o src/image_manifest_items_image_manifest_items_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/read-file.c -o src/read-file.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_config_schema.c -o src/image_spec_schema_config_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_config_linux.c -o src/runtime_spec_schema_config_linux.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_content_descriptor.c -o src/image_spec_schema_content_descriptor.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_config_schema.c -o src/runtime_spec_schema_config_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_image_manifest_schema.c -o src/image_spec_schema_image_manifest_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_image_index_schema.c -o src/image_spec_schema_image_index_schema.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/image_spec_schema_defs_descriptor.c -o src/image_spec_schema_defs_descriptor.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_defs_vm.c -o src/runtime_spec_schema_defs_vm.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_defs_linux.c -o src/runtime_spec_schema_defs_linux.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/json_common.c -o src/json_common.o
arm-rdk-linux-gnueabi-libtool: compile:  arm-rdk-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=sysroots/arrisxi6 -DHAVE_CONFIG_H -I. -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6= -c src/runtime_spec_schema_state_schema.c -o src/runtime_spec_schema_state_schema.o
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o libocispec.la  src/image_spec_schema_config_schema.lo src/image_spec_schema_content_descriptor.lo src/image_spec_schema_defs.lo src/image_spec_schema_defs_descriptor.lo src/image_spec_schema_image_index_schema.lo src/image_spec_schema_image_layout_schema.lo src/image_spec_schema_image_manifest_schema.lo src/runtime_spec_schema_config_linux.lo src/runtime_spec_schema_config_schema.lo src/runtime_spec_schema_config_solaris.lo src/runtime_spec_schema_config_vm.lo src/runtime_spec_schema_config_windows.lo src/runtime_spec_schema_defs.lo src/runtime_spec_schema_defs_linux.lo src/runtime_spec_schema_defs_vm.lo src/runtime_spec_schema_defs_windows.lo src/runtime_spec_schema_state_schema.lo src/image_manifest_items_image_manifest_items_schema.lo src/json_common.lo src/read-file.lo  
arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc-ar cru .libs/libocispec.a  src/image_spec_schema_config_schema.o src/image_spec_schema_content_descriptor.o src/image_spec_schema_defs.o src/image_spec_schema_defs_descriptor.o src/image_spec_schema_image_index_schema.o src/image_spec_schema_image_layout_schema.o src/image_spec_schema_image_manifest_schema.o src/runtime_spec_schema_config_linux.o src/runtime_spec_schema_config_schema.o src/runtime_spec_schema_config_solaris.o src/runtime_spec_schema_config_vm.o src/runtime_spec_schema_config_windows.o src/runtime_spec_schema_defs.o src/runtime_spec_schema_defs_linux.o src/runtime_spec_schema_defs_vm.o src/runtime_spec_schema_defs_windows.o src/runtime_spec_schema_state_schema.o src/image_manifest_items_image_manifest_items_schema.o src/json_common.o src/read-file.o
sysroots/x86_64-linux/usr/libexec/arm-rdk-linux-gnueabi/gcc/arm-rdk-linux-gnueabi/6.4.0/ar: `u' modifier ignored since `D' is the default (see `U')
arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc-ranlib .libs/libocispec.a
arm-rdk-linux-gnueabi-libtool: link: ( cd ".libs" && rm -f "libocispec.la" && ln -s "../libocispec.la" "libocispec.la" )
./arm-rdk-linux-gnueabi-libtool --mode=link  libocispec.la -o libocispec.a
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o src/validate src/validate.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-1 tests/test-1.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-2 tests/test-2.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-3 tests/test-3.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-4 tests/test-4.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-5 tests/test-5.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-6 tests/test-6.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-7 tests/test-7.o libocispec.la  -lyajl 
./arm-rdk-linux-gnueabi-libtool  --tag=CC   --mode=link arm-rdk-linux-gnueabi-gcc  -march=armv7ve -mthumb -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a15 -fno-omit-frame-pointer -fno-optimize-sibling-calls  --sysroot=sysroots/arrisxi6  -I./src -I./src -Os -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=crun/0.14.1-r0=/usr/src/debug/crun/0.14.1-r0 -fdebug-prefix-map=sysroots/x86_64-linux= -fdebug-prefix-map=sysroots/arrisxi6=     -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed    -o tests/test-8 tests/test-8.o libocispec.la  -lyajl 
arm-rdk-linux-gnueabi-libtool: link: arm-rdk-linux-gnueabi-gcc-ar cru libocispec.a 
sysroots/x86_64-linux/usr/libexec/arm-rdk-linux-gnueabi/gcc/arm

...

Any thoughts?

Thanks.

Failed building static crun with nix

builder for '/nix/store/6q1hbwl16qwfsbxq7b2axrv19syv2f4w-crun.drv' failed with exit code 2; last 10 log lines:
GEN .version
make all-recursive
make[1]: Entering directory '/tmp/nix-build-crun.drv-0/crun'
Making all in libocispec
make[2]: Entering directory '/tmp/nix-build-crun.drv-0/crun/libocispec'
make[2]: *** No rule to make target 'all'. Stop.
make[2]: Leaving directory '/tmp/nix-build-crun.drv-0/crun/libocispec'
make[1]: *** [Makefile:1923: all-recursive] Error 1
make[1]: Leaving directory '/tmp/nix-build-crun.drv-0/crun'
make: *** [Makefile:850: all] Error 2
[0 built (1 failed), 0.0 MiB DL]

It seems that some files were missing during the checkout. Manual ./autogen.sh took care of pulling some additional files and then build was a success.

Split python generator into a independce repo

  1. Serialization and unserialization of c and json should be a common tools.
  2. Current python generator just support json library is yajl, but it's too old(No more maintenance). we should make python generator support mult-json-library(like c-json, json-c, and so on).
  3. So, it should be a independce repo.

THKS

bug: top level array do not support base type

json schema:

$ cat tests/test-spec/basic/hello.json 
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "top double array of string",
  "type": "array",
  "items": {
    "type": "string"
  }
}

generate code

$ cat src/basic_hello.h 
// Generated from hello.json. Do not edit!
#ifndef BASIC_HELLO_SCHEMA_H
#define BASIC_HELLO_SCHEMA_H

#include <sys/types.h>
#include <stdint.h>
#include "json_common.h"

#ifdef __cplusplus
extern "C" {
#endif

void free_basic_hello (basic_hello_element **ptr, size_t len);

basic_hello_element **basic_hello_parse_file(const char *filename, const struct parser_context *ctx, parser_error *err, size_t *len);

basic_hello_element **basic_hello_parse_file_stream(FILE *stream, const struct parser_context *ctx, parser_error *err, size_t *len);

basic_hello_element **basic_hello_parse_data(const char *jsondata, const struct parser_context *ctx, parser_error *err, size_t *len);

char *basic_hello_generate_json(const basic_hello_element **ptr, size_t len, const struct parser_context *ctx, parser_error *err);

#ifdef __cplusplus
}
#endif

error: do not define basic_hello_element struct

solution:

  1. do not generate basic_hello_element for base type, just use char **;
  2. generate a basic_hello_element struct to contain base type, just like:
    typedef struct basic_hello_element {
    char **elements;
    size_t len;
    }

which way maybe better??
@giuseppe

i like second, it can extend for double array.... :)

Compilation error with clang++ 17

See also the original issue at containers/crun#1446

I am trying to consume libcrun in a c++ program compiled with clang++ 17 by including libcrun/container.h in "extern C" blocks.

#ifdef __cplusplus
extern "C" {
#include <libcrun/container.h>
#endif

#ifdef __cplusplus
}
#endif

The issue is that container.h includes ocispec/runtime_spec_schema_config_schema.h, which contains the following code which uses the reserved c++ keyword "class":

typedef struct {
    char *class;
    int32_t priority;
    yajl_val _residual;
    unsigned int priority_present : 1;
}

Thus the compilation fails.

Should this be fixed by replacing the "class" keyword while generating the C header-file in https://github.com/containers/libocispec/blob/main/src/ocispec/headers.py ?

Dynamic library

Hi,
Is it allowed to build libocispec as a dynamic library, and still use it with the license exceptions as described in #59 ?

autogen.sh runs failed

# ./autogen.sh 
Submodule 'runtime-spec' (https://github.com/giuseppe/libocispec/runtime-spec) registered for path 'runtime-spec'
Cloning into 'runtime-spec'...
remote: Not Found
fatal: repository 'https://github.com/giuseppe/libocispec/runtime-spec/' not found
fatal: clone of 'https://github.com/giuseppe/libocispec/runtime-spec' into submodule path 'runtime-spec' failed

can we update the url for submodule?

memory leak

the cppcheck give the following error and warning

# cppcheck --enable=all ./
Checking src/oci_runtime_spec.c ...
[src/oci_runtime_spec.c:58]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/oci_runtime_spec.c:63]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/oci_runtime_spec.c:68]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/oci_runtime_spec.c:1166]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/oci_runtime_spec.c:2406]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/oci_runtime_spec.c:1260]: (error) Memory leak: ret
[src/oci_runtime_spec.c:1433]: (error) Memory leak: ret
[src/oci_runtime_spec.c:2385]: (error) Memory leak: ret

License

Hi, are there any plans of moving the license from GPLv3 to GPLv2/LGPLv2.1+ like it has been done for crun: containers/crun@34a0ff3.

I believe if people want to include crun in their commercial product that the license of the libocispec is still pushing GPLv3, or am I wrong?

Empty arrays are lost when generating JSON

If an array is empty in a container config, then the JSON generated by runtime_spec_schema_config_schema_generate_json will be missing the property entirely.

Steps to reproduce:

  • Create a container config (e.g. crun spec)
  • Edit the config.json file to set one of the array items to be an empty array (e.g. linux.maskedPaths)
  • Load the config into libocispec with parse_file
  • Generate the container config.json again using libocispec - the output will not contain the maskedPaths property as it was an empty array and lost during conversion.

Expected behaviour:
The property should not be lost during conversion - the output config file should contain the property with an empty array

build error on ubuntu 16.04

# make
make  all-am
make[1]: Entering directory '/root/libocispec'
(cd src; ./generate.py ../runtime-spec/schema/config-schema.json spec.h spec.c)
  CC       src/spec.o
src/spec.c: In function 'make_oci_container_process':
src/spec.c:414:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "args");
         ^
src/spec.c:419:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "cwd");
         ^
src/spec.c: In function 'make_oci_container_windows':
src/spec.c:946:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "layerFolders");
         ^
src/spec.c: In function 'make_oci_container_NamespaceReference':
src/spec.c:1058:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "type");
         ^
src/spec.c: In function 'make_oci_container_linux_seccomp':
src/spec.c:1213:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "defaultAction");
         ^
src/spec.c: In function 'make_oci_container_root':
src/spec.c:2220:9: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
         asprintf (err, "Required field %s not present", "path");
         ^
  CC       src/read-file.o
  AR       libocispec.a
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       src/src_validate-validate.o
  CCLD     src/validate
libocispec.a(spec.o): In function `get_val':
/root/libocispec/src/spec.c:15: undefined reference to `yajl_tree_get'
/root/libocispec/src/spec.c:15: undefined reference to `yajl_tree_get'
/root/libocispec/src/spec.c:15: undefined reference to `yajl_tree_get'
/root/libocispec/src/spec.c:15: undefined reference to `yajl_tree_get'
/root/libocispec/src/spec.c:15: undefined reference to `yajl_tree_get'
libocispec.a(spec.o):/root/libocispec/src/spec.c:15: more undefined references to `yajl_tree_get' follow
libocispec.a(spec.o): In function `oci_parse_file':
/root/libocispec/src/spec.c:2356: undefined reference to `yajl_tree_parse'
/root/libocispec/src/spec.c:2364: undefined reference to `yajl_tree_free'
collect2: error: ld returned 1 exit status
Makefile:657: recipe for target 'src/validate' failed
make[1]: *** [src/validate] Error 1
make[1]: Leaving directory '/root/libocispec'
Makefile:542: recipe for target 'all' failed
make: *** [all] Error 2

Do you have a plan to improve the expandability of current project to generate C file from other json schema

Hi:
I think this project is wonderful to generate C file from oci runtime-spec, it's simplified so many cockamamie maintenance works.
I try to generate C file from image-spec/config-schema, It can not work well when we have such json schema:

"Entrypoint": {
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
typedef struct {
}
oci_container_config_Entrypoint;

and the generated struct is empty, since current project do not support syntax of "oneOf", or type of "mapStringObject".
I want to know that do you have a plan to generate C file from json schema of image-spec, since we have to parse json format data of image-spec. Or improve the expandability of current project to generate C file from other ordinary json schema.
It will be very cool if we have a unified solution to generate C file from json schema, Thanks.

Please update README.md

@giuseppe Thank you for your help in these days, we've done most of works to parse oci spec.

Please update README.md and introduction of this project if you have casual time.

can we support array array string

now libocispec can not support array array xxxx, just like this example.

schema like below

$ cat tests/test-spec/imageManifestItems/haozi.json 
{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "manifest item set",
	"type": "object",
	"properties": {
        "haozi": {
		    "type": "array",
            "items": {
		        "type": "array",
                "items": {
		            "type": "string"
                }
            }
        }
	}
}

get generate code

$ cat  src/image_manifest_items_haozi.h 
// Generated from haozi.json. Do not edit!
#ifndef IMAGE_MANIFEST_ITEMS_HAOZI_SCHEMA_H
#define IMAGE_MANIFEST_ITEMS_HAOZI_SCHEMA_H

#include <sys/types.h>
#include <stdint.h>
#include "json_common.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
     **haozi;
    size_t haozi_len;

    yajl_val _residual;
}
image_manifest_items_haozi;

void free_image_manifest_items_haozi (image_manifest_items_haozi *ptr);

image_manifest_items_haozi *make_image_manifest_items_haozi (yajl_val tree, const struct parser_context *ctx, parser_error *err);

yajl_gen_status gen_image_manifest_items_haozi (yajl_gen g, const image_manifest_items_haozi *ptr, const struct parser_context *ctx, parser_error *err);

image_manifest_items_haozi *image_manifest_items_haozi_parse_file(const char *filename, const struct parser_context *ctx, parser_error *err);

image_manifest_items_haozi *image_manifest_items_haozi_parse_file_stream(FILE *stream, const struct parser_context *ctx, parser_error *err);

image_manifest_items_haozi *image_manifest_items_haozi_parse_data(const char *jsondata, const struct parser_context *ctx, parser_error *err);

char *image_manifest_items_haozi_generate_json(const image_manifest_items_haozi *ptr, const struct parser_context *ctx, parser_error *err);

#ifdef __cplusplus
}
#endif

#endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.