aboutsummaryrefslogtreecommitdiff
path: root/system/netdata/mqtt_websockets.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/netdata/mqtt_websockets.patch')
-rw-r--r--system/netdata/mqtt_websockets.patch175
1 files changed, 0 insertions, 175 deletions
diff --git a/system/netdata/mqtt_websockets.patch b/system/netdata/mqtt_websockets.patch
deleted file mode 100644
index ebf961d25b142..0000000000000
--- a/system/netdata/mqtt_websockets.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 2a285a057b84f844d591d3e86772e893a361cbf8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timotej=20=C5=A0i=C5=A1kovi=C4=8D?= <timotej@netdata.cloud>
-Date: Mon, 3 May 2021 18:42:58 +0200
-Subject: [PATCH 1/4] build with netdata autotools
-
----
- Makefile.am | 29 ++++++++++++++++-------------
- configure.ac | 2 +-
- 2 files changed, 17 insertions(+), 14 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2e3fe4c842677..ba2ce1d05b013 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -117,11 +117,7 @@ SUBDIRS += \
- spawn \
- $(NULL)
-
--if ACLK_NG
--SUBDIRS += \
-- mqtt_websockets \
-- $(NULL)
--else
-+if !ACLK_NG
- SUBDIRS += \
- aclk/legacy \
- $(NULL)
-@@ -562,6 +558,17 @@ ACLK_FILES = \
- aclk/aclk_rx_msgs.h \
- aclk/https_client.c \
- aclk/https_client.h \
-+ mqtt_websockets/src/mqtt_wss_client.c \
-+ mqtt_websockets/src/include/mqtt_wss_client.h \
-+ mqtt_websockets/src/mqtt_wss_log.c \
-+ mqtt_websockets/src/include/mqtt_wss_log.h \
-+ mqtt_websockets/src/ws_client.c \
-+ mqtt_websockets/src/include/ws_client.h \
-+ mqtt_websockets/c-rbuf/src/ringbuffer.c \
-+ mqtt_websockets/c-rbuf/include/ringbuffer.h \
-+ mqtt_websockets/c-rbuf/src/ringbuffer_internal.h \
-+ mqtt_websockets/MQTT-C/src/mqtt.c \
-+ mqtt_websockets/MQTT-C/include/mqtt.h \
- $(NULL)
- else #ACLK_NG
- ACLK_FILES = \
-@@ -755,23 +762,19 @@ NETDATACLI_FILES = \
- sbin_PROGRAMS += netdata
- netdata_SOURCES = $(NETDATA_FILES)
-
--if ACLK_NG
-+
- netdata_LDADD = \
-- mqtt_websockets/libmqttwebsockets.a \
- $(NETDATA_COMMON_LIBS) \
- $(NULL)
--else #ACLK_NG
-+
-+if !ACLK_NG
- if ENABLE_ACLK
--netdata_LDADD = \
-+netdata_LDADD += \
- externaldeps/mosquitto/libmosquitto.a \
- $(OPTIONAL_LIBCAP_LIBS) \
- $(OPTIONAL_LWS_LIBS) \
- $(NETDATA_COMMON_LIBS) \
- $(NULL)
--else #ENABLE_ACLK
--netdata_LDADD = \
-- $(NETDATA_COMMON_LIBS) \
-- $(NULL)
- endif #ENABLE_ACLK
- endif #ACLK_NG
-
-diff --git a/configure.ac b/configure.ac
-index 03672c5518f8d..6635f896a63fc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -753,7 +753,7 @@ if test "$enable_cloud" != "no" -a "$aclk_ng" != "no"; then
- AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK])
- enable_aclk="yes"
- AC_MSG_RESULT([yes])
-- OPTIONAL_MQTT_WSS_CFLAGS="-Imqtt_websockets/src/include"
-+ OPTIONAL_MQTT_WSS_CFLAGS="-Imqtt_websockets/src/include -Imqtt_websockets/c-rbuf/include -Imqtt_websockets/MQTT-C/include"
- fi
- fi
- fi
-
-From 32dec156f7878654177e1fc8d4277172e52116e7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timotej=20=C5=A0i=C5=A1kovi=C4=8D?= <timotej@netdata.cloud>
-Date: Mon, 3 May 2021 19:19:13 +0200
-Subject: [PATCH 3/4] fix dep detection for aclk-ng
-
----
- configure.ac | 49 ++++++++++++++++++++++++++++++++++---------------
- 1 file changed, 34 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6635f896a63fc..e106bf0bfd435 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -737,24 +737,43 @@ if test "$enable_cloud" = "no" -a "$aclk_ng" = "yes"; then
- fi
-
- if test "$enable_cloud" != "no" -a "$aclk_ng" != "no"; then
-+ can_enable_ng="yes"
-+ AC_MSG_CHECKING([if git submodules present for ACLK Next Generation])
-+ if test -f "mqtt_websockets/src/mqtt_wss_client.c"; then
-+ AC_MSG_RESULT([yes])
-+ else
-+ AC_MSG_RESULT([no])
-+ can_enable_ng="no"
-+ fi
-+ AC_MSG_CHECKING([if SSL available for ACLK Next Generation])
-+ if test -n "${SSL_LIBS}"; then
-+ AC_MSG_RESULT([yes])
-+ OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
-+ OPTIONAL_SSL_LIBS="${SSL_LIBS}"
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
- AC_MSG_CHECKING([if JSON-C available for ACLK Next Generation])
- if test "$enable_jsonc" != "yes"; then
- AC_MSG_RESULT([no])
-+ can_enable_ng="no"
- else
- AC_MSG_RESULT([yes])
-- if test "$aclk_ng" != "yes" -a "$enable_aclk" == "no"; then #default "fallback"
-- AC_MSG_NOTICE([ACLK Legacy could not be built. Trying ACLK-NG as fallback.])
-- aclk_ng="yes"
-- fi
-- if test "$aclk_ng" = "yes"; then
-- #TODO Check OpenSSL and JSON-C
-- AC_MSG_CHECKING([if ACLK Next Generation can be built])
-- AC_DEFINE([ACLK_NG], [1], [ACLK Next Generation Should be used])
-- AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK])
-- enable_aclk="yes"
-- AC_MSG_RESULT([yes])
-- OPTIONAL_MQTT_WSS_CFLAGS="-Imqtt_websockets/src/include -Imqtt_websockets/c-rbuf/include -Imqtt_websockets/MQTT-C/include"
-- fi
-+ fi
-+ AC_MSG_CHECKING([ACLK Next Generation can be built])
-+ AC_MSG_RESULT([${can_enable_ng}])
-+ if test "$aclk_ng" = "yes" -a "$can_enable_ng" != "yes"; then
-+ AC_MSG_ERROR([ACLK-NG requested but can't be built])
-+ fi
-+ if test "$aclk_ng" != "yes" -a "$enable_aclk" == "no" -a "$can_enable_ng" = "yes"; then #default "fallback"
-+ AC_MSG_NOTICE([ACLK Legacy could not be built. Trying ACLK-NG as fallback.])
-+ aclk_ng="yes"
-+ fi
-+ if test "$aclk_ng" = "yes"; then
-+ AC_DEFINE([ACLK_NG], [1], [ACLK Next Generation Should be used])
-+ AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK])
-+ enable_aclk="yes"
-+ OPTIONAL_ACLK_NG_CFLAGS="-Imqtt_websockets/src/include -Imqtt_websockets/c-rbuf/include -Imqtt_websockets/MQTT-C/include"
- fi
- fi
- AC_SUBST([enable_cloud])
-@@ -1457,7 +1476,7 @@ CFLAGS="${CFLAGS} ${OPTIONAL_MATH_CFLAGS} ${OPTIONAL_NFACCT_CFLAGS} ${OPTIONAL_Z
- ${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS} ${OPTIONAL_CUPS_CFLAGS} ${OPTIONAL_XENSTAT_FLAGS} \
- ${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PUBSUB_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} \
- ${OPTIONAL_MONGOC_CFLAGS} ${LWS_CFLAGS} ${OPTIONAL_JSONC_STATIC_CFLAGS} ${OPTIONAL_BPF_CFLAGS} ${OPTIONAL_JUDY_CFLAGS} \
-- ${OPTIONAL_MQTT_WSS_CFLAGS}"
-+ ${OPTIONAL_ACLK_NG_CFLAGS}"
-
- CXXFLAGS="${CFLAGS} ${CXX11FLAG}"
-
-@@ -1507,7 +1526,7 @@ AC_SUBST([OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS])
- AC_SUBST([OPTIONAL_MONGOC_CFLAGS])
- AC_SUBST([OPTIONAL_MONGOC_LIBS])
- AC_SUBST([OPTIONAL_LWS_LIBS])
--AC_SUBST([OPTIONAL_MQTT_WSS_CFLAGS])
-+AC_SUBST([OPTIONAL_ACLK_NG_CFLAGS])
-
- # -----------------------------------------------------------------------------
- # Check if cmocka is available - needed for unit testing