FreeBSD Bugzilla – Attachment 215084 Details for
Bug 246884
net-mgmt/netdata: Fix cloud support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes cloud support
netdata-cloud-fix.patch (text/plain), 10.11 KB, created by
Steven Hartland
on 2020-05-30 22:17:34 UTC
(
hide
)
Description:
fixes cloud support
Filename:
MIME Type:
Creator:
Steven Hartland
Created:
2020-05-30 22:17:34 UTC
Size:
10.11 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 536994) >+++ Makefile (working copy) >@@ -4,7 +4,7 @@ > PORTNAME= netdata > PORTVERSION= 1.22.1 > DISTVERSIONPREFIX= v >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= net-mgmt > > MAINTAINER= ports@FreeBSD.org >@@ -63,6 +63,8 @@ > CLOUD_CONFIGURE_OFF= --disable-cloud > CLOUD_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-patch-web_gui_index.html \ > ${FILESDIR}/extra-patch-web_gui_main.js >+CLOUD_LIB_DEPENDS= libwebsockets.so.15:net/libwebsockets \ >+ libmosquitto.so:net/mosquitto > > CUPS_DESC= Enable support for cups > CUPS_CONFIGURE_ENABLE= plugin-cups >Index: files/patch-Makefile.am >=================================================================== >--- files/patch-Makefile.am (nonexistent) >+++ files/patch-Makefile.am (working copy) >@@ -0,0 +1,13 @@ >+--- Makefile.am.orig 2020-05-30 00:15:05 UTC >++++ Makefile.am >+@@ -642,8 +642,8 @@ netdata_SOURCES = $(NETDATA_FILES) >+ >+ if ENABLE_ACLK >+ netdata_LDADD = \ >+- externaldeps/mosquitto/libmosquitto.a \ >+- externaldeps/libwebsockets/libwebsockets.a \ >++ $(OPTIONAL_MOSQUITTO_LIBS) \ >++ $(OPTIONAL_WEBSOCKETS_LIBS) \ >+ $(OPTIONAL_LIBCAP_LIBS) \ >+ $(NETDATA_COMMON_LIBS) \ >+ $(NULL) > >Property changes on: files/patch-Makefile.am >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-aclk-mqtt.h >=================================================================== >--- files/patch-aclk-mqtt.h (nonexistent) >+++ files/patch-aclk-mqtt.h (working copy) >@@ -0,0 +1,11 @@ >+--- aclk/mqtt.h.orig 2020-05-30 00:15:05 UTC >++++ aclk/mqtt.h >+@@ -4,7 +4,7 @@ >+ #define NETDATA_MQTT_H >+ >+ #ifdef ENABLE_ACLK >+-#include "externaldeps/mosquitto/mosquitto.h" >++#include <mosquitto.h> >+ #endif >+ >+ void _show_mqtt_info(); > >Property changes on: files/patch-aclk-mqtt.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-configure.ac >=================================================================== >--- files/patch-configure.ac (revision 536994) >+++ files/patch-configure.ac (working copy) >@@ -1,7 +1,140 @@ >---- configure.ac.orig 2018-11-02 14:04:52 UTC >+--- configure.ac.orig 2020-05-30 00:15:05 UTC > +++ configure.ac >-@@ -497,15 +497,15 @@ AC_MSG_RESULT([${enable_lto}]) >+@@ -380,6 +380,34 @@ PKG_CHECK_MODULES([JSON],[json-c],AC_CHECK_LIB( >+ OPTIONAL_JSONC_LIBS="${JSONC_LIBS}" > >+ # ----------------------------------------------------------------------------- >++# mosquitto library >++ >++PKG_CHECK_MODULES([MOSQUITTO],[mosquitto],AC_CHECK_LIB( >++ [mosquitto], >++ [mosquitto_connect], >++ [MOSQUITTO_LIBS="-lmosquitto"]),AC_CHECK_LIB( >++ [mosquitto], >++ [mosquitto_connect], >++ [MOSQUITTO_LIBS="-lmosquitto"]) >++ ) >++ >++OPTIONAL_MOSQUITTO_LIBS="${MOSQUITTO_LIBS}" >++ >++# ----------------------------------------------------------------------------- >++# websockets library >++ >++PKG_CHECK_MODULES([WEBSOCKETS],[websockets],AC_CHECK_LIB( >++ [websockets], >++ [lws_set_socks], >++ [WEBSOCKETS_LIBS="-lwebsockets"]),AC_CHECK_LIB( >++ [websockets], >++ [lws_get_vhost_by_name], >++ [WEBSOCKETS_LIBS="-lwebsockets"]) >++ ) >++ >++OPTIONAL_WEBSOCKETS_LIBS="${WEBSOCKETS_LIBS}" >++ >++# ----------------------------------------------------------------------------- >+ # VFS plugin libs >+ >+ AC_CHECK_LIB( >+@@ -457,7 +485,7 @@ if test "${enable_jsonc}" != "no" -a -z "${JSONC_LIBS} >+ if test "${HAVE_libjson_c_a}" = "yes"; then >+ AC_DEFINE([LINK_STATIC_JSONC], [1], [static json-c should be used]) >+ JSONC_LIBS="static" >+- OPTIONAL_JSONC_STATIC_CFLAGS="-I externaldeps/jsonc" >++ OPTIONAL_JSONC_CFLAGS="-I externaldeps/jsonc" >+ fi >+ AC_MSG_RESULT([${HAVE_libjson_c_a}]) >+ fi >+@@ -577,40 +605,54 @@ if test "$enable_cloud" != "no"; then >+ AC_MSG_WARN([OpenSSL required for agent-cloud-link but not found. Try installing 'libssl-dev' or 'openssl-devel'.]) >+ fi >+ >+- AC_MSG_CHECKING([if libmosquitto static lib is present (and builds)]) >+- if test -f "externaldeps/mosquitto/libmosquitto.a"; then >+- LIBS_BKP="${LIBS}" >+- LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS}" >+- AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/mosquitto/mosquitto.h" >+- int main (int argc, char **argv) { >+- int m,mm,r; >+- mosquitto_lib_version(&m, &mm, &r); >+- }]])], >+- [HAVE_libmosquitto_a="yes"], >+- [HAVE_libmosquitto_a="no"]) >+- LIBS="${LIBS_BKP}" >+- else >+- HAVE_libmosquitto_a="no" >+- AC_DEFINE([ACLK_NO_LIBMOSQ], [1], [Libmosquitto.a was not found during build.]) >++ if test -z "${MOSQUITTO_LIBS}"; then >++ AC_MSG_CHECKING([if libmosquitto static lib is present (and builds)]) >++ if test -f "externaldeps/mosquitto/libmosquitto.a"; then >++ LIBS_BKP="${LIBS}" >++ LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS}" >++ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/mosquitto/mosquitto.h" >++ int main (int argc, char **argv) { >++ int m,mm,r; >++ mosquitto_lib_version(&m, &mm, &r); >++ }]])], >++ [HAVE_libmosquitto_a="yes"], >++ [HAVE_libmosquitto_a="no"]) >++ LIBS="${LIBS_BKP}" >++ fi >++ >++ if test "${HAVE_libmosquitto_a}" = "yes"; then >++ AC_DEFINE([LINK_STATIC_MOSQUITTO], [1], [static mosquitto should be used]) >++ MOSQUITTO_LIBS="static" >++ OPTIONAL_MOSQUITTO_LIBS="externaldeps/mosquitto/libmosquitto.a" >++ OPTIONAL_MOSQUITTO_CFLAGS="-I externaldeps/mosquitto" >++ fi >++ AC_MSG_RESULT([${HAVE_libmosquitto_a}]) >++ #AC_DEFINE([ACLK_NO_LIBMOSQ], [1], [Libmosquitto.a was not found during build.]) >+ fi >+- AC_MSG_RESULT([${HAVE_libmosquitto_a}]) >++ AM_CONDITIONAL([LINK_STATIC_MOSQUITTO], [test "${MOSQUITTO_LIBS}" = "static"]) >+ >+- AC_MSG_CHECKING([if libwebsockets static lib is present]) >+- if test -f "externaldeps/libwebsockets/libwebsockets.a"; then >+- LWS_CFLAGS="-I externaldeps/libwebsockets/include" >+- HAVE_libwebsockets_a="yes" >+- else >+- HAVE_libwebsockets_a="no" >+- AC_DEFINE([ACLK_NO_LWS], [1], [libwebsockets.a was not found during build.]) >++ if test -z "${MOSQUITTO_LIBS}"; then >++ AC_MSG_CHECKING([if libwebsockets static lib is present]) >++ if test -f "externaldeps/libwebsockets/libwebsockets.a"; then >++ OPTIONAL_MOSQUITTO_LIBS="externaldeps/libwebsockets/libwebsockets.a" >++ OPTIONAL_WEBSOCKETS_CFLAGS="-I externaldeps/libwebsockets/include" >++ AC_DEFINE([LINK_STATIC_WEBSOCKETS], [1], [static websockets should be used]) >++ WEBSOCKETS_LIBS="static" >++ HAVE_libwebsockets_a="yes" >++ else >++ HAVE_libwebsockets_a="no" >++ AC_DEFINE([ACLK_NO_LWS], [1], [libwebsockets.a was not found during build.]) >++ fi >++ AC_MSG_RESULT([${HAVE_libwebsockets_a}]) >+ fi >+- AC_MSG_RESULT([${HAVE_libwebsockets_a}]) >++ AM_CONDITIONAL([LINK_STATIC_WEBSOCKETS], [test "${WEBSOCKETS_LIBS}" = "static"]) >+ >+ if test "${build_target}" = "linux" -a "${enable_cloud}" != "no"; then >+ if test "${have_libcap}" = "yes" -a "${with_libcap}" = "no"; then >+ AC_MSG_ERROR([agent-cloud-link can't be built without libcap. Disable it by --disable-cloud or enable libcap]) >+ fi >+ if test "${with_libcap}" = "yes"; then >+- LWS_CFLAGS+=" ${LIBCAP_CFLAGS}" >++ OPTIONAL_WEBSOCKETS_CFLAGS+=" ${LIBCAP_CFLAGS}" >+ fi >+ fi >+ >+@@ -622,7 +664,7 @@ if test "$enable_cloud" != "no"; then >+ AC_MSG_ERROR([You have asked for ACLK to be built but no json-c available. ACLK requires json-c]) >+ >+ AC_MSG_CHECKING([if netdata agent-cloud-link can be enabled]) >+- if test "${HAVE_libmosquitto_a}" = "yes" -a "${HAVE_libwebsockets_a}" = "yes" -a -n "${SSL_LIBS}" -a "${enable_jsonc}" = "yes"; then >++ if test "${enable_jsonc}" = "yes" -a -n "${MOSQUITTO_LIBS}" -a -n "${WEBSOCKETS_LIBS}" -a -n "${SSL_LIBS}"; then >+ can_enable_aclk="yes" >+ else >+ can_enable_aclk="no" >+@@ -1227,15 +1269,15 @@ AM_CONDITIONAL([ENABLE_CXX_LINKER], [test "${enable_ba >+ > AC_DEFINE_UNQUOTED([NETDATA_USER], ["${with_user}"], [use this user to drop privileged]) > > -varlibdir="${localstatedir}/lib/netdata" >@@ -21,3 +154,23 @@ > pluginsdir="${libexecdir}/netdata/plugins.d" > > AC_SUBST([build_target]) >+@@ -1253,8 +1295,8 @@ AC_SUBST([webdir]) >+ >+ CFLAGS="${CFLAGS} ${OPTIONAL_MATH_CFLAGS} ${OPTIONAL_NFACCT_CFLAGS} ${OPTIONAL_ZLIB_CFLAGS} ${OPTIONAL_UUID_CFLAGS} \ >+ ${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS} ${OPTIONAL_CUPS_CFLAGS} ${OPTIONAL_XENSTAT_FLAGS} \ >+- ${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} ${OPTIONAL_MONGOC_CFLAGS} ${LWS_CFLAGS} \ >+- ${OPTIONAL_JSONC_STATIC_CFLAGS}" >++ ${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} ${OPTIONAL_MONGOC_CFLAGS} \ >++ ${OPTIONAL_WEBSOCKETS_CFLAGS} ${OPTIONAL_JSONC_CFLAGS} $(OPTIONAL_MOSQUITTO_CFLAGS)" >+ >+ CXXFLAGS="${CFLAGS} ${CXX11FLAG}" >+ >+@@ -1278,6 +1320,8 @@ AC_SUBST([OPTIONAL_JUDY_LIBS]) >+ AC_SUBST([OPTIONAL_SSL_LIBS]) >+ AC_SUBST([OPTIONAL_EBPF_LIBS]) >+ AC_SUBST([OPTIONAL_JSONC_LIBS]) >++AC_SUBST([OPTIONAL_MOSQUITTO_LIBS]) >++AC_SUBST([OPTIONAL_WEBSOCKETS_LIBS]) >+ AC_SUBST([OPTIONAL_NFACCT_CFLAGS]) >+ AC_SUBST([OPTIONAL_NFACCT_LIBS]) >+ AC_SUBST([OPTIONAL_ZLIB_CFLAGS])
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246884
: 215084