[libvirt] [PATCH 0/9] Add Jansson support

Ján Tomko posted 9 patches 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1522278485.git.jtomko@redhat.com
Test syntax-check passed
configure.ac                   |  10 +-
m4/virt-json.m4                |  86 ++++++++++++++++
m4/virt-yajl.m4                |  55 -----------
src/Makefile.am                |   9 +-
src/qemu/qemu_capabilities.c   |   2 +-
src/qemu/qemu_driver.c         |   4 +-
src/util/Makefile.inc.am       |   4 +-
src/util/virjson.c             | 219 +++++++++++++++++++++++++++++++++++++++++
tests/Makefile.am              |  12 +--
tests/cputest.c                |  16 +--
tests/libxlxml2domconfigtest.c |   4 +-
tests/qemuagenttest.c          |   2 +-
tests/qemucapabilitiestest.c   |   2 +-
tests/qemucaps2xmltest.c       |   2 +-
tests/qemucommandutiltest.c    |   2 +-
tests/qemuhelptest.c           |   2 +-
tests/qemuhotplugtest.c        |   2 +-
tests/qemumonitorjsontest.c    |   2 +-
tests/virjsontest.c            |   2 +-
tests/virmacmaptest.c          |   3 +
tests/virmocklibxl.c           |   4 +-
tests/virnetdaemontest.c       |   2 +-
tests/virstoragetest.c         |   4 +-
23 files changed, 354 insertions(+), 96 deletions(-)
create mode 100644 m4/virt-json.m4
delete mode 100644 m4/virt-yajl.m4
[libvirt] [PATCH 0/9] Add Jansson support
Posted by Ján Tomko 6 years ago
Prefer Jansson, but allow fallback/choice of yajl.

Support for yajl can hopefully be dropped after we ditch CentOS 6
which has no Jansson.

Ján Tomko (9):
  virmacmaptest: depend on yajl for 'empty' test
  virjsontest: Use a more stable floating point number for testing
  configure: rename LIBVIRT_*_YAJL to LIBVIRT_*_JSON
  Introduce WITH_JSON
  Introduce JSON_CFLAGS and JSON_LIBS
  virt-json.m4: generalize yajl dependency
  build: link setuid_rpc_client against JSON_LIBS
  virjson: add support for Jansson
  virt-json.m4: simplify QEMU check

 configure.ac                   |  10 +-
 m4/virt-json.m4                |  86 ++++++++++++++++
 m4/virt-yajl.m4                |  55 -----------
 src/Makefile.am                |   9 +-
 src/qemu/qemu_capabilities.c   |   2 +-
 src/qemu/qemu_driver.c         |   4 +-
 src/util/Makefile.inc.am       |   4 +-
 src/util/virjson.c             | 219 +++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.am              |  12 +--
 tests/cputest.c                |  16 +--
 tests/libxlxml2domconfigtest.c |   4 +-
 tests/qemuagenttest.c          |   2 +-
 tests/qemucapabilitiestest.c   |   2 +-
 tests/qemucaps2xmltest.c       |   2 +-
 tests/qemucommandutiltest.c    |   2 +-
 tests/qemuhelptest.c           |   2 +-
 tests/qemuhotplugtest.c        |   2 +-
 tests/qemumonitorjsontest.c    |   2 +-
 tests/virjsontest.c            |   2 +-
 tests/virmacmaptest.c          |   3 +
 tests/virmocklibxl.c           |   4 +-
 tests/virnetdaemontest.c       |   2 +-
 tests/virstoragetest.c         |   4 +-
 23 files changed, 354 insertions(+), 96 deletions(-)
 create mode 100644 m4/virt-json.m4
 delete mode 100644 m4/virt-yajl.m4

-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/9] Add Jansson support
Posted by Daniel P. Berrangé 6 years ago
On Thu, Mar 29, 2018 at 01:09:49AM +0200, Ján Tomko wrote:
> Prefer Jansson, but allow fallback/choice of yajl.
> 
> Support for yajl can hopefully be dropped after we ditch CentOS 6
> which has no Jansson.

Seems like we can revisit this patch series given our discusions
about supported platforms.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/9] Add Jansson support
Posted by Ján Tomko 6 years ago
On Thu, Apr 12, 2018 at 12:35:21PM +0100, Daniel P. Berrangé wrote:
>On Thu, Mar 29, 2018 at 01:09:49AM +0200, Ján Tomko wrote:
>> Prefer Jansson, but allow fallback/choice of yajl.
>>
>> Support for yajl can hopefully be dropped after we ditch CentOS 6
>> which has no Jansson.
>
>Seems like we can revisit this patch series given our discusions
>about supported platforms.
>

Sadly, yes.

I don't see Jansson in the list of SLES 12 packages:
https://www.suse.com/LinuxPackages/packageRouter.jsp?product=server&version=12&service_pack=&architecture=x86_64&package_name=index_all

But json-c does seem to be everywhere.

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/9] Add Jansson support
Posted by Daniel P. Berrangé 6 years ago
On Thu, Apr 12, 2018 at 01:47:06PM +0200, Ján Tomko wrote:
> On Thu, Apr 12, 2018 at 12:35:21PM +0100, Daniel P. Berrangé wrote:
> > On Thu, Mar 29, 2018 at 01:09:49AM +0200, Ján Tomko wrote:
> > > Prefer Jansson, but allow fallback/choice of yajl.
> > > 
> > > Support for yajl can hopefully be dropped after we ditch CentOS 6
> > > which has no Jansson.
> > 
> > Seems like we can revisit this patch series given our discusions
> > about supported platforms.
> > 
> 
> Sadly, yes.
> 
> I don't see Jansson in the list of SLES 12 packages:
> https://www.suse.com/LinuxPackages/packageRouter.jsp?product=server&version=12&service_pack=&architecture=x86_64&package_name=index_all
> 
> But json-c does seem to be everywhere.

json-c header files pollute the global namespace with this:

  #undef FALSE
  #define FALSE ((json_bool)0)

  #undef TRUE
  #define TRUE ((json_bool)1)

  #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
  #define error_ptr(error) ((void*)error)
  #define error_description(error)  (json_tokener_errors[error])
  #define is_error(ptr) (ptr == NULL)

so I find json-c really unappealing to use.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list