Skip to contentSkip to conversation

libfastjson: new package

PATCH New Peter Korsgaard 2 participants 4 messages Jun 15, 2016 – Jun 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libfastjson: new package

Libfastjson is a fork of json-c, and a dependency of newer versions of rsyslog.

---
 package/Config.in                    |  1 +
 package/libfastjson/Config.in        | 16 ++++++++++++++++
 package/libfastjson/libfastjson.hash |  2 ++
 package/libfastjson/libfastjson.mk   | 15 +++++++++++++++
 4 files changed, 34 insertions(+)
 create mode 100644 package/libfastjson/Config.in
 create mode 100644 package/libfastjson/libfastjson.hash
 create mode 100644 package/libfastjson/libfastjson.mk
package/Config.in +1 -0
index ff08f27..0431dec 100644
@@ -1059,6 +1059,7 @@ menu "JSON/XML"
 	source "package/json-c/Config.in"
 	source "package/json-glib/Config.in"
 	source "package/jsoncpp/Config.in"
+	source "package/libfastjson/Config.in"
 	source "package/libjson/Config.in"
 	source "package/libroxml/Config.in"
 	source "package/libucl/Config.in"
package/libfastjson/Config.in new file +16 -0
new file mode 100644
index 0000000..5a94113
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_LIBFASTJSON
+	bool "libfastjson"
+	# uses __sync_val_compare_and_swap_4
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+	help
+	  Libfastjson - A fast json library for C
+
+	  Libfastjson is a fork from json-c. The aim of this project
+	  is not to provide a slightly modified clone of json-c.
+	  Its aim is to provide:
+
+	  - a small library with essential json handling functions
+	  - sufficiently good json support (not 100% standards compliant)
+	  - be very fast in processing
+
+	  https://github.com/rsyslog/libfastjson/
package/libfastjson/libfastjson.hash new file +2 -0
new file mode 100644
index 0000000..8531dac
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  fcdca0c4702362de3db3f02c8da05f985b54a9eccd618af41730409b75d10a8f  libfastjson-v0.99.2.tar.gz
package/libfastjson/libfastjson.mk new file +15 -0
new file mode 100644
index 0000000..ec5390c
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libfastjson
+#
+################################################################################
+
+LIBFASTJSON_VERSION = v0.99.2
+LIBFASTJSON_SITE = $(call github,rsyslog,libfastjson,$(LIBFASTJSON_VERSION))
+LIBFASTJSON_INSTALL_STAGING = YES
+# From git
+LIBFASTJSON_AUTORECONF = YES
+LIBFASTJSON_LICENSE = MIT
+LIBFASTJSON_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
Signature · 1 line
2.7.0
#1 lore raw

PATCH 2/3 rsyslog: bump version to 8.19.0

And drop patch now upstream. Rsyslog now uses libfastjson instead of json-c, so adjust dependencies.

---
 package/rsyslog/0001-musl-fcntl-h.patch | 30 ------------------------------
 package/rsyslog/Config.in               |  4 ++--
 package/rsyslog/rsyslog.hash            |  2 +-
 package/rsyslog/rsyslog.mk              |  4 ++--
 4 files changed, 5 insertions(+), 35 deletions(-)
 delete mode 100644 package/rsyslog/0001-musl-fcntl-h.patch
package/rsyslog/0001-musl-fcntl-h.patch deleted +0 -30
deleted file mode 100644
index 5c2daee..0000000
@@ -1,30 +0,0 @@
-From 835571774dc519dd2cff7ab1020cf298cc953a8f Mon Sep 17 00:00:00 2001
-From: Thordur Bjornsson <[email protected]>
-Date: Tue, 7 Jul 2015 12:34:08 +0200
-Subject: [PATCH] omfile: unconditionally include fcntl.h.
-
-required for open() flags
-
-Signed-off-by: Thordur Bjornsson <[email protected]>
-[Bernd: downloaded from upstream commit:
- https://github.com/rsyslog/rsyslog/commit/835571774dc519dd2cff7ab1020cf298cc953a8f
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- tools/omfile.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/tools/omfile.c b/tools/omfile.c
-index 482e723..4444b97 100644
---- a/tools/omfile.c
-+++ b/tools/omfile.c
-@@ -48,9 +48,7 @@
- #include <libgen.h>
- #include <unistd.h>
- #include <sys/file.h>
--#ifdef OS_SOLARIS
--#	include <fcntl.h>
--#endif
-+#include <fcntl.h>
- #ifdef HAVE_ATOMIC_BUILTINS
- #	include <pthread.h>
- #endif
package/rsyslog/Config.in +2 -2
index 3599207..241ee2e 100644
@@ -3,11 +3,11 @@ config BR2_PACKAGE_RSYSLOG
 	select BR2_PACKAGE_ZLIB
 	select BR2_PACKAGE_LIBESTR
 	select BR2_PACKAGE_LIBLOGGING
-	select BR2_PACKAGE_JSON_C
+	select BR2_PACKAGE_LIBFASTJSON
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # modules
-	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libfastjson
 	help
 	  Rsyslog is a powerful and flexible syslog implementation
 
package/rsyslog/rsyslog.hash +1 -1
index 5f9e0ed..7dc341a 100644
@@ -1,2 +1,2 @@
 # From http://www.rsyslog.com/downloads/download-v8-stable/
-sha256	eab00e8e758cd9dd33b3e2cf6af80297d1951dc7db37bd723a6488a35d577adc	rsyslog-8.9.0.tar.gz
+sha256	3379b30f2e6ef05a0f1c7327c73923fa5877a80b984506cdf48ed068c94a575e	rsyslog-8.19.0.tar.gz
package/rsyslog/rsyslog.mk +2 -2
index 5dde924..40e3b33 100644
@@ -4,11 +4,11 @@
 #
 ################################################################################
 
-RSYSLOG_VERSION = 8.9.0
+RSYSLOG_VERSION = 8.19.0
 RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog
 RSYSLOG_LICENSE = GPLv3, LGPLv3, Apache-2.0
 RSYSLOG_LICENSE_FILES = COPYING COPYING.LESSER COPYING.ASL20
-RSYSLOG_DEPENDENCIES = zlib libestr liblogging json-c host-pkgconf
+RSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf
 RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
 RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
 	mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \
Signature · 1 line
2.7.0
#2 lore raw

PATCH 3/3 rsyslog: add optional gnutls support

In reply to Peter Korsgaard

From: Adrien Decostre <[email protected]>

[Peter: drop explicit option and handle like other dependencies]
---
 package/rsyslog/rsyslog.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/rsyslog/rsyslog.mk +7 -0
index 40e3b33..18a5737 100644
@@ -22,6 +22,13 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 RSYSLOG_DEPENDENCIES += busybox
 endif
 
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+RSYSLOG_DEPENDENCIES += gnutls
+RSYSLOG_CONF_OPTS += --enable-gnutls
+else
+RSYSLOG_CONF_OPTS += --disable-gnutls
+endif
+
 ifeq ($(BR2_PACKAGE_LIBEE),y)
 RSYSLOG_DEPENDENCIES += libee
 endif
Signature · 1 line
2.7.0
#3 lore raw

PATCH 1/3 libfastjson: new package

In reply to Peter Korsgaard

Hello,

Quoted 4 lines · Peter Korsgaard

Libfastjson is a fork of json-c, and a dependency of newer versions of rsyslog.

Quoted 9 lines
---
 package/Config.in                    |  1 +
 package/libfastjson/Config.in        | 16 ++++++++++++++++
 package/libfastjson/libfastjson.hash |  2 ++
 package/libfastjson/libfastjson.mk   | 15 +++++++++++++++
 4 files changed, 34 insertions(+)
 create mode 100644 package/libfastjson/Config.in
 create mode 100644 package/libfastjson/libfastjson.hash
 create mode 100644 package/libfastjson/libfastjson.mk

Series applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com