Skip to content

Allow to build libxl and other tools with json-c instead of yajl

Anthony PERARD xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 11 repliesIn review
  2. v111 patches 22 repliesSuperseded

Changes in v2 from the cover letter

- introduce $(XEN_JSON_LIBS) to have either -lyajl or -ljson-c or both (for a short while).
- few more changes detail in each patches.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tools/configure: Introduce deps on json-c lib for libxlconfig/Tools.mk.in tools/config.h.in tools/configure +3 more+117 -62 replies
2/8libxl: Convert libxl__json_parse() to use json-ctools/include/libxl_json.h tools/libs/light/libxl_json.c+120 -42 replies
3/8libxl: convert libxl__json_object_to_yajl_gen to libxl__json_object_to_libjsonc_objecttools/include/libxl_json.h tools/libs/light/libxl_internal.h tools/libs/light/libxl_json.c +1 more+166 -00 replies
4/8libxl: libxl__object_to_json() to json-ctools/include/libxl_json.h tools/libs/light/Makefile tools/libs/light/gentypes.py +7 more+729 -201 reply
5/8libxl: convert libxl__json_object_to_json() to json_objecttools/libs/light/libxl_json.c+26 -00 replies
6/8tools/libxenstat: Use json-c when availabletools/libs/stat/Makefile tools/libs/stat/xenstat_qmp.c+120 -81 reply
7/8configure: Use json-c by default, fallback to yajltools/configure tools/configure.ac+69 -402 replies
8/8Update CHANGELOG and README with dependency on json-cCHANGELOG.md README+3 -11 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchJason AndryukOleksii KurochkoAndrew Cooper
1/8R-b A-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b A-b
8/8A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [XEN PATCH v2 0/8] Allow to build libxl and other tools with json-c instead of yajl

From: Anthony PERARD <[email protected]>

Patch series available in this git branch:
https://xenbits.xenproject.org/git-http/people/aperard/xen-unstable.git br.libxl-libjsonc-v2

changes in v2:
- introduce $(XEN_JSON_LIBS) to have either -lyajl or -ljson-c or both (for a short while).
- few more changes detail in each patches.

Hi,

The library YAJL has been unmaintained for several years, without an obvious fork to pick.

On the other and the library json-c is been maintained and use by several other project, it's probably already installed on your machine. So this patch series intend to allow to build the Xen toolstack again json-c, and forgo yajl.

Just in case, YAJL is can still be used.

There's bit of libxl API that exposes YAJL, mainly so it can be used by xl to call libxl_domain_config_gen_json(). It was exposed via the "libxl_json.h" headers. This functions and others won't be available when libxl is build against json-c.

Cheers,

Anthony PERARD (8):
tools/configure: Introduce deps on json-c lib for libxl
libxl: Convert libxl__json_parse() to use json-c
libxl: convert libxl__json_object_to_yajl_gen to
libxl__json_object_to_libjsonc_object
libxl: libxl__object_to_json() to json-c
libxl: convert libxl__json_object_to_json() to json_object tools/libxenstat: Use json-c when available
configure: Use json-c by default, fallback to yajl Update CHANGELOG and README with dependency on json-c

 CHANGELOG.md                              |   2 +
 README                                    |   2 +-
 config/Tools.mk.in                        |   1 +
 tools/config.h.in                         |   3 +
 tools/configure                           | 136 +++++-
 tools/configure.ac                        |  10 +-
 tools/include/libxl_json.h                |  27 ++
 tools/libs/light/Makefile                 |   6 +-
 tools/libs/light/gentypes.py              | 160 +++++-
 tools/libs/light/idl.py                   |   7 +-
 tools/libs/light/libxl_cpuid.c            | 119 +++++
 tools/libs/light/libxl_internal.h         |  23 +-
 tools/libs/light/libxl_json.c             | 562 +++++++++++++++++++++-
 tools/libs/light/libxl_qmp.c              |  53 ++
 tools/libs/light/libxl_types.idl          |   7 +-
 tools/libs/light/libxl_types_internal.idl |   3 +-
 tools/libs/stat/Makefile                  |   2 +-
 tools/libs/stat/xenstat_qmp.c             | 126 ++++-
 tools/xl/Makefile                         |   2 +-
 tools/xl/xl_info.c                        | 102 +++-
 20 files changed, 1312 insertions(+), 41 deletions(-)
Signature · 1 line
Anthony PERARD